elcrm 0.9.183 → 0.9.185
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 +2 -2
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -7436,14 +7436,14 @@ function mr({
|
|
|
7436
7436
|
break;
|
|
7437
7437
|
case "string":
|
|
7438
7438
|
t({
|
|
7439
|
-
value: Object.keys(M).join(
|
|
7439
|
+
value: Object.keys(M).filter((S) => M[S]).join(s),
|
|
7440
7440
|
name: n
|
|
7441
7441
|
});
|
|
7442
7442
|
break;
|
|
7443
7443
|
default:
|
|
7444
7444
|
t({ value: M, name: n });
|
|
7445
7445
|
}
|
|
7446
|
-
I(M);
|
|
7446
|
+
I({ ...M });
|
|
7447
7447
|
},
|
|
7448
7448
|
onValue: t,
|
|
7449
7449
|
options: v,
|
package/dist/index.umd.js
CHANGED
|
@@ -28,4 +28,4 @@ Check the top-level render call using <`+B+">.")}return S}}function mr(u,S){{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} />`,Rt,Ne,jl,Ne),hr[Ne+Rt]=!0}}return u===a?vl(X):bl(X),X}}function yl(u,S,B){return gr(u,S,B,!0)}function wl(u,S,B){return gr(u,S,B,!1)}var kl=wl,Cl=yl;Pe.Fragment=a,Pe.jsx=kl,Pe.jsxs=Cl}()),Pe}process.env.NODE_ENV==="production"?lt.exports=Mr():lt.exports=$r();var r=lt.exports;let pe={};function Ae({data:e}){let[t,n]=m.useState("show");m.useEffect(()=>{e.hide&&(setTimeout(function(){n("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]);let a,i;switch(e.type){case"error":a=r.jsx(Ee.error,{}),i="Ошибка:";break;case"success":a=r.jsx(Ee.success,{}),i="Информация:";break;case"copy":a=r.jsx(Ee.success,{}),i="Копирование:";break;case"remark":a=r.jsx(Ee.success,{}),i="Подсказка:";break;default:a=r.jsx(Ee.success,{}),i="Предупреждение:";break}return r.jsxs("li",{className:"item "+e.type,"data-status":t,children:[a,r.jsx("b",{children:i}),r.jsx("p",{children:e.text})]})}function Pr({data:e}){let[t,n]=m.useState("show");return m.useEffect(()=>{e.hide&&(setTimeout(function(){n("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]),r.jsx("li",{className:"item","data-status":t,children:e.text})}const Ee={};Ee.error=()=>r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"})]}),Ee.success=()=>r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"})]}),h.Notice=void 0,(e=>{function t(){let[l,_]=m.useState([]);return pe.set=d=>{_([...l,d])},pe.del=d=>{_(l.filter(p=>p.key!==d))},l.length===0?"":r.jsx("ul",{id:"notice",children:l.map(d=>d.item)})}e.Init=t;function n(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"error"};pe.set({item:r.jsx(Ae,{data:p},d),key:d})}e.Error=n;function a(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"success"};pe.set({item:r.jsx(Ae,{data:p},d),key:d})}e.Success=a;function i(l,_=!0){let d=Date.now(),p={key:d,hide:_,text:l};pe.set({item:r.jsx(Pr,{data:p},d),key:d})}e.Custom=i;function o(l){let _=Date.now(),d={key:_,hide:!0,...l};pe.set({item:r.jsx(Ae,{data:d},_),key:_})}e.Send=o;function s(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"remark"};pe.set({item:r.jsx(Ae,{data:p},d),key:d})}e.Remark=s;function c(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"copy"};pe.set({item:r.jsx(Ae,{data:p},d),key:d})}e.Copy=c})(h.Notice||(h.Notice={}));const nn={alerts:"_alerts_ita6j_1",menuAnimation:"_menuAnimation_ita6j_1",menuItemAnimation:"_menuItemAnimation_ita6j_1","--body":"_--body_ita6j_103",allert:"_allert_ita6j_111","--form":"_--form_ita6j_111",al:"_al_ita6j_1"};let Fe={};const Ar=({data:e,callback:t,cancel:n})=>(e.button=e.button===void 0?"Подтвердить":e.button,r.jsxs("div",{className:nn.alerts,children:[r.jsxs("dl",{children:[r.jsx("dt",{children:e.title}),r.jsx("dd",{children:e.text}),r.jsx("ul",{children:r.jsx("button",{color:e.color||"blue",onClick:()=>{t(),Fe.del()},children:e.button})})]}),r.jsx("div",{className:nn["--body"],onClick:()=>{n==null||n(),Fe.del()}})]}));h.Alert=void 0,(e=>{function t(){let[a,i]=m.useState("");return Fe.set=o=>i(o),Fe.del=()=>i(""),r.jsx(r.Fragment,{children:a})}e.Init=t;function n(a,i,o){Fe.set(r.jsx(Ar,{data:a,callback:i,cancel:o}))}e.Send=n})(h.Alert||(h.Alert={}));function Fr({children:e}){return r.jsx("div",{className:"l",children:r.jsx("ul",{children:e})})}const te={white:"_white_1lqz6_15",black:"_black_1lqz6_29",shake:"_shake_1lqz6_1",modal:"_modal_1lqz6_78",o:"_o_1lqz6_88",w:"_w_1lqz6_15",h:"_h_1lqz6_113",l:"_l_1lqz6_127",t:"_t_1lqz6_165",m:"_m_1lqz6_78",x:"_x_1lqz6_173",s:"_s_1lqz6_183",c:"_c_1lqz6_188",f:"_f_1lqz6_193",row:"_row_1lqz6_215",col:"_col_1lqz6_227",g:"_g_1lqz6_236","size-a":"_size-a_1lqz6_286","size-s":"_size-s_1lqz6_291","size-m":"_size-m_1lqz6_295","size-l":"_size-l_1lqz6_299","size-x":"_size-x_1lqz6_303","size-f":"_size-f_1lqz6_307",active:"_active_1lqz6_356",coincidence:"_coincidence_1lqz6_362",sa:"_sa_1lqz6_398",ss:"_ss_1lqz6_402",sm:"_sm_1lqz6_406",sl:"_sl_1lqz6_410",sx:"_sx_1lqz6_414",sf:"_sf_1lqz6_418",btn:"_btn_1lqz6_424"};function Or({children:e}){return r.jsx("div",{className:te.s,children:e})}function qr({children:e,viev:t="row",className:n}){let a={};return n&&(a.className=n),r.jsx("ul",{className:[te.f,te[t],a.className].join(" "),children:e})}function Rr({children:e}){return r.jsx("div",{className:te.c,children:e})}function Zr({children:e}){return r.jsx("div",{className:te.g,children:e})}const oe={};function Ur(e){return e&&(oe.s=e),oe.s}function Wr(e){return e&&(oe.a=e),oe.a}function Gr(e){return e&&(oe.c=e),oe.c}function Kr(e){return e&&(oe.h=e),oe.h}function Yr(e){return e&&(oe.i=e),oe.i}function Hr(e){return e&&(oe.d=e),oe.d}function Ye(e){return oe.i(e)}let He={};function Jr({children:e}){return r.jsx(r.Fragment,{children:e})}h.Modal=void 0,(e=>{function t(){let[l,_]=m.useState([]);return He.x=d=>{_(d?l.filter(p=>p.key!==d):[])},He.add=(d,p=Date.now())=>{_([...l,{key:p,item:d}])},r.jsx(r.Fragment,{children:l.map(d=>d.item)})}e.Init=t,e.List=Fr,e.Scroll=Or,e.Form=qr,e.Center=Rr,e.Column=Zr;function n(l,_,d){Ye(`${l}/modal/${_}.tsx`).then(p=>{p.default.Open(d)})}e.Open=n;function a({type:l,name:_,params:d}){let[p,f]=m.useState(null);return m.useEffect(()=>{Ye(`${l}/modal/${_}.tsx`).then(g=>{f(g.default.Icon(d))})},[d.id]),r.jsx(r.Fragment,{children:p})}e.Icon=a;function i(l,_){He.add(r.jsx(Jr,{children:l},String(Date.now())),_)}e.Add=i;function o(l){He.x(l)}e.Close=o;function s(l){if(l.target.classList[0]!=="modal")return;let _=l.target.children[0];_.setAttribute("shake",!0),setTimeout(()=>{_.setAttribute("shake",!1)},1e3)}e.Shake=s;function c({title:l,children:_,button:d,tabs:p,size:f="m",className:g="",shake:b=!0,menu:x}){const[v,k]=m.useState(!0),w=m.useRef(),D=T=>{if(d){if(d.onClick)return T(!1),d.onClick({setOpen:k});if(d.onSend)return d.onSend({setOpen:k,disabled:T})}},z=()=>{if(!b)return k(!1);w.current.setAttribute("shake",!0),setTimeout(()=>{w.current.setAttribute("shake",!1)},1e3)};return v?r.jsxs("div",{className:`${te.modal}`,children:[r.jsx("div",{className:te.o,onClick:z}),r.jsxs("div",{className:[te.w,te[`s${f}`],g].join(" "),ref:w,children:[r.jsxs("div",{className:te.h,children:[r.jsx("div",{className:te.t,children:l}),r.jsxs("div",{className:te.m,children:[p&&r.jsx("nav",{children:p.map((T,N)=>r.jsx("span",{onClick:T.onClick,className:T.active?"active":"",children:T.name},N))}),x]}),r.jsx("div",{className:te.x,onClick:()=>{k(!1)},children:r.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:r.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"})})})]}),_,d!==void 0?r.jsx(xn,{label:d.label,onSend:D,className:te.btn}):""]})]}):""}e.Main=c})(h.Modal||(h.Modal={}));let Oe={};const Xr=({content:e,position:t,orientation:n="up",update:a,textAlign:i})=>{const o=m.useRef(null);return m.useEffect(()=>{const s=o.current;s.style.opacity="0",s.style.width="auto",s.style.left="0px",s.style.top="0px";let c={x:0,y:0};const l=s.getBoundingClientRect();let _=t.width/2;s.style.width=l.width+"px";let d=0;switch(n){case"up":d=t.left+_-l.width/2-10,d=window.innerWidth<d+l.width?window.innerWidth-l.width-20:d,d=d<0?0:d,s.style.left=d+"px",s.style.top=t.top-l.height-10+"px",c.x=t.left+_,c.y=t.top-10;break;case"down":d=t.left+_-l.width/2,d=d<0?0:d,s.style.left=d+"px",s.style.top=t.bottom+10+"px";break;case"left":s.style.top=t.top+"px",s.style.left=t.left-l.width-t.width+"px";break;case"right":s.style.top=t.top+"px",s.style.left=t.right+"px";break}s.style.setProperty("--tooltip-arrow-x",c.x+"px"),s.style.setProperty("--tooltip-arrow-y",c.y+"px"),s.style.transition="opacity 0.3s",s.style.textAlign=i,s.style.opacity="1"},[a]),r.jsx("div",{ref:o,className:"tooltip",children:e})};h.Tooltip=void 0,(e=>{e.Init=()=>{let[t,n]=m.useState("");return Oe.set=a=>n(a),Oe.del=()=>n(""),r.jsx(r.Fragment,{children:t})},e.Text=({content:t,children:n,className:a,textAlign:i="center",orientation:o="down",dev:s,...c})=>{const l=d=>{c.element?Oe.set(r.jsx(c.element,{content:t,position:d.currentTarget.getBoundingClientRect(),textAlign:i,update:Date.now()})):Oe.set(r.jsx(Xr,{update:Date.now(),orientation:o,content:t,textAlign:i,position:d.currentTarget.getBoundingClientRect()}))},_=()=>{s||Oe.del()};return r.jsx("span",{className:a,onMouseOver:l,onMouseOut:_,children:n})}})(h.Tooltip||(h.Tooltip={}));const Ie={key:"Y0zt37HgOx-BY7SQjYVmrqhPkO41Ii2Jcb9yydUDPf6",iterations:7,saltLength:16},Je=e=>{let t=0;for(let a=0;a<e.length;a++){const i=e.charCodeAt(a);t=(t<<5)-t+i,t=t&t}t=Math.abs(t);let n="";for(let a=0;a<64;a++){const i=(t^a*197)&255;n+=i.toString(16).padStart(2,"0")}return n},rn=(e,t)=>{let n=e+t;for(let i=0;i<Ie.iterations;i++)n=Je(n);const a=new Uint8Array(32);for(let i=0;i<32;i++)a[i]=parseInt(n.substring(i*2,i*2+2),16);return a},an=(e,t)=>{const n=new Uint8Array(e.length),a=new Uint8Array(e.length);let i=0;for(let o=0;o<e.length;o++){const s=o%t.length;i=t[s]+o+i&255,a[o]=i}for(let o=0;o<e.length;o++)n[o]=e[o]^a[o];return n},Vr=e=>new TextEncoder().encode(e),Qr=e=>new TextDecoder().decode(e),ea=e=>{let t="";for(let a=0;a<e.length;a+=8192){const i=e.slice(a,Math.min(a+8192,e.length));t+=String.fromCharCode.apply(null,Array.from(i))}return btoa(t)},ta=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n},na=e=>{try{const t=Je(Date.now().toString()+Math.random()).substring(0,Ie.saltLength*2),n=Je(e+t).substring(0,8),a=rn(Ie.key,t),i=Vr(e),o=an(i,a),s=ea(o);return`${t}.${s}.${n}`}catch{throw new Error("Не удалось зашифровать данные")}},ra=e=>{try{const t=e.split(".");if(t.length!==3)throw new Error("Неверный формат зашифрованных данных");const n=t[0],a=t[1],i=t[2],o=rn(Ie.key,n),s=ta(a),c=an(s,o),l=Qr(c);if(Je(l+n).substring(0,8)!==i)throw new Error("Контрольная сумма не совпадает");return l}catch{return""}};h.Crypto=void 0,(e=>{e.setKey=t=>{Ie.key=t},e.enCode=t=>{try{const n=JSON.stringify(t);return na(n)}catch{throw new Error("Не удалось зашифровать объект")}},e.deCode=t=>{try{if(!t||t.length<10)return!1;const n=ra(t);return n&&JSON.parse(n)||!1}catch{return!1}},e.setSecurityParams=(t,n)=>{Ie.iterations=t,Ie.saltLength=n}})(h.Crypto||(h.Crypto={}));const O={},A={},he={module:"",page:"Auth",main:"Main"};h.Router=void 0,(e=>{async function t(){let y=sessionStorage.getItem("f");if(y){if(y=await h.Crypto.deCode(y),!y)return!1;A.id=y.id,A.tab=y.tab,A.page=y.page,A.module=y.module,A.time=y.time,A.payment={active:!0},A.module_admin=y.module_admin}else A.id=0,A.tab="",A.page=he.main,A.module=he.module;return!0}e.Load=t;function n(){A.id=0,A.tab="",A.page=he.page,A.module=he.module}e.Reset=n;function a({module:y=he.module,page:C=he.page,main:$=he.main}){he.page=C,he.module=y,he.main=$}e.Default=a;function i(){const[y,C]=m.useState(s()),$=E=>{C(E)};return O.page=$,[y]}e.usePage=i;async function o(y,C=!0){A.page=y,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),C&&O.page(y)}e.setPage=o;function s(){return A.page}e.getPage=s;function c(y){return A.page===y}e.isPage=c;function l(y,C){if(typeof y!="function"){const[$,E]=m.useState(!C),[L,I]=m.useState(y||d());return O.module=I,C&&m.useEffect(()=>{E(!0)},[]),[L,$]}else O.module=y}e.useModule=l;async function _(y,C=!0){A.module=y,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),C&&O.module(y)}e.setModule=_;function d(){return A.module}e.getModule=d;function p(y){return A.module===y}e.isModule=p;function f(y,C){if(typeof y!="function"){const[$,E]=m.useState(y||b()),[L,I]=m.useState(!C);return C&&m.useEffect(()=>{I(!0)},[]),O.tabs=E,[$,L]}else O.tabs=y}e.useTabs=f;async function g(y,C=!0){if(A.tab=y,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),!!C)if(O.tabs)O.tabs(y);else throw new Error("useTabs not found")}e.setTabs=g;function b(){return A.tab}e.getTabs=b;function x(y){return A.tab===y}e.isTabs=x;function v(y){if(typeof y!="function"){const[C,$]=m.useState(y||D()),E=L=>{$(L)};return O.id=E,[C]}else O.id=y}e.useId=v;function k(y){O.id=y}e.subId=k;async function w(y,C=!0){A.id=y,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),C&&O.id(y)}e.setId=w;function D(){return A.id}e.getId=D;function z(y){return Number(A.id)===y}e.isId=z;async function T(y,C,$){A.module=y,A.id=$,A.tab=C,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),O.module(y),O.tabs(C)}e.Path=T;async function N(y,C,$,E){var L,I,j;if(A.page===y)if(A.module===C){if(A.tab=$||"",A.id=E||0,A.tab==="")return;(L=O.tabs)==null||L.call(O,$)}else A.module=C,A.tab=$||"",A.id=E||0,(I=O.module)==null||I.call(O,C);else A.module=C,A.tab=$||"",A.id=E||0,A.page=y,(j=O.page)==null||j.call(O,y);sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A)}e.Push=N})(h.Router||(h.Router={}));function aa(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 a in n)t=t.replace(a,n[a]);return t}function ia(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 oa=e=>{function t(D,z){var T,y,N;D=D??"",z=z??1;for(var T=[],N=0,y=D.length;N<y;)T.push(D.slice(N,N+=z));return T}function n(D,z){var T=[2,0,1,1,1,2];return z[D>4&&D<20?2:T[Math.min(D,5)]]}var a={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},i,o,s,c,v,l,_,x,d,p,f,g;d=parseFloat(e).toFixed(2).split("."),l=d[0],c=d[1];var b=12-l.length;if(b<0)return!1;for(var x=[];b--;)x.push("0");l=x.join("")+l;var v=[];if(l>0){p=t(l,3);for(var k=-1;k<p.length;k++)if(_=p[k],_>0&&(f=t(_,1),i=parseInt(f[0]),o=parseInt(f[1]),s=parseInt(f[2]),v.push(a.a100[i-1]),g=k+1==3?"a2":"a1",o>1?v.push(a.a20[o-2]+(s>0?" "+a[g][s-1]:"")):v.push(o>0?a.a10[s]:a[g][s-1]),p.length>k+1)){var w=a["u"+(k+1)];v.push(n(_,w))}}else v.push(a.null);return v.push(n(l,a.ur)),v.push(c+" "+n(c,a.uc)),v.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function sa(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 la(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 da(e,t,n,a){let i={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 s in this.rules)for(var c in this.rules[s])for(var l=0,_=this.rules[s][c].length;l<_;l++)this.rules[s][c][l]=this.rule(this.rules[s][c][l])},rule:function(s){var c=s.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return c?{sex:c[1],test:c[2].split(","),mods:[c[3],c[4],c[5],c[6],c[7]]}:!1},word:function(s,c,l,_){if(_===this.gcaseNom)return s;if(s.match(/[-]/)){for(var d=s.split("-"),p=0,f=d.length;p<f;p++)d[p]=this.word(d[p],c,l,_);return d.join("-")}if(s.match(/^[А-ЯЁ]\.?$/i))return s;this.init();var g=this.rules[l];let b;return g.exceptions&&(b=this.pick(s,c,_,g.exceptions,!0),b)?b:(b=this.pick(s,c,_,g.suffixes,!1),b||s)},pick:function(s,c,l,_,d){let p=s.toLowerCase();for(var f=0,g=_.length;f<g;f++)if(this.ruleMatch(p,c,_[f],d))return this.applyMod(s,l,_[f]);return!1},ruleMatch:function(s,c,l,_){if(l.sex===this.sexM&&c===this.sexF||l.sex===this.sexF&&c!==this.sexF)return!1;for(var d=0,p=l.test.length;d<p;d++){var f=_?s:s.substr(Math.max(s.length-l.test[d].length,0));if(f===l.test[d])return!0}return!1},applyMod:function(s,c,l){let _;switch(c){case this.gcaseNom:_=".";break;case this.gcaseGen:_=l.mods[0];break;case this.gcaseDat:_=l.mods[1];break;case this.gcaseAcc:_=l.mods[2];break;case this.gcaseIns:_=l.mods[3];break;case this.gcasePos:_=l.mods[4];break}for(var d=0,p=_.length;d<p;d++){var f=_.substr(d,1);switch(f){case".":break;case"-":s=s.substr(0,s.length-1);break;default:s+=f}}return s},getSex:()=>{if(i.mn.length>2)switch(i.mn.substr(i.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:s=>((i.fullNameSurnameLast?"":i.lastName(s)+" ")+i.firstName(s)+" "+i.middleName(s)+(i.fullNameSurnameLast?" "+i.lastName(s):"")).replace(/^ +| +$/g,""),lastName:s=>i.word(i.ln,i.sex,"lastName",s),firstName:s=>i.word(i.fn,i.sex,"firstName",s),middleName:s=>i.word(i.mn,i.sex,"middleName",s)};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],i.fullNameSurnameLast=!0):(e=o[1],t=o[3],n=o[5])}return i.ln=e,i.fn=t||"",i.mn=n||"",i.sex=a||i.getSex(),i}function ca(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 _a(e){return e=typeof e=="number"?e:new Date(e).getMonth()+1,{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 ua(e,t){return t&&(e=Number(e)/t),parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function fa(e,t){let n=t+"";for(;n.length<e;)n="0"+n;return n}function ma(e,t){let n=2;t.forEach(a=>{if(e>=a.value)return e=e/a.value,n=a.precision,e.toFixed(n)+" "+a.label})}ma(12345,[{label:"мм",value:0},{label:"см",value:10},{label:"м",value:1e3}]);function pa(e,t,n){let a=t/e*n;return(typeof a!="number"||a===1/0)&&(a=0),parseFloat(a).toFixed(1)}function ha(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ga(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 on={},sn={},le={},ge={},Te={};let ke="",fe={};function xa(e,t){const[n,a]=m.useState(!1);return m.useEffect(()=>{let i=localStorage.getItem("d");i?(async()=>{let o=await h.Router.Load();if(o)return a(!0);t==null||t(o),t&&alert("Router.Load Error"),ne()})():(t==null||t(i),t&&alert("No SSID"),["a","b","c","d","e","m","u","s","p","q","w"].forEach(o=>localStorage.removeItem(o)),["f"].forEach(o=>sessionStorage.removeItem(o)),h.Router.Reset(),a(!0))},[]),n?e:""}function ne(){["a","b","c","d","e","m","u","s","q","p","t","w"].forEach(e=>localStorage.removeItem(e)),["f"].forEach(e=>sessionStorage.removeItem(e)),window.history.pushState({},"","/"),window.location.reload()}function ba(e){return localStorage.setItem("d",e)}function va(){let e=localStorage.getItem("d");return e!==""&&e!=="undefined"&&e!==null?e:""}function ya(e){return localStorage.setItem("a",e)}function wa(){let e=localStorage.getItem("a");return e!==""&&e!=="undefined"&&e!==null?e:""}async function ka(e){localStorage.setItem("p",await h.Crypto.enCode(e))}function Ca(){let e=localStorage.getItem("p");if(e!==""&&e!=="undefined"&&e!==null){let t=h.Crypto.deCode(e);return t||ne(),t}else return ne(),!1}function ja(e,t){on.data[e]=t,localStorage.setItem("s",h.Crypto.enCode(on.data))}function Sa(e){let t=localStorage.getItem("s");return t===null?{}:(t=h.Crypto.deCode(t),t?e!==void 0?t[e]:t:ne())}async function Ea(e){localStorage.setItem("m",await h.Crypto.enCode({data:e}))}function Ia(){let e=localStorage.getItem("m");if(e!==""&&e!=="undefined"&&e!==null){let t=localStorage.getItem("m");if(t===null)return!1;let n=h.Crypto.deCode(t);n||ne();const a=(o,s)=>{let c=s+"";for(;c.length<o;)c="0"+c;return c};return n.data.split(",").map(o=>"M"+a(2,o))}else return ne(),!1}function Da(e){}function ln(e){let t=localStorage.getItem("b");t=t===null?{}:h.Crypto.deCode(t),t[h.Router.getTabs()]=e,localStorage.setItem("b",h.Crypto.enCode(t))}function dt(){let e=localStorage.getItem("b");return e===null?{}:(e=h.Crypto.deCode(e),e=e[h.Router.getTabs()],e=e===void 0?{active:1,sort:"<"}:e,e)}function Na(e){localStorage.setItem("c",h.Crypto.enCode(e))}function dn(e,t){var a;let n=localStorage.getItem("c");if(n!==""&&n!=="undefined"&&n!==null){let i=h.Crypto.deCode(n);return i||ne(),e===void 0?i:t?(a=i[e][t])==null?void 0:a.n:i[e]}else return ne(),!1}function Ta(e){ge.data=e,localStorage.setItem("q",h.Crypto.enCode(ge.data))}function za(e,t){ge.data={...ge.data,[e]:t},localStorage.setItem("q",h.Crypto.enCode(ge.data))}function qe(e,t){if(!ge.data){let n=localStorage.getItem("q");n&&(ge.data=h.Crypto.deCode(n))}return e===void 0&&t===void 0?ge.data:e!==void 0&&t===void 0?ge.data[e]:ge.data[e][t]}function Ba(e){sn.data=e}function La(e){return sn.data[e]}function Ma(e){}function $a(){}async function Pa(){if(Te.data)return Te.data;let e=localStorage.getItem("u");if(e!==""&&e!=="undefined"&&e!==null){let t=await h.Crypto.deCode(e);return t||ne(),Te.data=t,t}else return ne(),!1}function Aa(){let e=localStorage.getItem("u");return e!==""&&e!=="undefined"&&e!==null?h.Crypto.deCode(e):!1}function Fa(e){Te.data=e,localStorage.setItem("u",h.Crypto.enCode(e))}function Oa(e){return e?Te.data[e]:Te.data||{}}function qa(){let e=localStorage.getItem("e");if(e!==""&&e!=="undefined"&&e!==null)try{let t=h.Crypto.deCode(e);return t||ne(),t}catch{return{}}else return{}}function Ra(e){const t=async n=>{let a=localStorage.getItem(n);if(a!==""&&a!=="undefined"&&a!==null)try{let i=await h.Crypto.deCode(a);if(!i)return;fe[n]={is:!0,time:i.time,data:i.data}}catch{fe[n]={is:!1,time:0,data:{}}}else fe[n]={is:!1,time:0,data:{}}};e.forEach(n=>t(n))}function Za(e){return fe[e]===void 0?(fe[e]={data:{},time:0},{data:{},time:0}):fe[e]}function Ua(e,t){fe[e]={data:t.data,time:t.time},localStorage.setItem(e,h.Crypto.enCode(fe[e]))}function Wa(e,t){le[e]=t,localStorage.setItem("t",h.Crypto.enCode(le))}function Ga(e){if(Object.keys(le).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let n=h.Crypto.deCode(t);return n||ne(),Object.keys(n).forEach(a=>{le[a]=n[a]}),e?le[e]:le}else return ne(),{}}else return e?le[e]:le}function Ka(e){if(Object.keys(le).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let n=h.Crypto.deCode(t);return n?(Object.keys(n).forEach(a=>{le[a]=n[a]}),!!le[e]):!1}else return!1}else return!!le[e]}async function Ya(e,t,n){fe[e].time=n,fe[e].data[t.item][t.name]=t.value,localStorage.setItem(e,await h.Crypto.enCode(fe[e]))}function Ha(){var n;let t=(n=new URLSearchParams(window.location.search.substring(1)).get("devmod"))==null?void 0:n.trim();if(t)try{return JSON.parse(t||"{}")}catch{return h.Notice.Error("Error parse devMod"),{}}}function cn(){return ke===""?(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!=-1?(ke="Opera","Opera"):navigator.userAgent.indexOf("Edg")!=-1?(ke="Edg","Edg"):navigator.userAgent.indexOf("Chrome")!=-1?(ke="Chrome","Chrome"):navigator.userAgent.indexOf("Safari")!=-1?(ke="Safari","Safari"):navigator.userAgent.indexOf("Firefox")!=-1?(ke="Firefox","Firefox"):(ke="unknown","unknown"):ke}function Ja(e){return cn()===e}function Xa(e,t,n){return qe(e,t)?qe(e,t).n:n||""}function Va(e,t,n,a){return qe(e,t)?qe(e,t)[n]:a||""}function Qa(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)})}function ei(e,t){return t&&(e=e===0?7:e),{1:{name:"Понедельник",names:"Понедельника",abc:"пн"},2:{name:"Вторник",names:"Вторника",abc:"вт"},3:{name:"Среда",names:"Среды",abc:"ср"},4:{name:"Четверг",names:"Четверга",abc:"чт"},5:{name:"Пятница",names:"Пятницы",abc:"пт"},6:{name:"Суббота",names:"Субботы",abc:"сб"},7:{name:"Воскресенье",names:"Воскресенья",abc:"вс"}}[e]}function ti(e,t){return e.reduce(function(n,a){let i=t instanceof Function?t(a):a[t];return n[i]!==void 0||(n[i]={}),n[i][a.id]=a,n},{})}function ni(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}function ri(e){return["number","string"].includes(typeof e)?!isNaN(Number(e))&&!isNaN(parseFloat(e)):!1}function ai(e){var t="",n={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ь:"",ы:"y",ъ:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"E",Ж:"Zh",З:"Z",И:"I",Й:"Y",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sch",Ь:"",Ы:"Y",Ъ:"",Э:"E",Ю:"Yu",Я:"Ya"};for(let a=0;a<e.length;++a)n[e[a]]==null?t+=e[a]:t+=n[e[a]];return t}function ii(e,t,n=!1){return n?e.sort((a,i)=>i[t]-a[t]):e.sort((a,i)=>a[t]-i[t])}function oi(e,t){return e.reduce(function(n,a){let i=t instanceof Function?t(a):a[t];return n[i]!==void 0||(n[i]={}),n[i][a.id]=a,n},{})}function si(e,t,n=!1){return n?e.sort((a,i)=>new Date(i[t]).getTime()-new Date(a[t]).getTime()):e.sort((a,i)=>new Date(a[t]).getTime()-new Date(i[t]).getTime())}function li(e,t){return e.reduce((n,a)=>n+(a[t]||0),0)}function di(e,t,n,a=!1){return a?e.sort((i,o)=>n(o[t])-n(i[t])):e.sort((i,o)=>n(i[t])-n(o[t]))}function ci(e){return{style:{background:`var(--color-${e})`}}}const G={Age:ni,ArraySort:ii,ArrayGroup:oi,ArraySortDate:si,ArraySortFunction:di,ArraySumma:li,Translit:ai,Date:aa,ColorBackground:ci,MoneyString:oa,DateSort:ia,UUID:Qa,Size:sa,TypeFiles:la,Cases:da,Initials:ca,Month:_a,Money:ua,Number:fa,Percent:pa,CapitalizeFirstLetter:ha,DeclensionWord:ga,Select:Xa,SelectParams:Va,ObjectByArray:ti,isNumeric:ri,Week:ei,set:(e,t)=>{G[e]=t}},_i={Counter:({before:e,from:t=0,to:n,secund:a=3})=>{const i=m.useRef();return m.useEffect(()=>{i.s=!0;const o=1e3,s=n/(a*10);i.n=0;let c=o/(n/s),l=e?e+" ":"";return i.i=setInterval(()=>{if(!i.s)return i.current.textContent=`${l}`+G.Money(n),clearInterval(i.i);if(n===0)return i.current.textContent=`${l}`+G.Money(n),clearInterval(i.i);i.n=i.n+s,i.n>n&&i.n>=n&&(i.n=n,clearInterval(i.i)),i.current&&(i.current.textContent=`${l}`+G.Money(i.n))},c),()=>{i.s=!1,clearInterval(i.i)}},[t,n]),r.jsx("span",{ref:i})}},ye={setSSID:ba,getSSID:va,getPORT:Ca,setPORT:ka,setAUTH:ya,getAUTH:wa,Logaut:ne,setMenu:Ea,getMenu:Ia,useSort:Da,setSort:ln,getSort:dt,setCompany:Na,getCompany:dn,setSelect:Ta,addSelect:za,getSelect:qe,setApi:Ba,getApi:La,setPayment:Ma,getPayment:$a,setUser:Fa,isUser:Aa,initUser:Pa,getUser:Oa,getBase:Za,setBase:Ua,isData:Ka,setData:Wa,getData:Ga,editBase:Ya,loadBase:Ra,devMod:Ha,isBrowser:Ja,getBrowser:cn},re={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"},_n=({title:e,left:t,right:n,children:a})=>r.jsxs("div",{className:re.h,children:[r.jsx("div",{className:re.t,children:e}),t&&r.jsx("div",{className:re.hl,children:t}),n&&r.jsx("div",{className:re.hr,children:n}),a]}),un=({children:e,...t})=>r.jsx("div",{className:re.l,children:e}),fn=({children:e})=>r.jsx("div",{className:re.s,children:e}),mn=({children:e,edit:t})=>{const n={};return t&&(n.edit=""),r.jsx("div",{...n,className:re.f,children:e})};function pn({children:e}){return r.jsx("div",{className:re.g,children:e})}const ui=({children:e,className:t,title:n})=>r.jsxs("div",{className:[re.o,t].join(" "),children:[n&&r.jsx("div",{className:re.hh,children:n}),e]}),fi=({children:e})=>r.jsx("div",{className:re.u,children:e}),mi=({children:e})=>r.jsx("div",{className:re.c,children:e}),pi=({children:e})=>r.jsx("div",{className:re.m,children:e}),hi=h.Alert,ct={Header:_n,Section:fn,Group:pn,Form:mn,List:un,A:hi,U:fi,G:pn,C:mi,L:un,O:ui,S:fn,H:_n,M:pi,F:mn},gi=(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}},xi=()=>({load:!0,list:[],name:"Файлы",add:!1,search:!1,revers:!0}),bi=()=>{let[e,t]=m.useState([]);return r.jsx(r.Fragment,{children:e.length!==0?r.jsxs("div",{className:"upload view",children:[r.jsxs("div",{className:"--head",children:[r.jsx("b",{children:"Загрузки"}),r.jsx("i",{className:"x",onClick:()=>t([]),"data-icon":"F038"})]}),r.jsx("div",{className:"--list",children:e.map(n=>n)})]}):""})},vi=({id:e,name:t,listen:n,dir:a})=>{t=t||"Файлы";const[i,o]=m.useReducer(gi,{},xi),s=()=>{h.Modal.Add(r.jsx(yi,{dir:a,dispatch:o,id:e},new Date().getTime()))};return m.useEffect(()=>{},[e,a]),r.jsxs(ct.O,{children:[" ",r.jsx(ct.H,{title:t,right:r.jsx("i",{className:"f025","data-icon":"C005 25 pointer","data-color":"_b5b9cc :506290",onClick:s}),left:r.jsx("i",{className:"f025","data-icon":"E009 25","data-color":"_2196f3"})}),r.jsx("ul",{"data-empty":"Файлов нет",className:"files_list",children:i.load?r.jsxs("div",{"type-load":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]}):i.list.length===0?r.jsx(r.Fragment,{}):i.list.map((c,l)=>r.jsx(wi,{dispatch:o,data:c},l))})]})},yi=({id:e,dir:t,dispatch:n})=>{let[a,i]=m.useState(!0),o=m.useRef(null),s=_=>{_.preventDefault(),_.stopPropagation()},c=_=>{},l=_=>{};return m.useEffect(()=>{let _=o.current;["dragenter","dragover","dragleave","drop"].forEach(d=>{_.addEventListener(d,s,!1),document.body.addEventListener(d,s,!1)}),["dragenter","dragover"].forEach(d=>{_.addEventListener(d,c,!1)}),["dragleave","drop"].forEach(d=>{_.addEventListener(d,l,!1)})},[]),r.jsx(r.Fragment,{children:a?r.jsx(r.Fragment,{children:r.jsx("div",{className:"modal o ",onClick:h.Modal.Shake,children:r.jsxs("div",{className:"b",children:[r.jsx("div",{className:"h",children:"Загрузка файлов"}),r.jsx("div",{className:"x","data-icon":"F038",onClick:()=>{i(!1)}}),r.jsxs("div",{className:"upload",ref:o,children:[r.jsx("input",{type:"file",id:"fileElem",name:"files",multiple:!0}),r.jsx("dd",{}),r.jsx("i",{"data-icon":"F061"})]})]})},new Date().getTime())}):""})},wi=({data:e,dispatch:t})=>{let n=async()=>{let o=await(await fetch(h.Api.url().files+"/yandex/data/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ye.getSSID()||""}})).blob();if(o.size!==2){let s=new Blob([o],{type:o.type});s=URL.createObjectURL(s);let c=document.createElement("a");c.setAttribute("href",s),c.setAttribute("download",e.name),c.click()}},a=async()=>{(await(await fetch(h.Api.url().files+"/yandex/delete/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ye.getSSID()||""}})).json()).status==="success"&&(t({type:"delete",id:e.id}),h.Notice.Send({type:"success",text:"Файл успешно удалён"}))};return r.jsxs("li",{children:[r.jsx("div",{className:"f035",children:G.TypeFiles(e.type)}),r.jsx("div",{className:"f100",children:G.Date(e.uDate,"dd.mm.yy")}),r.jsx("div",{className:"f000",children:e.name}),r.jsxs("div",{className:"f050 flex button",children:[r.jsx("i",{className:"f025","data-icon":"F060 35 pointer","data-color":"_b5b9cc :4CAF50",onClick:n}),r.jsx("i",{className:"f025","data-icon":"F048 35 pointer","data-color":"_b5b9cc :FF9800",onClick:a})]}),r.jsx("div",{className:"f080",children:G.Size(e.size)})]})};let ae={};ae.list=qa(),ae.active=null;const ki=()=>{var i;let[e,t]=m.useState([]),[n,a]=m.useState();return m.useEffect(()=>{(async()=>{let o=Object.keys(ae.list);if(o.length!==0){let s=[];o.forEach((c,l)=>{s.push({item:r.jsx(_t,{data:ae.list[c]},ae.list[c].id),link:ae.list[c].link})}),t(s)}})()},[]),ae.active=o=>{var s;a(o),(s=document.querySelector("app-body"))==null||s.setAttribute("bookmarks",o===1?"bottom":"")},ae.set=o=>{t([...e,{item:r.jsx(_t,{data:o},o.id),link:o.link}])},ae.del=o=>{e.forEach((s,c)=>{s.link===o&&e.splice(c,1)}),t([...e])},(i=document.querySelector("app-body"))==null||i.setAttribute("bookmarks",n===1&&e.length!==0?"bottom":""),n!==0?r.jsx(r.Fragment,{children:e.length!==0?r.jsx("div",{className:"bookmarks",children:e.map(o=>o.item)}):""}):""},Ci=({id:e,type:t,name:n})=>{let a=t+"-"+e,[i,o]=m.useState(ae.list[a]!==void 0);return m.useEffect(()=>{o(ae.list[a]!==void 0)},[a]),r.jsx(r.Fragment,{children:""})},_t=({data:e})=>{let t=a=>{a.preventDefault(),delete ae.list[e.link],ae.del(e.link)},n=()=>{h.Router.setId(e.id)};return r.jsx("span",{onContextMenu:t,onClick:n,children:e.name})},ji=e=>{ae.active(e)},H={},ut={},P={};P.config={iceServers:[{url:"stun:stun.l.google.com:19302"}]},P.constraints={optional:[{DtlsSrtpKeyAgreement:!0}]},P.other=[],P.users={},P.asset=0,P.remoute=!1,P.stream=null,P.user=0,P.connect=!1,P.offer=null,P.btnRefuse=null,P.time=!1;let De;De=document.createElement("audio"),De.setAttribute("autoplay","true"),De.setAttribute("muted","true"),H.start=async e=>{P.rtc=new RTCPeerConnection(P.config),P.other=[],P.remoute=!1,P.rtc.onicecandidate=n=>{n.candidate&&P.other.push(n.candidate)},P.rtc.ontrack=n=>{if(n.streams&&n.streams[0])De.srcObject=n.streams[0];else{let a=new MediaStream(n.track);De.srcObject=a}};const t=await navigator.mediaDevices.getUserMedia({video:!1,audio:{echoCancellation:!1,autoGainControl:!0}});t.getTracks().forEach(n=>{P.rtc.addTrack(n,t)}),P.rtc.onconnectionstatechange=()=>{P.rtc.connectionState},P.rtc.ontrack=async n=>{if(n.streams&&n.streams[0])De.srcObject=n.streams[0];else{let a=new MediaStream(n.track);De.srcObject=a}},P.rtc.onaddstream=n=>{},P.rtc.onnegotiationneeded=n=>{},P.rtc.oniceconnectionstatechange=n=>{},P.rtc.onsignalingstatechange=n=>{},P.rtc.onicegatheringstatechange=n=>{},P.rtc.onicecandidateerror=n=>{},P.rtc.ondatachannel=n=>{},P.rtc.onerror=n=>{},e()},H.useListener=e=>{ut.rtc=e},H.setListener=e=>{ut.rtc&&ut.rtc(e)},H.callTo=async e=>{H.start(async()=>{const t=await P.rtc.createOffer();await P.rtc.setLocalDescription(t),P.uid=e})},H.callIn=async e=>{P.asset=e.id,P.offer=e.offer,P.uid=e.id},H.callRise=async()=>{H.start(async()=>{P.rtc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(P.offer))));const e=await P.rtc.createAnswer();await P.rtc.setLocalDescription(e)})},H.callOk=async e=>{P.asset=e.id;const t=new RTCSessionDescription(JSON.parse(atob(e.answer)));await P.rtc.setRemoteDescription(t)},H.IceCandidate=async e=>{e.candidate.forEach(t=>{P.rtc.addIceCandidate(new RTCIceCandidate(t))})},H.callFrom=async()=>{},H.callNo=()=>{P.asset=0,P.time=!1,P.rtc&&P.rtc.close(),H.setListener({type:"state",data:"closed"})},H.callOf=()=>{P.asset=0,P.time=!1,P.rtc.close()},H.callRefuser=async()=>{P.asset=0,P.time=!1,P.rtc&&P.rtc.close()},H.Run=async e=>{H[e.data.type]&&H[e.data.type](e.data)};let Re={};function Si(){let[e,t]=m.useState([]),n=m.useRef(null);return m.useEffect(()=>{},[]),Re.set=a=>{t([...e,a])},Re.del=()=>{t([])},Re.audio=(a,i)=>{n.current.volume=.5,n.current.loop=i,n.current.src="/audio/"+a,n.current.muted=!1},r.jsxs(r.Fragment,{children:[e.map(a=>a.item),r.jsx("audio",{id:"audio",ref:n,autoPlay:!0,muted:!0})]})}function Ei(e,t){let n=new Date().getTime();Re.set({item:r.jsx(Ii,{type:t,id:e},n),key:n})}function Ii({id:e,type:t}){const[n,a]=m.useState({}),[i,o]=m.useState(t);m.useEffect(()=>{a(ye.getSelect("user")[e])},[]),H.useListener(l=>{switch(l.type){case"state":o(l.data)}});const s=()=>{switch(i){case"out":return r.jsx("span",{onClick:()=>{H.callTo(n.id),o("call")},children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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 r.jsxs(r.Fragment,{children:[r.jsx("span",{onClick:c,children:r.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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"})})}),r.jsx("span",{onClick:H.callRise,children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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 r.jsx("span",{onClick:()=>H.callNo(n.id),children:r.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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 r.jsx("span",{onClick:()=>{H.callTo(n.id),o("call")},children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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"})})})}},c=()=>{H.callRefuser(n.id),Re.del()};return r.jsx("div",{className:"web-phone white",children:r.jsxs("div",{className:"w",children:[r.jsx("div",{className:"x","data-icon":"F038",onClick:c}),r.jsx("div",{className:"a"}),r.jsx("div",{className:"n",children:n.name}),r.jsx("div",{className:"b",children:s()})]})})}const ft={};function Di(e){ft.add(e)}function Ni({color:e,size:t,name:n}){return r.jsx("svg",{width:t,height:t,color:e,children:r.jsx("use",{href:`#${n}`})})}function Ti(){let[e,t]=m.useState([]);if(ft.x=()=>{t([])},ft.add=a=>{t(a)},e.length===0)return"";const n={sprite:""};return r.jsx("svg",{...n,xmlns:"http://www.w3.org/2000/svg",children:e.map((a,i)=>r.jsx("symbol",{id:a.name,viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:r.jsx(a.path,{})},i))})}let Xe={},mt={},pt="ru";const zi=(e,t)=>{mt=e,t?pt=t:pt=Object.keys(e)[0]},hn=m.createContext(localStorage.getItem("lang")||navigator.language),Bi=({children:e})=>{const[t,n]=m.useState(localStorage.getItem("lang")||navigator.language);return Xe.update=n,r.jsx(hn.Provider,{value:mt[t]||mt[pt],children:e})},Li=e=>{var t;localStorage.setItem("lang",e),(t=Xe.update)==null||t.call(Xe,e)},Mi=()=>m.useContext(hn),$i=()=>localStorage.getItem("lang")||navigator.language;m.createContext({tab:"",setTabs:e=>{}});const ht={};function gt(e,t){ht[e]=t}function Pi(e,t){ht[e]!==void 0&&ht[e](t)}const Ce={};function Ai(e,t){const[n,a]=m.useState(t);return m.useEffect(()=>{if(Ce[e])return Ce[e].push(a);Ce[e]=[a]},[]),[n]}function Fi(e,t){if(Ce[e])return Ce[e].push(t);Ce[e]=[t]}function Oi(e,t){Ce[e]&&Ce[e].forEach(n=>n(t))}const de={setListener:Pi,useListener:gt,setEmitter:Oi,useEmitter:Ai,subEmitter:Fi};function qi(){let[e,t]=m.useState([]);return de.useListener("form",n=>{t([n])}),r.jsx(r.Fragment,{children:e.map(n=>n)})}const gn=({children:e,lang:t,log:n})=>xa(r.jsxs(Bi,{children:[r.jsx(h.Modal.Init,{}),r.jsx(h.Notice.Init,{}),r.jsx(h.Alert.Init,{}),r.jsx(h.Tooltip.Init,{}),r.jsx(bi,{}),r.jsx(Ti,{}),r.jsx(qi,{}),r.jsx(Si,{}),r.jsx(ki,{}),e]}),n),Ri=({children:e,...t})=>r.jsx("menu",{children:e}),Zi=({children:e,...t})=>r.jsxs("header",{children:["xz",e]}),Ui={payment:"_payment_1lxfv_1"};function Wi(){let[e,t]=m.useState({});return!e.active&&!e.payment?"":r.jsx("div",{className:Ui.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const Gi=({children:e,...t})=>r.jsxs("div",{className:"app",children:[r.jsx(Wi,{}),r.jsx(Ri,{}),r.jsx(Zi,{}),r.jsx(gn,{}),e]}),Ve={btn:"_btn_294gf_1",confirm:"_confirm_294gf_15",cancel:"_cancel_294gf_20",action:"_action_294gf_25",disabled:"_disabled_294gf_30",await:"_await_294gf_37",m:"_m_294gf_44",l:"_l_294gf_48"},xn=({onClick:e,onSend:t,size:n="m",view:a="confirm",mode:i="primary",children:o,isDisabled:s=!1,className:c,after:l,before:_,label:d,onRef:p,awaitText:f="Ожидайте"})=>{let[g,b]=m.useState(!1);const x=k=>{if(e)return e();g||(t?(b(!0),t(b)):k.preventDefault())};let v={};return(s||g)&&(v.disabled=!0),r.jsx("button",{...v,ref:p,className:[Ve.btn,g?Ve.disabled:Ve[a],n&&Ve[n],c].join(" "),onClick:x,children:g?f:r.jsxs(r.Fragment,{children:[_||""," ",d," ",l||""]})||o})},Ki=({list:e,onClick:t,active:n,size:a,view:i})=>r.jsx("nav",{children:r.jsx("ul",{className:[a,i].join(" "),children:e.map(o=>r.jsx(Yi,{onClick:t,active:n,label:o.label,link:o.link},o.link))})}),Yi=({onClick:e,label:t,link:n,active:a})=>r.jsx("li",{"tabs-active":String(a===n),onClick:()=>e(n),children:t}),bn={tabs:"_tabs_1i88v_1",tab:"_tab_1i88v_1"},vn=({list:e=[],active:t,onTab:n})=>{const a=i=>{if(n)return n(i);h.Router.setTabs(i)};return r.jsx("nav",{className:[bn.tabs,"tabs"].join(" "),children:e.map(i=>m.createElement("div",{onClick:()=>a(i.id),active:(t===i.id).toString(),className:bn.tab,key:i.id},i.label,i.badge?r.jsx("em",{children:i.badge}):""))})},Hi=({list:e=[],active:t,onChange:n,className:a,after:i})=>{const[o,s]=m.useState(t);return r.jsxs("div",{className:["tabs-button",a].join(" "),children:[r.jsx("ul",{children:e.map(c=>r.jsx(Ji,{data:c,light:c.light,setTabs:s,active:c.id===o,onChange:n},c.id))}),i]})},Ji=({data:e,light:t,active:n,setTabs:a,onChange:i})=>{const o=()=>{e.disabled||(i&&i(e.id),a(e.id))};return r.jsxs("li",{onClick:o,className:e.disabled?"disabled":n?"active":"",children:[r.jsxs("p",{children:[e.before,e.name]}),t&&r.jsx("em",{})]})},Xi={List:Ki,Lite:vn,Button:Hi},Vi=({title:e="",button:t,description:n="",children:a})=>r.jsxs("fieldset",{children:[e&&r.jsxs("legend",{children:[e,t&&r.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),r.jsx("ul",{children:a}),n&&r.jsx("article",{children:n})]}),Qi={setting:"_setting_dva4m_2"},eo=({children:e})=>r.jsx("div",{className:Qi.setting,children:e}),to=({label:e,children:t})=>{let[n,a]=m.useState(!1);return r.jsxs("li",{"data-item":"accordion",children:[r.jsxs("dl",{onClick:()=>a(!n),children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:r.jsx("div",{"data-close":String(n)})})]}),n&&r.jsx("div",{children:t})]})},no=({label:e,onClick:t,button:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"button",onClick:()=>t(),children:n})]})}),yn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,r.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},ro={Accordion:to,Button:no,Switch:({label:e,onClick:t,active:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:r.jsx(yn.Switch,{onClick:t,active:n})})]})}),Info:({label:e,info:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:t})]})})};function wn({list:e,onClick:t,active:n,size:a,view:i}){return r.jsx("nav",{children:r.jsx("ul",{className:[a,i].join(" "),children:e.map(o=>r.jsx(ao,{onClick:t,active:n,label:o.label,link:o.link},o.link))})})}const ao=({onClick:e,label:t,link:n,active:a})=>r.jsx("li",{"tabs-active":String(a===n),onClick:()=>e(n),children:t});wn.defaultProps={size:"M",view:"H"};const io={Section:Vi,Main:eo,Item:ro,Tabs:wn};function oo({value:e,background:t,gradient:n}){let a=835.24,i=a-e/100*a;const o=m.useId();return r.jsxs("svg",{viewBox:"0 0 275 275",xmlns:"http://www.w3.org/2000/svg",style:{borderRadius:"50%",background:t},children:[n&&r.jsx("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:n.map((s,c)=>r.jsx("stop",{offset:s[0],stopColor:s[1]},c))}),r.jsx("circle",{strokeWidth:"10",fill:"transparent",r:"133",cx:"137.5",cy:"137.5",stroke:`url(#${o})`,strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:i,transform:"rotate(-90 137.5 137.5)"})]})}const so={Circle:oo},lo={Icon:Ci,Item:_t,Active:ji};function co(){return r.jsx("svg",{viewBox:"0 0 462.86 359.96",children:r.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 _o={i:"_i_it11s_1"};let kn="/assets/";function uo(e){kn=e}function fo({name:e,size:t="16px",onClick:n,hover:a,origin:i=!1,className:o}){const s={[i?"backgroundImage":"WebkitMaskImage"]:`url(${kn}${e}.svg)`,"--size":t},c={};return o&&(c.className=o),n&&(c.onClick=n,c.pointer=""),a&&(c.hover=a),r.jsx("i",{role:"icon",style:s,className:[_o.i,`icon-${e}`].join(" "),...c})}let xt={};function mo(e){xt={...xt,...e}}function Cn(){return xt}function po({name:e,hover:t,onClick:n,className:a}){const i={};return n&&(i.onClick=n,i.pointer=""),t&&(i.hover=t),a&&(i.className=a),Cn()[e]?r.jsx("i",{role:"icon",...i,children:Cn()[e]()}):""}const ho={Logo:co,Sprite:Di,set:mo,Symbol:Ni,Default:po,Assets:fo};let jn={};jn.setAttribute=(e,t)=>{const n=document.getElementById("root");n.dataset[e]=t};function go({items:e,list:t,icons:n,isSetting:a=!0}){const i=()=>{h.Alert.Send({title:"Выйти",text:"Вы уверене что хотиет выйти"},()=>{ye.Logaut()})};return r.jsxs("menu",{children:[r.jsx("ul",{children:t.map(o=>r.jsx(xo,{items:e,i:o,icons:n},o))}),r.jsx("em",{}),r.jsxs("ul",{children:[r.jsx(bo,{icons:n}),a&&r.jsxs("li",{className:h.Router.isModule("Settings")?"active":"",onClick:()=>h.Router.setModule("Settings"),children:[r.jsx(n.Icons,{name:"s040"}),r.jsx("span",{children:"Настройки"})]}),r.jsxs("li",{onClick:i,children:[r.jsx(n.Icons,{name:"s044"}),r.jsx("span",{children:"Выход"})]})]})]})}const xo=({items:e,i:t,icons:n})=>t[0]==="#"?r.jsx("b",{children:t.slice(1)}):r.jsxs("li",{className:h.Router.isModule(e[t].link)?"active":"",onClick:()=>{h.Router.setTabs(e[t].temp,!1),h.Router.setModule(e[t].link)},children:[r.jsx(n.Icons,{name:e[t].icon}),r.jsx("span",{children:e[t].name})]}),bo=({icons:e})=>{const[t,n]=m.useState(!1),a=m.useRef(null),i=async()=>{a.current&&(await a.current.prompt(),n(!1))};return m.useEffect(()=>{window.addEventListener("appinstalled",o=>{}),window.addEventListener("beforeinstallprompt",async o=>{o.preventDefault(),a.current=o,n(!0)})},[]),t?r.jsxs("li",{onClick:i,children:[r.jsx(e.Icons,{name:"install"}),r.jsx("span",{children:"Установить как приложение"})]}):""};function Sn({path:e,query:t,button:n,emptyList:a="Список пуст",searchParams:i=["p01","p02","p03"],...o}){const[s,c]=m.useState([]),[l,_]=m.useState([]),[d,p]=m.useState(!1),f=async()=>{let g=await h.Api.fetch(e,t);g.data&&g.data.length>0&&(c(g.data),_(g.data)),p(!0)};return de.useListener("list_children",g=>{if(g.action==="edit"){let b=l.map(x=>x.id===g.id?Object.assign(x,{[g.name]:g.value}):x);c(b),_(b)}if(g.action==="delete"){let b=l.filter(x=>x.id!==g.id);c(b),_(b)}}),de.useListener("search",g=>{c(l.filter(b=>(""+i.map(v=>b[v]).toString()).toLowerCase().includes(g.toLowerCase())))}),m.useEffect(()=>{f(),n&&de.setListener("button",n)},[]),d&&s.length===0?r.jsx("ul",{className:"list-body",children:a}):r.jsx("ul",{className:"list-body",children:s.map((g,b)=>r.jsx(o.item,{data:g,count:b+1},g.id))})}const vo={Menu:go,List:Sn},yo={sort:"_sort_1yrvt_1"};let Qe={};function wo(e,t){switch(t.type){case"active":let n="<";return e.active===t.data&&(n=e.sort==="<"?">":"<"),Qe.get({active:t.data,sort:n},!1),ln({active:t.data,sort:n}),{...e,active:t.data,sort:n};default:throw new Error}}function ko(){const[e,t]=m.useReducer(wo,dt()===void 0?{active:1,sort:"<"}:dt());return r.jsxs("div",{className:yo.sort,children:[r.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})}),r.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})}),r.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 Co(e){Qe.get=e}function jo(e){Qe.set(e)}function So(e,t,n){let a=1,i=0,o={},s=50;o[a]=[];let c={},l="s1a";switch(c.s1a=(_,d)=>d.s1-_.s1,c.s1d=(_,d)=>_.s1-d.s1,c.s2a=(_,d)=>_.s2-d.s2,c.s2d=(_,d)=>d.s2-_.s2,c.s3a=(_,d)=>_.s3.localeCompare(d.s3),c.s3d=(_,d)=>d.s3.localeCompare(_.s3),n.active){case 1:l=n.sort===">"?"s1d":"s1a";break;case 2:l=n.sort===">"?"s2d":"s2a";break;case 3:l=n.sort===">"?"s3d":"s3a";break}return t.sort(c[l]).forEach(_=>{i++,i<=s||(a++,i=1,o[a]=[]),o[a].push(e[_.id])}),{data:o}}function Eo(e){Qe.count(e)}const Io={Init:ko,useValue:Co,Set:jo,Run:So,Count:Eo},et={},En={};function Do(e){const[t,n]=m.useState({}),a=async i=>{n(Object.keys(et).reduce((o,s)=>(o?o[s]=et[s].all:o={},o),{}))};return m.useEffect(()=>{e.forEach(i=>et[i]={all:0}),En.menu=a,a()},[e]),t}function No(e,t){switch(typeof t){case"number":et[e].all+=t,En.menu();break}}const To={useMenu:Do,setUpdate:No};class zo{constructor(t="el",n="db"){Zt(this,"storeName");Zt(this,"_dbp");this.storeName=n,this._dbp=new Promise((a,i)=>{try{const o=indexedDB.open(t,1);o.onerror=s=>{i(o.error)},o.onsuccess=()=>{a(o.result)},o.onupgradeneeded=()=>{try{o.result.createObjectStore(n)}catch(s){i(s)}}}catch(o){i(o)}})}async _withIDBStore(t,n){try{const a=await this._dbp;return new Promise((i,o)=>{try{const s=a.transaction(this.storeName,t);s.oncomplete=()=>i(),s.onabort=s.onerror=()=>o(s.error),n(s.objectStore(this.storeName))}catch(s){o(s)}})}catch(a){throw a}}}let bt,Y={};const ze=()=>(bt||(bt=new zo),bt),vt=(e,t="",n=new Set)=>{if(e==null)return null;if(e instanceof Promise)return t;if(typeof e!="object"||n.has(e))return null;n.add(e);try{for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&!a.startsWith("__"))try{const i=e[a];if(i instanceof Promise)return t?`${t}.${a}`:a;if(i&&typeof i=="object"&&typeof i.then=="function")return t?`${t}.${a}`:a;const o=t?`${t}.${a}`:a,s=vt(i,o,n);if(s)return s}catch{continue}if(Array.isArray(e))for(let a=0;a<e.length;a++)try{const i=`${t}[${a}]`,o=vt(e[a],i,n);if(o)return o}catch{continue}}catch{}return null},me=e=>{if(e==null)return!1;if(e instanceof Promise||e&&typeof e=="object"&&typeof e.then=="function")return!0;try{if(vt(e))return!0}catch{return!0}return!1},je=async(e,t,n=ze())=>{if(me(t))throw new Error(`Нельзя сохранить объект с Promise в IndexedDB для ключа ${e}`);try{const a=await h.Crypto.enCode(t);return Y[e]=t,await n._withIDBStore("readwrite",i=>{i.put(a,e)}),!0}catch(a){throw a}},xe=async(e,t=ze())=>{if(Y[e]!==void 0)return Y[e];try{let n;if(await t._withIDBStore("readonly",a=>{n=a.get(e)}),n.result!==void 0){let a=await h.Crypto.deCode(n.result);return Y[e]=a,a}return{}}catch{return{}}},Bo=async(e,t=ze())=>{try{return await t._withIDBStore("readwrite",n=>{n.delete(e)}),delete Y[e],!0}catch(n){throw n}},yt=async(e=ze())=>{try{return await e._withIDBStore("readwrite",t=>{t.clear()}),Y={},!0}catch(t){throw t}},Lo={id:async(e,t,n)=>{let a=await xe(t);if(n!==void 0)n({type:"load",base:a});else return a[e]},get:xe,set:je,add:async(e,t,n,a)=>{if(me(e))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в add");let i,o;if(o=await xe(n),o[e.id]=e,me(o))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в add после объединения");if(await je(n,o),t!=null&&(i=await xe(t),e.eDate!==void 0)){if(i[e.id]=e.eDate,me(i))throw new Error("Нельзя сохранить page объект с Promise в IndexedDB в add");await je(t,i)}a!==void 0&&a({type:"load",page:i,base:o})},del:Bo,upd:async(e,t,n,a=ze())=>{if(me(t))throw new Error("Нельзя сохранить объект с Promise в IndexedDB при обновлении");if(Y[e]===void 0){let i;try{if(await a._withIDBStore("readonly",o=>{i=o.get(e)}),i.result!==void 0){let o=await h.Crypto.deCode(i.result);if(Y[e]=o,Y[e][t.id]={...Y[e][t.id],...t.data},me(Y[e]))return{};let s=await h.Crypto.enCode(Y[e]);return await a._withIDBStore("readwrite",c=>{c.put(s,e)}),{}}else return{}}catch{return{}}}else if(Y[e][t.id]!==void 0){if(Y[e][t.id]={...Y[e][t.id],...t.data},n!==void 0&&Y[n]!==void 0?Y[n][t.id]!==void 0&&(Y[n][t.id]=t.data.eDate):Y[n]=[],delete Y[e][t.id].$_item,delete Y[e][t.id].$_send,me(Y[e])||n!==void 0&&me(Y[n]))throw new Error("Нельзя сохранить объект с Promise в IndexedDB при обновлении");try{return await a._withIDBStore("readwrite",i=>{i.put(h.Crypto.enCode(Y[e]),e),n!==void 0&&i.put(h.Crypto.enCode(Y[n]),n)}),{}}catch(i){throw i}}},key:async(e=ze())=>{const t=[];try{return await e._withIDBStore("readonly",n=>{(n.openKeyCursor||n.openCursor).call(n).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}),t}catch{return[]}},load:e=>Y[e],split:(e,t,n=[],a={})=>{let i=n.length!==0,o=[],s=a.sort,c=Object.keys(a).length!==0,l=Object.keys(a),_=Object.keys(e),d=[],p=g=>{let b="";if(n.forEach(x=>{b+=t[g][x]}),c){let x={};l.forEach(v=>{x[v]=t[g][v]});for(let v in s)t[g][s[v]]===void 0&&(yt(),location.reload()),v==="s1"&&(x[v]=new Date(t[g][s[v]]).getTime()),v==="s2"&&(x[v]=t[g][s[v]]),v==="s3"&&(x[v]=t[g][s[v]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:g,text:b,...x})}else o.push({id:g,text:b})},f=g=>{};return _.forEach(g=>{d.push(t[g])}),d.forEach(g=>{g===void 0?(yt(),location.reload()):(i&&p(g.id),c&&f(g.id))}),{list:d,search:o,filter:a}},clear:yt,updAll:async(e,t,n,a)=>{if(me(e))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в updAll");let i=await xe(t),o=await xe(n);for(let s in e)o[s]=e[s],i[s]=e[s].eDate;if(me(o))throw new Error("Нельзя сохранить base объект с Promise в IndexedDB в updAll после объединения");if(me(i))throw new Error("Нельзя сохранить page объект с Promise в IndexedDB в updAll после объединения");await je(t,i),await je(n,o),a!==void 0&&a({type:"load",page:i,base:o})},delAll:async(e,t,n,a)=>{let i=await xe(t),o=await xe(n);e.forEach(s=>delete i[s]),await je(t,i),a!==void 0&&a({type:"load",page:i,base:o})},delList:async(e,t,n)=>{let a=await xe(t);e.forEach(i=>delete a[i]),await je(t,a)},addList:async(e,t,n)=>{let a=await xe(t);e.forEach(i=>a[i.id]=i.eDate),await je(t,a)}},In={setSetting:ja,getSetting:Sa},Mo={version:{Api:Wr,Server:Ur,Client:Gr},Host:Kr,Import:Yr,IconAssets:uo,DynamicURL:Hr},$o={useKey:(e,t)=>{const n=[];t=t.map(a=>a.charCodeAt(0)),document.onkeydown=function(a){n.push(a.keyCode);for(var i=0;i<t.length;i++)if(n.indexOf(t[i])==-1)return;e(),n.length=0},document.onkeyup=function(a){n.length=0}}},Po={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function Dn({children:e}){return r.jsx("ul",{className:re.ul,children:e})}function Ao(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,a=e.item+1;return a=n<a?1:a,e.item===a?e:{...e,wait:e.size===a,item:a,list:[...e.list,...e.data[a]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Nn({list:e,load:t,className:n,...a}){const i=m.useRef(null),[o,s]=m.useReducer(Ao,{load:!1,list:[],data:{},item:1,wait:!1,size:0});m.useEffect(()=>{i.current.scrollTop=0,e!==null&&s({type:"load",load:!0,data:e})},[t]);let c=()=>{i.current.scrollHeight-i.current.scrollTop-300<=i.current.clientHeight&&!o.wait&&s({type:"update"})};return r.jsx("div",{className:[Po.s,n].join(" "),ref:i,onScroll:c,children:r.jsx(Dn,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(l=>r.jsx(a.item,{data:l},l.id)):r.jsxs("div",{"data-load":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})})})}const Fo={Widget:vi},Tn=({onClick:e,active:t})=>(t=!!t,r.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));let W={};W.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},W.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},W.Paste=(e,t)=>{t.preventDefault(),navigator.clipboard.readText().then(n=>{if(e){let a=t.target.textContent.length;if(a>=e)return;e-=a,n=n.slice(0,e)}window.document.execCommand("insertText",!1,n.replace(/(\r\n|\n|\r)/gm," "))}).catch(n=>{})},W.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},W.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()},W.ContentEditable=ye.isBrowser("Firefox")?"true":"plaintext-only";function Ze({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",before:p="",show:f=!0,maxLength:g,onSave:b,className:x="",isCopy:v=!0,isReload:k=!1}){let w=!!(c&&(t===""||t===void 0)),D=E=>{n&&n({value:E.target.textContent.trim(),name:a,reload:k})},z=E=>{g&&E.target.textContent.trim().length>=g&&E.key!=="Backspace"&&E.preventDefault(),E.key==="Enter"&&E.preventDefault()},T=E=>{v&&(E.preventDefault(),navigator.clipboard.writeText(E.target.textContent.trim()).then(function(){h.Notice.Copy("Данные в буфер обмене")},function(L){}))},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(L=>{if(g){let I=E.target.textContent.length;if(I>=g)return;g-=I,L=L.slice(0,g)}window.document.execCommand("insertText",!1,L.replace(/(\r\n|\n|\r)/gm," "))}).catch(L=>{})};if(!(l&&_)&&!f||!(l&&_)&&w)return"";const y={};y.field="input",x&&(y.className=x);const C={};i&&(C.placeholder=i),l&&_&&(C.edit="");const $=E=>{W.Blur(E),b==null||b({value:E.target.textContent.trim(),name:a})};return r.jsxs("dl",{...y,children:[o?r.jsx("dt",{children:o}):"",p,r.jsx("dd",{onPaste:N,onInput:D,onBlur:$,onKeyDown:z,onContextMenu:T,spellCheck:"true",contentEditable:l&&_?W.ContentEditable:"false",suppressContentEditableWarning:!0,...C,children:t}),d,s?r.jsx("em",{children:s}):""]})}function zn({onClick:e,onSend:t,name:n,onRef:a}){let[i,o]=m.useState(!1);const s=()=>{if(e)return e();i||(o(!0),t&&t(o))};return r.jsx("button",{ref:a,"data-form":"button",className:i?"btn await":"btn confirm pointer",onClick:s,children:i?"Ожидайте":n})}function Bn({value:e,onValue:t,onActive:n,data:a,name:i,view:o,maxLength:s,edit:c=!0,active:l=!0,placeholder:_="Введите сообщение"}){const d=m.useRef({value:e,timerId:null,shift:!1,send:!0}),p=()=>{d.current.value.length>0?d.current.send&&(n(!0),d.current.send=!1,d.current.timerId=setTimeout(()=>{d.current.send=!0},3e3)):n(!1)},f=w=>{d.current.value=w.target.textContent,p()},g=w=>{w.keyCode===16&&(d.current.shift=!0),w.keyCode===13&&!d.current.shift&&(w.preventDefault(),d.current.value.length!==0&&(w.target.textContent="",a&&a(d.current.value),t&&t(d.current.value),d.current.value="",n(!1)))},b=w=>{w.keyCode===16&&(d.current.shift=!1)},x=w=>{w.preventDefault(),navigator.clipboard.readText().then(D=>{if(s){let z=w.target.textContent.length;if(z>=s)return;s-=z,D=D.slice(0,s)}window.document.execCommand("insertText",!1,D)}).catch(D=>{})},v=()=>{n(!1)},k={spellCheck:"true"};return _&&(k.placeholder=_),c&&l&&(k.contentEditable=W.ContentEditable),r.jsx("dl",{"data-form":"message",children:r.jsx("dd",{onPaste:x,onInput:f,onKeyUp:b,onKeyDown:g,onBlur:v,...k,suppressContentEditableWarning:!0,children:e})})}function Ln(e){let t=()=>e.title?r.jsx("dt",{children:e.title}):"",n=e.edit!==void 0?e.edit:!0,a=e.active!==void 0?e.active:!0,i=e.placeholder!==void 0?e.placeholder:"",o=l=>{e.onValue({value:l.target.textContent,name:e.name})},s=l=>{l.key==="Enter"&&l.preventDefault()},c=l=>{l.preventDefault(),navigator.clipboard.readText().then(_=>{window.document.execCommand("insertText",!1,_)}).catch(_=>{})};return r.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),r.jsx("dd",{onPaste:c,onInput:o,onKeyDown:s,contentEditable:n&&a?W.ContentEditable:"false","data-placeholder":i,suppressContentEditableWarning:!0,children:e.value})]})}function Mn({value:e,onValue:t,maxLength:n,placeholder:a="",name:i}){let o=(b,x)=>Number(Math.round(b+Math.random()*(x-b))),s=m.useRef(null),c=m.useRef(null),l=o(1e4,99999),_=b=>{b.key!=="Backspace"&&(b.key==="Enter"&&b.preventDefault(),b.target.textContent.length===5&&b.preventDefault(),/\d/.test(b.key)||b.preventDefault())},d=b=>{t({value:Number(b.target.textContent)===l,name:i})},p=b=>{b.preventDefault(),navigator.clipboard.readText().then(x=>{if(n){let v=b.target.textContent.length;if(v>=n)return;n-=v,x=x.slice(0,n)}window.document.execCommand("insertText",!1,x.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(x=>{})};m.useEffect(()=>{const b=s.current,x=b.getContext("2d");x.clearRect(0,0,b.width,b.height),x.font="30px brush script mt",x.fillStyle="#eee",x.textAlign="center",x.fillText(l,50,27),c.current.textContent=""},[l]);const f={};f.field="captcha";const g={};return a&&(g.placeholder=a),r.jsxs("dl",{...f,children:[r.jsx("dd",{ref:c,onPaste:p,onInput:d,onBlur:W.Blur,onKeyDown:_,contentEditable:W.ContentEditable,suppressContentEditableWarning:!0,...g}),r.jsx("canvas",{ref:s,width:"100",height:"35"})]})}function $n({className:e,title:t,error:n,edit:a=!0,real:i,onValue:o,empty:s,name:c}){let l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},_=x=>{if(x.preventDefault(),!a)return;x.target.textContent=x.target.textContent.slice(-1).replace(/[^+\d]/g,"");let v=window.getSelection(),k=x.target.textContent.length;if(l[x.target.id]=x.target.textContent,l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6,v.collapse(x.target.firstChild,1),k===0){x.target.blur(),x.target.focus();return}x.target.nextSibling!=null&&x.target.nextSibling.focus()},d=x=>{if(!a)return x.preventDefault();if(x.key==="Enter"&&x.preventDefault(),x.key==="Backspace"){if(x.preventDefault(),x.target.textContent="",l[x.target.id]="",x.target.previousSibling!=null){let v=x.target.previousSibling.id.slice(1);x.target.previousSibling.textContent="",l["n"+v]="",x.target.previousSibling.focus()}l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6}},p=x=>{if(!a)return x.preventDefault();if(i)o&&o({value:l.code,name:c});else if(l.code.length===6&&(x.target.blur(),o&&o({value:l.code,name:c}),s)){l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let v=1;v<=6;v++){let k=document.getElementById("n"+v);k&&(k.textContent="")}}},f=x=>{x.target.textContent=""},g=x=>{x.preventDefault(),navigator.clipboard.readText().then(v=>{var z;var k=/\d+/g;let w=(z=v.match(k))==null?void 0:z.toString();if(!w)return;let D=w.split("");for(let T=1;T<=D.length;T++){let N=document.getElementById("n"+T);N&&(N.textContent=D[T-1],l["n"+T]=D[T-1])}if(l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6,l.code.length===6&&(x.target.blur(),o&&o({value:l.code,name:c}),s)){l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let T=1;T<=6;T++){let N=document.getElementById("n"+T);N&&(N.textContent="")}}}).catch(v=>{})};const b={};return b.field="code",e&&(b.className=e),r.jsxs("dl",{...b,children:[t?r.jsx("dt",{children:t}):"",r.jsxs("div",{children:[r.jsx("dd",{id:"n1",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n2",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n3",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n4",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n5",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n6",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0})]}),n?r.jsx("em",{children:n}):""]})}function Pn({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,length:l=6,edit:_=!0,active:d=!0,after:p="",show:f=!0,view:g,onSave:b,className:x=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0;let[v,k]=m.useState(t),w=z=>{k(z),n==null||n({value:z,name:a}),b==null||b({value:z,name:a})};const D={};return D.field="color",x&&(D.className=x),r.jsx(r.Fragment,{children:g==="icon"?r.jsx("i",{"data-icon":"F043"}):r.jsxs("dl",{...D,children:[o&&r.jsx("dt",{children:o}),r.jsx("dd",{children:l>0&&Array.from(Array(l).keys()).map(z=>r.jsx("s",{active:(Number(z)===Number(v))+"",onClick:()=>w(z),style:{backgroundColor:`var(--color-${z})`}},z))}),s&&r.jsx("em",{children:s})]})})}const be={o:"_o_76l23_1",c:"_c_76l23_11",_active:"__active_76l23_41",as:"_as_76l23_94",ap:"_ap_76l23_97"};function wt({title:e,error:t,edit:n=!0,active:a=!0,className:i,placeholder:o,max:s,min:c,view:l="date",onValue:_,name:d,value:p,after:f}){let[g,b]=m.useState(p===void 0?new Date:p),x=!n&&a;m.useEffect(()=>{b(p===void 0?new Date:p)},[p]);let v=z=>{b(z),_==null||_({value:z,name:d})},k=z=>{const T=z.target.getBoundingClientRect(),N=T.left,y=T.bottom,C=T.top;de.setListener("form",r.jsx(Oo,{position:{x:N,y:C,b:y},onValue:v,date:g,max:s,min:c,className:i},new Date().getTime()))};const w={};w.field="input",i&&(w.className=i);const D={};return o&&(D.placeholder=o),x?r.jsx(r.Fragment,{}):r.jsx(r.Fragment,{children:l==="icon"?r.jsx("i",{"data-icon":"F043",className:"pointer","data-color":"_b5b9cc :506290",onClick:k}):r.jsxs("dl",{...w,children:[e&&r.jsx("dt",{children:e}),r.jsxs("dd",{onClick:k,...D,"data-edit":(n&&a)+"",children:[G.Date(g,"dd.mm.yyyy"),f]}),t&&r.jsx("em",{children:t})]})})}const Oo=({date:e,onValue:t,position:n,max:a,min:i,className:o})=>{let[s,c]=m.useState(!0),l=new Date,_=new Date(e),d={y:parseInt(l.getFullYear()),d:parseInt(l.getDate()),m:parseInt(l.getMonth())+1},p={y:parseInt(_.getFullYear()),d:parseInt(_.getDate()),m:parseInt(_.getMonth())+1},[f,g]=m.useState({y:p.y,m:p.m}),b=j=>{let M=j.getDay();return M===0&&(M=7),M-1},x=["пн","вт","ср","чт","пт","сб","вс"],v=f.m-1,k=new Date(f.y,v),w=[];for(let j=0;j<b(k);j++)w.push(0);for(;k.getMonth()===v;)w.push(k.getDate()),k.setDate(k.getDate()+1);let D=()=>{c(!1)},z=()=>{y(f.m+1,f.y)},T=()=>{y(f.m-1,f.y)},N=j=>{t(f.y+"-"+G.Number(2,f.m)+"-"+G.Number(2,j)),D()},y=(j,M)=>{M=j>12?M+1:j<1?M-1:M,j=j>12?1:j<1?12:j,g({y:M,m:j})};const C=j=>d.y===f.y&&d.m===f.m&&d.d===j?{"data-active":"true"}:{},$=j=>p.y===f.y&&p.m===f.m&&p.d===j?{"data-current":"true"}:{},E=j=>{let M=!0;if(a){let Z=a.getTime(),V=new Date(f.y,f.m-1,j).getTime();Z<V&&(M=!1)}if(i){let Z=i.getTime(),V=new Date(f.y,f.m-1,j).getTime();Z>V&&(M=!1)}return M};let L=window.innerHeight-n.y<320?n.y-312:n.b,I=window.innerWidth-n.x<265?n.x-235:n.x;return r.jsx(r.Fragment,{children:s?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>D()},new Date().getTime()),r.jsxs("div",{className:[be.c,o&&o+"-backdrop"].join(" "),style:{top:L+"px",left:I+"px"},children:[r.jsxs("s",{children:[r.jsx("i",{onClick:T,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m15.09 4.594-7.646 6.553a1.126 1.126 0 0 0 0 1.708l7.647 6.552c.73.625 1.857.107 1.857-.854V5.447c0-.961-1.127-1.48-1.857-.853Z"})})}),r.jsxs("h2",{children:[G.Month(f.m).name," ",f.y]}),r.jsx("i",{onClick:z,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m8.91 19.406 7.646-6.552a1.125 1.125 0 0 0 0-1.709L8.91 4.593c-.73-.625-1.857-.107-1.857.854v13.107c0 .96 1.127 1.479 1.857.852Z"})})})]}),r.jsxs("div",{"grid-calendar":"",children:[x.map((j,M)=>r.jsx("p",{children:j},"v"+M)),w.map((j,M)=>r.jsx("span",{children:j!==0&&E(j)?r.jsx("b",{...C(j),...$(j),onClick:()=>N(j),children:j}):r.jsx("p",{...C(j),...$(j),children:j!==0?j:""})},M))]})]})]}):""})};function kt({value:e,onValue:t,name:n,placeholder:a="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,after:d="",view:p,modal:f,module:g,options:b,className:x}){let[v,k]=m.useState(e),w=T=>{if(!(c&&_)||!f)return;let N=f.split(".");h.Modal.Open(N[0],N[1],{callback:y=>{t&&t({value:y,name:n}),k(y)},onValue:t,options:b,name:n,value:e})};const D={};D.field="input",x&&(D.className=x);const z={};return a&&(z.placeholder=a),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{...D,children:[i&&r.jsx("dt",{children:i}),r.jsx("dd",{...z,onClick:w,edit:(c&&_)+"","data-after":d,children:v}),o&&r.jsx("em",{children:o})]})}function Ct({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,course:p=100,view:f,type:g,onSave:b,className:x="",isClear:v=!1}){let k=!!(s&&(e===""||e===void 0));e=G.isNumeric(e)?Number(e)/p:0;let w=I=>g==="multi"?I.replace(/[^+\d.+-]/g,""):I.replace(/[^+\d.]/g,""),D=(I,j)=>{let M=document.createRange(),Z=window.getSelection();M.setStart(j.childNodes[0],I),M.collapse(!0),Z.removeAllRanges(),Z.addRange(M),j.focus()},z=I=>{t==null||t({value:w(I.target.textContent)*p,name:n}),I.target.textContent=w(I.target.textContent),I.target.textContent.length>0&&D(I.target.textContent.length,I.target)},T=I=>{W.Blur(I),I.target.textContent===""&&(I.target.textContent=0),b==null||b({value:w(I.target.textContent)*p,name:n}),t==null||t({value:w(I.target.textContent)*p,name:n}),I.target.textContent=G.Money(I.target.textContent)},N=I=>{I.target.textContent=w(I.target.textContent)},y=I=>{I.currentTarget.previousElementSibling.textContent="",t==null||t({value:0,name:n})},C=I=>{I.key==="Enter"&&I.preventDefault()},$=I=>{I.preventDefault(),navigator.clipboard.readText().then(j=>{j=j.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,j)}).catch(j=>{})};if(!(c&&l)&&!d||!(c&&l)&&k)return"";const E={};E.field="input",x&&(E.className=x);const L={};return L.inputMode="decimal",a&&(L.placeholder=a),c&&l&&(L.edit=""),r.jsxs("dl",{...E,children:[i?r.jsx("dt",{children:i}):"",r.jsx("dd",{...L,onInput:z,onPaste:$,onBlur:T,onKeyDown:C,onFocus:N,contentEditable:c&&l?W.ContentEditable:"false",suppressContentEditableWarning:!0,"data-after":_,children:!a||e?G.Money(e):""}),v&&r.jsx("svg",{"action-type":"delete",onClick:y,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M17 6L6 17M6 6L17 17"})}),o?r.jsx("em",{children:o}):""]})}function An({value:e,onValue:t,name:n,view:a,error:i,edit:o=!0,active:s=!0,title:c,placeholder:l="",className:_,after:d}){let[p,f]=m.useState(e);m.useEffect(()=>{f(e)},[e]);let g=v=>{f(v),t&&t({value:v,name:n})},b=v=>{if(!o||!s)return;const k=v.target.getBoundingClientRect(),w=k.left,D=k.top;de.setListener("form",r.jsx(qo,{position:{x:w,y:D},onValue:g,date:p},new Date().getTime()))};const x={};return l&&(x.placeholder=l),a==="icon"?r.jsx("i",{"data-icon":"F043",onClick:b}):r.jsxs("dl",{children:[c&&r.jsx("dt",{children:c}),r.jsx("dd",{onClick:b,...x,children:G.Date(p,"mm.yyyy")}),i&&r.jsx("em",{children:i})]})}const qo=e=>{let[t,n]=m.useState(!0),a=new Date,i=new Date(e.date),o={y:parseInt(a.getFullYear()),m:parseInt(a.getMonth())+1},s={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},[c,l]=m.useState(s.y),_=()=>{n(!1)},d=()=>{l(c+1)},p=()=>{l(c-1)},f=k=>{e.onValue(c+"-"+G.Number(2,k)),_()},g=k=>o.y===s.y&&o.m===k?"_FFEB3B":"",b=Array(12).fill("").map((k,w)=>w+1),x=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,v=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return r.jsx(r.Fragment,{children:t?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>_()},new Date().getTime()),r.jsxs("div",{className:be.c,style:{top:x+"px",left:v+"px"},children:[r.jsxs("s",{children:[r.jsx("i",{onClick:p,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m15.09 4.594-7.646 6.553a1.126 1.126 0 0 0 0 1.708l7.647 6.552c.73.625 1.857.107 1.857-.854V5.447c0-.961-1.127-1.48-1.857-.853Z"})})}),r.jsx("h2",{children:c}),r.jsx("i",{onClick:d,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m8.91 19.406 7.646-6.552a1.125 1.125 0 0 0 0-1.709L8.91 4.593c-.73-.625-1.857-.107-1.857.854v13.107c0 .96 1.127 1.479 1.857.852Z"})})})]}),r.jsx("div",{"grid-month":"",children:b.map((k,w)=>r.jsx("span",{onClick:()=>{f(k)},color:g(k),children:r.jsx("b",{children:G.Month(k).abc})},w))})]})]}):""})};function Fn({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,maxLength:f,view:g,onSave:b,className:x="",isCopy:v=!0}){let[k,w]=m.useState(!1);k=l?!0:k;let D=E=>{n==null||n({value:E.target.innerText,name:a})},z=E=>{f&&E.target.textContent.trim().length>=f&&E.key!=="Backspace"&&E.preventDefault(),E.key==="Enter"&&E.preventDefault()},T=E=>{v&&(E.preventDefault(),navigator.clipboard.writeText(E.target.textContent.trim()).then(function(){h.Notice.Copy("Данные в буфер обмене")},function(L){}))},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(L=>{if(f){let I=E.target.textContent.length;if(I>=f)return;f-=I,L=L.slice(0,f)}window.document.execCommand("insertText",!1,L.replace(/(\r\n|\n|\r)/gm," "))}).catch(L=>{})};if(c)return r.jsx(r.Fragment,{});if(!(l&&_)&&!p)return"";const y={};y.field="notes",x&&(y.className=x);const C={};i&&(C.placeholder=i),l&&_&&(C.edit=""),k&&(C.open="");const $=E=>{W.Blur(E),b==null||b({value:E.target.textContent.trim(),name:a})};return r.jsxs("dl",{...y,children:[o?r.jsx("dt",{children:o}):"",r.jsx("dd",{onPaste:N,onInput:D,onBlur:$,onKeyDown:z,onContextMenu:T,contentEditable:l&&_?W.ContentEditable:"false",suppressContentEditableWarning:!0,...C,children:t}),d,s?r.jsx("em",{children:s}):""]})}function jt({onValue:e,onSave:t,active:n,max:a,edit:i,title:o,error:s,show:c,hide:l,value:_,placeholder:d,className:p,maxLength:f,name:g,after:b="",before:x="",view:v}){i=i!==void 0?i:!0,n=n!==void 0?n:!0,l=!!(l&&(_===""||_===void 0))&&!(i&&n),d=d!==void 0?d:"",a=a!==void 0?a:99;let w=!1,D=E=>{e==null||e({value:E.target.textContent,name:g})},z=E=>{if(!(w&&E.which===86)){if(E.which===17||E.which===91)return w=!0;E.key!=="Backspace"&&(E.target.textContent.length===a&&E.preventDefault(),E.key==="Enter"&&E.preventDefault(),isNaN(E.key)&&E.preventDefault())}},T=E=>{if(E.which===17||E.which===91)return w=!1},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(L=>{if(L=L.replace(/(?!^\+|\d)./g,""),f){let I=E.target.textContent.length;if(I>=f)return;f-=I,L=L.slice(0,f)}window.document.execCommand("insertText",!1,""+L)}).catch(L=>{})};const y=E=>{W.Blur(E),t==null||t({value:E.target.textContent,name:g})},C={};C.field="input",p&&(C.className=p);let $={};return i&&n?($.edit="true",$.contentEditable=W.ContentEditable):$.contentEditable="false",$.inputMode="decimal",d&&($.placeholder=d),l?r.jsx(r.Fragment,{}):r.jsxs("dl",{...C,children:[o&&r.jsx("dt",{children:o}),x,r.jsx("dd",{...$,onPaste:N,onInput:D,onBlur:y,onKeyDown:z,onKeyUp:T,suppressContentEditableWarning:!0,children:_}),b,s&&r.jsx("em",{children:s})]})}function On({value:e,onValue:t,onSave:n,name:a,placeholder:i="",className:o,title:s,error:c,edit:l=!0,active:_=!0,reload:d=!1,native:p=!1,isShow:f=!1,maxLength:g,eyes:b=[],after:x=""}){const[v,k]=m.useState(f);let w=C=>{t&&t({value:C.target.textContent,name:a,reload:d})},D=C=>{C.key==="Enter"&&C.preventDefault()},z=C=>{C.preventDefault(),navigator.clipboard.readText().then($=>{if(g){let E=C.target.textContent.length;if(E>=g)return;g-=E,$=$.slice(0,g)}window.document.execCommand("insertText",!1,$.replace(/(\r\n|\n|\r)/gm," "))}).catch($=>{})},T=C=>{W.Blur(C),n==null||n({value:C.target.textContent.trim(),name:a})};const N={};N.field="password",v&&(N.show=""),o&&(N.className=o);const y={};return i&&(y.placeholder=i),p?"":r.jsxs("dl",{...N,children:[s?r.jsx("dt",{children:s}):"",r.jsx("dd",{onPaste:z,onInput:w,onKeyDown:D,onBlur:T,contentEditable:l&&_?W.ContentEditable:"false",...y,suppressContentEditableWarning:!0,children:e}),b[0]&&r.jsx("i",{onClick:()=>k(!v),children:v?b[1]:b[0]}),x,c?r.jsx("em",{children:c}):""]})}const St={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 Et({value:e,onValue:t,onSave:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,view:f,className:g=""}){l=l!==void 0?l:!0,_=_!==void 0?_:!0,c=!!(c&&(e===""||e===void 0))&&!(l&&_),m.useRef(null);let x="+_(___) ___-__-__",v=!0,k=0,w=(I,j)=>{let M=document.createRange(),Z=window.getSelection();M.setStart(j.childNodes[0],I),M.collapse(!0),Z.removeAllRanges(),Z.addRange(M),j.focus()},D=I=>{let j=T(I.target.textContent);I.target.textContent=j.q,j.i=j.q.lastIndexOf(j.v.substr(-1)),j.i<j.q.length&&j.q!==x?j.i++:j.i=j.q.indexOf("_"),w(j.i,I.target),t&&t({value:j.q.replace(/\D/g,""),name:a})},z=I=>{I.preventDefault(),navigator.clipboard.readText().then(j=>{window.document.execCommand("insertText",!1,j)}).catch(j=>{})},T=I=>{let j=0,M="",Z=I.replace(/\D/g,"");Z===""&&(v=!0);let V=Z.split(""),se="";V.forEach(Ue=>{v&&(se+=Ue,St[se]!==void 0&&v?(v=!1,x=St[se].mask.replace(new RegExp("[0-9]","g"),"_"),M=St[se].code):(v&&(k=(""+se).length,x=`+${se}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),M=""),k>(""+se).length&&(v=!0,x=`+${se}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),M="")))});let we=x.replace(/\D/g,"");return we.length>=Z.length&&(Z=we),{q:x.replace(/[_\d]/g,function(){return Z.charAt(j++)||"_"}),i:j,v:Z,f:M}},N=I=>{I.preventDefault(),navigator.clipboard.writeText(I.target.textContent.replace(/\D/g,"")).then(function(){h.Notice.Copy("Данные в буфер обмене")},function(j){})},y=T(e),C=I=>{I.key==="Enter"&&I.preventDefault()};const $=I=>{W.Blur(I),n&&n({value:I.target.textContent.replace(/\D/g,""),name:a})},E={};E.field="input",g&&(E.className=g);let L={};return l&&_?(L.edit="true",L.contentEditable=W.ContentEditable):L.contentEditable="false",i&&(L.placeholder=i),d&&(L.after=d),c?r.jsx(r.Fragment,{}):r.jsxs("dl",{...E,children:[o&&r.jsx("dt",{children:o}),r.jsx("dd",{...L,onPaste:z,onInput:D,onKeyDown:C,onContextMenu:N,onBlur:$,suppressContentEditableWarning:!0,children:y.q}),s&&r.jsx("em",{children:s})]})}const qn=({className:e,title:t,timeout:n=1e3,placeholder:a,edit:i=!0,active:o=!0,value:s,onValue:c,maxLength:l=20})=>{let _=0,d=m.useRef({textContent:s}),p=()=>{d.current.textContent.trim().length===0&&(d.current.textContent=""),clearTimeout(_),_=setTimeout(()=>{var w;return c((w=d.current)==null?void 0:w.textContent)},n)},f=()=>{d.current&&(d.current.textContent=""),c("")},g=w=>{l&&w.target.textContent.trim().length>=l&&w.key!=="Backspace"&&w.preventDefault(),w.key==="Enter"&&w.preventDefault()},b=w=>{w.preventDefault(),navigator.clipboard.readText().then(D=>{if(l){let z=w.target.textContent.length;if(z>=l)return;l-=z,D=D.slice(0,l)}window.document.execCommand("insertText",!1,D.replace(/(\r\n|\n|\r)/gm," "))}).catch(D=>{})},x=()=>{d.current.textContent=d.current.textContent.trim()};const v={};v.field="search",e&&(v.className=e);const k={};return a&&(k.placeholder=a),r.jsxs("dl",{...v,children:[t&&r.jsx("dt",{children:t}),r.jsx("dd",{ref:d,onPaste:b,onInput:p,onKeyDown:g,onBlur:x,contentEditable:i&&o?W.ContentEditable:"false",...k,suppressContentEditableWarning:!0,children:s}),r.jsx("svg",{"aria-label":"icon",onClick:f,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M10.364 3a7.364 7.364 0 1 0 0 14.727 7.364 7.364 0 0 0 0-14.727v0ZM15.857 15.86 21 21.001"})}),r.jsx("svg",{"action-type":"delete",onClick:f,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M17 6L6 17M6 6L17 17"})})]})};function It({title:e,error:t,edit:n=!0,active:a=!0,hide:i,value:o=0,onValue:s,options:c,placeholder:l="",className:_,name:d,after:p,view:f,order:g,isReload:b=!1}){var $,E;const x=m.useRef(),[v,k]=m.useState(o),[w,D]=m.useState(c);m.useEffect(()=>{k(o),D(c)},[o,c]),i=!!(i&&(o===0||(($=w==null?void 0:w[o])==null?void 0:$.n)===void 0))&&!(n&&a);let T=L=>{k(L),s&&s({value:L,name:d,reload:b})},N=L=>{if(Object.keys(w||{}).length===0||!(n&&a))return;const I=L.target.getBoundingClientRect();de.setListener("form",r.jsx(Ro,{parent:I,onValue:T,view:f,className:_,options:w,order:g},new Date().getTime()))},y={field:"select",className:_},C={onClick:N};return l&&(C.placeholder=l),p&&(C.after=p),n&&a&&(C.edit=""),i?"":r.jsxs("dl",{...y,children:[e&&r.jsx("dt",{children:e}),r.jsx("dd",{...C,ref:x,children:(E=w==null?void 0:w[v])==null?void 0:E.n}),Object.keys(w||{}).length!==0&&r.jsx("s",{children:r.jsx("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m5.25 8.625 6.75 6.75 6.75-6.75"})})}),t&&r.jsx("em",{children:t})]})}const Ro=({onValue:e,parent:t,view:n,className:a,options:i,order:o})=>{let[s,c]=m.useState(!0),l=()=>{c(!1)},_=f=>{c(!1),e(f)},d=window.innerHeight-t.y+t.height<320?t.y-312:t.y+33,p=window.innerWidth-t.x<265?t.x-235:t.x;return r.jsx(r.Fragment,{children:s?r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),r.jsx("div",{className:a,"data-select":"background "+n,style:{top:d+"px",left:p+"px",width:t.width},children:r.jsx(Zo,{order:o,options:i,link:_})})]}):""})},Zo=({order:e,options:t,link:n})=>e?r.jsx("ul",{children:e.map((a,i)=>t[a].s!==0?r.jsx("li",{onClick:()=>{n(a)},children:t[a].n},i):"")}):r.jsx("ul",{children:Object.keys(t).map((a,i)=>t[a].s!==0?r.jsx("li",{onClick:()=>{n(a)},children:t[a].n},i):"")});function Dt(e){let t=()=>e.title?r.jsx("dt",{children:e.title}):"",n=()=>e.error?r.jsx("em",{children:e.error}):"",a=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,s=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(a&&i),c=e.placeholder!==void 0?e.placeholder:"",l=g=>{d(e.options[g]),e.onValue({value:g,name:e.name})},[_,d]=m.useState(e.default!==void 0?e.options[e.default]:e.default),p=g=>{if(!(a&&i))return;const b=g.target.getBoundingClientRect();de.setListener("form",r.jsx(Uo,{parent:b,onValue:l,view:e.view,options:e.options},new Date().getTime()))};const f={};return c&&(f.placeholder=c),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{"data-form":"select",children:[t(),r.jsx("dd",{onClick:p,"data-edit":(a&&i)+"",...f,children:_}),n()]})}const Uo=({onValue:e,parent:t,view:n,options:a})=>{let[i,o]=m.useState(!0),s=()=>{o(!1)},c=p=>{o(!1),e(p)},l=Object.keys(a).length*36,_=window.innerHeight-t.y+t.height<l?t.y-(l-33):t.y+33,d=window.innerWidth-t.x<265?t.x-235:t.x;return r.jsx(r.Fragment,{children:i?r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-select":"backdrop",onClick:s},new Date().getTime()),r.jsx("div",{"data-select":"background "+n,style:{top:_+"px",left:d+"px",width:t.width},children:r.jsx("ul",{children:Object.keys(a).map((p,f)=>r.jsx("li",{onClick:()=>{c(p)},children:a[p]},f))})})]}):""})};function Nt({set:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,show:_=!0,active:d=!0,after:p="",view:f,module:g,item:b,className:x=""}){let v={};switch(e){case"Input":return r.jsx(Ze,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Select":return b&&(v=ye.getSelect(parseInt(b))?ye.getSelect(parseInt(b)):{0:{s:"1",n:"не известно"}}),r.jsx(It,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:parseInt(t||"0"),onValue:n,name:a,placeholder:i,className:x,options:v});case"Users":return ye.getSelect("user"),r.jsx(Dt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x,options:v});case"Date":return r.jsx(wt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Phone":return r.jsx(Et,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Number":return r.jsx(jt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Money":return r.jsx(Ct,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Modal":return r.jsx(kt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a||"",placeholder:i,className:x,options:v,module:g||""})}}function Rn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,maxLength:f,onSave:g,className:b=""}){let x=!!(s&&(e===""||e===void 0));if(!(c&&l)&&!d||!(c&&l)&&x)return"";let v=T=>{t&&t({value:T.target.innerText,name:n})},k=T=>{g&&g({value:T.target.innerText,name:n})},w=T=>{T.preventDefault(),navigator.clipboard.readText().then(N=>{if(f){let y=T.target.textContent.length;if(y>=f)return;f-=y,N=N.slice(0,f)}window.document.execCommand("insertText",!1,N)}).catch(N=>{})};const D={};D.field="text",b&&(D.className=b);const z={};return a&&(z.placeholder=a),r.jsxs("dl",{...D,children:[i&&r.jsx("dt",{children:i}),r.jsx("dd",{onPaste:w,onBlur:k,onInput:v,contentEditable:c&&l?W.ContentEditable:"false",...z,suppressContentEditableWarning:!0,children:e}),o&&r.jsx("em",{children:o})]})}function Zn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,onSave:f,className:g=""}){let b=!!(s&&(e===""||e===void 0)),x=G.Date(e===void 0?new Date:e,"HH:MM"),v=m.useRef(null);if(!(c&&l)&&!d||!(c&&l)&&b)return"";let k=N=>{v.current.textContent=N,t&&t({value:N,name:n})},w=N=>{f&&f({value:N,name:n})},D=N=>{const y=N.target.getBoundingClientRect(),C=y.left,$=y.top;de.setListener("form",r.jsx(Wo,{positions:{x:C,y:$},onSave:w,onValue:k,date:x},new Date().getTime()))};const z={};z.field="input",g&&(z.className=g);const T={};return a&&(T.placeholder=a),r.jsx(r.Fragment,{children:p==="icon"?r.jsx("i",{"data-icon":"F043",onClick:D}):r.jsxs("dl",{...z,children:[i?r.jsx("dt",{children:i}):"",r.jsx("dd",{onClick:D,ref:v,...T,children:x}),o?r.jsx("em",{children:o}):""]})})}const Wo=({positions:e,onSave:t,onValue:n,date:a})=>{let i=a.split(":"),o={h:G.Number(2,i[0]),m:G.Number(2,i[1])},s="hour",[c,l]=m.useState({}),_=!1,d=0,p=0,f={body:m.useRef(null),time:m.useRef(null),hour:m.useRef(null),timeText:m.useRef(null),hourText:m.useRef(null)};m.useEffect(()=>{l(f.body.current.getBoundingClientRect()),f.hour.current.style.transform="rotate("+o.h*15+"deg)",f.time.current.style.transform="rotate("+o.m*6+"deg)"},[f.body,f.hour,f.time,o.m,o.h]);let g=()=>{_=!0},b=()=>{_=!1,s=s==="hour"?"time":"hour",f.body.current.setAttribute("active",s)},x=N=>{if(_){let C=Math.atan2(N.pageX-(c.x+78),N.pageY-(c.y+78))*(180/Math.PI)*-1+180;f[s].current.style.transform="rotate("+C+"deg)",s==="hour"?(o={...o,h:G.Number(2,parseInt(String(C/15),10))},f.hourText.current.textContent=o.h):(o={...o,m:G.Number(2,parseInt(String(C/6),10))},f.timeText.current.textContent=o.m),n(o.h+":"+o.m)}},v=N=>{if(s==="hour")if(N.deltaY>0){d+=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.h,10)+1;C=C>23?0:C,o={...o,h:G.Number(2,C)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else{d-=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.h,10)-1;C=C<0?23:C,o={...o,h:G.Number(2,C)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else if(N.deltaY>0){d+=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.m,10)+1;C=C>59?0:C,o={...o,m:G.Number(2,C)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}else{d-=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.m,10)-1;C=C<0?59:C,o={...o,m:G.Number(2,C)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}n(o.h+":"+o.m)},[k,w]=m.useState(!0),D=()=>{w(!1),t(o.h+":"+o.m)},z=window.innerHeight-e.y+33<320?e.y-312:e.y+33,T=window.innerWidth-e.x<265?e.x-235:e.x;return r.jsx(r.Fragment,{children:k?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>D()},new Date().getTime()),r.jsxs("div",{className:be.c,onMouseDown:g,onMouseUp:b,onMouseMove:x,onWheel:v,ref:f.body,style:{top:z+"px",left:T+"px"},children:[r.jsx("div",{className:"b"}),r.jsxs("div",{className:"s",children:[r.jsx("span",{className:["hour",s==="hour"?be.as:be.ap].join(" "),ref:f.hourText,children:o.h})," ",":"," ",r.jsx("span",{className:["min",s==="time"?be.as:be.ap].join(" "),ref:f.timeText,children:o.m})]}),r.jsx("div",{className:"h",ref:f.hour}),r.jsx("div",{className:"t",ref:f.time})]})]}):""})};function Un({onValue:e,label:t,value:n,title:a,className:i,name:o,text:s,id:c,reload:l}){const[_,d]=m.useState(!!n),p=t||a;m.useEffect(()=>{d(!!n)},[n]);let f=()=>{e&&e({value:_?0:1,name:o,id:c}),d(!_)};const g={};return g.field="check",i&&(g.className=i),r.jsxs("dl",{...g,children:[p?r.jsx("dt",{children:p}):"",r.jsxs("dd",{onClick:f,children:[r.jsx("span",{children:s}),r.jsx("div",{role:"switch","aria-checked":`${_?"true":"false"}`})]})]})}const Go=({label:e,onValue:t,value:n,name:a,item:i})=>{const[o,s]=m.useState(!!n);m.useEffect(()=>{s(!!n)},[n]);let c=()=>{let l=parseInt(o)===0?1:0;s(l),t({value:l,name:a,key:i,item:i})};return r.jsx("div",{role:"switch",onClick:c,"aria-checked":`${o?"true":"false"}`})},Wn=({onValue:e,value:t,name:n,item:a})=>{const[i,o]=m.useState(!!t);m.useEffect(()=>{o(!!t)},[t]);let s=()=>{let c=i?0:1;o(!!c),e({value:c,name:n,key:a,item:a})};return r.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})};function Gn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,max:f=0,onSave:g,className:b="",separator:x=","}){const[v,k]=m.useState(e!==void 0?e.split(x):[]);m.useEffect(()=>{k(e!==void 0?e!==void 0?e.split(x):[]:[])},[e]);let w=()=>{if(f!==0&&v.length>=f)return h.Notice.Error("Слишком много");k([...v,""])},D=L=>{v.splice(L,1),v.length===0&&v.push(""),k([...v]),g!==void 0&&g({value:v.join(x),name:n})},z=!!(s&&(e===""||e===void 0)),T=L=>{};if(!(c&&l)&&!d||!(c&&l)&&z)return"";const N={};N.field="group",b&&(N.className=b);const y=(L,I)=>{W.Blur(L),v[I]=L.target.textContent,g&&g({value:v.join(x),name:n})};let C=(L,I)=>{v[I]=L.target.textContent,t&&t({value:v.join(x),name:n})},$=L=>{L.key==="Enter"&&L.preventDefault()};const E=({data:L})=>f!==0&&L.length>=f?"":r.jsx("i",{onClick:w,children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[r.jsx("path",{d:"M12 5.25v13.5"}),r.jsx("path",{d:"M18.75 12H5.25"})]})});return r.jsxs("dl",{...N,children:[r.jsxs("dt",{children:[i,r.jsx(E,{data:v})]}),r.jsx("dd",{children:v.map((L,I)=>r.jsxs("li",{className:"field_group_item",children:[r.jsx("span",{onInput:j=>C(j,I),edit:"true",name:n,placeholder:a,onPaste:T,contentEditable:c&&l?W.ContentEditable:"false",onKeyDown:$,onBlur:j=>y(j,I),suppressContentEditableWarning:!0,children:v[I]}),r.jsx("i",{onClick:()=>{D(I)},children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[r.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),r.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},I))}),o&&r.jsx("em",{children:o})]})}const Ko=(e,t=",")=>(e=e!==void 0&&e!==""?e.split(t):[],e.filter(n=>n!=="").reduce((n,a)=>(n[a]=!0,n),{}));function Kn({value:e,onValue:t,name:n,placeholder:a="",separator:i=",",title:o,error:s,hide:c=!1,edit:l=!0,show:_=!0,active:d=!0,outFormat:p="object",after:f="",view:g,modal:b,module:x,options:v,className:k}){const[w,D]=m.useState(Ko(e,i)),z=y=>{if(!(l&&d)||!b)return;let C=b.split(".");h.Modal.Open(C[0],C[1],{callback:$=>{if(t)switch(p){case"array":t({value:Object.keys($),name:n});break;case"string":t({value:Object.keys($).join(","),name:n});break;default:t({value:$,name:n})}D($)},onValue:t,options:v,name:n,value:w})},T={};T.field="group",k&&(T.className=k);const N={};return a&&(N.placeholder=a),c?r.jsx(r.Fragment,{}):r.jsxs("dl",{...T,children:[r.jsxs("dt",{children:[o,r.jsx("i",{onClick:z,children:r.jsx("svg",{width:"20",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M12 5.25v13.5M18.75 12H5.25"})})})]}),r.jsx("dd",{...N,onClick:z,edit:(l&&d)+"","data-after":f,children:Object.keys(w).map(y=>{var C;return r.jsx("div",{className:"field_group_item",children:(C=v[y])==null?void 0:C.label},y)})}),s&&r.jsx("em",{children:s})]})}function Yn({value:e,onValue:t,name:n,placeholder:a="",title:i="",link:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,type:f,view:g,onSave:b,className:x=""}){const v=m.useId();let k=!!(c&&(e===""||e===void 0)),[w,D]=m.useState(o);if(!(l&&_)&&!p||!(l&&_)&&k)return"";const z=async N=>{if(f){let y=Ho(N,f,e||"default");t==null||t({name:n,value:y}),D(URL.createObjectURL(y))}else t==null||t({name:n,value:N}),D(URL.createObjectURL(N))},T={};return T.field="file",x&&(T.className=x),r.jsxs("dl",{...T,children:[i&&r.jsxs("dt",{children:[i," "]}),r.jsxs(Yo,{onFiles:z,children:[r.jsx("input",{id:v,type:"file",multiple:!0,onChange:N=>{N.target.files[0]&&z(N.target.files[0])}}),r.jsx("label",{htmlFor:v}),r.jsx("img",{src:w})]}),s&&r.jsx("em",{children:s})]})}const Yo=({children:e,onFiles:t})=>{const n=m.useRef(null);return m.useEffect(()=>{if(n.preventDefaults)return;n.preventDefaults=i=>{i.preventDefault(),i.stopPropagation()},n.highlight=i=>{},n.unhighlight=i=>{},n.onHandleDrop=i=>{let c=i.dataTransfer.files[0];t&&t(c)};let a=n.current;["dragenter","dragover","dragleave","drop"].forEach(i=>{a.addEventListener(i,n.preventDefaults,!1),document.body.addEventListener(i,n.preventDefaults,!1)}),["dragenter","dragover"].forEach(i=>{a.addEventListener(i,n.highlight,!1)}),["dragleave","drop"].forEach(i=>{a.addEventListener(i,n.unhighlight,!1)}),a.addEventListener("drop",n.onHandleDrop,!1)},[]),r.jsx("dd",{ref:n,children:e})},Ho=(e,t,n)=>{var a=document.getElementsByTagName("body")[0],i=document.createElement("canvas");a.appendChild(i);const o=i.getContext("2d"),s=new Image;s.addEventListener("load",()=>{o.drawImage(s,0,0,s.width,s.height);const c=t==="png"?i.toDataURL():i.toDataURL(`image/${t}`),l=Jo(c,n);return i.remove(),l}),s.src=URL.createObjectURL(e)};function Jo(e,t){let n=e.split(","),a=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],t,{type:a})}function Hn({name:e,value:t,title:n,style:a,className:i}){let o={field:"progress"};return a&&(o.style=a),i&&(o.className=i),r.jsxs("dl",{...o,children:[n&&r.jsx("dt",{children:n}),r.jsx("dd",{})]})}const ce={};function Xo(e){const[t,n]=m.useState({}),a=m.useRef(e);return ce.u=i=>{a.current={...a.current,[i.name]:i.value}},ce.n=i=>{a.current=i,n(Date.now())},ce.r=()=>{n(Date.now())},[a.current,ce.n]}function Vo(e){ce.u(e),e.reload&&ce.r()}function Qo(){ce.r&&ce.r()}function es(e){const[t,n]=m.useState({}),a=m.useRef(e);return ce.u=i=>{a.current={...a.current,[i.name]:i.value}},ce.n=i=>{Object.keys(i).length>0?Object.keys(i).forEach(o=>{a.current[o]=i[o]}):a.current={},n(Date.now())},ce.r=()=>{n(Date.now())},[a.current,ce.n]}const ts={Color:Pn,Date:wt,Mask:Yn,Image:Yn,Code:$n,Check:Un,Switch:Tn,Input:Ze,Button:zn,Message:Bn,Generator:Ln,Captcha:Mn,Modal:kt,Money:Ct,Month:An,Notes:Fn,Number:jt,Password:On,Phone:Et,Search:qn,Select:It,Set:Nt,Textarea:Rn,Time:Zn,Users:Dt,String:Ze,Form:Nt,runReload:Qo,useData:Xo,setValue:Vo,Palette:Go,Toogle:Wn,Group:Gn,Options:Kn,useError:es,Progress:Hn};function ns({value:e="",onValue:t,onSave:n,name:a,format:i="+_(___) ___-__-__",placeholder:o="",title:s="",error:c="",hide:l=!1,edit:_=!0,active:d=!0,after:p="",show:f=!0,view:g,className:b=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0,l=!!(l&&(e===""||e===void 0))&&!(_&&d),m.useRef(null);let v=i,k=!0,w=0,D=(j,M)=>{let Z=document.createRange(),V=window.getSelection();Z.setStart(M.childNodes[0],j),Z.collapse(!0),V.removeAllRanges(),V.addRange(Z),M.focus()},z=j=>{j.preventDefault(),navigator.clipboard.readText().then(M=>{window.document.execCommand("insertText",!1,M)}).catch(M=>{})},T=j=>{let M=0,Z="",V=j.replace(/\D/g,"");V===""&&(k=!0);let se=V.split(""),we="";se.forEach(nt=>{k&&(we+=nt,k&&(w=(""+we).length,v=i.replace(new RegExp("[0-9]","g"),"_"),Z=""),w>(""+we).length&&(k=!0,v=i.replace(new RegExp("[0-9]","g"),"_"),Z=""))});let Be=v.replace(/\D/g,"");return Be.length>=V.length&&(V=Be),{q:v.replace(/[_\d]/g,function(){return V.charAt(M++)||"_"}),i:M,v:V,f:Z}},N=j=>{j.preventDefault(),navigator.clipboard.writeText(j.target.textContent.replace(/\D/g,"")).then(function(){h.Notice.Copy("Данные в буфер обмене")},function(M){})},y=T(e),C=j=>{let M=T(j.target.textContent);j.target.textContent=M.q,M.i=M.q.lastIndexOf(M.v.substr(-1)),M.i<M.q.length&&M.q!==v?M.i++:M.i=M.q.indexOf("_"),D(M.i,j.target),t&&t({value:M.q.replace(/\D/g,""),name:a})},$=j=>{j.key==="Enter"&&j.preventDefault()};const E=j=>{W.Blur(j),n&&n({value:j.target.textContent.replace(/\D/g,""),name:a})},L={};L.field="input",b&&(L.className=b);let I={};return _&&d?(I.edit="true",I.contentEditable=W.ContentEditable):I.contentEditable="false",o&&(I.placeholder=o),p&&(I.after=p),l?r.jsx(r.Fragment,{}):r.jsxs("dl",{...L,children:[s&&r.jsx("dt",{children:s}),r.jsx("dd",{...I,onPaste:z,onInput:C,onKeyDown:$,onContextMenu:N,onBlur:E,suppressContentEditableWarning:!0,children:y.q}),c&&r.jsx("em",{children:c})]})}const rs={Color:Pn,Date:wt,Code:$n,Check:Un,Switch:Tn,Input:Ze,Button:zn,Message:Bn,Generator:Ln,Captcha:Mn,Modal:kt,Money:Ct,Mask:ns,Month:An,Notes:Fn,Number:jt,Password:On,Phone:Et,Search:qn,Select:It,Set:Nt,Textarea:Rn,Time:Zn,Users:Dt,String:Ze,Toogle:Wn,Group:Gn,Options:Kn,Progress:Hn},Jn={spinner:"_spinner_o487n_1",l:"_l_o487n_75",loadingB:"_loadingB_o487n_1"};function as(){return r.jsx("div",{className:Jn.spinner,children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:r.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 is(){return r.jsxs("div",{className:Jn.l,children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})}const os={Spinner:as,Inline:is},Xn={ph:"_ph_1wjxu_1",e:"_e_1wjxu_5"},ss=({title:e,affter:t,onDynamicURL:n,children:a,button:i,page:o,tabs:s=[],className:c="",modules:l,loading:_})=>{const[d]=h.Router.useTabs(s.map(g=>g.id).includes(h.Router.getTabs())?h.Router.getTabs():o),[p,f]=m.useState(!1);return m.useEffect(()=>{f(!0)},[]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:[Xn.ph,c].join(" "),children:[r.jsx(cs,{title:e,affter:t}),r.jsx("div",{className:Xn.e}),r.jsx(ds,{button:i})]}),s.length>0&&r.jsx(vn,{list:s,active:d}),a,p&&r.jsx(ls,{onDynamicURL:n,loading:_,m:l,t:d})]})};let ls=({m:e,t,loading:n,onDynamicURL:a})=>{const i=m.lazy(()=>Ye(e+"/pages/"+t+".tsx"));return a&&a((e+"/"+t).toLowerCase()),r.jsx(m.Suspense,{fallback:n,children:r.jsx(i,{})})},ds=({button:e})=>{const[t,n]=m.useState(e);return gt("button",n),r.jsxs(r.Fragment,{children:[" ",t]})},cs=({title:e,affter:t})=>{const[n,a]=m.useState(r.jsxs(r.Fragment,{children:[e," ",t]}));return gt("title",a),r.jsx("h2",{children:n})};const _s={Lite:ss},Vn={s:"_s_t9swc_1"};let Tt;function us({className:e,placeholder:t}){let n=s=>{Tt(s.target.textContent)},a=s=>{s.key==="Enter"&&s.preventDefault()},i=s=>{s.preventDefault(),navigator.clipboard.readText().then(c=>{window.document.execCommand("insertText",!1,c)}).catch(c=>{})};const o={};return t&&(o.placeholder=t),o.className=e?[Vn.s,e].join(" "):Vn.s,r.jsx("div",{onPaste:i,onInput:n,onKeyDown:a,contentEditable:"plaintext-only",...o,suppressContentEditableWarning:!0})}function fs(e,t,n){let a=[],i=1,o=0,s={},c=50;return s[i]=[],e.forEach(l=>{l.text.toLowerCase().indexOf(t)>-1&&a.push(l.id)}),a.forEach(l=>{o++,o<=c||(i++,o=1,s[i]=[]),s[i].push(n[l])}),s}function ms(e){Tt=e}function ps(e){Tt=e}const hs={Field:us,Run:fs,Get:ms,useValue:ps};function gs(){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"}),r.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 xs(){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"}),r.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 bs(){return r.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:r.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 vs={f:"_f_q3r0i_1"};let _e={};function ys(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(i=>{i!=="sort"&&(n[i]=t.data[i],e.take[i]="999")}),{...e,data:n,take:e.take};case"size":return{...e,size:t.size};case"take":let a={[t.list]:t.take};a={...e.take,...a},e.active=!1;for(let i in a)a[i]!=="999"&&(e.active=!0);return _e.get(a,e.active),{...e,take:a,active:e.active};case"exit":for(let i in e.take)e.take[i]="999";return _e.get&&_e.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function ws(){const[e,t]=m.useReducer(ys,{open:!1,view:null,data:{},take:{},size:0,active:!1});return _e.set=n=>{t({type:"data",data:n})},_e.count=n=>{t({type:"size",size:n})},_e.reset=()=>{t({type:"exit"})},r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:vs.f,onClick:()=>{t({type:"open",open:!0})},children:[r.jsx(bs,{}),e.active&&r.jsxs("i",{children:[e.size,"1"]})]}),e.open?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),r.jsxs("div",{className:"filter m",children:[r.jsx("div",{className:"filter l",children:Object.keys(e.data).map(n=>r.jsx(Es,{data:n,dispatch:t,state:e},n))}),r.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):r.jsx(r.Fragment,{})]})}function ks(e){_e.get=e}function Cs(e){_e.set!==void 0&&_e.set(e)}function js(e){_e.reset!==void 0&&_e.reset(e)}function Ss(e,t,n,a){let i=[],o=1,s=0,c={},l=50;return c[o]=[],a===!0&&(Object.keys(t).forEach(_=>{Number.parseInt(t[_])!==999&&(e=e.filter(d=>Number.parseInt(d[_])===Number.parseInt(t[_])))}),Qn(e.length)),e.forEach(_=>{i.push(_.id)}),i.forEach(_=>{s++,s<=l||(o++,s=1,c[o]=[]),c[o].push(n[_])}),c}function Qn(e){_e.count(e)}function Es({data:e,state:t,dispatch:n}){let a=()=>{n({type:"view",view:e})},i=()=>{n({type:"take",list:e,take:"999"})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"filter s",children:[r.jsxs("div",{onClick:a,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?r.jsx("div",{onClick:i,className:"filter x","data-icon":"F038"}):""]}),r.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,s)=>r.jsx(Is,{data:t.data[e].list[o],head:e,type:o,dispatch:n,state:t},s))})]})}function Is({data:e,head:t,state:n,dispatch:a,type:i}){if(i!=="999"&&e.count===void 0)return"";const o=()=>{a({type:"take",list:t,take:i})};return r.jsxs("div",{className:"filter a",onClick:o,"set-active":(n.take[t]===i)+"",children:[e.name,r.jsx("div",{className:"filter e",children:e.count})]})}const Ds={Button:ws,useValue:ks,Set:Cs,Run:Ss,Count:Qn,Reset:js},Ns={n:"_n_euuvm_1"};let tt={},zt=[];const Ts=(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(i=>i.id!==t.id);return{...e,news:n,active:n.length!==0};case"size":return{...e,size:t.size};case"take":let a={[t.list]:t.take};a={...e.take,...a},e.active=!1;for(let i in a)a[i]!=="999"&&(e.active=!0);return tt.get(a,e.active),{...e,take:a,active:e.active};case"exit":return e;default:throw new Error}};function zs(e){tt.fn({action:"add",data:e})}function Bs(e){tt.fn({action:"add",data:e})}function Ls(e){tt.fn=e}function Ms(){const[e,t]=m.useReducer(Ts,{open:!1,active:!1,news:[],take:{}});Ls(async a=>{switch(a.action){case"add":zt.push(a.data);break}}),m.useEffect(()=>{setInterval(()=>{zt.forEach((a,i)=>{t({type:"add",data:{module:a.module,type:a.type,id:a.id,datetime:a.datetime,txt:a.title}}),a.datetime<new Date().getTime()&&zt.splice(i,1)})},6e4)},[]);let n=async a=>{t({type:"hide",id:a.id})};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ns.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?r.jsx(xs,{}):r.jsx(gs,{})}),e.open?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),r.jsxs("div",{className:"notify-m",children:[r.jsx("div",{className:"notify-l",children:e.news.map((a,i)=>r.jsx($s,{data:a,dispatch:t},i))}),r.jsx("div",{className:"notify-b",onClick:n,children:"История"})]})]}):""]})}const $s=({data:e,dispatch:t})=>{let n=async a=>{t({type:"hide",id:a.id})};return r.jsxs("div",{className:"notify-i",children:[r.jsx("div",{className:"--icon","data-icon":e.type}),r.jsxs("div",{className:"--body",children:[r.jsx("div",{className:"--name",children:e.type}),r.jsx("div",{className:"--text",children:e.txt})]}),r.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>n(e),children:" "})]})},Ps={Bell:Ms,Send:Bs,Add:zs},er={p:"_p_djnh1_1",l:"_l_djnh1_38"};function As(e){let t=3,n=e.page,a=e.count,i=[],o=()=>{i.push({page:1}),i.push({text:"..."})},s=()=>{i.push({text:"..."}),i.push({page:a})},c=(l,_)=>{for(let d=l;d<_;d++)i.push({page:d})};return a<t*2+6?c(1,a+1):n<t*2+1?(c(1,t*2+4),s()):n>a-t*2?(t=a>1e4?1:t,o(),c(a-t*2-2,a+1)):(t=a>1e4?1:t,o(),c(n-t,n+t+1),s()),i.length===1?r.jsx(r.Fragment,{}):r.jsxs("div",{className:er.p,children:[r.jsx("i",{onClick:()=>e.onChangePage(n-1),children:r.jsx("svg",{viewBox:"0 0 24 24",children:r.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"})})}),i.map((l,_)=>{const d={};return l.page&&(d.onClick=()=>e.onChangePage(l.page)),l.page===e.page&&(d.active=""),m.createElement("span",{...d,key:_},l.page||l.text)}),r.jsx("i",{onClick:()=>e.onChangePage(n+1),children:r.jsx("svg",{viewBox:"0 0 24 24",children:r.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 Fs(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 tr({load:e,list:t,item:n}){const a=m.useRef(null),[i,o]=m.useReducer(Fs,{load:!1,list:[],data:{},page:1,wait:!1,item:n});m.useEffect(()=>{t!==null&&o({type:"load",load:e,data:t})},[e]);let s=c=>{if(c===0)return c=1;if(c>i.size)return c=i.size;o({type:"page",page:c})};return m.useEffect(()=>{},[i]),r.jsxs(r.Fragment,{children:[r.jsx("div",{className:er.l,ref:a,children:r.jsx(Dn,{"el-empty":"Данные не найдены",children:i.load&&i.list!==void 0?i.list.map(c=>r.jsx(i.item,{data:c},c.id)):r.jsxs("div",{"type-data":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})})}),i.load&&i.list!==void 0?r.jsx(As,{page:i.page,count:i.size,onChangePage:s}):r.jsx(r.Fragment,{})]})}const Os={Pagination:tr};function qs({head:e,load:t,list:n,item:a}){const i=e;return r.jsxs(r.Fragment,{children:[r.jsx(i,{}),In.getSetting("s05")===1?r.jsx(tr,{list:n,load:t,item:a}):r.jsx(Nn,{list:n,load:t,item:a})]})}function Rs(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 Bt={};function Zs(e){Bt.get=e}function Us(e){Bt.get&&Bt.get(e)}const Ws={View:qs,Reducer:Rs,useValue:Zs,Lite:Sn,setValue:Us},Gs={addDictionary:zi,getDictionary:Mi,setDictionary:Li,current:$i};async function Ks(){let e=await dn(),t={};return Object.keys(e).forEach(n=>{t[e[n].id]={},t[e[n].id].name=e[n].a}),t}const Ys={Get:Ks},Hs=function({title:e,children:t,imp:n,button:a,page:i,tabs:o,modules:s}){const[c]=h.Router.useTabs(i),[l,_]=m.useState(!1);return m.useEffect(()=>{_(!0)},[]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"list-info",children:[r.jsx("h2",{children:e}),r.jsx("div",{className:"empty"}),r.jsx(Xs,{button:a})]}),l&&r.jsx(Js,{imp:n,modules:s,t:c}),t]})};let Js=({modules:e,t})=>{const n=m.lazy(()=>Ye(e+"/pages/"+t+".tsx"));return r.jsx(m.Suspense,{fallback:"",children:r.jsx(n,{})})},Xs=({button:e})=>{const[t,n]=m.useState(e);return de.useListener("button",n),r.jsxs(r.Fragment,{children:[" ",t]})};const Vs={Open:Ei};function Qs({active:e,onActive:t,id:n,name:a}){const[i,o]=m.useState(!!e);m.useEffect(()=>{o(!!e)},[e]);let s=()=>{let c=i?0:1;o(!i),t&&t({value:c,is:!i,name:a,id:n,setActive:o})};return r.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})}h.Action=yn,h.Animation=_i,h.Badge=To,h.Bookmarks=lo,h.Browser=Gi,h.Button=xn,h.Chart=so,h.Company=Ys,h.Component=ct,h.DataBase=Lo,h.Event=de,h.Events=de,h.Files=Fo,h.Filter=Ds,h.Form=ts,h.Format=G,h.HotKey=$o,h.Icon=ho,h.Init=gn,h.Input=rs,h.Lang=Gs,h.Layout=_s,h.List=Ws,h.Lite=vo,h.Loading=os,h.Notifications=Ps,h.Pagination=Os,h.Phone=Vs,h.Root=jn,h.Scrolling=Nn,h.Search=hs,h.Setting=io,h.Sistym=Mo,h.Store=ye,h.Switch=Qs,h.Tabs=Xi,h.Test=Hs,h.Triage=Io,h.User=In,h.WebRTC=H,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|
|
31
|
+
<%s key={someKey} {...props} />`,Rt,Ne,jl,Ne),hr[Ne+Rt]=!0}}return u===a?vl(X):bl(X),X}}function yl(u,S,B){return gr(u,S,B,!0)}function wl(u,S,B){return gr(u,S,B,!1)}var kl=wl,Cl=yl;Pe.Fragment=a,Pe.jsx=kl,Pe.jsxs=Cl}()),Pe}process.env.NODE_ENV==="production"?lt.exports=Mr():lt.exports=$r();var r=lt.exports;let pe={};function Ae({data:e}){let[t,n]=m.useState("show");m.useEffect(()=>{e.hide&&(setTimeout(function(){n("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]);let a,i;switch(e.type){case"error":a=r.jsx(Ee.error,{}),i="Ошибка:";break;case"success":a=r.jsx(Ee.success,{}),i="Информация:";break;case"copy":a=r.jsx(Ee.success,{}),i="Копирование:";break;case"remark":a=r.jsx(Ee.success,{}),i="Подсказка:";break;default:a=r.jsx(Ee.success,{}),i="Предупреждение:";break}return r.jsxs("li",{className:"item "+e.type,"data-status":t,children:[a,r.jsx("b",{children:i}),r.jsx("p",{children:e.text})]})}function Pr({data:e}){let[t,n]=m.useState("show");return m.useEffect(()=>{e.hide&&(setTimeout(function(){n("hide")},1800),setTimeout(function(){pe.del(e.key)},2500))},[e.key]),r.jsx("li",{className:"item","data-status":t,children:e.text})}const Ee={};Ee.error=()=>r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"})]}),Ee.success=()=>r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"})]}),h.Notice=void 0,(e=>{function t(){let[l,_]=m.useState([]);return pe.set=d=>{_([...l,d])},pe.del=d=>{_(l.filter(p=>p.key!==d))},l.length===0?"":r.jsx("ul",{id:"notice",children:l.map(d=>d.item)})}e.Init=t;function n(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"error"};pe.set({item:r.jsx(Ae,{data:p},d),key:d})}e.Error=n;function a(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"success"};pe.set({item:r.jsx(Ae,{data:p},d),key:d})}e.Success=a;function i(l,_=!0){let d=Date.now(),p={key:d,hide:_,text:l};pe.set({item:r.jsx(Pr,{data:p},d),key:d})}e.Custom=i;function o(l){let _=Date.now(),d={key:_,hide:!0,...l};pe.set({item:r.jsx(Ae,{data:d},_),key:_})}e.Send=o;function s(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"remark"};pe.set({item:r.jsx(Ae,{data:p},d),key:d})}e.Remark=s;function c(l,_=!0){let d=Date.now(),p={key:d,text:l,hide:_,type:"copy"};pe.set({item:r.jsx(Ae,{data:p},d),key:d})}e.Copy=c})(h.Notice||(h.Notice={}));const nn={alerts:"_alerts_ita6j_1",menuAnimation:"_menuAnimation_ita6j_1",menuItemAnimation:"_menuItemAnimation_ita6j_1","--body":"_--body_ita6j_103",allert:"_allert_ita6j_111","--form":"_--form_ita6j_111",al:"_al_ita6j_1"};let Fe={};const Ar=({data:e,callback:t,cancel:n})=>(e.button=e.button===void 0?"Подтвердить":e.button,r.jsxs("div",{className:nn.alerts,children:[r.jsxs("dl",{children:[r.jsx("dt",{children:e.title}),r.jsx("dd",{children:e.text}),r.jsx("ul",{children:r.jsx("button",{color:e.color||"blue",onClick:()=>{t(),Fe.del()},children:e.button})})]}),r.jsx("div",{className:nn["--body"],onClick:()=>{n==null||n(),Fe.del()}})]}));h.Alert=void 0,(e=>{function t(){let[a,i]=m.useState("");return Fe.set=o=>i(o),Fe.del=()=>i(""),r.jsx(r.Fragment,{children:a})}e.Init=t;function n(a,i,o){Fe.set(r.jsx(Ar,{data:a,callback:i,cancel:o}))}e.Send=n})(h.Alert||(h.Alert={}));function Fr({children:e}){return r.jsx("div",{className:"l",children:r.jsx("ul",{children:e})})}const te={white:"_white_1lqz6_15",black:"_black_1lqz6_29",shake:"_shake_1lqz6_1",modal:"_modal_1lqz6_78",o:"_o_1lqz6_88",w:"_w_1lqz6_15",h:"_h_1lqz6_113",l:"_l_1lqz6_127",t:"_t_1lqz6_165",m:"_m_1lqz6_78",x:"_x_1lqz6_173",s:"_s_1lqz6_183",c:"_c_1lqz6_188",f:"_f_1lqz6_193",row:"_row_1lqz6_215",col:"_col_1lqz6_227",g:"_g_1lqz6_236","size-a":"_size-a_1lqz6_286","size-s":"_size-s_1lqz6_291","size-m":"_size-m_1lqz6_295","size-l":"_size-l_1lqz6_299","size-x":"_size-x_1lqz6_303","size-f":"_size-f_1lqz6_307",active:"_active_1lqz6_356",coincidence:"_coincidence_1lqz6_362",sa:"_sa_1lqz6_398",ss:"_ss_1lqz6_402",sm:"_sm_1lqz6_406",sl:"_sl_1lqz6_410",sx:"_sx_1lqz6_414",sf:"_sf_1lqz6_418",btn:"_btn_1lqz6_424"};function Or({children:e}){return r.jsx("div",{className:te.s,children:e})}function qr({children:e,viev:t="row",className:n}){let a={};return n&&(a.className=n),r.jsx("ul",{className:[te.f,te[t],a.className].join(" "),children:e})}function Rr({children:e}){return r.jsx("div",{className:te.c,children:e})}function Zr({children:e}){return r.jsx("div",{className:te.g,children:e})}const oe={};function Ur(e){return e&&(oe.s=e),oe.s}function Wr(e){return e&&(oe.a=e),oe.a}function Gr(e){return e&&(oe.c=e),oe.c}function Kr(e){return e&&(oe.h=e),oe.h}function Yr(e){return e&&(oe.i=e),oe.i}function Hr(e){return e&&(oe.d=e),oe.d}function Ye(e){return oe.i(e)}let He={};function Jr({children:e}){return r.jsx(r.Fragment,{children:e})}h.Modal=void 0,(e=>{function t(){let[l,_]=m.useState([]);return He.x=d=>{_(d?l.filter(p=>p.key!==d):[])},He.add=(d,p=Date.now())=>{_([...l,{key:p,item:d}])},r.jsx(r.Fragment,{children:l.map(d=>d.item)})}e.Init=t,e.List=Fr,e.Scroll=Or,e.Form=qr,e.Center=Rr,e.Column=Zr;function n(l,_,d){Ye(`${l}/modal/${_}.tsx`).then(p=>{p.default.Open(d)})}e.Open=n;function a({type:l,name:_,params:d}){let[p,f]=m.useState(null);return m.useEffect(()=>{Ye(`${l}/modal/${_}.tsx`).then(g=>{f(g.default.Icon(d))})},[d.id]),r.jsx(r.Fragment,{children:p})}e.Icon=a;function i(l,_){He.add(r.jsx(Jr,{children:l},String(Date.now())),_)}e.Add=i;function o(l){He.x(l)}e.Close=o;function s(l){if(l.target.classList[0]!=="modal")return;let _=l.target.children[0];_.setAttribute("shake",!0),setTimeout(()=>{_.setAttribute("shake",!1)},1e3)}e.Shake=s;function c({title:l,children:_,button:d,tabs:p,size:f="m",className:g="",shake:b=!0,menu:x}){const[v,k]=m.useState(!0),w=m.useRef(),D=T=>{if(d){if(d.onClick)return T(!1),d.onClick({setOpen:k});if(d.onSend)return d.onSend({setOpen:k,disabled:T})}},z=()=>{if(!b)return k(!1);w.current.setAttribute("shake",!0),setTimeout(()=>{w.current.setAttribute("shake",!1)},1e3)};return v?r.jsxs("div",{className:`${te.modal}`,children:[r.jsx("div",{className:te.o,onClick:z}),r.jsxs("div",{className:[te.w,te[`s${f}`],g].join(" "),ref:w,children:[r.jsxs("div",{className:te.h,children:[r.jsx("div",{className:te.t,children:l}),r.jsxs("div",{className:te.m,children:[p&&r.jsx("nav",{children:p.map((T,N)=>r.jsx("span",{onClick:T.onClick,className:T.active?"active":"",children:T.name},N))}),x]}),r.jsx("div",{className:te.x,onClick:()=>{k(!1)},children:r.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:r.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"})})})]}),_,d!==void 0?r.jsx(xn,{label:d.label,onSend:D,className:te.btn}):""]})]}):""}e.Main=c})(h.Modal||(h.Modal={}));let Oe={};const Xr=({content:e,position:t,orientation:n="up",update:a,textAlign:i})=>{const o=m.useRef(null);return m.useEffect(()=>{const s=o.current;s.style.opacity="0",s.style.width="auto",s.style.left="0px",s.style.top="0px";let c={x:0,y:0};const l=s.getBoundingClientRect();let _=t.width/2;s.style.width=l.width+"px";let d=0;switch(n){case"up":d=t.left+_-l.width/2-10,d=window.innerWidth<d+l.width?window.innerWidth-l.width-20:d,d=d<0?0:d,s.style.left=d+"px",s.style.top=t.top-l.height-10+"px",c.x=t.left+_,c.y=t.top-10;break;case"down":d=t.left+_-l.width/2,d=d<0?0:d,s.style.left=d+"px",s.style.top=t.bottom+10+"px";break;case"left":s.style.top=t.top+"px",s.style.left=t.left-l.width-t.width+"px";break;case"right":s.style.top=t.top+"px",s.style.left=t.right+"px";break}s.style.setProperty("--tooltip-arrow-x",c.x+"px"),s.style.setProperty("--tooltip-arrow-y",c.y+"px"),s.style.transition="opacity 0.3s",s.style.textAlign=i,s.style.opacity="1"},[a]),r.jsx("div",{ref:o,className:"tooltip",children:e})};h.Tooltip=void 0,(e=>{e.Init=()=>{let[t,n]=m.useState("");return Oe.set=a=>n(a),Oe.del=()=>n(""),r.jsx(r.Fragment,{children:t})},e.Text=({content:t,children:n,className:a,textAlign:i="center",orientation:o="down",dev:s,...c})=>{const l=d=>{c.element?Oe.set(r.jsx(c.element,{content:t,position:d.currentTarget.getBoundingClientRect(),textAlign:i,update:Date.now()})):Oe.set(r.jsx(Xr,{update:Date.now(),orientation:o,content:t,textAlign:i,position:d.currentTarget.getBoundingClientRect()}))},_=()=>{s||Oe.del()};return r.jsx("span",{className:a,onMouseOver:l,onMouseOut:_,children:n})}})(h.Tooltip||(h.Tooltip={}));const Ie={key:"Y0zt37HgOx-BY7SQjYVmrqhPkO41Ii2Jcb9yydUDPf6",iterations:7,saltLength:16},Je=e=>{let t=0;for(let a=0;a<e.length;a++){const i=e.charCodeAt(a);t=(t<<5)-t+i,t=t&t}t=Math.abs(t);let n="";for(let a=0;a<64;a++){const i=(t^a*197)&255;n+=i.toString(16).padStart(2,"0")}return n},rn=(e,t)=>{let n=e+t;for(let i=0;i<Ie.iterations;i++)n=Je(n);const a=new Uint8Array(32);for(let i=0;i<32;i++)a[i]=parseInt(n.substring(i*2,i*2+2),16);return a},an=(e,t)=>{const n=new Uint8Array(e.length),a=new Uint8Array(e.length);let i=0;for(let o=0;o<e.length;o++){const s=o%t.length;i=t[s]+o+i&255,a[o]=i}for(let o=0;o<e.length;o++)n[o]=e[o]^a[o];return n},Vr=e=>new TextEncoder().encode(e),Qr=e=>new TextDecoder().decode(e),ea=e=>{let t="";for(let a=0;a<e.length;a+=8192){const i=e.slice(a,Math.min(a+8192,e.length));t+=String.fromCharCode.apply(null,Array.from(i))}return btoa(t)},ta=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n},na=e=>{try{const t=Je(Date.now().toString()+Math.random()).substring(0,Ie.saltLength*2),n=Je(e+t).substring(0,8),a=rn(Ie.key,t),i=Vr(e),o=an(i,a),s=ea(o);return`${t}.${s}.${n}`}catch{throw new Error("Не удалось зашифровать данные")}},ra=e=>{try{const t=e.split(".");if(t.length!==3)throw new Error("Неверный формат зашифрованных данных");const n=t[0],a=t[1],i=t[2],o=rn(Ie.key,n),s=ta(a),c=an(s,o),l=Qr(c);if(Je(l+n).substring(0,8)!==i)throw new Error("Контрольная сумма не совпадает");return l}catch{return""}};h.Crypto=void 0,(e=>{e.setKey=t=>{Ie.key=t},e.enCode=t=>{try{const n=JSON.stringify(t);return na(n)}catch{throw new Error("Не удалось зашифровать объект")}},e.deCode=t=>{try{if(!t||t.length<10)return!1;const n=ra(t);return n&&JSON.parse(n)||!1}catch{return!1}},e.setSecurityParams=(t,n)=>{Ie.iterations=t,Ie.saltLength=n}})(h.Crypto||(h.Crypto={}));const O={},A={},he={module:"",page:"Auth",main:"Main"};h.Router=void 0,(e=>{async function t(){let y=sessionStorage.getItem("f");if(y){if(y=await h.Crypto.deCode(y),!y)return!1;A.id=y.id,A.tab=y.tab,A.page=y.page,A.module=y.module,A.time=y.time,A.payment={active:!0},A.module_admin=y.module_admin}else A.id=0,A.tab="",A.page=he.main,A.module=he.module;return!0}e.Load=t;function n(){A.id=0,A.tab="",A.page=he.page,A.module=he.module}e.Reset=n;function a({module:y=he.module,page:C=he.page,main:$=he.main}){he.page=C,he.module=y,he.main=$}e.Default=a;function i(){const[y,C]=m.useState(s()),$=E=>{C(E)};return O.page=$,[y]}e.usePage=i;async function o(y,C=!0){A.page=y,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),C&&O.page(y)}e.setPage=o;function s(){return A.page}e.getPage=s;function c(y){return A.page===y}e.isPage=c;function l(y,C){if(typeof y!="function"){const[$,E]=m.useState(!C),[L,I]=m.useState(y||d());return O.module=I,C&&m.useEffect(()=>{E(!0)},[]),[L,$]}else O.module=y}e.useModule=l;async function _(y,C=!0){A.module=y,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),C&&O.module(y)}e.setModule=_;function d(){return A.module}e.getModule=d;function p(y){return A.module===y}e.isModule=p;function f(y,C){if(typeof y!="function"){const[$,E]=m.useState(y||b()),[L,I]=m.useState(!C);return C&&m.useEffect(()=>{I(!0)},[]),O.tabs=E,[$,L]}else O.tabs=y}e.useTabs=f;async function g(y,C=!0){if(A.tab=y,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),!!C)if(O.tabs)O.tabs(y);else throw new Error("useTabs not found")}e.setTabs=g;function b(){return A.tab}e.getTabs=b;function x(y){return A.tab===y}e.isTabs=x;function v(y){if(typeof y!="function"){const[C,$]=m.useState(y||D()),E=L=>{$(L)};return O.id=E,[C]}else O.id=y}e.useId=v;function k(y){O.id=y}e.subId=k;async function w(y,C=!0){A.id=y,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),C&&O.id(y)}e.setId=w;function D(){return A.id}e.getId=D;function z(y){return Number(A.id)===y}e.isId=z;async function T(y,C,$){A.module=y,A.id=$,A.tab=C,sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A),O.module(y),O.tabs(C)}e.Path=T;async function N(y,C,$,E){var L,I,j;if(A.page===y)if(A.module===C){if(A.tab=$||"",A.id=E||0,A.tab==="")return;(L=O.tabs)==null||L.call(O,$)}else A.module=C,A.tab=$||"",A.id=E||0,(I=O.module)==null||I.call(O,C);else A.module=C,A.tab=$||"",A.id=E||0,A.page=y,(j=O.page)==null||j.call(O,y);sessionStorage.setItem("f",await h.Crypto.enCode(A)),O.dynamicURL&&O.dynamicURL(A)}e.Push=N})(h.Router||(h.Router={}));function aa(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 a in n)t=t.replace(a,n[a]);return t}function ia(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 oa=e=>{function t(D,z){var T,y,N;D=D??"",z=z??1;for(var T=[],N=0,y=D.length;N<y;)T.push(D.slice(N,N+=z));return T}function n(D,z){var T=[2,0,1,1,1,2];return z[D>4&&D<20?2:T[Math.min(D,5)]]}var a={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},i,o,s,c,v,l,_,x,d,p,f,g;d=parseFloat(e).toFixed(2).split("."),l=d[0],c=d[1];var b=12-l.length;if(b<0)return!1;for(var x=[];b--;)x.push("0");l=x.join("")+l;var v=[];if(l>0){p=t(l,3);for(var k=-1;k<p.length;k++)if(_=p[k],_>0&&(f=t(_,1),i=parseInt(f[0]),o=parseInt(f[1]),s=parseInt(f[2]),v.push(a.a100[i-1]),g=k+1==3?"a2":"a1",o>1?v.push(a.a20[o-2]+(s>0?" "+a[g][s-1]:"")):v.push(o>0?a.a10[s]:a[g][s-1]),p.length>k+1)){var w=a["u"+(k+1)];v.push(n(_,w))}}else v.push(a.null);return v.push(n(l,a.ur)),v.push(c+" "+n(c,a.uc)),v.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function sa(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 la(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 da(e,t,n,a){let i={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 s in this.rules)for(var c in this.rules[s])for(var l=0,_=this.rules[s][c].length;l<_;l++)this.rules[s][c][l]=this.rule(this.rules[s][c][l])},rule:function(s){var c=s.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return c?{sex:c[1],test:c[2].split(","),mods:[c[3],c[4],c[5],c[6],c[7]]}:!1},word:function(s,c,l,_){if(_===this.gcaseNom)return s;if(s.match(/[-]/)){for(var d=s.split("-"),p=0,f=d.length;p<f;p++)d[p]=this.word(d[p],c,l,_);return d.join("-")}if(s.match(/^[А-ЯЁ]\.?$/i))return s;this.init();var g=this.rules[l];let b;return g.exceptions&&(b=this.pick(s,c,_,g.exceptions,!0),b)?b:(b=this.pick(s,c,_,g.suffixes,!1),b||s)},pick:function(s,c,l,_,d){let p=s.toLowerCase();for(var f=0,g=_.length;f<g;f++)if(this.ruleMatch(p,c,_[f],d))return this.applyMod(s,l,_[f]);return!1},ruleMatch:function(s,c,l,_){if(l.sex===this.sexM&&c===this.sexF||l.sex===this.sexF&&c!==this.sexF)return!1;for(var d=0,p=l.test.length;d<p;d++){var f=_?s:s.substr(Math.max(s.length-l.test[d].length,0));if(f===l.test[d])return!0}return!1},applyMod:function(s,c,l){let _;switch(c){case this.gcaseNom:_=".";break;case this.gcaseGen:_=l.mods[0];break;case this.gcaseDat:_=l.mods[1];break;case this.gcaseAcc:_=l.mods[2];break;case this.gcaseIns:_=l.mods[3];break;case this.gcasePos:_=l.mods[4];break}for(var d=0,p=_.length;d<p;d++){var f=_.substr(d,1);switch(f){case".":break;case"-":s=s.substr(0,s.length-1);break;default:s+=f}}return s},getSex:()=>{if(i.mn.length>2)switch(i.mn.substr(i.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:s=>((i.fullNameSurnameLast?"":i.lastName(s)+" ")+i.firstName(s)+" "+i.middleName(s)+(i.fullNameSurnameLast?" "+i.lastName(s):"")).replace(/^ +| +$/g,""),lastName:s=>i.word(i.ln,i.sex,"lastName",s),firstName:s=>i.word(i.fn,i.sex,"firstName",s),middleName:s=>i.word(i.mn,i.sex,"middleName",s)};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],i.fullNameSurnameLast=!0):(e=o[1],t=o[3],n=o[5])}return i.ln=e,i.fn=t||"",i.mn=n||"",i.sex=a||i.getSex(),i}function ca(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 _a(e){return e=typeof e=="number"?e:new Date(e).getMonth()+1,{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 ua(e,t){return t&&(e=Number(e)/t),parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function fa(e,t){let n=t+"";for(;n.length<e;)n="0"+n;return n}function ma(e,t){let n=2;t.forEach(a=>{if(e>=a.value)return e=e/a.value,n=a.precision,e.toFixed(n)+" "+a.label})}ma(12345,[{label:"мм",value:0},{label:"см",value:10},{label:"м",value:1e3}]);function pa(e,t,n){let a=t/e*n;return(typeof a!="number"||a===1/0)&&(a=0),parseFloat(a).toFixed(1)}function ha(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ga(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 on={},sn={},le={},ge={},Te={};let ke="",fe={};function xa(e,t){const[n,a]=m.useState(!1);return m.useEffect(()=>{let i=localStorage.getItem("d");i?(async()=>{let o=await h.Router.Load();if(o)return a(!0);t==null||t(o),t&&alert("Router.Load Error"),ne()})():(t==null||t(i),t&&alert("No SSID"),["a","b","c","d","e","m","u","s","p","q","w"].forEach(o=>localStorage.removeItem(o)),["f"].forEach(o=>sessionStorage.removeItem(o)),h.Router.Reset(),a(!0))},[]),n?e:""}function ne(){["a","b","c","d","e","m","u","s","q","p","t","w"].forEach(e=>localStorage.removeItem(e)),["f"].forEach(e=>sessionStorage.removeItem(e)),window.history.pushState({},"","/"),window.location.reload()}function ba(e){return localStorage.setItem("d",e)}function va(){let e=localStorage.getItem("d");return e!==""&&e!=="undefined"&&e!==null?e:""}function ya(e){return localStorage.setItem("a",e)}function wa(){let e=localStorage.getItem("a");return e!==""&&e!=="undefined"&&e!==null?e:""}async function ka(e){localStorage.setItem("p",await h.Crypto.enCode(e))}function Ca(){let e=localStorage.getItem("p");if(e!==""&&e!=="undefined"&&e!==null){let t=h.Crypto.deCode(e);return t||ne(),t}else return ne(),!1}function ja(e,t){on.data[e]=t,localStorage.setItem("s",h.Crypto.enCode(on.data))}function Sa(e){let t=localStorage.getItem("s");return t===null?{}:(t=h.Crypto.deCode(t),t?e!==void 0?t[e]:t:ne())}async function Ea(e){localStorage.setItem("m",await h.Crypto.enCode({data:e}))}function Ia(){let e=localStorage.getItem("m");if(e!==""&&e!=="undefined"&&e!==null){let t=localStorage.getItem("m");if(t===null)return!1;let n=h.Crypto.deCode(t);n||ne();const a=(o,s)=>{let c=s+"";for(;c.length<o;)c="0"+c;return c};return n.data.split(",").map(o=>"M"+a(2,o))}else return ne(),!1}function Da(e){}function ln(e){let t=localStorage.getItem("b");t=t===null?{}:h.Crypto.deCode(t),t[h.Router.getTabs()]=e,localStorage.setItem("b",h.Crypto.enCode(t))}function dt(){let e=localStorage.getItem("b");return e===null?{}:(e=h.Crypto.deCode(e),e=e[h.Router.getTabs()],e=e===void 0?{active:1,sort:"<"}:e,e)}function Na(e){localStorage.setItem("c",h.Crypto.enCode(e))}function dn(e,t){var a;let n=localStorage.getItem("c");if(n!==""&&n!=="undefined"&&n!==null){let i=h.Crypto.deCode(n);return i||ne(),e===void 0?i:t?(a=i[e][t])==null?void 0:a.n:i[e]}else return ne(),!1}function Ta(e){ge.data=e,localStorage.setItem("q",h.Crypto.enCode(ge.data))}function za(e,t){ge.data={...ge.data,[e]:t},localStorage.setItem("q",h.Crypto.enCode(ge.data))}function qe(e,t){if(!ge.data){let n=localStorage.getItem("q");n&&(ge.data=h.Crypto.deCode(n))}return e===void 0&&t===void 0?ge.data:e!==void 0&&t===void 0?ge.data[e]:ge.data[e][t]}function Ba(e){sn.data=e}function La(e){return sn.data[e]}function Ma(e){}function $a(){}async function Pa(){if(Te.data)return Te.data;let e=localStorage.getItem("u");if(e!==""&&e!=="undefined"&&e!==null){let t=await h.Crypto.deCode(e);return t||ne(),Te.data=t,t}else return ne(),!1}function Aa(){let e=localStorage.getItem("u");return e!==""&&e!=="undefined"&&e!==null?h.Crypto.deCode(e):!1}function Fa(e){Te.data=e,localStorage.setItem("u",h.Crypto.enCode(e))}function Oa(e){return e?Te.data[e]:Te.data||{}}function qa(){let e=localStorage.getItem("e");if(e!==""&&e!=="undefined"&&e!==null)try{let t=h.Crypto.deCode(e);return t||ne(),t}catch{return{}}else return{}}function Ra(e){const t=async n=>{let a=localStorage.getItem(n);if(a!==""&&a!=="undefined"&&a!==null)try{let i=await h.Crypto.deCode(a);if(!i)return;fe[n]={is:!0,time:i.time,data:i.data}}catch{fe[n]={is:!1,time:0,data:{}}}else fe[n]={is:!1,time:0,data:{}}};e.forEach(n=>t(n))}function Za(e){return fe[e]===void 0?(fe[e]={data:{},time:0},{data:{},time:0}):fe[e]}function Ua(e,t){fe[e]={data:t.data,time:t.time},localStorage.setItem(e,h.Crypto.enCode(fe[e]))}function Wa(e,t){le[e]=t,localStorage.setItem("t",h.Crypto.enCode(le))}function Ga(e){if(Object.keys(le).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let n=h.Crypto.deCode(t);return n||ne(),Object.keys(n).forEach(a=>{le[a]=n[a]}),e?le[e]:le}else return ne(),{}}else return e?le[e]:le}function Ka(e){if(Object.keys(le).length===0){let t=localStorage.getItem("t");if(t!==""&&t!=="undefined"&&t!==null){let n=h.Crypto.deCode(t);return n?(Object.keys(n).forEach(a=>{le[a]=n[a]}),!!le[e]):!1}else return!1}else return!!le[e]}async function Ya(e,t,n){fe[e].time=n,fe[e].data[t.item][t.name]=t.value,localStorage.setItem(e,await h.Crypto.enCode(fe[e]))}function Ha(){var n;let t=(n=new URLSearchParams(window.location.search.substring(1)).get("devmod"))==null?void 0:n.trim();if(t)try{return JSON.parse(t||"{}")}catch{return h.Notice.Error("Error parse devMod"),{}}}function cn(){return ke===""?(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!=-1?(ke="Opera","Opera"):navigator.userAgent.indexOf("Edg")!=-1?(ke="Edg","Edg"):navigator.userAgent.indexOf("Chrome")!=-1?(ke="Chrome","Chrome"):navigator.userAgent.indexOf("Safari")!=-1?(ke="Safari","Safari"):navigator.userAgent.indexOf("Firefox")!=-1?(ke="Firefox","Firefox"):(ke="unknown","unknown"):ke}function Ja(e){return cn()===e}function Xa(e,t,n){return qe(e,t)?qe(e,t).n:n||""}function Va(e,t,n,a){return qe(e,t)?qe(e,t)[n]:a||""}function Qa(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)})}function ei(e,t){return t&&(e=e===0?7:e),{1:{name:"Понедельник",names:"Понедельника",abc:"пн"},2:{name:"Вторник",names:"Вторника",abc:"вт"},3:{name:"Среда",names:"Среды",abc:"ср"},4:{name:"Четверг",names:"Четверга",abc:"чт"},5:{name:"Пятница",names:"Пятницы",abc:"пт"},6:{name:"Суббота",names:"Субботы",abc:"сб"},7:{name:"Воскресенье",names:"Воскресенья",abc:"вс"}}[e]}function ti(e,t){return e.reduce(function(n,a){let i=t instanceof Function?t(a):a[t];return n[i]!==void 0||(n[i]={}),n[i][a.id]=a,n},{})}function ni(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}function ri(e){return["number","string"].includes(typeof e)?!isNaN(Number(e))&&!isNaN(parseFloat(e)):!1}function ai(e){var t="",n={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ь:"",ы:"y",ъ:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"E",Ж:"Zh",З:"Z",И:"I",Й:"Y",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"H",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sch",Ь:"",Ы:"Y",Ъ:"",Э:"E",Ю:"Yu",Я:"Ya"};for(let a=0;a<e.length;++a)n[e[a]]==null?t+=e[a]:t+=n[e[a]];return t}function ii(e,t,n=!1){return n?e.sort((a,i)=>i[t]-a[t]):e.sort((a,i)=>a[t]-i[t])}function oi(e,t){return e.reduce(function(n,a){let i=t instanceof Function?t(a):a[t];return n[i]!==void 0||(n[i]={}),n[i][a.id]=a,n},{})}function si(e,t,n=!1){return n?e.sort((a,i)=>new Date(i[t]).getTime()-new Date(a[t]).getTime()):e.sort((a,i)=>new Date(a[t]).getTime()-new Date(i[t]).getTime())}function li(e,t){return e.reduce((n,a)=>n+(a[t]||0),0)}function di(e,t,n,a=!1){return a?e.sort((i,o)=>n(o[t])-n(i[t])):e.sort((i,o)=>n(i[t])-n(o[t]))}function ci(e){return{style:{background:`var(--color-${e})`}}}const G={Age:ni,ArraySort:ii,ArrayGroup:oi,ArraySortDate:si,ArraySortFunction:di,ArraySumma:li,Translit:ai,Date:aa,ColorBackground:ci,MoneyString:oa,DateSort:ia,UUID:Qa,Size:sa,TypeFiles:la,Cases:da,Initials:ca,Month:_a,Money:ua,Number:fa,Percent:pa,CapitalizeFirstLetter:ha,DeclensionWord:ga,Select:Xa,SelectParams:Va,ObjectByArray:ti,isNumeric:ri,Week:ei,set:(e,t)=>{G[e]=t}},_i={Counter:({before:e,from:t=0,to:n,secund:a=3})=>{const i=m.useRef();return m.useEffect(()=>{i.s=!0;const o=1e3,s=n/(a*10);i.n=0;let c=o/(n/s),l=e?e+" ":"";return i.i=setInterval(()=>{if(!i.s)return i.current.textContent=`${l}`+G.Money(n),clearInterval(i.i);if(n===0)return i.current.textContent=`${l}`+G.Money(n),clearInterval(i.i);i.n=i.n+s,i.n>n&&i.n>=n&&(i.n=n,clearInterval(i.i)),i.current&&(i.current.textContent=`${l}`+G.Money(i.n))},c),()=>{i.s=!1,clearInterval(i.i)}},[t,n]),r.jsx("span",{ref:i})}},ye={setSSID:ba,getSSID:va,getPORT:Ca,setPORT:ka,setAUTH:ya,getAUTH:wa,Logaut:ne,setMenu:Ea,getMenu:Ia,useSort:Da,setSort:ln,getSort:dt,setCompany:Na,getCompany:dn,setSelect:Ta,addSelect:za,getSelect:qe,setApi:Ba,getApi:La,setPayment:Ma,getPayment:$a,setUser:Fa,isUser:Aa,initUser:Pa,getUser:Oa,getBase:Za,setBase:Ua,isData:Ka,setData:Wa,getData:Ga,editBase:Ya,loadBase:Ra,devMod:Ha,isBrowser:Ja,getBrowser:cn},re={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"},_n=({title:e,left:t,right:n,children:a})=>r.jsxs("div",{className:re.h,children:[r.jsx("div",{className:re.t,children:e}),t&&r.jsx("div",{className:re.hl,children:t}),n&&r.jsx("div",{className:re.hr,children:n}),a]}),un=({children:e,...t})=>r.jsx("div",{className:re.l,children:e}),fn=({children:e})=>r.jsx("div",{className:re.s,children:e}),mn=({children:e,edit:t})=>{const n={};return t&&(n.edit=""),r.jsx("div",{...n,className:re.f,children:e})};function pn({children:e}){return r.jsx("div",{className:re.g,children:e})}const ui=({children:e,className:t,title:n})=>r.jsxs("div",{className:[re.o,t].join(" "),children:[n&&r.jsx("div",{className:re.hh,children:n}),e]}),fi=({children:e})=>r.jsx("div",{className:re.u,children:e}),mi=({children:e})=>r.jsx("div",{className:re.c,children:e}),pi=({children:e})=>r.jsx("div",{className:re.m,children:e}),hi=h.Alert,ct={Header:_n,Section:fn,Group:pn,Form:mn,List:un,A:hi,U:fi,G:pn,C:mi,L:un,O:ui,S:fn,H:_n,M:pi,F:mn},gi=(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}},xi=()=>({load:!0,list:[],name:"Файлы",add:!1,search:!1,revers:!0}),bi=()=>{let[e,t]=m.useState([]);return r.jsx(r.Fragment,{children:e.length!==0?r.jsxs("div",{className:"upload view",children:[r.jsxs("div",{className:"--head",children:[r.jsx("b",{children:"Загрузки"}),r.jsx("i",{className:"x",onClick:()=>t([]),"data-icon":"F038"})]}),r.jsx("div",{className:"--list",children:e.map(n=>n)})]}):""})},vi=({id:e,name:t,listen:n,dir:a})=>{t=t||"Файлы";const[i,o]=m.useReducer(gi,{},xi),s=()=>{h.Modal.Add(r.jsx(yi,{dir:a,dispatch:o,id:e},new Date().getTime()))};return m.useEffect(()=>{},[e,a]),r.jsxs(ct.O,{children:[" ",r.jsx(ct.H,{title:t,right:r.jsx("i",{className:"f025","data-icon":"C005 25 pointer","data-color":"_b5b9cc :506290",onClick:s}),left:r.jsx("i",{className:"f025","data-icon":"E009 25","data-color":"_2196f3"})}),r.jsx("ul",{"data-empty":"Файлов нет",className:"files_list",children:i.load?r.jsxs("div",{"type-load":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]}):i.list.length===0?r.jsx(r.Fragment,{}):i.list.map((c,l)=>r.jsx(wi,{dispatch:o,data:c},l))})]})},yi=({id:e,dir:t,dispatch:n})=>{let[a,i]=m.useState(!0),o=m.useRef(null),s=_=>{_.preventDefault(),_.stopPropagation()},c=_=>{},l=_=>{};return m.useEffect(()=>{let _=o.current;["dragenter","dragover","dragleave","drop"].forEach(d=>{_.addEventListener(d,s,!1),document.body.addEventListener(d,s,!1)}),["dragenter","dragover"].forEach(d=>{_.addEventListener(d,c,!1)}),["dragleave","drop"].forEach(d=>{_.addEventListener(d,l,!1)})},[]),r.jsx(r.Fragment,{children:a?r.jsx(r.Fragment,{children:r.jsx("div",{className:"modal o ",onClick:h.Modal.Shake,children:r.jsxs("div",{className:"b",children:[r.jsx("div",{className:"h",children:"Загрузка файлов"}),r.jsx("div",{className:"x","data-icon":"F038",onClick:()=>{i(!1)}}),r.jsxs("div",{className:"upload",ref:o,children:[r.jsx("input",{type:"file",id:"fileElem",name:"files",multiple:!0}),r.jsx("dd",{}),r.jsx("i",{"data-icon":"F061"})]})]})},new Date().getTime())}):""})},wi=({data:e,dispatch:t})=>{let n=async()=>{let o=await(await fetch(h.Api.url().files+"/yandex/data/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ye.getSSID()||""}})).blob();if(o.size!==2){let s=new Blob([o],{type:o.type});s=URL.createObjectURL(s);let c=document.createElement("a");c.setAttribute("href",s),c.setAttribute("download",e.name),c.click()}},a=async()=>{(await(await fetch(h.Api.url().files+"/yandex/delete/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ye.getSSID()||""}})).json()).status==="success"&&(t({type:"delete",id:e.id}),h.Notice.Send({type:"success",text:"Файл успешно удалён"}))};return r.jsxs("li",{children:[r.jsx("div",{className:"f035",children:G.TypeFiles(e.type)}),r.jsx("div",{className:"f100",children:G.Date(e.uDate,"dd.mm.yy")}),r.jsx("div",{className:"f000",children:e.name}),r.jsxs("div",{className:"f050 flex button",children:[r.jsx("i",{className:"f025","data-icon":"F060 35 pointer","data-color":"_b5b9cc :4CAF50",onClick:n}),r.jsx("i",{className:"f025","data-icon":"F048 35 pointer","data-color":"_b5b9cc :FF9800",onClick:a})]}),r.jsx("div",{className:"f080",children:G.Size(e.size)})]})};let ae={};ae.list=qa(),ae.active=null;const ki=()=>{var i;let[e,t]=m.useState([]),[n,a]=m.useState();return m.useEffect(()=>{(async()=>{let o=Object.keys(ae.list);if(o.length!==0){let s=[];o.forEach((c,l)=>{s.push({item:r.jsx(_t,{data:ae.list[c]},ae.list[c].id),link:ae.list[c].link})}),t(s)}})()},[]),ae.active=o=>{var s;a(o),(s=document.querySelector("app-body"))==null||s.setAttribute("bookmarks",o===1?"bottom":"")},ae.set=o=>{t([...e,{item:r.jsx(_t,{data:o},o.id),link:o.link}])},ae.del=o=>{e.forEach((s,c)=>{s.link===o&&e.splice(c,1)}),t([...e])},(i=document.querySelector("app-body"))==null||i.setAttribute("bookmarks",n===1&&e.length!==0?"bottom":""),n!==0?r.jsx(r.Fragment,{children:e.length!==0?r.jsx("div",{className:"bookmarks",children:e.map(o=>o.item)}):""}):""},Ci=({id:e,type:t,name:n})=>{let a=t+"-"+e,[i,o]=m.useState(ae.list[a]!==void 0);return m.useEffect(()=>{o(ae.list[a]!==void 0)},[a]),r.jsx(r.Fragment,{children:""})},_t=({data:e})=>{let t=a=>{a.preventDefault(),delete ae.list[e.link],ae.del(e.link)},n=()=>{h.Router.setId(e.id)};return r.jsx("span",{onContextMenu:t,onClick:n,children:e.name})},ji=e=>{ae.active(e)},H={},ut={},P={};P.config={iceServers:[{url:"stun:stun.l.google.com:19302"}]},P.constraints={optional:[{DtlsSrtpKeyAgreement:!0}]},P.other=[],P.users={},P.asset=0,P.remoute=!1,P.stream=null,P.user=0,P.connect=!1,P.offer=null,P.btnRefuse=null,P.time=!1;let De;De=document.createElement("audio"),De.setAttribute("autoplay","true"),De.setAttribute("muted","true"),H.start=async e=>{P.rtc=new RTCPeerConnection(P.config),P.other=[],P.remoute=!1,P.rtc.onicecandidate=n=>{n.candidate&&P.other.push(n.candidate)},P.rtc.ontrack=n=>{if(n.streams&&n.streams[0])De.srcObject=n.streams[0];else{let a=new MediaStream(n.track);De.srcObject=a}};const t=await navigator.mediaDevices.getUserMedia({video:!1,audio:{echoCancellation:!1,autoGainControl:!0}});t.getTracks().forEach(n=>{P.rtc.addTrack(n,t)}),P.rtc.onconnectionstatechange=()=>{P.rtc.connectionState},P.rtc.ontrack=async n=>{if(n.streams&&n.streams[0])De.srcObject=n.streams[0];else{let a=new MediaStream(n.track);De.srcObject=a}},P.rtc.onaddstream=n=>{},P.rtc.onnegotiationneeded=n=>{},P.rtc.oniceconnectionstatechange=n=>{},P.rtc.onsignalingstatechange=n=>{},P.rtc.onicegatheringstatechange=n=>{},P.rtc.onicecandidateerror=n=>{},P.rtc.ondatachannel=n=>{},P.rtc.onerror=n=>{},e()},H.useListener=e=>{ut.rtc=e},H.setListener=e=>{ut.rtc&&ut.rtc(e)},H.callTo=async e=>{H.start(async()=>{const t=await P.rtc.createOffer();await P.rtc.setLocalDescription(t),P.uid=e})},H.callIn=async e=>{P.asset=e.id,P.offer=e.offer,P.uid=e.id},H.callRise=async()=>{H.start(async()=>{P.rtc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(P.offer))));const e=await P.rtc.createAnswer();await P.rtc.setLocalDescription(e)})},H.callOk=async e=>{P.asset=e.id;const t=new RTCSessionDescription(JSON.parse(atob(e.answer)));await P.rtc.setRemoteDescription(t)},H.IceCandidate=async e=>{e.candidate.forEach(t=>{P.rtc.addIceCandidate(new RTCIceCandidate(t))})},H.callFrom=async()=>{},H.callNo=()=>{P.asset=0,P.time=!1,P.rtc&&P.rtc.close(),H.setListener({type:"state",data:"closed"})},H.callOf=()=>{P.asset=0,P.time=!1,P.rtc.close()},H.callRefuser=async()=>{P.asset=0,P.time=!1,P.rtc&&P.rtc.close()},H.Run=async e=>{H[e.data.type]&&H[e.data.type](e.data)};let Re={};function Si(){let[e,t]=m.useState([]),n=m.useRef(null);return m.useEffect(()=>{},[]),Re.set=a=>{t([...e,a])},Re.del=()=>{t([])},Re.audio=(a,i)=>{n.current.volume=.5,n.current.loop=i,n.current.src="/audio/"+a,n.current.muted=!1},r.jsxs(r.Fragment,{children:[e.map(a=>a.item),r.jsx("audio",{id:"audio",ref:n,autoPlay:!0,muted:!0})]})}function Ei(e,t){let n=new Date().getTime();Re.set({item:r.jsx(Ii,{type:t,id:e},n),key:n})}function Ii({id:e,type:t}){const[n,a]=m.useState({}),[i,o]=m.useState(t);m.useEffect(()=>{a(ye.getSelect("user")[e])},[]),H.useListener(l=>{switch(l.type){case"state":o(l.data)}});const s=()=>{switch(i){case"out":return r.jsx("span",{onClick:()=>{H.callTo(n.id),o("call")},children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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 r.jsxs(r.Fragment,{children:[r.jsx("span",{onClick:c,children:r.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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"})})}),r.jsx("span",{onClick:H.callRise,children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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 r.jsx("span",{onClick:()=>H.callNo(n.id),children:r.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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 r.jsx("span",{onClick:()=>{H.callTo(n.id),o("call")},children:r.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:r.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"})})})}},c=()=>{H.callRefuser(n.id),Re.del()};return r.jsx("div",{className:"web-phone white",children:r.jsxs("div",{className:"w",children:[r.jsx("div",{className:"x","data-icon":"F038",onClick:c}),r.jsx("div",{className:"a"}),r.jsx("div",{className:"n",children:n.name}),r.jsx("div",{className:"b",children:s()})]})})}const ft={};function Di(e){ft.add(e)}function Ni({color:e,size:t,name:n}){return r.jsx("svg",{width:t,height:t,color:e,children:r.jsx("use",{href:`#${n}`})})}function Ti(){let[e,t]=m.useState([]);if(ft.x=()=>{t([])},ft.add=a=>{t(a)},e.length===0)return"";const n={sprite:""};return r.jsx("svg",{...n,xmlns:"http://www.w3.org/2000/svg",children:e.map((a,i)=>r.jsx("symbol",{id:a.name,viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:r.jsx(a.path,{})},i))})}let Xe={},mt={},pt="ru";const zi=(e,t)=>{mt=e,t?pt=t:pt=Object.keys(e)[0]},hn=m.createContext(localStorage.getItem("lang")||navigator.language),Bi=({children:e})=>{const[t,n]=m.useState(localStorage.getItem("lang")||navigator.language);return Xe.update=n,r.jsx(hn.Provider,{value:mt[t]||mt[pt],children:e})},Li=e=>{var t;localStorage.setItem("lang",e),(t=Xe.update)==null||t.call(Xe,e)},Mi=()=>m.useContext(hn),$i=()=>localStorage.getItem("lang")||navigator.language;m.createContext({tab:"",setTabs:e=>{}});const ht={};function gt(e,t){ht[e]=t}function Pi(e,t){ht[e]!==void 0&&ht[e](t)}const Ce={};function Ai(e,t){const[n,a]=m.useState(t);return m.useEffect(()=>{if(Ce[e])return Ce[e].push(a);Ce[e]=[a]},[]),[n]}function Fi(e,t){if(Ce[e])return Ce[e].push(t);Ce[e]=[t]}function Oi(e,t){Ce[e]&&Ce[e].forEach(n=>n(t))}const de={setListener:Pi,useListener:gt,setEmitter:Oi,useEmitter:Ai,subEmitter:Fi};function qi(){let[e,t]=m.useState([]);return de.useListener("form",n=>{t([n])}),r.jsx(r.Fragment,{children:e.map(n=>n)})}const gn=({children:e,lang:t,log:n})=>xa(r.jsxs(Bi,{children:[r.jsx(h.Modal.Init,{}),r.jsx(h.Notice.Init,{}),r.jsx(h.Alert.Init,{}),r.jsx(h.Tooltip.Init,{}),r.jsx(bi,{}),r.jsx(Ti,{}),r.jsx(qi,{}),r.jsx(Si,{}),r.jsx(ki,{}),e]}),n),Ri=({children:e,...t})=>r.jsx("menu",{children:e}),Zi=({children:e,...t})=>r.jsxs("header",{children:["xz",e]}),Ui={payment:"_payment_1lxfv_1"};function Wi(){let[e,t]=m.useState({});return!e.active&&!e.payment?"":r.jsx("div",{className:Ui.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const Gi=({children:e,...t})=>r.jsxs("div",{className:"app",children:[r.jsx(Wi,{}),r.jsx(Ri,{}),r.jsx(Zi,{}),r.jsx(gn,{}),e]}),Ve={btn:"_btn_294gf_1",confirm:"_confirm_294gf_15",cancel:"_cancel_294gf_20",action:"_action_294gf_25",disabled:"_disabled_294gf_30",await:"_await_294gf_37",m:"_m_294gf_44",l:"_l_294gf_48"},xn=({onClick:e,onSend:t,size:n="m",view:a="confirm",mode:i="primary",children:o,isDisabled:s=!1,className:c,after:l,before:_,label:d,onRef:p,awaitText:f="Ожидайте"})=>{let[g,b]=m.useState(!1);const x=k=>{if(e)return e();g||(t?(b(!0),t(b)):k.preventDefault())};let v={};return(s||g)&&(v.disabled=!0),r.jsx("button",{...v,ref:p,className:[Ve.btn,g?Ve.disabled:Ve[a],n&&Ve[n],c].join(" "),onClick:x,children:g?f:r.jsxs(r.Fragment,{children:[_||""," ",d," ",l||""]})||o})},Ki=({list:e,onClick:t,active:n,size:a,view:i})=>r.jsx("nav",{children:r.jsx("ul",{className:[a,i].join(" "),children:e.map(o=>r.jsx(Yi,{onClick:t,active:n,label:o.label,link:o.link},o.link))})}),Yi=({onClick:e,label:t,link:n,active:a})=>r.jsx("li",{"tabs-active":String(a===n),onClick:()=>e(n),children:t}),bn={tabs:"_tabs_1i88v_1",tab:"_tab_1i88v_1"},vn=({list:e=[],active:t,onTab:n})=>{const a=i=>{if(n)return n(i);h.Router.setTabs(i)};return r.jsx("nav",{className:[bn.tabs,"tabs"].join(" "),children:e.map(i=>m.createElement("div",{onClick:()=>a(i.id),active:(t===i.id).toString(),className:bn.tab,key:i.id},i.label,i.badge?r.jsx("em",{children:i.badge}):""))})},Hi=({list:e=[],active:t,onChange:n,className:a,after:i})=>{const[o,s]=m.useState(t);return r.jsxs("div",{className:["tabs-button",a].join(" "),children:[r.jsx("ul",{children:e.map(c=>r.jsx(Ji,{data:c,light:c.light,setTabs:s,active:c.id===o,onChange:n},c.id))}),i]})},Ji=({data:e,light:t,active:n,setTabs:a,onChange:i})=>{const o=()=>{e.disabled||(i&&i(e.id),a(e.id))};return r.jsxs("li",{onClick:o,className:e.disabled?"disabled":n?"active":"",children:[r.jsxs("p",{children:[e.before,e.name]}),t&&r.jsx("em",{})]})},Xi={List:Ki,Lite:vn,Button:Hi},Vi=({title:e="",button:t,description:n="",children:a})=>r.jsxs("fieldset",{children:[e&&r.jsxs("legend",{children:[e,t&&r.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),r.jsx("ul",{children:a}),n&&r.jsx("article",{children:n})]}),Qi={setting:"_setting_dva4m_2"},eo=({children:e})=>r.jsx("div",{className:Qi.setting,children:e}),to=({label:e,children:t})=>{let[n,a]=m.useState(!1);return r.jsxs("li",{"data-item":"accordion",children:[r.jsxs("dl",{onClick:()=>a(!n),children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:r.jsx("div",{"data-close":String(n)})})]}),n&&r.jsx("div",{children:t})]})},no=({label:e,onClick:t,button:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"button",onClick:()=>t(),children:n})]})}),yn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,r.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},ro={Accordion:to,Button:no,Switch:({label:e,onClick:t,active:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:r.jsx(yn.Switch,{onClick:t,active:n})})]})}),Info:({label:e,info:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:n})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>r.jsx("li",{children:r.jsxs("dl",{children:[r.jsx("dt",{children:e}),r.jsx("dd",{children:t})]})})};function wn({list:e,onClick:t,active:n,size:a,view:i}){return r.jsx("nav",{children:r.jsx("ul",{className:[a,i].join(" "),children:e.map(o=>r.jsx(ao,{onClick:t,active:n,label:o.label,link:o.link},o.link))})})}const ao=({onClick:e,label:t,link:n,active:a})=>r.jsx("li",{"tabs-active":String(a===n),onClick:()=>e(n),children:t});wn.defaultProps={size:"M",view:"H"};const io={Section:Vi,Main:eo,Item:ro,Tabs:wn};function oo({value:e,background:t,gradient:n}){let a=835.24,i=a-e/100*a;const o=m.useId();return r.jsxs("svg",{viewBox:"0 0 275 275",xmlns:"http://www.w3.org/2000/svg",style:{borderRadius:"50%",background:t},children:[n&&r.jsx("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:n.map((s,c)=>r.jsx("stop",{offset:s[0],stopColor:s[1]},c))}),r.jsx("circle",{strokeWidth:"10",fill:"transparent",r:"133",cx:"137.5",cy:"137.5",stroke:`url(#${o})`,strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:i,transform:"rotate(-90 137.5 137.5)"})]})}const so={Circle:oo},lo={Icon:Ci,Item:_t,Active:ji};function co(){return r.jsx("svg",{viewBox:"0 0 462.86 359.96",children:r.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 _o={i:"_i_it11s_1"};let kn="/assets/";function uo(e){kn=e}function fo({name:e,size:t="16px",onClick:n,hover:a,origin:i=!1,className:o}){const s={[i?"backgroundImage":"WebkitMaskImage"]:`url(${kn}${e}.svg)`,"--size":t},c={};return o&&(c.className=o),n&&(c.onClick=n,c.pointer=""),a&&(c.hover=a),r.jsx("i",{role:"icon",style:s,className:[_o.i,`icon-${e}`].join(" "),...c})}let xt={};function mo(e){xt={...xt,...e}}function Cn(){return xt}function po({name:e,hover:t,onClick:n,className:a}){const i={};return n&&(i.onClick=n,i.pointer=""),t&&(i.hover=t),a&&(i.className=a),Cn()[e]?r.jsx("i",{role:"icon",...i,children:Cn()[e]()}):""}const ho={Logo:co,Sprite:Di,set:mo,Symbol:Ni,Default:po,Assets:fo};let jn={};jn.setAttribute=(e,t)=>{const n=document.getElementById("root");n.dataset[e]=t};function go({items:e,list:t,icons:n,isSetting:a=!0}){const i=()=>{h.Alert.Send({title:"Выйти",text:"Вы уверене что хотиет выйти"},()=>{ye.Logaut()})};return r.jsxs("menu",{children:[r.jsx("ul",{children:t.map(o=>r.jsx(xo,{items:e,i:o,icons:n},o))}),r.jsx("em",{}),r.jsxs("ul",{children:[r.jsx(bo,{icons:n}),a&&r.jsxs("li",{className:h.Router.isModule("Settings")?"active":"",onClick:()=>h.Router.setModule("Settings"),children:[r.jsx(n.Icons,{name:"s040"}),r.jsx("span",{children:"Настройки"})]}),r.jsxs("li",{onClick:i,children:[r.jsx(n.Icons,{name:"s044"}),r.jsx("span",{children:"Выход"})]})]})]})}const xo=({items:e,i:t,icons:n})=>t[0]==="#"?r.jsx("b",{children:t.slice(1)}):r.jsxs("li",{className:h.Router.isModule(e[t].link)?"active":"",onClick:()=>{h.Router.setTabs(e[t].temp,!1),h.Router.setModule(e[t].link)},children:[r.jsx(n.Icons,{name:e[t].icon}),r.jsx("span",{children:e[t].name})]}),bo=({icons:e})=>{const[t,n]=m.useState(!1),a=m.useRef(null),i=async()=>{a.current&&(await a.current.prompt(),n(!1))};return m.useEffect(()=>{window.addEventListener("appinstalled",o=>{}),window.addEventListener("beforeinstallprompt",async o=>{o.preventDefault(),a.current=o,n(!0)})},[]),t?r.jsxs("li",{onClick:i,children:[r.jsx(e.Icons,{name:"install"}),r.jsx("span",{children:"Установить как приложение"})]}):""};function Sn({path:e,query:t,button:n,emptyList:a="Список пуст",searchParams:i=["p01","p02","p03"],...o}){const[s,c]=m.useState([]),[l,_]=m.useState([]),[d,p]=m.useState(!1),f=async()=>{let g=await h.Api.fetch(e,t);g.data&&g.data.length>0&&(c(g.data),_(g.data)),p(!0)};return de.useListener("list_children",g=>{if(g.action==="edit"){let b=l.map(x=>x.id===g.id?Object.assign(x,{[g.name]:g.value}):x);c(b),_(b)}if(g.action==="delete"){let b=l.filter(x=>x.id!==g.id);c(b),_(b)}}),de.useListener("search",g=>{c(l.filter(b=>(""+i.map(v=>b[v]).toString()).toLowerCase().includes(g.toLowerCase())))}),m.useEffect(()=>{f(),n&&de.setListener("button",n)},[]),d&&s.length===0?r.jsx("ul",{className:"list-body",children:a}):r.jsx("ul",{className:"list-body",children:s.map((g,b)=>r.jsx(o.item,{data:g,count:b+1},g.id))})}const vo={Menu:go,List:Sn},yo={sort:"_sort_1yrvt_1"};let Qe={};function wo(e,t){switch(t.type){case"active":let n="<";return e.active===t.data&&(n=e.sort==="<"?">":"<"),Qe.get({active:t.data,sort:n},!1),ln({active:t.data,sort:n}),{...e,active:t.data,sort:n};default:throw new Error}}function ko(){const[e,t]=m.useReducer(wo,dt()===void 0?{active:1,sort:"<"}:dt());return r.jsxs("div",{className:yo.sort,children:[r.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})}),r.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})}),r.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 Co(e){Qe.get=e}function jo(e){Qe.set(e)}function So(e,t,n){let a=1,i=0,o={},s=50;o[a]=[];let c={},l="s1a";switch(c.s1a=(_,d)=>d.s1-_.s1,c.s1d=(_,d)=>_.s1-d.s1,c.s2a=(_,d)=>_.s2-d.s2,c.s2d=(_,d)=>d.s2-_.s2,c.s3a=(_,d)=>_.s3.localeCompare(d.s3),c.s3d=(_,d)=>d.s3.localeCompare(_.s3),n.active){case 1:l=n.sort===">"?"s1d":"s1a";break;case 2:l=n.sort===">"?"s2d":"s2a";break;case 3:l=n.sort===">"?"s3d":"s3a";break}return t.sort(c[l]).forEach(_=>{i++,i<=s||(a++,i=1,o[a]=[]),o[a].push(e[_.id])}),{data:o}}function Eo(e){Qe.count(e)}const Io={Init:ko,useValue:Co,Set:jo,Run:So,Count:Eo},et={},En={};function Do(e){const[t,n]=m.useState({}),a=async i=>{n(Object.keys(et).reduce((o,s)=>(o?o[s]=et[s].all:o={},o),{}))};return m.useEffect(()=>{e.forEach(i=>et[i]={all:0}),En.menu=a,a()},[e]),t}function No(e,t){switch(typeof t){case"number":et[e].all+=t,En.menu();break}}const To={useMenu:Do,setUpdate:No};class zo{constructor(t="el",n="db"){Zt(this,"storeName");Zt(this,"_dbp");this.storeName=n,this._dbp=new Promise((a,i)=>{try{const o=indexedDB.open(t,1);o.onerror=s=>{i(o.error)},o.onsuccess=()=>{a(o.result)},o.onupgradeneeded=()=>{try{o.result.createObjectStore(n)}catch(s){i(s)}}}catch(o){i(o)}})}async _withIDBStore(t,n){try{const a=await this._dbp;return new Promise((i,o)=>{try{const s=a.transaction(this.storeName,t);s.oncomplete=()=>i(),s.onabort=s.onerror=()=>o(s.error),n(s.objectStore(this.storeName))}catch(s){o(s)}})}catch(a){throw a}}}let bt,Y={};const ze=()=>(bt||(bt=new zo),bt),vt=(e,t="",n=new Set)=>{if(e==null)return null;if(e instanceof Promise)return t;if(typeof e!="object"||n.has(e))return null;n.add(e);try{for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&!a.startsWith("__"))try{const i=e[a];if(i instanceof Promise)return t?`${t}.${a}`:a;if(i&&typeof i=="object"&&typeof i.then=="function")return t?`${t}.${a}`:a;const o=t?`${t}.${a}`:a,s=vt(i,o,n);if(s)return s}catch{continue}if(Array.isArray(e))for(let a=0;a<e.length;a++)try{const i=`${t}[${a}]`,o=vt(e[a],i,n);if(o)return o}catch{continue}}catch{}return null},me=e=>{if(e==null)return!1;if(e instanceof Promise||e&&typeof e=="object"&&typeof e.then=="function")return!0;try{if(vt(e))return!0}catch{return!0}return!1},je=async(e,t,n=ze())=>{if(me(t))throw new Error(`Нельзя сохранить объект с Promise в IndexedDB для ключа ${e}`);try{const a=await h.Crypto.enCode(t);return Y[e]=t,await n._withIDBStore("readwrite",i=>{i.put(a,e)}),!0}catch(a){throw a}},xe=async(e,t=ze())=>{if(Y[e]!==void 0)return Y[e];try{let n;if(await t._withIDBStore("readonly",a=>{n=a.get(e)}),n.result!==void 0){let a=await h.Crypto.deCode(n.result);return Y[e]=a,a}return{}}catch{return{}}},Bo=async(e,t=ze())=>{try{return await t._withIDBStore("readwrite",n=>{n.delete(e)}),delete Y[e],!0}catch(n){throw n}},yt=async(e=ze())=>{try{return await e._withIDBStore("readwrite",t=>{t.clear()}),Y={},!0}catch(t){throw t}},Lo={id:async(e,t,n)=>{let a=await xe(t);if(n!==void 0)n({type:"load",base:a});else return a[e]},get:xe,set:je,add:async(e,t,n,a)=>{if(me(e))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в add");let i,o;if(o=await xe(n),o[e.id]=e,me(o))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в add после объединения");if(await je(n,o),t!=null&&(i=await xe(t),e.eDate!==void 0)){if(i[e.id]=e.eDate,me(i))throw new Error("Нельзя сохранить page объект с Promise в IndexedDB в add");await je(t,i)}a!==void 0&&a({type:"load",page:i,base:o})},del:Bo,upd:async(e,t,n,a=ze())=>{if(me(t))throw new Error("Нельзя сохранить объект с Promise в IndexedDB при обновлении");if(Y[e]===void 0){let i;try{if(await a._withIDBStore("readonly",o=>{i=o.get(e)}),i.result!==void 0){let o=await h.Crypto.deCode(i.result);if(Y[e]=o,Y[e][t.id]={...Y[e][t.id],...t.data},me(Y[e]))return{};let s=await h.Crypto.enCode(Y[e]);return await a._withIDBStore("readwrite",c=>{c.put(s,e)}),{}}else return{}}catch{return{}}}else if(Y[e][t.id]!==void 0){if(Y[e][t.id]={...Y[e][t.id],...t.data},n!==void 0&&Y[n]!==void 0?Y[n][t.id]!==void 0&&(Y[n][t.id]=t.data.eDate):Y[n]=[],delete Y[e][t.id].$_item,delete Y[e][t.id].$_send,me(Y[e])||n!==void 0&&me(Y[n]))throw new Error("Нельзя сохранить объект с Promise в IndexedDB при обновлении");try{return await a._withIDBStore("readwrite",i=>{i.put(h.Crypto.enCode(Y[e]),e),n!==void 0&&i.put(h.Crypto.enCode(Y[n]),n)}),{}}catch(i){throw i}}},key:async(e=ze())=>{const t=[];try{return await e._withIDBStore("readonly",n=>{(n.openKeyCursor||n.openCursor).call(n).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}),t}catch{return[]}},load:e=>Y[e],split:(e,t,n=[],a={})=>{let i=n.length!==0,o=[],s=a.sort,c=Object.keys(a).length!==0,l=Object.keys(a),_=Object.keys(e),d=[],p=g=>{let b="";if(n.forEach(x=>{b+=t[g][x]}),c){let x={};l.forEach(v=>{x[v]=t[g][v]});for(let v in s)t[g][s[v]]===void 0&&(yt(),location.reload()),v==="s1"&&(x[v]=new Date(t[g][s[v]]).getTime()),v==="s2"&&(x[v]=t[g][s[v]]),v==="s3"&&(x[v]=t[g][s[v]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:g,text:b,...x})}else o.push({id:g,text:b})},f=g=>{};return _.forEach(g=>{d.push(t[g])}),d.forEach(g=>{g===void 0?(yt(),location.reload()):(i&&p(g.id),c&&f(g.id))}),{list:d,search:o,filter:a}},clear:yt,updAll:async(e,t,n,a)=>{if(me(e))throw new Error("Нельзя сохранить объект с Promise в IndexedDB в updAll");let i=await xe(t),o=await xe(n);for(let s in e)o[s]=e[s],i[s]=e[s].eDate;if(me(o))throw new Error("Нельзя сохранить base объект с Promise в IndexedDB в updAll после объединения");if(me(i))throw new Error("Нельзя сохранить page объект с Promise в IndexedDB в updAll после объединения");await je(t,i),await je(n,o),a!==void 0&&a({type:"load",page:i,base:o})},delAll:async(e,t,n,a)=>{let i=await xe(t),o=await xe(n);e.forEach(s=>delete i[s]),await je(t,i),a!==void 0&&a({type:"load",page:i,base:o})},delList:async(e,t,n)=>{let a=await xe(t);e.forEach(i=>delete a[i]),await je(t,a)},addList:async(e,t,n)=>{let a=await xe(t);e.forEach(i=>a[i.id]=i.eDate),await je(t,a)}},In={setSetting:ja,getSetting:Sa},Mo={version:{Api:Wr,Server:Ur,Client:Gr},Host:Kr,Import:Yr,IconAssets:uo,DynamicURL:Hr},$o={useKey:(e,t)=>{const n=[];t=t.map(a=>a.charCodeAt(0)),document.onkeydown=function(a){n.push(a.keyCode);for(var i=0;i<t.length;i++)if(n.indexOf(t[i])==-1)return;e(),n.length=0},document.onkeyup=function(a){n.length=0}}},Po={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function Dn({children:e}){return r.jsx("ul",{className:re.ul,children:e})}function Ao(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,a=e.item+1;return a=n<a?1:a,e.item===a?e:{...e,wait:e.size===a,item:a,list:[...e.list,...e.data[a]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Nn({list:e,load:t,className:n,...a}){const i=m.useRef(null),[o,s]=m.useReducer(Ao,{load:!1,list:[],data:{},item:1,wait:!1,size:0});m.useEffect(()=>{i.current.scrollTop=0,e!==null&&s({type:"load",load:!0,data:e})},[t]);let c=()=>{i.current.scrollHeight-i.current.scrollTop-300<=i.current.clientHeight&&!o.wait&&s({type:"update"})};return r.jsx("div",{className:[Po.s,n].join(" "),ref:i,onScroll:c,children:r.jsx(Dn,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(l=>r.jsx(a.item,{data:l},l.id)):r.jsxs("div",{"data-load":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})})})}const Fo={Widget:vi},Tn=({onClick:e,active:t})=>(t=!!t,r.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));let W={};W.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},W.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},W.Paste=(e,t)=>{t.preventDefault(),navigator.clipboard.readText().then(n=>{if(e){let a=t.target.textContent.length;if(a>=e)return;e-=a,n=n.slice(0,e)}window.document.execCommand("insertText",!1,n.replace(/(\r\n|\n|\r)/gm," "))}).catch(n=>{})},W.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},W.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()},W.ContentEditable=ye.isBrowser("Firefox")?"true":"plaintext-only";function Ze({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",before:p="",show:f=!0,maxLength:g,onSave:b,className:x="",isCopy:v=!0,isReload:k=!1}){let w=!!(c&&(t===""||t===void 0)),D=E=>{n&&n({value:E.target.textContent.trim(),name:a,reload:k})},z=E=>{g&&E.target.textContent.trim().length>=g&&E.key!=="Backspace"&&E.preventDefault(),E.key==="Enter"&&E.preventDefault()},T=E=>{v&&(E.preventDefault(),navigator.clipboard.writeText(E.target.textContent.trim()).then(function(){h.Notice.Copy("Данные в буфер обмене")},function(L){}))},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(L=>{if(g){let I=E.target.textContent.length;if(I>=g)return;g-=I,L=L.slice(0,g)}window.document.execCommand("insertText",!1,L.replace(/(\r\n|\n|\r)/gm," "))}).catch(L=>{})};if(!(l&&_)&&!f||!(l&&_)&&w)return"";const y={};y.field="input",x&&(y.className=x);const C={};i&&(C.placeholder=i),l&&_&&(C.edit="");const $=E=>{W.Blur(E),b==null||b({value:E.target.textContent.trim(),name:a})};return r.jsxs("dl",{...y,children:[o?r.jsx("dt",{children:o}):"",p,r.jsx("dd",{onPaste:N,onInput:D,onBlur:$,onKeyDown:z,onContextMenu:T,spellCheck:"true",contentEditable:l&&_?W.ContentEditable:"false",suppressContentEditableWarning:!0,...C,children:t}),d,s?r.jsx("em",{children:s}):""]})}function zn({onClick:e,onSend:t,name:n,onRef:a}){let[i,o]=m.useState(!1);const s=()=>{if(e)return e();i||(o(!0),t&&t(o))};return r.jsx("button",{ref:a,"data-form":"button",className:i?"btn await":"btn confirm pointer",onClick:s,children:i?"Ожидайте":n})}function Bn({value:e,onValue:t,onActive:n,data:a,name:i,view:o,maxLength:s,edit:c=!0,active:l=!0,placeholder:_="Введите сообщение"}){const d=m.useRef({value:e,timerId:null,shift:!1,send:!0}),p=()=>{d.current.value.length>0?d.current.send&&(n(!0),d.current.send=!1,d.current.timerId=setTimeout(()=>{d.current.send=!0},3e3)):n(!1)},f=w=>{d.current.value=w.target.textContent,p()},g=w=>{w.keyCode===16&&(d.current.shift=!0),w.keyCode===13&&!d.current.shift&&(w.preventDefault(),d.current.value.length!==0&&(w.target.textContent="",a&&a(d.current.value),t&&t(d.current.value),d.current.value="",n(!1)))},b=w=>{w.keyCode===16&&(d.current.shift=!1)},x=w=>{w.preventDefault(),navigator.clipboard.readText().then(D=>{if(s){let z=w.target.textContent.length;if(z>=s)return;s-=z,D=D.slice(0,s)}window.document.execCommand("insertText",!1,D)}).catch(D=>{})},v=()=>{n(!1)},k={spellCheck:"true"};return _&&(k.placeholder=_),c&&l&&(k.contentEditable=W.ContentEditable),r.jsx("dl",{"data-form":"message",children:r.jsx("dd",{onPaste:x,onInput:f,onKeyUp:b,onKeyDown:g,onBlur:v,...k,suppressContentEditableWarning:!0,children:e})})}function Ln(e){let t=()=>e.title?r.jsx("dt",{children:e.title}):"",n=e.edit!==void 0?e.edit:!0,a=e.active!==void 0?e.active:!0,i=e.placeholder!==void 0?e.placeholder:"",o=l=>{e.onValue({value:l.target.textContent,name:e.name})},s=l=>{l.key==="Enter"&&l.preventDefault()},c=l=>{l.preventDefault(),navigator.clipboard.readText().then(_=>{window.document.execCommand("insertText",!1,_)}).catch(_=>{})};return r.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),r.jsx("dd",{onPaste:c,onInput:o,onKeyDown:s,contentEditable:n&&a?W.ContentEditable:"false","data-placeholder":i,suppressContentEditableWarning:!0,children:e.value})]})}function Mn({value:e,onValue:t,maxLength:n,placeholder:a="",name:i}){let o=(b,x)=>Number(Math.round(b+Math.random()*(x-b))),s=m.useRef(null),c=m.useRef(null),l=o(1e4,99999),_=b=>{b.key!=="Backspace"&&(b.key==="Enter"&&b.preventDefault(),b.target.textContent.length===5&&b.preventDefault(),/\d/.test(b.key)||b.preventDefault())},d=b=>{t({value:Number(b.target.textContent)===l,name:i})},p=b=>{b.preventDefault(),navigator.clipboard.readText().then(x=>{if(n){let v=b.target.textContent.length;if(v>=n)return;n-=v,x=x.slice(0,n)}window.document.execCommand("insertText",!1,x.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(x=>{})};m.useEffect(()=>{const b=s.current,x=b.getContext("2d");x.clearRect(0,0,b.width,b.height),x.font="30px brush script mt",x.fillStyle="#eee",x.textAlign="center",x.fillText(l,50,27),c.current.textContent=""},[l]);const f={};f.field="captcha";const g={};return a&&(g.placeholder=a),r.jsxs("dl",{...f,children:[r.jsx("dd",{ref:c,onPaste:p,onInput:d,onBlur:W.Blur,onKeyDown:_,contentEditable:W.ContentEditable,suppressContentEditableWarning:!0,...g}),r.jsx("canvas",{ref:s,width:"100",height:"35"})]})}function $n({className:e,title:t,error:n,edit:a=!0,real:i,onValue:o,empty:s,name:c}){let l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},_=x=>{if(x.preventDefault(),!a)return;x.target.textContent=x.target.textContent.slice(-1).replace(/[^+\d]/g,"");let v=window.getSelection(),k=x.target.textContent.length;if(l[x.target.id]=x.target.textContent,l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6,v.collapse(x.target.firstChild,1),k===0){x.target.blur(),x.target.focus();return}x.target.nextSibling!=null&&x.target.nextSibling.focus()},d=x=>{if(!a)return x.preventDefault();if(x.key==="Enter"&&x.preventDefault(),x.key==="Backspace"){if(x.preventDefault(),x.target.textContent="",l[x.target.id]="",x.target.previousSibling!=null){let v=x.target.previousSibling.id.slice(1);x.target.previousSibling.textContent="",l["n"+v]="",x.target.previousSibling.focus()}l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6}},p=x=>{if(!a)return x.preventDefault();if(i)o&&o({value:l.code,name:c});else if(l.code.length===6&&(x.target.blur(),o&&o({value:l.code,name:c}),s)){l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let v=1;v<=6;v++){let k=document.getElementById("n"+v);k&&(k.textContent="")}}},f=x=>{x.target.textContent=""},g=x=>{x.preventDefault(),navigator.clipboard.readText().then(v=>{var z;var k=/\d+/g;let w=(z=v.match(k))==null?void 0:z.toString();if(!w)return;let D=w.split("");for(let T=1;T<=D.length;T++){let N=document.getElementById("n"+T);N&&(N.textContent=D[T-1],l["n"+T]=D[T-1])}if(l.code=l.n1+""+l.n2+l.n3+l.n4+l.n5+l.n6,l.code.length===6&&(x.target.blur(),o&&o({value:l.code,name:c}),s)){l={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let T=1;T<=6;T++){let N=document.getElementById("n"+T);N&&(N.textContent="")}}}).catch(v=>{})};const b={};return b.field="code",e&&(b.className=e),r.jsxs("dl",{...b,children:[t?r.jsx("dt",{children:t}):"",r.jsxs("div",{children:[r.jsx("dd",{id:"n1",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n2",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n3",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n4",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n5",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0}),r.jsx("dd",{id:"n6",inputMode:"numeric",onKeyDown:d,onKeyUp:p,onFocus:f,onPaste:g,onInput:_,contentEditable:!0})]}),n?r.jsx("em",{children:n}):""]})}function Pn({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,length:l=6,edit:_=!0,active:d=!0,after:p="",show:f=!0,view:g,onSave:b,className:x=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0;let[v,k]=m.useState(t),w=z=>{k(z),n==null||n({value:z,name:a}),b==null||b({value:z,name:a})};const D={};return D.field="color",x&&(D.className=x),r.jsx(r.Fragment,{children:g==="icon"?r.jsx("i",{"data-icon":"F043"}):r.jsxs("dl",{...D,children:[o&&r.jsx("dt",{children:o}),r.jsx("dd",{children:l>0&&Array.from(Array(l).keys()).map(z=>r.jsx("s",{active:(Number(z)===Number(v))+"",onClick:()=>w(z),style:{backgroundColor:`var(--color-${z})`}},z))}),s&&r.jsx("em",{children:s})]})})}const be={o:"_o_76l23_1",c:"_c_76l23_11",_active:"__active_76l23_41",as:"_as_76l23_94",ap:"_ap_76l23_97"};function wt({title:e,error:t,edit:n=!0,active:a=!0,className:i,placeholder:o,max:s,min:c,view:l="date",onValue:_,name:d,value:p,after:f}){let[g,b]=m.useState(p===void 0?new Date:p),x=!n&&a;m.useEffect(()=>{b(p===void 0?new Date:p)},[p]);let v=z=>{b(z),_==null||_({value:z,name:d})},k=z=>{const T=z.target.getBoundingClientRect(),N=T.left,y=T.bottom,C=T.top;de.setListener("form",r.jsx(Oo,{position:{x:N,y:C,b:y},onValue:v,date:g,max:s,min:c,className:i},new Date().getTime()))};const w={};w.field="input",i&&(w.className=i);const D={};return o&&(D.placeholder=o),x?r.jsx(r.Fragment,{}):r.jsx(r.Fragment,{children:l==="icon"?r.jsx("i",{"data-icon":"F043",className:"pointer","data-color":"_b5b9cc :506290",onClick:k}):r.jsxs("dl",{...w,children:[e&&r.jsx("dt",{children:e}),r.jsxs("dd",{onClick:k,...D,"data-edit":(n&&a)+"",children:[G.Date(g,"dd.mm.yyyy"),f]}),t&&r.jsx("em",{children:t})]})})}const Oo=({date:e,onValue:t,position:n,max:a,min:i,className:o})=>{let[s,c]=m.useState(!0),l=new Date,_=new Date(e),d={y:parseInt(l.getFullYear()),d:parseInt(l.getDate()),m:parseInt(l.getMonth())+1},p={y:parseInt(_.getFullYear()),d:parseInt(_.getDate()),m:parseInt(_.getMonth())+1},[f,g]=m.useState({y:p.y,m:p.m}),b=j=>{let M=j.getDay();return M===0&&(M=7),M-1},x=["пн","вт","ср","чт","пт","сб","вс"],v=f.m-1,k=new Date(f.y,v),w=[];for(let j=0;j<b(k);j++)w.push(0);for(;k.getMonth()===v;)w.push(k.getDate()),k.setDate(k.getDate()+1);let D=()=>{c(!1)},z=()=>{y(f.m+1,f.y)},T=()=>{y(f.m-1,f.y)},N=j=>{t(f.y+"-"+G.Number(2,f.m)+"-"+G.Number(2,j)),D()},y=(j,M)=>{M=j>12?M+1:j<1?M-1:M,j=j>12?1:j<1?12:j,g({y:M,m:j})};const C=j=>d.y===f.y&&d.m===f.m&&d.d===j?{"data-active":"true"}:{},$=j=>p.y===f.y&&p.m===f.m&&p.d===j?{"data-current":"true"}:{},E=j=>{let M=!0;if(a){let Z=a.getTime(),V=new Date(f.y,f.m-1,j).getTime();Z<V&&(M=!1)}if(i){let Z=i.getTime(),V=new Date(f.y,f.m-1,j).getTime();Z>V&&(M=!1)}return M};let L=window.innerHeight-n.y<320?n.y-312:n.b,I=window.innerWidth-n.x<265?n.x-235:n.x;return r.jsx(r.Fragment,{children:s?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>D()},new Date().getTime()),r.jsxs("div",{className:[be.c,o&&o+"-backdrop"].join(" "),style:{top:L+"px",left:I+"px"},children:[r.jsxs("s",{children:[r.jsx("i",{onClick:T,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m15.09 4.594-7.646 6.553a1.126 1.126 0 0 0 0 1.708l7.647 6.552c.73.625 1.857.107 1.857-.854V5.447c0-.961-1.127-1.48-1.857-.853Z"})})}),r.jsxs("h2",{children:[G.Month(f.m).name," ",f.y]}),r.jsx("i",{onClick:z,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m8.91 19.406 7.646-6.552a1.125 1.125 0 0 0 0-1.709L8.91 4.593c-.73-.625-1.857-.107-1.857.854v13.107c0 .96 1.127 1.479 1.857.852Z"})})})]}),r.jsxs("div",{"grid-calendar":"",children:[x.map((j,M)=>r.jsx("p",{children:j},"v"+M)),w.map((j,M)=>r.jsx("span",{children:j!==0&&E(j)?r.jsx("b",{...C(j),...$(j),onClick:()=>N(j),children:j}):r.jsx("p",{...C(j),...$(j),children:j!==0?j:""})},M))]})]})]}):""})};function kt({value:e,onValue:t,name:n,placeholder:a="",title:i,error:o,hide:s=!1,edit:c=!0,show:l=!0,active:_=!0,after:d="",view:p,modal:f,module:g,options:b,className:x}){let[v,k]=m.useState(e),w=T=>{if(!(c&&_)||!f)return;let N=f.split(".");h.Modal.Open(N[0],N[1],{callback:y=>{t&&t({value:y,name:n}),k(y)},onValue:t,options:b,name:n,value:e})};const D={};D.field="input",x&&(D.className=x);const z={};return a&&(z.placeholder=a),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{...D,children:[i&&r.jsx("dt",{children:i}),r.jsx("dd",{...z,onClick:w,edit:(c&&_)+"","data-after":d,children:v}),o&&r.jsx("em",{children:o})]})}function Ct({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,course:p=100,view:f,type:g,onSave:b,className:x="",isClear:v=!1}){let k=!!(s&&(e===""||e===void 0));e=G.isNumeric(e)?Number(e)/p:0;let w=I=>g==="multi"?I.replace(/[^+\d.+-]/g,""):I.replace(/[^+\d.]/g,""),D=(I,j)=>{let M=document.createRange(),Z=window.getSelection();M.setStart(j.childNodes[0],I),M.collapse(!0),Z.removeAllRanges(),Z.addRange(M),j.focus()},z=I=>{t==null||t({value:w(I.target.textContent)*p,name:n}),I.target.textContent=w(I.target.textContent),I.target.textContent.length>0&&D(I.target.textContent.length,I.target)},T=I=>{W.Blur(I),I.target.textContent===""&&(I.target.textContent=0),b==null||b({value:w(I.target.textContent)*p,name:n}),t==null||t({value:w(I.target.textContent)*p,name:n}),I.target.textContent=G.Money(I.target.textContent)},N=I=>{I.target.textContent=w(I.target.textContent)},y=I=>{I.currentTarget.previousElementSibling.textContent="",t==null||t({value:0,name:n})},C=I=>{I.key==="Enter"&&I.preventDefault()},$=I=>{I.preventDefault(),navigator.clipboard.readText().then(j=>{j=j.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,j)}).catch(j=>{})};if(!(c&&l)&&!d||!(c&&l)&&k)return"";const E={};E.field="input",x&&(E.className=x);const L={};return L.inputMode="decimal",a&&(L.placeholder=a),c&&l&&(L.edit=""),r.jsxs("dl",{...E,children:[i?r.jsx("dt",{children:i}):"",r.jsx("dd",{...L,onInput:z,onPaste:$,onBlur:T,onKeyDown:C,onFocus:N,contentEditable:c&&l?W.ContentEditable:"false",suppressContentEditableWarning:!0,"data-after":_,children:!a||e?G.Money(e):""}),v&&r.jsx("svg",{"action-type":"delete",onClick:y,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M17 6L6 17M6 6L17 17"})}),o?r.jsx("em",{children:o}):""]})}function An({value:e,onValue:t,name:n,view:a,error:i,edit:o=!0,active:s=!0,title:c,placeholder:l="",className:_,after:d}){let[p,f]=m.useState(e);m.useEffect(()=>{f(e)},[e]);let g=v=>{f(v),t&&t({value:v,name:n})},b=v=>{if(!o||!s)return;const k=v.target.getBoundingClientRect(),w=k.left,D=k.top;de.setListener("form",r.jsx(qo,{position:{x:w,y:D},onValue:g,date:p},new Date().getTime()))};const x={};return l&&(x.placeholder=l),a==="icon"?r.jsx("i",{"data-icon":"F043",onClick:b}):r.jsxs("dl",{children:[c&&r.jsx("dt",{children:c}),r.jsx("dd",{onClick:b,...x,children:G.Date(p,"mm.yyyy")}),i&&r.jsx("em",{children:i})]})}const qo=e=>{let[t,n]=m.useState(!0),a=new Date,i=new Date(e.date),o={y:parseInt(a.getFullYear()),m:parseInt(a.getMonth())+1},s={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},[c,l]=m.useState(s.y),_=()=>{n(!1)},d=()=>{l(c+1)},p=()=>{l(c-1)},f=k=>{e.onValue(c+"-"+G.Number(2,k)),_()},g=k=>o.y===s.y&&o.m===k?"_FFEB3B":"",b=Array(12).fill("").map((k,w)=>w+1),x=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,v=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return r.jsx(r.Fragment,{children:t?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>_()},new Date().getTime()),r.jsxs("div",{className:be.c,style:{top:x+"px",left:v+"px"},children:[r.jsxs("s",{children:[r.jsx("i",{onClick:p,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m15.09 4.594-7.646 6.553a1.126 1.126 0 0 0 0 1.708l7.647 6.552c.73.625 1.857.107 1.857-.854V5.447c0-.961-1.127-1.48-1.857-.853Z"})})}),r.jsx("h2",{children:c}),r.jsx("i",{onClick:d,children:r.jsx("svg",{width:"16",height:"16",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m8.91 19.406 7.646-6.552a1.125 1.125 0 0 0 0-1.709L8.91 4.593c-.73-.625-1.857-.107-1.857.854v13.107c0 .96 1.127 1.479 1.857.852Z"})})})]}),r.jsx("div",{"grid-month":"",children:b.map((k,w)=>r.jsx("span",{onClick:()=>{f(k)},color:g(k),children:r.jsx("b",{children:G.Month(k).abc})},w))})]})]}):""})};function Fn({id:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,maxLength:f,view:g,onSave:b,className:x="",isCopy:v=!0}){let[k,w]=m.useState(!1);k=l?!0:k;let D=E=>{n==null||n({value:E.target.innerText,name:a})},z=E=>{f&&E.target.textContent.trim().length>=f&&E.key!=="Backspace"&&E.preventDefault(),E.key==="Enter"&&E.preventDefault()},T=E=>{v&&(E.preventDefault(),navigator.clipboard.writeText(E.target.textContent.trim()).then(function(){h.Notice.Copy("Данные в буфер обмене")},function(L){}))},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(L=>{if(f){let I=E.target.textContent.length;if(I>=f)return;f-=I,L=L.slice(0,f)}window.document.execCommand("insertText",!1,L.replace(/(\r\n|\n|\r)/gm," "))}).catch(L=>{})};if(c)return r.jsx(r.Fragment,{});if(!(l&&_)&&!p)return"";const y={};y.field="notes",x&&(y.className=x);const C={};i&&(C.placeholder=i),l&&_&&(C.edit=""),k&&(C.open="");const $=E=>{W.Blur(E),b==null||b({value:E.target.textContent.trim(),name:a})};return r.jsxs("dl",{...y,children:[o?r.jsx("dt",{children:o}):"",r.jsx("dd",{onPaste:N,onInput:D,onBlur:$,onKeyDown:z,onContextMenu:T,contentEditable:l&&_?W.ContentEditable:"false",suppressContentEditableWarning:!0,...C,children:t}),d,s?r.jsx("em",{children:s}):""]})}function jt({onValue:e,onSave:t,active:n,max:a,edit:i,title:o,error:s,show:c,hide:l,value:_,placeholder:d,className:p,maxLength:f,name:g,after:b="",before:x="",view:v}){i=i!==void 0?i:!0,n=n!==void 0?n:!0,l=!!(l&&(_===""||_===void 0))&&!(i&&n),d=d!==void 0?d:"",a=a!==void 0?a:99;let w=!1,D=E=>{e==null||e({value:E.target.textContent,name:g})},z=E=>{if(!(w&&E.which===86)){if(E.which===17||E.which===91)return w=!0;E.key!=="Backspace"&&(E.target.textContent.length===a&&E.preventDefault(),E.key==="Enter"&&E.preventDefault(),isNaN(E.key)&&E.preventDefault())}},T=E=>{if(E.which===17||E.which===91)return w=!1},N=E=>{E.preventDefault(),navigator.clipboard.readText().then(L=>{if(L=L.replace(/(?!^\+|\d)./g,""),f){let I=E.target.textContent.length;if(I>=f)return;f-=I,L=L.slice(0,f)}window.document.execCommand("insertText",!1,""+L)}).catch(L=>{})};const y=E=>{W.Blur(E),t==null||t({value:E.target.textContent,name:g})},C={};C.field="input",p&&(C.className=p);let $={};return i&&n?($.edit="true",$.contentEditable=W.ContentEditable):$.contentEditable="false",$.inputMode="decimal",d&&($.placeholder=d),l?r.jsx(r.Fragment,{}):r.jsxs("dl",{...C,children:[o&&r.jsx("dt",{children:o}),x,r.jsx("dd",{...$,onPaste:N,onInput:D,onBlur:y,onKeyDown:z,onKeyUp:T,suppressContentEditableWarning:!0,children:_}),b,s&&r.jsx("em",{children:s})]})}function On({value:e,onValue:t,onSave:n,name:a,placeholder:i="",className:o,title:s,error:c,edit:l=!0,active:_=!0,reload:d=!1,native:p=!1,isShow:f=!1,maxLength:g,eyes:b=[],after:x=""}){const[v,k]=m.useState(f);let w=C=>{t&&t({value:C.target.textContent,name:a,reload:d})},D=C=>{C.key==="Enter"&&C.preventDefault()},z=C=>{C.preventDefault(),navigator.clipboard.readText().then($=>{if(g){let E=C.target.textContent.length;if(E>=g)return;g-=E,$=$.slice(0,g)}window.document.execCommand("insertText",!1,$.replace(/(\r\n|\n|\r)/gm," "))}).catch($=>{})},T=C=>{W.Blur(C),n==null||n({value:C.target.textContent.trim(),name:a})};const N={};N.field="password",v&&(N.show=""),o&&(N.className=o);const y={};return i&&(y.placeholder=i),p?"":r.jsxs("dl",{...N,children:[s?r.jsx("dt",{children:s}):"",r.jsx("dd",{onPaste:z,onInput:w,onKeyDown:D,onBlur:T,contentEditable:l&&_?W.ContentEditable:"false",...y,suppressContentEditableWarning:!0,children:e}),b[0]&&r.jsx("i",{onClick:()=>k(!v),children:v?b[1]:b[0]}),x,c?r.jsx("em",{children:c}):""]})}const St={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 Et({value:e,onValue:t,onSave:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,view:f,className:g=""}){l=l!==void 0?l:!0,_=_!==void 0?_:!0,c=!!(c&&(e===""||e===void 0))&&!(l&&_),m.useRef(null);let x="+_(___) ___-__-__",v=!0,k=0,w=(I,j)=>{let M=document.createRange(),Z=window.getSelection();M.setStart(j.childNodes[0],I),M.collapse(!0),Z.removeAllRanges(),Z.addRange(M),j.focus()},D=I=>{let j=T(I.target.textContent);I.target.textContent=j.q,j.i=j.q.lastIndexOf(j.v.substr(-1)),j.i<j.q.length&&j.q!==x?j.i++:j.i=j.q.indexOf("_"),w(j.i,I.target),t&&t({value:j.q.replace(/\D/g,""),name:a})},z=I=>{I.preventDefault(),navigator.clipboard.readText().then(j=>{window.document.execCommand("insertText",!1,j)}).catch(j=>{})},T=I=>{let j=0,M="",Z=I.replace(/\D/g,"");Z===""&&(v=!0);let V=Z.split(""),se="";V.forEach(Ue=>{v&&(se+=Ue,St[se]!==void 0&&v?(v=!1,x=St[se].mask.replace(new RegExp("[0-9]","g"),"_"),M=St[se].code):(v&&(k=(""+se).length,x=`+${se}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),M=""),k>(""+se).length&&(v=!0,x=`+${se}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),M="")))});let we=x.replace(/\D/g,"");return we.length>=Z.length&&(Z=we),{q:x.replace(/[_\d]/g,function(){return Z.charAt(j++)||"_"}),i:j,v:Z,f:M}},N=I=>{I.preventDefault(),navigator.clipboard.writeText(I.target.textContent.replace(/\D/g,"")).then(function(){h.Notice.Copy("Данные в буфер обмене")},function(j){})},y=T(e),C=I=>{I.key==="Enter"&&I.preventDefault()};const $=I=>{W.Blur(I),n&&n({value:I.target.textContent.replace(/\D/g,""),name:a})},E={};E.field="input",g&&(E.className=g);let L={};return l&&_?(L.edit="true",L.contentEditable=W.ContentEditable):L.contentEditable="false",i&&(L.placeholder=i),d&&(L.after=d),c?r.jsx(r.Fragment,{}):r.jsxs("dl",{...E,children:[o&&r.jsx("dt",{children:o}),r.jsx("dd",{...L,onPaste:z,onInput:D,onKeyDown:C,onContextMenu:N,onBlur:$,suppressContentEditableWarning:!0,children:y.q}),s&&r.jsx("em",{children:s})]})}const qn=({className:e,title:t,timeout:n=1e3,placeholder:a,edit:i=!0,active:o=!0,value:s,onValue:c,maxLength:l=20})=>{let _=0,d=m.useRef({textContent:s}),p=()=>{d.current.textContent.trim().length===0&&(d.current.textContent=""),clearTimeout(_),_=setTimeout(()=>{var w;return c((w=d.current)==null?void 0:w.textContent)},n)},f=()=>{d.current&&(d.current.textContent=""),c("")},g=w=>{l&&w.target.textContent.trim().length>=l&&w.key!=="Backspace"&&w.preventDefault(),w.key==="Enter"&&w.preventDefault()},b=w=>{w.preventDefault(),navigator.clipboard.readText().then(D=>{if(l){let z=w.target.textContent.length;if(z>=l)return;l-=z,D=D.slice(0,l)}window.document.execCommand("insertText",!1,D.replace(/(\r\n|\n|\r)/gm," "))}).catch(D=>{})},x=()=>{d.current.textContent=d.current.textContent.trim()};const v={};v.field="search",e&&(v.className=e);const k={};return a&&(k.placeholder=a),r.jsxs("dl",{...v,children:[t&&r.jsx("dt",{children:t}),r.jsx("dd",{ref:d,onPaste:b,onInput:p,onKeyDown:g,onBlur:x,contentEditable:i&&o?W.ContentEditable:"false",...k,suppressContentEditableWarning:!0,children:s}),r.jsx("svg",{"aria-label":"icon",onClick:f,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M10.364 3a7.364 7.364 0 1 0 0 14.727 7.364 7.364 0 0 0 0-14.727v0ZM15.857 15.86 21 21.001"})}),r.jsx("svg",{"action-type":"delete",onClick:f,viewBox:"0 0 24 24",children:r.jsx("path",{d:"M17 6L6 17M6 6L17 17"})})]})};function It({title:e,error:t,edit:n=!0,active:a=!0,hide:i,value:o=0,onValue:s,options:c,placeholder:l="",className:_,name:d,after:p,view:f,order:g,isReload:b=!1}){var $,E;const x=m.useRef(),[v,k]=m.useState(o),[w,D]=m.useState(c);m.useEffect(()=>{k(o),D(c)},[o,c]),i=!!(i&&(o===0||(($=w==null?void 0:w[o])==null?void 0:$.n)===void 0))&&!(n&&a);let T=L=>{k(L),s&&s({value:L,name:d,reload:b})},N=L=>{if(Object.keys(w||{}).length===0||!(n&&a))return;const I=L.target.getBoundingClientRect();de.setListener("form",r.jsx(Ro,{parent:I,onValue:T,view:f,className:_,options:w,order:g},new Date().getTime()))},y={field:"select",className:_},C={onClick:N};return l&&(C.placeholder=l),p&&(C.after=p),n&&a&&(C.edit=""),i?"":r.jsxs("dl",{...y,children:[e&&r.jsx("dt",{children:e}),r.jsx("dd",{...C,ref:x,children:(E=w==null?void 0:w[v])==null?void 0:E.n}),Object.keys(w||{}).length!==0&&r.jsx("s",{children:r.jsx("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"m5.25 8.625 6.75 6.75 6.75-6.75"})})}),t&&r.jsx("em",{children:t})]})}const Ro=({onValue:e,parent:t,view:n,className:a,options:i,order:o})=>{let[s,c]=m.useState(!0),l=()=>{c(!1)},_=f=>{c(!1),e(f)},d=window.innerHeight-t.y+t.height<320?t.y-312:t.y+33,p=window.innerWidth-t.x<265?t.x-235:t.x;return r.jsx(r.Fragment,{children:s?r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),r.jsx("div",{className:a,"data-select":"background "+n,style:{top:d+"px",left:p+"px",width:t.width},children:r.jsx(Zo,{order:o,options:i,link:_})})]}):""})},Zo=({order:e,options:t,link:n})=>e?r.jsx("ul",{children:e.map((a,i)=>t[a].s!==0?r.jsx("li",{onClick:()=>{n(a)},children:t[a].n},i):"")}):r.jsx("ul",{children:Object.keys(t).map((a,i)=>t[a].s!==0?r.jsx("li",{onClick:()=>{n(a)},children:t[a].n},i):"")});function Dt(e){let t=()=>e.title?r.jsx("dt",{children:e.title}):"",n=()=>e.error?r.jsx("em",{children:e.error}):"",a=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,s=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(a&&i),c=e.placeholder!==void 0?e.placeholder:"",l=g=>{d(e.options[g]),e.onValue({value:g,name:e.name})},[_,d]=m.useState(e.default!==void 0?e.options[e.default]:e.default),p=g=>{if(!(a&&i))return;const b=g.target.getBoundingClientRect();de.setListener("form",r.jsx(Uo,{parent:b,onValue:l,view:e.view,options:e.options},new Date().getTime()))};const f={};return c&&(f.placeholder=c),s?r.jsx(r.Fragment,{}):r.jsxs("dl",{"data-form":"select",children:[t(),r.jsx("dd",{onClick:p,"data-edit":(a&&i)+"",...f,children:_}),n()]})}const Uo=({onValue:e,parent:t,view:n,options:a})=>{let[i,o]=m.useState(!0),s=()=>{o(!1)},c=p=>{o(!1),e(p)},l=Object.keys(a).length*36,_=window.innerHeight-t.y+t.height<l?t.y-(l-33):t.y+33,d=window.innerWidth-t.x<265?t.x-235:t.x;return r.jsx(r.Fragment,{children:i?r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-select":"backdrop",onClick:s},new Date().getTime()),r.jsx("div",{"data-select":"background "+n,style:{top:_+"px",left:d+"px",width:t.width},children:r.jsx("ul",{children:Object.keys(a).map((p,f)=>r.jsx("li",{onClick:()=>{c(p)},children:a[p]},f))})})]}):""})};function Nt({set:e,value:t,onValue:n,name:a,placeholder:i="",title:o="",error:s="",hide:c=!1,edit:l=!0,show:_=!0,active:d=!0,after:p="",view:f,module:g,item:b,className:x=""}){let v={};switch(e){case"Input":return r.jsx(Ze,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Select":return b&&(v=ye.getSelect(parseInt(b))?ye.getSelect(parseInt(b)):{0:{s:"1",n:"не известно"}}),r.jsx(It,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:parseInt(t||"0"),onValue:n,name:a,placeholder:i,className:x,options:v});case"Users":return ye.getSelect("user"),r.jsx(Dt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x,options:v});case"Date":return r.jsx(wt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Phone":return r.jsx(Et,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Number":return r.jsx(jt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Money":return r.jsx(Ct,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a,placeholder:i,className:x});case"Modal":return r.jsx(kt,{title:o,show:_,hide:c,view:f,edit:l,active:d,value:t,onValue:n,name:a||"",placeholder:i,className:x,options:v,module:g||""})}}function Rn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,maxLength:f,onSave:g,className:b=""}){let x=!!(s&&(e===""||e===void 0));if(!(c&&l)&&!d||!(c&&l)&&x)return"";let v=T=>{t&&t({value:T.target.innerText,name:n})},k=T=>{g&&g({value:T.target.innerText,name:n})},w=T=>{T.preventDefault(),navigator.clipboard.readText().then(N=>{if(f){let y=T.target.textContent.length;if(y>=f)return;f-=y,N=N.slice(0,f)}window.document.execCommand("insertText",!1,N)}).catch(N=>{})};const D={};D.field="text",b&&(D.className=b);const z={};return a&&(z.placeholder=a),r.jsxs("dl",{...D,children:[i&&r.jsx("dt",{children:i}),r.jsx("dd",{onPaste:w,onBlur:k,onInput:v,contentEditable:c&&l?W.ContentEditable:"false",...z,suppressContentEditableWarning:!0,children:e}),o&&r.jsx("em",{children:o})]})}function Zn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,onSave:f,className:g=""}){let b=!!(s&&(e===""||e===void 0)),x=G.Date(e===void 0?new Date:e,"HH:MM"),v=m.useRef(null);if(!(c&&l)&&!d||!(c&&l)&&b)return"";let k=N=>{v.current.textContent=N,t&&t({value:N,name:n})},w=N=>{f&&f({value:N,name:n})},D=N=>{const y=N.target.getBoundingClientRect(),C=y.left,$=y.top;de.setListener("form",r.jsx(Wo,{positions:{x:C,y:$},onSave:w,onValue:k,date:x},new Date().getTime()))};const z={};z.field="input",g&&(z.className=g);const T={};return a&&(T.placeholder=a),r.jsx(r.Fragment,{children:p==="icon"?r.jsx("i",{"data-icon":"F043",onClick:D}):r.jsxs("dl",{...z,children:[i?r.jsx("dt",{children:i}):"",r.jsx("dd",{onClick:D,ref:v,...T,children:x}),o?r.jsx("em",{children:o}):""]})})}const Wo=({positions:e,onSave:t,onValue:n,date:a})=>{let i=a.split(":"),o={h:G.Number(2,i[0]),m:G.Number(2,i[1])},s="hour",[c,l]=m.useState({}),_=!1,d=0,p=0,f={body:m.useRef(null),time:m.useRef(null),hour:m.useRef(null),timeText:m.useRef(null),hourText:m.useRef(null)};m.useEffect(()=>{l(f.body.current.getBoundingClientRect()),f.hour.current.style.transform="rotate("+o.h*15+"deg)",f.time.current.style.transform="rotate("+o.m*6+"deg)"},[f.body,f.hour,f.time,o.m,o.h]);let g=()=>{_=!0},b=()=>{_=!1,s=s==="hour"?"time":"hour",f.body.current.setAttribute("active",s)},x=N=>{if(_){let C=Math.atan2(N.pageX-(c.x+78),N.pageY-(c.y+78))*(180/Math.PI)*-1+180;f[s].current.style.transform="rotate("+C+"deg)",s==="hour"?(o={...o,h:G.Number(2,parseInt(String(C/15),10))},f.hourText.current.textContent=o.h):(o={...o,m:G.Number(2,parseInt(String(C/6),10))},f.timeText.current.textContent=o.m),n(o.h+":"+o.m)}},v=N=>{if(s==="hour")if(N.deltaY>0){d+=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.h,10)+1;C=C>23?0:C,o={...o,h:G.Number(2,C)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else{d-=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.h,10)-1;C=C<0?23:C,o={...o,h:G.Number(2,C)},f.hourText.current.textContent=o.h,f[s].current.style.transform="rotate("+o.h*15+"deg)"}}else if(N.deltaY>0){d+=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.m,10)+1;C=C>59?0:C,o={...o,m:G.Number(2,C)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}else{d-=N.deltaY;let y=parseInt(String(d/50));if(p!==y){p=y;let C=parseInt(o.m,10)-1;C=C<0?59:C,o={...o,m:G.Number(2,C)},f.timeText.current.textContent=o.m,f[s].current.style.transform="rotate("+o.m*6+"deg)"}}n(o.h+":"+o.m)},[k,w]=m.useState(!0),D=()=>{w(!1),t(o.h+":"+o.m)},z=window.innerHeight-e.y+33<320?e.y-312:e.y+33,T=window.innerWidth-e.x<265?e.x-235:e.x;return r.jsx(r.Fragment,{children:k?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:be.o,onClick:()=>D()},new Date().getTime()),r.jsxs("div",{className:be.c,onMouseDown:g,onMouseUp:b,onMouseMove:x,onWheel:v,ref:f.body,style:{top:z+"px",left:T+"px"},children:[r.jsx("div",{className:"b"}),r.jsxs("div",{className:"s",children:[r.jsx("span",{className:["hour",s==="hour"?be.as:be.ap].join(" "),ref:f.hourText,children:o.h})," ",":"," ",r.jsx("span",{className:["min",s==="time"?be.as:be.ap].join(" "),ref:f.timeText,children:o.m})]}),r.jsx("div",{className:"h",ref:f.hour}),r.jsx("div",{className:"t",ref:f.time})]})]}):""})};function Un({onValue:e,label:t,value:n,title:a,className:i,name:o,text:s,id:c,reload:l}){const[_,d]=m.useState(!!n),p=t||a;m.useEffect(()=>{d(!!n)},[n]);let f=()=>{e&&e({value:_?0:1,name:o,id:c}),d(!_)};const g={};return g.field="check",i&&(g.className=i),r.jsxs("dl",{...g,children:[p?r.jsx("dt",{children:p}):"",r.jsxs("dd",{onClick:f,children:[r.jsx("span",{children:s}),r.jsx("div",{role:"switch","aria-checked":`${_?"true":"false"}`})]})]})}const Go=({label:e,onValue:t,value:n,name:a,item:i})=>{const[o,s]=m.useState(!!n);m.useEffect(()=>{s(!!n)},[n]);let c=()=>{let l=parseInt(o)===0?1:0;s(l),t({value:l,name:a,key:i,item:i})};return r.jsx("div",{role:"switch",onClick:c,"aria-checked":`${o?"true":"false"}`})},Wn=({onValue:e,value:t,name:n,item:a})=>{const[i,o]=m.useState(!!t);m.useEffect(()=>{o(!!t)},[t]);let s=()=>{let c=i?0:1;o(!!c),e({value:c,name:n,key:a,item:a})};return r.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})};function Gn({value:e,onValue:t,name:n,placeholder:a="",title:i="",error:o="",hide:s=!1,edit:c=!0,active:l=!0,after:_="",show:d=!0,view:p,max:f=0,onSave:g,className:b="",separator:x=","}){const[v,k]=m.useState(e!==void 0?e.split(x):[]);m.useEffect(()=>{k(e!==void 0?e!==void 0?e.split(x):[]:[])},[e]);let w=()=>{if(f!==0&&v.length>=f)return h.Notice.Error("Слишком много");k([...v,""])},D=L=>{v.splice(L,1),v.length===0&&v.push(""),k([...v]),g!==void 0&&g({value:v.join(x),name:n})},z=!!(s&&(e===""||e===void 0)),T=L=>{};if(!(c&&l)&&!d||!(c&&l)&&z)return"";const N={};N.field="group",b&&(N.className=b);const y=(L,I)=>{W.Blur(L),v[I]=L.target.textContent,g&&g({value:v.join(x),name:n})};let C=(L,I)=>{v[I]=L.target.textContent,t&&t({value:v.join(x),name:n})},$=L=>{L.key==="Enter"&&L.preventDefault()};const E=({data:L})=>f!==0&&L.length>=f?"":r.jsx("i",{onClick:w,children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[r.jsx("path",{d:"M12 5.25v13.5"}),r.jsx("path",{d:"M18.75 12H5.25"})]})});return r.jsxs("dl",{...N,children:[r.jsxs("dt",{children:[i,r.jsx(E,{data:v})]}),r.jsx("dd",{children:v.map((L,I)=>r.jsxs("li",{className:"field_group_item",children:[r.jsx("span",{onInput:j=>C(j,I),edit:"true",name:n,placeholder:a,onPaste:T,contentEditable:c&&l?W.ContentEditable:"false",onKeyDown:$,onBlur:j=>y(j,I),suppressContentEditableWarning:!0,children:v[I]}),r.jsx("i",{onClick:()=>{D(I)},children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[r.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),r.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},I))}),o&&r.jsx("em",{children:o})]})}const Ko=(e,t=",")=>(e=e!==void 0&&e!==""?e.split(t):[],e.filter(n=>n!=="").reduce((n,a)=>(n[a]=!0,n),{}));function Kn({value:e,onValue:t,name:n,placeholder:a="",separator:i=",",title:o,error:s,hide:c=!1,edit:l=!0,show:_=!0,active:d=!0,outFormat:p="object",after:f="",view:g,modal:b,module:x,options:v,className:k}){const[w,D]=m.useState(Ko(e,i)),z=y=>{if(!(l&&d)||!b)return;let C=b.split(".");h.Modal.Open(C[0],C[1],{callback:$=>{if(t)switch(p){case"array":t({value:Object.keys($),name:n});break;case"string":t({value:Object.keys($).filter(E=>$[E]).join(i),name:n});break;default:t({value:$,name:n})}D({...$})},onValue:t,options:v,name:n,value:w})},T={};T.field="group",k&&(T.className=k);const N={};return a&&(N.placeholder=a),c?r.jsx(r.Fragment,{}):r.jsxs("dl",{...T,children:[r.jsxs("dt",{children:[o,r.jsx("i",{onClick:z,children:r.jsx("svg",{width:"20",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M12 5.25v13.5M18.75 12H5.25"})})})]}),r.jsx("dd",{...N,onClick:z,edit:(l&&d)+"","data-after":f,children:Object.keys(w).map(y=>{var C;return r.jsx("div",{className:"field_group_item",children:(C=v[y])==null?void 0:C.label},y)})}),s&&r.jsx("em",{children:s})]})}function Yn({value:e,onValue:t,name:n,placeholder:a="",title:i="",link:o="",error:s="",hide:c=!1,edit:l=!0,active:_=!0,after:d="",show:p=!0,type:f,view:g,onSave:b,className:x=""}){const v=m.useId();let k=!!(c&&(e===""||e===void 0)),[w,D]=m.useState(o);if(!(l&&_)&&!p||!(l&&_)&&k)return"";const z=async N=>{if(f){let y=Ho(N,f,e||"default");t==null||t({name:n,value:y}),D(URL.createObjectURL(y))}else t==null||t({name:n,value:N}),D(URL.createObjectURL(N))},T={};return T.field="file",x&&(T.className=x),r.jsxs("dl",{...T,children:[i&&r.jsxs("dt",{children:[i," "]}),r.jsxs(Yo,{onFiles:z,children:[r.jsx("input",{id:v,type:"file",multiple:!0,onChange:N=>{N.target.files[0]&&z(N.target.files[0])}}),r.jsx("label",{htmlFor:v}),r.jsx("img",{src:w})]}),s&&r.jsx("em",{children:s})]})}const Yo=({children:e,onFiles:t})=>{const n=m.useRef(null);return m.useEffect(()=>{if(n.preventDefaults)return;n.preventDefaults=i=>{i.preventDefault(),i.stopPropagation()},n.highlight=i=>{},n.unhighlight=i=>{},n.onHandleDrop=i=>{let c=i.dataTransfer.files[0];t&&t(c)};let a=n.current;["dragenter","dragover","dragleave","drop"].forEach(i=>{a.addEventListener(i,n.preventDefaults,!1),document.body.addEventListener(i,n.preventDefaults,!1)}),["dragenter","dragover"].forEach(i=>{a.addEventListener(i,n.highlight,!1)}),["dragleave","drop"].forEach(i=>{a.addEventListener(i,n.unhighlight,!1)}),a.addEventListener("drop",n.onHandleDrop,!1)},[]),r.jsx("dd",{ref:n,children:e})},Ho=(e,t,n)=>{var a=document.getElementsByTagName("body")[0],i=document.createElement("canvas");a.appendChild(i);const o=i.getContext("2d"),s=new Image;s.addEventListener("load",()=>{o.drawImage(s,0,0,s.width,s.height);const c=t==="png"?i.toDataURL():i.toDataURL(`image/${t}`),l=Jo(c,n);return i.remove(),l}),s.src=URL.createObjectURL(e)};function Jo(e,t){let n=e.split(","),a=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,s=new Uint8Array(o);for(;o--;)s[o]=i.charCodeAt(o);return new File([s],t,{type:a})}function Hn({name:e,value:t,title:n,style:a,className:i}){let o={field:"progress"};return a&&(o.style=a),i&&(o.className=i),r.jsxs("dl",{...o,children:[n&&r.jsx("dt",{children:n}),r.jsx("dd",{})]})}const ce={};function Xo(e){const[t,n]=m.useState({}),a=m.useRef(e);return ce.u=i=>{a.current={...a.current,[i.name]:i.value}},ce.n=i=>{a.current=i,n(Date.now())},ce.r=()=>{n(Date.now())},[a.current,ce.n]}function Vo(e){ce.u(e),e.reload&&ce.r()}function Qo(){ce.r&&ce.r()}function es(e){const[t,n]=m.useState({}),a=m.useRef(e);return ce.u=i=>{a.current={...a.current,[i.name]:i.value}},ce.n=i=>{Object.keys(i).length>0?Object.keys(i).forEach(o=>{a.current[o]=i[o]}):a.current={},n(Date.now())},ce.r=()=>{n(Date.now())},[a.current,ce.n]}const ts={Color:Pn,Date:wt,Mask:Yn,Image:Yn,Code:$n,Check:Un,Switch:Tn,Input:Ze,Button:zn,Message:Bn,Generator:Ln,Captcha:Mn,Modal:kt,Money:Ct,Month:An,Notes:Fn,Number:jt,Password:On,Phone:Et,Search:qn,Select:It,Set:Nt,Textarea:Rn,Time:Zn,Users:Dt,String:Ze,Form:Nt,runReload:Qo,useData:Xo,setValue:Vo,Palette:Go,Toogle:Wn,Group:Gn,Options:Kn,useError:es,Progress:Hn};function ns({value:e="",onValue:t,onSave:n,name:a,format:i="+_(___) ___-__-__",placeholder:o="",title:s="",error:c="",hide:l=!1,edit:_=!0,active:d=!0,after:p="",show:f=!0,view:g,className:b=""}){_=_!==void 0?_:!0,d=d!==void 0?d:!0,l=!!(l&&(e===""||e===void 0))&&!(_&&d),m.useRef(null);let v=i,k=!0,w=0,D=(j,M)=>{let Z=document.createRange(),V=window.getSelection();Z.setStart(M.childNodes[0],j),Z.collapse(!0),V.removeAllRanges(),V.addRange(Z),M.focus()},z=j=>{j.preventDefault(),navigator.clipboard.readText().then(M=>{window.document.execCommand("insertText",!1,M)}).catch(M=>{})},T=j=>{let M=0,Z="",V=j.replace(/\D/g,"");V===""&&(k=!0);let se=V.split(""),we="";se.forEach(nt=>{k&&(we+=nt,k&&(w=(""+we).length,v=i.replace(new RegExp("[0-9]","g"),"_"),Z=""),w>(""+we).length&&(k=!0,v=i.replace(new RegExp("[0-9]","g"),"_"),Z=""))});let Be=v.replace(/\D/g,"");return Be.length>=V.length&&(V=Be),{q:v.replace(/[_\d]/g,function(){return V.charAt(M++)||"_"}),i:M,v:V,f:Z}},N=j=>{j.preventDefault(),navigator.clipboard.writeText(j.target.textContent.replace(/\D/g,"")).then(function(){h.Notice.Copy("Данные в буфер обмене")},function(M){})},y=T(e),C=j=>{let M=T(j.target.textContent);j.target.textContent=M.q,M.i=M.q.lastIndexOf(M.v.substr(-1)),M.i<M.q.length&&M.q!==v?M.i++:M.i=M.q.indexOf("_"),D(M.i,j.target),t&&t({value:M.q.replace(/\D/g,""),name:a})},$=j=>{j.key==="Enter"&&j.preventDefault()};const E=j=>{W.Blur(j),n&&n({value:j.target.textContent.replace(/\D/g,""),name:a})},L={};L.field="input",b&&(L.className=b);let I={};return _&&d?(I.edit="true",I.contentEditable=W.ContentEditable):I.contentEditable="false",o&&(I.placeholder=o),p&&(I.after=p),l?r.jsx(r.Fragment,{}):r.jsxs("dl",{...L,children:[s&&r.jsx("dt",{children:s}),r.jsx("dd",{...I,onPaste:z,onInput:C,onKeyDown:$,onContextMenu:N,onBlur:E,suppressContentEditableWarning:!0,children:y.q}),c&&r.jsx("em",{children:c})]})}const rs={Color:Pn,Date:wt,Code:$n,Check:Un,Switch:Tn,Input:Ze,Button:zn,Message:Bn,Generator:Ln,Captcha:Mn,Modal:kt,Money:Ct,Mask:ns,Month:An,Notes:Fn,Number:jt,Password:On,Phone:Et,Search:qn,Select:It,Set:Nt,Textarea:Rn,Time:Zn,Users:Dt,String:Ze,Toogle:Wn,Group:Gn,Options:Kn,Progress:Hn},Jn={spinner:"_spinner_o487n_1",l:"_l_o487n_75",loadingB:"_loadingB_o487n_1"};function as(){return r.jsx("div",{className:Jn.spinner,children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:r.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 is(){return r.jsxs("div",{className:Jn.l,children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})}const os={Spinner:as,Inline:is},Xn={ph:"_ph_1wjxu_1",e:"_e_1wjxu_5"},ss=({title:e,affter:t,onDynamicURL:n,children:a,button:i,page:o,tabs:s=[],className:c="",modules:l,loading:_})=>{const[d]=h.Router.useTabs(s.map(g=>g.id).includes(h.Router.getTabs())?h.Router.getTabs():o),[p,f]=m.useState(!1);return m.useEffect(()=>{f(!0)},[]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:[Xn.ph,c].join(" "),children:[r.jsx(cs,{title:e,affter:t}),r.jsx("div",{className:Xn.e}),r.jsx(ds,{button:i})]}),s.length>0&&r.jsx(vn,{list:s,active:d}),a,p&&r.jsx(ls,{onDynamicURL:n,loading:_,m:l,t:d})]})};let ls=({m:e,t,loading:n,onDynamicURL:a})=>{const i=m.lazy(()=>Ye(e+"/pages/"+t+".tsx"));return a&&a((e+"/"+t).toLowerCase()),r.jsx(m.Suspense,{fallback:n,children:r.jsx(i,{})})},ds=({button:e})=>{const[t,n]=m.useState(e);return gt("button",n),r.jsxs(r.Fragment,{children:[" ",t]})},cs=({title:e,affter:t})=>{const[n,a]=m.useState(r.jsxs(r.Fragment,{children:[e," ",t]}));return gt("title",a),r.jsx("h2",{children:n})};const _s={Lite:ss},Vn={s:"_s_t9swc_1"};let Tt;function us({className:e,placeholder:t}){let n=s=>{Tt(s.target.textContent)},a=s=>{s.key==="Enter"&&s.preventDefault()},i=s=>{s.preventDefault(),navigator.clipboard.readText().then(c=>{window.document.execCommand("insertText",!1,c)}).catch(c=>{})};const o={};return t&&(o.placeholder=t),o.className=e?[Vn.s,e].join(" "):Vn.s,r.jsx("div",{onPaste:i,onInput:n,onKeyDown:a,contentEditable:"plaintext-only",...o,suppressContentEditableWarning:!0})}function fs(e,t,n){let a=[],i=1,o=0,s={},c=50;return s[i]=[],e.forEach(l=>{l.text.toLowerCase().indexOf(t)>-1&&a.push(l.id)}),a.forEach(l=>{o++,o<=c||(i++,o=1,s[i]=[]),s[i].push(n[l])}),s}function ms(e){Tt=e}function ps(e){Tt=e}const hs={Field:us,Run:fs,Get:ms,useValue:ps};function gs(){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"}),r.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 xs(){return r.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[r.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"}),r.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"}),r.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 bs(){return r.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:r.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 vs={f:"_f_q3r0i_1"};let _e={};function ys(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(i=>{i!=="sort"&&(n[i]=t.data[i],e.take[i]="999")}),{...e,data:n,take:e.take};case"size":return{...e,size:t.size};case"take":let a={[t.list]:t.take};a={...e.take,...a},e.active=!1;for(let i in a)a[i]!=="999"&&(e.active=!0);return _e.get(a,e.active),{...e,take:a,active:e.active};case"exit":for(let i in e.take)e.take[i]="999";return _e.get&&_e.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function ws(){const[e,t]=m.useReducer(ys,{open:!1,view:null,data:{},take:{},size:0,active:!1});return _e.set=n=>{t({type:"data",data:n})},_e.count=n=>{t({type:"size",size:n})},_e.reset=()=>{t({type:"exit"})},r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:vs.f,onClick:()=>{t({type:"open",open:!0})},children:[r.jsx(bs,{}),e.active&&r.jsxs("i",{children:[e.size,"1"]})]}),e.open?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),r.jsxs("div",{className:"filter m",children:[r.jsx("div",{className:"filter l",children:Object.keys(e.data).map(n=>r.jsx(Es,{data:n,dispatch:t,state:e},n))}),r.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):r.jsx(r.Fragment,{})]})}function ks(e){_e.get=e}function Cs(e){_e.set!==void 0&&_e.set(e)}function js(e){_e.reset!==void 0&&_e.reset(e)}function Ss(e,t,n,a){let i=[],o=1,s=0,c={},l=50;return c[o]=[],a===!0&&(Object.keys(t).forEach(_=>{Number.parseInt(t[_])!==999&&(e=e.filter(d=>Number.parseInt(d[_])===Number.parseInt(t[_])))}),Qn(e.length)),e.forEach(_=>{i.push(_.id)}),i.forEach(_=>{s++,s<=l||(o++,s=1,c[o]=[]),c[o].push(n[_])}),c}function Qn(e){_e.count(e)}function Es({data:e,state:t,dispatch:n}){let a=()=>{n({type:"view",view:e})},i=()=>{n({type:"take",list:e,take:"999"})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"filter s",children:[r.jsxs("div",{onClick:a,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?r.jsx("div",{onClick:i,className:"filter x","data-icon":"F038"}):""]}),r.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,s)=>r.jsx(Is,{data:t.data[e].list[o],head:e,type:o,dispatch:n,state:t},s))})]})}function Is({data:e,head:t,state:n,dispatch:a,type:i}){if(i!=="999"&&e.count===void 0)return"";const o=()=>{a({type:"take",list:t,take:i})};return r.jsxs("div",{className:"filter a",onClick:o,"set-active":(n.take[t]===i)+"",children:[e.name,r.jsx("div",{className:"filter e",children:e.count})]})}const Ds={Button:ws,useValue:ks,Set:Cs,Run:Ss,Count:Qn,Reset:js},Ns={n:"_n_euuvm_1"};let tt={},zt=[];const Ts=(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(i=>i.id!==t.id);return{...e,news:n,active:n.length!==0};case"size":return{...e,size:t.size};case"take":let a={[t.list]:t.take};a={...e.take,...a},e.active=!1;for(let i in a)a[i]!=="999"&&(e.active=!0);return tt.get(a,e.active),{...e,take:a,active:e.active};case"exit":return e;default:throw new Error}};function zs(e){tt.fn({action:"add",data:e})}function Bs(e){tt.fn({action:"add",data:e})}function Ls(e){tt.fn=e}function Ms(){const[e,t]=m.useReducer(Ts,{open:!1,active:!1,news:[],take:{}});Ls(async a=>{switch(a.action){case"add":zt.push(a.data);break}}),m.useEffect(()=>{setInterval(()=>{zt.forEach((a,i)=>{t({type:"add",data:{module:a.module,type:a.type,id:a.id,datetime:a.datetime,txt:a.title}}),a.datetime<new Date().getTime()&&zt.splice(i,1)})},6e4)},[]);let n=async a=>{t({type:"hide",id:a.id})};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ns.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?r.jsx(xs,{}):r.jsx(gs,{})}),e.open?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),r.jsxs("div",{className:"notify-m",children:[r.jsx("div",{className:"notify-l",children:e.news.map((a,i)=>r.jsx($s,{data:a,dispatch:t},i))}),r.jsx("div",{className:"notify-b",onClick:n,children:"История"})]})]}):""]})}const $s=({data:e,dispatch:t})=>{let n=async a=>{t({type:"hide",id:a.id})};return r.jsxs("div",{className:"notify-i",children:[r.jsx("div",{className:"--icon","data-icon":e.type}),r.jsxs("div",{className:"--body",children:[r.jsx("div",{className:"--name",children:e.type}),r.jsx("div",{className:"--text",children:e.txt})]}),r.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>n(e),children:" "})]})},Ps={Bell:Ms,Send:Bs,Add:zs},er={p:"_p_djnh1_1",l:"_l_djnh1_38"};function As(e){let t=3,n=e.page,a=e.count,i=[],o=()=>{i.push({page:1}),i.push({text:"..."})},s=()=>{i.push({text:"..."}),i.push({page:a})},c=(l,_)=>{for(let d=l;d<_;d++)i.push({page:d})};return a<t*2+6?c(1,a+1):n<t*2+1?(c(1,t*2+4),s()):n>a-t*2?(t=a>1e4?1:t,o(),c(a-t*2-2,a+1)):(t=a>1e4?1:t,o(),c(n-t,n+t+1),s()),i.length===1?r.jsx(r.Fragment,{}):r.jsxs("div",{className:er.p,children:[r.jsx("i",{onClick:()=>e.onChangePage(n-1),children:r.jsx("svg",{viewBox:"0 0 24 24",children:r.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"})})}),i.map((l,_)=>{const d={};return l.page&&(d.onClick=()=>e.onChangePage(l.page)),l.page===e.page&&(d.active=""),m.createElement("span",{...d,key:_},l.page||l.text)}),r.jsx("i",{onClick:()=>e.onChangePage(n+1),children:r.jsx("svg",{viewBox:"0 0 24 24",children:r.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 Fs(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 tr({load:e,list:t,item:n}){const a=m.useRef(null),[i,o]=m.useReducer(Fs,{load:!1,list:[],data:{},page:1,wait:!1,item:n});m.useEffect(()=>{t!==null&&o({type:"load",load:e,data:t})},[e]);let s=c=>{if(c===0)return c=1;if(c>i.size)return c=i.size;o({type:"page",page:c})};return m.useEffect(()=>{},[i]),r.jsxs(r.Fragment,{children:[r.jsx("div",{className:er.l,ref:a,children:r.jsx(Dn,{"el-empty":"Данные не найдены",children:i.load&&i.list!==void 0?i.list.map(c=>r.jsx(i.item,{data:c},c.id)):r.jsxs("div",{"type-data":"load",children:[r.jsx("i",{}),r.jsx("i",{}),r.jsx("i",{})]})})}),i.load&&i.list!==void 0?r.jsx(As,{page:i.page,count:i.size,onChangePage:s}):r.jsx(r.Fragment,{})]})}const Os={Pagination:tr};function qs({head:e,load:t,list:n,item:a}){const i=e;return r.jsxs(r.Fragment,{children:[r.jsx(i,{}),In.getSetting("s05")===1?r.jsx(tr,{list:n,load:t,item:a}):r.jsx(Nn,{list:n,load:t,item:a})]})}function Rs(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 Bt={};function Zs(e){Bt.get=e}function Us(e){Bt.get&&Bt.get(e)}const Ws={View:qs,Reducer:Rs,useValue:Zs,Lite:Sn,setValue:Us},Gs={addDictionary:zi,getDictionary:Mi,setDictionary:Li,current:$i};async function Ks(){let e=await dn(),t={};return Object.keys(e).forEach(n=>{t[e[n].id]={},t[e[n].id].name=e[n].a}),t}const Ys={Get:Ks},Hs=function({title:e,children:t,imp:n,button:a,page:i,tabs:o,modules:s}){const[c]=h.Router.useTabs(i),[l,_]=m.useState(!1);return m.useEffect(()=>{_(!0)},[]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"list-info",children:[r.jsx("h2",{children:e}),r.jsx("div",{className:"empty"}),r.jsx(Xs,{button:a})]}),l&&r.jsx(Js,{imp:n,modules:s,t:c}),t]})};let Js=({modules:e,t})=>{const n=m.lazy(()=>Ye(e+"/pages/"+t+".tsx"));return r.jsx(m.Suspense,{fallback:"",children:r.jsx(n,{})})},Xs=({button:e})=>{const[t,n]=m.useState(e);return de.useListener("button",n),r.jsxs(r.Fragment,{children:[" ",t]})};const Vs={Open:Ei};function Qs({active:e,onActive:t,id:n,name:a}){const[i,o]=m.useState(!!e);m.useEffect(()=>{o(!!e)},[e]);let s=()=>{let c=i?0:1;o(!i),t&&t({value:c,is:!i,name:a,id:n,setActive:o})};return r.jsx("div",{role:"switch",onClick:s,"aria-checked":`${i?"true":"false"}`})}h.Action=yn,h.Animation=_i,h.Badge=To,h.Bookmarks=lo,h.Browser=Gi,h.Button=xn,h.Chart=so,h.Company=Ys,h.Component=ct,h.DataBase=Lo,h.Event=de,h.Events=de,h.Files=Fo,h.Filter=Ds,h.Form=ts,h.Format=G,h.HotKey=$o,h.Icon=ho,h.Init=gn,h.Input=rs,h.Lang=Gs,h.Layout=_s,h.List=Ws,h.Lite=vo,h.Loading=os,h.Notifications=Ps,h.Pagination=Os,h.Phone=Vs,h.Root=jn,h.Scrolling=Nn,h.Search=hs,h.Setting=io,h.Sistym=Mo,h.Store=ye,h.Switch=Qs,h.Tabs=Xi,h.Test=Hs,h.Triage=Io,h.User=In,h.WebRTC=H,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
|