@elcrm/telegram 0.0.51 → 0.0.53
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/Form/Date.d.ts +1 -1
- package/dist/Format/ArrayGroup.d.ts +7 -0
- package/dist/Format/ArraySort.d.ts +8 -0
- package/dist/Format/ArraySortDate.d.ts +8 -0
- package/dist/Format/ArraySortFunction.d.ts +9 -0
- package/dist/Format/ArraySumma.d.ts +7 -0
- package/dist/Format/Money.d.ts +1 -1
- package/dist/Format/Month.d.ts +1 -1
- package/dist/Format/SelectParams.d.ts +1 -0
- package/dist/Format/Translit.d.ts +1 -0
- package/dist/Format/isNumeric.d.ts +1 -0
- package/dist/index.es.js +5 -5
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/Form/Date.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function ({
|
|
1
|
+
export default function ({ title, value, placeholder, onValue, name, onSave, className, }: any): import("react/jsx-runtime").JSX.Element;
|
package/dist/Format/Money.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function (n: any): string;
|
|
1
|
+
export default function (n: any, d?: number): string;
|
package/dist/Format/Month.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (type: string, id: number | string, p: string, unknown?: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (w: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (s: any): Boolean;
|
package/dist/index.es.js
CHANGED
|
@@ -2087,7 +2087,7 @@ function Ia(e) {
|
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
2089
|
function Na(e) {
|
|
2090
|
-
return {
|
|
2090
|
+
return e = typeof e == "number" ? e : new Date(e).getMonth() + 1, {
|
|
2091
2091
|
1: { val: "01", name: "Январь", names: "Января", abc: "Янв" },
|
|
2092
2092
|
2: { val: "02", name: "Февраль", names: "Февраля", abc: "Февр" },
|
|
2093
2093
|
3: { val: "03", name: "Март", names: "Марта", abc: "Март" },
|
|
@@ -2102,8 +2102,8 @@ function Na(e) {
|
|
|
2102
2102
|
12: { val: "12", name: "Декабрь", names: "Декабря", abc: "Дек" }
|
|
2103
2103
|
}[e];
|
|
2104
2104
|
}
|
|
2105
|
-
function Da(e) {
|
|
2106
|
-
return parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1 ");
|
|
2105
|
+
function Da(e, t) {
|
|
2106
|
+
return t && (e = Number(e) / t), parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1 ");
|
|
2107
2107
|
}
|
|
2108
2108
|
function Ma(e, t) {
|
|
2109
2109
|
let r = t + "";
|
|
@@ -2154,7 +2154,7 @@ const ve = {
|
|
|
2154
2154
|
ObjectByArray: La
|
|
2155
2155
|
};
|
|
2156
2156
|
function ht({
|
|
2157
|
-
|
|
2157
|
+
title: e,
|
|
2158
2158
|
value: t,
|
|
2159
2159
|
placeholder: r,
|
|
2160
2160
|
onValue: s,
|
|
@@ -2184,7 +2184,7 @@ function ht({
|
|
|
2184
2184
|
let b = !1;
|
|
2185
2185
|
const v = {};
|
|
2186
2186
|
return v.field = "input", l && (v.className = l), /* @__PURE__ */ n.jsxs("dl", { ...v, children: [
|
|
2187
|
-
e && /* @__PURE__ */ n.jsx("dt", { children:
|
|
2187
|
+
e && /* @__PURE__ */ n.jsx("dt", { children: e }),
|
|
2188
2188
|
/* @__PURE__ */ n.jsx("dd", { children: /* @__PURE__ */ n.jsx(
|
|
2189
2189
|
"input",
|
|
2190
2190
|
{
|
package/dist/index.umd.js
CHANGED
|
@@ -28,4 +28,4 @@ Check the top-level render call using <`+w+">.")}return h}}function On(s,h){{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} />`,kt,ye,No,ye),An[ye+kt]=!0}}return s===i?Eo(q):So(q),q}}function Bo(s,h,w){return qn(s,h,w,!0)}function To(s,h,w){return qn(s,h,w,!1)}var Io=To,$o=Bo;Te.Fragment=i,Te.jsx=Io,Te.jsxs=$o}()),Te}process.env.NODE_ENV==="production"?Qe.exports=Wr():Qe.exports=Zr();var n=Qe.exports;const Lt={notice:"_notice_q5jau_1",error:"_error_q5jau_10",success:"_success_q5jau_13",warning:"_warning_q5jau_16",copy:"_copy_q5jau_19","show-notice":"_show-notice_q5jau_1","hide-notice":"_hide-notice_q5jau_1"};let ce={};function Ur(){let[e,t]=_.useState([]);return ce.set=r=>{t([...e,r])},ce.del=r=>{t(e.filter(i=>i.key!==r))},e.length===0?"":n.jsx("ul",{className:Lt.notice,children:e.map(r=>r.item)})}function Ie({data:e}){let[t,r]=_.useState("show");_.useEffect(()=>{setTimeout(function(){r("hide")},1800),setTimeout(function(){ce.del(e.key)},2500)},[e.key]);let i;switch(e.type){case"error":i=n.jsx(he.error,{});break;case"success":i=n.jsx(he.success,{});break;case"copy":i=n.jsx(he.success,{});break;case"remark":i=n.jsx(he.success,{});break;default:i=n.jsx(he.success,{});break}return n.jsxs("li",{className:"item "+Lt[e.type],"data-status":t,children:[i,n.jsx("p",{children:e.text})]})}function Yr(e){let t=Date.now(),r={key:t,...e};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}function Kr(e){let t=Date.now(),r={key:t,text:e,type:"error"};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}function Hr(e){let t=Date.now(),r={key:t,text:e,type:"success"};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}function Gr(e){let t=Date.now(),r={key:t,text:e,type:"remark"};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}function Vr(e){let t=Date.now(),r={key:t,text:e,type:"copy"};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}const he={};he.error=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.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:"#fff"}),n.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:"#bb2014"})]}),he.success=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.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:"#fff"}),n.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:"#367738"})]});const et={alerts:"_alerts_1pds5_1",menuAnimation:"_menuAnimation_1pds5_1",menuItemAnimation:"_menuItemAnimation_1pds5_1","--body":"_--body_1pds5_103",allert:"_allert_1pds5_111","--form":"_--form_1pds5_111",al:"_al_1pds5_1"};let $e={};function Xr(){let[e,t]=_.useState("");return $e.set=r=>t(r),$e.del=()=>t(""),n.jsx(n.Fragment,{children:e})}const Jr=({data:e,callback:t})=>(e.button=e.button===void 0?"Подтвердить":e.button,n.jsxs("div",{className:et.alerts,children:[n.jsxs("dl",{children:[n.jsx("dt",{children:e.title}),n.jsx("dd",{children:e.text}),n.jsx("ul",{children:n.jsx("button",{"data-color":e.color||"blue",onClick:()=>{t(),$e.del()},children:e.button})})]}),n.jsx("div",{className:et["--body"],onClick:$e.del})]}));function Qr(e,t){$e.set(n.jsx(Jr,{data:e,callback:t}))}const At={btn:"_btn_1hz2s_6",confirm:"_confirm_1hz2s_19"};function qt({onClick:e,onSend:t,label:r,onRef:i}){let[a,o]=_.useState(!1);const l=()=>{if(e)return e();a||(o(!0),t&&t(o))};return n.jsx("button",{ref:i,className:[At.btn,At.confirm].join(" "),onClick:l,children:a?"Ожидайте":r})}const Q={white:"_white_11p39_14",black:"_black_11p39_26",shake:"_shake_11p39_1",modal:"_modal_11p39_73",o:"_o_11p39_83",w:"_w_11p39_14",h:"_h_11p39_107",l:"_l_11p39_121",t:"_t_11p39_159",m:"_m_11p39_73",x:"_x_11p39_167",s:"_s_11p39_177",c:"_c_11p39_182",f:"_f_11p39_187",btn:"_btn_11p39_230",g:"_g_11p39_243","size-a":"_size-a_11p39_296","size-s":"_size-s_11p39_300","size-m":"_size-m_11p39_304","size-l":"_size-l_11p39_308","size-x":"_size-x_11p39_312","size-f":"_size-f_11p39_316",confirm:"_confirm_11p39_322",cancel:"_cancel_11p39_327",disabled:"_disabled_11p39_332",await:"_await_11p39_339",active:"_active_11p39_389",coincidence:"_coincidence_11p39_395",sa:"_sa_11p39_431",ss:"_ss_11p39_435",sm:"_sm_11p39_439",sl:"_sl_11p39_443",sx:"_sx_11p39_447",sf:"_sf_11p39_451"};let ge={};function ei({config:e}){let[t,r]=_.useState([]);return ge.x=i=>{i||r([])},ge.config=e,ge.add=i=>{r([...t,i])},n.jsx(n.Fragment,{children:t.map(i=>i)})}function ti({title:e,children:t,button:r,tabs:i,size:a="m",menu:o}){const[l,d]=_.useState(!0),c=_.useRef(),u=p=>{if(r){if(r.onClick)return p(!1),r.onClick({setOpen:d});if(r.onSend)return r.onSend({setOpen:d,disabled:p})}},f=()=>{c.current.setAttribute("shake",!0),setTimeout(()=>{c.current.setAttribute("shake",!1)},1e3)};return n.jsx(n.Fragment,{children:l?n.jsxs("div",{className:`${Q.modal} ${Q.white}`,children:[n.jsx("div",{className:Q.o,onClick:f}),n.jsxs("div",{className:[Q.w,Q[`s${a}`]].join(" "),ref:c,children:[n.jsxs("div",{className:Q.h,children:[n.jsx("div",{className:Q.t,children:e}),n.jsxs("div",{className:Q.m,children:[i&&n.jsx("nav",{children:i.map((p,g)=>n.jsx("span",{onClick:p.onClick,className:p.active?"active":"",children:p.name},g))}),o]}),n.jsx("div",{className:Q.x,onClick:()=>{d(!1)},children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t,r!==void 0?n.jsx(qt,{label:r.label,onSend:u}):""]})]}):""})}function ni(e){ge.add(n.jsx(ri,{children:e},String(Date.now())))}function ri({children:e}){return n.jsx(n.Fragment,{children:e})}function ii(e){if(e.target.classList[0]!=="modal")return;let t=e.target.children[0];t.setAttribute("shake",!0),setTimeout(()=>{t.setAttribute("shake",!1)},1e3)}function ai({type:e,name:t,params:r}){let[i,a]=_.useState(null);return _.useEffect(()=>{ge.config(e,t,r,a)},[r.id]),n.jsx(n.Fragment,{children:i})}function oi(e,t){ge.config(e,t)}function si(e){ge.x(e)}const tt={};function li(e,t){tt[e]=t}function di(e,t){tt[e]!==void 0&&tt[e](t)}const ue={};function ci(e,t){const[r,i]=_.useState(t);return _.useEffect(()=>{if(ue[e])return ue[e].push(i);ue[e]=[i]},[]),[r]}function ui(e,t){if(ue[e])return ue[e].push(t);ue[e]=[t]}function fi(e,t){ue[e]&&ue[e].forEach(r=>r(t))}const Le={setListener:di,useListener:li,setEmitter:fi,useEmitter:ci,subEmitter:ui};function pi(){let[e,t]=_.useState([]);return Le.useListener("form",r=>{t([r])}),n.jsx(n.Fragment,{children:e.map(r=>r)})}const ae={Path:ur,setPage:Qn,getPage:St,usePage:Jn,isPage:er,setModule:nr,getModule:Et,useModule:tr,isModule:rr,setTabs:ar,getTabs:Pe,useTabs:ir,isTabs:or,useId:sr,setId:dr,subId:lr,getId:Bt,isId:cr},Ae={Send:Yr,Error:Kr,Remark:Gr,Success:Hr,Copy:Vr},Wt=({onClick:e,active:t})=>(t=!!t,n.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));function Zt({onClick:e,onSend:t,name:r,onRef:i}){let[a,o]=_.useState(!1);const l=()=>{if(e)return e();a||(o(!0),t&&t(o))};return n.jsx("button",{ref:i,"data-form":"button",className:a?"btn await":"btn confirm pointer",onClick:l,children:a?"Ожидайте":r})}function Ut({value:e,onValue:t,onActive:r,data:i,name:a,view:o,edit:l=!0,active:d=!0,placeholder:c="Введите сообщение"}){const u=_.useRef({value:e,timerId:null,shift:!1,send:!0}),f=()=>{u.current.value.length>0?u.current.send&&(r(!0),u.current.send=!1,u.current.timerId=setTimeout(()=>{u.current.send=!0},3e3)):r(!1)},p=m=>{u.current.value=m.target.textContent,f()},g=m=>{m.keyCode===16&&(u.current.shift=!0),m.keyCode===13&&!u.current.shift&&(m.preventDefault(),u.current.value.length!==0&&(m.target.textContent="",i&&i(u.current.value),t&&t(u.current.value),u.current.value="",r(!1)))},x=m=>{m.keyCode===16&&(u.current.shift=!1)},v=m=>{m.preventDefault(),navigator.clipboard.readText().then(k=>{window.document.execCommand("insertText",!1,k)}).catch(k=>{})},y=()=>{r(!1)},b={spellCheck:"true"};return c&&(b.placeholder=c),l&&d&&(b.contentEditable="plaintext-only"),n.jsx("dl",{"data-form":"message",children:n.jsx("dd",{onPaste:v,onInput:p,onKeyUp:x,onKeyDown:g,onBlur:y,...b,suppressContentEditableWarning:!0,children:e})})}function Yt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,a=e.placeholder!==void 0?e.placeholder:"",o=c=>{e.onValue({value:c.target.textContent,name:e.name})},l=c=>{c.key==="Enter"&&c.preventDefault()},d=c=>{c.preventDefault(),navigator.clipboard.readText().then(u=>{window.document.execCommand("insertText",!1,u)}).catch(u=>{})};return n.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),n.jsx("dd",{onPaste:d,onInput:o,onKeyDown:l,contentEditable:r&&i?"plaintext-only":"false","data-placeholder":a,suppressContentEditableWarning:!0,children:e.value})]})}let me={};me.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},me.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},me.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},me.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()};function Kt({value:e,onValue:t,placeholder:r="",name:i}){let a=(x,v)=>Number(Math.round(x+Math.random()*(v-x))),o=_.useRef(null),l=_.useRef(null),d=a(1e4,99999),c=x=>{x.key!=="Backspace"&&(x.key==="Enter"&&x.preventDefault(),x.target.textContent.length===5&&x.preventDefault(),/\d/.test(x.key)||x.preventDefault())},u=x=>{t({value:Number(x.target.textContent)===d,name:i})},f=x=>{x.preventDefault(),navigator.clipboard.readText().then(v=>{window.document.execCommand("insertText",!1,v.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(v=>{})};_.useEffect(()=>{const x=o.current,v=x.getContext("2d");v.clearRect(0,0,x.width,x.height),v.font="30px brush script mt",v.fillStyle="#eee",v.textAlign="center",v.fillText(d,50,27),l.current.textContent=""},[d]);const p={};p.field="captcha";const g={};return r&&(g.placeholder=r),n.jsxs("dl",{...p,children:[n.jsx("dd",{ref:l,onPaste:f,onInput:u,onBlur:me.Blur,onKeyDown:c,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,...g}),n.jsx("canvas",{ref:o,width:"100",height:"35"})]})}function Ht(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},a=u=>{u.preventDefault(),u.target.textContent=u.target.textContent.slice(-1).replace(/[^+\d]/g,"");let f=window.getSelection(),p=u.target.textContent.length;if(i[u.target.id]=u.target.textContent,i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6,f.collapse(u.target.firstChild,1),p===0){u.target.blur(),u.target.focus();return}u.target.nextSibling!=null&&u.target.nextSibling.focus()},o=u=>{if(u.key==="Enter"&&u.preventDefault(),u.key==="Backspace"){if(u.preventDefault(),u.target.textContent="",i[u.target.id]="",u.target.previousSibling!=null){let f=u.target.previousSibling.id.slice(1);u.target.previousSibling.textContent="",i["n"+f]="",u.target.previousSibling.focus()}i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6}},l=u=>{if(e.real)e.onValue({value:i.code,name:e.name});else if(i.code.length===6&&(e.onValue({value:i.code,name:e.name}),e.empty)){i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let f=1;f<=6;f++){let p=document.getElementById("n"+f);p&&(p.textContent="")}}},d=u=>{u.target.textContent=""},c=u=>{u.preventDefault()};return n.jsxs("dl",{"data-form":"code",children:[t(),n.jsxs("div",{children:[n.jsx("dd",{id:"n1",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n2",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n3",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n4",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n5",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n6",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0})]}),r()]})}function Gt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"";e.edit!==void 0&&e.edit,e.active!==void 0&&e.active;let[i,a]=_.useState(e.value),o=l=>{let d=l.target.getAttribute("set-color");a(d),e.onValue({value:d,name:e.name})};return n.jsx(n.Fragment,{children:e.view==="icon"?n.jsx("i",{"data-icon":"F043"}):n.jsxs("dl",{children:[t(),n.jsxs("dd",{"el-val":i,children:[n.jsx("em",{onClick:o,"set-color":"0"}),n.jsx("em",{onClick:o,"set-color":"1"}),n.jsx("em",{onClick:o,"set-color":"2"}),n.jsx("em",{onClick:o,"set-color":"3"}),n.jsx("em",{onClick:o,"set-color":"4"}),n.jsx("em",{onClick:o,"set-color":"5"})]}),r()]})})}function xi(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let r={yyyy:e.getFullYear(),yy:(""+e.getFullYear()).slice(-2),mm:("0"+(e.getMonth()+1)).slice(-2),dd:("0"+e.getDate()).slice(-2),HH:("0"+e.getHours()).slice(-2),MM:("0"+e.getMinutes()).slice(-2),SS:("0"+e.getSeconds()).slice(-2),__:" ",_:" "};for(const i in r)t=t.replace(i,r[i]);return t}function hi(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],r=new Date(e);return{day:(""+r.getFullYear()).slice(-2)+""+("0"+(r.getMonth()+1)).slice(-2)+("0"+r.getDate()).slice(-2),name:r.getDate()+" "+t[r.getMonth()]}}const gi=e=>{function t(E,T){var z,R,I;E=E??"",T=T??1;for(var z=[],I=0,R=E.length;I<R;)z.push(E.slice(I,I+=T));return z}function r(E,T){var z=[2,0,1,1,1,2];return T[E>4&&E<20?2:z[Math.min(E,5)]]}var i={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},a,o,l,d,b,c,u,y,f,p,g,x;f=parseFloat(e).toFixed(2).split("."),c=f[0],d=f[1];var v=12-c.length;if(v<0)return!1;for(var y=[];v--;)y.push("0");c=y.join("")+c;var b=[];if(c>0){p=t(c,3);for(var m=-1;m<p.length;m++)if(u=p[m],u>0&&(g=t(u,1),a=parseInt(g[0]),o=parseInt(g[1]),l=parseInt(g[2]),b.push(i.a100[a-1]),x=m+1==3?"a2":"a1",o>1?b.push(i.a20[o-2]+(l>0?" "+i[x][l-1]:"")):b.push(o>0?i.a10[l]:i[x][l-1]),p.length>m+1)){var k=i["u"+(m+1)];b.push(r(u,k))}}else b.push(i.null);return b.push(r(c,i.ur)),b.push(d+" "+r(d,i.uc)),b.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function mi(e){let t=-1,r=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+r[t]}function _i(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 bi(e,t,r,i){let a={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 l in this.rules)for(var d in this.rules[l])for(var c=0,u=this.rules[l][d].length;c<u;c++)this.rules[l][d][c]=this.rule(this.rules[l][d][c])},rule:function(l){var d=l.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return d?{sex:d[1],test:d[2].split(","),mods:[d[3],d[4],d[5],d[6],d[7]]}:!1},word:function(l,d,c,u){if(u===this.gcaseNom)return l;if(l.match(/[-]/)){for(var f=l.split("-"),p=0,g=f.length;p<g;p++)f[p]=this.word(f[p],d,c,u);return f.join("-")}if(l.match(/^[А-ЯЁ]\.?$/i))return l;this.init();var x=this.rules[c];let v;return x.exceptions&&(v=this.pick(l,d,u,x.exceptions,!0),v)?v:(v=this.pick(l,d,u,x.suffixes,!1),v||l)},pick:function(l,d,c,u,f){let p=l.toLowerCase();for(var g=0,x=u.length;g<x;g++)if(this.ruleMatch(p,d,u[g],f))return this.applyMod(l,c,u[g]);return!1},ruleMatch:function(l,d,c,u){if(c.sex===this.sexM&&d===this.sexF||c.sex===this.sexF&&d!==this.sexF)return!1;for(var f=0,p=c.test.length;f<p;f++){var g=u?l:l.substr(Math.max(l.length-c.test[f].length,0));if(g===c.test[f])return!0}return!1},applyMod:function(l,d,c){let u;switch(d){case this.gcaseNom:u=".";break;case this.gcaseGen:u=c.mods[0];break;case this.gcaseDat:u=c.mods[1];break;case this.gcaseAcc:u=c.mods[2];break;case this.gcaseIns:u=c.mods[3];break;case this.gcasePos:u=c.mods[4];break}for(var f=0,p=u.length;f<p;f++){var g=u.substr(f,1);switch(g){case".":break;case"-":l=l.substr(0,l.length-1);break;default:l+=g}}return l},getSex:()=>{if(a.mn.length>2)switch(a.mn.substr(a.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:l=>((a.fullNameSurnameLast?"":a.lastName(l)+" ")+a.firstName(l)+" "+a.middleName(l)+(a.fullNameSurnameLast?" "+a.lastName(l):"")).replace(/^ +| +$/g,""),lastName:l=>a.word(a.ln,a.sex,"lastName",l),firstName:l=>a.word(a.fn,a.sex,"firstName",l),middleName:l=>a.word(a.mn,a.sex,"middleName",l)};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],r=o[3],a.fullNameSurnameLast=!0):(e=o[1],t=o[3],r=o[5])}return a.ln=e,a.fn=t||"",a.mn=r||"",a.sex=i||a.getSex(),a}function vi(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 yi(e){return{1:{val:"01",name:"Январь",names:"Января",abc:"Янв"},2:{val:"02",name:"Февраль",names:"Февраля",abc:"Февр"},3:{val:"03",name:"Март",names:"Марта",abc:"Март"},4:{val:"04",name:"Апрель",names:"Апреля",abc:"Апр"},5:{val:"05",name:"Май",names:"Мая",abc:"Май"},6:{val:"06",name:"Июнь",names:"Июня",abc:"Июнь"},7:{val:"07",name:"Июль",names:"Июля",abc:"Июль"},8:{val:"08",name:"Август",names:"Августа",abc:"Авг"},9:{val:"09",name:"Сентябрь",names:"Сентебря",abc:"Сент"},10:{val:"10",name:"Октябрь",names:"Октября",abc:"Окт"},11:{val:"11",name:"Ноябрь",names:"Ноября",abc:"Нояб"},12:{val:"12",name:"Декабрь",names:"Декабря",abc:"Дек"}}[e]}function wi(e){return parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function ki(e,t){let r=t+"";for(;r.length<e;)r="0"+r;return r}function ji(e,t,r){let i=t/e*r;return(typeof i!="number"||i===1/0)&&(i=0),parseFloat(i).toFixed(1)}function Ci(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Si(e,t){e=Math.abs(e)%100;let r=e%10;return e>10&&e<20?t[2]:r>1&&r<5?t[1]:r===1?t[0]:t[2]}function Ei(e,t,r){return xe(e,t)?xe(e,t).n:r||""}function Bi(e,t){return e.reduce(function(r,i){let a=t instanceof Function?t(i):i[t];return r[a]!==void 0||(r[a]={}),r[a][i.id]=i,r},{})}function Ti(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}const fe={Age:Ti,Date:xi,MoneyString:gi,DateSort:hi,Size:mi,TypeFiles:_i,Cases:bi,Initials:vi,Month:yi,Money:wi,Number:ki,Percent:ji,CapitalizeFirstLetter:Ci,DeclensionWord:Si,Select:Ei,ObjectByArray:Bi};function nt({label:e,value:t,placeholder:r,onValue:i,name:a,onSave:o,className:l}){const d="__.__.____",c=new Set("_"),u=(m=>Array.from(d,(k,E)=>c.has(k)?m=E+1:m))(0),f=[...d].findIndex(m=>c.has(m)),p=new RegExp("\\d","g"),g=m=>(m=m.match(p)||[],Array.from(d,k=>(m[0]===k||c.has(k))&&m.shift()||k)),x=m=>{const[k,E]=[m.target.selectionStart,m.target.selectionEnd].map(T=>(T=g(m.target.value.slice(0,T)).findIndex(z=>c.has(z)),T<0?u[u.length-1]:y?u[T-1]||f:T));m.target.value=g(m.target.value).join(""),m.target.setSelectionRange(k,E),y=!1,i==null||i({name:a,value:m.target.value.split(".").reverse().join("-")})},v=m=>{m.target.value=g(m.target.value).join(""),o==null||o({name:a,value:m.target.value.split(".").reverse().join("-")})};let y=!1;const b={};return b.field="input",l&&(b.className=l),n.jsxs("dl",{...b,children:[e&&n.jsx("dt",{children:"label"}),n.jsx("dd",{children:n.jsx("input",{type:"tel",placeholder:r,onChange:x,inputMode:"numeric",onKeyDown:m=>y=m.key==="Backspace",onFocus:x,defaultValue:fe.Date(t,"dd.mm.yyyy"),onBlur:v})})]})}function Ii({children:e}){return n.jsx("div",{className:"l",children:n.jsx("ul",{children:e})})}function $i({children:e}){return n.jsx("div",{className:Q.s,children:e})}function Ni({children:e,className:t}){let r={};return t&&(r.className=t),n.jsx("div",{"data-form":"outline",...r,children:n.jsx("ul",{children:e})})}function Di({children:e}){return n.jsx("div",{className:Q.c,children:e})}const rt={List:Ii,Scroll:$i,Main:ti,Add:ni,Icon:ai,Open:oi,Shake:ii,Form:Ni,Center:Di,Close:si};function it({value:e,onValue:t,name:r,placeholder:i="",title:a,error:o,hide:l=!1,edit:d=!0,show:c=!0,active:u=!0,after:f="",view:p,modal:g,module:x,options:v,className:y}){let[b,m]=_.useState(e),k=z=>{if(!(d&&u)||!g)return;let I=g.split(".");rt.Open(I[1],{callback:R=>{t&&t({value:R,name:r}),m(R)},onValue:t,options:v,name:r,value:e})};const E={};E.field="input",y&&(E.className=y);const T={};return i&&(T.placeholder=i),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...E,children:[a&&n.jsx("dt",{children:a}),n.jsx("dd",{...T,onClick:k,edit:(d&&u)+"","data-after":f,children:b}),o&&n.jsx("em",{children:o})]})}function at(e){let t=e.value,r=p=>e.type==="multi"?p.replace(/[^+\d.+-]/g,""):p.replace(/[^+\d.]/g,""),i=(p,g)=>{let x=document.createRange(),v=window.getSelection();x.setStart(g.childNodes[0],p),x.collapse(!0),v.removeAllRanges(),v.addRange(x),g.focus()},a=p=>{e.onValue({value:r(p.target.textContent),name:e.name}),p.target.textContent=r(p.target.textContent),p.target.textContent.length>0&&i(p.target.textContent.length,p.target)},o=p=>{p.target.textContent===""&&(p.target.textContent=0),e.onValue({value:r(p.target.textContent),name:e.name}),p.target.textContent=fe.Money(p.target.textContent)},l=p=>{p.target.textContent=r(p.target.textContent)},d=p=>{p.key==="Enter"&&p.preventDefault()},c=p=>{p.preventDefault(),navigator.clipboard.readText().then(g=>{g=g.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,g)}).catch(g=>{})},u=()=>e.title?n.jsx("dt",{children:e.title}):"",f=()=>e.error?n.jsx("em",{children:e.error}):"";return n.jsxs("dl",{"data-form":"input",children:[u(),n.jsx("dd",{onInput:a,onPaste:c,onBlur:o,onKeyDown:d,onFocus:l,contentEditable:!0,suppressContentEditableWarning:!0,"e-after":e.after,children:fe.Money(t)}),f()]})}const Vt={o:"_o_1kqkq_1",c:"_c_1kqkq_11"};function Xt({value:e,onValue:t,name:r,view:i,error:a,edit:o=!0,active:l=!0,title:d,placeholder:c="",after:u}){let[f,p]=_.useState(e);_.useEffect(()=>{p(e)},[e]);let g=y=>{p(y),t&&t({value:y,name:r})},x=y=>{if(!o||!l)return;const b=y.target.getBoundingClientRect(),m=b.left,k=b.top;Le.setListener("form",n.jsx(Mi,{position:{x:m,y:k},onValue:g,date:f},new Date().getTime()))};const v={};return c&&(v.placeholder=c),n.jsx(n.Fragment,{children:i==="icon"?n.jsx("i",{"data-icon":"F043",onClick:x}):n.jsxs("dl",{children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{onClick:x,...v,children:fe.Date(f,"mm.yyyy")}),a&&n.jsx("em",{children:a})]})})}const Mi=e=>{let[t,r]=_.useState(!0),i=new Date,a=new Date(e.date),o={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},l={y:parseInt(a.getFullYear()),m:parseInt(a.getMonth())+1},[d,c]=_.useState(l.y),u=()=>{r(!1)},f=()=>{c(d+1)},p=()=>{c(d-1)},g=m=>{e.onValue(d+"-"+fe.Number(2,m)),u()},x=m=>o.y===l.y&&o.m===m?"_FFEB3B":"",v=Array(12).fill("").map((m,k)=>k+1),y=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,b=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return n.jsx(n.Fragment,{children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Vt.o,onClick:()=>u()},new Date().getTime()),n.jsxs("div",{className:Vt.c,style:{top:y+"px",left:b+"px"},children:[n.jsxs("s",{children:[n.jsx("i",{"data-icon":"F021",onClick:()=>p()}),n.jsx("h2",{children:d}),n.jsx("i",{"data-icon":"F022",onClick:()=>f()})]}),n.jsx("div",{children:v.map((m,k)=>n.jsx("span",{onClick:()=>{g(m)},color:x(m),children:n.jsx("b",{children:fe.Month(m).abc})},k))})]})]}):""})};function Jt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",[i,a]=_.useState(!1),o=e.edit!==void 0?e.edit:!0,l=e.active!==void 0?e.active:!0,c=!!(e.hide&&(e.value===""||e.value===void 0))&&!(o&&l);i=o?!0:i;let u=e.placeholder!==void 0?e.placeholder:"Заметка пуста",f=b=>{e.onValue&&e.onValue({value:b.target.innerText,name:e.name})},p=b=>{b.preventDefault(),navigator.clipboard.readText().then(m=>{window.document.execCommand("insertText",!1,m)}).catch(m=>{})},g=b=>{o||a(!i)};const x=b=>{e.onSave&&e.onSave({value:b.target.innerText,name:e.name})},v={};v.field="notes",e.className&&(v.className=e.className);const y={};return u&&(y.placeholder=u),i&&(y.open=""),o&&l&&(y.edit=""),c?n.jsx(n.Fragment,{}):n.jsxs("dl",{...v,children:[t(),n.jsx("dd",{onPaste:p,onInput:f,onBlur:x,contentEditable:o&&l?"plaintext-only":"false",...y,onDoubleClick:g,suppressContentEditableWarning:!0,children:e.value}),r()]})}function ot({onValue:e,onSave:t,value:r,name:i,active:a,max:o,edit:l,title:d,error:c,show:u,hide:f,placeholder:p,className:g,after:x,view:v}){l=l!==void 0?l:!0,a=a!==void 0?a:!0,f=!!(f&&(r===""||r===void 0))&&!(l&&a),p=p!==void 0?p:"",o=o!==void 0?o:99;let b=E=>{e==null||e({name:i,value:E.currentTarget.value})};const m=E=>{t==null||t({name:i,value:E.currentTarget.value})},k={};return k.field="input",g&&(k.className=g),f?n.jsx(n.Fragment,{}):n.jsxs("dl",{...k,children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{children:n.jsx("input",{name:i,type:"tel",inputMode:"numeric",onChange:b,onBlur:m,placeholder:p,defaultValue:r})}),c&&n.jsx("em",{children:c})]})}function Qt({value:e,onValue:t,name:r,placeholder:i="",className:a,title:o,error:l,edit:d=!0,active:c=!0,reload:u=!1,after:f=""}){let p=b=>{t&&t({value:b.target.textContent,name:r,reload:u})},g=b=>{b.key==="Enter"&&b.preventDefault()},x=b=>{b.preventDefault(),navigator.clipboard.readText().then(m=>{window.document.execCommand("insertText",!1,m.replace(/(\r\n|\n|\r)/gm," "))}).catch(m=>{})};const v={};v.field="password",a&&(v.className=a);const y={};return i&&(y.placeholder=i),n.jsxs("dl",{...v,children:[o?n.jsx("dt",{children:o}):"",n.jsx("dd",{onPaste:x,onInput:p,onKeyDown:g,onBlur:me.Blur,contentEditable:d&&c?"plaintext-only":"false",...y,suppressContentEditableWarning:!0,children:e}),l?n.jsx("em",{children:l}):""]})}function st({onValue:e,onSave:t,value:r,name:i,active:a,edit:o,title:l,error:d,hide:c,placeholder:u,className:f}){o=o!==void 0?o:!0,a=a!==void 0?a:!0,c=!!(c&&(r===""||r===void 0))&&!(o&&a),u=u||"";const g="+7__________",x=new Set("_"),v=(I=>Array.from(g,(R,re)=>x.has(R)?I=re+1:I))(0),y=[...g].findIndex(I=>x.has(I)),b=new RegExp("\\d","g"),m=I=>(I=I.match(b)||[],Array.from(g,R=>(I[0]===R||x.has(R))&&I.shift()||R)),k=I=>{const[R,re]=[I.target.selectionStart,I.target.selectionEnd].map(O=>(O=m(I.target.value.slice(0,O)).findIndex(M=>x.has(M)),O<0?v[v.length-1]:T?v[O-1]||y:O));I.target.value=m(I.target.value).join(""),I.target.setSelectionRange(R,re),T=!1,e==null||e({name:i,value:I.target.value.match(/\d+/g)[0]})},E=I=>{I.target.value=m(I.target.value).join(""),t==null||t({name:i,value:I.target.value.match(/\d+/g)[0]})};let T=!1;const z={};return z.field="input",f&&(z.className=f),c?n.jsx(n.Fragment,{}):n.jsxs("dl",{...z,children:[l&&n.jsx("dt",{children:l}),n.jsx("dd",{children:n.jsx("input",{name:i,type:"tel",inputMode:"numeric",onChange:k,onFocus:k,onBlur:E,placeholder:u,defaultValue:r})}),d&&n.jsx("em",{children:d})]})}const en=e=>{let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,a=e.placeholder!==void 0?e.placeholder:"",o=0,l=()=>{clearTimeout(o),o=setTimeout(()=>{},1e3)},d=f=>{f.key==="Enter"&&f.preventDefault()},c=f=>{f.preventDefault(),navigator.clipboard.readText().then(p=>{window.document.execCommand("insertText",!1,p)}).catch(p=>{})};const u={};return a&&(u.placeholder=a),n.jsxs("dl",{"data-form":"input",children:[t(),n.jsx("dd",{onPaste:c,onInput:l,onKeyDown:d,contentEditable:r&&i?"plaintext-only":"false",...u,suppressContentEditableWarning:!0,children:e.value})]})};function lt({title:e,error:t,edit:r=!0,active:i=!0,hide:a,value:o="0",onValue:l,options:d,placeholder:c="",name:u,after:f,view:p,className:g}){var k;const x=_.useId(),[v,y]=_.useState((k=d[parseInt(o)])==null?void 0:k.n);let b=E=>{y(d[E.target.value].n),l==null||l({name:u,value:E.target.value})};const m={};return m.field="select",g&&(m.className=g),n.jsxs("dl",{...m,children:[e?n.jsx("dt",{children:e}):"",n.jsxs("dd",{children:[v,n.jsx("select",{name:u,id:x,defaultValue:o+"",onChange:b,children:Object.keys(d).map(E=>n.jsx("option",{value:E,children:d[E].n},E))})]})]})}function dt({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onSave:g,className:x=""}){let v=!!(l&&(e===""||e===void 0)),y=T=>{t==null||t({value:T.target.value,name:r})},b=T=>{T.preventDefault(),navigator.clipboard.readText().then(z=>{window.document.execCommand("insertText",!1,z.replace(/(\r\n|\n|\r)/gm," "))}).catch(z=>{})},m=T=>{T.preventDefault(),navigator.clipboard.writeText(T.target.value).then(function(){Ae.Copy("Данные в буфер обмене")},function(z){})};if(!(d&&c)&&!f||!(d&&c)&&v)return"";const k={};k.field="input",x&&(k.className=x);const E=T=>{g==null||g({value:T.target.value,name:r})};return n.jsxs("dl",{...k,children:[a?n.jsx("dt",{children:a}):"",n.jsx("dd",{children:n.jsx("input",{name:r,autoComplete:"off",type:"text",onChange:y,onPaste:b,onBlur:E,onContextMenu:m,placeholder:i,defaultValue:e,spellCheck:"false"})}),o?n.jsx("em",{children:o}):""]})}function ct(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,a=e.active!==void 0?e.active:!0,l=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(i&&a),d=e.placeholder!==void 0?e.placeholder:"",c=x=>{f(e.options[x]),e.onValue({value:x,name:e.name})},[u,f]=_.useState(e.default!==void 0?e.options[e.default]:e.default),p=x=>{if(!(i&&a))return;const v=x.target.getBoundingClientRect();Le.setListener("form",n.jsx(zi,{parent:v,onValue:c,view:e.view,options:e.options},new Date().getTime()))};const g={};return d&&(g.placeholder=d),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{"data-form":"select",children:[t(),n.jsx("dd",{onClick:p,"data-edit":(i&&a)+"",...g,children:u}),r()]})}const zi=({onValue:e,parent:t,view:r,options:i})=>{let[a,o]=_.useState(!0),l=()=>{o(!1)},d=p=>{o(!1),e(p)},c=Object.keys(i).length*36,u=window.innerHeight-t.y+t.height<c?t.y-(c-33):t.y+33,f=window.innerWidth-t.x<265?t.x-235:t.x;return n.jsx(n.Fragment,{children:a?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),n.jsx("div",{"data-select":"background "+r,style:{top:u+"px",left:f+"px",width:t.width},children:n.jsx("ul",{children:Object.keys(i).map((p,g)=>n.jsx("li",{onClick:()=>{d(p)},children:i[p]},g))})})]}):""})};function ut({set:e,value:t,onValue:r,name:i,placeholder:a="",title:o="",error:l="",hide:d=!1,edit:c=!0,show:u=!0,active:f=!0,after:p="",view:g,module:x,item:v,className:y=""}){let b={};switch(e){case"String":return n.jsx(dt,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Select":return v&&(b=ie.getSelect(parseInt(v))?ie.getSelect(parseInt(v)):{0:{s:"1",n:"не известно"}}),n.jsx(lt,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y,options:b});case"Users":return ie.getSelect("user"),n.jsx(ct,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y,options:b});case"Date":return n.jsx(nt,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Phone":return n.jsx(st,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Number":return n.jsx(ot,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Money":return n.jsx(at,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Modal":return n.jsx(it,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i||"",placeholder:a,className:y,options:b,module:x||""})}}function tn({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:g,onSave:x,className:v=""}){let y=!!(l&&(e===""||e===void 0));if(!(d&&c)&&!f||!(d&&c)&&y)return"";let b=T=>{t&&t({value:T.target.innerText,name:r})},m=T=>{x&&x({value:T.target.innerText,name:r})},k=T=>{T.preventDefault(),navigator.clipboard.readText().then(z=>{window.document.execCommand("insertText",!1,z)}).catch(z=>{})};const E={};return i&&(E.placeholder=i),n.jsxs("dl",{children:[a??n.jsx("dt",{children:a}),n.jsx("dd",{onPaste:k,onBlur:m,onInput:b,contentEditable:d&&c?"plaintext-only":"false",...E,suppressContentEditableWarning:!0,children:e}),o??n.jsx("em",{children:o})]})}function nn({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:g,onSave:x,className:v=""}){let y=!!(l&&(e===""||e===void 0));if(fe.Date(e===void 0?new Date:e,"HH:MM"),_.useRef(null),!(d&&c)&&!f||!(d&&c)&&y)return"";const b="__:__",m=new Set("_"),k=(M=>Array.from(b,(X,je)=>m.has(X)?M=je+1:M))(0),E=[...b].findIndex(M=>m.has(M)),T=new RegExp("\\d","g"),z=M=>(M=M.match(T)||[],Array.from(b,X=>(M[0]===X||m.has(X))&&M.shift()||X)),I=M=>{const[X,je]=[M.target.selectionStart,M.target.selectionEnd].map(U=>(U=z(M.target.value.slice(0,U)).findIndex(se=>m.has(se)),U<0?k[k.length-1]:O?k[U-1]||E:U));M.target.value=z(M.target.value).join(""),M.target.setSelectionRange(X,je),t==null||t({name:r,value:M.target.value})},R={};R.field="input",v&&(R.className=v);const re={};i&&(re.placeholder=i);let O=!1;return n.jsx(n.Fragment,{children:n.jsxs("dl",{...R,children:[a?n.jsx("dt",{children:a}):"",n.jsx("dd",{...re,children:n.jsx("input",{type:"tel",placeholder:i,onChange:I,inputMode:"numeric",onKeyDown:M=>O=M.key==="Backspace",onFocus:I,onBlur:M=>M.target.value===b&&(M.target.value="")})}),o?n.jsx("em",{children:o}):""]})})}function rn({onValue:e,label:t,value:r,className:i,name:a,reload:o}){r=!!r;const[l,d]=_.useState(r),c=()=>{let p=!l;e({name:a,value:p,reload:o}),d(p)},u={};u.field="check",i&&(u.className=i);const f={};return l&&(f.active=""),n.jsxs("dl",{...u,children:[t?n.jsx("dt",{children:t}):"",n.jsx("dd",{...f,onClick:c})]})}const an=({onValue:e,value:t,name:r,item:i})=>{const[a,o]=_.useState(!!t);_.useEffect(()=>{o(!!t)},[t]);let l=()=>{let d=parseInt(a)===0?1:0;o(d),e({value:d,name:r,key:i,item:i})};return n.jsx("div",{role:"switch",onClick:l,"aria-checked":`${a?"true":"false"}`})};function on({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:g,onSave:x,className:v=""}){const[y,b]=_.useState(e!==void 0?e.split(","):[]);_.useEffect(()=>{e!==void 0&&b(e!==void 0?e.split(","):[])},[e]);let m=()=>{b([...y,""])},k=O=>{y.splice(O,1),y.length===0&&y.push(""),b([...y]),g!==void 0&&g({value:y.join(","),name:r})},E=!!(l&&(e===""||e===void 0)),T=O=>{};if(!(d&&c)&&!f||!(d&&c)&&E)return"";const z={};z.field="group",v&&(z.className=v);const I=O=>{me.Blur(O),x&&x({value:O.target.textContent,name:r})};let R=(O,M)=>{y[M]=O.target.textContent,t!==void 0&&t({value:y.join(","),name:r})},re=O=>{O.key==="Enter"&&O.preventDefault()};return n.jsxs("dl",{...z,children:[n.jsxs("dt",{children:[a,n.jsx("i",{onClick:m,children:n.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:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})})]}),n.jsx("dd",{children:y.map((O,M)=>n.jsxs("li",{className:"field_group_item",children:[n.jsx("span",{onInput:X=>R(X,M),edit:"true",name:r,placeholder:i,onPaste:T,contentEditable:!0,onKeyDown:re,onBlur:I,suppressContentEditableWarning:!0,children:y[M]}),n.jsx("i",{onClick:()=>{k(M)},children:n.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:[n.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),n.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},M))}),o?n.jsx("em",{children:o}):""]})}const Fi=e=>(e=e!==void 0&&e!==""?e.split(","):[],e.reduce((t,r)=>(t[r]=!0,t),{}));function sn({value:e,onValue:t,name:r,placeholder:i="",title:a,error:o,hide:l=!1,edit:d=!0,show:c=!0,active:u=!0,after:f="",view:p,modal:g,module:x,options:v,className:y}){const[b,m]=_.useState(Fi(e)),k=z=>{if(!(d&&u)||!g)return;let I=g.split(".");rt.Open(I[1],{callback:R=>{t&&t({value:R,name:r}),m(R)},onValue:t,options:v,name:r,value:b})},E={};E.field="group",y&&(E.className=y);const T={};return i&&(T.placeholder=i),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...E,children:[n.jsxs("dt",{children:[a,n.jsx("i",{onClick:k,children:n.jsxs("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:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})})]}),n.jsx("dd",{...T,onClick:open,edit:(d&&u)+"","data-after":f,children:Object.keys(b).map(z=>{var I;return n.jsx("div",{className:"field_group_item",children:(I=v[z])==null?void 0:I.label},z)})}),o&&n.jsx("em",{children:o})]})}const ln={Color:Gt,Date:nt,Code:Ht,Check:rn,Switch:Wt,Button:Zt,Message:Ut,Generator:Yt,Captcha:Kt,Modal:it,Money:at,Month:Xt,Notes:Jt,Number:ot,Password:Qt,Phone:st,Search:en,Select:lt,Set:ut,Textarea:tn,Time:nn,Users:ct,String:dt,Toogle:an,Group:on,Options:sn},_e={debug:"_debug_ug20b_34",b:"_b_ug20b_46",o:"_o_ug20b_50",mb:"_mb_ug20b_55",tm:"_tm_ug20b_66",ta:"_ta_ug20b_133","--body":"_--body_ug20b_143"},C=window.Telegram.WebApp,oe={is:!1,MainButton:{},BackButton:{}};let be={};be.dark={"--tg-theme-bg-color":"#212121","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#aaaaaa","--tg-theme-link-color":"#8774e1","--tg-theme-button-color":"#8774e1","--tg-theme-button-text-color":"#ffffff","--tg-theme-secondary-bg-color":"#0f0f0f","--tg-theme-header-bg-color":"#212121","--tg-theme-accent-text-color":"#8774e1","--tg-theme-section-bg-color":"#212121","--tg-theme-section-header-text-color":"#aaaaaa","--tg-theme-subtitle-text-color":"#aaaaaa","--tg-theme-destructive-text-color":"#e53935"},be.light={"--tg-theme-bg-color":"#ffffff","--tg-theme-text-color":"#000000","--tg-theme-hint-color":"#999999","--tg-theme-link-color":"#2481cc","--tg-theme-button-color":"#2481cc","--tg-theme-button-text-color":"#ffffff","--tg-theme-secondary-bg-color":"#efeff3"},be.users={"--tg-theme-bg-color":"#000000","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#98989e","--tg-theme-link-color":"#ffffff","--tg-theme-button-color":"#ffffff","--tg-theme-button-text-color":"#000000","--tg-theme-secondary-bg-color":"#000000"},C.getUser=()=>{var e;return((e=C.initDataUnsafe)==null?void 0:e.user)===void 0?{}:C.initDataUnsafe},C.MainButton.callback=[],C.MainButton.set=e=>{oe.is?oe.MainButton.set(e):(C.MainButton.callback.forEach(t=>{C.MainButton.offClick(t)}),C.MainButton.callback=[],typeof e=="boolean"?C.MainButton.isVisible=!1:(C.MainButton.text=e.text,e.color&&(C.MainButton.color=e.color),e.textColor&&(C.MainButton.textColor=e.textColor),C.MainButton.isVisible=!0,C.MainButton.isActive=e.isActive===void 0?!0:e.isActive,C.MainButton.callback.push(()=>{var t;e.page===void 0?(t=e.callback)==null||t.call(e):ae.setPage(e.page)}),C.MainButton.onClick(C.MainButton.callback[0])))},C.BackButton.state=[!1],C.BackButton.listen=[],C.BackButton.router=e=>{e===!1?(C.BackButton.isVisible=!1,C.BackButton.offClick(C.BackButton.listen[0]),C.BackButton.listen.shift(),C.BackButton.state.length!==1&&C.BackButton.state.pop()):(C.BackButton.isVisible=!0,C.BackButton.offClick(C.BackButton.listen[0]),C.BackButton.listen.shift(),C.BackButton.listen.push(()=>{let t=C.BackButton.state.pop();if(t.page!==void 0)ae.setPage(t.page);else{let r=C.BackButton.state[C.BackButton.state.length-1];C.BackButton.router(r)}}),C.BackButton.onClick(C.BackButton.listen[0]))},C.BackButton.set=e=>{oe.is?oe.BackButton.set(e):(C.BackButton.state.push(e),C.BackButton.router(e))},C.Notice=(e,t)=>{t!==void 0?(Ae.Send({type:e,text:t}),oe.is||C.HapticFeedback.notificationOccurred(e)):(Ae.Send(e),oe.is||C.HapticFeedback.notificationOccurred(e.type))},C.Init=({dev:e})=>{if(e){let[t,r]=_.useState(!1),[i,a]=_.useState(!1),[o,l]=_.useState("dark"),[d,c]=_.useState(!1),[u,f]=_.useState(!1);oe.is=!0,oe.MainButton.set=r,oe.BackButton.set=a,_.useEffect(()=>{for(let x in be[o])document.documentElement.style.setProperty(x,be[o][x])},[]);let p=x=>{for(let v in be[x])document.documentElement.style.setProperty(v,be[x][v]);l(x),c(!1)},g=()=>{c(!1),f(!0)};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:_e.debug,children:[i===!1?n.jsx("div",{className:_e.b,children:"Отмена"}):n.jsx("div",{onClick:()=>{i.page===void 0||ae.setPage(i.page)},className:_e.b,children:"Назад"}),n.jsx("div",{className:_e.o,onClick:()=>c(!d),children:"Меню"})]}),t&&n.jsx("div",{className:_e.mb,children:n.jsx("button",{onClick:()=>{t.page&&ae.setPage(t.page),t.callback&&t.callback()},children:t.text})}),d?n.jsxs("div",{className:_e.tm,children:[n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("button",{onClick:g,children:"Authorization"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>ae.setPage("Add"),children:"Add Page"})})]}),n.jsxs("ul",{children:[n.jsxs("li",{children:[n.jsx("button",{children:"Thema"}),n.jsxs("ol",{children:[n.jsx("li",{children:n.jsx("button",{onClick:()=>p("dark"),children:"Dark"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>p("light"),children:"Light"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>p("users"),children:"Users"})})]})]}),n.jsx("li",{children:n.jsx("button",{onClick:()=>c(!d),children:"Closed"})})]})]}):"",u?n.jsx(Pi,{setAuthorization:f}):""]})}else return n.jsx(n.Fragment,{})};const Pi=({setAuthorization:e})=>{let t={},r=a=>{t=a.value},i=a=>{localStorage.setItem("auth",t)};return n.jsx("div",{className:_e.ta,children:n.jsxs("div",{className:"--body",children:[n.jsx("fieldset",{children:n.jsx(ln.Notes,{label:"Data JSON",name:"description",onValue:r,placeholder:""})}),n.jsx("div",{onClick:i,children:" Сщхранить "})]})})},Ri=({children:e,config:t})=>(window.location.pathname==="/clear"&&(window.history.pushState({},"","/"),G()),N.New(t.crypto),t.defaultModule&&Wn(t.defaultModule),Un(n.jsxs(n.Fragment,{children:[n.jsx(C.Init,{dev:t.dev}),n.jsx(ei,{config:t.modal}),n.jsx(Ur,{}),n.jsx(Xr,{}),n.jsx(pi,{}),e]}))),dn=({list:e,onClick:t,active:r,size:i,view:a})=>n.jsx("nav",{children:n.jsx("ul",{className:[i,a].join(" "),children:e.map(o=>n.jsx(Oi,{onClick:t,active:r,label:o.label,link:o.link},o.link))})}),Oi=({onClick:e,label:t,link:r,active:i})=>n.jsx("li",{"tabs-active":String(i===r),onClick:()=>e(r),children:t});dn.defaultProps={size:"M",view:"H"};const Li=({title:e="",button:t,description:r="",children:i})=>n.jsxs("fieldset",{children:[e&&n.jsxs("legend",{children:[e,t&&n.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),n.jsx("ul",{children:i}),r&&n.jsx("article",{children:r})]}),Ai={setting:"_setting_dva4m_2"},qi=({children:e})=>n.jsx("div",{className:Ai.setting,children:e}),Wi=({label:e,children:t})=>{let[r,i]=_.useState(!1);return n.jsxs("li",{"data-item":"accordion",children:[n.jsxs("dl",{onClick:()=>i(!r),children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx("div",{"data-close":String(r)})})]}),r&&n.jsx("div",{children:t})]})},Zi=({label:e,onClick:t,button:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"button",onClick:()=>t(),children:r})]})}),cn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,n.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},Ui={Accordion:Wi,Button:Zi,Switch:({label:e,onClick:t,active:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx(cn.Switch,{onClick:t,active:r})})]})}),Info:({label:e,info:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})})};function un({list:e,onClick:t,active:r,size:i,view:a}){return n.jsx("nav",{children:n.jsx("ul",{className:[i,a].join(" "),children:e.map(o=>n.jsx(Yi,{onClick:t,active:r,label:o.label,link:o.link},o.link))})})}const Yi=({onClick:e,label:t,link:r,active:i})=>n.jsx("li",{"tabs-active":String(i===r),onClick:()=>e(r),children:t});un.defaultProps={size:"M",view:"H"};const Ki={Section:Li,Main:qi,Item:Ui,Tabs:un};function fn({text:e,type:t,button:r}){let[i,a]=_.useState(!1),o={active:t};const l=()=>{if(r){if(r.onClick)return r.onClick({});if(r.onSend)return i?void 0:(a(!0),r.onSend(a))}};return n.jsxs("div",{className:et.al,...o,children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:n.jsx("path",{fill:"#fff",d:"M10.362 2.015C11.4264 1.66167 12.5736 1.66167 13.638 2.015C14.6981 2.36687 15.5304 3.20141 16.3665 4.37395C17.1999 5.5426 18.1208 7.17206 19.3078 9.2725L19.3544 9.35496C20.5417 11.4557 21.4625 13.0851 22.0364 14.4065C22.613 15.7343 22.9002 16.8807 22.6711 17.9821C22.4403 19.0911 21.8714 20.0995 21.0428 20.8617C20.2162 21.622 19.0907 21.9428 17.6736 22.0968C16.2645 22.25 14.4212 22.25 12.0488 22.25H11.9513C9.57882 22.25 7.73554 22.25 6.32642 22.0968C4.90927 21.9428 3.78379 21.622 2.95722 20.8617C2.12862 20.0995 1.55968 19.0911 1.32895 17.9821C1.0998 16.8807 1.387 15.7343 1.96365 14.4065C2.53752 13.0851 3.45835 11.4557 4.64558 9.35495L4.69218 9.2725L4.69218 9.27249C5.87921 7.17206 6.80008 5.5426 7.63347 4.37395C8.46963 3.20141 9.30194 2.36687 10.362 2.015ZM11 17C11 16.4477 11.4457 16 11.9955 16H12.0045C12.5543 16 13 16.4477 13 17C13 17.5523 12.5543 18 12.0045 18H11.9955C11.4457 18 11 17.5523 11 17ZM11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V9C13 8.44772 12.5523 8 12 8C11.4477 8 11 8.44772 11 9V13Z"})}),n.jsx("span",{children:e}),r&&n.jsx("button",{onClick:l,children:r.label})]})}const K={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"},pn=({title:e,left:t,right:r,children:i})=>n.jsxs("div",{className:K.h,children:[n.jsx("div",{className:K.t,children:e}),t&&n.jsx("div",{className:K.hl,children:t}),r&&n.jsx("div",{className:K.hr,children:r}),i]}),xn=({children:e,...t})=>n.jsx("div",{className:K.l,children:e}),hn=({children:e})=>n.jsx("div",{className:K.s,children:e}),gn=({children:e,edit:t})=>{const r={};return t&&(r.edit=""),n.jsx("div",{...r,className:K.f,children:e})};function mn({children:e}){return n.jsx("div",{className:K.g,children:e})}const Hi={Header:pn,Section:hn,Group:mn,Form:gn,List:xn,A:fn,U:({children:e})=>n.jsx("div",{className:K.u,children:e}),G:mn,C:({children:e})=>n.jsx("div",{className:K.c,children:e}),L:xn,O:({children:e,className:t,title:r})=>n.jsxs("div",{className:[K.o,t].join(" "),children:[r&&n.jsx("div",{className:K.hh,children:r}),e]}),S:hn,H:pn,M:({children:e})=>n.jsx("div",{className:K.m,children:e}),F:gn},Gi={Send:Qr,Line:fn};function Vi(){return n.jsx("svg",{viewBox:"0 0 462.86 359.96",children:n.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 Xi={};function Ji(e){Xi.add(e)}function Qi({color:e,size:t,name:r}){return n.jsx("svg",{width:t,height:t,color:e,children:n.jsx("use",{href:`#${r}`})})}const ea={Logo:Vi,Sprite:Ji,Symbol:Qi};function ta(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.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"}),n.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"}),n.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 na(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.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"}),n.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"}),n.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 ra(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.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 ia={n:"_n_euuvm_1"};let Ne={},De=[];const aa=(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 r=e.news.filter(a=>a.id!==t.id);return{...e,news:r,active:r.length!==0};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let a in i)i[a]!=="999"&&(e.active=!0);return Ne.get(i,e.active),{...e,take:i,active:e.active};case"exit":return e;default:throw new Error}};function oa(e){Ne.fn({action:"add",data:e})}function sa(e){Ne.fn({action:"add",data:e})}function la(e){Ne.fn({action:"new",data:e})}function da(e){Ne.fn=e}function ca(){const[e,t]=_.useReducer(aa,{open:!1,active:!1,news:[],take:{}});We.useListener("bell",async i=>{}),da(async i=>{switch(i.action){case"add":De.push(i.data);break}}),_.useEffect(()=>{(async()=>{let i=await We.Send({type:"module",module:"M00",query:"x0054",array:["M01","M02"]});for(let a in i)switch(a){case"news":t({type:"news",data:i.news});break;case"M01":i[a].forEach(o=>{De.push({module:"M01",type:1,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break;case"M02":i[a].forEach(o=>{De.push({module:"M02",type:117,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break}})(),setInterval(()=>{De.forEach((i,a)=>{t({type:"add",data:{module:i.module,type:i.type,id:i.id,datetime:i.datetime,txt:i.title}}),i.datetime<new Date().getTime()&&De.splice(a,1)})},6e4)},[]);let r=async i=>{t({type:"hide",id:i.id})};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ia.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?n.jsx(na,{}):n.jsx(ta,{})}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"notify-m",children:[n.jsx("div",{className:"notify-l",children:e.news.map((i,a)=>n.jsx(ua,{data:i,dispatch:t},a))}),n.jsx("div",{className:"notify-b",onClick:r,children:"История"})]})]}):""]})}const ua=({data:e,dispatch:t})=>{let r=async i=>{t({type:"hide",id:i.id}),await We.Send({type:"module",module:"M00",query:"x0055",data:{id:i.id,type:i.type,db:i.db}})};return n.jsxs("div",{className:"notify-i",children:[n.jsx("div",{className:"--icon","data-icon":e.type}),n.jsxs("div",{className:"--body",children:[n.jsx("div",{className:"--name",children:e.type}),n.jsx("div",{className:"--text",children:e.txt})]}),n.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>r(e),children:" "})]})},fa="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBhPVtdLHM9bnVsbDtvbmNvbm5lY3Q9ZnVuY3Rpb24obCl7dmFyIHQ9bC5zb3VyY2U7YS5wdXNoKHQpO2NvbnN0IG49ZT0+e3MhPT1udWxsJiZzLnJlYWR5U3RhdGU9PT0xP3Muc2VuZChKU09OLnN0cmluZ2lmeShlKSk6dC5wb3N0TWVzc2FnZSh7dHlwZToibm9TZW5kIn0pfTtsZXQgcj1lPT57aWYocyE9PW51bGwmJnMucmVhZHlTdGF0ZT09PTEpcmV0dXJuIHQucG9zdE1lc3NhZ2Uoe3R5cGU6InRydWUifSk7ZS5say5hZGRyZXNzPT09ImxvY2FsaG9zdCI/cz1uZXcgV2ViU29ja2V0KGB3czovL2xvY2FsaG9zdDoke2UubGsuc29ja2V0KzF9YCk6cz1uZXcgV2ViU29ja2V0KCJ3c3M6Ly8iK2UubGsuYWRkcmVzcysiOiIrKGUubGsuc29ja2V0KzEpKSxzLm9uZXJyb3I9KCk9PnQucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIn0pLHMub25vcGVuPSgpPT57bih7dHlwZToiY29ubmVjdCIsdWtleTplLnVrZXl9KX0scy5vbm1lc3NhZ2U9bz0+e2xldCBjPUpTT04ucGFyc2Uoby5kYXRhKTthLmZvckVhY2goZD0+e2QucG9zdE1lc3NhZ2UoYyl9KX0scy5vbmNsb3NlPSgpPT50LnBvc3RNZXNzYWdlKHt0eXBlOiJjbG9zZWQifSl9O3Qub25tZXNzYWdlPWZ1bmN0aW9uKGUpe3N3aXRjaChlLmRhdGEudHlwZSl7Y2FzZSJsZW5ndGgiOnJldHVybiB0LnBvc3RNZXNzYWdlKGEubGVuZ3RoKTtjYXNlImFsbCI6cmV0dXJuIGEuZm9yRWFjaChvPT5vLnBvc3RNZXNzYWdlKHthbGw6YS5sZW5ndGh9KSk7Y2FzZSJzZW5kIjpyZXR1cm4gbihlLmRhdGEuanNvbik7Y2FzZSJjb25uZWN0IjpyZXR1cm4gcihlLmRhdGEpO2RlZmF1bHQ6dC5wb3N0TWVzc2FnZSh7dHlwZToiZGVmYXVsdCIsZGF0YTplLmRhdGEuanNvbn0pfX19fSkoKTsK";function pa(e){return new SharedWorker("data:text/javascript;base64,"+fa,{name:e==null?void 0:e.name})}function xa(e){let t={},r={};e.data.forEach(a=>{t[a.id]={s:a.v,n:a.a},r[a.id]=a});let i={...xe(),901:t};$t(r),Ee(i)}let ee={},Z={},qe=["filter","online","users","company","select","setting","info","job"];function ha(){const[e,t]=_.useState(!1),[r,i]=_.useState(!1);function a(o){const l=new pa;ee.laodData=d=>{let c=qe.indexOf(d);c>=0&&qe.splice(c,1),qe.length===0&&t(!0)},ee.send=d=>{l.port.postMessage({type:"send",json:d})},l.port.onmessage=d=>{let c=d.data;c.type==="error"&&i(!0),c.type==="true"&&t(!0),c.type==="closed"&&l.port.postMessage({type:"connect",ukey:o,lk:Xe()}),qe.length!==0&&ee.laodData(c.type),Z[c.type]&&Z[c.type](c)},l.port.postMessage({type:"connect",ukey:o,lk:Xe()})}return[a,e,r]}Z.module=e=>{ee[e.listen]!==void 0&&(ee[e.listen](e),delete ee[e.listen])},Z.bell=la,Z.company=xa,Z.info=e=>{let t={};t.db=e.db,t.id=e.data.id,t.job=e.data.job,t.login=e.data.login,t.name=e.data.p02,t.patronymic=e.data.p03,t.surname=e.data.p01,t.email=e.data.email,t.admin=e.data.menu.includes("99"),Nt(t),Tt(e.data.menu)},Z.version=async e=>{Re.version.Server(e.data)},Z.online=async e=>{},Z.offline=async e=>{},Z.chat=e=>{switch(e.data.action){case"new_message":ae.getModule();break;case"view_message":ae.getModule();break;case"write_message":ae.getModule();break}},Z.users=e=>{let t={};e.data.forEach(i=>{let a=i.p01+" "+i.p02+" "+i.p03,o=i.p01+" "+i.p02.substring(0,1)+"."+i.p03.substring(0,1)+".",l=i.p01.substring(0,1)+""+i.p02.substring(0,1)+i.p03.substring(0,1);t[i.id]={id:i.id,admin:i.m.includes("99"),ava:JSON.parse(i.a),job:i.j,login:"",online:{time:i.o,status:0},sts:i.s,nameFull:a,name:o,number:l}});let r={...xe(),user:t};Ee(r)},Z.api=e=>{let t={};e.data.forEach(r=>{t[r.api]={key:r.key,p01:r.p01,p02:r.p02}})},Z.delete=()=>{G()},Z.select=e=>{let t={...xe()};e.data.forEach(r=>{t[r.n]=JSON.parse(r.s)}),Ee(t)},Z.job=e=>{let t={...xe()},r={};Object.keys(e.data).forEach(i=>{r[i]={s:1,n:e.data[i]}}),t[1]=r,Ee(t)},Z.setting=e=>{fr(e.data)},Z.app=()=>{};const ga=(e,t)=>{ee[e]=t},ma=(e,t)=>{ee[e](t)};function _a(e){let t="_"+String(Math.random()).substring(2,7);return new Promise(r=>{ee[t]=i=>{i.error!==void 0?r({error:i.error}):r(i.data),delete ee[t]},e={...e,listen:t},e.type="modules",ee.send(e)})}const We={useConnect:ha,useListener:ga,setListener:ma,Send:_a};class ba{constructor(t="el",r="db"){jt(this,"storeName");jt(this,"_dbp");this.storeName=r,this._dbp=new Promise((i,a)=>{const o=indexedDB.open(t,1);o.onerror=()=>a(o.error),o.onsuccess=()=>i(o.result),o.onupgradeneeded=()=>{o.result.createObjectStore(r)}})}_withIDBStore(t,r){return this._dbp.then(i=>new Promise((a,o)=>{const l=i.transaction(this.storeName,t);l.oncomplete=()=>a(),l.onabort=l.onerror=()=>o(l.error),r(l.objectStore(this.storeName))}))}}let ft,L={};const ke=()=>(ft||(ft=new ba),ft),pe=(e,t,r=ke())=>r._withIDBStore("readwrite",i=>{L[e]=t,i.put(N.enCode(t),e)}),ne=(e,t=ke())=>L[e]===void 0?new Promise((r,i)=>{let a;t._withIDBStore("readonly",o=>{a=o.get(e)}).then(()=>{if(a.result!==void 0){let o=N.deCode(a.result);L[e]=o,r(o)}else r({})})}):L[e],va=(e,t=ke())=>t._withIDBStore("readwrite",r=>{r.delete(e)}),pt=(e=ke())=>e._withIDBStore("readwrite",t=>{t.clear()}),ya={id:async(e,t,r)=>{let i=await ne(t);if(r!==void 0)r({type:"load",base:i});else return i[e]},get:ne,set:pe,add:async(e,t,r,i)=>{let a,o;o=await ne(r),o[e.id]=e,await pe(r,o),a!==null&&(a=await ne(t),a[e.id]=e.eDate,await pe(t,a)),i!==void 0&&i({type:"load",page:a,base:o})},del:va,upd:(e,t,r,i=ke())=>{if(L[e]===void 0)return new Promise((a,o)=>{let l;i._withIDBStore("readonly",d=>{l=d.get(e)}).then(()=>{if(l.result!==void 0){let d=N.deCode(l.result);L[e]=d,L[e][t.id]={...L[e][t.id],...t.data},i.put(N.enCode(L[e]),e),a({})}else a({})})});if(L[e][t.id]!==void 0)return L[e][t.id]={...L[e][t.id],...t.data},r!==void 0&&L[r]!==void 0?L[r][t.id]!==void 0&&(L[r][t.id]=t.data.eDate):L[r]=[],delete L[e][t.id].$_item,delete L[e][t.id].$_send,i._withIDBStore("readwrite",a=>{a.put(N.enCode(L[e]),e),r!==void 0&&a.put(N.enCode(L[r]),r)})},key:(e=ke())=>{const t=[];return e._withIDBStore("readonly",r=>{(r.openKeyCursor||r.openCursor).call(r).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},load:e=>L[e],split:(e,t,r=[],i={})=>{let a=r.length!==0,o=[],l=i.sort,d=Object.keys(i).length!==0,c=Object.keys(i),u=Object.keys(e),f=[],p=x=>{let v="";if(r.forEach(y=>{v+=t[x][y]}),d){let y={};c.forEach(b=>{y[b]=t[x][b]});for(let b in l)t[x][l[b]]===void 0&&(pt(),location.reload()),b==="s1"&&(y[b]=new Date(t[x][l[b]]).getTime()),b==="s2"&&(y[b]=t[x][l[b]]),b==="s3"&&(y[b]=t[x][l[b]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:x,text:v,...y})}else o.push({id:x,text:v})},g=x=>{};return u.forEach(x=>{f.push(t[x])}),f.forEach(x=>{x===void 0?(pt(),location.reload()):(a&&p(x.id),d&&g(x.id))}),{list:f,search:o,filter:i}},clear:pt,updAll:async(e,t,r,i)=>{let a=await ne(t),o=await ne(r);for(let l in e)o[l]=e[l],a[l]=e[l].eDate;await pe(t,a),await pe(r,o),i!==void 0&&i({type:"load",page:a,base:o})},delAll:async(e,t,r,i)=>{let a=await ne(t),o=await ne(r);e.forEach(l=>delete a[l]),await pe(t,a),i!==void 0&&i({type:"load",page:a,base:o})},delList:async(e,t,r)=>{let i=await ne(t);e.forEach(a=>delete i[a]),await pe(t,i)},addList:async(e,t,r)=>{let i=await ne(t);e.forEach(a=>i[a.id]=a.eDate),await pe(t,i)}},wa={setSetting:pr,getSetting:xr},ka={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function ja({children:e}){return n.jsx("ul",{className:K.ul,children:e})}function Ca(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 r=Object.keys(e.data).length,i=e.item+1;return i=r<i?1:i,e.item===i?e:{...e,wait:e.size===i,item:i,list:[...e.list,...e.data[i]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Sa({list:e,load:t,className:r,...i}){const a=_.useRef(null),[o,l]=_.useReducer(Ca,{load:!1,list:[],data:{},item:1,wait:!1,size:0});_.useEffect(()=>{a.current.scrollTop=0,e!==null&&l({type:"load",load:!0,data:e})},[t]);let d=()=>{a.current.scrollHeight-a.current.scrollTop-300<=a.current.clientHeight&&!o.wait&&l({type:"update"})};return n.jsx("div",{className:[ka.s,r].join(" "),ref:a,onScroll:d,children:n.jsx(ja,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(c=>n.jsx(i.item,{data:c},c.id)):n.jsxs("div",{"data-load":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})})})}const Ea=({label:e,onValue:t,value:r,name:i,item:a})=>{const[o,l]=_.useState(!!r);_.useEffect(()=>{l(!!r)},[r]);let d=()=>{let c=parseInt(o)===0?1:0;l(c),t({value:c,name:i,key:a,item:a})};return n.jsx("div",{role:"switch",onClick:d,"aria-checked":`${o?"true":"false"}`})},ve={};function Ba(e){const[t,r]=_.useState({}),i=_.useRef(e);ve.u=o=>{i.current={...i.current,[o.name]:o.value}},ve.r=()=>{r(Date.now())};const a=o=>{i.current[o.name]=o.value,o.reload&&ve.r()};return[i.current,a]}function Ta(e){ve.u(e),e.reload&&ve.r()}function Ia(){ve.r&&ve.r()}const $a={Color:Gt,Date:nt,Code:Ht,Check:rn,Switch:Wt,Button:Zt,Message:Ut,Generator:Yt,Captcha:Kt,Modal:it,Money:at,Month:Xt,Notes:Jt,Number:ot,Password:Qt,Phone:st,Search:en,Select:lt,Set:ut,Textarea:tn,Time:nn,Users:ct,String:dt,Form:ut,runReload:Ia,useData:Ba,setValue:Ta,Palette:Ea,Toogle:an,Group:on,Options:sn},_n={spinner:"_spinner_1ul0m_1",l:"_l_1ul0m_75",loadingB:"_loadingB_1ul0m_1"};function Na(){return n.jsx("div",{className:_n.spinner,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:n.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 Da(){return n.jsxs("div",{className:_n.l,children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})}const Ma={Spinner:Na,Inline:Da},bn={s:"_s_t9swc_1"};let xt;function za({className:e,placeholder:t}){let r=l=>{xt(l.target.textContent)},i=l=>{l.key==="Enter"&&l.preventDefault()},a=l=>{l.preventDefault(),navigator.clipboard.readText().then(d=>{window.document.execCommand("insertText",!1,d)}).catch(d=>{})};const o={};return t&&(o.placeholder=t),o.className=e?[bn.s,e].join(" "):bn.s,n.jsx("div",{onPaste:a,onInput:r,onKeyDown:i,contentEditable:"true",...o,suppressContentEditableWarning:!0})}function Fa(e,t,r){let i=[],a=1,o=0,l={},d=50;return l[a]=[],e.forEach(c=>{c.text.toLowerCase().indexOf(t)>-1&&i.push(c.id)}),i.forEach(c=>{o++,o<=d||(a++,o=1,l[a]=[]),l[a].push(r[c])}),l}function Pa(e){xt=e}function Ra(e){xt=e}const Oa={Field:za,Run:Fa,Get:Pa,useValue:Ra},La={f:"_f_q3r0i_1"};let V={};function Aa(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 r={};return Object.keys(t.data).forEach(a=>{a!=="sort"&&(r[a]=t.data[a],e.take[a]="999")}),{...e,data:r,take:e.take};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let a in i)i[a]!=="999"&&(e.active=!0);return V.get(i,e.active),{...e,take:i,active:e.active};case"exit":for(let a in e.take)e.take[a]="999";return V.get&&V.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function qa(){const[e,t]=_.useReducer(Aa,{open:!1,view:null,data:{},take:{},size:0,active:!1});return V.set=r=>{t({type:"data",data:r})},V.count=r=>{t({type:"size",size:r})},V.reset=()=>{t({type:"exit"})},n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:La.f,onClick:()=>{t({type:"open",open:!0})},children:[n.jsx(ra,{}),e.active&&n.jsxs("i",{children:[e.size,"1"]})]}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"filter m",children:[n.jsx("div",{className:"filter l",children:Object.keys(e.data).map(r=>n.jsx(Ka,{data:r,dispatch:t,state:e},r))}),n.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):n.jsx(n.Fragment,{})]})}function Wa(e){V.get=e}function Za(e){V.set!==void 0&&V.set(e)}function Ua(e){V.reset!==void 0&&V.reset(e)}function Ya(e,t,r,i){let a=[],o=1,l=0,d={},c=50;return d[o]=[],i===!0&&(Object.keys(t).forEach(u=>{Number.parseInt(t[u])!==999&&(e=e.filter(f=>Number.parseInt(f[u])===Number.parseInt(t[u])))}),vn(e.length)),e.forEach(u=>{a.push(u.id)}),a.forEach(u=>{l++,l<=c||(o++,l=1,d[o]=[]),d[o].push(r[u])}),d}function vn(e){V.count(e)}function Ka({data:e,state:t,dispatch:r}){let i=()=>{r({type:"view",view:e})},a=()=>{r({type:"take",list:e,take:"999"})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"filter s",children:[n.jsxs("div",{onClick:i,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?n.jsx("div",{onClick:a,className:"filter x","data-icon":"F038"}):""]}),n.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,l)=>n.jsx(Ha,{data:t.data[e].list[o],head:e,type:o,dispatch:r,state:t},l))})]})}function Ha({data:e,head:t,state:r,dispatch:i,type:a}){if(a!=="999"&&e.count===void 0)return"";const o=()=>{i({type:"take",list:t,take:a})};return n.jsxs("div",{className:"filter a",onClick:o,"set-active":(r.take[t]===a)+"",children:[e.name,n.jsx("div",{className:"filter e",children:e.count})]})}const Ga={Button:qa,useValue:Wa,Set:Za,Run:Ya,Count:vn,Reset:Ua},Va={Bell:ca,Send:sa,Add:oa};function Xa({active:e,onActive:t,id:r,name:i}){const[a,o]=_.useState(!!e);_.useEffect(()=>{o(!!e)},[e]);let l=()=>{let d=parseInt(a)===0?1:0;o(d),t&&t({value:d,name:i,id:r})};return n.jsx("div",{role:"switch",onClick:l,"aria-checked":`${a?"true":"false"}`})}const Ja={sort:"_sort_1yrvt_1"};let Ze={};function Qa(e,t){switch(t.type){case"active":let r="<";return e.active===t.data&&(r=e.sort==="<"?">":"<"),Ze.get({active:t.data,sort:r},!1),It({active:t.data,sort:r}),{...e,active:t.data,sort:r};default:throw new Error}}function eo(){const[e,t]=_.useReducer(Qa,Je()===void 0?{active:1,sort:"<"}:Je());return n.jsxs("div",{className:Ja.sort,children:[n.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})}),n.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})}),n.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 to(e){Ze.get=e}function no(e){Ze.set(e)}function ro(e,t,r){let i=1,a=0,o={},l=50;o[i]=[];let d={},c="s1a";switch(d.s1a=(u,f)=>f.s1-u.s1,d.s1d=(u,f)=>u.s1-f.s1,d.s2a=(u,f)=>u.s2-f.s2,d.s2d=(u,f)=>f.s2-u.s2,d.s3a=(u,f)=>u.s3.localeCompare(f.s3),d.s3d=(u,f)=>f.s3.localeCompare(u.s3),r.active){case 1:c=r.sort===">"?"s1d":"s1a";break;case 2:c=r.sort===">"?"s2d":"s2a";break;case 3:c=r.sort===">"?"s3d":"s3a";break}return t.sort(d[c]).forEach(u=>{a++,a<=l||(i++,a=1,o[i]=[]),o[i].push(e[u.id])}),{data:o}}function io(e){Ze.count(e)}const ao={Init:eo,useValue:to,Set:no,Run:ro,Count:io};B.Action=cn,B.Alert=Gi,B.Api=qr,B.Button=qt,B.Component=Hi,B.DataBase=ya,B.Events=Le,B.Filter=Ga,B.Form=$a,B.Format=fe,B.Icon=ea,B.Init=Ri,B.Input=ln,B.Loading=Ma,B.Modal=rt,B.Notice=Ae,B.Notifications=Va,B.Router=ae,B.Scrolling=Sa,B.Search=Oa,B.Setting=Ki,B.Sistym=Re,B.Socket=We,B.Store=ie,B.Switch=Xa,B.Tabs=dn,B.Telegram=C,B.Triage=ao,B.User=wa,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
|
|
31
|
+
<%s key={someKey} {...props} />`,kt,ye,No,ye),An[ye+kt]=!0}}return s===i?Eo(q):So(q),q}}function Bo(s,h,w){return qn(s,h,w,!0)}function To(s,h,w){return qn(s,h,w,!1)}var Io=To,$o=Bo;Te.Fragment=i,Te.jsx=Io,Te.jsxs=$o}()),Te}process.env.NODE_ENV==="production"?Qe.exports=Wr():Qe.exports=Zr();var n=Qe.exports;const Lt={notice:"_notice_q5jau_1",error:"_error_q5jau_10",success:"_success_q5jau_13",warning:"_warning_q5jau_16",copy:"_copy_q5jau_19","show-notice":"_show-notice_q5jau_1","hide-notice":"_hide-notice_q5jau_1"};let ce={};function Ur(){let[e,t]=_.useState([]);return ce.set=r=>{t([...e,r])},ce.del=r=>{t(e.filter(i=>i.key!==r))},e.length===0?"":n.jsx("ul",{className:Lt.notice,children:e.map(r=>r.item)})}function Ie({data:e}){let[t,r]=_.useState("show");_.useEffect(()=>{setTimeout(function(){r("hide")},1800),setTimeout(function(){ce.del(e.key)},2500)},[e.key]);let i;switch(e.type){case"error":i=n.jsx(he.error,{});break;case"success":i=n.jsx(he.success,{});break;case"copy":i=n.jsx(he.success,{});break;case"remark":i=n.jsx(he.success,{});break;default:i=n.jsx(he.success,{});break}return n.jsxs("li",{className:"item "+Lt[e.type],"data-status":t,children:[i,n.jsx("p",{children:e.text})]})}function Yr(e){let t=Date.now(),r={key:t,...e};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}function Kr(e){let t=Date.now(),r={key:t,text:e,type:"error"};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}function Hr(e){let t=Date.now(),r={key:t,text:e,type:"success"};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}function Gr(e){let t=Date.now(),r={key:t,text:e,type:"remark"};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}function Vr(e){let t=Date.now(),r={key:t,text:e,type:"copy"};ce.set({item:n.jsx(Ie,{data:r},t),key:t})}const he={};he.error=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.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:"#fff"}),n.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:"#bb2014"})]}),he.success=()=>n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.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:"#fff"}),n.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:"#367738"})]});const et={alerts:"_alerts_1pds5_1",menuAnimation:"_menuAnimation_1pds5_1",menuItemAnimation:"_menuItemAnimation_1pds5_1","--body":"_--body_1pds5_103",allert:"_allert_1pds5_111","--form":"_--form_1pds5_111",al:"_al_1pds5_1"};let $e={};function Xr(){let[e,t]=_.useState("");return $e.set=r=>t(r),$e.del=()=>t(""),n.jsx(n.Fragment,{children:e})}const Jr=({data:e,callback:t})=>(e.button=e.button===void 0?"Подтвердить":e.button,n.jsxs("div",{className:et.alerts,children:[n.jsxs("dl",{children:[n.jsx("dt",{children:e.title}),n.jsx("dd",{children:e.text}),n.jsx("ul",{children:n.jsx("button",{"data-color":e.color||"blue",onClick:()=>{t(),$e.del()},children:e.button})})]}),n.jsx("div",{className:et["--body"],onClick:$e.del})]}));function Qr(e,t){$e.set(n.jsx(Jr,{data:e,callback:t}))}const At={btn:"_btn_1hz2s_6",confirm:"_confirm_1hz2s_19"};function qt({onClick:e,onSend:t,label:r,onRef:i}){let[a,o]=_.useState(!1);const l=()=>{if(e)return e();a||(o(!0),t&&t(o))};return n.jsx("button",{ref:i,className:[At.btn,At.confirm].join(" "),onClick:l,children:a?"Ожидайте":r})}const Q={white:"_white_11p39_14",black:"_black_11p39_26",shake:"_shake_11p39_1",modal:"_modal_11p39_73",o:"_o_11p39_83",w:"_w_11p39_14",h:"_h_11p39_107",l:"_l_11p39_121",t:"_t_11p39_159",m:"_m_11p39_73",x:"_x_11p39_167",s:"_s_11p39_177",c:"_c_11p39_182",f:"_f_11p39_187",btn:"_btn_11p39_230",g:"_g_11p39_243","size-a":"_size-a_11p39_296","size-s":"_size-s_11p39_300","size-m":"_size-m_11p39_304","size-l":"_size-l_11p39_308","size-x":"_size-x_11p39_312","size-f":"_size-f_11p39_316",confirm:"_confirm_11p39_322",cancel:"_cancel_11p39_327",disabled:"_disabled_11p39_332",await:"_await_11p39_339",active:"_active_11p39_389",coincidence:"_coincidence_11p39_395",sa:"_sa_11p39_431",ss:"_ss_11p39_435",sm:"_sm_11p39_439",sl:"_sl_11p39_443",sx:"_sx_11p39_447",sf:"_sf_11p39_451"};let ge={};function ei({config:e}){let[t,r]=_.useState([]);return ge.x=i=>{i||r([])},ge.config=e,ge.add=i=>{r([...t,i])},n.jsx(n.Fragment,{children:t.map(i=>i)})}function ti({title:e,children:t,button:r,tabs:i,size:a="m",menu:o}){const[l,d]=_.useState(!0),c=_.useRef(),u=p=>{if(r){if(r.onClick)return p(!1),r.onClick({setOpen:d});if(r.onSend)return r.onSend({setOpen:d,disabled:p})}},f=()=>{c.current.setAttribute("shake",!0),setTimeout(()=>{c.current.setAttribute("shake",!1)},1e3)};return n.jsx(n.Fragment,{children:l?n.jsxs("div",{className:`${Q.modal} ${Q.white}`,children:[n.jsx("div",{className:Q.o,onClick:f}),n.jsxs("div",{className:[Q.w,Q[`s${a}`]].join(" "),ref:c,children:[n.jsxs("div",{className:Q.h,children:[n.jsx("div",{className:Q.t,children:e}),n.jsxs("div",{className:Q.m,children:[i&&n.jsx("nav",{children:i.map((p,g)=>n.jsx("span",{onClick:p.onClick,className:p.active?"active":"",children:p.name},g))}),o]}),n.jsx("div",{className:Q.x,onClick:()=>{d(!1)},children:n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.jsx("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t,r!==void 0?n.jsx(qt,{label:r.label,onSend:u}):""]})]}):""})}function ni(e){ge.add(n.jsx(ri,{children:e},String(Date.now())))}function ri({children:e}){return n.jsx(n.Fragment,{children:e})}function ii(e){if(e.target.classList[0]!=="modal")return;let t=e.target.children[0];t.setAttribute("shake",!0),setTimeout(()=>{t.setAttribute("shake",!1)},1e3)}function ai({type:e,name:t,params:r}){let[i,a]=_.useState(null);return _.useEffect(()=>{ge.config(e,t,r,a)},[r.id]),n.jsx(n.Fragment,{children:i})}function oi(e,t){ge.config(e,t)}function si(e){ge.x(e)}const tt={};function li(e,t){tt[e]=t}function di(e,t){tt[e]!==void 0&&tt[e](t)}const ue={};function ci(e,t){const[r,i]=_.useState(t);return _.useEffect(()=>{if(ue[e])return ue[e].push(i);ue[e]=[i]},[]),[r]}function ui(e,t){if(ue[e])return ue[e].push(t);ue[e]=[t]}function fi(e,t){ue[e]&&ue[e].forEach(r=>r(t))}const Le={setListener:di,useListener:li,setEmitter:fi,useEmitter:ci,subEmitter:ui};function pi(){let[e,t]=_.useState([]);return Le.useListener("form",r=>{t([r])}),n.jsx(n.Fragment,{children:e.map(r=>r)})}const ae={Path:ur,setPage:Qn,getPage:St,usePage:Jn,isPage:er,setModule:nr,getModule:Et,useModule:tr,isModule:rr,setTabs:ar,getTabs:Pe,useTabs:ir,isTabs:or,useId:sr,setId:dr,subId:lr,getId:Bt,isId:cr},Ae={Send:Yr,Error:Kr,Remark:Gr,Success:Hr,Copy:Vr},Wt=({onClick:e,active:t})=>(t=!!t,n.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));function Zt({onClick:e,onSend:t,name:r,onRef:i}){let[a,o]=_.useState(!1);const l=()=>{if(e)return e();a||(o(!0),t&&t(o))};return n.jsx("button",{ref:i,"data-form":"button",className:a?"btn await":"btn confirm pointer",onClick:l,children:a?"Ожидайте":r})}function Ut({value:e,onValue:t,onActive:r,data:i,name:a,view:o,edit:l=!0,active:d=!0,placeholder:c="Введите сообщение"}){const u=_.useRef({value:e,timerId:null,shift:!1,send:!0}),f=()=>{u.current.value.length>0?u.current.send&&(r(!0),u.current.send=!1,u.current.timerId=setTimeout(()=>{u.current.send=!0},3e3)):r(!1)},p=m=>{u.current.value=m.target.textContent,f()},g=m=>{m.keyCode===16&&(u.current.shift=!0),m.keyCode===13&&!u.current.shift&&(m.preventDefault(),u.current.value.length!==0&&(m.target.textContent="",i&&i(u.current.value),t&&t(u.current.value),u.current.value="",r(!1)))},x=m=>{m.keyCode===16&&(u.current.shift=!1)},v=m=>{m.preventDefault(),navigator.clipboard.readText().then(k=>{window.document.execCommand("insertText",!1,k)}).catch(k=>{})},y=()=>{r(!1)},b={spellCheck:"true"};return c&&(b.placeholder=c),l&&d&&(b.contentEditable="plaintext-only"),n.jsx("dl",{"data-form":"message",children:n.jsx("dd",{onPaste:v,onInput:p,onKeyUp:x,onKeyDown:g,onBlur:y,...b,suppressContentEditableWarning:!0,children:e})})}function Yt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,a=e.placeholder!==void 0?e.placeholder:"",o=c=>{e.onValue({value:c.target.textContent,name:e.name})},l=c=>{c.key==="Enter"&&c.preventDefault()},d=c=>{c.preventDefault(),navigator.clipboard.readText().then(u=>{window.document.execCommand("insertText",!1,u)}).catch(u=>{})};return n.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),n.jsx("dd",{onPaste:d,onInput:o,onKeyDown:l,contentEditable:r&&i?"plaintext-only":"false","data-placeholder":a,suppressContentEditableWarning:!0,children:e.value})]})}let me={};me.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},me.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},me.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},me.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()};function Kt({value:e,onValue:t,placeholder:r="",name:i}){let a=(x,v)=>Number(Math.round(x+Math.random()*(v-x))),o=_.useRef(null),l=_.useRef(null),d=a(1e4,99999),c=x=>{x.key!=="Backspace"&&(x.key==="Enter"&&x.preventDefault(),x.target.textContent.length===5&&x.preventDefault(),/\d/.test(x.key)||x.preventDefault())},u=x=>{t({value:Number(x.target.textContent)===d,name:i})},f=x=>{x.preventDefault(),navigator.clipboard.readText().then(v=>{window.document.execCommand("insertText",!1,v.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(v=>{})};_.useEffect(()=>{const x=o.current,v=x.getContext("2d");v.clearRect(0,0,x.width,x.height),v.font="30px brush script mt",v.fillStyle="#eee",v.textAlign="center",v.fillText(d,50,27),l.current.textContent=""},[d]);const p={};p.field="captcha";const g={};return r&&(g.placeholder=r),n.jsxs("dl",{...p,children:[n.jsx("dd",{ref:l,onPaste:f,onInput:u,onBlur:me.Blur,onKeyDown:c,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,...g}),n.jsx("canvas",{ref:o,width:"100",height:"35"})]})}function Ht(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},a=u=>{u.preventDefault(),u.target.textContent=u.target.textContent.slice(-1).replace(/[^+\d]/g,"");let f=window.getSelection(),p=u.target.textContent.length;if(i[u.target.id]=u.target.textContent,i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6,f.collapse(u.target.firstChild,1),p===0){u.target.blur(),u.target.focus();return}u.target.nextSibling!=null&&u.target.nextSibling.focus()},o=u=>{if(u.key==="Enter"&&u.preventDefault(),u.key==="Backspace"){if(u.preventDefault(),u.target.textContent="",i[u.target.id]="",u.target.previousSibling!=null){let f=u.target.previousSibling.id.slice(1);u.target.previousSibling.textContent="",i["n"+f]="",u.target.previousSibling.focus()}i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6}},l=u=>{if(e.real)e.onValue({value:i.code,name:e.name});else if(i.code.length===6&&(e.onValue({value:i.code,name:e.name}),e.empty)){i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let f=1;f<=6;f++){let p=document.getElementById("n"+f);p&&(p.textContent="")}}},d=u=>{u.target.textContent=""},c=u=>{u.preventDefault()};return n.jsxs("dl",{"data-form":"code",children:[t(),n.jsxs("div",{children:[n.jsx("dd",{id:"n1",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n2",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n3",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n4",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n5",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0}),n.jsx("dd",{id:"n6",onKeyDown:o,onKeyUp:l,onFocus:d,onPaste:c,onInput:a,contentEditable:!0})]}),r()]})}function Gt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"";e.edit!==void 0&&e.edit,e.active!==void 0&&e.active;let[i,a]=_.useState(e.value),o=l=>{let d=l.target.getAttribute("set-color");a(d),e.onValue({value:d,name:e.name})};return n.jsx(n.Fragment,{children:e.view==="icon"?n.jsx("i",{"data-icon":"F043"}):n.jsxs("dl",{children:[t(),n.jsxs("dd",{"el-val":i,children:[n.jsx("em",{onClick:o,"set-color":"0"}),n.jsx("em",{onClick:o,"set-color":"1"}),n.jsx("em",{onClick:o,"set-color":"2"}),n.jsx("em",{onClick:o,"set-color":"3"}),n.jsx("em",{onClick:o,"set-color":"4"}),n.jsx("em",{onClick:o,"set-color":"5"})]}),r()]})})}function xi(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let r={yyyy:e.getFullYear(),yy:(""+e.getFullYear()).slice(-2),mm:("0"+(e.getMonth()+1)).slice(-2),dd:("0"+e.getDate()).slice(-2),HH:("0"+e.getHours()).slice(-2),MM:("0"+e.getMinutes()).slice(-2),SS:("0"+e.getSeconds()).slice(-2),__:" ",_:" "};for(const i in r)t=t.replace(i,r[i]);return t}function hi(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],r=new Date(e);return{day:(""+r.getFullYear()).slice(-2)+""+("0"+(r.getMonth()+1)).slice(-2)+("0"+r.getDate()).slice(-2),name:r.getDate()+" "+t[r.getMonth()]}}const gi=e=>{function t(E,T){var z,R,I;E=E??"",T=T??1;for(var z=[],I=0,R=E.length;I<R;)z.push(E.slice(I,I+=T));return z}function r(E,T){var z=[2,0,1,1,1,2];return T[E>4&&E<20?2:z[Math.min(E,5)]]}var i={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},a,o,l,d,b,c,u,y,f,p,g,x;f=parseFloat(e).toFixed(2).split("."),c=f[0],d=f[1];var v=12-c.length;if(v<0)return!1;for(var y=[];v--;)y.push("0");c=y.join("")+c;var b=[];if(c>0){p=t(c,3);for(var m=-1;m<p.length;m++)if(u=p[m],u>0&&(g=t(u,1),a=parseInt(g[0]),o=parseInt(g[1]),l=parseInt(g[2]),b.push(i.a100[a-1]),x=m+1==3?"a2":"a1",o>1?b.push(i.a20[o-2]+(l>0?" "+i[x][l-1]:"")):b.push(o>0?i.a10[l]:i[x][l-1]),p.length>m+1)){var k=i["u"+(m+1)];b.push(r(u,k))}}else b.push(i.null);return b.push(r(c,i.ur)),b.push(d+" "+r(d,i.uc)),b.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function mi(e){let t=-1,r=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+r[t]}function _i(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 bi(e,t,r,i){let a={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 l in this.rules)for(var d in this.rules[l])for(var c=0,u=this.rules[l][d].length;c<u;c++)this.rules[l][d][c]=this.rule(this.rules[l][d][c])},rule:function(l){var d=l.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return d?{sex:d[1],test:d[2].split(","),mods:[d[3],d[4],d[5],d[6],d[7]]}:!1},word:function(l,d,c,u){if(u===this.gcaseNom)return l;if(l.match(/[-]/)){for(var f=l.split("-"),p=0,g=f.length;p<g;p++)f[p]=this.word(f[p],d,c,u);return f.join("-")}if(l.match(/^[А-ЯЁ]\.?$/i))return l;this.init();var x=this.rules[c];let v;return x.exceptions&&(v=this.pick(l,d,u,x.exceptions,!0),v)?v:(v=this.pick(l,d,u,x.suffixes,!1),v||l)},pick:function(l,d,c,u,f){let p=l.toLowerCase();for(var g=0,x=u.length;g<x;g++)if(this.ruleMatch(p,d,u[g],f))return this.applyMod(l,c,u[g]);return!1},ruleMatch:function(l,d,c,u){if(c.sex===this.sexM&&d===this.sexF||c.sex===this.sexF&&d!==this.sexF)return!1;for(var f=0,p=c.test.length;f<p;f++){var g=u?l:l.substr(Math.max(l.length-c.test[f].length,0));if(g===c.test[f])return!0}return!1},applyMod:function(l,d,c){let u;switch(d){case this.gcaseNom:u=".";break;case this.gcaseGen:u=c.mods[0];break;case this.gcaseDat:u=c.mods[1];break;case this.gcaseAcc:u=c.mods[2];break;case this.gcaseIns:u=c.mods[3];break;case this.gcasePos:u=c.mods[4];break}for(var f=0,p=u.length;f<p;f++){var g=u.substr(f,1);switch(g){case".":break;case"-":l=l.substr(0,l.length-1);break;default:l+=g}}return l},getSex:()=>{if(a.mn.length>2)switch(a.mn.substr(a.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:l=>((a.fullNameSurnameLast?"":a.lastName(l)+" ")+a.firstName(l)+" "+a.middleName(l)+(a.fullNameSurnameLast?" "+a.lastName(l):"")).replace(/^ +| +$/g,""),lastName:l=>a.word(a.ln,a.sex,"lastName",l),firstName:l=>a.word(a.fn,a.sex,"firstName",l),middleName:l=>a.word(a.mn,a.sex,"middleName",l)};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],r=o[3],a.fullNameSurnameLast=!0):(e=o[1],t=o[3],r=o[5])}return a.ln=e,a.fn=t||"",a.mn=r||"",a.sex=i||a.getSex(),a}function vi(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 yi(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 wi(e,t){return t&&(e=Number(e)/t),parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function ki(e,t){let r=t+"";for(;r.length<e;)r="0"+r;return r}function ji(e,t,r){let i=t/e*r;return(typeof i!="number"||i===1/0)&&(i=0),parseFloat(i).toFixed(1)}function Ci(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Si(e,t){e=Math.abs(e)%100;let r=e%10;return e>10&&e<20?t[2]:r>1&&r<5?t[1]:r===1?t[0]:t[2]}function Ei(e,t,r){return xe(e,t)?xe(e,t).n:r||""}function Bi(e,t){return e.reduce(function(r,i){let a=t instanceof Function?t(i):i[t];return r[a]!==void 0||(r[a]={}),r[a][i.id]=i,r},{})}function Ti(e){return parseInt((Date.now()-new Date(e).getTime())/31536e6+"")+""}const fe={Age:Ti,Date:xi,MoneyString:gi,DateSort:hi,Size:mi,TypeFiles:_i,Cases:bi,Initials:vi,Month:yi,Money:wi,Number:ki,Percent:ji,CapitalizeFirstLetter:Ci,DeclensionWord:Si,Select:Ei,ObjectByArray:Bi};function nt({title:e,value:t,placeholder:r,onValue:i,name:a,onSave:o,className:l}){const d="__.__.____",c=new Set("_"),u=(m=>Array.from(d,(k,E)=>c.has(k)?m=E+1:m))(0),f=[...d].findIndex(m=>c.has(m)),p=new RegExp("\\d","g"),g=m=>(m=m.match(p)||[],Array.from(d,k=>(m[0]===k||c.has(k))&&m.shift()||k)),x=m=>{const[k,E]=[m.target.selectionStart,m.target.selectionEnd].map(T=>(T=g(m.target.value.slice(0,T)).findIndex(z=>c.has(z)),T<0?u[u.length-1]:y?u[T-1]||f:T));m.target.value=g(m.target.value).join(""),m.target.setSelectionRange(k,E),y=!1,i==null||i({name:a,value:m.target.value.split(".").reverse().join("-")})},v=m=>{m.target.value=g(m.target.value).join(""),o==null||o({name:a,value:m.target.value.split(".").reverse().join("-")})};let y=!1;const b={};return b.field="input",l&&(b.className=l),n.jsxs("dl",{...b,children:[e&&n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx("input",{type:"tel",placeholder:r,onChange:x,inputMode:"numeric",onKeyDown:m=>y=m.key==="Backspace",onFocus:x,defaultValue:fe.Date(t,"dd.mm.yyyy"),onBlur:v})})]})}function Ii({children:e}){return n.jsx("div",{className:"l",children:n.jsx("ul",{children:e})})}function $i({children:e}){return n.jsx("div",{className:Q.s,children:e})}function Ni({children:e,className:t}){let r={};return t&&(r.className=t),n.jsx("div",{"data-form":"outline",...r,children:n.jsx("ul",{children:e})})}function Di({children:e}){return n.jsx("div",{className:Q.c,children:e})}const rt={List:Ii,Scroll:$i,Main:ti,Add:ni,Icon:ai,Open:oi,Shake:ii,Form:Ni,Center:Di,Close:si};function it({value:e,onValue:t,name:r,placeholder:i="",title:a,error:o,hide:l=!1,edit:d=!0,show:c=!0,active:u=!0,after:f="",view:p,modal:g,module:x,options:v,className:y}){let[b,m]=_.useState(e),k=z=>{if(!(d&&u)||!g)return;let I=g.split(".");rt.Open(I[1],{callback:R=>{t&&t({value:R,name:r}),m(R)},onValue:t,options:v,name:r,value:e})};const E={};E.field="input",y&&(E.className=y);const T={};return i&&(T.placeholder=i),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...E,children:[a&&n.jsx("dt",{children:a}),n.jsx("dd",{...T,onClick:k,edit:(d&&u)+"","data-after":f,children:b}),o&&n.jsx("em",{children:o})]})}function at(e){let t=e.value,r=p=>e.type==="multi"?p.replace(/[^+\d.+-]/g,""):p.replace(/[^+\d.]/g,""),i=(p,g)=>{let x=document.createRange(),v=window.getSelection();x.setStart(g.childNodes[0],p),x.collapse(!0),v.removeAllRanges(),v.addRange(x),g.focus()},a=p=>{e.onValue({value:r(p.target.textContent),name:e.name}),p.target.textContent=r(p.target.textContent),p.target.textContent.length>0&&i(p.target.textContent.length,p.target)},o=p=>{p.target.textContent===""&&(p.target.textContent=0),e.onValue({value:r(p.target.textContent),name:e.name}),p.target.textContent=fe.Money(p.target.textContent)},l=p=>{p.target.textContent=r(p.target.textContent)},d=p=>{p.key==="Enter"&&p.preventDefault()},c=p=>{p.preventDefault(),navigator.clipboard.readText().then(g=>{g=g.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,g)}).catch(g=>{})},u=()=>e.title?n.jsx("dt",{children:e.title}):"",f=()=>e.error?n.jsx("em",{children:e.error}):"";return n.jsxs("dl",{"data-form":"input",children:[u(),n.jsx("dd",{onInput:a,onPaste:c,onBlur:o,onKeyDown:d,onFocus:l,contentEditable:!0,suppressContentEditableWarning:!0,"e-after":e.after,children:fe.Money(t)}),f()]})}const Vt={o:"_o_1kqkq_1",c:"_c_1kqkq_11"};function Xt({value:e,onValue:t,name:r,view:i,error:a,edit:o=!0,active:l=!0,title:d,placeholder:c="",after:u}){let[f,p]=_.useState(e);_.useEffect(()=>{p(e)},[e]);let g=y=>{p(y),t&&t({value:y,name:r})},x=y=>{if(!o||!l)return;const b=y.target.getBoundingClientRect(),m=b.left,k=b.top;Le.setListener("form",n.jsx(Mi,{position:{x:m,y:k},onValue:g,date:f},new Date().getTime()))};const v={};return c&&(v.placeholder=c),n.jsx(n.Fragment,{children:i==="icon"?n.jsx("i",{"data-icon":"F043",onClick:x}):n.jsxs("dl",{children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{onClick:x,...v,children:fe.Date(f,"mm.yyyy")}),a&&n.jsx("em",{children:a})]})})}const Mi=e=>{let[t,r]=_.useState(!0),i=new Date,a=new Date(e.date),o={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},l={y:parseInt(a.getFullYear()),m:parseInt(a.getMonth())+1},[d,c]=_.useState(l.y),u=()=>{r(!1)},f=()=>{c(d+1)},p=()=>{c(d-1)},g=m=>{e.onValue(d+"-"+fe.Number(2,m)),u()},x=m=>o.y===l.y&&o.m===m?"_FFEB3B":"",v=Array(12).fill("").map((m,k)=>k+1),y=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,b=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return n.jsx(n.Fragment,{children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Vt.o,onClick:()=>u()},new Date().getTime()),n.jsxs("div",{className:Vt.c,style:{top:y+"px",left:b+"px"},children:[n.jsxs("s",{children:[n.jsx("i",{"data-icon":"F021",onClick:()=>p()}),n.jsx("h2",{children:d}),n.jsx("i",{"data-icon":"F022",onClick:()=>f()})]}),n.jsx("div",{children:v.map((m,k)=>n.jsx("span",{onClick:()=>{g(m)},color:x(m),children:n.jsx("b",{children:fe.Month(m).abc})},k))})]})]}):""})};function Jt(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",[i,a]=_.useState(!1),o=e.edit!==void 0?e.edit:!0,l=e.active!==void 0?e.active:!0,c=!!(e.hide&&(e.value===""||e.value===void 0))&&!(o&&l);i=o?!0:i;let u=e.placeholder!==void 0?e.placeholder:"Заметка пуста",f=b=>{e.onValue&&e.onValue({value:b.target.innerText,name:e.name})},p=b=>{b.preventDefault(),navigator.clipboard.readText().then(m=>{window.document.execCommand("insertText",!1,m)}).catch(m=>{})},g=b=>{o||a(!i)};const x=b=>{e.onSave&&e.onSave({value:b.target.innerText,name:e.name})},v={};v.field="notes",e.className&&(v.className=e.className);const y={};return u&&(y.placeholder=u),i&&(y.open=""),o&&l&&(y.edit=""),c?n.jsx(n.Fragment,{}):n.jsxs("dl",{...v,children:[t(),n.jsx("dd",{onPaste:p,onInput:f,onBlur:x,contentEditable:o&&l?"plaintext-only":"false",...y,onDoubleClick:g,suppressContentEditableWarning:!0,children:e.value}),r()]})}function ot({onValue:e,onSave:t,value:r,name:i,active:a,max:o,edit:l,title:d,error:c,show:u,hide:f,placeholder:p,className:g,after:x,view:v}){l=l!==void 0?l:!0,a=a!==void 0?a:!0,f=!!(f&&(r===""||r===void 0))&&!(l&&a),p=p!==void 0?p:"",o=o!==void 0?o:99;let b=E=>{e==null||e({name:i,value:E.currentTarget.value})};const m=E=>{t==null||t({name:i,value:E.currentTarget.value})},k={};return k.field="input",g&&(k.className=g),f?n.jsx(n.Fragment,{}):n.jsxs("dl",{...k,children:[d&&n.jsx("dt",{children:d}),n.jsx("dd",{children:n.jsx("input",{name:i,type:"tel",inputMode:"numeric",onChange:b,onBlur:m,placeholder:p,defaultValue:r})}),c&&n.jsx("em",{children:c})]})}function Qt({value:e,onValue:t,name:r,placeholder:i="",className:a,title:o,error:l,edit:d=!0,active:c=!0,reload:u=!1,after:f=""}){let p=b=>{t&&t({value:b.target.textContent,name:r,reload:u})},g=b=>{b.key==="Enter"&&b.preventDefault()},x=b=>{b.preventDefault(),navigator.clipboard.readText().then(m=>{window.document.execCommand("insertText",!1,m.replace(/(\r\n|\n|\r)/gm," "))}).catch(m=>{})};const v={};v.field="password",a&&(v.className=a);const y={};return i&&(y.placeholder=i),n.jsxs("dl",{...v,children:[o?n.jsx("dt",{children:o}):"",n.jsx("dd",{onPaste:x,onInput:p,onKeyDown:g,onBlur:me.Blur,contentEditable:d&&c?"plaintext-only":"false",...y,suppressContentEditableWarning:!0,children:e}),l?n.jsx("em",{children:l}):""]})}function st({onValue:e,onSave:t,value:r,name:i,active:a,edit:o,title:l,error:d,hide:c,placeholder:u,className:f}){o=o!==void 0?o:!0,a=a!==void 0?a:!0,c=!!(c&&(r===""||r===void 0))&&!(o&&a),u=u||"";const g="+7__________",x=new Set("_"),v=(I=>Array.from(g,(R,re)=>x.has(R)?I=re+1:I))(0),y=[...g].findIndex(I=>x.has(I)),b=new RegExp("\\d","g"),m=I=>(I=I.match(b)||[],Array.from(g,R=>(I[0]===R||x.has(R))&&I.shift()||R)),k=I=>{const[R,re]=[I.target.selectionStart,I.target.selectionEnd].map(O=>(O=m(I.target.value.slice(0,O)).findIndex(M=>x.has(M)),O<0?v[v.length-1]:T?v[O-1]||y:O));I.target.value=m(I.target.value).join(""),I.target.setSelectionRange(R,re),T=!1,e==null||e({name:i,value:I.target.value.match(/\d+/g)[0]})},E=I=>{I.target.value=m(I.target.value).join(""),t==null||t({name:i,value:I.target.value.match(/\d+/g)[0]})};let T=!1;const z={};return z.field="input",f&&(z.className=f),c?n.jsx(n.Fragment,{}):n.jsxs("dl",{...z,children:[l&&n.jsx("dt",{children:l}),n.jsx("dd",{children:n.jsx("input",{name:i,type:"tel",inputMode:"numeric",onChange:k,onFocus:k,onBlur:E,placeholder:u,defaultValue:r})}),d&&n.jsx("em",{children:d})]})}const en=e=>{let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,a=e.placeholder!==void 0?e.placeholder:"",o=0,l=()=>{clearTimeout(o),o=setTimeout(()=>{},1e3)},d=f=>{f.key==="Enter"&&f.preventDefault()},c=f=>{f.preventDefault(),navigator.clipboard.readText().then(p=>{window.document.execCommand("insertText",!1,p)}).catch(p=>{})};const u={};return a&&(u.placeholder=a),n.jsxs("dl",{"data-form":"input",children:[t(),n.jsx("dd",{onPaste:c,onInput:l,onKeyDown:d,contentEditable:r&&i?"plaintext-only":"false",...u,suppressContentEditableWarning:!0,children:e.value})]})};function lt({title:e,error:t,edit:r=!0,active:i=!0,hide:a,value:o="0",onValue:l,options:d,placeholder:c="",name:u,after:f,view:p,className:g}){var k;const x=_.useId(),[v,y]=_.useState((k=d[parseInt(o)])==null?void 0:k.n);let b=E=>{y(d[E.target.value].n),l==null||l({name:u,value:E.target.value})};const m={};return m.field="select",g&&(m.className=g),n.jsxs("dl",{...m,children:[e?n.jsx("dt",{children:e}):"",n.jsxs("dd",{children:[v,n.jsx("select",{name:u,id:x,defaultValue:o+"",onChange:b,children:Object.keys(d).map(E=>n.jsx("option",{value:E,children:d[E].n},E))})]})]})}function dt({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onSave:g,className:x=""}){let v=!!(l&&(e===""||e===void 0)),y=T=>{t==null||t({value:T.target.value,name:r})},b=T=>{T.preventDefault(),navigator.clipboard.readText().then(z=>{window.document.execCommand("insertText",!1,z.replace(/(\r\n|\n|\r)/gm," "))}).catch(z=>{})},m=T=>{T.preventDefault(),navigator.clipboard.writeText(T.target.value).then(function(){Ae.Copy("Данные в буфер обмене")},function(z){})};if(!(d&&c)&&!f||!(d&&c)&&v)return"";const k={};k.field="input",x&&(k.className=x);const E=T=>{g==null||g({value:T.target.value,name:r})};return n.jsxs("dl",{...k,children:[a?n.jsx("dt",{children:a}):"",n.jsx("dd",{children:n.jsx("input",{name:r,autoComplete:"off",type:"text",onChange:y,onPaste:b,onBlur:E,onContextMenu:m,placeholder:i,defaultValue:e,spellCheck:"false"})}),o?n.jsx("em",{children:o}):""]})}function ct(e){let t=()=>e.title?n.jsx("dt",{children:e.title}):"",r=()=>e.error?n.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,a=e.active!==void 0?e.active:!0,l=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(i&&a),d=e.placeholder!==void 0?e.placeholder:"",c=x=>{f(e.options[x]),e.onValue({value:x,name:e.name})},[u,f]=_.useState(e.default!==void 0?e.options[e.default]:e.default),p=x=>{if(!(i&&a))return;const v=x.target.getBoundingClientRect();Le.setListener("form",n.jsx(zi,{parent:v,onValue:c,view:e.view,options:e.options},new Date().getTime()))};const g={};return d&&(g.placeholder=d),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{"data-form":"select",children:[t(),n.jsx("dd",{onClick:p,"data-edit":(i&&a)+"",...g,children:u}),r()]})}const zi=({onValue:e,parent:t,view:r,options:i})=>{let[a,o]=_.useState(!0),l=()=>{o(!1)},d=p=>{o(!1),e(p)},c=Object.keys(i).length*36,u=window.innerHeight-t.y+t.height<c?t.y-(c-33):t.y+33,f=window.innerWidth-t.x<265?t.x-235:t.x;return n.jsx(n.Fragment,{children:a?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-select":"backdrop",onClick:l},new Date().getTime()),n.jsx("div",{"data-select":"background "+r,style:{top:u+"px",left:f+"px",width:t.width},children:n.jsx("ul",{children:Object.keys(i).map((p,g)=>n.jsx("li",{onClick:()=>{d(p)},children:i[p]},g))})})]}):""})};function ut({set:e,value:t,onValue:r,name:i,placeholder:a="",title:o="",error:l="",hide:d=!1,edit:c=!0,show:u=!0,active:f=!0,after:p="",view:g,module:x,item:v,className:y=""}){let b={};switch(e){case"String":return n.jsx(dt,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Select":return v&&(b=ie.getSelect(parseInt(v))?ie.getSelect(parseInt(v)):{0:{s:"1",n:"не известно"}}),n.jsx(lt,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y,options:b});case"Users":return ie.getSelect("user"),n.jsx(ct,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y,options:b});case"Date":return n.jsx(nt,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Phone":return n.jsx(st,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Number":return n.jsx(ot,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Money":return n.jsx(at,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i,placeholder:a,className:y});case"Modal":return n.jsx(it,{title:o,show:u,hide:d,view:g,edit:c,active:f,value:t,onValue:r,name:i||"",placeholder:a,className:y,options:b,module:x||""})}}function tn({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:g,onSave:x,className:v=""}){let y=!!(l&&(e===""||e===void 0));if(!(d&&c)&&!f||!(d&&c)&&y)return"";let b=T=>{t&&t({value:T.target.innerText,name:r})},m=T=>{x&&x({value:T.target.innerText,name:r})},k=T=>{T.preventDefault(),navigator.clipboard.readText().then(z=>{window.document.execCommand("insertText",!1,z)}).catch(z=>{})};const E={};return i&&(E.placeholder=i),n.jsxs("dl",{children:[a??n.jsx("dt",{children:a}),n.jsx("dd",{onPaste:k,onBlur:m,onInput:b,contentEditable:d&&c?"plaintext-only":"false",...E,suppressContentEditableWarning:!0,children:e}),o??n.jsx("em",{children:o})]})}function nn({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:g,onSave:x,className:v=""}){let y=!!(l&&(e===""||e===void 0));if(fe.Date(e===void 0?new Date:e,"HH:MM"),_.useRef(null),!(d&&c)&&!f||!(d&&c)&&y)return"";const b="__:__",m=new Set("_"),k=(M=>Array.from(b,(X,je)=>m.has(X)?M=je+1:M))(0),E=[...b].findIndex(M=>m.has(M)),T=new RegExp("\\d","g"),z=M=>(M=M.match(T)||[],Array.from(b,X=>(M[0]===X||m.has(X))&&M.shift()||X)),I=M=>{const[X,je]=[M.target.selectionStart,M.target.selectionEnd].map(U=>(U=z(M.target.value.slice(0,U)).findIndex(se=>m.has(se)),U<0?k[k.length-1]:O?k[U-1]||E:U));M.target.value=z(M.target.value).join(""),M.target.setSelectionRange(X,je),t==null||t({name:r,value:M.target.value})},R={};R.field="input",v&&(R.className=v);const re={};i&&(re.placeholder=i);let O=!1;return n.jsx(n.Fragment,{children:n.jsxs("dl",{...R,children:[a?n.jsx("dt",{children:a}):"",n.jsx("dd",{...re,children:n.jsx("input",{type:"tel",placeholder:i,onChange:I,inputMode:"numeric",onKeyDown:M=>O=M.key==="Backspace",onFocus:I,onBlur:M=>M.target.value===b&&(M.target.value="")})}),o?n.jsx("em",{children:o}):""]})})}function rn({onValue:e,label:t,value:r,className:i,name:a,reload:o}){r=!!r;const[l,d]=_.useState(r),c=()=>{let p=!l;e({name:a,value:p,reload:o}),d(p)},u={};u.field="check",i&&(u.className=i);const f={};return l&&(f.active=""),n.jsxs("dl",{...u,children:[t?n.jsx("dt",{children:t}):"",n.jsx("dd",{...f,onClick:c})]})}const an=({onValue:e,value:t,name:r,item:i})=>{const[a,o]=_.useState(!!t);_.useEffect(()=>{o(!!t)},[t]);let l=()=>{let d=parseInt(a)===0?1:0;o(d),e({value:d,name:r,key:i,item:i})};return n.jsx("div",{role:"switch",onClick:l,"aria-checked":`${a?"true":"false"}`})};function on({value:e,onValue:t,name:r,placeholder:i="",title:a="",error:o="",hide:l=!1,edit:d=!0,active:c=!0,after:u="",show:f=!0,view:p,onBlur:g,onSave:x,className:v=""}){const[y,b]=_.useState(e!==void 0?e.split(","):[]);_.useEffect(()=>{e!==void 0&&b(e!==void 0?e.split(","):[])},[e]);let m=()=>{b([...y,""])},k=O=>{y.splice(O,1),y.length===0&&y.push(""),b([...y]),g!==void 0&&g({value:y.join(","),name:r})},E=!!(l&&(e===""||e===void 0)),T=O=>{};if(!(d&&c)&&!f||!(d&&c)&&E)return"";const z={};z.field="group",v&&(z.className=v);const I=O=>{me.Blur(O),x&&x({value:O.target.textContent,name:r})};let R=(O,M)=>{y[M]=O.target.textContent,t!==void 0&&t({value:y.join(","),name:r})},re=O=>{O.key==="Enter"&&O.preventDefault()};return n.jsxs("dl",{...z,children:[n.jsxs("dt",{children:[a,n.jsx("i",{onClick:m,children:n.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:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})})]}),n.jsx("dd",{children:y.map((O,M)=>n.jsxs("li",{className:"field_group_item",children:[n.jsx("span",{onInput:X=>R(X,M),edit:"true",name:r,placeholder:i,onPaste:T,contentEditable:!0,onKeyDown:re,onBlur:I,suppressContentEditableWarning:!0,children:y[M]}),n.jsx("i",{onClick:()=>{k(M)},children:n.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:[n.jsx("path",{d:"M17.25 17.25 6.75 6.75"}),n.jsx("path",{d:"m17.25 6.75-10.5 10.5"})]})})]},M))}),o?n.jsx("em",{children:o}):""]})}const Fi=e=>(e=e!==void 0&&e!==""?e.split(","):[],e.reduce((t,r)=>(t[r]=!0,t),{}));function sn({value:e,onValue:t,name:r,placeholder:i="",title:a,error:o,hide:l=!1,edit:d=!0,show:c=!0,active:u=!0,after:f="",view:p,modal:g,module:x,options:v,className:y}){const[b,m]=_.useState(Fi(e)),k=z=>{if(!(d&&u)||!g)return;let I=g.split(".");rt.Open(I[1],{callback:R=>{t&&t({value:R,name:r}),m(R)},onValue:t,options:v,name:r,value:b})},E={};E.field="group",y&&(E.className=y);const T={};return i&&(T.placeholder=i),l?n.jsx(n.Fragment,{}):n.jsxs("dl",{...E,children:[n.jsxs("dt",{children:[a,n.jsx("i",{onClick:k,children:n.jsxs("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:[n.jsx("path",{d:"M12 5.25v13.5"}),n.jsx("path",{d:"M18.75 12H5.25"})]})})]}),n.jsx("dd",{...T,onClick:open,edit:(d&&u)+"","data-after":f,children:Object.keys(b).map(z=>{var I;return n.jsx("div",{className:"field_group_item",children:(I=v[z])==null?void 0:I.label},z)})}),o&&n.jsx("em",{children:o})]})}const ln={Color:Gt,Date:nt,Code:Ht,Check:rn,Switch:Wt,Button:Zt,Message:Ut,Generator:Yt,Captcha:Kt,Modal:it,Money:at,Month:Xt,Notes:Jt,Number:ot,Password:Qt,Phone:st,Search:en,Select:lt,Set:ut,Textarea:tn,Time:nn,Users:ct,String:dt,Toogle:an,Group:on,Options:sn},_e={debug:"_debug_ug20b_34",b:"_b_ug20b_46",o:"_o_ug20b_50",mb:"_mb_ug20b_55",tm:"_tm_ug20b_66",ta:"_ta_ug20b_133","--body":"_--body_ug20b_143"},C=window.Telegram.WebApp,oe={is:!1,MainButton:{},BackButton:{}};let be={};be.dark={"--tg-theme-bg-color":"#212121","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#aaaaaa","--tg-theme-link-color":"#8774e1","--tg-theme-button-color":"#8774e1","--tg-theme-button-text-color":"#ffffff","--tg-theme-secondary-bg-color":"#0f0f0f","--tg-theme-header-bg-color":"#212121","--tg-theme-accent-text-color":"#8774e1","--tg-theme-section-bg-color":"#212121","--tg-theme-section-header-text-color":"#aaaaaa","--tg-theme-subtitle-text-color":"#aaaaaa","--tg-theme-destructive-text-color":"#e53935"},be.light={"--tg-theme-bg-color":"#ffffff","--tg-theme-text-color":"#000000","--tg-theme-hint-color":"#999999","--tg-theme-link-color":"#2481cc","--tg-theme-button-color":"#2481cc","--tg-theme-button-text-color":"#ffffff","--tg-theme-secondary-bg-color":"#efeff3"},be.users={"--tg-theme-bg-color":"#000000","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#98989e","--tg-theme-link-color":"#ffffff","--tg-theme-button-color":"#ffffff","--tg-theme-button-text-color":"#000000","--tg-theme-secondary-bg-color":"#000000"},C.getUser=()=>{var e;return((e=C.initDataUnsafe)==null?void 0:e.user)===void 0?{}:C.initDataUnsafe},C.MainButton.callback=[],C.MainButton.set=e=>{oe.is?oe.MainButton.set(e):(C.MainButton.callback.forEach(t=>{C.MainButton.offClick(t)}),C.MainButton.callback=[],typeof e=="boolean"?C.MainButton.isVisible=!1:(C.MainButton.text=e.text,e.color&&(C.MainButton.color=e.color),e.textColor&&(C.MainButton.textColor=e.textColor),C.MainButton.isVisible=!0,C.MainButton.isActive=e.isActive===void 0?!0:e.isActive,C.MainButton.callback.push(()=>{var t;e.page===void 0?(t=e.callback)==null||t.call(e):ae.setPage(e.page)}),C.MainButton.onClick(C.MainButton.callback[0])))},C.BackButton.state=[!1],C.BackButton.listen=[],C.BackButton.router=e=>{e===!1?(C.BackButton.isVisible=!1,C.BackButton.offClick(C.BackButton.listen[0]),C.BackButton.listen.shift(),C.BackButton.state.length!==1&&C.BackButton.state.pop()):(C.BackButton.isVisible=!0,C.BackButton.offClick(C.BackButton.listen[0]),C.BackButton.listen.shift(),C.BackButton.listen.push(()=>{let t=C.BackButton.state.pop();if(t.page!==void 0)ae.setPage(t.page);else{let r=C.BackButton.state[C.BackButton.state.length-1];C.BackButton.router(r)}}),C.BackButton.onClick(C.BackButton.listen[0]))},C.BackButton.set=e=>{oe.is?oe.BackButton.set(e):(C.BackButton.state.push(e),C.BackButton.router(e))},C.Notice=(e,t)=>{t!==void 0?(Ae.Send({type:e,text:t}),oe.is||C.HapticFeedback.notificationOccurred(e)):(Ae.Send(e),oe.is||C.HapticFeedback.notificationOccurred(e.type))},C.Init=({dev:e})=>{if(e){let[t,r]=_.useState(!1),[i,a]=_.useState(!1),[o,l]=_.useState("dark"),[d,c]=_.useState(!1),[u,f]=_.useState(!1);oe.is=!0,oe.MainButton.set=r,oe.BackButton.set=a,_.useEffect(()=>{for(let x in be[o])document.documentElement.style.setProperty(x,be[o][x])},[]);let p=x=>{for(let v in be[x])document.documentElement.style.setProperty(v,be[x][v]);l(x),c(!1)},g=()=>{c(!1),f(!0)};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:_e.debug,children:[i===!1?n.jsx("div",{className:_e.b,children:"Отмена"}):n.jsx("div",{onClick:()=>{i.page===void 0||ae.setPage(i.page)},className:_e.b,children:"Назад"}),n.jsx("div",{className:_e.o,onClick:()=>c(!d),children:"Меню"})]}),t&&n.jsx("div",{className:_e.mb,children:n.jsx("button",{onClick:()=>{t.page&&ae.setPage(t.page),t.callback&&t.callback()},children:t.text})}),d?n.jsxs("div",{className:_e.tm,children:[n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("button",{onClick:g,children:"Authorization"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>ae.setPage("Add"),children:"Add Page"})})]}),n.jsxs("ul",{children:[n.jsxs("li",{children:[n.jsx("button",{children:"Thema"}),n.jsxs("ol",{children:[n.jsx("li",{children:n.jsx("button",{onClick:()=>p("dark"),children:"Dark"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>p("light"),children:"Light"})}),n.jsx("li",{children:n.jsx("button",{onClick:()=>p("users"),children:"Users"})})]})]}),n.jsx("li",{children:n.jsx("button",{onClick:()=>c(!d),children:"Closed"})})]})]}):"",u?n.jsx(Pi,{setAuthorization:f}):""]})}else return n.jsx(n.Fragment,{})};const Pi=({setAuthorization:e})=>{let t={},r=a=>{t=a.value},i=a=>{localStorage.setItem("auth",t)};return n.jsx("div",{className:_e.ta,children:n.jsxs("div",{className:"--body",children:[n.jsx("fieldset",{children:n.jsx(ln.Notes,{label:"Data JSON",name:"description",onValue:r,placeholder:""})}),n.jsx("div",{onClick:i,children:" Сщхранить "})]})})},Ri=({children:e,config:t})=>(window.location.pathname==="/clear"&&(window.history.pushState({},"","/"),G()),N.New(t.crypto),t.defaultModule&&Wn(t.defaultModule),Un(n.jsxs(n.Fragment,{children:[n.jsx(C.Init,{dev:t.dev}),n.jsx(ei,{config:t.modal}),n.jsx(Ur,{}),n.jsx(Xr,{}),n.jsx(pi,{}),e]}))),dn=({list:e,onClick:t,active:r,size:i,view:a})=>n.jsx("nav",{children:n.jsx("ul",{className:[i,a].join(" "),children:e.map(o=>n.jsx(Oi,{onClick:t,active:r,label:o.label,link:o.link},o.link))})}),Oi=({onClick:e,label:t,link:r,active:i})=>n.jsx("li",{"tabs-active":String(i===r),onClick:()=>e(r),children:t});dn.defaultProps={size:"M",view:"H"};const Li=({title:e="",button:t,description:r="",children:i})=>n.jsxs("fieldset",{children:[e&&n.jsxs("legend",{children:[e,t&&n.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),n.jsx("ul",{children:i}),r&&n.jsx("article",{children:r})]}),Ai={setting:"_setting_dva4m_2"},qi=({children:e})=>n.jsx("div",{className:Ai.setting,children:e}),Wi=({label:e,children:t})=>{let[r,i]=_.useState(!1);return n.jsxs("li",{"data-item":"accordion",children:[n.jsxs("dl",{onClick:()=>i(!r),children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx("div",{"data-close":String(r)})})]}),r&&n.jsx("div",{children:t})]})},Zi=({label:e,onClick:t,button:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"button",onClick:()=>t(),children:r})]})}),cn={Switch:({active:e,onClick:t})=>(e=typeof e=="number"?!!e:e,n.jsx("div",{role:"switch",onClick:()=>{t()},"aria-checked":e?"true":"false"}))},Ui={Accordion:Wi,Button:Zi,Switch:({label:e,onClick:t,active:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:n.jsx(cn.Switch,{onClick:t,active:r})})]})}),Info:({label:e,info:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:r})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>n.jsx("li",{children:n.jsxs("dl",{children:[n.jsx("dt",{children:e}),n.jsx("dd",{children:t})]})})};function un({list:e,onClick:t,active:r,size:i,view:a}){return n.jsx("nav",{children:n.jsx("ul",{className:[i,a].join(" "),children:e.map(o=>n.jsx(Yi,{onClick:t,active:r,label:o.label,link:o.link},o.link))})})}const Yi=({onClick:e,label:t,link:r,active:i})=>n.jsx("li",{"tabs-active":String(i===r),onClick:()=>e(r),children:t});un.defaultProps={size:"M",view:"H"};const Ki={Section:Li,Main:qi,Item:Ui,Tabs:un};function fn({text:e,type:t,button:r}){let[i,a]=_.useState(!1),o={active:t};const l=()=>{if(r){if(r.onClick)return r.onClick({});if(r.onSend)return i?void 0:(a(!0),r.onSend(a))}};return n.jsxs("div",{className:et.al,...o,children:[n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:n.jsx("path",{fill:"#fff",d:"M10.362 2.015C11.4264 1.66167 12.5736 1.66167 13.638 2.015C14.6981 2.36687 15.5304 3.20141 16.3665 4.37395C17.1999 5.5426 18.1208 7.17206 19.3078 9.2725L19.3544 9.35496C20.5417 11.4557 21.4625 13.0851 22.0364 14.4065C22.613 15.7343 22.9002 16.8807 22.6711 17.9821C22.4403 19.0911 21.8714 20.0995 21.0428 20.8617C20.2162 21.622 19.0907 21.9428 17.6736 22.0968C16.2645 22.25 14.4212 22.25 12.0488 22.25H11.9513C9.57882 22.25 7.73554 22.25 6.32642 22.0968C4.90927 21.9428 3.78379 21.622 2.95722 20.8617C2.12862 20.0995 1.55968 19.0911 1.32895 17.9821C1.0998 16.8807 1.387 15.7343 1.96365 14.4065C2.53752 13.0851 3.45835 11.4557 4.64558 9.35495L4.69218 9.2725L4.69218 9.27249C5.87921 7.17206 6.80008 5.5426 7.63347 4.37395C8.46963 3.20141 9.30194 2.36687 10.362 2.015ZM11 17C11 16.4477 11.4457 16 11.9955 16H12.0045C12.5543 16 13 16.4477 13 17C13 17.5523 12.5543 18 12.0045 18H11.9955C11.4457 18 11 17.5523 11 17ZM11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V9C13 8.44772 12.5523 8 12 8C11.4477 8 11 8.44772 11 9V13Z"})}),n.jsx("span",{children:e}),r&&n.jsx("button",{onClick:l,children:r.label})]})}const K={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"},pn=({title:e,left:t,right:r,children:i})=>n.jsxs("div",{className:K.h,children:[n.jsx("div",{className:K.t,children:e}),t&&n.jsx("div",{className:K.hl,children:t}),r&&n.jsx("div",{className:K.hr,children:r}),i]}),xn=({children:e,...t})=>n.jsx("div",{className:K.l,children:e}),hn=({children:e})=>n.jsx("div",{className:K.s,children:e}),gn=({children:e,edit:t})=>{const r={};return t&&(r.edit=""),n.jsx("div",{...r,className:K.f,children:e})};function mn({children:e}){return n.jsx("div",{className:K.g,children:e})}const Hi={Header:pn,Section:hn,Group:mn,Form:gn,List:xn,A:fn,U:({children:e})=>n.jsx("div",{className:K.u,children:e}),G:mn,C:({children:e})=>n.jsx("div",{className:K.c,children:e}),L:xn,O:({children:e,className:t,title:r})=>n.jsxs("div",{className:[K.o,t].join(" "),children:[r&&n.jsx("div",{className:K.hh,children:r}),e]}),S:hn,H:pn,M:({children:e})=>n.jsx("div",{className:K.m,children:e}),F:gn},Gi={Send:Qr,Line:fn};function Vi(){return n.jsx("svg",{viewBox:"0 0 462.86 359.96",children:n.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 Xi={};function Ji(e){Xi.add(e)}function Qi({color:e,size:t,name:r}){return n.jsx("svg",{width:t,height:t,color:e,children:n.jsx("use",{href:`#${r}`})})}const ea={Logo:Vi,Sprite:Ji,Symbol:Qi};function ta(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.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"}),n.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"}),n.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 na(){return n.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[n.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"}),n.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"}),n.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 ra(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:n.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 ia={n:"_n_euuvm_1"};let Ne={},De=[];const aa=(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 r=e.news.filter(a=>a.id!==t.id);return{...e,news:r,active:r.length!==0};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let a in i)i[a]!=="999"&&(e.active=!0);return Ne.get(i,e.active),{...e,take:i,active:e.active};case"exit":return e;default:throw new Error}};function oa(e){Ne.fn({action:"add",data:e})}function sa(e){Ne.fn({action:"add",data:e})}function la(e){Ne.fn({action:"new",data:e})}function da(e){Ne.fn=e}function ca(){const[e,t]=_.useReducer(aa,{open:!1,active:!1,news:[],take:{}});We.useListener("bell",async i=>{}),da(async i=>{switch(i.action){case"add":De.push(i.data);break}}),_.useEffect(()=>{(async()=>{let i=await We.Send({type:"module",module:"M00",query:"x0054",array:["M01","M02"]});for(let a in i)switch(a){case"news":t({type:"news",data:i.news});break;case"M01":i[a].forEach(o=>{De.push({module:"M01",type:1,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break;case"M02":i[a].forEach(o=>{De.push({module:"M02",type:117,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break}})(),setInterval(()=>{De.forEach((i,a)=>{t({type:"add",data:{module:i.module,type:i.type,id:i.id,datetime:i.datetime,txt:i.title}}),i.datetime<new Date().getTime()&&De.splice(a,1)})},6e4)},[]);let r=async i=>{t({type:"hide",id:i.id})};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ia.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?n.jsx(na,{}):n.jsx(ta,{})}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"notify-m",children:[n.jsx("div",{className:"notify-l",children:e.news.map((i,a)=>n.jsx(ua,{data:i,dispatch:t},a))}),n.jsx("div",{className:"notify-b",onClick:r,children:"История"})]})]}):""]})}const ua=({data:e,dispatch:t})=>{let r=async i=>{t({type:"hide",id:i.id}),await We.Send({type:"module",module:"M00",query:"x0055",data:{id:i.id,type:i.type,db:i.db}})};return n.jsxs("div",{className:"notify-i",children:[n.jsx("div",{className:"--icon","data-icon":e.type}),n.jsxs("div",{className:"--body",children:[n.jsx("div",{className:"--name",children:e.type}),n.jsx("div",{className:"--text",children:e.txt})]}),n.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>r(e),children:" "})]})},fa="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBhPVtdLHM9bnVsbDtvbmNvbm5lY3Q9ZnVuY3Rpb24obCl7dmFyIHQ9bC5zb3VyY2U7YS5wdXNoKHQpO2NvbnN0IG49ZT0+e3MhPT1udWxsJiZzLnJlYWR5U3RhdGU9PT0xP3Muc2VuZChKU09OLnN0cmluZ2lmeShlKSk6dC5wb3N0TWVzc2FnZSh7dHlwZToibm9TZW5kIn0pfTtsZXQgcj1lPT57aWYocyE9PW51bGwmJnMucmVhZHlTdGF0ZT09PTEpcmV0dXJuIHQucG9zdE1lc3NhZ2Uoe3R5cGU6InRydWUifSk7ZS5say5hZGRyZXNzPT09ImxvY2FsaG9zdCI/cz1uZXcgV2ViU29ja2V0KGB3czovL2xvY2FsaG9zdDoke2UubGsuc29ja2V0KzF9YCk6cz1uZXcgV2ViU29ja2V0KCJ3c3M6Ly8iK2UubGsuYWRkcmVzcysiOiIrKGUubGsuc29ja2V0KzEpKSxzLm9uZXJyb3I9KCk9PnQucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIn0pLHMub25vcGVuPSgpPT57bih7dHlwZToiY29ubmVjdCIsdWtleTplLnVrZXl9KX0scy5vbm1lc3NhZ2U9bz0+e2xldCBjPUpTT04ucGFyc2Uoby5kYXRhKTthLmZvckVhY2goZD0+e2QucG9zdE1lc3NhZ2UoYyl9KX0scy5vbmNsb3NlPSgpPT50LnBvc3RNZXNzYWdlKHt0eXBlOiJjbG9zZWQifSl9O3Qub25tZXNzYWdlPWZ1bmN0aW9uKGUpe3N3aXRjaChlLmRhdGEudHlwZSl7Y2FzZSJsZW5ndGgiOnJldHVybiB0LnBvc3RNZXNzYWdlKGEubGVuZ3RoKTtjYXNlImFsbCI6cmV0dXJuIGEuZm9yRWFjaChvPT5vLnBvc3RNZXNzYWdlKHthbGw6YS5sZW5ndGh9KSk7Y2FzZSJzZW5kIjpyZXR1cm4gbihlLmRhdGEuanNvbik7Y2FzZSJjb25uZWN0IjpyZXR1cm4gcihlLmRhdGEpO2RlZmF1bHQ6dC5wb3N0TWVzc2FnZSh7dHlwZToiZGVmYXVsdCIsZGF0YTplLmRhdGEuanNvbn0pfX19fSkoKTsK";function pa(e){return new SharedWorker("data:text/javascript;base64,"+fa,{name:e==null?void 0:e.name})}function xa(e){let t={},r={};e.data.forEach(a=>{t[a.id]={s:a.v,n:a.a},r[a.id]=a});let i={...xe(),901:t};$t(r),Ee(i)}let ee={},Z={},qe=["filter","online","users","company","select","setting","info","job"];function ha(){const[e,t]=_.useState(!1),[r,i]=_.useState(!1);function a(o){const l=new pa;ee.laodData=d=>{let c=qe.indexOf(d);c>=0&&qe.splice(c,1),qe.length===0&&t(!0)},ee.send=d=>{l.port.postMessage({type:"send",json:d})},l.port.onmessage=d=>{let c=d.data;c.type==="error"&&i(!0),c.type==="true"&&t(!0),c.type==="closed"&&l.port.postMessage({type:"connect",ukey:o,lk:Xe()}),qe.length!==0&&ee.laodData(c.type),Z[c.type]&&Z[c.type](c)},l.port.postMessage({type:"connect",ukey:o,lk:Xe()})}return[a,e,r]}Z.module=e=>{ee[e.listen]!==void 0&&(ee[e.listen](e),delete ee[e.listen])},Z.bell=la,Z.company=xa,Z.info=e=>{let t={};t.db=e.db,t.id=e.data.id,t.job=e.data.job,t.login=e.data.login,t.name=e.data.p02,t.patronymic=e.data.p03,t.surname=e.data.p01,t.email=e.data.email,t.admin=e.data.menu.includes("99"),Nt(t),Tt(e.data.menu)},Z.version=async e=>{Re.version.Server(e.data)},Z.online=async e=>{},Z.offline=async e=>{},Z.chat=e=>{switch(e.data.action){case"new_message":ae.getModule();break;case"view_message":ae.getModule();break;case"write_message":ae.getModule();break}},Z.users=e=>{let t={};e.data.forEach(i=>{let a=i.p01+" "+i.p02+" "+i.p03,o=i.p01+" "+i.p02.substring(0,1)+"."+i.p03.substring(0,1)+".",l=i.p01.substring(0,1)+""+i.p02.substring(0,1)+i.p03.substring(0,1);t[i.id]={id:i.id,admin:i.m.includes("99"),ava:JSON.parse(i.a),job:i.j,login:"",online:{time:i.o,status:0},sts:i.s,nameFull:a,name:o,number:l}});let r={...xe(),user:t};Ee(r)},Z.api=e=>{let t={};e.data.forEach(r=>{t[r.api]={key:r.key,p01:r.p01,p02:r.p02}})},Z.delete=()=>{G()},Z.select=e=>{let t={...xe()};e.data.forEach(r=>{t[r.n]=JSON.parse(r.s)}),Ee(t)},Z.job=e=>{let t={...xe()},r={};Object.keys(e.data).forEach(i=>{r[i]={s:1,n:e.data[i]}}),t[1]=r,Ee(t)},Z.setting=e=>{fr(e.data)},Z.app=()=>{};const ga=(e,t)=>{ee[e]=t},ma=(e,t)=>{ee[e](t)};function _a(e){let t="_"+String(Math.random()).substring(2,7);return new Promise(r=>{ee[t]=i=>{i.error!==void 0?r({error:i.error}):r(i.data),delete ee[t]},e={...e,listen:t},e.type="modules",ee.send(e)})}const We={useConnect:ha,useListener:ga,setListener:ma,Send:_a};class ba{constructor(t="el",r="db"){jt(this,"storeName");jt(this,"_dbp");this.storeName=r,this._dbp=new Promise((i,a)=>{const o=indexedDB.open(t,1);o.onerror=()=>a(o.error),o.onsuccess=()=>i(o.result),o.onupgradeneeded=()=>{o.result.createObjectStore(r)}})}_withIDBStore(t,r){return this._dbp.then(i=>new Promise((a,o)=>{const l=i.transaction(this.storeName,t);l.oncomplete=()=>a(),l.onabort=l.onerror=()=>o(l.error),r(l.objectStore(this.storeName))}))}}let ft,L={};const ke=()=>(ft||(ft=new ba),ft),pe=(e,t,r=ke())=>r._withIDBStore("readwrite",i=>{L[e]=t,i.put(N.enCode(t),e)}),ne=(e,t=ke())=>L[e]===void 0?new Promise((r,i)=>{let a;t._withIDBStore("readonly",o=>{a=o.get(e)}).then(()=>{if(a.result!==void 0){let o=N.deCode(a.result);L[e]=o,r(o)}else r({})})}):L[e],va=(e,t=ke())=>t._withIDBStore("readwrite",r=>{r.delete(e)}),pt=(e=ke())=>e._withIDBStore("readwrite",t=>{t.clear()}),ya={id:async(e,t,r)=>{let i=await ne(t);if(r!==void 0)r({type:"load",base:i});else return i[e]},get:ne,set:pe,add:async(e,t,r,i)=>{let a,o;o=await ne(r),o[e.id]=e,await pe(r,o),a!==null&&(a=await ne(t),a[e.id]=e.eDate,await pe(t,a)),i!==void 0&&i({type:"load",page:a,base:o})},del:va,upd:(e,t,r,i=ke())=>{if(L[e]===void 0)return new Promise((a,o)=>{let l;i._withIDBStore("readonly",d=>{l=d.get(e)}).then(()=>{if(l.result!==void 0){let d=N.deCode(l.result);L[e]=d,L[e][t.id]={...L[e][t.id],...t.data},i.put(N.enCode(L[e]),e),a({})}else a({})})});if(L[e][t.id]!==void 0)return L[e][t.id]={...L[e][t.id],...t.data},r!==void 0&&L[r]!==void 0?L[r][t.id]!==void 0&&(L[r][t.id]=t.data.eDate):L[r]=[],delete L[e][t.id].$_item,delete L[e][t.id].$_send,i._withIDBStore("readwrite",a=>{a.put(N.enCode(L[e]),e),r!==void 0&&a.put(N.enCode(L[r]),r)})},key:(e=ke())=>{const t=[];return e._withIDBStore("readonly",r=>{(r.openKeyCursor||r.openCursor).call(r).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},load:e=>L[e],split:(e,t,r=[],i={})=>{let a=r.length!==0,o=[],l=i.sort,d=Object.keys(i).length!==0,c=Object.keys(i),u=Object.keys(e),f=[],p=x=>{let v="";if(r.forEach(y=>{v+=t[x][y]}),d){let y={};c.forEach(b=>{y[b]=t[x][b]});for(let b in l)t[x][l[b]]===void 0&&(pt(),location.reload()),b==="s1"&&(y[b]=new Date(t[x][l[b]]).getTime()),b==="s2"&&(y[b]=t[x][l[b]]),b==="s3"&&(y[b]=t[x][l[b]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:x,text:v,...y})}else o.push({id:x,text:v})},g=x=>{};return u.forEach(x=>{f.push(t[x])}),f.forEach(x=>{x===void 0?(pt(),location.reload()):(a&&p(x.id),d&&g(x.id))}),{list:f,search:o,filter:i}},clear:pt,updAll:async(e,t,r,i)=>{let a=await ne(t),o=await ne(r);for(let l in e)o[l]=e[l],a[l]=e[l].eDate;await pe(t,a),await pe(r,o),i!==void 0&&i({type:"load",page:a,base:o})},delAll:async(e,t,r,i)=>{let a=await ne(t),o=await ne(r);e.forEach(l=>delete a[l]),await pe(t,a),i!==void 0&&i({type:"load",page:a,base:o})},delList:async(e,t,r)=>{let i=await ne(t);e.forEach(a=>delete i[a]),await pe(t,i)},addList:async(e,t,r)=>{let i=await ne(t);e.forEach(a=>i[a.id]=a.eDate),await pe(t,i)}},wa={setSetting:pr,getSetting:xr},ka={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function ja({children:e}){return n.jsx("ul",{className:K.ul,children:e})}function Ca(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 r=Object.keys(e.data).length,i=e.item+1;return i=r<i?1:i,e.item===i?e:{...e,wait:e.size===i,item:i,list:[...e.list,...e.data[i]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function Sa({list:e,load:t,className:r,...i}){const a=_.useRef(null),[o,l]=_.useReducer(Ca,{load:!1,list:[],data:{},item:1,wait:!1,size:0});_.useEffect(()=>{a.current.scrollTop=0,e!==null&&l({type:"load",load:!0,data:e})},[t]);let d=()=>{a.current.scrollHeight-a.current.scrollTop-300<=a.current.clientHeight&&!o.wait&&l({type:"update"})};return n.jsx("div",{className:[ka.s,r].join(" "),ref:a,onScroll:d,children:n.jsx(ja,{"el-empty":"Данные не найдены",children:o.load&&o.list!==void 0?o.list.map(c=>n.jsx(i.item,{data:c},c.id)):n.jsxs("div",{"data-load":"load",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})})})}const Ea=({label:e,onValue:t,value:r,name:i,item:a})=>{const[o,l]=_.useState(!!r);_.useEffect(()=>{l(!!r)},[r]);let d=()=>{let c=parseInt(o)===0?1:0;l(c),t({value:c,name:i,key:a,item:a})};return n.jsx("div",{role:"switch",onClick:d,"aria-checked":`${o?"true":"false"}`})},ve={};function Ba(e){const[t,r]=_.useState({}),i=_.useRef(e);ve.u=o=>{i.current={...i.current,[o.name]:o.value}},ve.r=()=>{r(Date.now())};const a=o=>{i.current[o.name]=o.value,o.reload&&ve.r()};return[i.current,a]}function Ta(e){ve.u(e),e.reload&&ve.r()}function Ia(){ve.r&&ve.r()}const $a={Color:Gt,Date:nt,Code:Ht,Check:rn,Switch:Wt,Button:Zt,Message:Ut,Generator:Yt,Captcha:Kt,Modal:it,Money:at,Month:Xt,Notes:Jt,Number:ot,Password:Qt,Phone:st,Search:en,Select:lt,Set:ut,Textarea:tn,Time:nn,Users:ct,String:dt,Form:ut,runReload:Ia,useData:Ba,setValue:Ta,Palette:Ea,Toogle:an,Group:on,Options:sn},_n={spinner:"_spinner_1ul0m_1",l:"_l_1ul0m_75",loadingB:"_loadingB_1ul0m_1"};function Na(){return n.jsx("div",{className:_n.spinner,children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:n.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 Da(){return n.jsxs("div",{className:_n.l,children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})}const Ma={Spinner:Na,Inline:Da},bn={s:"_s_t9swc_1"};let xt;function za({className:e,placeholder:t}){let r=l=>{xt(l.target.textContent)},i=l=>{l.key==="Enter"&&l.preventDefault()},a=l=>{l.preventDefault(),navigator.clipboard.readText().then(d=>{window.document.execCommand("insertText",!1,d)}).catch(d=>{})};const o={};return t&&(o.placeholder=t),o.className=e?[bn.s,e].join(" "):bn.s,n.jsx("div",{onPaste:a,onInput:r,onKeyDown:i,contentEditable:"true",...o,suppressContentEditableWarning:!0})}function Fa(e,t,r){let i=[],a=1,o=0,l={},d=50;return l[a]=[],e.forEach(c=>{c.text.toLowerCase().indexOf(t)>-1&&i.push(c.id)}),i.forEach(c=>{o++,o<=d||(a++,o=1,l[a]=[]),l[a].push(r[c])}),l}function Pa(e){xt=e}function Ra(e){xt=e}const Oa={Field:za,Run:Fa,Get:Pa,useValue:Ra},La={f:"_f_q3r0i_1"};let V={};function Aa(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 r={};return Object.keys(t.data).forEach(a=>{a!=="sort"&&(r[a]=t.data[a],e.take[a]="999")}),{...e,data:r,take:e.take};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let a in i)i[a]!=="999"&&(e.active=!0);return V.get(i,e.active),{...e,take:i,active:e.active};case"exit":for(let a in e.take)e.take[a]="999";return V.get&&V.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function qa(){const[e,t]=_.useReducer(Aa,{open:!1,view:null,data:{},take:{},size:0,active:!1});return V.set=r=>{t({type:"data",data:r})},V.count=r=>{t({type:"size",size:r})},V.reset=()=>{t({type:"exit"})},n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:La.f,onClick:()=>{t({type:"open",open:!0})},children:[n.jsx(ra,{}),e.active&&n.jsxs("i",{children:[e.size,"1"]})]}),e.open?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),n.jsxs("div",{className:"filter m",children:[n.jsx("div",{className:"filter l",children:Object.keys(e.data).map(r=>n.jsx(Ka,{data:r,dispatch:t,state:e},r))}),n.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):n.jsx(n.Fragment,{})]})}function Wa(e){V.get=e}function Za(e){V.set!==void 0&&V.set(e)}function Ua(e){V.reset!==void 0&&V.reset(e)}function Ya(e,t,r,i){let a=[],o=1,l=0,d={},c=50;return d[o]=[],i===!0&&(Object.keys(t).forEach(u=>{Number.parseInt(t[u])!==999&&(e=e.filter(f=>Number.parseInt(f[u])===Number.parseInt(t[u])))}),vn(e.length)),e.forEach(u=>{a.push(u.id)}),a.forEach(u=>{l++,l<=c||(o++,l=1,d[o]=[]),d[o].push(r[u])}),d}function vn(e){V.count(e)}function Ka({data:e,state:t,dispatch:r}){let i=()=>{r({type:"view",view:e})},a=()=>{r({type:"take",list:e,take:"999"})};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"filter s",children:[n.jsxs("div",{onClick:i,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?n.jsx("div",{onClick:a,className:"filter x","data-icon":"F038"}):""]}),n.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,l)=>n.jsx(Ha,{data:t.data[e].list[o],head:e,type:o,dispatch:r,state:t},l))})]})}function Ha({data:e,head:t,state:r,dispatch:i,type:a}){if(a!=="999"&&e.count===void 0)return"";const o=()=>{i({type:"take",list:t,take:a})};return n.jsxs("div",{className:"filter a",onClick:o,"set-active":(r.take[t]===a)+"",children:[e.name,n.jsx("div",{className:"filter e",children:e.count})]})}const Ga={Button:qa,useValue:Wa,Set:Za,Run:Ya,Count:vn,Reset:Ua},Va={Bell:ca,Send:sa,Add:oa};function Xa({active:e,onActive:t,id:r,name:i}){const[a,o]=_.useState(!!e);_.useEffect(()=>{o(!!e)},[e]);let l=()=>{let d=parseInt(a)===0?1:0;o(d),t&&t({value:d,name:i,id:r})};return n.jsx("div",{role:"switch",onClick:l,"aria-checked":`${a?"true":"false"}`})}const Ja={sort:"_sort_1yrvt_1"};let Ze={};function Qa(e,t){switch(t.type){case"active":let r="<";return e.active===t.data&&(r=e.sort==="<"?">":"<"),Ze.get({active:t.data,sort:r},!1),It({active:t.data,sort:r}),{...e,active:t.data,sort:r};default:throw new Error}}function eo(){const[e,t]=_.useReducer(Qa,Je()===void 0?{active:1,sort:"<"}:Je());return n.jsxs("div",{className:Ja.sort,children:[n.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})}),n.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})}),n.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 to(e){Ze.get=e}function no(e){Ze.set(e)}function ro(e,t,r){let i=1,a=0,o={},l=50;o[i]=[];let d={},c="s1a";switch(d.s1a=(u,f)=>f.s1-u.s1,d.s1d=(u,f)=>u.s1-f.s1,d.s2a=(u,f)=>u.s2-f.s2,d.s2d=(u,f)=>f.s2-u.s2,d.s3a=(u,f)=>u.s3.localeCompare(f.s3),d.s3d=(u,f)=>f.s3.localeCompare(u.s3),r.active){case 1:c=r.sort===">"?"s1d":"s1a";break;case 2:c=r.sort===">"?"s2d":"s2a";break;case 3:c=r.sort===">"?"s3d":"s3a";break}return t.sort(d[c]).forEach(u=>{a++,a<=l||(i++,a=1,o[i]=[]),o[i].push(e[u.id])}),{data:o}}function io(e){Ze.count(e)}const ao={Init:eo,useValue:to,Set:no,Run:ro,Count:io};B.Action=cn,B.Alert=Gi,B.Api=qr,B.Button=qt,B.Component=Hi,B.DataBase=ya,B.Events=Le,B.Filter=Ga,B.Form=$a,B.Format=fe,B.Icon=ea,B.Init=Ri,B.Input=ln,B.Loading=Ma,B.Modal=rt,B.Notice=Ae,B.Notifications=Va,B.Router=ae,B.Scrolling=Sa,B.Search=Oa,B.Setting=Ki,B.Sistym=Re,B.Socket=We,B.Store=ie,B.Switch=Xa,B.Tabs=dn,B.Telegram=C,B.Triage=ao,B.User=wa,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
|