sprof 0.1.57 → 0.2.1

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.
Files changed (63) hide show
  1. package/README.md +0 -0
  2. package/dist/ExtractsList-D2rsuyBZ.js +50 -0
  3. package/dist/core/classes/index.d.ts +1 -1
  4. package/dist/core/components/GeneralItem.vue.d.ts +2 -2
  5. package/dist/core/components/GridContainer.vue.d.ts +2 -2
  6. package/dist/core/components/Icons/Filter/IconDownload.vue.d.ts +1 -1
  7. package/dist/core/components/Icons/Filter/IconFilter.vue.d.ts +1 -1
  8. package/dist/core/components/Icons/Pagination/ArrowLeft.vue.d.ts +1 -1
  9. package/dist/core/components/Icons/Pagination/ArrowRight.vue.d.ts +1 -1
  10. package/dist/core/components/Icons/Pagination/DoubleArrowLeft.vue.d.ts +1 -1
  11. package/dist/core/components/Icons/Pagination/DoubleArrowRight.vue.d.ts +1 -1
  12. package/dist/core/components/Icons/Pagination/EllipsisSvg.vue.d.ts +1 -1
  13. package/dist/core/components/InfoItem.vue.d.ts +3 -3
  14. package/dist/core/components/PAutocomplete.vue.d.ts +1 -1
  15. package/dist/core/components/PPagination.vue.d.ts +2 -8
  16. package/dist/core/components/RemoteSearch.stories.d.ts +6 -6
  17. package/dist/core/components/RemoteSearch.vue.d.ts +5 -5
  18. package/dist/core/components/RightSliderContainer.vue.d.ts +2 -2
  19. package/dist/core/components/atoms/PButton/PButton.stories.d.ts +12 -12
  20. package/dist/core/components/atoms/PButton/PButton.vue.d.ts +2 -2
  21. package/dist/core/components/atoms/PFlex/PFlex.stories.d.ts +12 -12
  22. package/dist/core/components/atoms/PFlex/PFlex.vue.d.ts +2 -2
  23. package/dist/core/components/atoms/PInput/PInput.stories.d.ts +12 -12
  24. package/dist/core/components/atoms/PInput/PInput.vue.d.ts +2 -2
  25. package/dist/core/components/atoms/PInputNumber/PInputNumber.stories.d.ts +1 -1
  26. package/dist/core/components/atoms/PInputNumber/PInputNumber.vue.d.ts +1 -1
  27. package/dist/core/components/atoms/PLabelField/PLabelField.stories.d.ts +42 -42
  28. package/dist/core/components/atoms/PLabelField/PLabelField.vue.d.ts +8 -8
  29. package/dist/core/components/atoms/PLeftSlider/PLeftSlider.stories.d.ts +24 -24
  30. package/dist/core/components/atoms/PLeftSlider/PLeftSlider.vue.d.ts +4 -4
  31. package/dist/core/components/atoms/PRightSlider/PRightSlider.stories.d.ts +24 -24
  32. package/dist/core/components/atoms/PRightSlider/PRightSlider.vue.d.ts +4 -4
  33. package/dist/core/components/atoms/PSelect/PSelect.stories.d.ts +18 -18
  34. package/dist/core/components/atoms/PSelect/PSelect.vue.d.ts +3 -3
  35. package/dist/core/components/atoms/PSticky/PSticky.stories.d.ts +6 -6
  36. package/dist/core/components/atoms/PSticky/PSticky.vue.d.ts +1 -1
  37. package/dist/core/components/atoms/PString/PString.stories.d.ts +10 -10
  38. package/dist/core/components/atoms/PString/PString.vue.d.ts +5 -5
  39. package/dist/core/components/atoms/PTextarea/PTextarea.stories.d.ts +6 -6
  40. package/dist/core/components/atoms/PTextarea/PTextarea.vue.d.ts +1 -1
  41. package/dist/core/components/atoms/PTooltip/PTooltip.stories.d.ts +12 -12
  42. package/dist/core/components/atoms/index.d.ts +2 -2
  43. package/dist/core/components/components.d.ts +1 -1
  44. package/dist/core/components/molecules/PNotify/PNotify.stories.d.ts +6 -6
  45. package/dist/core/components/organisms/PAuthForm/PAuthForm.stories.d.ts +24 -28
  46. package/dist/core/components/organisms/PAuthForm/PAuthForm.vue.d.ts +12 -14
  47. package/dist/core/components/organisms/PTabs/PTabs.stories.d.ts +6 -6
  48. package/dist/core/components/organisms/PTabs/PTabs.vue.d.ts +1 -1
  49. package/dist/core/components/organisms/PUploaderFile/PUploaderFile.stories.d.ts +33 -33
  50. package/dist/core/components/organisms/PUploaderFile/PUploaderFile.vue.d.ts +4 -4
  51. package/dist/core/components/organisms/PUploaderImage/ImageCropper.vue.d.ts +6 -10
  52. package/dist/core/helpers/Classes.d.ts +2 -4
  53. package/dist/core/interfaces/index.d.ts +11 -2
  54. package/dist/index-CkqPv_mq.js +7517 -0
  55. package/dist/index.d.ts +2 -4
  56. package/dist/modules/buildings/classes/index.d.ts +4 -0
  57. package/dist/modules/buildings/index.d.ts +2 -0
  58. package/dist/modules/extracts/index.d.ts +3 -0
  59. package/dist/modules/index.d.ts +3 -1
  60. package/dist/sprof.js +4 -13833
  61. package/dist/sprof.umd.cjs +14 -33
  62. package/dist/style.css +1 -1
  63. package/package.json +3 -1
@@ -1,4 +1,4 @@
1
- (function(j,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(j=typeof globalThis<"u"?globalThis:j||self,i(j.sprof={},j.Vue))})(this,function(j,i){"use strict";var zg=Object.defineProperty;var Tg=(j,i,ze)=>i in j?zg(j,i,{enumerable:!0,configurable:!0,writable:!0,value:ze}):j[i]=ze;var l=(j,i,ze)=>Tg(j,typeof i!="symbol"?i+"":i,ze);var rt,st,ve,Zt,L,Me,ht,Ir;var ze=typeof document<"u"?document.currentScript:null,ue=(t=>(t.Login="login",t.Register="register",t.Restore="restore",t.Refresh="refresh",t))(ue||{}),he=(t=>(t.Primary="primary",t.Success="success",t.Warning="warning",t.Error="error",t.Info="info",t))(he||{});class pt{constructor(e,n,r,s){l(this,"text","Сохранить");l(this,"type",he.Success);l(this,"condition",!0);l(this,"action");l(this,"id","button");l(this,"disabled",!1);this.text=e,this.type=r,this.action=n,s!==void 0&&(this.condition=s)}static Primary(e,n,r){return new pt(e,n,he.Primary,r)}static Success(e,n,r){return new pt(e,n,he.Success,r)}static Warning(e,n,r){return new pt(e,n,he.Warning,r)}static Error(e,n,r){return new pt(e,n,he.Error,r)}}class Cn extends pt{constructor(){super();l(this,"id","auth-button");l(this,"chunk",ue.Login);l(this,"text","");l(this,"isSubmit",!1);l(this,"isLink",!0)}GetChunk(){return this.chunk}}let bi=class extends Cn{constructor(){super(...arguments);l(this,"id","auth-button-login");l(this,"text","Войти");l(this,"isSubmit",!1);l(this,"chunk",ue.Login)}};class Vr extends Cn{constructor(){super(...arguments);l(this,"id","auth-button-refresh");l(this,"text","Обновить пароль");l(this,"isSubmit",!1);l(this,"chunk",ue.Refresh)}}class Ci extends Cn{constructor(){super(...arguments);l(this,"id","auth-button-register");l(this,"text","Зарегистрироваться");l(this,"isSubmit",!1);l(this,"chunk",ue.Register)}}class Sn extends Cn{constructor(){super(...arguments);l(this,"id","auth-button-restore");l(this,"text","Забыли пароль?");l(this,"isSubmit",!1);l(this,"chunk",ue.Restore)}}class Or{constructor(){l(this,"value","");l(this,"label","");l(this,"placeholder","");l(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var Ye=(t=>(t.Email="field-auth-email",t.Password="field-auth-password",t.PasswordRepeat="field-auth-password-repeat",t))(Ye||{});class kn extends Or{constructor(){super(...arguments);l(this,"method");l(this,"id","field-auth");l(this,"name","")}get IsPassword(){return this.id===Ye.Password||this.id===Ye.PasswordRepeat}}var At=(t=>(t.Login="login",t.Email="email",t.Phone="phone",t.VK="vk",t.ESIA="esia",t))(At||{});const wl=/\S+@\S+\.\S+/;class Fr{constructor(){l(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),wl.test(e)||this.errors.push("Некорректный email"),this.errors}}let bl=class extends kn{constructor(){super(...arguments);l(this,"id",Ye.Email);l(this,"label","Email");l(this,"name","email");l(this,"placeholder","Введите email");l(this,"validator",new Fr);l(this,"method",At.Email)}};const En=new bl;class Cl{constructor(){l(this,"errors",[]);l(this,"length",3)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let Sl=class extends kn{constructor(){super(...arguments);l(this,"label","Пароль");l(this,"validator",new Cl);l(this,"name","password");l(this,"placeholder","Введите пароль");l(this,"id",Ye.Password)}};const xn=new Sl;let kl=class extends kn{constructor(){super(...arguments);l(this,"label","Повторите пароль");l(this,"id",Ye.PasswordRepeat)}};const Dr=new kl,Lr={allowRestore:!1,[ue.Login]:{methods:[At.Email],title:"Вход в систему",action:"login",buttons:[new bi,new Ci,new Sn],fields:[En,xn],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[ue.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Ci,new bi,new Sn],fields:[En,xn,Dr],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[ue.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Sn],fields:[En]},[ue.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new Vr],fields:[xn]}};class El{constructor(){l(this,"block",!1);l(this,"settings",Lr);l(this,"chunk",ue.Login);l(this,"selectedMethod",At.Email)}async Block(e){this.block=!0,await e(),this.block=!1}get IsBlock(){return this.block}GetValues(){const e=this.GetFields(),n=new Map;return e.forEach(r=>{r.value&&n.set(r.name,r.value)}),Object.fromEntries(n)}Validate(){if(this.IsRegister){const e=this.GetField(Ye.Password),n=this.GetField(Ye.PasswordRepeat);if((e==null?void 0:e.value)!==(n==null?void 0:n.value))return["Пароли не совпадают"]}return this.GetFields().map(e=>e.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}get IsLogin(){return this.chunk===ue.Login}get IsRegister(){return this.chunk===ue.Register}get IsRestore(){return this.chunk===ue.Restore}get IsRefresh(){return this.chunk===ue.Refresh}SetChunk(e){this.chunk=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(n=>{n.isSubmit=!1}),e[0].isSubmit=!0,e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.SetChunk(ue.Login),this.ResetFields()}GetField(e){return this.GetFields().find(n=>n.id===e)}}class xl{constructor(){l(this,"visible",!1);l(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class Hr{constructor(){l(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class qr extends Hr{constructor(){super(...arguments);l(this,"type",he.Success);l(this,"text","");l(this,"title","")}showMessage(n,r){this.hide(),this.type=r,typeof n=="string"?this.text=n:(this.text=n.text,this.title=n.title??""),super.show()}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}Info(n){this.showMessage(n,he.Info)}Success(n){this.showMessage(n,he.Success)}Error(n){this.showMessage(n,he.Error)}Warning(n){this.showMessage(n,he.Warning)}FormMessage(n){let r="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const s of Object.keys(n))n[s][0]&&n[s][0].message&&(r+=`<li>${n[s][0].message}</li>`);return r+="</ul>",r}}class Si{static Get(e,n,r="-"){return!e||!n?"":`${e}${r}${n}`}static In(e,n,r){return e>=n&&e<=r}static Intersects(e,n,r,s){return e===r||n===s||e>r&&e<s||n>r&&n<s||n>s&&e<r}}const _r=1e3,Ur=60*_r,ki=60*Ur;var Yt=(t=>(t.FiveMinutes="5",t.HourQuarter="15",t.HourHalf="30",t.Hour="60",t))(Yt||{});const vn={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class D{static S(e){return _r*e}static M(e){return Ur*e}static H(e){return ki*e}static D(e){return ki*e}static W(e){return ki*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const n=D.SplitHM(e);return n.length>1?D.HtoM(n[0])+n[1]:D.HtoM(n[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const n=e.split(":");return[Number(n[0]),Number(n[1])]}static HmsToHm(e){const n=D.SplitHM(e);return D.ConcatHM(n[0],n[1])}static AddMtoHM(e,n){const r=new Date,s=D.SplitHM(e);r.setHours(s[0],s[1],0,0);const o=new Date(r.getTime()+n*6e4),a=o.getHours(),c=o.getMinutes();return D.ConcatHM(a,c)}static ConcatHM(e,n){return`${e}:${D.NormalizeTime(n)}`}static DiffM(e,n){return D.Gt(n,e)?D.HMtoM(n)-D.HMtoM(e):D.HMtoM(e)-D.HMtoM(n)}static GetPeriod(e,n){return Si.Get(e,n)}static Gt(e,n){return D.HMtoM(e)>D.HMtoM(n)}static GtOrEq(e,n){return D.Gt(e,n)||D.Eq(e,n)}static Eq(e,n){return D.HMtoM(e)===D.HMtoM(n)}static PeriodInPeriod(e,n,r,s){return D.HMtoM(e)>=D.HMtoM(r)&&D.HMtoM(n)<=D.HMtoM(s)}static PeriodsIntersects(e,n,r,s){return Si.Intersects(D.HMtoM(e),D.HMtoM(n),D.HMtoM(r),D.HMtoM(s))}}class Qt{static Wait(e,n){return new Promise(r=>setTimeout(()=>r(n),e))}static WaitS(e,n){return Qt.Wait(D.S(e),n)}static WaitM(e,n){return Qt.Wait(D.M(e),n)}}let vl=class extends qr{constructor(){super(...arguments);l(this,"duration",D.S(3));l(this,"instance")}showMessage(n,r){super.showMessage(n,r),this.visible=!0,typeof n!="string"&&(this.duration=n.duration??this.duration),Qt.Wait(this.GetDuration()).then(()=>super.hide())}GetDuration(){return this.duration}Dev(){const n="В режиме разработки",r=he.Warning;super.showMessage(n,r)}Save(){const n="Изменения успешно сохранены",r=he.Success;super.showMessage(n,r)}};const Ml=new vl,ke=i.reactive(Ml);class qe{static Get(e){const n=localStorage.getItem(e);if(n)return JSON.parse(n)}static Set(e,n){n&&localStorage.setItem(e,JSON.stringify(n))}static Remove(e){localStorage.removeItem(e)}}var Te=(t=>(t.User="user",t.AccessToken="accessToken",t.RefreshToken="refreshToken",t))(Te||{});class Bl{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return qe.Get(Te.AccessToken)}getRefreshToken(){return qe.Get(Te.RefreshToken)}setAccessToken(e){qe.Set(Te.AccessToken,e)}setRefreshToken(e){qe.Set(Te.RefreshToken,e)}reset(){qe.Remove(Te.AccessToken),qe.Remove(Te.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class Rl{constructor(){l(this,"user");l(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),qe.Set(Te.User,this.user))}reset(){this.user=void 0,qe.Remove(Te.User)}actualize(){const e=qe.Get(Te.User);e&&this.set(e)}}class $l{constructor(){l(this,"isAuth",!1);l(this,"user",new Rl);l(this,"tokens",new Bl);l(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetUser(e){this.user.set(e)}SetState(e){this.SetUser(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){ke.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.tokens.getAccessToken()){this.isAuth=!0;return}this.Logout()}}let Il=(rt=class{constructor(){l(this,"form",i.reactive(new El));l(this,"status",i.reactive(new $l));l(this,"modal",i.reactive(new xl));if(rt.instance)return rt.instance;rt.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},l(rt,"instance"),rt);const ae=new Il;var jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
1
+ (function(ue,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],E):(ue=typeof globalThis<"u"?globalThis:ue||self,E(ue.sprof={},ue.Vue))})(this,function(ue,E){"use strict";var Ju=Object.defineProperty;var Qu=(ue,E,Oe)=>E in ue?Ju(ue,E,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):ue[E]=Oe;var n=(ue,E,Oe)=>Qu(ue,typeof E!="symbol"?E+"":E,Oe);var $e,pe,ye,qe;var Oe=typeof document<"u"?document.currentScript:null,oe=(s=>(s.Login="login",s.Register="register",s.Restore="restore",s.Refresh="refresh",s))(oe||{}),fe=(s=>(s.Primary="primary",s.Success="success",s.Warning="warning",s.Error="error",s.Info="info",s))(fe||{});class We{constructor(e,t,r,i){n(this,"text","Сохранить");n(this,"type",fe.Success);n(this,"condition",!0);n(this,"action");n(this,"id","button");n(this,"disabled",!1);this.text=e,this.type=r,this.action=t,i!==void 0&&(this.condition=i)}static Primary(e,t,r){return new We(e,t,fe.Primary,r)}static Success(e,t,r){return new We(e,t,fe.Success,r)}static Warning(e,t,r){return new We(e,t,fe.Warning,r)}static Error(e,t,r){return new We(e,t,fe.Error,r)}}class es extends We{constructor(){super();n(this,"id","auth-button");n(this,"chunk",oe.Login);n(this,"text","");n(this,"isSubmit",!1);n(this,"isLink",!0)}GetChunk(){return this.chunk}}let Rr=class extends es{constructor(){super(...arguments);n(this,"id","auth-button-login");n(this,"text","Войти");n(this,"isSubmit",!1);n(this,"chunk",oe.Login)}};class ci extends es{constructor(){super(...arguments);n(this,"id","auth-button-refresh");n(this,"text","Обновить пароль");n(this,"isSubmit",!1);n(this,"chunk",oe.Refresh)}}class Mr extends es{constructor(){super(...arguments);n(this,"id","auth-button-register");n(this,"text","Зарегистрироваться");n(this,"isSubmit",!1);n(this,"chunk",oe.Register)}}class Ds extends es{constructor(){super(...arguments);n(this,"id","auth-button-restore");n(this,"text","Забыли пароль?");n(this,"isSubmit",!1);n(this,"chunk",oe.Restore)}}class Or{constructor(){n(this,"value","");n(this,"label","");n(this,"placeholder","");n(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var ke=(s=>(s.Email="field-auth-email",s.Password="field-auth-password",s.PasswordRepeat="field-auth-password-repeat",s))(ke||{});class Us extends Or{constructor(){super(...arguments);n(this,"method");n(this,"id","field-auth");n(this,"name","")}get IsPassword(){return this.id===ke.Password||this.id===ke.PasswordRepeat}}var ts=(s=>(s.Login="login",s.Email="email",s.Phone="phone",s.VK="vk",s.ESIA="esia",s))(ts||{});const ui=/\S+@\S+\.\S+/;class di{constructor(){n(this,"errors",[])}validate(e){return(e===""||!e)&&this.errors.push("Введите email"),ui.test(e)||this.errors.push("Некорректный email"),this.errors}}let fi=class extends Us{constructor(){super(...arguments);n(this,"id",ke.Email);n(this,"label","Email");n(this,"name","email");n(this,"placeholder","Введите email");n(this,"validator",new di);n(this,"method",ts.Email)}};const Ns=new fi;class hi{constructor(){n(this,"errors",[]);n(this,"length",3)}validate(e){return e===""||!e?(this.errors.push("Введите пароль"),this.errors):(e.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let pi=class extends Us{constructor(){super(...arguments);n(this,"label","Пароль");n(this,"validator",new hi);n(this,"name","password");n(this,"placeholder","Введите пароль");n(this,"id",ke.Password)}};const $s=new pi;let mi=class extends Us{constructor(){super(...arguments);n(this,"label","Повторите пароль");n(this,"id",ke.PasswordRepeat)}};const gi=new mi,wi={allowRestore:!1,[oe.Login]:{methods:[ts.Email],title:"Вход в систему",action:"login",buttons:[new Rr,new Mr,new Ds],fields:[Ns,$s],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[oe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Mr,new Rr,new Ds],fields:[Ns,$s,gi],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[oe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Ds],fields:[Ns]},[oe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new ci],fields:[$s]}};class yi{constructor(){n(this,"block",!1);n(this,"settings",wi);n(this,"chunk",oe.Login);n(this,"selectedMethod",ts.Email)}async Block(e){this.block=!0,await e(),this.block=!1}get IsBlock(){return this.block}GetValues(){const e=this.GetFields(),t=new Map;return e.forEach(r=>{r.value&&t.set(r.name,r.value)}),Object.fromEntries(t)}Validate(){if(this.IsRegister){const e=this.GetField(ke.Password),t=this.GetField(ke.PasswordRepeat);if((e==null?void 0:e.value)!==(t==null?void 0:t.value))return["Пароли не совпадают"]}return this.GetFields().map(e=>e.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(e=>!e.method||e.method===this.selectedMethod)}GetMethods(){return this.GetCurSet().methods}Chunk(){return this.chunk}get Settings(){return this.settings}GetCurSet(){return this.settings[this.chunk]}get IsLogin(){return this.chunk===oe.Login}get IsRegister(){return this.chunk===oe.Register}get IsRestore(){return this.chunk===oe.Restore}get IsRefresh(){return this.chunk===oe.Refresh}SetChunk(e){this.chunk=e}GetTitle(){return this.GetCurSet().title}GetButtons(){const e=this.GetCurSet().buttons;return e.forEach(t=>{t.isSubmit=!1}),e[0].isSubmit=!0,e}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(e=>e.Reset())}Reset(){this.SetChunk(oe.Login),this.ResetFields()}GetField(e){return this.GetFields().find(t=>t.id===e)}}class Si{constructor(){n(this,"visible",!1);n(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(e){e&&(this.closable=!0),this.visible=!0}}class Pr{constructor(){n(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class _r extends Pr{constructor(){super(...arguments);n(this,"type",fe.Success);n(this,"text","");n(this,"title","")}showMessage(t,r){this.hide(),this.type=r,typeof t=="string"?this.text=t:(this.text=t.text,this.title=t.title??""),super.show()}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}Info(t){this.showMessage(t,fe.Info)}Success(t){this.showMessage(t,fe.Success)}Error(t){this.showMessage(t,fe.Error)}Warning(t){this.showMessage(t,fe.Warning)}FormMessage(t){let r="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const i of Object.keys(t))t[i][0]&&t[i][0].message&&(r+=`<li>${t[i][0].message}</li>`);return r+="</ul>",r}}class ks{static Get(e,t,r="-"){return!e||!t?"":`${e}${r}${t}`}static In(e,t,r){return e>=t&&e<=r}static Intersects(e,t,r,i){return e===r||t===i||e>r&&e<i||t>r&&t<i||t>i&&e<r}}const Ir=1e3,Tr=60*Ir,Bs=60*Tr;var Ot=(s=>(s.FiveMinutes="5",s.HourQuarter="15",s.HourHalf="30",s.Hour="60",s))(Ot||{});const ss={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class U{static S(e){return Ir*e}static M(e){return Tr*e}static H(e){return Bs*e}static D(e){return Bs*e}static W(e){return Bs*e}static NormalizeTime(e){return String(e).padStart(2,"0")}static HMtoM(e){const t=U.SplitHM(e);return t.length>1?U.HtoM(t[0])+t[1]:U.HtoM(t[0])}static HtoM(e){return Number(e)*60}static SplitHM(e){if(!e)return[];const t=e.split(":");return[Number(t[0]),Number(t[1])]}static HmsToHm(e){const t=U.SplitHM(e);return U.ConcatHM(t[0],t[1])}static AddMtoHM(e,t){const r=new Date,i=U.SplitHM(e);r.setHours(i[0],i[1],0,0);const o=new Date(r.getTime()+t*6e4),a=o.getHours(),l=o.getMinutes();return U.ConcatHM(a,l)}static ConcatHM(e,t){return`${e}:${U.NormalizeTime(t)}`}static DiffM(e,t){return U.Gt(t,e)?U.HMtoM(t)-U.HMtoM(e):U.HMtoM(e)-U.HMtoM(t)}static GetPeriod(e,t){return ks.Get(e,t)}static Gt(e,t){return U.HMtoM(e)>U.HMtoM(t)}static GtOrEq(e,t){return U.Gt(e,t)||U.Eq(e,t)}static Eq(e,t){return U.HMtoM(e)===U.HMtoM(t)}static PeriodInPeriod(e,t,r,i){return U.HMtoM(e)>=U.HMtoM(r)&&U.HMtoM(t)<=U.HMtoM(i)}static PeriodsIntersects(e,t,r,i){return ks.Intersects(U.HMtoM(e),U.HMtoM(t),U.HMtoM(r),U.HMtoM(i))}}class Pt{static Wait(e,t){return new Promise(r=>setTimeout(()=>r(t),e))}static WaitS(e,t){return Pt.Wait(U.S(e),t)}static WaitM(e,t){return Pt.Wait(U.M(e),t)}}let bi=class extends _r{constructor(){super(...arguments);n(this,"duration",U.S(3));n(this,"instance")}showMessage(t,r){super.showMessage(t,r),this.visible=!0,typeof t!="string"&&(this.duration=t.duration??this.duration),Pt.Wait(this.GetDuration()).then(()=>super.hide())}GetDuration(){return this.duration}Dev(){const t="В режиме разработки",r=fe.Warning;super.showMessage(t,r)}Save(){const t="Изменения успешно сохранены",r=fe.Success;super.showMessage(t,r)}};const Ci=new bi,_t=E.reactive(Ci);class Fe{static Get(e){const t=localStorage.getItem(e);if(t)return JSON.parse(t)}static Set(e,t){t&&localStorage.setItem(e,JSON.stringify(t))}static Remove(e){localStorage.removeItem(e)}}var ve=(s=>(s.User="user",s.AccessToken="accessToken",s.RefreshToken="refreshToken",s))(ve||{});class vi{set(e){this.setAccessToken(e.accessToken),this.setRefreshToken(e.refreshToken)}getAccessToken(){return Fe.Get(ve.AccessToken)}getRefreshToken(){return Fe.Get(ve.RefreshToken)}setAccessToken(e){Fe.Set(ve.AccessToken,e)}setRefreshToken(e){Fe.Set(ve.RefreshToken,e)}reset(){Fe.Remove(ve.AccessToken),Fe.Remove(ve.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class Ei{constructor(){n(this,"user");n(this,"userConstructor")}AssignTo(e){e.user=this.get()}setUserConstructor(e){this.userConstructor=e}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(e){this.userConstructor&&(this.user=new this.userConstructor(e),Fe.Set(ve.User,this.user))}reset(){this.user=void 0,Fe.Remove(ve.User)}actualize(){const e=Fe.Get(ve.User);e&&this.set(e)}}class Ri{constructor(){n(this,"isAuth",!1);n(this,"user",new Ei);n(this,"tokens",new vi);n(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(e){this.user.setUserConstructor(e)}SetUser(e){this.user.set(e)}SetState(e){this.SetUser(e.user),this.tokens.set(e.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){_t.Warning("В текущий момент Вы не можете выйти из системы");return}this.user.reset(),this.tokens.reset(),this.isAuth=!1}Actualize(){if(this.user.actualize(),this.tokens.actualize(),this.tokens.getAccessToken()){this.isAuth=!0;return}this.Logout()}}let Mi=($e=class{constructor(){n(this,"form",E.reactive(new yi));n(this,"status",E.reactive(new Ri));n(this,"modal",E.reactive(new Si));if($e.instance)return $e.instance;$e.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},n($e,"instance"),$e);const ut=new Mi;var Fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
2
2
  Copyright (C) Microsoft. All rights reserved.
3
3
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
4
  this file except in compliance with the License. You may obtain a copy of the
@@ -11,35 +11,16 @@
11
11
 
12
12
  See the Apache Version 2.0 License for specific language governing permissions
13
13
  and limitations under the License.
14
- ***************************************************************************** */var Wr;(function(t){(function(e){var n=typeof globalThis=="object"?globalThis:typeof jr=="object"?jr:typeof self=="object"?self:typeof this=="object"?this:c(),r=s(t);typeof n.Reflect<"u"&&(r=s(n.Reflect,r)),e(r,n),typeof n.Reflect>"u"&&(n.Reflect=t);function s(d,u){return function(h,f){Object.defineProperty(d,h,{configurable:!0,writable:!0,value:f}),u&&u(h,f)}}function o(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return o()||a()}})(function(e,n){var r=Object.prototype.hasOwnProperty,s=typeof Symbol=="function",o=s&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=s&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",d={__proto__:[]}instanceof Array,u=!c&&!d,h={create:c?function(){return Pr(Object.create(null))}:d?function(){return Pr({__proto__:null})}:function(){return Pr({})},has:u?function(g,C){return r.call(g,C)}:function(g,C){return C in g},get:u?function(g,C){return r.call(g,C)?g[C]:void 0}:function(g,C){return g[C]}},f=Object.getPrototypeOf(Function),m=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:$g(),p=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Ig(),k=typeof WeakMap=="function"?WeakMap:Ng(),w=s?Symbol.for("@reflect-metadata:registry"):void 0,b=Mg(),E=Bg(b);function F(g,C,S,M){if(O(S)){if(!$t(g))throw new TypeError;if(!yi(C))throw new TypeError;return Jt(g,C)}else{if(!$t(g))throw new TypeError;if(!Z(C))throw new TypeError;if(!Z(M)&&!O(M)&&!K(M))throw new TypeError;return K(M)&&(M=void 0),S=Se(S),pi(g,C,S,M)}}e("decorate",F);function A(g,C){function S(M,V){if(!Z(M))throw new TypeError;if(!O(V)&&!Nt(V))throw new TypeError;gn(g,C,M,V)}return S}e("metadata",A);function v(g,C,S,M){if(!Z(S))throw new TypeError;return O(M)||(M=Se(M)),gn(g,C,S,M)}e("defineMetadata",v);function U(g,C,S){if(!Z(C))throw new TypeError;return O(S)||(S=Se(S)),Re(g,C,S)}e("hasMetadata",U);function Fe(g,C,S){if(!Z(C))throw new TypeError;return O(S)||(S=Se(S)),Rt(g,C,S)}e("hasOwnMetadata",Fe);function Ze(g,C,S){if(!Z(C))throw new TypeError;return O(S)||(S=Se(S)),ft(g,C,S)}e("getMetadata",Ze);function Bt(g,C,S){if(!Z(C))throw new TypeError;return O(S)||(S=Se(S)),gi(g,C,S)}e("getOwnMetadata",Bt);function Xt(g,C){if(!Z(g))throw new TypeError;return O(C)||(C=Se(C)),De(g,C)}e("getMetadataKeys",Xt);function Be(g,C){if(!Z(g))throw new TypeError;return O(C)||(C=Se(C)),Ce(g,C)}e("getOwnMetadataKeys",Be);function ot(g,C,S){if(!Z(C))throw new TypeError;if(O(S)||(S=Se(S)),!Z(C))throw new TypeError;O(S)||(S=Se(S));var M=wn(C,S,!1);return O(M)?!1:M.OrdinaryDeleteMetadata(g,C,S)}e("deleteMetadata",ot);function Jt(g,C){for(var S=g.length-1;S>=0;--S){var M=g[S],V=M(C);if(!O(V)&&!K(V)){if(!yi(V))throw new TypeError;C=V}}return C}function pi(g,C,S,M){for(var V=g.length-1;V>=0;--V){var de=g[V],oe=de(C,S,M);if(!O(oe)&&!K(oe)){if(!Z(oe))throw new TypeError;M=oe}}return M}function Re(g,C,S){var M=Rt(g,C,S);if(M)return!0;var V=Ar(C);return K(V)?!1:Re(g,V,S)}function Rt(g,C,S){var M=wn(C,S,!1);return O(M)?!1:X(M.OrdinaryHasOwnMetadata(g,C,S))}function ft(g,C,S){var M=Rt(g,C,S);if(M)return gi(g,C,S);var V=Ar(C);if(!K(V))return ft(g,V,S)}function gi(g,C,S){var M=wn(C,S,!1);if(!O(M))return M.OrdinaryGetOwnMetadata(g,C,S)}function gn(g,C,S,M){var V=wn(S,M,!0);V.OrdinaryDefineOwnMetadata(g,C,S,M)}function De(g,C){var S=Ce(g,C),M=Ar(g);if(M===null)return S;var V=De(M,C);if(V.length<=0)return S;if(S.length<=0)return V;for(var de=new p,oe=[],H=0,B=S;H<B.length;H++){var I=B[H],P=de.has(I);P||(de.add(I),oe.push(I))}for(var z=0,_=V;z<_.length;z++){var I=_[z],P=de.has(I);P||(de.add(I),oe.push(I))}return oe}function Ce(g,C){var S=wn(g,C,!1);return S?S.OrdinaryOwnMetadataKeys(g,C):[]}function Xe(g){if(g===null)return 1;switch(typeof g){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return g===null?1:6;default:return 6}}function O(g){return g===void 0}function K(g){return g===null}function Je(g){return typeof g=="symbol"}function Z(g){return typeof g=="object"?g!==null:typeof g=="function"}function yn(g,C){switch(Xe(g)){case 0:return g;case 1:return g;case 2:return g;case 3:return g;case 4:return g;case 5:return g}var S="string",M=rl(g,o);if(M!==void 0){var V=M.call(g,S);if(Z(V))throw new TypeError;return V}return Le(g)}function Le(g,C){var S,M;{var V=g.toString;if(It(V)){var M=V.call(g);if(!Z(M))return M}var S=g.valueOf;if(It(S)){var M=S.call(g);if(!Z(M))return M}}throw new TypeError}function X(g){return!!g}function mt(g){return""+g}function Se(g){var C=yn(g);return Je(C)?C:mt(C)}function $t(g){return Array.isArray?Array.isArray(g):g instanceof Object?g instanceof Array:Object.prototype.toString.call(g)==="[object Array]"}function It(g){return typeof g=="function"}function yi(g){return typeof g=="function"}function Nt(g){switch(Xe(g)){case 3:return!0;case 4:return!0;default:return!1}}function Nr(g,C){return g===C||g!==g&&C!==C}function rl(g,C){var S=g[C];if(S!=null){if(!It(S))throw new TypeError;return S}}function sl(g){var C=rl(g,a);if(!It(C))throw new TypeError;var S=C.call(g);if(!Z(S))throw new TypeError;return S}function ol(g){return g.value}function al(g){var C=g.next();return C.done?!1:C}function ll(g){var C=g.return;C&&C.call(g)}function Ar(g){var C=Object.getPrototypeOf(g);if(typeof g!="function"||g===f||C!==f)return C;var S=g.prototype,M=S&&Object.getPrototypeOf(S);if(M==null||M===Object.prototype)return C;var V=M.constructor;return typeof V!="function"||V===g?C:V}function vg(){var g;!O(w)&&typeof n.Reflect<"u"&&!(w in n.Reflect)&&typeof n.Reflect.defineMetadata=="function"&&(g=Rg(n.Reflect));var C,S,M,V=new k,de={registerProvider:oe,getProvider:B,setProvider:P};return de;function oe(z){if(!Object.isExtensible(de))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case g===z:break;case O(C):C=z;break;case C===z:break;case O(S):S=z;break;case S===z:break;default:M===void 0&&(M=new p),M.add(z);break}}function H(z,_){if(!O(C)){if(C.isProviderFor(z,_))return C;if(!O(S)){if(S.isProviderFor(z,_))return C;if(!O(M))for(var Y=sl(M);;){var ie=al(Y);if(!ie)return;var He=ol(ie);if(He.isProviderFor(z,_))return ll(Y),He}}}if(!O(g)&&g.isProviderFor(z,_))return g}function B(z,_){var Y=V.get(z),ie;return O(Y)||(ie=Y.get(_)),O(ie)&&(ie=H(z,_),O(ie)||(O(Y)&&(Y=new m,V.set(z,Y)),Y.set(_,ie))),ie}function I(z){if(O(z))throw new TypeError;return C===z||S===z||!O(M)&&M.has(z)}function P(z,_,Y){if(!I(Y))throw new Error("Metadata provider not registered.");var ie=B(z,_);if(ie!==Y){if(!O(ie))return!1;var He=V.get(z);O(He)&&(He=new m,V.set(z,He)),He.set(_,Y)}return!0}}function Mg(){var g;return!O(w)&&Z(n.Reflect)&&Object.isExtensible(n.Reflect)&&(g=n.Reflect[w]),O(g)&&(g=vg()),!O(w)&&Z(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,w,{enumerable:!1,configurable:!1,writable:!1,value:g}),g}function Bg(g){var C=new k,S={isProviderFor:function(I,P){var z=C.get(I);return O(z)?!1:z.has(P)},OrdinaryDefineOwnMetadata:oe,OrdinaryHasOwnMetadata:V,OrdinaryGetOwnMetadata:de,OrdinaryOwnMetadataKeys:H,OrdinaryDeleteMetadata:B};return b.registerProvider(S),S;function M(I,P,z){var _=C.get(I),Y=!1;if(O(_)){if(!z)return;_=new m,C.set(I,_),Y=!0}var ie=_.get(P);if(O(ie)){if(!z)return;if(ie=new m,_.set(P,ie),!g.setProvider(I,P,S))throw _.delete(P),Y&&C.delete(I),new Error("Wrong provider for target.")}return ie}function V(I,P,z){var _=M(P,z,!1);return O(_)?!1:X(_.has(I))}function de(I,P,z){var _=M(P,z,!1);if(!O(_))return _.get(I)}function oe(I,P,z,_){var Y=M(z,_,!0);Y.set(I,P)}function H(I,P){var z=[],_=M(I,P,!1);if(O(_))return z;for(var Y=_.keys(),ie=sl(Y),He=0;;){var cl=al(ie);if(!cl)return z.length=He,z;var Ag=ol(cl);try{z[He]=Ag}catch(Pg){try{ll(ie)}finally{throw Pg}}He++}}function B(I,P,z){var _=M(P,z,!1);if(O(_)||!_.delete(I))return!1;if(_.size===0){var Y=C.get(P);O(Y)||(Y.delete(z),Y.size===0&&C.delete(Y))}return!0}}function Rg(g){var C=g.defineMetadata,S=g.hasOwnMetadata,M=g.getOwnMetadata,V=g.getOwnMetadataKeys,de=g.deleteMetadata,oe=new k,H={isProviderFor:function(B,I){var P=oe.get(B);return!O(P)&&P.has(I)?!0:V(B,I).length?(O(P)&&(P=new p,oe.set(B,P)),P.add(I),!0):!1},OrdinaryDefineOwnMetadata:C,OrdinaryHasOwnMetadata:S,OrdinaryGetOwnMetadata:M,OrdinaryOwnMetadataKeys:V,OrdinaryDeleteMetadata:de};return H}function wn(g,C,S){var M=b.getProvider(g,C);if(!O(M))return M;if(S){if(b.setProvider(g,C,E))return E;throw new Error("Illegal state.")}}function $g(){var g={},C=[],S=function(){function H(B,I,P){this._index=0,this._keys=B,this._values=I,this._selector=P}return H.prototype["@@iterator"]=function(){return this},H.prototype[a]=function(){return this},H.prototype.next=function(){var B=this._index;if(B>=0&&B<this._keys.length){var I=this._selector(this._keys[B],this._values[B]);return B+1>=this._keys.length?(this._index=-1,this._keys=C,this._values=C):this._index++,{value:I,done:!1}}return{value:void 0,done:!0}},H.prototype.throw=function(B){throw this._index>=0&&(this._index=-1,this._keys=C,this._values=C),B},H.prototype.return=function(B){return this._index>=0&&(this._index=-1,this._keys=C,this._values=C),{value:B,done:!0}},H}(),M=function(){function H(){this._keys=[],this._values=[],this._cacheKey=g,this._cacheIndex=-2}return Object.defineProperty(H.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),H.prototype.has=function(B){return this._find(B,!1)>=0},H.prototype.get=function(B){var I=this._find(B,!1);return I>=0?this._values[I]:void 0},H.prototype.set=function(B,I){var P=this._find(B,!0);return this._values[P]=I,this},H.prototype.delete=function(B){var I=this._find(B,!1);if(I>=0){for(var P=this._keys.length,z=I+1;z<P;z++)this._keys[z-1]=this._keys[z],this._values[z-1]=this._values[z];return this._keys.length--,this._values.length--,Nr(B,this._cacheKey)&&(this._cacheKey=g,this._cacheIndex=-2),!0}return!1},H.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=g,this._cacheIndex=-2},H.prototype.keys=function(){return new S(this._keys,this._values,V)},H.prototype.values=function(){return new S(this._keys,this._values,de)},H.prototype.entries=function(){return new S(this._keys,this._values,oe)},H.prototype["@@iterator"]=function(){return this.entries()},H.prototype[a]=function(){return this.entries()},H.prototype._find=function(B,I){if(!Nr(this._cacheKey,B)){this._cacheIndex=-1;for(var P=0;P<this._keys.length;P++)if(Nr(this._keys[P],B)){this._cacheIndex=P;break}}return this._cacheIndex<0&&I&&(this._cacheIndex=this._keys.length,this._keys.push(B),this._values.push(void 0)),this._cacheIndex},H}();return M;function V(H,B){return H}function de(H,B){return B}function oe(H,B){return[H,B]}}function Ig(){var g=function(){function C(){this._map=new m}return Object.defineProperty(C.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),C.prototype.has=function(S){return this._map.has(S)},C.prototype.add=function(S){return this._map.set(S,S),this},C.prototype.delete=function(S){return this._map.delete(S)},C.prototype.clear=function(){this._map.clear()},C.prototype.keys=function(){return this._map.keys()},C.prototype.values=function(){return this._map.keys()},C.prototype.entries=function(){return this._map.entries()},C.prototype["@@iterator"]=function(){return this.keys()},C.prototype[a]=function(){return this.keys()},C}();return g}function Ng(){var g=16,C=h.create(),S=M();return function(){function B(){this._key=M()}return B.prototype.has=function(I){var P=V(I,!1);return P!==void 0?h.has(P,this._key):!1},B.prototype.get=function(I){var P=V(I,!1);return P!==void 0?h.get(P,this._key):void 0},B.prototype.set=function(I,P){var z=V(I,!0);return z[this._key]=P,this},B.prototype.delete=function(I){var P=V(I,!1);return P!==void 0?delete P[this._key]:!1},B.prototype.clear=function(){this._key=M()},B}();function M(){var B;do B="@@WeakMap@@"+H();while(h.has(C,B));return C[B]=!0,B}function V(B,I){if(!r.call(B,S)){if(!I)return;Object.defineProperty(B,S,{value:h.create()})}return B[S]}function de(B,I){for(var P=0;P<I;++P)B[P]=Math.random()*255|0;return B}function oe(B){if(typeof Uint8Array=="function"){var I=new Uint8Array(B);return typeof crypto<"u"?crypto.getRandomValues(I):typeof msCrypto<"u"?msCrypto.getRandomValues(I):de(I,B),I}return de(new Array(B),B)}function H(){var B=oe(g);B[6]=B[6]&79|64,B[8]=B[8]&191|128;for(var I="",P=0;P<g;++P){var z=B[P];(P===4||P===6||P===8)&&(I+="-"),z<16&&(I+="0"),I+=z.toString(16).toLowerCase()}return I}}function Pr(g){return g.__=void 0,delete g.__,g}})})(Wr||(Wr={}));const fe=[];for(let t=0;t<256;++t)fe.push((t+256).toString(16).slice(1));function Nl(t,e=0){return(fe[t[e+0]]+fe[t[e+1]]+fe[t[e+2]]+fe[t[e+3]]+"-"+fe[t[e+4]]+fe[t[e+5]]+"-"+fe[t[e+6]]+fe[t[e+7]]+"-"+fe[t[e+8]]+fe[t[e+9]]+"-"+fe[t[e+10]]+fe[t[e+11]]+fe[t[e+12]]+fe[t[e+13]]+fe[t[e+14]]+fe[t[e+15]]).toLowerCase()}const Al=new Uint8Array(16);function Pl(){return crypto.getRandomValues(Al)}function at(t,e,n){return crypto.randomUUID?crypto.randomUUID():zl(t)}function zl(t,e,n){var s;t=t||{};const r=t.random??((s=t.rng)==null?void 0:s.call(t))??Pl();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Nl(r)}class re{static UUID(){return at()}static GUID(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}function Tl(t){var e=[];if(t.length===0)return"";if(typeof t[0]!="string")throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var s=t[r];if(typeof s!="string")throw new TypeError("Url must be a string. Received "+s);s!==""&&(r>0&&(s=s.replace(/^[\/]+/,"")),r<t.length-1?s=s.replace(/[\/]+$/,""):s=s.replace(/[\/]+$/,"/"),e.push(s))}var o=e.join("/");o=o.replace(/\/(\?|&|#[^!])/g,"$1");var a=o.split("?");return o=a.shift()+(a.length>0?"?":"")+a.join("&"),o}function Ei(){var t;return typeof arguments[0]=="object"?t=arguments[0]:t=[].slice.call(arguments),Tl(t)}class q{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static BuildSafeUrl(e,n,r){try{const s=new URL(e);return n&&(s.port=n.toString()),Ei(s.toString(),r)}catch{throw new Error(`Invalid host URL: ${e}`)}}static ToCamelCase(e){const n=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(n).map((s,o)=>o===0?s.toLowerCase():q.Capitalize(s.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,n,r){return e.substring(e.indexOf(n)+2,e.lastIndexOf(r))}static Translit(e,n){const r={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return n&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,s=>{if(s===s.toLowerCase()){const a=Object.keys(r).find(c=>r[c]===s);return a||""}const o=Object.keys(r).find(a=>r[a]===s.toLowerCase());return o?o.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,s=>s===s.toLowerCase()?r[s]:r[s.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const n=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(n,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,n){const r=e.toLowerCase().replaceAll(/\s/g,""),s=n.toLowerCase().replaceAll(/\s/g,""),o=q.Translit(r),a=q.Translit(s);return r.includes(s)||o.includes(s)||r.includes(a)}static SearchIn(e,n){return q.StringsEquals(e,n)}static SearchInFields(e,n){let r=!1;for(let s=0;s<n.length;s++)if(q.SearchIn(n[s],e)){r=!0;break}return r}static FormatToPercentage(e){return`${e}%`}static ApplyClassToSubStr(e,n,r){const s=r??"highlight-text",o=new RegExp(q.GetVariants(n).join("|"),"gi");return e.replace(o,`<span class="${s}">$&</span>`)}static GetVariants(e){const n=q.Translit(e);return[e,q.Capitalize(e),e.toLowerCase(),e.toUpperCase(),n,q.Capitalize(n),n.toLowerCase(),n.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static JoinSnake(...e){return e.join("_")}static GetDynamicCountName(e,n){const r=[2,0,1,1,1,2];return e.length+" "+n[e.length%100>4&&e.length%100<20?2:r[e.length%10<5?e.length%10:5]]}static TrimText(e){return typeof e=="string"?e.trim():e}}const ut=class ut{static BuildClass(e,n){n&&Object.keys(n).forEach(r=>{const s=n[r];if(this.isPrimitive(s))e[r]instanceof Date?e[r]=new Date(s):e[r]=s;else if(s!=null&&!Array.isArray(s))if(e[r]&&e[r].constructor)e[r]=new e[r].constructor(s);else{const o=Reflect.getMetadata(r,e);o&&(e[r]=new o[r](s))}if(Array.isArray(s)){if(s.length===0)return;const o=Reflect.getMetadata(r,e);s.length!==0&&!o&&(e[r]=s),o&&(e[r]=s.map(a=>new o[r](a)))}})}static isPrimitive(e){return e!==null&&typeof e<"u"&&e!==Object(e)}static RemoveFromClassByIndex(e,n,r){ut.RemoveFromClass(e,n,r)}static RemoveFromClassById(e,n,r){if(!e)return;const s=n.findIndex(o=>o.id===e);ut.RemoveFromClass(s,n,r)}static RemoveFromClass(e,n,r){if(e<0)return;const s=n[e].id;s&&r&&r.push(s),n.splice(e,1)}static GetPropertyName(e){const n=new e;return new Proxy(n,{get(r,s){return s}})}static InitClassInstance(e,n){const r=e.constructor(n);return ut.BuildClass(r),r.id=re.UUID(),r}static ExistsWithId(e,n){return e.some(r=>r.id===n)}static DeepMap(e){return n=>Array.isArray(n)?n.map(ut.DeepMap(e)):Object(n)===n?Object.fromEntries(Object.entries(n).map(([r,s])=>[r,ut.DeepMap(e)(s)])):e(n)}static DeepTrim(e){return this.DeepMap(q.TrimText)(e)}};l(ut,"GetClassConstructor",e=>(n,r)=>{const s=Reflect.getMetadata(`property:${r}`,n)||{};s[r]=e,Reflect.defineMetadata(r,s,n)});let R=ut;class gt{constructor(e){l(this,"id");l(this,"address");l(this,"description");l(this,"contactId");R.BuildClass(this,e)}static Create(){const e=new gt;return e.id=re.UUID(),e}}class xi{static Setup(e="http://localhost",n="9000",r="api"){this.staticUrl=q.BuildSafeUrl(e,n,r),this.staticUrl=Ei(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}l(xi,"staticUrl","");class ge{constructor(e){l(this,"name","");l(this,"url","");l(this,"src","");l(this,"raw");l(this,"blob");l(this,"file");l(this,"type","");l(this,"id");l(this,"originalName","");l(this,"fileSystemPath","");l(this,"itemId");l(this,"itemOneId");l(this,"description","");l(this,"order",0);R.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${xi.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ze&&ze.tagName.toUpperCase()==="SCRIPT"&&ze.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,n){const r=new ge;return r.id=n??re.UUID(),r.originalName=e.name,r.file=e.blob,r.fileSystemPath=re.UUID(),r}setFile(e){this.id||(this.id=re.UUID()),this.originalName=e.name,this.file=e,this.fileSystemPath=re.UUID(),this.url=e.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,n){if(e.target){let r="";return n&&(r=`@/assets/img/${n}`),new URL(r,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ze&&ze.tagName.toUpperCase()==="SCRIPT"&&ze.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(e){const n=e.split(".");return n[n.length-1]}}class Gr{constructor(e){l(this,"id");l(this,"name","");l(this,"surname","");l(this,"patronymic","");l(this,"isMale",!0);l(this,"dateBirth",new Date);l(this,"contactId");l(this,"slug","");l(this,"postIndex","");l(this,"address","");l(this,"editNameMode",!1);R.BuildClass(this,e)}setEditNameMode(e){this.editNameMode=e}getFullName(){return!this.surname.length&&!this.name.length&&!this.patronymic.length?"":`${this.surname} ${this.name} ${this.patronymic}`}getInitialsName(){return`${this.name.slice(0,1)}.${this.patronymic.slice(0,1)}. ${this.surname}`}getGender(e){return e?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=q.Capitalize(this.name),this.surname=q.Capitalize(this.surname),this.patronymic=q.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}setFullName(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}}class yt{constructor(e){l(this,"id");l(this,"number");l(this,"description");l(this,"contactId");R.BuildClass(this,e)}static Create(){const e=new yt;return e.id=re.UUID(),e}}class Mn{constructor(e){l(this,"id");l(this,"address");l(this,"description");R.BuildClass(this,e)}}class vi{constructor(e){l(this,"id");l(this,"address");l(this,"description");R.BuildClass(this,e)}}class Bn{constructor(e){l(this,"id");l(this,"login","");l(this,"email","");l(this,"password","");R.BuildClass(this,e)}static Create(){const e=new Bn;return e.id=re.UUID(),e}}let Vl=(st=class{},l(st,"Phone",yt),l(st,"FileInfo",ge),l(st,"Website",vi),l(st,"Email",gt),l(st,"Human",Gr),l(st,"PostAddress",Mn),l(st,"UserAccount",Bn),st);var ee=(t=>(t.Eq="=",t.Ne="!=",t.Gt=">",t.Lt="<",t.Btw="between",t.In="in",t.Like="like",t.Null="is null",t.NotNull="is not null",t))(ee||{});class Rn{constructor(e){l(this,"field","");l(this,"operator",ee.Eq);l(this,"value","");R.BuildClass(this,e)}setValue(e){this.value=e}static Create(e,n){return new Rn({operator:n,field:e})}eq(e){return this.field===e.field&&this.operator===e.operator}isUnary(){return this.operator===ee.Eq||this.operator===ee.Gt||this.operator===ee.Lt}isBetween(){return this.operator===ee.Btw}isSet(){return this.operator===ee.In}}class Mi{constructor(e){l(this,"model","");l(this,"field","");l(this,"value","");l(this,"wheres",[]);R.BuildClass(this,e)}static Create(e){const n=new Mi;return n.model=e.GetClassName(),n}eq(e){return e.model===this.model&&e.field===this.field}addWhere(e,n){const r=this.findWhere({field:e,operator:n});if(r)return r;const s=Rn.Create(e,n);return this.wheres.push(s),s}findWhere(e){return this.wheres.find(n=>n.eq(e))}}let Zr=class dl{constructor(e){l(this,"id");l(this,"model","");l(this,"wheres",[]);l(this,"joins",[]);R.BuildClass(this,e)}static Create(e){const n=new dl;return n.model=e.GetClassName(),n}addWhere(e,n){const r=this.findWhere({field:e,operator:n});if(r)return r;const s=Rn.Create(e,n);return this.wheres.push(s),s}removeWhere(e){const n=this.wheres.findIndex(r=>r.eq(e));n>-1&&this.wheres.splice(n,1)}addJoin(e){const n=this.findJoin({model:e.GetClassName()});if(n)return n;const r=Mi.Create(e);return this.joins.push(r),r}findJoin(e){return this.joins.find(n=>n.eq(e))}findWhere(e){return this.wheres.find(n=>n.eq(e))}toRef(){return i.ref(this)}};class Qe{static Shuffle(e){for(let n=e.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1));[e[n],e[r]]=[e[r],e[n]]}}static GenerateNumsRange(e,n,r=1){return Array.from({length:(n-e)/r+1},(s,o)=>e+o*r)}static GetLast(e){return e[e.length-1]}static GetFirst(e){return e[0]}static GetRandEL(e){return e[Math.floor(Math.random()*e.length)]}static Sort(e){e.forEach((n,r)=>n.order=r)}static Refill(e,n){e.splice(0,e.length),e.push(...n)}static Eq(e,n){return e.length===n.length&&(e==null?void 0:e.every((r,s)=>e[s]==n[s]))}static SwipeById(e,n,r){const s=e.findIndex(a=>n.id===a.id),o=e.findIndex(a=>r.id===a.id);s||o||([e[s],e[o]]=[e[o],e[s]])}static Swap(e,n,r){if(n<0||n>=e.length||r<0||r>=e.length)return;const s=e[n];e[n]=e[r],e[r]=s}static MoveUp(e,n){e[n].order=n-1,e[n-1]&&(e[n-1].order=n),[e[n],e[n-1]]=[e[n-1],e[n]]}static MoveDown(e,n){e[n].order=n+1,e[n+1]&&(e[n+1].order=n),[e[n],e[n+1]]=[e[n+1],e[n]]}}var le=(t=>(t.Date="date",t.String="string",t.Boolean="boolean",t.Number="number",t.Set="set",t.Join="join",t.ArrayString="arrayString",t.ArrayNumber="arrayNumber",t))(le||{}),Ol=Object.defineProperty,Fl=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&Ol(e,n,s),s};const Xr=class bn{constructor(e){l(this,"id");l(this,"model","");l(this,"label","");l(this,"col","");l(this,"operator",ee.Eq);l(this,"date1");l(this,"date2");l(this,"value1","");l(this,"boolean",!1);l(this,"number",0);l(this,"type",le.String);l(this,"set",[]);l(this,"isSet",!1);l(this,"joinTable","");l(this,"joinTableModel","");l(this,"joinTableFk","");l(this,"joinTablePk","");l(this,"joinTableId","");l(this,"joinTableIdCol","");R.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===le.Join){const n=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===ee.In?n&&Qe.Eq(this.set,e.set):n}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===le.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===le.String?this.value1===(e==null?void 0:e.value1):this.type===le.Join&&this.set.length?Qe.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",n=this.model?`"model":"${this.model}"`:"",r=this.col?`"col":"${this.col}"`:"",s=this.operator?`"operator":"${this.operator}"`:"",o=this.value1?`"value1":"${this.value1}"`:"",a=this.type===le.Boolean?`"boolean":${this.boolean}`:"",c=this.type===le.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",d=this.type===le.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===le.Number?`"number":${this.number}`:"",h=this.type===le.Set||this.operator===ee.In?`"set":${JSON.stringify(this.set)}`:"",f=this.type===le.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,n,r,s,o,a,c,d,u,h,f].filter(m=>m!=="").toString()}fromUrlQuery(e){this.model=e.get("model")??"",this.col=e.get("col")??"",this.label=e.get("label")??"",this.operator=e.get("operator")??"",this.value1=e.get("value1")??"",this.type=e.get("type")??"",this.boolean=!!(e.get("boolean")??""),this.joinTableModel=e.get("joinTableModel")??"",this.joinTableId=e.get("joinTableId")??"",this.joinTableFk=e.get("joinTableFk")??"",this.joinTableIdCol=e.get("joinTableIdCol")??"",this.joinTablePk=e.get("joinTablePk")??""}isUnaryFilter(){return this.operator===ee.Eq||this.operator===ee.Gt||this.operator===ee.Lt}isBetweenFilter(){return this.operator===ee.Btw}isSetFilter(){return this.operator===ee.In}static Create(e,n,r){const s=new bn;return s.model=e.GetClassName(),s.col=n??"",s.type=r,s.type===le.Number&&(s.value1="0"),s.type===le.String&&(s.value1=""),s.type===le.Boolean&&(s.value1="false",s.operator=ee.Eq),s}static CreateFilterModelWithJoin(e,n,r,s,o,a,c,d){const u=new bn;return u.id=at(),u.joinTable=r,u.joinTablePk=s,u.joinTableFk=o,u.col=n,u.type=a,c&&(u.joinTableId=c),d&&(u.joinTableIdCol=d),u}static CreateFilterModelWithJoinV2(e,n,r,s,o,a,c){const d=new bn;return d.model=e,d.joinTableModel=r,d.joinTablePk=s,d.joinTableFk=o,d.col=n,d.type=le.Join,a&&(d.joinTableId=a),c&&(d.joinTableIdCol=c),d}static OnlyIfSecondModelExists(e,n){const r=new bn;return r.id=at(),r.model=q.ToCamelCase(e.GetClassName()),r.joinTableModel=q.ToCamelCase(n.GetClassName()),r.type=le.Join,r}addToSet(...e){e.forEach(n=>{if(this.set.indexOf(n)===-1){this.set.push(n);return}this.set=this.set.filter(r=>r!==n)})}pushToSet(...e){e.forEach(n=>{this.set.indexOf(n)===-1&&this.set.push(n)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return i.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,n){if(!e&&!n){this.dropDates();return}if(!n){this.setDate1(e),this.operator=ee.Eq;return}this.setDate2(n),this.operator=ee.Btw}};Fl([R.GetClassConstructor(String)],Xr.prototype,"set");let Bi=Xr;class Dl{constructor(){l(this,"operation",ee.Lt);l(this,"column","");l(this,"value");l(this,"initial",!0);l(this,"tableName","");l(this,"version","");l(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",n=this.column?`"column":"${this.column}"`:"",r=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,s=r?`"value":"${r}"`:"",o=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[e,n,s,o,a].filter(c=>c!=="").toString()}fromUrlQuery(e){e.cursvalue&&(this.value=e.cursvalue),e.curscolumn&&(this.column=String(e.curscolumn)),e.cursinitial!==void 0&&(this.initial=!!e.cursinitial),e.curstableName&&(this.tableName=String(e.curstableName)),e.cursoperation&&(this.operation=e.cursoperation)}}class $n{constructor(e){l(this,"page",0);l(this,"rowsPerPage",25);l(this,"rowsNumber",0);l(this,"cursor",new Dl);l(this,"cursorMode",!1);l(this,"append",!1);l(this,"allLoaded",!1);l(this,"version","");R.BuildClass(this,e)}setLoadMore(e,n,r){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=ee.Gt,this.cursor.column=n,this.cursor.tableName=r,this.cursorMode=!0}setLoadMoreV2(e,n,r){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=ee.Gt,this.cursor.column=n,this.cursor.model=r,this.cursorMode=!0,this.version="v2"}setOffset(e){this.page=e}toUrlQuery(){const e=`"offset":${this.offset}`,n=`"limit":${this.limit}`,r=`"cursorMode":${this.cursorMode}`,s=`"append":${this.append}`,o=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,n,r,s,o,a].toString()}fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),r=new URLSearchParams(decodeURIComponent(n));this.page=Number(r.get("offset")),this.rowsPerPage=Number(r.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,R.BuildClass(this)}}var $e=(t=>(t.Asc="asc",t.Desc="desc",t))($e||{});class In{constructor(e){l(this,"model","");l(this,"col","");l(this,"order");l(this,"label","");l(this,"default",!1);l(this,"selected",!1);R.BuildClass(this,e)}static Create(e,n,r=$e.Asc,s,o){const a=new In;return a.model=e.GetClassName(),a.col=n??"",a.order=r??$e.Asc,a.label=s??"",a.default=o??!1,a}isAsc(){return this.order===$e.Asc}isDesc(){return this.order===$e.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",n=this.col?`"col":"${this.col}"`:"",r=this.order?`"order":"${this.order}"`:"";return[e,n,r].toString()}async fromUrlQuery(){const e=window.location.search,n=e.substring(e.indexOf("s=")+2,e.indexOf("|")),r=new URLSearchParams(decodeURIComponent(n));this.model=r.get("model")??"",this.col=r.get("col")??"",this.label=r.get("label")??"",this.default=!!r.get("default"),this.order=r.get("order")??""}asc(){this.order=$e.Asc}desc(){this.order=$e.Desc}}class Nn{constructor(){l(this,"model","");l(this,"cols",[]);l(this,"models",[])}static Create(e,n){const r=new Nn;return r.model=e.GetClassName(),r.cols=n,r}}var Ll=Object.defineProperty,Kt=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&Ll(e,n,s),s};const Pt=(ve=class{constructor(e){l(this,"id");l(this,"f",[]);l(this,"f2",[]);l(this,"s",[]);l(this,"p",new $n);l(this,"t",new Nn);R.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new ve),this.instance}createFrom(e){const n=new ve(JSON.parse(e));this.f=n.f}clearForHTTP(){const e=new ve(this);return e.f=this.f.map(n=>ve.EmptyEntiries(n)),e.f2=this.f2.map(n=>ve.EmptyEntiries(n)),e.s=this.s.map(n=>ve.EmptyEntiries(n)),e.p=ve.EmptyEntiries(this.p),e.t=ve.EmptyEntiries(this.t),e}static EmptyEntiries(e){if(!e)return;const r=Object.entries(e).filter(([s,o])=>s!=="label"&&o!==""&&o!==null);return Object.fromEntries(r)}findFilterModel(e){return this.f.find(n=>e.id===n.id)}getFirstSortModel(){return Qe.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}setF2(e){this.f2.push(e)}replaceF(e,n){this.removeF(n),e&&this.setF(e)}removeF(e){const n=this.f.findIndex(r=>r.eq(e));R.RemoveFromClassByIndex(n,this.f)}reset(){this.f=[],this.s=[],this.p=new $n}resetF(){this.f=[]}},l(ve,"instance"),ve);Kt([R.GetClassConstructor(Bi)],Pt.prototype,"f"),Kt([R.GetClassConstructor(Zr)],Pt.prototype,"f2"),Kt([R.GetClassConstructor(In)],Pt.prototype,"s"),Kt([R.GetClassConstructor($n)],Pt.prototype,"p"),Kt([R.GetClassConstructor(Nn)],Pt.prototype,"t");let Ke=Pt,Hl=(Zt=class{},l(Zt,"SortModel",In),l(Zt,"FilterModel",Bi),l(Zt,"FilterModelV2",Zr),l(Zt,"FTSP",Ke),Zt);function Jr(t,e){return function(){return t.apply(e,arguments)}}const{toString:ql}=Object.prototype,{getPrototypeOf:An}=Object,{iterator:Pn,toStringTag:Yr}=Symbol,zn=(t=>e=>{const n=ql.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ve=t=>(t=t.toLowerCase(),e=>zn(e)===t),Tn=t=>e=>typeof e===t,{isArray:zt}=Array,Tt=Tn("undefined");function en(t){return t!==null&&!Tt(t)&&t.constructor!==null&&!Tt(t.constructor)&&Ee(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Qr=Ve("ArrayBuffer");function _l(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Qr(t.buffer),e}const Ul=Tn("string"),Ee=Tn("function"),Kr=Tn("number"),tn=t=>t!==null&&typeof t=="object",jl=t=>t===!0||t===!1,Vn=t=>{if(zn(t)!=="object")return!1;const e=An(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Yr in t)&&!(Pn in t)},Wl=t=>{if(!tn(t)||en(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Gl=Ve("Date"),Zl=Ve("File"),Xl=t=>!!(t&&typeof t.uri<"u"),Jl=t=>t&&typeof t.getParts<"u",Yl=Ve("Blob"),Ql=Ve("FileList"),Kl=t=>tn(t)&&Ee(t.pipe);function ec(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const es=ec(),ts=typeof es.FormData<"u"?es.FormData:void 0,tc=t=>{if(!t)return!1;if(ts&&t instanceof ts)return!0;const e=An(t);if(!e||e===Object.prototype||!Ee(t.append))return!1;const n=zn(t);return n==="formdata"||n==="object"&&Ee(t.toString)&&t.toString()==="[object FormData]"},nc=Ve("URLSearchParams"),[ic,rc,sc,oc]=["ReadableStream","Request","Response","Headers"].map(Ve),ac=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nn(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),zt(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(en(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length;let c;for(r=0;r<a;r++)c=o[r],e.call(null,t[c],c,t)}}function ns(t,e){if(en(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const wt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,is=t=>!Tt(t)&&t!==wt;function Ri(...t){const{caseless:e,skipUndefined:n}=is(this)&&this||{},r={},s=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=e&&ns(r,a)||a,d=$i(r,c)?r[c]:void 0;Vn(d)&&Vn(o)?r[c]=Ri(d,o):Vn(o)?r[c]=Ri({},o):zt(o)?r[c]=o.slice():(!n||!Tt(o))&&(r[c]=o)};for(let o=0,a=t.length;o<a;o++)t[o]&&nn(t[o],s);return r}const lc=(t,e,n,{allOwnKeys:r}={})=>(nn(e,(s,o)=>{n&&Ee(s)?Object.defineProperty(t,o,{__proto__:null,value:Jr(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),cc=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),dc=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},uc=(t,e,n,r)=>{let s,o,a;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)a=s[o],(!r||r(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&An(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},hc=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},fc=t=>{if(!t)return null;if(zt(t))return t;let e=t.length;if(!Kr(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},mc=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&An(Uint8Array)),pc=(t,e)=>{const r=(t&&t[Pn]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},gc=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},yc=Ve("HTMLFormElement"),wc=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),$i=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),bc=Ve("RegExp"),rs=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};nn(n,(s,o)=>{let a;(a=e(s,o,t))!==!1&&(r[o]=a||s)}),Object.defineProperties(t,r)},Cc=t=>{rs(t,(e,n)=>{if(Ee(t)&&["arguments","caller","callee"].includes(n))return!1;const r=t[n];if(Ee(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Sc=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return zt(t)?r(t):r(String(t).split(e)),n},kc=()=>{},Ec=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function xc(t){return!!(t&&Ee(t.append)&&t[Yr]==="FormData"&&t[Pn])}const vc=t=>{const e=new Array(10),n=(r,s)=>{if(tn(r)){if(e.indexOf(r)>=0)return;if(en(r))return r;if(!("toJSON"in r)){e[s]=r;const o=zt(r)?[]:{};return nn(r,(a,c)=>{const d=n(a,s+1);!Tt(d)&&(o[c]=d)}),e[s]=void 0,o}}return r};return n(t,0)},Mc=Ve("AsyncFunction"),Bc=t=>t&&(tn(t)||Ee(t))&&Ee(t.then)&&Ee(t.catch),ss=((t,e)=>t?setImmediate:e?((n,r)=>(wt.addEventListener("message",({source:s,data:o})=>{s===wt&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),wt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ee(wt.postMessage)),Rc=typeof queueMicrotask<"u"?queueMicrotask.bind(wt):typeof process<"u"&&process.nextTick||ss,y={isArray:zt,isArrayBuffer:Qr,isBuffer:en,isFormData:tc,isArrayBufferView:_l,isString:Ul,isNumber:Kr,isBoolean:jl,isObject:tn,isPlainObject:Vn,isEmptyObject:Wl,isReadableStream:ic,isRequest:rc,isResponse:sc,isHeaders:oc,isUndefined:Tt,isDate:Gl,isFile:Zl,isReactNativeBlob:Xl,isReactNative:Jl,isBlob:Yl,isRegExp:bc,isFunction:Ee,isStream:Kl,isURLSearchParams:nc,isTypedArray:mc,isFileList:Ql,forEach:nn,merge:Ri,extend:lc,trim:ac,stripBOM:cc,inherits:dc,toFlatObject:uc,kindOf:zn,kindOfTest:Ve,endsWith:hc,toArray:fc,forEachEntry:pc,matchAll:gc,isHTMLForm:yc,hasOwnProperty:$i,hasOwnProp:$i,reduceDescriptors:rs,freezeMethods:Cc,toObjectSet:Sc,toCamelCase:wc,noop:kc,toFiniteNumber:Ec,findKey:ns,global:wt,isContextDefined:is,isSpecCompliantForm:xc,toJSONObject:vc,isAsyncFn:Mc,isThenable:Bc,setImmediate:ss,asap:Rc,isIterable:t=>t!=null&&Ee(t[Pn])},$c=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ic=t=>{const e={};let n,r,s;return t&&t.split(`
15
- `).forEach(function(a){s=a.indexOf(":"),n=a.substring(0,s).trim().toLowerCase(),r=a.substring(s+1).trim(),!(!n||e[n]&&$c[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},os=Symbol("internals"),Nc=/[^\x09\x20-\x7E\x80-\xFF]/g;function Ac(t){let e=0,n=t.length;for(;e<n;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=t.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}function rn(t){return t&&String(t).trim().toLowerCase()}function Pc(t){return Ac(t.replace(Nc,""))}function On(t){return t===!1||t==null?t:y.isArray(t)?t.map(On):Pc(String(t))}function zc(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Tc=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ii(t,e,n,r,s){if(y.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!y.isString(e)){if(y.isString(r))return e.indexOf(r)!==-1;if(y.isRegExp(r))return r.test(e)}}function Vc(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Oc(t,e){const n=y.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{__proto__:null,value:function(s,o,a){return this[r].call(this,e,s,o,a)},configurable:!0})})}let be=class{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function o(c,d,u){const h=rn(d);if(!h)throw new Error("header name must be a non-empty string");const f=y.findKey(s,h);(!f||s[f]===void 0||u===!0||u===void 0&&s[f]!==!1)&&(s[f||d]=On(c))}const a=(c,d)=>y.forEach(c,(u,h)=>o(u,h,d));if(y.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(y.isString(e)&&(e=e.trim())&&!Tc(e))a(Ic(e),n);else if(y.isObject(e)&&y.isIterable(e)){let c={},d,u;for(const h of e){if(!y.isArray(h))throw TypeError("Object iterator must return a key-value pair");c[u=h[0]]=(d=c[u])?y.isArray(d)?[...d,h[1]]:[d,h[1]]:h[1]}a(c,n)}else e!=null&&o(n,e,r);return this}get(e,n){if(e=rn(e),e){const r=y.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return zc(s);if(y.isFunction(n))return n.call(this,s,r);if(y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=rn(e),e){const r=y.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ii(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function o(a){if(a=rn(a),a){const c=y.findKey(r,a);c&&(!n||Ii(r,r[c],c,n))&&(delete r[c],s=!0)}}return y.isArray(e)?e.forEach(o):o(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!e||Ii(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const n=this,r={};return y.forEach(this,(s,o)=>{const a=y.findKey(r,o);if(a){n[a]=On(s),delete n[o];return}const c=e?Vc(o):String(o).trim();c!==o&&delete n[o],n[c]=On(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
16
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[os]=this[os]={accessors:{}}).accessors,s=this.prototype;function o(a){const c=rn(a);r[c]||(Oc(s,a),r[c]=!0)}return y.isArray(e)?e.forEach(o):o(e),this}};be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),y.reduceDescriptors(be.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),y.freezeMethods(be);const Fc="[REDACTED ****]";function Dc(t){if(y.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(y.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function Lc(t,e){const n=new Set(e.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||y.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof be&&(o=o.toJSON()),r.push(o);let a;if(y.isArray(o))a=[],o.forEach((c,d)=>{const u=s(c);y.isUndefined(u)||(a[d]=u)});else{if(!y.isPlainObject(o)&&Dc(o))return r.pop(),o;a=Object.create(null);for(const[c,d]of Object.entries(o)){const u=n.has(c.toLowerCase())?Fc:s(d);y.isUndefined(u)||(a[c]=u)}}return r.pop(),a};return s(t)}let N=class ul extends Error{static from(e,n,r,s,o,a){const c=new ul(e.message,n||e.code,r,s,o);return c.cause=e,c.name=e.name,e.status!=null&&c.status==null&&(c.status=e.status),a&&Object.assign(c,a),c}constructor(e,n,r,s,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,n=e&&y.hasOwnProp(e,"redact")?e.redact:void 0,r=y.isArray(n)&&n.length>0?Lc(e,n):y.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};N.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",N.ERR_BAD_OPTION="ERR_BAD_OPTION",N.ECONNABORTED="ECONNABORTED",N.ETIMEDOUT="ETIMEDOUT",N.ECONNREFUSED="ECONNREFUSED",N.ERR_NETWORK="ERR_NETWORK",N.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",N.ERR_DEPRECATED="ERR_DEPRECATED",N.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",N.ERR_BAD_REQUEST="ERR_BAD_REQUEST",N.ERR_CANCELED="ERR_CANCELED",N.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",N.ERR_INVALID_URL="ERR_INVALID_URL",N.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Hc=null;function Ni(t){return y.isPlainObject(t)||y.isArray(t)}function as(t){return y.endsWith(t,"[]")?t.slice(0,-2):t}function Ai(t,e,n){return t?t.concat(e).map(function(s,o){return s=as(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function qc(t){return y.isArray(t)&&!t.some(Ni)}const _c=y.toFlatObject(y,{},null,function(e){return/^is[A-Z]/.test(e)});function Fn(t,e,n){if(!y.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,E){return!y.isUndefined(E[b])});const r=n.metaTokens,s=n.visitor||f,o=n.dots,a=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,u=c&&y.isSpecCompliantForm(e);if(!y.isFunction(s))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(y.isDate(w))return w.toISOString();if(y.isBoolean(w))return w.toString();if(!u&&y.isBlob(w))throw new N("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(w)||y.isTypedArray(w)?u&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function f(w,b,E){let F=w;if(y.isReactNative(e)&&y.isReactNativeBlob(w))return e.append(Ai(E,b,o),h(w)),!1;if(w&&!E&&typeof w=="object"){if(y.endsWith(b,"{}"))b=r?b:b.slice(0,-2),w=JSON.stringify(w);else if(y.isArray(w)&&qc(w)||(y.isFileList(w)||y.endsWith(b,"[]"))&&(F=y.toArray(w)))return b=as(b),F.forEach(function(v,U){!(y.isUndefined(v)||v===null)&&e.append(a===!0?Ai([b],U,o):a===null?b:b+"[]",h(v))}),!1}return Ni(w)?!0:(e.append(Ai(E,b,o),h(w)),!1)}const m=[],p=Object.assign(_c,{defaultVisitor:f,convertValue:h,isVisitable:Ni});function k(w,b,E=0){if(!y.isUndefined(w)){if(E>d)throw new N("Object is too deeply nested ("+E+" levels). Max depth: "+d,N.ERR_FORM_DATA_DEPTH_EXCEEDED);if(m.indexOf(w)!==-1)throw Error("Circular reference detected in "+b.join("."));m.push(w),y.forEach(w,function(A,v){(!(y.isUndefined(A)||A===null)&&s.call(e,A,y.isString(v)?v.trim():v,b,p))===!0&&k(A,b?b.concat(v):[v],E+1)}),m.pop()}}if(!y.isObject(t))throw new TypeError("data must be an object");return k(t),e}function ls(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Pi(t,e){this._pairs=[],t&&Fn(t,this,e)}const cs=Pi.prototype;cs.append=function(e,n){this._pairs.push([e,n])},cs.toString=function(e){const n=e?function(r){return e.call(this,r,ls)}:ls;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Uc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ds(t,e,n){if(!e)return t;const r=n&&n.encode||Uc,s=y.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let a;if(o?a=o(e,s):a=y.isURLSearchParams(e)?e.toString():new Pi(e,s).toString(r),a){const c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class us{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){y.forEach(this.handlers,function(r){r!==null&&e(r)})}}const zi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},jc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Pi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ti=typeof window<"u"&&typeof document<"u",Vi=typeof navigator=="object"&&navigator||void 0,Wc=Ti&&(!Vi||["ReactNative","NativeScript","NS"].indexOf(Vi.product)<0),Gc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zc=Ti&&window.location.href||"http://localhost",ye={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ti,hasStandardBrowserEnv:Wc,hasStandardBrowserWebWorkerEnv:Gc,navigator:Vi,origin:Zc},Symbol.toStringTag,{value:"Module"})),...jc};function Xc(t,e){return Fn(t,new ye.classes.URLSearchParams,{visitor:function(n,r,s,o){return ye.isNode&&y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function Jc(t){return y.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Yc(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function hs(t){function e(n,r,s,o){let a=n[o++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),d=o>=n.length;return a=!a&&y.isArray(s)?s.length:a,d?(y.hasOwnProp(s,a)?s[a]=y.isArray(s[a])?s[a].concat(r):[s[a],r]:s[a]=r,!c):((!s[a]||!y.isObject(s[a]))&&(s[a]=[]),e(n,r,s[a],o)&&y.isArray(s[a])&&(s[a]=Yc(s[a])),!c)}if(y.isFormData(t)&&y.isFunction(t.entries)){const n={};return y.forEachEntry(t,(r,s)=>{e(Jc(r),s,n,0)}),n}return null}const Vt=(t,e)=>t!=null&&y.hasOwnProp(t,e)?t[e]:void 0;function Qc(t,e,n){if(y.isString(t))try{return(e||JSON.parse)(t),y.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const sn={transitional:zi,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=y.isObject(e);if(o&&y.isHTMLForm(e)&&(e=new FormData(e)),y.isFormData(e))return s?JSON.stringify(hs(e)):e;if(y.isArrayBuffer(e)||y.isBuffer(e)||y.isStream(e)||y.isFile(e)||y.isBlob(e)||y.isReadableStream(e))return e;if(y.isArrayBufferView(e))return e.buffer;if(y.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(o){const d=Vt(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Xc(e,d).toString();if((c=y.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=Vt(this,"env"),h=u&&u.FormData;return Fn(c?{"files[]":e}:e,h&&new h,d)}}return o||s?(n.setContentType("application/json",!1),Qc(e)):e}],transformResponse:[function(e){const n=Vt(this,"transitional")||sn.transitional,r=n&&n.forcedJSONParsing,s=Vt(this,"responseType"),o=s==="json";if(y.isResponse(e)||y.isReadableStream(e))return e;if(e&&y.isString(e)&&(r&&!s||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e,Vt(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?N.from(d,N.ERR_BAD_RESPONSE,this,null,Vt(this,"response")):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ye.classes.FormData,Blob:ye.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch","query"],t=>{sn.headers[t]={}});function Oi(t,e){const n=this||sn,r=e||n,s=be.from(r.headers);let o=r.data;return y.forEach(t,function(c){o=c.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function fs(t){return!!(t&&t.__CANCEL__)}let on=class extends N{constructor(e,n,r){super(e??"canceled",N.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ms(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new N("Request failed with status code "+n.status,n.status>=400&&n.status<500?N.ERR_BAD_REQUEST:N.ERR_BAD_RESPONSE,n.config,n.request,n))}function Kc(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function ed(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,a;return e=e!==void 0?e:1e3,function(d){const u=Date.now(),h=r[o];a||(a=u),n[s]=d,r[s]=u;let f=o,m=0;for(;f!==s;)m+=n[f++],f=f%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),u-a<e)return;const p=h&&u-h;return p?Math.round(m*1e3/p):void 0}}function td(t,e){let n=0,r=1e3/e,s,o;const a=(u,h=Date.now())=>{n=h,s=null,o&&(clearTimeout(o),o=null),t(...u)};return[(...u)=>{const h=Date.now(),f=h-n;f>=r?a(u,h):(s=u,o||(o=setTimeout(()=>{o=null,a(s)},r-f)))},()=>s&&a(s)]}const Dn=(t,e,n=3)=>{let r=0;const s=ed(50,250);return td(o=>{const a=o.loaded,c=o.lengthComputable?o.total:void 0,d=c!=null?Math.min(a,c):a,u=Math.max(0,d-r),h=s(u);r=Math.max(r,d);const f={loaded:d,total:c,progress:c?d/c:void 0,bytes:u,rate:h||void 0,estimated:h&&c?(c-d)/h:void 0,event:o,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},n)},ps=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},gs=t=>(...e)=>y.asap(()=>t(...e)),nd=ye.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,ye.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(ye.origin),ye.navigator&&/(msie|trident)/i.test(ye.navigator.userAgent)):()=>!0,id=ye.hasStandardBrowserEnv?{write(t,e,n,r,s,o,a){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];y.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),y.isString(r)&&c.push(`path=${r}`),y.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),y.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let n=0;n<e.length;n++){const r=e[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===t)return decodeURIComponent(r.slice(s+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function rd(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function sd(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ys(t,e,n){let r=!rd(e);return t&&(r||n===!1)?sd(t,e):e}const ws=t=>t instanceof be?{...t}:t;function bt(t,e){e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,h,f,m){return y.isPlainObject(u)&&y.isPlainObject(h)?y.merge.call({caseless:m},u,h):y.isPlainObject(h)?y.merge({},h):y.isArray(h)?h.slice():h}function s(u,h,f,m){if(y.isUndefined(h)){if(!y.isUndefined(u))return r(void 0,u,f,m)}else return r(u,h,f,m)}function o(u,h){if(!y.isUndefined(h))return r(void 0,h)}function a(u,h){if(y.isUndefined(h)){if(!y.isUndefined(u))return r(void 0,u)}else return r(void 0,h)}function c(u,h,f){if(y.hasOwnProp(e,f))return r(u,h);if(y.hasOwnProp(t,f))return r(void 0,u)}const d={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:c,headers:(u,h,f)=>s(ws(u),ws(h),f,!0)};return y.forEach(Object.keys({...t,...e}),function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;const f=y.hasOwnProp(d,h)?d[h]:s,m=y.hasOwnProp(t,h)?t[h]:void 0,p=y.hasOwnProp(e,h)?e[h]:void 0,k=f(m,p,h);y.isUndefined(k)&&f!==c||(n[h]=k)}),n}const od=["content-type","content-length"];function ad(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,s])=>{od.includes(r.toLowerCase())&&t.set(r,s)})}const ld=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),bs=t=>{const e=bt({},t),n=m=>y.hasOwnProp(e,m)?e[m]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let c=n("headers");const d=n("auth"),u=n("baseURL"),h=n("allowAbsoluteUrls"),f=n("url");if(e.headers=c=be.from(c),e.url=ds(ys(u,f,h),t.params,t.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?ld(d.password):""))),y.isFormData(r)&&(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv?c.setContentType(void 0):y.isFunction(r.getHeaders)&&ad(c,r.getHeaders(),n("formDataHeaderPolicy"))),ye.hasStandardBrowserEnv&&(y.isFunction(s)&&(s=s(e)),s===!0||s==null&&nd(e.url))){const p=o&&a&&id.read(a);p&&c.set(o,p)}return e},cd=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const s=bs(t);let o=s.data;const a=be.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:u}=s,h,f,m,p,k;function w(){p&&p(),k&&k(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function E(){if(!b)return;const A=be.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),U={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:A,config:t,request:b};ms(function(Ze){n(Ze),w()},function(Ze){r(Ze),w()},U),b=null}"onloadend"in b?b.onloadend=E:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(E)},b.onabort=function(){b&&(r(new N("Request aborted",N.ECONNABORTED,t,b)),w(),b=null)},b.onerror=function(v){const U=v&&v.message?v.message:"Network Error",Fe=new N(U,N.ERR_NETWORK,t,b);Fe.event=v||null,r(Fe),w(),b=null},b.ontimeout=function(){let v=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const U=s.transitional||zi;s.timeoutErrorMessage&&(v=s.timeoutErrorMessage),r(new N(v,U.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,t,b)),w(),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&y.forEach(a.toJSON(),function(v,U){b.setRequestHeader(U,v)}),y.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),c&&c!=="json"&&(b.responseType=s.responseType),u&&([m,k]=Dn(u,!0),b.addEventListener("progress",m)),d&&b.upload&&([f,p]=Dn(d),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(h=A=>{b&&(r(!A||A.type?new on(null,t,b):A),b.abort(),w(),b=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const F=Kc(s.url);if(F&&!ye.protocols.includes(F)){r(new N("Unsupported protocol "+F+":",N.ERR_BAD_REQUEST,t));return}b.send(o||null)})},dd=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const o=function(u){if(!s){s=!0,c();const h=u instanceof Error?u:this.reason;r.abort(h instanceof N?h:new on(h instanceof Error?h.message:h))}};let a=e&&setTimeout(()=>{a=null,o(new N(`timeout of ${e}ms exceeded`,N.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>y.asap(c),d}},ud=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},hd=async function*(t,e){for await(const n of fd(t))yield*ud(n,e)},fd=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Cs=(t,e,n,r)=>{const s=hd(t,e);let o=0,a,c=d=>{a||(a=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:u,value:h}=await s.next();if(u){c(),d.close();return}let f=h.byteLength;if(n){let m=o+=f;n(m)}d.enqueue(new Uint8Array(h))}catch(u){throw c(u),u}},cancel(d){return c(d),s.return()}},{highWaterMark:2})};function md(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const e=t.indexOf(",");if(e<0)return 0;const n=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(n)){let a=r.length;const c=r.length;for(let p=0;p<c;p++)if(r.charCodeAt(p)===37&&p+2<c){const k=r.charCodeAt(p+1),w=r.charCodeAt(p+2);(k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102)&&(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102)&&(a-=2,p+=2)}let d=0,u=c-1;const h=p=>p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);u>=0&&(r.charCodeAt(u)===61?(d++,u--):h(u)&&(d++,u-=3)),d===1&&u>=0&&(r.charCodeAt(u)===61||h(u))&&d++;const m=Math.floor(a/4)*3-(d||0);return m>0?m:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let o=0;for(let a=0,c=r.length;a<c;a++){const d=r.charCodeAt(a);if(d<128)o+=1;else if(d<2048)o+=2;else if(d>=55296&&d<=56319&&a+1<c){const u=r.charCodeAt(a+1);u>=56320&&u<=57343?(o+=4,a++):o+=3}else o+=3}return o}const Fi="1.16.0",Ss=64*1024,{isFunction:Ln}=y,ks=(t,...e)=>{try{return!!t(...e)}catch{return!1}},pd=t=>{const e=y.global??globalThis,{ReadableStream:n,TextEncoder:r}=e;t=y.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:s,Request:o,Response:a}=t,c=s?Ln(s):typeof fetch=="function",d=Ln(o),u=Ln(a);if(!c)return!1;const h=c&&Ln(n),f=c&&(typeof r=="function"?(E=>F=>E.encode(F))(new r):async E=>new Uint8Array(await new o(E).arrayBuffer())),m=d&&h&&ks(()=>{let E=!1;const F=new o(ye.origin,{body:new n,method:"POST",get duplex(){return E=!0,"half"}}),A=F.headers.has("Content-Type");return F.body!=null&&F.body.cancel(),E&&!A}),p=u&&h&&ks(()=>y.isReadableStream(new a("").body)),k={stream:p&&(E=>E.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!k[E]&&(k[E]=(F,A)=>{let v=F&&F[E];if(v)return v.call(F);throw new N(`Response type '${E}' is not supported`,N.ERR_NOT_SUPPORT,A)})});const w=async E=>{if(E==null)return 0;if(y.isBlob(E))return E.size;if(y.isSpecCompliantForm(E))return(await new o(ye.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(y.isArrayBufferView(E)||y.isArrayBuffer(E))return E.byteLength;if(y.isURLSearchParams(E)&&(E=E+""),y.isString(E))return(await f(E)).byteLength},b=async(E,F)=>{const A=y.toFiniteNumber(E.getContentLength());return A??w(F)};return async E=>{let{url:F,method:A,data:v,signal:U,cancelToken:Fe,timeout:Ze,onDownloadProgress:Bt,onUploadProgress:Xt,responseType:Be,headers:ot,withCredentials:Jt="same-origin",fetchOptions:pi,maxContentLength:Re,maxBodyLength:Rt}=bs(E);const ft=y.isNumber(Re)&&Re>-1,gi=y.isNumber(Rt)&&Rt>-1;let gn=s||fetch;Be=Be?(Be+"").toLowerCase():"text";let De=dd([U,Fe&&Fe.toAbortSignal()],Ze),Ce=null;const Xe=De&&De.unsubscribe&&(()=>{De.unsubscribe()});let O;try{if(ft&&typeof F=="string"&&F.startsWith("data:")&&md(F)>Re)throw new N("maxContentLength size of "+Re+" exceeded",N.ERR_BAD_RESPONSE,E,Ce);if(gi&&A!=="get"&&A!=="head"){const X=await b(ot,v);if(typeof X=="number"&&isFinite(X)&&X>Rt)throw new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,E,Ce)}if(Xt&&m&&A!=="get"&&A!=="head"&&(O=await b(ot,v))!==0){let X=new o(F,{method:"POST",body:v,duplex:"half"}),mt;if(y.isFormData(v)&&(mt=X.headers.get("content-type"))&&ot.setContentType(mt),X.body){const[Se,$t]=ps(O,Dn(gs(Xt)));v=Cs(X.body,Ss,Se,$t)}}y.isString(Jt)||(Jt=Jt?"include":"omit");const K=d&&"credentials"in o.prototype;if(y.isFormData(v)){const X=ot.getContentType();X&&/^multipart\/form-data/i.test(X)&&!/boundary=/i.test(X)&&ot.delete("content-type")}ot.set("User-Agent","axios/"+Fi,!1);const Je={...pi,signal:De,method:A.toUpperCase(),headers:ot.normalize().toJSON(),body:v,duplex:"half",credentials:K?Jt:void 0};Ce=d&&new o(F,Je);let Z=await(d?gn(Ce,pi):gn(F,Je));if(ft){const X=y.toFiniteNumber(Z.headers.get("content-length"));if(X!=null&&X>Re)throw new N("maxContentLength size of "+Re+" exceeded",N.ERR_BAD_RESPONSE,E,Ce)}const yn=p&&(Be==="stream"||Be==="response");if(p&&Z.body&&(Bt||ft||yn&&Xe)){const X={};["status","statusText","headers"].forEach(Nt=>{X[Nt]=Z[Nt]});const mt=y.toFiniteNumber(Z.headers.get("content-length")),[Se,$t]=Bt&&ps(mt,Dn(gs(Bt),!0))||[];let It=0;const yi=Nt=>{if(ft&&(It=Nt,It>Re))throw new N("maxContentLength size of "+Re+" exceeded",N.ERR_BAD_RESPONSE,E,Ce);Se&&Se(Nt)};Z=new a(Cs(Z.body,Ss,yi,()=>{$t&&$t(),Xe&&Xe()}),X)}Be=Be||"text";let Le=await k[y.findKey(k,Be)||"text"](Z,E);if(ft&&!p&&!yn){let X;if(Le!=null&&(typeof Le.byteLength=="number"?X=Le.byteLength:typeof Le.size=="number"?X=Le.size:typeof Le=="string"&&(X=typeof r=="function"?new r().encode(Le).byteLength:Le.length)),typeof X=="number"&&X>Re)throw new N("maxContentLength size of "+Re+" exceeded",N.ERR_BAD_RESPONSE,E,Ce)}return!yn&&Xe&&Xe(),await new Promise((X,mt)=>{ms(X,mt,{data:Le,headers:be.from(Z.headers),status:Z.status,statusText:Z.statusText,config:E,request:Ce})})}catch(K){if(Xe&&Xe(),De&&De.aborted&&De.reason instanceof N){const Je=De.reason;throw Je.config=E,Ce&&(Je.request=Ce),K!==Je&&(Je.cause=K),Je}throw K&&K.name==="TypeError"&&/Load failed|fetch/i.test(K.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,E,Ce,K&&K.response),{cause:K.cause||K}):N.from(K,K&&K.code,E,Ce,K&&K.response)}}},gd=new Map,Es=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:s}=e,o=[r,s,n];let a=o.length,c=a,d,u,h=gd;for(;c--;)d=o[c],u=h.get(d),u===void 0&&h.set(d,u=c?new Map:pd(e)),h=u;return u};Es();const Di={http:Hc,xhr:cd,fetch:{get:Es}};y.forEach(Di,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const xs=t=>`- ${t}`,yd=t=>y.isFunction(t)||t===null||t===!1;function wd(t,e){t=y.isArray(t)?t:[t];const{length:n}=t;let r,s;const o={};for(let a=0;a<n;a++){r=t[a];let c;if(s=r,!yd(r)&&(s=Di[(c=String(r)).toLowerCase()],s===void 0))throw new N(`Unknown adapter '${c}'`);if(s&&(y.isFunction(s)||(s=s.get(e))))break;o[c||"#"+a]=s}if(!s){const a=Object.entries(o).map(([d,u])=>`adapter ${d} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=n?a.length>1?`since :
17
- `+a.map(xs).join(`
18
- `):" "+xs(a[0]):"as no adapter specified";throw new N("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const vs={getAdapter:wd,adapters:Di};function Li(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new on(null,t)}function Ms(t){return Li(t),t.headers=be.from(t.headers),t.data=Oi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),vs.getAdapter(t.adapter||sn.adapter,t)(t).then(function(r){Li(t),t.response=r;try{r.data=Oi.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=be.from(r.headers),r},function(r){if(!fs(r)&&(Li(t),r&&r.response)){t.response=r.response;try{r.response.data=Oi.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=be.from(r.response.headers)}return Promise.reject(r)})}const Hn={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Hn[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Bs={};Hn.transitional=function(e,n,r){function s(o,a){return"[Axios v"+Fi+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,c)=>{if(e===!1)throw new N(s(a," has been removed"+(n?" in "+n:"")),N.ERR_DEPRECATED);return n&&!Bs[a]&&(Bs[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,a,c):!0}},Hn.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function bd(t,e,n){if(typeof t!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],a=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(a){const c=t[o],d=c===void 0||a(c,o,t);if(d!==!0)throw new N("option "+o+" must be "+d,N.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new N("Unknown option "+o,N.ERR_BAD_OPTION)}}const qn={assertOptions:bd,validators:Hn},Ie=qn.validators;let Ct=class{constructor(e){this.defaults=e||{},this.interceptors={request:new us,response:new us}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const a=s.stack.indexOf(`
19
- `);return a===-1?"":s.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
20
- `),c=a===-1?-1:o.indexOf(`
21
- `,a+1),d=c===-1?"":o.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
22
- `+o)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=bt(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&qn.assertOptions(r,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean),legacyInterceptorReqResOrdering:Ie.transitional(Ie.boolean)},!1),s!=null&&(y.isFunction(s)?n.paramsSerializer={serialize:s}:qn.assertOptions(s,{encode:Ie.function,serialize:Ie.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),qn.assertOptions(n,{baseUrl:Ie.spelling("baseURL"),withXsrfToken:Ie.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&y.merge(o.common,o[n.method]);o&&y.forEach(["delete","get","head","post","put","patch","query","common"],k=>{delete o[k]}),n.headers=be.concat(a,o);const c=[];let d=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;d=d&&w.synchronous;const b=n.transitional||zi;b&&b.legacyInterceptorReqResOrdering?c.unshift(w.fulfilled,w.rejected):c.push(w.fulfilled,w.rejected)});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let h,f=0,m;if(!d){const k=[Ms.bind(this),void 0];for(k.unshift(...c),k.push(...u),m=k.length,h=Promise.resolve(n);f<m;)h=h.then(k[f++],k[f++]);return h}m=c.length;let p=n;for(;f<m;){const k=c[f++],w=c[f++];try{p=k(p)}catch(b){w.call(this,b);break}}try{h=Ms.call(this,p)}catch(k){return Promise.reject(k)}for(f=0,m=u.length;f<m;)h=h.then(u[f++],u[f++]);return h}getUri(e){e=bt(this.defaults,e);const n=ys(e.baseURL,e.url,e.allowAbsoluteUrls);return ds(n,e.params,e.paramsSerializer)}};y.forEach(["delete","get","head","options"],function(e){Ct.prototype[e]=function(n,r){return this.request(bt(r||{},{method:e,url:n,data:(r||{}).data}))}}),y.forEach(["post","put","patch","query"],function(e){function n(r){return function(o,a,c){return this.request(bt(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Ct.prototype[e]=n(),e!=="query"&&(Ct.prototype[e+"Form"]=n(!0))});let Cd=class hl{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(c=>{r.subscribe(c),o=c}).then(s);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,c){r.reason||(r.reason=new on(o,a,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new hl(function(s){e=s}),cancel:e}}};function Sd(t){return function(n){return t.apply(null,n)}}function kd(t){return y.isObject(t)&&t.isAxiosError===!0}const Hi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Hi).forEach(([t,e])=>{Hi[e]=t});function Rs(t){const e=new Ct(t),n=Jr(Ct.prototype.request,e);return y.extend(n,Ct.prototype,e,{allOwnKeys:!0}),y.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return Rs(bt(t,s))},n}const ne=Rs(sn);ne.Axios=Ct,ne.CanceledError=on,ne.CancelToken=Cd,ne.isCancel=fs,ne.VERSION=Fi,ne.toFormData=Fn,ne.AxiosError=N,ne.Cancel=ne.CanceledError,ne.all=function(e){return Promise.all(e)},ne.spread=Sd,ne.isAxiosError=kd,ne.mergeConfig=bt,ne.AxiosHeaders=be,ne.formToJSON=t=>hs(y.isHTMLForm(t)?new FormData(t):t),ne.getAdapter=vs.getAdapter,ne.HttpStatusCode=Hi,ne.default=ne;const{Axios:qg,AxiosError:_g,CanceledError:Ug,isCancel:jg,CancelToken:Wg,VERSION:Gg,all:Zg,Cancel:Xg,isAxiosError:Jg,spread:Yg,toFormData:Qg,AxiosHeaders:Kg,HttpStatusCode:e1,formToJSON:t1,getAdapter:n1,mergeConfig:i1,create:r1}=ne;var an=(t=>(t.GET="get",t.POST="post",t.PUT="put",t.DELETE="delete",t))(an||{});const ln=(()=>{function t(){const d=s();return!(!d||d==="undefined")}function e(d){d.accessToken&&localStorage.setItem("access_token",d.accessToken),d.refreshToken&&localStorage.setItem("refresh_token",d.refreshToken)}function n(){const d=localStorage.getItem("user");return d?JSON.parse(d).id:""}function r(){const d=localStorage.getItem("user");if(d)return JSON.parse(d)}function s(){return localStorage.getItem("access_token")}function o(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(d){if(!t())return;const u=ln.getUser();u&&(u.human=d,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:t,setTokens:e,getAccessToken:s,getRefreshToken:o,getUserId:n,clearTokens:a,getUser:r,updateHuman:c}})();class qi{constructor(e){l(this,"code",400);l(this,"err","");R.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,n){const r=e.config;if(e.response){if(e.response.status===401&&!r._retry)return r._retry=!0,n.defaults.headers.common.token=ln.getAccessToken(),e.config.headers.token=ln.getAccessToken(),e.config.baseURL=void 0,n.request(r);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){ke.Error("Неверный логин или пароль");return}ke.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const s=new qi(e.response.data).getErr();s&&ke.Error(s)}return Promise.reject(e)}}}const Ot=ne.create();Ot.interceptors.response.use(t=>t,async t=>await qi.Handle(t,Ot));class cn{static async Get(e,n,r){return await Ot({method:an.GET,url:e,headers:n,responseType:r})}static async Post(e,n,r,s){return n["Content-Type"]="multipart/form-data",await Ot({method:an.POST,url:e,headers:n,responseType:r,data:s})}static async Put(e,n,r){return n["Content-Type"]="multipart/form-data",await Ot({method:an.PUT,url:e,headers:n,data:r})}static async Delete(e,n){return await Ot({method:an.DELETE,url:e,headers:n})}}class _n{constructor(e){l(this,"name","");R.BuildClass(this,e)}static Set(){}static Get(e,n){const r=sessionStorage.getItem(e);if(r){const s=JSON.parse(r),o=new Date,a=new Date(s.time),c=o.getTime()-a.getTime();return Math.round(c/6e4)>(n||10)?null:s.data}else return null}static async TryGet(e,n,r){let s;return s=_n.Get(e,r),s||(s=await n()),s}}var _i=(t=>(t.ContentType="Content-Type",t.Token="token",t))(_i||{}),$s=(t=>(t.ApplicationJson="application/json",t.MultipartFormData="multipart/form-data",t))($s||{});const J=class J{static Setup(e="http://localhost",n,r="api"){this.baseUrl=q.BuildSafeUrl(e,n,r),this.host=e,this.apiVersion=r}static newWebSocket(e){const n=this.host.replace("http","ws")+"/ws/"+e;return new WebSocket(n)}static download(e,n){const r=J.getDownloadFileName(e,n.headers),s=URL.createObjectURL(n.data),o=document.createElement("a");o.href=s,o.setAttribute("download",r),o.setAttribute("target","_blank"),document.body.appendChild(o),o.click()}static getDownloadFileName(e,n){if(e)return e;const r=n["content-disposition"];if(!r)return"file";const s=r.indexOf('"')+1,o=r.lastIndexOf('"'),a=r.substring(s,o);return a||"file"}static getHeaders(e){const n=qe.Get(Te.AccessToken);return e||(e=J.headers),n&&(e[_i.Token]=n),e??J.headers}static returnResponse(e,n){if(n)return e!=null&&e.isBlob?J.download(e.downloadFileName,n):n.data}static async Get(e){return J.returnResponse(e,await cn.Get(J.buildUrl((e==null?void 0:e.query)??""),J.getHeaders(e==null?void 0:e.headers),J.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return J.returnResponse(e,await cn.Post(J.buildUrl(e==null?void 0:e.query),J.getHeaders(e==null?void 0:e.headers),J.getResponseType(e.isBlob),J.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return J.returnResponse(e,await cn.Put(J.buildUrl(e==null?void 0:e.query),J.getHeaders(e==null?void 0:e.headers),J.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return J.returnResponse(e,await cn.Delete(J.buildUrl(e==null?void 0:e.query),J.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:n}=e;return new EventSource(J.buildUrl(n))}static buildUrl(e=""){try{return Ei(this.baseUrl,e)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,n){const r=new FormData;if(r.append("form",JSON.stringify(e)),n)for(const s of n)s.file&&r.append(s.id??"files",s.file,s.originalName);return r}};l(J,"baseUrl",""),l(J,"apiVersion","api"),l(J,"host",""),l(J,"headers",{[_i.ContentType]:$s.ApplicationJson});let te=J;const x=(t,e)=>{const n=t.__vccOpts||t;for(const[r,s]of e)n[r]=s;return n},Ed={},xd={style:{"text-align":"center"}};function vd(t,e){return i.openBlock(),i.createElementBlock("div",xd,e[0]||(e[0]=[i.createElementVNode("h1",null,"Страница не найдена",-1)]))}const Ui=x(Ed,[["render",vd]]),Md=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Ui}],Pe=class Pe{static Setup(e,n=""){this.router=e,this.title=n,this.ChangeDocumentTitle(),this.AddRoutes(Md)}static Get(){return this.router}static AddRoutes(e){e.forEach(n=>{this.Get().addRoute(n)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return Pe.GetStringParam("id")}static Slug(){return Pe.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return Pe.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const n=this.Get().resolve({path:e});window.open(n==null?void 0:n.href,"_blank")}static GetPath(){var n;const e=(n=Pe.Route())==null?void 0:n.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let n=e;n[0]==="/"&&(n=e.substring(1)),await Pe.To(`/admin/${n}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var n;return(n=this.Route())==null?void 0:n.params[e]}static SetQueryParam(e,n){const r=new URL(window.location);r.searchParams.set(e,String(n)),history.replaceState(null,"",r)}static Resolve(e){return this.Get().resolve(e)}};l(Pe,"router"),l(Pe,"title",""),l(Pe,"ChangeDocumentTitle",(e="")=>{let n=Pe.Route().meta.title??e;n&&(n=" | "+n),document.title=Pe.title+n});let _e=Pe;class Q{constructor(e,n){l(this,"items",i.reactive([]));l(this,"item");l(this,"options",i.reactive([]));l(this,"count",i.ref(0));l(this,"classConstructor");l(this,"url","");l(this,"searchStr",i.ref(""));this.classConstructor=e,this.item=i.reactive(new this.classConstructor),this.url=n}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetOptions(e="name",n="id"){const r=`${this.getUrl()}/options/${e}/${n}`,s=await te.Get({query:r});s&&(this.options.splice(0,this.options.length),this.options.push(...s))}async GetAll(e){let n;const r=te.Get;e&&e.withCache?n=await _n.TryGet(this.getUrl(),r):n=await r({query:this.getUrl()}),Array.isArray(n)?this.SetAll(n):this.SetAllWithCount(n)}async Get(e){e||(e=_e.Id()),this.Set(await te.Get({query:this.getUrl(e)}))}async GetBySlug(e){e||(e=_e.Slug()),this.Set(await $.H.HttpClient.Get({query:this.getUrl("by-slug/"+e)}))}async FTSP(e){var a;const r=((e==null?void 0:e.ftsp)??Ke.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},o=await te.Post(s);if(!(!o||!o.ftsp))if(Array.isArray(o.data))this.SetAll(o.data);else{if(r.p.append){this.AppendToAll((a=o.data)==null?void 0:a.items);return}this.SetAllWithCount(o.data)}}async Create(e){const n=e??this.item,r={payload:n,query:this.getUrl()};return n.getFileInfos&&(r.fileInfos=n.getFileInfos()),await te.Post(r)}async CreateAndSet(e){const n=await this.Create(e);this.Set(n)}async CreateMany(e){if(!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Create(r)))}),Promise.all(n)}async Update(e){const n=e??this.item,r={query:this.getUrl(`${n.id}`),payload:n};return n.getFileInfos&&(r.fileInfos=n.getFileInfos(),r.fileInfos.forEach(s=>s.url="")),await te.Put(r)}async UpdateAndSet(e){const n=await this.Update(e);this.Set(n)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){e&&(await te.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e))}async UpdateMany(e){if(e||(e=this.items),!e)return;const n=[];e.forEach(r=>{n.push(new Promise(()=>this.Update(r)))}),Promise.all(n)}SetAll(e){this.items.splice(0,this.items.length),e&&this.items.push(...e.map(n=>new this.classConstructor(n)))}SetAllWithCount(e){this.SetAll(e.items),this.count.value=e.count}RemoveItem(e){const n=this.items.findIndex(r=>r.id===e);this.items.splice(n,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.push(...n);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){R.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const n=e.map(r=>new this.classConstructor(r));this.items.unshift(...n);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(e=>$.H.Strings.SearchInFields(this.searchStr.value,e.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function Bd(t,e){t=="left"&&e.next(),t=="right"&&e.prev()}const Rd=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class $d{static GetRandColor(e){return Qe.GetRandEL(e??Rd)}}function Is(t,e){const n=[],r=e||$e.Asc,s=r===$e.Asc?$e.Desc:$e.Asc;return Object.values(t).forEach(o=>{n.push(o(r)),n.push(o(s))}),n.length>0&&!n.some(o=>o.default)&&(n[0].default=!0),e&&n.forEach(o=>{o.default&&(o.default=o.order===e)}),n}let Id=class{constructor(){l(this,"startHour",9);l(this,"endHour",19);l(this,"timelinePxHeight",50);l(this,"timelineStep",Yt.FiveMinutes);l(this,"activeTime","");l(this,"activeObjectId","");l(this,"dragged",!1);l(this,"draggedStartTime","");l(this,"draggedEndTime","");l(this,"timelines",vn[Yt.FiveMinutes])}startDrag(e,n){this.draggedStartTime=e,this.draggedEndTime=n,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=vn[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Qe.GenerateNumsRange(this.startHour,this.endHour)}};const ji=t=>t===8||t===46,Nd=t=>t>46&&t<58,Ad=t=>t>34&&t<41,Pd=t=>t+".",zd=(t,e,n)=>{ji(e)||Ad(e)||(!Nd(e)||n>9)&&t.preventDefault()};function Td(t,e){if(e>8){let n=t.substring(0,2).replace(".","1");Number(n)>31&&(n="31");let r=t.substring(3,5).replace(".","1");Number(r)>12&&(r="12");let s=t.substring(6,10).replace(".","1");Number(s)>2100&&(s="2100"),t=n+"."+r+"."+s}return t}function Vd(t){const e=t.keyCode;let n=t.srcElement.value;const r=n.length;zd(t,e,r),!ji(e)&&(r===2||r===5)&&(n=Pd(n));const s=t.srcElement.value+String.fromCharCode(t.which);if(ji(e)){t.srcElement.value=n;return}n.length===0&&Number(s)>3&&(n="3",t.preventDefault()),n.length===1&&Number(s)>31&&(n="31",t.preventDefault()),s.length===5&&Number(s.substring(3,5))>12&&(n=n.substring(0,3)+"12",t.preventDefault()),n=Td(n,r),t.srcElement.value=n}const Od=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Fd="ru-RU";class Ue{constructor(){l(this,"locale","ru-RU")}static Format(e,n){if(!e)return"";const r={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return n&&(r.year=n.year||n.year===void 0?n.year:r.year,r.month=n.month||n.month===void 0?n.month:r.month,r.day=n.day||n.day===void 0?n.day:r.day,r.hour=n.hour??r.hour,r.minute=n.minute??r.minute),Intl.DateTimeFormat(Fd,r).format(new Date(e))}static FormatWithTime(e){return Ue.Format(e,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetPeriod(e,n,r){return`${this.Format(e,r)}-${this.Format(n,r)}`}static GetShortDayName(e){return e?Od[e.getDay()]:""}static GetCurrentWeekPeriod(e){const n=new Date,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()-n.getDay()+1),s=new Date(n.getFullYear(),n.getMonth(),r.getDate()+7);return this.GetPeriod(r,s,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,n){const r=new Date,s=new Date,o=Ue.SplitHourTime(e),a=Ue.SplitHourTime(n);return r.setHours(o[0],o[1],0,0),s.setHours(a[0],a[1],0,0),(s.getTime()-r.getTime())/1e3/60}static HourTimeinMunutes(e){const n=Ue.SplitHourTime(e);return n[0]*60+n[1]}static SplitHourTime(e){const n=e.split(":");return[Number(n[0]),Number(n[1])]}static AddMinutesToHM(e,n){const r=new Date,s=Ue.SplitHourTime(e);r.setHours(s[0],s[1],0,0);const o=new Date(r.getTime()+n*6e4),a=o.getHours(),c=o.getMinutes();return`${a}:${c}`}static GetMonthsDiff(e,n){return n.getMonth()-e.getMonth()+12*(n.getFullYear()-e.getFullYear())}static StringToDate(e){const n=e.split(".");return new Date(`${n[2]}-${n[1]}-${n[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,n,r){return new Date(e)>=new Date(n)&&new Date(e)<=new Date(r)}static GetDatesFromPeriod(e,n){const r=[new Date(e)];let s=e;for(;s<=n;)s=Ue.AddDays(s,1),r.push(s);return r}static AddDays(e,n){const r=new Date(e);return r.setDate(r.getDate()+n),r}static Eq(e,n){return e.getTime()===n.getTime()}}class Dd{constructor(){l(this,"dragged",!1);l(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Ns{static Get(e){const n=e.split(".");return n[n.length-1]}}const Ld=(()=>{function t(o,a){localStorage.setItem(`${o}_favourite`,a.toString())}function e(o,a){const c=localStorage.getItem(`${o}_favourite`);return c?c.split(",").includes(a):!1}function n(o,a){const c=localStorage.getItem(`${o}_favourite`);if(!c){t(o,[a]);return}const d=c.split(",");d.push(a),t(o,d)}function r(o,a){const c=localStorage.getItem(`${o}_favourite`);if(!c)return;const d=c.split(",").filter(u=>u!==a);t(o,d)}function s(){for(const o in localStorage)o.includes("_favourite")&&localStorage.removeItem(o)}return{addToFavourite:n,removeFromFavourite:r,setFavourite:t,isFavourite:e,clearFavourite:s}})();/*!
23
- * vue-router v4.5.1
24
- * (c) 2025 Eduardo San Martin Morote
25
- * @license MIT
26
- */function As(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var Ps;(function(t){t.pop="pop",t.push="push"})(Ps||(Ps={}));var zs;(function(t){t.back="back",t.forward="forward",t.unknown=""})(zs||(zs={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var Ts;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(Ts||(Ts={}));const Hd=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function qd(t,e,n){const r=()=>{t[e].delete(n)};i.onUnmounted(r),i.onDeactivated(r),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function _d(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){As("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(Hd,{}).value;if(!e){process.env.NODE_ENV!=="production"&&As("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}qd(e,"leaveGuards",t)}class Ud{constructor(){l(this,"list",[]);l(this,"defaultSortModel");l(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=Is(e),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(e=>e.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const St=new Ud;function jd(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:o=>{t.value&&o.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(o,a)=>{t.value&&!e.value?o():a()}}}const Wd=(()=>{const t=(o,a)=>i.onBeforeMount(async()=>{$.F.FTSP.Get().reset(),St.Set(a==null?void 0:a.sortsLib),await o()}),{saveButtonClick:e,showConfirmModal:n}=jd(),r=o=>_d((a,c,d)=>{n((o||s)(),d)}),s=o=>async()=>{e.value=!0;try{o&&await o()}catch{return}};return{onBeforeMount:t,onBeforeRouteLeave:r,submit:s}})();function Vs(t,e){const n=[];if(t)for(let r=0;r<Math.ceil(t.length/e);r++)n[r]=t.slice(r*e,r*e+e);return n}class Wi{constructor(){l(this,"items",[]);l(this,"idx",0);l(this,"key","")}preSelect(){const e=_e.GetStringQueryParam(this.key);if(!e||e==="undefined"){this.Select(0);return}const n=this.items.findIndex(r=>r.slug===e);n>-1&&this.Select(n)}static Create(e,n){const r=new Wi;return r.key=e,r.items=n,r.items.length&&r.preSelect(),r}Select(e){if(this.items.length){if(e===void 0)return this.preSelect();this.idx=e,_e.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.items[this.idx]}GetComponent(){return this.items[this.idx].component}GetSlug(){return this.items[this.idx].slug}}const mi=class mi{static Format(e){let n=e;if(!n)e=n;else{(n[0]==="7"||n[0]==="8")&&n.length!==1&&(n=n.slice(1));const r=n.replace(/\+7|[^\d]/g,""),s=r.length;switch(!0){case s===0:e="";break;case(s===1&&n.length===1&&r==="7"):case(s===1&&n.length===1&&r==="8"):e="+7 (";break;case s<4:e=`+7 (${r}`;break;case s<7:e=`+7 (${r.slice(0,3)}) ${r.slice(3)}`;break;case s<9:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}`;break;default:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}-${r.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};l(mi,"validatePhone",(e,n,r)=>{mi.getPhoneRegExp().test(n)||!n?r():r(new Error("Пожалуйста, введите корректный номер телефона"))});let Gi=mi;class Gd{static Count(e){const n=e.filter(o=>o.rating!==0);let r=0;n.forEach(o=>r=r+o.rating);const s=r/n.length;return isNaN(s)?0:Number((r/n.length).toFixed(2))}}class Zd{static async Auth(e){e&&e()}static Dev(){}}class Xd{constructor(){l(this,"startHour",9);l(this,"startHM",`${this.startHour}:00`);l(this,"endHour",19);l(this,"endHM",`${this.endHour}:00`);l(this,"timelinePxHeight",50);l(this,"timelineStep",Yt.FiveMinutes);l(this,"timelines",vn[Yt.FiveMinutes])}periodIsCorrect(e,n){return D.GtOrEq(e,this.startHM)&&D.GtOrEq(this.endHM,n)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=vn[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Qe.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,n,r,s){return s.filter(o=>o.id!==r).every(o=>!D.PeriodsIntersects(e,n,o.startTime,o.endTime))}sortByStartTime(e){e.sort((n,r)=>D.HMtoM(n.startTime)-D.HMtoM(r.startTime))}}const Jd=-68;function Yd(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),r=e??Jd;let s=0;n&&(s=n.getBoundingClientRect().top+r+document.body.scrollTop),s&&document.body.scrollTo({top:s,behavior:"smooth"})}class Qd{static Sort(e){e.forEach((n,r)=>n.order=r)}}function Kd(t,e){let n=!0;return t.value.validate(r=>(r||(n=!1),n)),n}const eu=t=>new Promise(e=>{if(document.querySelector(t))return e(document.querySelector(t));const n=new MutationObserver(()=>{document.querySelector(t)&&(n.disconnect(),e(document.querySelector(t)))});n.observe(document.body,{childList:!0,subtree:!0})});let tu=class zr{constructor(e){l(this,"id");l(this,"message","");l(this,"userName");l(this,"createdOn",new Date);l(this,"chatId");l(this,"type","message");R.BuildClass(this,e)}static Create(e,n,r,s){const o=new zr;return o.id=at(),o.chatId=e,o.message=r,o.userName=s,o}static CreatePingMessage(){const e=new zr;return e.type="ping",e.id=at(),e}isMessage(){return this.type==="message"||this.type===""}};const nu="";class iu{constructor(e="",n="",r="set"){l(this,"client");l(this,"endpoint","");l(this,"query","");l(this,"period",2e4);R.BuildClass(this,{endpoint:e,query:n,mutation:r}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(tu.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,nu.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}let ru=(L=class{},l(L,"Arrays",Qe),l(L,"Axios",cn),l(L,"BaseStore",Q),l(L,"Cache",_n),l(L,"Classes",R),l(L,"CarouselSwipe",Bd),l(L,"Color",$d),l(L,"CreateSortModels",Is),l(L,"Cursor",Id),l(L,"DateMask",Vd),l(L,"Dates",Ue),l(L,"Dragger",Dd),l(L,"Extension",Ns),l(L,"Favourite",Ld),l(L,"Hooks",Wd),l(L,"HttpClient",te),l(L,"Id",re),l(L,"MakeCarousel",Vs),l(L,"Period",Si),l(L,"PhoneService",Gi),l(L,"Rating",Gd),l(L,"Router",_e),l(L,"RouterGuard",Zd),l(L,"Scheduler",Xd),l(L,"Scroll",Yd),l(L,"Sorter",Qd),l(L,"Static",xi),l(L,"Strings",q),l(L,"Time",D),l(L,"Timer",Qt),l(L,"Token",ln),l(L,"Menus",Wi),l(L,"validate",Kd),l(L,"WaitElement",eu),l(L,"WebSocketClient",iu),L);class su{constructor(){l(this,"limit",25);l(this,"count",0);l(this,"curPage",1);l(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const Os=new su;let ou=class{async Login(e=ae.Form.GetValues()){const n=await te.Post({query:"auth/login",payload:e});if(!n)throw"Ошибка авторизации";ae.Status.SetState(n)}async LoginAs(e){await te.Post({query:"auth/login-as",payload:{email:e}})}async Register(e=ae.Form.GetValues()){const n=await te.Post({query:"auth/register",payload:e});if(!n)throw n}async RestorePassword(e=ae.Form.GetValues()){await te.Post({query:"auth/restore-password",payload:e})}async PasswordChange(e=ae.Form.GetValues()){e.id=_e.GetStringParam("userId"),await te.Put({query:"auth/password-change",payload:e})}async RefreshToken(){await te.Post({query:"auth/refresh-token",payload:{refreshToken:ln.getRefreshToken()}})}async CheckUuid(e){await te.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}async ConfirmEmail(e){await te.Get({query:`auth/confirm-email/${e}`})}async EmailIsConfirm(e){await te.Get({query:`auth/email-is-confirm/${e}`})}};const au=new ou;var lu=Object.defineProperty,Un=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&lu(e,n,s),s};const dn=class fl{constructor(e){l(this,"id");l(this,"description","");l(this,"time","");l(this,"latitude","");l(this,"longitude","");l(this,"emails",[]);l(this,"postAddresses",[new Mn]);l(this,"phones",[]);l(this,"websites",[]);R.BuildClass(this,e)}addEmail(){const e=gt.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=yt.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new fl;return e.id=re.UUID(),e}removeEmail(e){R.RemoveFromClassById(e,this.emails)}removePhone(e){R.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new Mn)}addWebsite(){this.websites.push(new vi)}pushFirst(){this.emails.length||this.emails.push(new gt),this.phones.length||this.phones.push(new yt)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};Un([R.GetClassConstructor(gt)],dn.prototype,"emails"),Un([R.GetClassConstructor(Mn)],dn.prototype,"postAddresses"),Un([R.GetClassConstructor(yt)],dn.prototype,"phones"),Un([R.GetClassConstructor(vi)],dn.prototype,"websites");let Fs=dn,cu=class extends Q{constructor(){super(Fs,"contacts")}};const du=new cu;let uu=class extends Q{constructor(){super(gt,"emails")}};const hu=new uu;class Zi{constructor(e){l(this,"id");l(this,"ftsp");l(this,"name","");R.BuildClass(this,e)}static Create(e){const n=new Zi;return n.id=re.UUID(),n.ftsp=JSON.stringify(e),n}}let fu=class extends Q{constructor(){super(Zi,"ftsp-presets")}};const mu=new fu;let pu=class extends Q{constructor(){super(Gr,"humans")}};const gu=new pu;let yu=class extends Q{constructor(){super(yt,"phones")}};const wu=new yu;class bu{constructor(e){l(this,"id");l(this,"nameRus","");R.BuildClass(this,e)}}var Cu=Object.defineProperty,Su=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&Cu(e,n,s),s};class Ds{constructor(e){l(this,"id");l(this,"nameRus","");l(this,"fields",[]);R.BuildClass(this,e)}}Su([R.GetClassConstructor(bu)],Ds.prototype,"fields");let ku=class extends Q{constructor(){super(Ds,"schemas")}};const Eu=new ku;class Ls{constructor(e){l(this,"id","");l(this,"value","");l(this,"label","");l(this,"key","");l(this,"description","");l(this,"route","");l(this,"searchElementMetas",[]);R.BuildClass(this,e)}}class xu{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");R.BuildClass(this,e)}}var vu=Object.defineProperty,Hs=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&vu(e,n,s),s};class Ft{constructor(e){l(this,"id");l(this,"key","");l(this,"label","");l(this,"order",0);l(this,"route","");l(this,"table","");l(this,"active",!0);l(this,"searchColumn","");l(this,"descriptionColumn","");l(this,"labelColumn","");l(this,"valueColumn","");l(this,"options",[]);l(this,"searchGroupMetaColumns",[]);R.BuildClass(this,e)}}Hs([R.GetClassConstructor(Ls)],Ft.prototype,"options"),Hs([R.GetClassConstructor(xu)],Ft.prototype,"searchGroupMetaColumns");class Xi{constructor(e){l(this,"query","");l(this,"key","");l(this,"params","");l(this,"suggester",!1);l(this,"mustBeTranslated",!0);l(this,"options",[]);l(this,"searchGroupId","");l(this,"searchGroups",[]);l(this,"searchGroup",new Ft);l(this,"searchObjects",[]);l(this,"pagination",new $n);l(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(n=>new Ft(n))),e.searchGroup&&(this.searchGroup=new Ft(e.searchGroup)),e.options&&(this.options=e.options.map(n=>new Ls(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(r=>r.id===e);n?this.searchGroup=n:this.searchGroup=new Ft}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(_e.Route().query.groupId)}setQuery(){const e=_e.Route().query.query;e&&(this.query=e)}}let Mu=class{constructor(){l(this,"isSearchDrawerOpen",i.ref(!1));l(this,"searchModel",i.reactive(new Xi));l(this,"searchGroups",i.reactive([]));l(this,"count",0)}async Search(e){const n=await te.Get({query:`search?key=${e.key}&query=${e.query}`});n&&n.searchGroup&&n.searchGroup.options.forEach(r=>{e.searchObjects.push({id:r.id,value:r.value,label:r.label,description:r.description})})}async mainSearch(e){this.SetSearchModel(await te.Get({query:`search/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(r=>{r.options=[]});const n=await te.Get({query:`search/main?searchModel=${e.toUrl()}`});return this.SetSearchModel(n),n}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new Xi}SetSearchModel(e){e&&(this.searchModel=new Xi(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Ji=new Mu;let Bu=class extends Q{constructor(){super(Bn,"users-accounts")}};const Ru=new Bu;var qs=(t=>(t.simple="simple",t.oneToMany="oneToMany",t.manyToMany="manyToMany",t))(qs||{}),we=(t=>(t.String="string",t.Text="text",t.Number="number",t.Date="date",t.DateTime="dateTime",t.Radio="radio",t.Set="set",t.Boolean="boolean",t.Files="files",t.File="file",t.MatrixRadio="matrixRadio",t.MatrixSet="matrixSet",t))(we||{});class _s{constructor(e){l(this,"id");l(this,"name",we.String);l(this,"valueRelation",qs.simple);R.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===we.Radio)return"RadioProp";if(this.name===we.Set)return"SetProp";if(this.name===we.Number)return"NumberProp";if(this.name===we.String)return"StringProp"}}let $u=class extends Q{constructor(){super(_s,"value-types")}};const Iu=new $u;let Us=(Me=class{},l(Me,"Auth",au),l(Me,"Contacts",du),l(Me,"Emails",hu),l(Me,"FileInfos",new Q(ge,"file-infos")),l(Me,"FTSPPresets",mu),l(Me,"Humans",gu),l(Me,"Phones",wu),l(Me,"Schemas",Eu),l(Me,"UserAccounts",Ru),l(Me,"ValueTypes",Iu),l(Me,"Search",Ji),Me);var Yi=(t=>(t.XS="xs",t.S="s",t.M="m",t.L="l",t.XL="xl",t))(Yi||{});let Nu=(ht=class{},l(ht,"Orders",$e),l(ht,"Sizes",Yi),l(ht,"Statuses",he),l(ht,"DataTypes",le),l(ht,"ValueTypes",we),l(ht,"Operators",ee),ht);const Au=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class Pu{constructor(){l(this,"title","");l(this,"buttons",[]);l(this,"editTitle",i.ref(!1));l(this,"showEdit",i.ref(!1))}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const zu=new Pu;class Tu{constructor(){l(this,"menu",[]);l(this,"path","");l(this,"isOpen",!0);l(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return q.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(r=>q.SearchIn(r.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var n;return this.filterString?(n=e.children)==null?void 0:n.filter(r=>q.SearchIn(r.name,this.filterString)):e.children}}const Vu=new Tu;class Ou{constructor(){l(this,"Menu",i.reactive(Vu));l(this,"Head",i.reactive(zu))}}const Fu=new Ou;class Du extends qr{constructor(){super(...arguments);l(this,"confirmButtonText","Да");l(this,"cancelButtonText","Нет");l(this,"resolve");l(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((r,s)=>{this.resolve=r,this.reject=s})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const et=new Du;class Lu extends Hr{Show(){super.show()}Hide(){super.hide()}}const Hu=new Lu;class lt{}l(lt,"Admin",Fu),l(lt,"Dialog",et),l(lt,"Loading",Hu),l(lt,"Notify",i.reactive(ke)),l(lt,"Btn",pt),l(lt,"Input",Or);class ${}l($,"Auth",i.reactive(ae)),l($,"UI",i.reactive(lt)),l($,"Paginator",i.reactive(Os)),l($,"S",Us),l($,"H",ru),l($,"C",Vl),l($,"T",Nu),l($,"I",Au),l($,"F",Hl);class js{constructor(e){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new ge);$.H.Classes.BuildClass(this,e)}}class un{constructor(e){l(this,"id");l(this,"passportId");l(this,"fileInfoId");l(this,"fileInfo",new $.C.FileInfo);l(this,"order",0);R.BuildClass(this,e)}static Create(e){const n=new un;return n.id=$.H.Id.UUID(),n.passportId=e,n}}var qu=Object.defineProperty,_u=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&qu(e,n,s),s};class Qi{constructor(e){l(this,"id");l(this,"num","");l(this,"seria","");l(this,"division","");l(this,"divisionCode","");l(this,"citzenship","");l(this,"date",new Date);l(this,"address","");l(this,"passportScans",[]);R.BuildClass(this,e)}}_u([R.GetClassConstructor(un)],Qi.prototype,"passportScans");class Ws{constructor(e){l(this,"id");l(this,"num","");l(this,"fileInfoId");l(this,"fileInfo",new ge);$.H.Classes.BuildClass(this,e)}}const Uu=Object.freeze(Object.defineProperty({__proto__:null,Inn:js,Passport:Qi,PassportScan:un,Snils:Ws},Symbol.toStringTag,{value:"Module"}));let ju=class extends Q{constructor(){super(js,"inns")}};const Wu=new ju;let Gu=class extends Q{constructor(){super(un,"passport-scans")}};const Zu=new Gu;let Xu=class extends Q{constructor(){super(Qi,"passports")}};const Ju=new Xu;let Yu=class extends Q{constructor(){super(Ws,"snilss")}};const Qu=new Yu,Ku=Object.freeze(Object.defineProperty({__proto__:null,C:Uu,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Wu,PassportScans:Zu,Passports:Ju,Snilss:Qu},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class kt{constructor(e){l(this,"id");l(this,"name","");l(this,"score",0);l(this,"order",0);l(this,"showMoreQuestions",!1);l(this,"showOther",!1);l(this,"fieldId");l(this,"isMatrixY",!1);$.H.Classes.BuildClass(this,e)}static Create(e){const n=new kt;return n.id=$.H.Id.UUID(),n.fieldId=e,n}}class Gs{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fieldId");$.H.Classes.BuildClass(this,e)}}class Ki{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);$.H.Classes.BuildClass(this,e)}}class Dt{constructor(e){l(this,"id");l(this,"name","");l(this,"fieldId");$.H.Classes.BuildClass(this,e)}static Create(e){const n=new Dt;return n.id=$.H.Id.UUID(),n.fieldId=e,n}}var eh=Object.defineProperty,hn=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&eh(e,n,s),s};const Et=class wi{constructor(e){l(this,"id");l(this,"name","");l(this,"code","");l(this,"valueTypeId");l(this,"order",0);l(this,"ageCompare",!1);l(this,"answerVariants",[]);l(this,"answerVariantsForDelete",[]);l(this,"fieldExamples",[]);l(this,"fieldVariants",[]);l(this,"valueType",new _s);l(this,"fieldMeasures",[]);l(this,"showSet",!1);l(this,"showRadio",!1);l(this,"isEdit",!1);l(this,"children",[]);l(this,"parentId");l(this,"formSectionId");l(this,"selected",!1);$.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new wi;return n.id=$.H.Id.UUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(r=>r.id===e);return n?n.name:""}addRadioItem(e){const n=new kt(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(r=>r.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new Ki(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new Dt)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=kt.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=wi.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=Dt.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new wi(this);return e.id=$.H.Id.UUID(),e.answerVariants.forEach(n=>{n.id=$.H.Id.UUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const r=n.copy();return r.parentId=e.id,r}),e}};hn([$.H.Classes.GetClassConstructor(kt)],Et.prototype,"answerVariants"),hn([$.H.Classes.GetClassConstructor(Gs)],Et.prototype,"fieldExamples"),hn([$.H.Classes.GetClassConstructor(Dt)],Et.prototype,"fieldVariants"),hn([$.H.Classes.GetClassConstructor(Ki)],Et.prototype,"fieldMeasures"),hn([$.H.Classes.GetClassConstructor(Et)],Et.prototype,"children");let jn=Et;class er{constructor(e){l(this,"id");l(this,"answerId");l(this,"comment","");l(this,"fileInfoId");l(this,"fileInfo",new ge);$.H.Classes.BuildClass(this,e)}}class xt{constructor(e){l(this,"id");l(this,"answerVariantId");l(this,"answerVariantIdY");l(this,"fieldFillId");$.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new xt;return r.id=at(),r.fieldFillId=e,r.answerVariantId=n,r}static GetClassName(){return"selectedAnswerVariant"}}var th=Object.defineProperty,Zs=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&th(e,n,s),s};const tr=class Tr{constructor(e){l(this,"id");l(this,"valueString");l(this,"valueOther");l(this,"valueNumber");l(this,"valueDate");l(this,"fileInfo",new ge);l(this,"fileInfoId");l(this,"order",0);l(this,"selectedAnswerVariants",[]);l(this,"patientId");l(this,"fieldId");l(this,"formFillId");l(this,"answerVariantId");l(this,"filled",!1);l(this,"researchResultId");l(this,"answerFiles",[]);l(this,"answerFilesForDelete",[]);$.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,n){const r=new Tr;return r.id=at(),r.fieldId=e.id,r.formFillId=n,r.order=e.order,r.valueNumber=0,r.valueString="",r.valueDate=new Date,r}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(r=>Tr.Create(r,n))}addFile(){const e=new er;return e.id=at(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const r=xt.Create(this.id,e);return r.answerVariantIdY=n,this.selectedAnswerVariants.push(r),this.filled=!0,r}getMatrixValue(e,n){return this.selectedAnswerVariants.find(r=>r.answerVariantId===e&&r.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=xt.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(r=>r.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(r=>r.answerVariantId===n.id):!1}};Zs([$.H.Classes.GetClassConstructor(xt)],tr.prototype,"selectedAnswerVariants"),Zs([$.H.Classes.GetClassConstructor(er)],tr.prototype,"answerFiles");let Lt=tr;class nh{constructor(e){l(this,"id");l(this,"fieldId");$.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var ih=Object.defineProperty,rh=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&ih(e,n,s),s};const Xs=class ml{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"fields",[]);l(this,"formId");$.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new ml;return n.id=$.H.Id.UUID(),n.formId=e,n}addField(){const e=jn.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};rh([$.H.Classes.GetClassConstructor(jn)],Xs.prototype,"fields");let Wn=Xs;var sh=Object.defineProperty,oh=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&sh(e,n,s),s};const Js=class pl{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"isLaboratory",!1);l(this,"formSections",[]);l(this,"isEdit",!1);l(this,"withDates",!1);l(this,"withScores",!1);l(this,"selectedForExport",!1);l(this,"filterString","");l(this,"showOnlyNotFilled",!1);l(this,"showOnlyFilled",!1);$.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new pl;return e.id=$.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=Wn.Create(this.id);return this.formSections.push(e),$.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(r=>r.fields).flat(),n=e.map(r=>r.children).flat();return e.concat(n).filter(r=>r.children.length===0)}};oh([$.H.Classes.GetClassConstructor(Wn)],Js.prototype,"formSections");let Ys=Js;var ah=Object.defineProperty,lh=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&ah(e,n,s),s};const Qs=class gl{constructor(e){l(this,"id");l(this,"date",new Date);l(this,"editMode",!1);l(this,"userFormId");l(this,"fillingPercentage",0);l(this,"fieldFills",[]);l(this,"num","");l(this,"formId");$.H.Classes.BuildClass(this,e)}static Create(e){const n=new gl;return n.id=$.H.Id.UUID(),n.formId=e.id,n.fieldFills.push(...Lt.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(r=>r.fieldId===e)}pushRegisterProperty(e){const n=new Lt;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=Lt.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(r=>r.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.answerVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(r=>{var s;if(r.code){const o=(s=this.getFieldFillByFieldId(r.id))==null?void 0:s.valueNumber;n[r.code]=o}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};lh([$.H.Classes.GetClassConstructor(Lt)],Qs.prototype,"fieldFills");let Ks=Qs;const ch=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:kt,Field:jn,FieldExample:Gs,FieldFill:Lt,FieldFillFile:er,FieldFilter:nh,FieldMeasure:Ki,FieldVariant:Dt,Form:Ys,FormFill:Ks,FormSection:Wn,SelectedAnswerVariant:xt},Symbol.toStringTag,{value:"Module"}));let dh=class extends Q{constructor(){super(kt,"answer-variants")}};const uh=new dh;let hh=class extends Q{constructor(){super(Lt,"field-fills")}};const fh=new hh;let mh=class extends Q{constructor(){super(jn,"fields")}};const ph=new mh;let gh=class extends Q{constructor(){super(Ks,"form-fills")}};const yh=new gh;let wh=class extends Q{constructor(){super(Wn,"form-sections")}};const bh=new wh;let Ch=class extends Q{constructor(){super(Ys,"forms")}};const Sh=new Ch;let kh=class extends Q{constructor(){super(xt,"selected-answer-variants")}};const Eh=new kh,xh=Object.freeze(Object.defineProperty({__proto__:null,C:ch,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:uh,FieldFills:fh,Fields:ph,FormFills:yh,FormSections:bh,Forms:Sh,SelectedAnswerVariants:Eh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Gn{constructor(e){l(this,"id");l(this,"name","");l(this,"link","");l(this,"selected",!1);l(this,"hide",!1);l(this,"editMode",!1);l(this,"color","");l(this,"background","");l(this,"order",0);l(this,"menuId");l(this,"iconId");l(this,"icon",new ge);l(this,"iconName","");l(this,"svgCode","");R.BuildClass(this,e)}addFile(e){this.icon.id||(this.icon.id=re.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}}var vh=Object.defineProperty,Mh=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&vh(e,n,s),s};class nr{constructor(e){l(this,"id");l(this,"name","");l(this,"link","");l(this,"top",!0);l(this,"side",!0);l(this,"show",!1);l(this,"hide",!1);l(this,"active",!1);l(this,"order",0);l(this,"selected",!1);l(this,"editMode",!1);l(this,"subMenus",[]);l(this,"subMenusForDelete",[]);l(this,"iconId");l(this,"icon",new ge);R.BuildClass(this,e)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const e=[];return e.push(this.icon),this.subMenus.forEach(n=>{e.push(n.icon)}),e}addFile(e){this.icon.id||(this.icon.id=re.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}addSubMenu(){this.subMenus.push(new Gn)}removeSubMenu(e){const n=this.subMenus[e].id;n&&this.subMenusForDelete.push(n),this.subMenus.splice(e,1)}setColorsForSubMenus(){const e=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let n=0;this.subMenus.forEach(r=>{r.color=e[n],n=e.length-1?n=0:n++})}containPath(e){return this.link===e||!!this.subMenus.find(n=>n.link===e)}static GetClassName(){return"menu"}}Mh([R.GetClassConstructor(Gn)],nr.prototype,"subMenus");const Bh=Object.freeze(Object.defineProperty({__proto__:null,Menu:nr,SubMenu:Gn},Symbol.toStringTag,{value:"Module"}));let Rh=class extends $.H.BaseStore{constructor(){super(nr,"menus")}};const $h=new Rh;let Ih=class extends $.H.BaseStore{constructor(){super(Gn,"sub-menus")}};const Nh=new Ih,Ah=Object.freeze(Object.defineProperty({__proto__:null,C:Bh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:$h,SubMenus:Nh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Zn{constructor(e){l(this,"id","");l(this,"name","");l(this,"component","");l(this,"order");l(this,"active",!1);l(this,"key",0);R.BuildClass(this,e)}static Create(e,n,r,s,o){const a=new Zn;return a.id=e,a.name=n,a.component=r,a.order=s,a.active=!!o,a}}var eo=(t=>(t.User="USER",t.Admin="ADMIN",t))(eo||{});class Ph{constructor(e){l(this,"id");l(this,"name",eo.User);l(this,"label","");l(this,"startPage","");R.BuildClass(this,e)}}class ir{constructor(e){l(this,"id");l(this,"document",new ge);l(this,"documentId");l(this,"pageId");R.BuildClass(this,e)}}var zh=Object.defineProperty,Th=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&zh(e,n,s),s};class Xn{constructor(e){l(this,"id");l(this,"pageId");l(this,"fileInfoId");l(this,"fileInfo");l(this,"description");R.BuildClass(this,e)}}Th([R.GetClassConstructor(ge)],Xn.prototype,"fileInfo");class Jn{constructor(e){l(this,"id");l(this,"name","");l(this,"order",0);l(this,"downloadToFile",!1);l(this,"pageSectionId");l(this,"scan",new ge);l(this,"scanId");R.BuildClass(this,e)}getFileInfos(){return[this.scan]}getFileName(){return this.name?this.name:this.scan.originalName}}var Vh=Object.defineProperty,Oh=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&Vh(e,n,s),s};class Ht{constructor(e){l(this,"id");l(this,"name","");l(this,"singleScan",!1);l(this,"scan");l(this,"scanId");l(this,"order",0);l(this,"description","");l(this,"scans",[]);l(this,"scansForDelete",[]);l(this,"pageSectionDocuments",[]);l(this,"pageSideMenuId");l(this,"pageId");l(this,"text","");l(this,"documents",[]);R.BuildClass(this,e),this.documents=this.pageSectionDocuments,this.text=this.description.replace("<p>undefined</p>","")}addDocument(){const e=new Jn;e.order=this.pageSectionDocuments.length-1,this.pageSectionDocuments.push(e)}getFileInfos(){const e=[];return this.pageSectionDocuments.forEach(n=>{e.push(...n.getFileInfos())}),e}infoExists(e){const n=q.SearchIn(this.name,e),r=q.SearchIn(this.description,e),s=this.getDocuments(e);return n||r||s.length>0}getDocuments(e){return this.pageSectionDocuments.filter(n=>q.SearchIn(n.name,e))}getDescription(e){return e?q.WrapSubStr(this.description,e):this.description}filter(e){if(!e){this.text=this.description,this.documents=this.pageSectionDocuments;return}this.text=q.SearchIn(this.description,e)?q.WrapSubStr(this.description,e):"",this.documents=this.pageSectionDocuments.filter(n=>q.SearchIn(n.name,e))}}Oh([R.GetClassConstructor(Jn)],Ht.prototype,"pageSectionDocuments");var Fh=Object.defineProperty,Dh=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&Fh(e,n,s),s};class ct{constructor(e){l(this,"id");l(this,"name","Новое меню");l(this,"order",0);l(this,"description","");l(this,"routeAnchor","");l(this,"slug","");l(this,"pageSections",[]);l(this,"showContent",!1);l(this,"pageId");l(this,"selected",!1);l(this,"sections",[]);l(this,"text","");R.BuildClass(this,e),this.sections=this.pageSections,this.text=this.description.replace("<p>undefined</p>","")}getFileInfos(){const e=[];return this.pageSections.forEach(n=>{e.push(...n.getFileInfos())}),e}addPageSection(){const e=new Ht;e.order=this.pageSections.length+1,e.name=`Новой раздел ${e.order}`,e.id=re.UUID(),this.pageSections.push(e)}infoExists(e){const n=q.SearchIn(this.name,e),r=q.SearchIn(this.description,e),s=this.getPageSections(e).length>0;return n||r||s}getPageSections(e){return e.length?this.pageSections.filter(n=>n.infoExists(e)):this.pageSections}filter(e){e.length?(this.sections=this.pageSections.filter(n=>n.infoExists(e)),this.text=q.SearchIn(this.description,e)?q.WrapSubStr(this.description,e):""):(this.sections=this.pageSections,this.text=this.description),this.sections.forEach(n=>n.filter(e))}}Dh([R.GetClassConstructor(Ht)],ct.prototype,"pageSections");var Lh=Object.defineProperty,Yn=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&Lh(e,n,s),s};class qt{constructor(e){l(this,"id");l(this,"title","");l(this,"content","");l(this,"slug","");l(this,"pagesGroup","Без группы");l(this,"link","");l(this,"withComments",!1);l(this,"showContacts",!1);l(this,"collaps",!1);l(this,"showContent",!1);l(this,"pageImages",[]);l(this,"pageImagesForDelete",[]);l(this,"pageImagesNames",[]);l(this,"pageSideMenus",[]);l(this,"menus",[]);l(this,"pageSideMenusForDelete",[]);l(this,"pageSections",[]);l(this,"pageSectionsForDelete",[]);l(this,"pageDocuments",[]);l(this,"contact",new Fs);l(this,"contactId");l(this,"role",new Ph);l(this,"roleId");l(this,"filterStr","");l(this,"activeMenuId","");R.BuildClass(this,e),this.menus=this.pageSideMenus}getActiveMenu(){const e=this.pageSideMenus.find(n=>n.id===this.activeMenuId);return e||this.pageSideMenus[0]}setActiveMenuId(e){this.activeMenuId=e}getLink(){return this.slug!==""?`/pages/${this.slug}`:"404"}getFileInfos(){const e=[];return this.pageSideMenus.forEach(n=>{e.push(...n.getFileInfos())}),this.pageImages.forEach(n=>{n.fileInfo&&e.push(n.fileInfo)}),e}addSideMenu(){const e=new ct;return e.order=this.pageSideMenus.length+1,e.name=`Новое меню ${e.order}`,e.id=re.UUID(),this.pageSideMenus.push(e),e.id}selectSideMenu(e,n){if(!e&&this.pageSideMenus.length>0){this.pageSideMenus[0].selected=!0;return}this.pageSideMenus.forEach(r=>{n?r.selected=r.id===e:r.selected=r.slug===e})}getSelectedSideMenu(){const e=this.pageSideMenus.find(n=>n.selected);return e||new ct}addCustomSectionsToSideMenu(e){e.forEach(n=>{const r=new ct;r.id=n.id,r.name=n.name,typeof n.order<"u"?this.pageSideMenus.splice(n.order,0,r):this.pageSideMenus.push(r)})}getPageSideMenus(){if(this.showContacts&&!this.pageSideMenus.find(e=>e.id==="contacts")){const e=new ct;e.id="contacts",e.name="Контакты",this.pageSideMenus.push(e)}return this.filterStr===""?this.pageSideMenus:this.pageSideMenus.filter(e=>e.infoExists(this.filterStr))}filter(){this.filterStr===""?this.menus=this.pageSideMenus:this.menus=this.pageSideMenus.filter(e=>e.infoExists(this.filterStr)),this.menus.forEach(e=>e.filter(this.filterStr))}static GetClassName(){return"page"}}Yn([R.GetClassConstructor(Xn)],qt.prototype,"pageImages"),Yn([R.GetClassConstructor(ct)],qt.prototype,"pageSideMenus"),Yn([R.GetClassConstructor(Ht)],qt.prototype,"pageSections"),Yn([R.GetClassConstructor(ir)],qt.prototype,"pageDocuments");const Hh=Object.freeze(Object.defineProperty({__proto__:null,CustomSection:Zn,Page:qt,PageDocument:ir,PageImage:Xn,PageSection:Ht,PageSectionDocument:Jn,PageSideMenu:ct},Symbol.toStringTag,{value:"Module"}));let qh=class extends $.H.BaseStore{constructor(){super(Zn,"custom-sections")}};const _h=new qh;let Uh=class extends $.H.BaseStore{constructor(){super(ir,"page-documents")}};const jh=new Uh;let Wh=class extends $.H.BaseStore{constructor(){super(Xn,"page-images")}};const Gh=new Wh;let Zh=class extends $.H.BaseStore{constructor(){super(Jn,"page-section-documents")}};const Xh=new Zh;let Jh=class extends $.H.BaseStore{constructor(){super(Ht,"page-sections")}};const Yh=new Jh;let Qh=class extends $.H.BaseStore{constructor(){super(ct,"page-side-menus")}};const Kh=new Qh;let ef=class extends $.H.BaseStore{constructor(){super(qt,"pages")}};const tf=new ef,nf=Object.freeze(Object.defineProperty({__proto__:null,C:Hh,S:Object.freeze(Object.defineProperty({__proto__:null,CustomSections:_h,PageDocuments:jh,PageImages:Gh,PageSectionDocuments:Xh,PageSections:Yh,PageSideMenus:Kh,Pages:tf},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Qn{constructor(e){l(this,"id");l(this,"name","");l(this,"label","");$.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new Qn;return r.id=$.H.Id.UUID(),r.name=e,r.label=n,r}}const rf=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:Qn},Symbol.toStringTag,{value:"Module"}));let sf=class extends Q{constructor(){super(Qn,"color-themes")}};const of=new sf,af=Object.freeze(Object.defineProperty({__proto__:null,C:rf,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:of},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var _t=(t=>(t.Ping="ping",t.Enter="enter",t.Exit="exit",t.Message="message",t.Write="write",t.Empty="",t))(_t||{});class vt{constructor(e){l(this,"id");l(this,"userId");l(this,"chatId");l(this,"message","");l(this,"fileInfo",new $.C.FileInfo);l(this,"createdAt",new Date);l(this,"type",_t.Message);R.BuildClass(this,e)}static Create(e,n,r){const s=new vt;return s.id=$.H.Id.UUID(),s.chatId=n,s.userId=r,s.message=e,s}static CreatePingMessage(){const e=new vt;return e.type=_t.Ping,e.id=$.H.Id.UUID(),e}isMessage(){return this.type===_t.Message||this.type===_t.Empty}}var lf=Object.defineProperty,cf=(t,e,n,r)=>{for(var s=void 0,o=t.length-1,a;o>=0;o--)(a=t[o])&&(s=a(e,n,s)||s);return s&&lf(e,n,s),s};const to=class yl{constructor(e){l(this,"id");l(this,"name","");l(this,"createdAt",new Date);l(this,"newMesage","");l(this,"userId","");l(this,"chatMessages",[]);$.H.Classes.BuildClass(this,e)}static Create(){const e=new yl;return e.id=$.H.Id.UUID(),e}addMessage(){if(this.newMesage==="")return;const e=vt.Create(this.newMesage,this.id,this.userId);return this.chatMessages.push(e),this.newMesage="",e}};cf([$.H.Classes.GetClassConstructor(vt)],to.prototype,"chatMessages");let no=to;const df=Object.freeze(Object.defineProperty({__proto__:null,Chat:no,ChatMessage:vt},Symbol.toStringTag,{value:"Module"}));let uf=class extends Q{constructor(){super(vt,"chat-messages")}};const hf=new uf;let ff=class extends Q{constructor(){super(no,"chats")}};const mf=new ff,pf=Object.freeze(Object.defineProperty({__proto__:null,Chats:Object.freeze(Object.defineProperty({__proto__:null,C:df,S:Object.freeze(Object.defineProperty({__proto__:null,ChatMessages:hf,Chats:mf},Symbol.toStringTag,{value:"Module"})),T:(Ir=class{},l(Ir,"ChatMessage",_t),Ir)},Symbol.toStringTag,{value:"Module"})),Docs:Ku,Forms:xh,Menus:Ah,Pages:nf,Settings:af},Symbol.toStringTag,{value:"Module"}));class gf extends kn{constructor(){super(...arguments);l(this,"label","Логин");l(this,"name","login");l(this,"validator",new Fr);l(this,"method",At.Login);l(this,"id","field-auth-login")}}const yf="p-button",wf=i.defineComponent({inheritAttrs:!1,__name:"PButton",props:{text:{type:String,default:"",required:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},skin:{type:String,default:"base",required:!1},size:{type:String,default:Yi.M,required:!1},type:{type:String,default:he.Primary,required:!1},fontSize:{type:String,default:"",required:!1}},emits:["click"],setup(t,{emit:e}){const n=t,r=e,s=()=>{r("click")},o=i.computed(()=>q.JoinSnake(yf,n.skin)),a=i.computed(()=>q.JoinSnake(o.value,n.type)),c=i.computed(()=>q.JoinSnake(o.value,n.size)),d=i.computed(()=>[o.value,a.value,c.value]);return(u,h)=>(i.openBlock(),i.createElementBlock("button",i.mergeProps(u.$attrs,{style:{margin:t.margin,padding:t.padding,maxWidth:t.width,minWidth:t.width,minHeight:t.height,maxHeight:t.height,fontSize:t.fontSize},class:i.unref(d),onClick:i.withModifiers(s,["prevent"])}),[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createTextVNode(" "+i.toDisplayString(t.text),1)],16))}}),Kn=x(wf,[["__scopeId","data-v-814c9b41"]]),rr=x(i.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M29.3678 7.25259C29.2732 7.3128 28.8775 7.6999 28.5076 8.13001C27.7076 9.02463 16.2409 22.0483 16.2065 22.0999C16.1549 22.1601 15.6732 21.73 13.9786 20.1042C8.31835 14.6934 8.5334 14.8827 8.03448 14.8827C7.69899 14.8827 7.59577 14.9257 7.3463 15.1752C7.09684 15.4246 7.05383 15.5279 7.05383 15.8547C7.05383 16.3365 6.98501 16.259 10.1506 19.2354C11.5011 20.4999 13.256 22.1601 14.056 22.9171C15.6302 24.4225 15.9485 24.6461 16.3872 24.5687C16.7399 24.4999 16.7743 24.4569 20.0947 20.6891C21.5485 19.0289 23.2689 17.0762 23.914 16.3451C29.4624 10.0655 30.6495 8.69775 30.77 8.48269C30.942 8.14721 30.8474 7.6999 30.5377 7.38162C30.3399 7.19237 30.2194 7.14076 29.9183 7.14076C29.7119 7.14936 29.471 7.19237 29.3678 7.25259Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-48c8e6e2"]]),bf=["value"],io=x(i.defineComponent({__name:"PCheckBox",props:i.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:"14px"},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"22px"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:i.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:e}){const n=i.useModel(t,"modelValue"),r=e,s=()=>{r("change",n.value)};return(o,a)=>(i.openBlock(),i.createElementBlock("div",{id:"some",class:"check-line",style:i.normalizeStyle({padding:t.padding,margin:t.margin,maxWidth:t.width})},[i.createElementVNode("label",{class:"check-field__label",style:i.normalizeStyle({fontSize:t.fontSize})},[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>n.value=c),class:"check-field__input",type:"checkbox",value:t.value,onChange:s},null,40,bf),[[i.vModelCheckbox,n.value]]),i.createElementVNode("div",{id:"abc",class:"box",style:i.normalizeStyle({width:t.size,height:t.size,borderRadius:t.borderRadius})},[n.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"check-icon",style:i.normalizeStyle({width:t.size,height:t.size})},[i.createVNode(rr,{margin:"auto",size:t.size},null,8,["size"])],4)):i.createCommentVNode("",!0)],4),i.createTextVNode(" "+i.toDisplayString(t.label),1)],4)],4))}}),[["__scopeId","data-v-85407c13"]]),Cf=["for"],Sf={class:"field"},kf={class:"left-field"},Ef=["id","value","name"],xf={class:"right-field"},ro=x(i.defineComponent({__name:"PDatePicker",props:i.mergeModels({text:{type:String,default:"",required:!1},label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:i.mergeModels(["blur","input"],["update:modelValue"]),setup(t,{emit:e}){const n=e,r=i.useModel(t,"modelValue"),s=a=>{const d=a.target.valueAsDate;d?(r.value=d,n("input",o(r.value))):(r.value=null,n("input",null))},o=a=>a?new Date(a.getTime()-a.getTimezoneOffset()*60*1e3).toISOString().split("T")[0]:"";return(a,c)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Cf)):i.createCommentVNode("",!0),i.createElementVNode("div",Sf,[i.createElementVNode("div",kf,[i.renderSlot(a.$slots,"default",{},void 0,!0)]),i.createElementVNode("input",{id:t.label,max:"2100",min:"1900",value:o(r.value),class:"text-field__input",type:"date",name:t.label,onInput:s},null,40,Ef),i.createElementVNode("div",xf,[i.renderSlot(a.$slots,"right",{},void 0,!0)])])],4))}}),[["__scopeId","data-v-60c7417a"]]),so=x(i.defineComponent({inheritAttrs:!1,__name:"PFlex",props:{margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},minWidth:{type:String,default:"",required:!1},maxWidth:{type:String,default:"",required:!1},height:{type:String,default:"",required:!1},justifyContent:{type:String,default:"",required:!1},background:{type:String,default:"",required:!1},alignItems:{type:String,default:"",required:!1}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"flex-line",style:i.normalizeStyle({margin:t.margin,padding:t.padding,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,height:t.height,justifyContent:t.justifyContent,background:t.background,alignItems:t.alignItems})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-d9fdfe7d"]]);var vf=Object.defineProperty,Mf=(t,e,n)=>e in t?vf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fn=(t,e,n)=>Mf(t,typeof e!="symbol"?e+"":e,n);const oo={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}},ao=(t,e,n)=>t.replaceAll(e,"").replace(n,".").replace("..",".").replace(/[^.\d]/g,""),lo=(t,e,n)=>{var r;return new Intl.NumberFormat(((r=n.number)==null?void 0:r.locale)??"en",{minimumFractionDigits:t,maximumFractionDigits:e,roundingMode:"trunc"})},Bf=(t,e=!0,n)=>{var r,s,o,a;const c=((r=n.number)==null?void 0:r.unsigned)!==!0&&t.startsWith("-")?"-":"",d=((s=n.number)==null?void 0:s.fraction)??0;let u=lo(0,d,n);const h=u.formatToParts(1000.12),f=((o=h.find(b=>b.type==="group"))==null?void 0:o.value)??" ",m=((a=h.find(b=>b.type==="decimal"))==null?void 0:a.value)??".",p=ao(t,f,m);if(Number.isNaN(parseFloat(p)))return c;const k=p.split(".");if(k[1]!=null&&k[1].length>=1){const b=k[1].length<=d?k[1].length:d;u=lo(b,d,n)}let w=u.format(parseFloat(p));return e?d>0&&p.endsWith(".")&&!p.slice(0,-1).includes(".")&&(w+=m):w=ao(w,f,m),c+w},co=t=>JSON.parse(t.replaceAll("'",'"')),Rf=(t,e={})=>{const n={...e};t.dataset.maska!=null&&t.dataset.maska!==""&&(n.mask=$f(t.dataset.maska)),t.dataset.maskaEager!=null&&(n.eager=ei(t.dataset.maskaEager)),t.dataset.maskaReversed!=null&&(n.reversed=ei(t.dataset.maskaReversed)),t.dataset.maskaTokensReplace!=null&&(n.tokensReplace=ei(t.dataset.maskaTokensReplace)),t.dataset.maskaTokens!=null&&(n.tokens=If(t.dataset.maskaTokens));const r={};return t.dataset.maskaNumberLocale!=null&&(r.locale=t.dataset.maskaNumberLocale),t.dataset.maskaNumberFraction!=null&&(r.fraction=parseInt(t.dataset.maskaNumberFraction)),t.dataset.maskaNumberUnsigned!=null&&(r.unsigned=ei(t.dataset.maskaNumberUnsigned)),(t.dataset.maskaNumber!=null||Object.values(r).length>0)&&(n.number=r),n},ei=t=>t!==""?!!JSON.parse(t):!0,$f=t=>t.startsWith("[")&&t.endsWith("]")?co(t):t,If=t=>{if(t.startsWith("{")&&t.endsWith("}"))return co(t);const e={};return t.split("|").forEach(n=>{const r=n.split(":");e[r[0]]={pattern:uo()?new RegExp(r[1],"u"):new RegExp(r[1]),optional:r[2]==="optional",multiple:r[2]==="multiple",repeated:r[2]==="repeated"}}),e},uo=()=>{try{return new RegExp("\\p{L}","u"),!0}catch{return!1}};let Nf=class{constructor(e={}){fn(this,"opts",{}),fn(this,"memo",new Map);const n={...e};if(n.tokens!=null){n.tokens=n.tokensReplace?{...n.tokens}:{...oo,...n.tokens};for(const r of Object.values(n.tokens))typeof r.pattern=="string"&&(r.pattern=uo()?new RegExp(r.pattern,"u"):new RegExp(r.pattern))}else n.tokens=oo;Array.isArray(n.mask)&&(n.mask.length>1?n.mask=[...n.mask].sort((r,s)=>r.length-s.length):n.mask=n.mask[0]??""),n.mask===""&&(n.mask=null),this.opts=n}masked(e){return this.process(String(e),this.findMask(String(e)))}unmasked(e){return this.process(String(e),this.findMask(String(e)),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(e){const n=this.findMask(String(e));if(this.opts.mask==null||n==null)return!1;const r=this.process(String(e),n).length;return typeof this.opts.mask=="string"?r>=this.opts.mask.length:r>=n.length}findMask(e){const n=this.opts.mask;if(n==null)return null;if(typeof n=="string")return n;if(typeof n=="function")return n(e);const r=this.process(e,n.slice(-1).pop()??"",!1);return n.find(s=>this.process(e,s,!1).length>=r.length)??""}escapeMask(e){const n=[],r=[];return e.split("").forEach((s,o)=>{s==="!"&&e[o-1]!=="!"?r.push(o-r.length):n.push(s)}),{mask:n.join(""),escaped:r}}process(e,n,r=!0){if(this.opts.number!=null)return Bf(e,r,this.opts);if(n==null)return e;const s=`v=${e},mr=${n},m=${r?1:0}`;if(this.memo.has(s))return this.memo.get(s);const{mask:o,escaped:a}=this.escapeMask(n),c=[],d=this.opts.tokens!=null?this.opts.tokens:{},u=this.isReversed()?-1:1,h=this.isReversed()?"unshift":"push",f=this.isReversed()?0:o.length-1,m=this.isReversed()?()=>b>-1&&E>-1:()=>b<o.length&&E<e.length,p=A=>!this.isReversed()&&A<=f||this.isReversed()&&A>=f;let k,w=-1,b=this.isReversed()?o.length-1:0,E=this.isReversed()?e.length-1:0,F=!1;for(;m();){const A=o.charAt(b),v=d[A],U=(v==null?void 0:v.transform)!=null?v.transform(e.charAt(E)):e.charAt(E);if(!a.includes(b)&&v!=null?(U.match(v.pattern)!=null?(c[h](U),v.repeated?(w===-1?w=b:b===f&&b!==w&&(b=w-u),f===w&&(b-=u)):v.multiple&&(F=!0,b-=u),b+=u):v.multiple?F&&(b+=u,E-=u,F=!1):U===k?k=void 0:v.optional&&(b+=u,E-=u),E+=u):(r&&!this.isEager()&&c[h](A),U===A&&!this.isEager()?E+=u:k=A,this.isEager()||(b+=u)),this.isEager())for(;p(b)&&(d[o.charAt(b)]==null||a.includes(b));){if(r){if(c[h](o.charAt(b)),e.charAt(E)===o.charAt(b)){b+=u,E+=u;continue}}else o.charAt(b)===e.charAt(E)&&(E+=u);b+=u}}return this.memo.set(s,c.join("")),this.memo.get(s)}},Af=class{constructor(e,n={}){fn(this,"items",new Map),fn(this,"eventAbortController"),fn(this,"onInput",r=>{if(r instanceof CustomEvent&&r.type==="input"&&!r.isTrusted&&!r.bubbles)return;const s=r.target,o=this.items.get(s);if(o===void 0)return;const a="inputType"in r&&r.inputType.startsWith("delete"),c=o.isEager(),d=a&&c&&o.unmasked(s.value)===""?"":s.value;this.fixCursor(s,a,()=>this.setValue(s,d))}),this.options=n,this.eventAbortController=new AbortController,this.init(this.getInputs(e))}update(e={}){this.options={...e},this.init(Array.from(this.items.keys()))}updateValue(e){var n;e.value!==""&&e.value!==((n=this.processInput(e))==null?void 0:n.masked)&&this.setValue(e,e.value)}destroy(){this.eventAbortController.abort(),this.items.clear()}init(e){const n=this.getOptions(this.options);for(const r of e){if(!this.items.has(r)){const{signal:o}=this.eventAbortController;r.addEventListener("input",this.onInput,{capture:!0,signal:o})}const s=new Nf(Rf(r,n));this.items.set(r,s),queueMicrotask(()=>this.updateValue(r)),r.selectionStart===null&&s.isEager()&&console.warn("Maska: input of `%s` type is not supported",r.type)}}getInputs(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):"length"in e?Array.from(e):[e]}getOptions(e){const{onMaska:n,preProcess:r,postProcess:s,...o}=e;return o}fixCursor(e,n,r){var s,o;const a=e.selectionStart,c=e.value;if(r(),a===null||a===c.length&&!n)return;const d=e.value,u=c.slice(0,a),h=d.slice(0,a),f=(s=this.processInput(e,u))==null?void 0:s.unmasked,m=(o=this.processInput(e,h))==null?void 0:o.unmasked;if(f===void 0||m===void 0)return;let p=a;u!==h&&(p+=n?d.length-c.length:f.length-m.length),e.setSelectionRange(p,p)}setValue(e,n){const r=this.processInput(e,n);r!==void 0&&(e.value=r.masked,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEach(s=>s(r)):this.options.onMaska(r)),e.dispatchEvent(new CustomEvent("maska",{detail:r})),e.dispatchEvent(new CustomEvent("input",{detail:r.masked})))}processInput(e,n){const r=this.items.get(e);if(r===void 0)return;let s=n??e.value;this.options.preProcess!=null&&(s=this.options.preProcess(s));let o=r.masked(s);return this.options.postProcess!=null&&(o=this.options.postProcess(o)),{masked:o,unmasked:r.unmasked(s),completed:r.completed(s)}}};const sr=new WeakMap,Pf=(t,e)=>{if(t.arg==null||t.instance==null)return;const n="setup"in t.instance.$.type;t.arg in t.instance?t.instance[t.arg]=e:n&&console.warn("Maska: please expose `%s` using defineExpose",t.arg)},ho=(t,e)=>{var n;const r=t instanceof HTMLInputElement?t:t.querySelector("input");if(r==null||(r==null?void 0:r.type)==="file")return;let s={};if(e.value!=null&&(s=typeof e.value=="string"?{mask:e.value}:{...e.value}),e.arg!=null){const o=a=>{const c=e.modifiers.unmasked?a.unmasked:e.modifiers.completed?a.completed:a.masked;Pf(e,c)};s.onMaska=s.onMaska==null?o:Array.isArray(s.onMaska)?[...s.onMaska,o]:[s.onMaska,o]}sr.has(r)?(n=sr.get(r))==null||n.update(s):sr.set(r,new Af(r,s))},zf=["for"],Tf={class:"left-field"},Vf=["disabled"],Of={class:"right-field"},ti=x(i.defineComponent({__name:"PInput",props:i.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1}},{modelValue:{},modelModifiers:{}}),emits:i.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(t,{emit:e}){const n=e,r=i.useModel(t,"modelValue"),s=o=>{o.inputType==="insertText"&&n("input",r.value)};return(o,a)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,zf)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor,background:t.disabled?"#F5F5F5":"var(--input-background)"})},[i.createElementVNode("div",Tf,[i.renderSlot(o.$slots,"default",{},void 0,!0)]),i.withDirectives(i.createElementVNode("input",i.mergeProps({ref:"input"},o.$attrs,{"onUpdate:modelValue":a[0]||(a[0]=c=>r.value=c),class:"text-field__input",style:{color:t.color},disabled:t.disabled,onBlur:a[1]||(a[1]=c=>o.$emit("blur",r.value)),onFocus:a[2]||(a[2]=c=>o.$emit("focus",r.value)),onInput:s}),null,16,Vf),[[i.vModelDynamic,r.value],[i.unref(ho),t.mask]]),i.createElementVNode("div",Of,[i.renderSlot(o.$slots,"right",{},void 0,!0)])],4)],4))}}),[["__scopeId","data-v-69fc2ea7"]]),fo=i.defineComponent({__name:"PInputDate",props:i.mergeModels({placeholder:{type:String,default:"Укажите дату"},width:{type:String,required:!1,default:"auto"},margin:{type:String,required:!1,default:""},label:{type:String,default:"",required:!1}},{modelValue:{default:new Date},modelModifiers:{}}),emits:i.mergeModels(["update:modelValue","change","beforeChange"],["update:modelValue"]),setup(t,{emit:e}){const n=e,r=i.useModel(t,"modelValue"),s=Ue.Format(r.value),o=i.ref(s),a=d=>{if(!c(d))return;const u=Ue.FromRuStr(d);r.value=u,n("beforeChange",u),n("change",u)},c=d=>d.length!=10?(o.value=s,ke.Error("Неверный формат даты"),!1):Number(o.value.slice(0,2))>31?(o.value=s,ke.Error("Неверный день месяца"),!1):Number(o.value.slice(3,5))>12?(o.value=s,ke.Error("Неверный месяц"),!1):Number(o.value.slice(6,10))>2100?(o.value=s,ke.Error("Неверный год"),!1):!0;return(d,u)=>{const h=i.resolveComponent("PInput");return i.openBlock(),i.createElementBlock("div",{class:"style-container",style:i.normalizeStyle({width:t.width,position:"relative"})},[i.createVNode(h,{modelValue:i.unref(o),"onUpdate:modelValue":u[0]||(u[0]=f=>i.isRef(o)?o.value=f:null),mask:"##.##.####",placeholder:t.placeholder,margin:t.margin,label:t.label,onBlur:a,onKeydown:i.withKeys(i.withModifiers(f=>{},["prevent"]),["enter"])},null,8,["modelValue","placeholder","margin","label","onKeydown"])],4)}}}),Ff=x(i.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#plus"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[i.createElementVNode("path",{d:"M11.3263 19.8672V13.8881H5.33984V11.8951H11.3263V5.91602H13.3217V11.8951H19.3081V13.8881H13.3217V19.8672H11.3263Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-1f1f064c"]]),Df=x(i.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#minus"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[i.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),Lf=["for"],Hf={class:"number"},qf=["disabled"],_f=i.defineComponent({__name:"PInputNumber",props:i.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},disabled:{type:Boolean,required:!1,default:!1},max:{type:Number,default:Number.MAX_VALUE,required:!1},min:{type:Number,default:Number.NEGATIVE_INFINITY,required:!1},step:{type:Number,default:1,required:!1}},{modelValue:{default:0},modelModifiers:{}}),emits:i.mergeModels(["blur","input","change"],["update:modelValue"]),setup(t,{emit:e}){const n=e,r=t,s=()=>{const w=r.step.toString();return w.includes(".")?w.split(".")[1].length:0},o=s(),a=i.useModel(t,"modelValue"),c=i.ref(a.value.toFixed(s())),d=w=>{const b=Math.pow(10,o);return Math.round(w*b)/b},u=(w,...b)=>{a.value=d(w),c.value=d(w).toFixed(s()),b.forEach(E=>n(E,a.value))},h=(w,...b)=>{u(w,...b)},f=()=>h(+c.value+r.step,"change"),m=()=>h(+c.value-r.step,"change"),p=()=>h(+c.value,"input"),k=()=>h(+c.value,"change","blur");return(w,b)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Lf)):i.createCommentVNode("",!0),i.createElementVNode("div",Hf,[i.createElementVNode("button",{class:"number-minus",type:"button",onClick:m},[i.createElementVNode("div",{class:i.normalizeClass(t.disabled||a.value<=t.min?"icon-minus-disabled":"icon-minus")},[i.createVNode(Df)],2)]),i.withDirectives(i.createElementVNode("input",i.mergeProps(w.$attrs,{"onUpdate:modelValue":b[0]||(b[0]=E=>i.isRef(c)?c.value=E:null),class:"input-field",type:"number",disabled:t.disabled,style:{color:t.disabled?"#828587":t.color,background:t.disabled?"var(--input-readonly-background)":""},onBlur:k,onInput:i.withModifiers(p,["stop"])}),null,16,qf),[[i.vModelText,i.unref(c),void 0,{lazy:!0}]]),i.createElementVNode("button",{class:"number-plus",style:i.normalizeStyle({transform:t.disabled?"none":"transform: scale(1.2, 1.2)"}),type:"button",onClick:f},[i.createElementVNode("div",{class:i.normalizeClass(t.disabled||a.value>=t.max?"icon-plus-disabled":"icon-plus")},[i.createVNode(Ff)],2)],4)])],4))}}),mo=x(_f,[["__scopeId","data-v-b75e0cb2"]]),po=x(i.defineComponent({__name:"PLeftSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть меню"},titleClose:{type:String,required:!1,default:"Показать меню"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(n.open);i.watch(()=>n.open,()=>{s.value=!s.value});const o=a=>{s.value=!s.value,r("open",a)};return(a,c)=>{const d=i.resolveComponent("PString");return i.openBlock(),i.createElementBlock(i.Fragment,null,[t.shift?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,style:i.normalizeStyle({minWidth:t.widthClosed,maxWidth:t.widthClosed,height:t.height})},null,4)),i.createElementVNode("div",{class:"LS-body",style:i.normalizeStyle({marginLeft:i.unref(s)?"0":`calc(${t.widthClosed} - ${t.widthOpened})`,minWidth:t.widthOpened,maxWidth:t.widthOpened,boxShadow:t.shadow?"5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:t.shift?"relative":"absolute",background:t.background,height:t.height})},[i.createElementVNode("div",{class:"LS-content",style:i.normalizeStyle({width:`calc(100% - ${t.widthClosed})`,height:t.height,background:"#ffffff"})},[i.renderSlot(a.$slots,"default",{},void 0,!0)],4),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({width:t.widthClosed,height:t.height}),onClick:c[0]||(c[0]=u=>o(!i.unref(s)))},[i.unref(s)?(i.openBlock(),i.createBlock(d,{key:0,string:t.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(s)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(d,{key:1,string:t.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))],4)],4)],64)}}}),[["__scopeId","data-v-d68a122a"]]),go=x(i.defineComponent({__name:"PList",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"300px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("ul",{style:i.normalizeStyle({margin:t.margin,padding:t.padding,width:t.width})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-eaa10a96"]]),yo=x(i.defineComponent({__name:"PListItem",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},showDivider:{type:Boolean,required:!1,default:!1},background:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("li",{style:i.normalizeStyle({margin:t.margin,padding:t.padding,borderBottom:t.showDivider?"1px solid":"none",background:t.background})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-77d1fac6"]]),Uf=["for"],jf=["id","name","checked","value"],wo=x(i.defineComponent({__name:"PRadio",props:i.mergeModels({label:{type:String,default:""},name:{type:String,default:"group"},fontSize:{type:String,default:"14px"},size:{type:String,default:"20px"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:"auto"},value:{type:[String,Boolean],default:void 0}},{modelValue:{},modelModifiers:{}}),emits:i.mergeModels(["change"],["update:modelValue"]),setup(t,{emit:e}){const n=i.useModel(t,"modelValue"),r=e,s=t,o=re.GUID(),a=i.computed(()=>n.value===s.value),c=()=>{r("change",s.value)};return(d,u)=>(i.openBlock(),i.createElementBlock("div",{class:"radio-line",style:i.normalizeStyle({padding:t.padding,margin:t.margin,maxWidth:t.width})},[i.createElementVNode("label",{class:"radio-field__label",for:i.unref(o),style:i.normalizeStyle({fontSize:t.fontSize})},[i.withDirectives(i.createElementVNode("input",{id:i.unref(o),"onUpdate:modelValue":u[0]||(u[0]=h=>n.value=h),name:t.name,checked:i.unref(a),class:"radio-field__input",type:"radio",value:t.value},null,8,jf),[[i.vModelRadio,n.value]]),i.createElementVNode("div",{class:"box",style:i.normalizeStyle({width:t.size,height:t.size,borderRadius:t.borderRadius}),onClick:c},[n.value===t.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"radio-dot",style:i.normalizeStyle({width:`calc(${t.size} - 50%)`,height:`calc(${t.size} - 50%)`})},null,4)):i.createCommentVNode("",!0)],4),i.createElementVNode("span",{onClick:c},i.toDisplayString(t.label),1)],12,Uf)],4))}}),[["__scopeId","data-v-25033aee"]]),bo=x(i.defineComponent({__name:"PRightSlider",props:{open:{type:Boolean,default:!1},shadow:{type:Boolean,default:!0},border:{type:Boolean,default:!0},shift:{type:Boolean,default:!0},height:{type:String,required:!1,default:"100%"},widthClosed:{type:String,required:!1,default:"30px"},widthOpened:{type:String,required:!1,default:"300px"},titleOpen:{type:String,required:!1,default:"Скрыть"},titleClose:{type:String,required:!1,default:"Показать"},background:{type:String,required:!1,default:"inherit"}},emits:["open"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(n.open);i.watch(()=>n.open,()=>{s.value=!s.value});const o=a=>{s.value=!s.value,r("open",a)};return(a,c)=>{const d=i.resolveComponent("PString");return i.openBlock(),i.createElementBlock("div",{class:"wrapper",style:i.normalizeStyle({maxHeight:t.height,height:t.height})},[i.createElementVNode("div",{class:"content",style:i.normalizeStyle({paddingRight:t.shift?"0":`${t.widthClosed}`})},[i.renderSlot(a.$slots,"content",{},void 0,!0)],4),i.createElementVNode("div",{class:"RS-body",style:i.normalizeStyle({marginRight:i.unref(s)?"0":`calc(${t.widthClosed} - ${t.widthOpened})`,minWidth:t.widthOpened,maxWidth:t.widthOpened,boxShadow:t.shadow?"-5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:t.shift?"relative":"absolute"})},[i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({width:t.widthClosed,height:t.height}),onClick:c[0]||(c[0]=u=>o(!i.unref(s)))},[i.unref(s)?(i.openBlock(),i.createBlock(d,{key:0,string:t.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(s)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(d,{key:1,string:t.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))],4),i.createElementVNode("div",{class:"RS-content",style:i.normalizeStyle({width:`calc(${t.widthOpened} - ${t.widthClosed} - 2px)`,background:t.background,height:t.height})},[i.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-45d26c84"]]),ni=x(i.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#close"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[i.createElementVNode("path",{d:"M7.53508 7.18138C7.03684 7.5158 6.86132 8.14496 7.1161 8.66643C7.18971 8.8138 8.02201 9.69236 9.44881 11.1207C10.6718 12.345 11.8211 13.49 12.0023 13.6714L12.3251 14.0058L9.80551 16.5224C7.92576 18.4043 7.25199 19.1184 7.14441 19.3225C6.83867 19.9346 7.0425 20.5865 7.637 20.8926C7.89745 21.0286 8.41268 21.0343 8.6618 20.9096C8.76372 20.8585 10.0037 19.6626 11.4191 18.2455L14.001 15.6666L16.5432 18.2229C18.1964 19.8723 19.1703 20.8132 19.3232 20.8869C19.5779 21.0116 20.0309 21.0399 20.2913 20.9379C20.5178 20.8529 20.8632 20.5015 20.9368 20.2747C21.0274 19.9913 21.0161 19.5719 20.9028 19.3508C20.8519 19.2431 19.6516 17.9961 18.2361 16.5791L15.6656 14.0001L18.2191 11.4495C19.7138 9.95309 20.8179 8.80813 20.8858 8.6721C21.0104 8.42837 21.0387 7.98058 20.9425 7.73119C20.8519 7.50446 20.5971 7.23239 20.3593 7.11336C20.0988 6.97733 19.6516 6.96599 19.3628 7.08502C19.2212 7.14737 18.3097 8.01459 16.5771 9.74904L14.001 12.328L11.4191 9.75471C9.6583 7.99192 8.77504 7.14737 8.63349 7.08502C8.51459 7.03968 8.28246 7 8.1126 7C7.86347 7 7.76156 7.03401 7.53508 7.18138Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-cbcad2a0"]]),or=x(i.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[i.createElementVNode("path",{d:"M3.08417 4.43062C2.86268 4.4769 2.70731 4.56285 2.52549 4.74467C2.29408 4.97607 2.20152 5.2174 2.22136 5.55459C2.25111 6.0207 1.96681 5.70996 6.78995 10.5397C9.18995 12.9463 11.2263 14.9662 11.309 15.029C11.5238 15.1843 11.7123 15.2471 11.99 15.2505C12.4693 15.2538 12.109 15.581 17.1106 10.5728C22.0891 5.58764 21.7288 5.98103 21.7255 5.505C21.7255 5.37607 21.7023 5.21078 21.6726 5.13145C21.5106 4.68186 21.0511 4.38434 20.5817 4.4174C20.1519 4.44715 20.4263 4.19591 16.0164 8.60252L11.9833 12.629L8.06598 8.71161C5.91061 6.55624 4.0726 4.73475 3.98003 4.66202C3.71227 4.45376 3.38499 4.36781 3.08417 4.43062Z",fill:"currentColor"}),i.createElementVNode("path",{d:"M9.69602 16.8994C9.70593 16.9292 9.72577 17.0184 9.73569 17.1044C9.76213 17.2664 9.7985 17.2994 9.83486 17.1903C9.84478 17.154 9.89106 17.1143 9.93734 17.1044C10.0464 17.078 10.0365 17.0548 9.87453 16.9589C9.6861 16.8465 9.67288 16.8432 9.69602 16.8994Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-4d8b581f"]]),Wf=["for"],Gf={class:"left-field"},Zf={class:"arrow"},Xf={key:1,class:"dropdown-menu"},Jf={class:"right-field"},ar=x(i.defineComponent({inheritAttrs:!1,__name:"PSelect",props:i.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},value:{type:String,default:"",required:!1},readonly:{type:Boolean,default:!1,required:!1},disabled:{type:Boolean,default:!1,required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},clearable:{type:Boolean,required:!1,default:!0},width:{type:String,required:!1,default:""},borderColor:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},inPadding:{type:String,required:!1,default:"var(--select-internal-padding)"}},{modelValue:{},modelModifiers:{}}),emits:i.mergeModels(["change","clear"],["update:modelValue"]),setup(t,{emit:e}){const n=i.useModel(t,"modelValue"),r=i.ref(!0),s=e,o=i.ref(!1),a=i.ref(!1),c=()=>{o.value=!o.value},d=()=>{n.value=void 0,s("clear",void 0),s("change",void 0),r.value=!0};return(u,h)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding,width:t.width})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Wf)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",onClick:c},[i.createElementVNode("div",Gf,[i.renderSlot(u.$slots,"left",{},void 0,!0)]),i.createElementVNode("div",{class:"sl",onMouseover:h[0]||(h[0]=f=>a.value=!0),onMouseleave:h[1]||(h[1]=f=>a.value=!1)},[t.clearable?i.withDirectives((i.openBlock(),i.createElementBlock("div",{key:0,class:"clear",onClick:d},[i.createVNode(ni,{margin:"0"})],512)),[[i.vShow,i.unref(a)]]):i.createCommentVNode("",!0),i.createElementVNode("div",Zf,[i.createVNode(or,{margin:"2px 2px 0 0"})]),i.unref(o)?(i.openBlock(),i.createElementBlock("ul",Xf,h[2]||(h[2]=[i.createStaticVNode('<input class="form-control" id="myInput" type="text" placeholder="Search.." data-v-cec0fdf7><li data-v-cec0fdf7><a href="#" data-v-cec0fdf7>HTML</a></li><li data-v-cec0fdf7><a href="#" data-v-cec0fdf7>CSS</a></li><li data-v-cec0fdf7><a href="#" data-v-cec0fdf7>JavaScript</a></li><li data-v-cec0fdf7><a href="#" data-v-cec0fdf7>jQuery</a></li><li data-v-cec0fdf7><a href="#" data-v-cec0fdf7>Bootstrap</a></li><li data-v-cec0fdf7><a href="#" data-v-cec0fdf7>Angular</a></li>',7)]))):i.createCommentVNode("",!0)],32),i.createElementVNode("div",Jf,[i.renderSlot(u.$slots,"right",{},void 0,!0)])])],4))}}),[["__scopeId","data-v-cec0fdf7"]]),Co=x(i.defineComponent({__name:"PSticky",props:{shadow:{type:Boolean,default:!1},zIndex:{type:Number,default:0},background:{type:String,default:"inherit"},padding:{type:String,default:"0"},top:{type:String,default:"0"},divider:{type:Boolean,default:!1},dividerColor:{type:String,default:"var(--border-color-default)"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"sticky-block",style:i.normalizeStyle({zIndex:1+t.zIndex,top:t.top,background:t.background,padding:t.padding,boxShadow:t.shadow?"0 0 5px 2px rgba(0,0,0,0.3)":"none",borderBottom:t.divider?"1px solid":"none",borderColor:t.dividerColor})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-832b5223"]]),Yf=["innerHTML"],Qf={key:1},ii=x(i.defineComponent({__name:"PString",props:{string:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"var(--font-color)"},fontSize:{type:String,required:!1,default:"var(--font-size-default)"},fontWeight:{type:String,required:!1,default:""},background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},justifyContent:{type:String,required:!1,default:"center"},isHtml:{type:Boolean,required:!1,default:!1}},emits:["click"],setup(t){const e=t,n={color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,background:e.background,padding:e.padding,width:e.width,maxWidth:e.width,minWidth:e.minWidth,margin:e.margin,justifyContent:e.justifyContent};return(r,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["string",t.customClass]),style:n,onClick:s[0]||(s[0]=o=>r.$emit("click"))},[t.isHtml?(i.openBlock(),i.createElementBlock("span",{key:0,innerHTML:t.string},null,8,Yf)):(i.openBlock(),i.createElementBlock("span",Qf,i.toDisplayString(t.string),1))],2))}}),[["__scopeId","data-v-98febd87"]]),So=i.defineComponent({__name:"PTable",props:{margin:{type:String,required:!1,default:"0 0 20px 0"},width:{type:String,required:!1,default:"100%"},fontSize:{type:String,required:!1,default:"var(--font-size-default)"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("table",i.mergeProps(e.$attrs,{style:{width:t.width,margin:t.margin},class:"p-table"}),[i.createElementVNode("thead",null,[i.renderSlot(e.$slots,"thead")]),i.createElementVNode("tbody",null,[i.renderSlot(e.$slots,"tbody")])],16))}}),Kf=["for"],em={class:"left-field"},tm={class:"right-field"},ko=x(i.defineComponent({__name:"PTextarea",props:i.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:"0"},padding:{type:String,default:"0",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},resize:{type:String,default:"vertical",required:!1}},{modelValue:{},modelModifiers:{}}),emits:i.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(t){const e=i.useModel(t,"modelValue"),n=t,r=i.computed(()=>({color:n.color,resize:n.resize}));return(s,o)=>(i.openBlock(),i.createElementBlock("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,Kf)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",em,[i.renderSlot(s.$slots,"default",{},void 0,!0)]),i.withDirectives(i.createElementVNode("textarea",i.mergeProps({ref:"textarea"},s.$attrs,{"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a),class:"text-field__input",style:i.unref(r),onBlur:o[1]||(o[1]=a=>s.$emit("blur",e.value)),onInput:o[2]||(o[2]=a=>s.$emit("input",e.value)),onFocus:o[3]||(o[3]=a=>s.$emit("focus",e.value))}),null,16),[[i.vModelText,e.value],[i.unref(ho),t.mask]]),i.createElementVNode("div",tm,[i.renderSlot(s.$slots,"right",{},void 0,!0)])],4)],4))}}),[["__scopeId","data-v-093d0d21"]]),nm={class:"top-slider-content"},im={class:"center"},Eo=x(i.defineComponent({__name:"PTopSlider",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},open:{type:Boolean,default:!1}},emits:["open"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(n.open);i.watch(()=>n.open,()=>{s.value=!s.value});const o=a=>{s.value=!s.value,r("open",a)};return(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(s)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=i.withModifiers(d=>s.value=!0,["prevent"])),c[1]||(c[1]=i.withModifiers(()=>{},["stop"]))]})),i.createElementVNode("div",{class:"top-slider",style:i.normalizeStyle({marginTop:i.unref(s)?"0":`calc(${t.sliderOffHeight} - ${t.sliderOnHeight})`,height:t.sliderOnHeight}),onClick:c[3]||(c[3]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",nm,[i.createElementVNode("div",im,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({height:t.sliderOffHeight}),onClick:c[2]||(c[2]=d=>o(!i.unref(s)))},[i.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-863b4aff"]]),xo=x(i.defineComponent({__name:"PTooltip",props:{tooltipText:{type:String,default:"Подсказка",required:!1},timeout:{type:Number,default:500,required:!1},typeStyle:{type:String,default:"primary",required:!1},height:{type:String,default:"16px",required:!1},relPosition:{type:String,default:"right",required:!1},level:{type:String,default:"top",required:!1}},setup(t){const e=t,n=i.ref(!1),r=i.ref(null),s={primary:"var(--background-color-sub)",success:"var(--palette-success-5)",warning:"var(--palette-warnind-5)",danger:"var(--palette-error-5)",neutral:"var(--background-color)"},o=()=>{r.value=setTimeout(()=>n.value=!0,e.timeout)},a=()=>{r.value&&clearTimeout(r.value),n.value=!1};return(c,d)=>(i.openBlock(),i.createElementBlock("div",{class:"tooltip-wrapper",onMouseenter:o,onMouseleave:a},[i.renderSlot(c.$slots,"default",{},void 0,!0),i.unref(n)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"tooltip-box",style:i.normalizeStyle({position:"absolute",zIndex:10,boxShadow:"0 0 5px rgba(0,0,0,0.3)",background:s[t.typeStyle],whiteSpace:"pre",height:t.height,left:t.relPosition==="left"?"":"35px",right:t.relPosition==="left"?"35px":"",top:t.level==="top"?"-15px":"",bottom:t.level==="top"?"":"-15px"})},[i.createVNode(ii,{string:t.tooltipText,padding:"0 3px",height:t.height},null,8,["string","height"])],4)):i.createCommentVNode("",!0)],32))}}),[["__scopeId","data-v-ee8d9167"]]);function vo(t){t.component("PButton",Kn),t.component("PCheckBox",io),t.component("PDatePicker",ro),t.component("PFlex",so),t.component("PInput",ti),t.component("PInputDate",fo),t.component("PInputNumber",mo),t.component("PLeftSlider",po),t.component("PList",go),t.component("PListItem",yo),t.component("PRadio",wo),t.component("PRightSlider",bo),t.component("PSelect",ar),t.component("PSticky",Co),t.component("PString",ii),t.component("PTextarea",ko),t.component("PTopSlider",Eo),t.component("PTable",So),t.component("PTooltip",xo)}const rm=Object.freeze(Object.defineProperty({__proto__:null,PButton:Kn,PCheckBox:io,PDatePicker:ro,PFlex:so,PInput:ti,PInputDate:fo,PInputNumber:mo,PLeftSlider:po,PList:go,PListItem:yo,PRadio:wo,PRightSlider:bo,PSelect:ar,PSticky:Co,PString:ii,PTable:So,PTextarea:ko,PTooltip:xo,PTopSlider:Eo,default:vo},Symbol.toStringTag,{value:"Module"})),sm={key:0,class:"mainblock"},om={class:"mainblock-right"},am={class:"body"},Mo=x(i.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(t){const e=t,n=i.ref(!1),r=i.ref(!0),s=i.ref(window.matchMedia("(max-width: 1330px)").matches),o=()=>{r.value=!r.value};return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),n.value=!0}),(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.renderSlot(a.$slots,"main",{},void 0,!0),i.unref(n)?(i.openBlock(),i.createElementBlock("div",sm,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:i.unref(s)?"100%":t.menuWidth,maxWidth:i.unref(s)?"100%":t.menuWidth,marginLeft:i.unref(s)?"-110%":"0",position:i.unref(s)?"fixed":"relative",top:i.unref(s)?"140px":""})},[i.createElementVNode("div",{class:"left-menu",style:i.normalizeStyle({minWidth:i.unref(s)?"auto":t.menuWidth,boxShadow:i.unref(s)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!i.unref(r)&&i.unref(s)?"110%":"0",borderTopLeftRadius:i.unref(s)?"0":"",borderBottomLeftRadius:i.unref(s)?"0":""}),onClick:c[0]||(c[0]=d=>o())},[i.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),i.createElementVNode("div",om,[a.$slots.title?(i.openBlock(),i.createElementBlock("div",{key:0,class:"title",style:i.normalizeStyle({display:a.$slots.title?"flex":"none"})},[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({display:i.unref(s)?"flex":"none"}),onClick:c[1]||(c[1]=d=>o())},[i.renderSlot(a.$slots,"icon",{},void 0,!0)],4),i.renderSlot(a.$slots,"title",{},void 0,!0)],4)):i.createCommentVNode("",!0),i.createElementVNode("div",am,[i.renderSlot(a.$slots,"body",{},void 0,!0)])])])):i.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),lm={class:"mainblock-right"},cm={class:"body"},Bo=x(i.defineComponent({__name:"AdaptiveContainerHorizontal",props:{menuWidth:{type:String,required:!1,default:"0px"},leftWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"},titleSticky:{type:Boolean,required:!1,default:!1}},setup(t){const e=t,n=i.ref(!1),r=i.ref(!0),s=i.ref(window.matchMedia("(max-width: 1330px)").matches),o=()=>{r.value=!r.value};return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(e.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return s.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return s.value=window.matchMedia("(max-width: 768px)").matches}return s.value=window.matchMedia("(max-width: 1330px)").matches}),n.value=!0}),(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.renderSlot(a.$slots,"main",{},void 0,!0),i.unref(n)?(i.openBlock(),i.createElementBlock("div",{key:0,class:"mainblock",style:i.normalizeStyle({display:i.unref(s)?"block":"flex"})},[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:i.unref(s)?"100%":t.menuWidth,display:t.leftWidth!=="0px"?"flex":"none",top:i.unref(s)?"58px":"80px"})},[i.createElementVNode("div",{class:"left-menu",style:i.normalizeStyle({minWidth:i.unref(s)?"100%":t.menuWidth,boxShadow:i.unref(s)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!i.unref(r)&&i.unref(s),"0"),overflowX:i.unref(s)?"scroll":"hidden",display:i.unref(s)?"flex":"block",background:i.unref(s)?"#ffffff":"",overflowY:i.unref(s)?"hidden":"auto"}),onClick:c[0]||(c[0]=d=>o())},[i.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),i.createElementVNode("div",lm,[i.createElementVNode("div",{class:"title",style:i.normalizeStyle({position:t.titleSticky?"sticky":"relative",top:t.titleSticky?i.unref(s)?"108px":"58px":"0",zIndex:t.titleSticky?"10":""})},[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({display:i.unref(s)?"flex":"none"}),onClick:c[1]||(c[1]=d=>o())},[i.renderSlot(a.$slots,"icon",{},void 0,!0)],4),i.renderSlot(a.$slots,"title",{},void 0,!0)],4),i.createElementVNode("div",cm,[i.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):i.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),lr=x(i.defineComponent({__name:"GridContainer",props:{maxWidth:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"100%"},background:{type:String,required:!1,default:"inherit"},gridGap:{type:String,required:!1,default:"10px"},gridTemplateColumns:{type:String,required:!1,default:"repeat(auto-fit, minmax(250px, 1fr))"},gridTemplateRows:{type:String,required:!1,default:"repeat(0 0px)"},margin:{type:String,required:!1,default:"10px 0 0 0"},customClass:{type:String,required:!1,default:""}},setup(t){return i.useCssVars(e=>({d143e9f0:t.maxWidth,b9d56180:t.width,"52bd0ff4":t.background,"1795aeac":t.gridGap,"0cfa7c52":t.gridTemplateColumns,"0c6d2a1f":t.gridTemplateRows,a3ccd918:t.margin})),(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["grid-block",t.customClass])},[i.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]);var tt=(t=>(t.None="None",t.Next="Next",t.Prev="Prev",t))(tt||{});const dm={class:"container"},um={class:"slide-box"},hm={class:"image"},fm={class:"image-box"},mm=["id","src","alt"],pm={class:"link-number"},gm=["id","onClick"],Ro=x(i.defineComponent({__name:"CarouselImages",props:{events:{type:Array,required:!0},quantity:{type:Number,default:1,required:!1},animationTime:{type:Number,default:500},height:{type:String,default:"360px"},maxHeight:{type:String,default:"360px"},startActiveGroupIndex:{type:Number,default:0}},emits:["openModalWindow"],setup(t){i.useCssVars(p=>({"582c9d05":n}));const e=t,n=`${e.animationTime}ms`,r=i.ref(e.startActiveGroupIndex),s=i.ref(tt.None),o=i.ref(Vs(e.events,e.quantity)),a=i.computed(()=>o.value[r.value]);i.onMounted(()=>{});const c=()=>r.value=r.value+1<o.value.length?r.value+1:0,d=()=>r.value=r.value-1<0?o.value.length-1:r.value-1,u=p=>{s.value=p,setTimeout(()=>s.value=tt.None,e.animationTime)},h=p=>{p!=r.value&&(u(p<r.value?tt.Prev:tt.Next),setTimeout(()=>r.value=p,e.animationTime/2))},f=()=>{u(tt.Next),setTimeout(c,e.animationTime/2)},m=()=>{u(tt.Prev),setTimeout(d,e.animationTime/2)};return(p,k)=>(i.openBlock(),i.createElementBlock("div",{class:"field",style:i.normalizeStyle({height:t.height,maxHeight:t.maxHeight})},[i.createElementVNode("div",dm,[(i.openBlock(),i.createElementBlock("svg",{class:"icon-arrow",onClick:k[0]||(k[0]=i.withModifiers(w=>m(),["stop"]))},k[3]||(k[3]=[i.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)]))),i.createElementVNode("div",um,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(a),(w,b)=>(i.openBlock(),i.createElementBlock("div",{key:b,class:i.normalizeClass({animationnext:i.unref(s)===i.unref(tt).Next,animationprev:i.unref(s)===i.unref(tt).Prev})},[i.createElementVNode("div",hm,[i.createElementVNode("div",fm,[i.createElementVNode("img",{id:w.fileInfo.getImageUrl(),style:i.normalizeStyle({height:`calc(${t.height} - 110px)`,maxHeight:`calc(${t.maxHeight} - 110px)`}),src:w.fileInfo.getImageUrl(),alt:w.fileInfo.originalName,onClick:k[1]||(k[1]=E=>p.showImageInFullScreen())},null,12,mm)])])],2))),128))]),(i.openBlock(),i.createElementBlock("svg",{class:"icon-arrow",onClick:k[2]||(k[2]=i.withModifiers(w=>f(),["stop"]))},k[4]||(k[4]=[i.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])))]),i.createElementVNode("div",pm,[i.createVNode(lr,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o),(w,b)=>(i.openBlock(),i.createElementBlock("div",{id:b.toString(),key:b,class:"number",style:i.normalizeStyle({background:b.toString()===i.unref(r).toString()?"#9D9D9D":""}),onClick:i.withModifiers(E=>h(b),["stop"])},i.toDisplayString(b+1),13,gm))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),$o=i.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(n.x),o=i.ref(n.y),a=i.computed(()=>s.value+"px"),c=i.computed(()=>o.value+"px"),d=()=>{r("close")};return(u,h)=>{const f=i.resolveDirective("click-outside");return i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:"context-window",style:i.normalizeStyle({left:i.unref(a),top:i.unref(c)})},[i.renderSlot(u.$slots,"default")],4)),[[f,d]])}}}),ym={class:"date-range"},Io=x(i.defineComponent({__name:"DateInputRange",props:{start:{type:Date,default:void 0},end:{type:Date,default:void 0}},emits:["update:start","update:end","setStart","setEnd"],setup(t,{emit:e}){const n=t,r=e;i.watch(()=>[n.start,n.end],()=>{n.start||(s.value=void 0),n.end||(o.value=void 0)});const s=i.ref(n.start),o=i.ref(n.end),a=d=>{s.value=d,!(!n.end||d>n.end)&&(r("update:start",d),r("setStart",d))},c=d=>{o.value=d,!(!n.start||d<n.start)&&(r("update:end",d),r("setEnd",d))};return(d,u)=>{const h=i.resolveComponent("PInputDate");return i.openBlock(),i.createElementBlock("div",ym,[i.createVNode(h,{"model-value":i.unref(s),"onUpdate:modelValue":u[0]||(u[0]=f=>i.isRef(s)?s.value=f:null),onChange:a},null,8,["model-value"]),u[2]||(u[2]=i.createTextVNode(" - ",-1)),i.createVNode(h,{"model-value":i.unref(o),"onUpdate:modelValue":u[1]||(u[1]=f=>i.isRef(o)?o.value=f:null),onChange:c},null,8,["model-value"])])}}}),[["__scopeId","data-v-b93b6d46"]]),wm=i.defineComponent({name:"DateInputRangeV2"}),bm={class:"date-range"};function Cm(t,e,n,r,s,o){return i.openBlock(),i.createElementBlock("div",bm,[i.renderSlot(t.$slots,"default",{},void 0,!0)])}const No=x(wm,[["render",Cm],["__scopeId","data-v-d28c6f33"]]),Sm={class:"drop-item"},km={key:0,class:"drop-item-list"},Ao=x(i.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(t){const e=t,n=i.ref(e.rolledUp),r=async()=>{n.value=!n.value};return(s,o)=>{const a=i.resolveComponent("PString"),c=i.resolveComponent("IconArrowDrop");return i.openBlock(),i.createElementBlock("div",Sm,[i.createElementVNode("div",{class:"drop-item-name",onClick:o[0]||(o[0]=d=>r())},[i.createVNode(a,{"font-size":"13px","font-weight":"600",string:t.name,"justify-content":"left",width:"auto",margin:"0 5px 0 0",padding:"6px 0",color:"inherit"},null,8,["string"]),i.createElementVNode("div",{style:i.normalizeStyle({transform:i.unref(n)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[i.createVNode(c,{size:"10px",margin:"0"})],4)]),i.unref(n)?(i.openBlock(),i.createElementBlock("div",km,[i.renderSlot(s.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),Po=x(i.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Bi,required:!0}},emits:["load"],setup(t,{emit:e}){const n=t,r=i.ref(!1),s=e,o=()=>{n.model.setBoolean(r.value),r.value?$.F.FTSP.Get().setF(n.model):$.F.FTSP.Get().removeF(n.model),s("load")};return(a,c)=>{const d=i.resolveComponent("PCheckBox");return i.openBlock(),i.createBlock(d,{modelValue:i.unref(r),"onUpdate:modelValue":c[0]||(c[0]=u=>i.isRef(r)?r.value=u:null),label:t.model.label,size:"mini",onChange:o},null,8,["modelValue","label"])}}}),[["__scopeId","data-v-72984c94"]]),zo=x(i.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(t,{emit:e}){const n=e,r=i.ref(void 0),s=async a=>{Ke.Get().replaceF(a,r.value),r.value=a,Ke.Get().p.drop()},o=async a=>{await s(a),n("load")};return(a,c)=>{const d=i.resolveComponent("PString"),u=i.resolveComponent("PButton"),h=i.resolveComponent("GridContainer"),f=i.resolveComponent("InfoItem");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(d,{string:t.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),i.createVNode(f,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:i.withCtx(()=>c[0]||(c[0]=[])),default:i.withCtx(()=>[i.createVNode(h,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.models,(m,p)=>(i.openBlock(),i.createBlock(u,{key:p,color:"blue",height:"auto",text:m.label,"is-toggle":m.valueEq(i.unref(r)),"toggle-mode":!0,inverse:t.inverse,onClick:k=>o(m.valueEq(i.unref(r))?void 0:m)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-586481ea"]]),Em=["value","label"],To=x(i.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(t,{emit:e}){const n=e,r=Ke.Get(),s=i.ref(void 0),o=async c=>{r.replaceF(c,s.value),s.value=c},a=async c=>{c?await o(s.value):await o(void 0),n("load")};return(c,d)=>{const u=i.resolveComponent("PSelect");return i.openBlock(),i.createBlock(u,{modelValue:i.unref(s),"onUpdate:modelValue":d[0]||(d[0]=h=>i.isRef(s)?s.value=h:null),clearable:i.unref(s),placeholder:t.defaultLabel,onChange:a},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.models,(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,value:h,label:h.label},null,8,Em))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-ae66df57"]]),Vo=x(i.defineComponent({__name:"FTSPPanel",setup(t){return i.onBeforeMount(async()=>{}),(e,n)=>(i.openBlock(),i.createElementBlock("div"))}}),[["__scopeId","data-v-e280d85b"]]),Oo=x(i.defineComponent({__name:"GeneralItem",props:{background:{type:String,required:!1,default:"#ffffff"},height:{type:String,required:!1,default:"40px"},width:{type:String,required:!1,default:"auto"},ready:{type:String,required:!1,default:"0%"},padding:{type:String,required:!1,default:"10px"},borderColor:{type:String,required:!1,default:"#343D5C"},margin:{type:String,required:!1,default:"5px"},scale:{type:Boolean,required:!1,default:!0},fontSize:{type:String,required:!1,default:"14px"},withIcon:{type:Boolean,required:!1,default:!1}},setup(t){const e=i.ref(!1);return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:"general-block-item",style:i.normalizeStyle({background:t.background,height:t.height,width:t.width,borderColor:t.borderColor,padding:t.padding,margin:t.margin,transform:t.scale&&i.unref(e)?"scale(1.03, 1.03)":""}),onMouseenter:r[0]||(r[0]=s=>e.value=!0),onMouseleave:r[1]||(r[1]=s=>e.value=!1)},[i.createElementVNode("div",{class:"green",style:i.normalizeStyle({width:`${t.ready}`})},null,4),i.createElementVNode("div",{class:"general-block-item-title",style:i.normalizeStyle({fontSize:t.fontSize})},[i.renderSlot(n.$slots,"general-item",{},void 0,!0)],4),i.createElementVNode("div",{class:"tools-icon",style:i.normalizeStyle({display:t.withIcon?"flex":"none"})},r[2]||(r[2]=[i.createElementVNode("svg",{class:"icon-del"},[i.createElementVNode("use",{"xlink:href":"#del"})],-1)]),4),r[3]||(r[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[i.createElementVNode("path",{d:"M2.91797 8.75C2.6888 8.75 2.49255 8.66833 2.32922 8.505C2.16589 8.34167 2.08436 8.14556 2.08464 7.91667V2.5H1.66797V1.66667H3.7513V1.25H6.2513V1.66667H8.33464V2.5H7.91797V7.91667C7.91797 8.14583 7.8363 8.34208 7.67297 8.50542C7.50964 8.66875 7.31352 8.75028 7.08464 8.75H2.91797ZM7.08464 2.5H2.91797V7.91667H7.08464V2.5ZM3.7513 7.08333H4.58464V3.33333H3.7513V7.08333ZM5.41797 7.08333H6.2513V3.33333H5.41797V7.08333Z"})])],-1))],36))}}),[["__scopeId","data-v-1056443d"]]),xm={key:0,class:"blur"},vm={style:{display:"flex","justify-content":"center"}},Fo=x(i.defineComponent({__name:"InfoItem",props:{background:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:""},openWidth:{type:String,required:!1,default:"auto"},openHeight:{type:String,required:!1,default:"auto"},maxWidth:{type:String,required:!1,default:""},minWidth:{type:String,required:!1,default:""},margin:{type:String,required:!1,default:""},height:{type:String,required:!1,default:""},withOpenWindow:{type:Boolean,required:!1,default:!0},colorSelected:{type:String,required:!1,default:"#1979CF"},borderColor:{type:String,required:!1,default:"#E3E3E3"},withHover:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},customClass:{type:String,required:!1,default:""},close:{type:Boolean,required:!1,default:!0},baseBoxMargin:{type:String,required:!1,default:""},closeWindowOverflow:{type:String,required:!1,default:""},showSaveDialog:{type:Boolean,required:!1,default:!1}},emits:["click","keyup-enter","after-close"],setup(t,{emit:e}){const n=t,r=e,s=n.customClass!==""?n.customClass:"inside-class",o=i.ref(!1),a=i.ref(!1),c=i.ref(!1),d=i.ref(n.close);i.watch(()=>n.close,()=>{a.value=!1});const u=v=>{v.stopPropagation(),v.key==="Escape"&&(n.showSaveDialog?c.value=!0:a.value=!1)};i.watch(a,async()=>{var v,U;await i.nextTick(),a.value?((U=(v=document.getElementById("info-item-opened-content"))==null?void 0:v.querySelector("input"))==null||U.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&r("after-close")});const h=()=>{r("click"),a.value=!!n.withOpenWindow,d.value!==n.close&&(a.value=!1,d.value=!d.value)},f=i.computed(()=>n.customClass===""?{width:n.width,minHeight:"40px",height:"auto",maxWidth:n.maxWidth,minWidth:n.minWidth,margin:n.baseBoxMargin}:void 0),m=i.computed(()=>a.value&&n.withOpenWindow),p=i.computed(()=>({background:n.background?n.background:void 0,zIndex:m.value?"2":"0",padding:m.value?"0":n.padding,margin:n.margin,width:m.value?n.openWidth:n.width,height:m.value?n.openHeight:n.height,minHeight:"40px",maxWidth:n.maxWidth,minWidth:n.minWidth,borderColor:o.value||a.value?n.colorSelected:n.borderColor,color:o.value?n.colorSelected:"#343E5C",boxShadow:o.value||a.value?`0px 0px 1px 1px ${n.colorSelected}`:"none",alignItems:m.value?"end":"center",cursor:(n.withHover,"pointer")})),k=i.computed(()=>({height:m.value?"0":"",overflow:n.closeWindowOverflow,width:n.width})),w=i.computed(()=>({height:m.value?"auto":"0"})),b=i.computed(()=>({color:o.value?n.colorSelected:"#343E5C",fill:o.value?n.colorSelected:"#343E5C",background:n.background})),E=()=>{n.showSaveDialog?c.value=!0:a.value=!1},F=async()=>{await r("keyup-enter"),n.close&&(a.value=!1),c.value=!1},A=()=>{a.value=!1,c.value=!1};return(v,U)=>{const Fe=i.resolveComponent("PString"),Ze=i.resolveComponent("PButton"),Bt=i.resolveComponent("PModal"),Xt=i.resolveDirective("click-outside");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(a)?(i.openBlock(),i.createElementBlock("div",xm)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"base-box",style:i.normalizeStyle(i.unref(f)),onClick:U[2]||(U[2]=i.withModifiers(Be=>h(),["prevent","stop"]))},[i.createElementVNode("div",{class:i.normalizeClass(["body",i.unref(s)]),style:i.normalizeStyle(i.unref(p)),onMouseenter:U[0]||(U[0]=Be=>t.withHover?o.value=!0:o.value=!1),onMouseleave:U[1]||(U[1]=Be=>o.value=!1)},[i.unref(a)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["close-window",t.customClass]),style:i.normalizeStyle(i.unref(k))},[i.renderSlot(v.$slots,"default",{},void 0,!0)],6)),i.unref(a)?i.withDirectives((i.openBlock(),i.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:i.normalizeStyle(i.unref(w))},[i.renderSlot(v.$slots,"open-inside-content",{},void 0,!0)],4)),[[Xt,E,void 0,{prevent:!0}]]):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"top-title",style:i.normalizeStyle(i.unref(b))},[i.renderSlot(v.$slots,"title",{},()=>[i.createVNode(Fe,{string:t.title,"font-size":"10px",padding:"0 0 0 3px",style:i.normalizeStyle({color:i.unref(o)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),i.createVNode(Bt,{show:i.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:i.withCtx(()=>[i.createElementVNode("div",vm,[i.createVNode(Ze,{text:"Не сохранять",onClick:A}),i.createVNode(Ze,{text:"Сохранять",onClick:F})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-e8e8f1a1"]]),Do=x(i.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(t,{emit:e}){const n=i.ref(!1),r=e,s=o=>{n.value=!n.value,r("select",o)};return(o,a)=>{const c=i.resolveComponent("PString"),d=i.resolveComponent("PButton"),u=i.resolveComponent("InfoItem");return i.openBlock(),i.createBlock(u,{close:i.unref(n),title:t.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.list,h=>(i.openBlock(),i.createBlock(d,{key:h,type:"admin",color:"blue",text:h,onClick:f=>s(h)},null,8,["text","onClick"]))),128)),i.createVNode(d,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=h=>s(void 0))})]),default:i.withCtx(()=>[i.createVNode(c,{string:t.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),Mm={class:"mainblock"},Bm={class:"mainline"},Lo=x(i.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",Mm,[i.createElementVNode("div",Bm,[i.createElementVNode("div",{class:"mainblock-left",style:i.normalizeStyle({minWidth:t.leftWidth,maxWidth:t.leftWidth,background:t.background,display:t.leftWidth!=="0px"?"block":"none"})},[i.renderSlot(e.$slots,"left",{},void 0,!0)],4),i.createElementVNode("div",{class:"mainblock-right",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),Rm={class:"message-title"},$m=["innerHTML"],cr=x(i.defineComponent({__name:"MessageBody",props:{title:{type:String,default:"",required:!1},text:{type:String,default:"",required:!1}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",Rm,i.toDisplayString(t.title),1),i.createElementVNode("div",{class:"message-text",innerHTML:t.text},null,8,$m)]))}}),[["__scopeId","data-v-4e49e31b"]]),dr=x(i.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#search"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M11 19C12.775 18.9996 14.4988 18.4054 15.897 17.312L20.293 21.708L21.707 20.294L17.311 15.898C18.405 14.4997 18.9996 12.7754 19 11C19 6.589 15.411 3 11 3C6.589 3 3 6.589 3 11C3 15.411 6.589 19 11 19ZM11 5C14.309 5 17 7.691 17 11C17 14.309 14.309 17 11 17C7.691 17 5 14.309 5 11C5 7.691 7.691 5 11 5Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-64e76eb7"]]),Im={class:"search-list"},Nm=["onClick"],ur=x(i.defineComponent({inheritAttrs:!1,__name:"PAutocomplete",props:{modelValue:{type:String,default:""},searchFunc:{type:Function,default:()=>{}},suggestions:{type:Array,default:[]},width:{type:[Number,String],default:""},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"var(--box-shadow)"}},emits:["select","input"],setup(t,{emit:e}){const n=e,r=t,s=i.ref(r.modelValue),o=i.ref([]);async function a(){n("input",s.value),await c()}async function c(){r.searchFunc&&(o.value=await r.searchFunc(s.value))}async function d(u){s.value="",n("select",u)}return(u,h)=>(i.openBlock(),i.createElementBlock("div",{class:"container",style:i.normalizeStyle({width:t.width})},[i.createVNode(ti,{modelValue:i.unref(s),"onUpdate:modelValue":h[0]||(h[0]=f=>i.isRef(s)?s.value=f:null),placeholder:"Найти",onInput:a},{right:i.withCtx(()=>[i.createVNode(dr,{size:"24px"})]),_:1},8,["modelValue"]),i.unref(s)&&i.unref(s).length>=2?(i.openBlock(),i.createElementBlock("div",{key:0,class:"result",style:i.normalizeStyle({maxHeight:t.maxHeightResultList,zIndex:t.zIndexResultList,boxShadow:t.boxShadowResultList})},[i.createElementVNode("ul",Im,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(o),f=>(i.openBlock(),i.createElementBlock("li",{key:f.value,onClick:m=>d(f)},i.toDisplayString(f.label),9,Nm))),128))])],4)):i.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),Am={class:"footer"},Ho=x(i.defineComponent({__name:"PDialog",setup(t){const e=i.computed(()=>{switch(et.GetType()){case"info":return"message primary";case"success":return"message success";case"warning":return"message warning";case"error":return"message danger";default:return"message neutral"}});return(n,r)=>{const s=i.resolveComponent("MessageBody"),o=i.resolveComponent("PButton");return i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[i.unref(et).IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(s,{title:i.unref(et).GetTitle(),text:i.unref(et).GetText()},null,8,["title","text"]),i.createElementVNode("div",Am,[i.createVNode(o,{type:"primary",text:i.unref(et).GetConfirmButtonText(),margin:"10px 0 0 0",onClick:r[0]||(r[0]=a=>i.unref(et).Submit())},null,8,["text"]),i.createVNode(o,{type:"warning",text:i.unref(et).GetCancelButtonText(),margin:"10px 0 0 0",onClick:r[1]||(r[1]=a=>i.unref(et).Cancel())},null,8,["text"])])],2)):i.createCommentVNode("",!0)]),_:1})}}}),[["__scopeId","data-v-aa85ea7a"]]),qo=x(i.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=i.useModel(t,"modelValue"),n=async()=>{};return(r,s)=>{const o=i.resolveComponent("PInput");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(o,{modelValue:e.value.number,"onUpdate:modelValue":s[0]||(s[0]=a=>e.value.number=a),onBlur:n},null,8,["modelValue"]),i.createVNode(o,{modelValue:e.value.description,"onUpdate:modelValue":s[1]||(s[1]=a=>e.value.description=a),onBlur:n},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-51bf3f08"]]),Pm={};function zm(t,e){return i.openBlock(),i.createElementBlock(i.Fragment,null,[e[0]||(e[0]=i.createElementVNode("div",{class:"blur"},null,-1)),e[1]||(e[1]=i.createElementVNode("div",{class:"loader-container"},[i.createElementVNode("div",{class:"loader",style:{"--b":"20px",width:"200px","--n":"10"}})],-1))],64)}const _o=x(Pm,[["render",zm],["__scopeId","data-v-0f1f2f84"]]),Tm={style:{display:"flex","justify-content":"center",width:"100%"}},Vm={class:"pag-number"},Om={class:"pag-ul"},Fm={key:2},Uo=x(i.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},emits:["cancel","save"],setup(t,{emit:e}){const n=t,r=m=>m?"active":"neutral",s=m=>m?"not-active":"neutral",o=i.ref(Os),a=i.ref(!1),c=i.ref(!1);o.value.count=n.store.Count.value,i.watch(n.store.Count,()=>{o.value.count=n.store.Count.value});const d=async m=>{if(m!==o.value.curPage&&(m<1&&(m=1),m>o.value.pagesCount()&&(m=o.value.pagesCount()),!n.showConfirm))return await u(m)},u=async(m,p)=>{o.value.setCurPage(m),Ke.Get().p.offset=(m-1)*o.value.limit,await n.store.FTSP(),f()},h=i.computed(()=>{const m=o.value.pagesCount();return m<8?Qe.GenerateNumsRange(2,m-1).filter(p=>p<m&&p>1):Qe.GenerateNumsRange(o.value.curPage-2,o.value.curPage+3).filter(p=>p<m&&p>1)}),f=()=>{const m=document.querySelector(".el-table__body-wrapper"),p=document.querySelector("#list");m?m.scrollTo({top:0}):p&&p.scrollTo({top:0})};return i.onBeforeUnmount(()=>{Ke.Get().p.drop()}),(m,p)=>{const k=i.resolveComponent("ArrowLeft"),w=i.resolveComponent("PButton"),b=i.resolveComponent("DoubleArrowLeft"),E=i.resolveComponent("EllipsisSvg"),F=i.resolveComponent("DoubleArrowRight"),A=i.resolveComponent("ArrowRight");return i.openBlock(),i.createElementBlock("div",Tm,[i.createElementVNode("div",{class:"pag-container",style:i.normalizeStyle({justifyContent:t.justifyContent})},[i.createElementVNode("div",Vm,[i.createVNode(w,{skin:"pag",type:s(i.unref(o).curPage===1),onClick:p[0]||(p[0]=v=>d(i.unref(o).curPage-1))},{default:i.withCtx(()=>[i.createVNode(k)]),_:1},8,["type"]),i.createElementVNode("ul",Om,[i.createElementVNode("li",null,[i.createVNode(w,{skin:"pag",type:r(i.unref(o).curPage===1),text:"1",onClick:p[1]||(p[1]=v=>d(1))},null,8,["type"])]),i.unref(o).pagesCount()>8&&i.unref(o).curPage>4?(i.openBlock(),i.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=v=>a.value=!0),onMouseleave:p[4]||(p[4]=v=>a.value=!1)},[i.createVNode(w,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=v=>d(i.unref(o).curPage-5))},{default:i.withCtx(()=>[i.unref(a)?(i.openBlock(),i.createBlock(b,{key:0})):(i.openBlock(),i.createBlock(E,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(h),v=>(i.openBlock(),i.createElementBlock("li",{key:v},[i.createVNode(w,{skin:"pag",type:r(v===i.unref(o).curPage),text:v,onClick:U=>d(v)},null,8,["type","text","onClick"])]))),128)),i.unref(o).pagesCount()>=8&&i.unref(o).curPage<i.unref(o).pagesCount()-3?(i.openBlock(),i.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=v=>c.value=!0),onMouseleave:p[7]||(p[7]=v=>c.value=!1)},[i.createVNode(w,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=v=>d(i.unref(o).curPage+5))},{default:i.withCtx(()=>[i.unref(c)?(i.openBlock(),i.createBlock(F,{key:0})):(i.openBlock(),i.createBlock(E,{key:1}))]),_:1})],32)):i.createCommentVNode("",!0),i.unref(o).pagesCount()>1?(i.openBlock(),i.createElementBlock("li",Fm,[i.createVNode(w,{skin:"pag",type:r(i.unref(o).pagesCount()===i.unref(o).curPage),text:i.unref(o).pagesCount(),onClick:p[8]||(p[8]=v=>d(i.unref(o).pagesCount()))},null,8,["type","text"])])):i.createCommentVNode("",!0)]),i.createVNode(w,{skin:"pag",type:s(i.unref(o).curPage===i.unref(o).pagesCount()),onClick:p[9]||(p[9]=v=>d(i.unref(o).curPage+1))},{default:i.withCtx(()=>[i.createVNode(A)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-46fc3033"]]),jo=x(i.defineComponent({__name:"RemoteSearch",props:{keyValue:{type:String,default:""},modelValue:{type:String,default:""},storeModule:{type:String,default:""},placeholder:{type:String,default:"Начните вводить запрос"},showSuggestions:{type:Boolean,default:!0},width:{type:[Number,String],default:"var(--input-width-default, 100%)"},focus:{type:Boolean,default:!1},maxHeightResultList:{type:String,default:"200px"},zIndexResultList:{type:String,default:"10"},boxShadowResultList:{type:String,default:"rgba(0, 0, 0, 0.35) 0px 5px 5px"}},emits:["select","load","input"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(n.modelValue),o=i.ref();let a=Ji.SearchModel();i.watch(()=>n.focus,()=>{n.focus&&setTimeout(()=>{o.value.focus(),s.value=""},500)});const c=async h=>{if(h.length<2)return;o.value.activated=!0,a=Ji.SearchModel(),a.searchObjects=[],a.query=h,a.key=n.keyValue;const f=a.searchGroups.find(m=>m.key===n.keyValue);return f&&(a.searchGroup=f),await Us.Search.Search(a),a.searchObjects},d=async h=>{r("select",h),s.value=""},u=h=>{r("input",h),h.length===0&&r("input","")};return(h,f)=>(i.openBlock(),i.createBlock(ur,{ref_key:"searchForm",ref:o,modelValue:i.unref(s),"onUpdate:modelValue":f[0]||(f[0]=m=>i.isRef(s)?s.value=m:null),maxHeightResultList:t.maxHeightResultList,zIndexResultList:t.zIndexResultList,boxShadowResultList:t.boxShadowResultList,width:t.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:t.placeholder,"search-func":c,"trigger-on-focus":t.showSuggestions,suggestions:i.unref(a).searchObjects,onSelect:d,onInput:u},null,8,["modelValue","maxHeightResultList","zIndexResultList","boxShadowResultList","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-acf1a4c6"]]),Dm={class:"mainblock-body"},Lm={class:"mainblock-footer"},Wo=x(i.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({background:t.background,padding:t.padding})},[i.createElementVNode("div",{class:"mainblock-header",style:i.normalizeStyle({background:t.background})},[i.renderSlot(e.$slots,"header",{},void 0,!0)],4),i.createElementVNode("div",Dm,[i.renderSlot(e.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",Lm,[i.renderSlot(e.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),Hm={class:"right-slider-content"},qm={class:"right-slider-content-header"},_m={class:"right-slider-content-box"},Um={class:"right-slider-button"},Go=x(i.defineComponent({__name:"RightSliderContainer",props:{sliderOffWidth:{type:String,required:!1,default:"30px"},sliderOnWidth:{type:String,required:!1,default:"260px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1},titleOpen:{type:String,required:!1,default:"Скрыть список исследований"},titleClose:{type:String,required:!1,default:"Показать список исследований"}},emits:["toggle"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(!1);i.watch(()=>n.toggle,()=>{s.value=!s.value});const o=a=>{s.value=!s.value,r("toggle",a)};return(a,c)=>{const d=i.resolveComponent("PString");return i.openBlock(),i.createElementBlock("div",{class:"right-slider",style:i.normalizeStyle({marginRight:i.unref(s)?`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`:"0",width:t.sliderOnWidth})},[i.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>o(!i.unref(s)))},[i.unref(s)?(i.openBlock(),i.createBlock(d,{key:0,string:t.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):i.createCommentVNode("",!0),i.unref(s)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(d,{key:1,string:t.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),i.createElementVNode("div",Hm,[i.createElementVNode("div",qm,[i.renderSlot(a.$slots,"header",{},void 0,!0)]),i.createElementVNode("div",_m,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",Um,[i.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),jm={class:"mainblock"},Wm={class:"body-block"},Gm={class:"tab-block"},Zo=x(i.defineComponent({__name:"RightTabsContainer",props:{sliderOffWidth:{type:String,required:!1,default:"101px"},sliderOnWidth:{type:String,required:!1,default:"332px"},background:{type:String,required:!1,default:"inherit"},isToggle:{type:Boolean,required:!1,default:!1},mobileWidth:{type:String,required:!1,default:"768px"}},emits:["toggle"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(!1),o=i.ref(window.matchMedia("(max-width: 768px)").matches),a=d=>{r("toggle",d)},c=i.ref(!1);return i.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(n.mobileWidth){case"1330px":return o.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return o.value=window.matchMedia("(max-width: 1215px)").matches;case"1024px":return o.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return o.value=window.matchMedia("(max-width: 768px)").matches}return o.value=window.matchMedia("(max-width: 1330px)").matches}),s.value=!0}),(d,u)=>(i.openBlock(),i.createElementBlock("div",jm,[i.createElementVNode("div",{class:"slider-block",style:i.normalizeStyle({marginRight:i.unref(o)?t.isToggle?"49px":`calc(49px - ${t.sliderOnWidth})`:t.isToggle?t.sliderOffWidth:`calc(${t.sliderOffWidth} - ${t.sliderOnWidth})`,width:t.sliderOnWidth,minHeight:t.sliderOffWidth,height:t.isToggle?"auto":"100px"})},[i.createElementVNode("div",{class:"slider-icon",style:i.normalizeStyle({border:t.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:t.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=h=>a(!t.isToggle)),onMouseenter:u[1]||(u[1]=h=>c.value=!0),onMouseleave:u[2]||(u[2]=h=>c.value=!1)},[i.createElementVNode("div",{class:"icon-block",style:i.normalizeStyle({transform:i.unref(c)?t.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":t.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:t.isToggle?"#379FFF":"#00B5A4"})},[i.renderSlot(d.$slots,"icon",{},void 0,!0)],4)],36),i.createElementVNode("div",{class:"slider-info",style:i.normalizeStyle({width:`calc(${t.sliderOnWidth} - ${t.sliderOffWidth})`})},[i.renderSlot(d.$slots,"slider-body",{},void 0,!0)],4)],4),i.createElementVNode("div",Wm,[i.renderSlot(d.$slots,"body",{},void 0,!0)]),i.createElementVNode("div",Gm,[i.renderSlot(d.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),Zm=["label","value"],Xo=x(i.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(t,{emit:e}){const n={[we.String]:"Текстовый ответ",[we.Text]:"Развёрнутый текстовый ответ",[we.Number]:"Числовой ответ",[we.Date]:"Ответ в виде даты",[we.Radio]:"Выбор одного из вариантов",[we.Set]:"Выбор нескольких вариантов",[we.File]:"Ответ в виде файла",[we.MatrixRadio]:"Матрица с одним выбором",[we.MatrixSet]:"Матрица с несколькими выборами"},r=e,s=o=>{r("select",o)};return(o,a)=>{const c=i.resolveComponent("PString"),d=i.resolveComponent("PSelect");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),i.createVNode(d,{"model-value":t.selectedType,placeholder:"Вид ответа",onChange:s},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,(u,h)=>i.createElementVNode("option",{key:u,label:u,value:h},null,8,Zm)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),Xm=["label","value"],Jo=x(i.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=i.ref(!1),r=e,s=i.ref();i.onBeforeMount(()=>{n.value=!0,s.value=St.GetDefault()});const o=async c=>{s.value=c??St.GetDefault(),r("load")},a=async c=>{await o(c)};return(c,d)=>{var h;const u=i.resolveComponent("PSelect");return i.unref(n)?(i.openBlock(),i.createBlock(u,{key:0,modelValue:i.unref(s),"onUpdate:modelValue":d[0]||(d[0]=f=>i.isRef(s)?s.value=f:null),"popper-append-to-body":!1,clearable:!((h=i.unref(s))!=null&&h.default),"value-key":"label",onChange:a,onClear:d[1]||(d[1]=f=>a())},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(St).Get(),(f,m)=>(i.openBlock(),i.createElementBlock("option",{key:m,label:f.label,value:f},null,8,Xm))),128))]),_:1},8,["modelValue","clearable"])):i.createCommentVNode("",!0)}}}),[["__scopeId","data-v-982338b4"]]),Jm=["label","value"],Yo=x(i.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(t,{emit:e}){const n=e,r=i.ref();i.onBeforeMount(()=>{r.value=St.GetDefault()});const s=async a=>{a||(r.value=St.GetDefault()),Ke.Get().setSortModel(r.value),Ke.Get().p.drop(),n("load")},o=async a=>{await s(a)};return(a,c)=>{var u;const d=i.resolveComponent("PSelect");return i.openBlock(),i.createBlock(d,{modelValue:i.unref(r),"onUpdate:modelValue":c[0]||(c[0]=h=>i.isRef(r)?r.value=h:null),"popper-append-to-body":!1,clearable:!((u=i.unref(r))!=null&&u.default),"value-key":"label",onChange:o},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(St).Get(),(h,f)=>(i.openBlock(),i.createElementBlock("option",{key:f,label:h.label,value:h},null,8,Jm))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-80f413ec"]]),Ym={class:"switch-container"},Qm={class:"line"},Km={class:"line"},Qo=x(i.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(t,{emit:e}){const n=t,r={background:"inherit",border:"1px solid #c4c4c4"},s=()=>n.firstModel.valueEq(u.value)?void 0:r,o=()=>u.value?r:void 0,a=()=>n.secondModel.valueEq(u.value)?void 0:r,c=f=>{var p;return{color:(p=u.value)!=null&&p.valueEq(f)?"#006bb4":"#B0A4C0"}},d=e,u=i.ref(void 0),h=async f=>{var m;(m=u.value)!=null&&m.valueEq(f)||(u.value=f,d("load"))};return(f,m)=>{const p=i.resolveComponent("PString");return i.openBlock(),i.createElementBlock("div",Ym,[i.createElementVNode("div",Qm,[i.createVNode(p,{string:t.firstModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.firstModel)),onClick:m[0]||(m[0]=k=>h(t.firstModel))},null,8,["string","style"]),i.createVNode(p,{string:"Все","font-size":"12px",padding:"0",style:i.normalizeStyle(c()),onClick:m[1]||(m[1]=k=>h())},null,8,["style"]),i.createVNode(p,{string:t.secondModel.label,"font-size":"12px",padding:"0",style:i.normalizeStyle(c(t.secondModel)),onClick:m[2]||(m[2]=k=>h(t.secondModel))},null,8,["string","style"])]),i.createElementVNode("div",Km,[i.createElementVNode("div",{class:i.normalizeClass(["switch-knob1",{active:t.firstModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(s()),onClick:m[3]||(m[3]=k=>h(t.firstModel))},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob2",{active:!i.unref(u)}]),style:i.normalizeStyle(o()),onClick:m[4]||(m[4]=k=>h())},null,6),i.createElementVNode("div",{class:i.normalizeClass(["switch-knob3",{active:t.secondModel.valueEq(i.unref(u))}]),style:i.normalizeStyle(a()),onClick:m[5]||(m[5]=k=>h(t.secondModel))},null,6),m[6]||(m[6]=i.createElementVNode("div",{class:"switch-axis"},null,-1)),m[7]||(m[7]=i.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),m[8]||(m[8]=i.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),m[9]||(m[9]=i.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),ep={},tp={class:"flex"};function np(t,e){return i.openBlock(),i.createElementBlock("div",tp,[i.renderSlot(t.$slots,"default",{},void 0,!0)])}const Ko=x(ep,[["render",np],["__scopeId","data-v-5023d414"]]),ea=x(i.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=i.ref(!1),r=e,s=async()=>{r("submit"),n.value=!n.value};return(o,a)=>{const c=i.resolveComponent("PString"),d=i.resolveComponent("PButton"),u=i.resolveComponent("GridContainer"),h=i.resolveComponent("InfoItem");return i.openBlock(),i.createBlock(h,{title:t.title,icon:"edit-title","with-hover":!0,close:i.unref(n),width:"100%",onKeyupEnter:s},{"open-inside-content":i.withCtx(()=>[i.createVNode(u,{"custom-class":"grid"},{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default",{},void 0,!0),i.createVNode(d,{type:"admin",color:"blue",text:"Сохранить",onClick:s})]),_:3})]),default:i.withCtx(()=>[t.content.length>0?(i.openBlock(),i.createBlock(c,{key:0,string:t.content},null,8,["string"])):(i.openBlock(),i.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-0794596f"]]),ip={class:"top-slider-content"},rp={class:"center"},ta=x(i.defineComponent({__name:"TopSliderContainer",props:{sliderOffHeight:{type:String,required:!1,default:"53px"},sliderOnHeight:{type:String,required:!1,default:"220px"},background:{type:String,required:!1,default:"inherit"},toggle:{type:Boolean,default:!1}},emits:["toggle"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(!0);i.watch(()=>n.toggle,()=>{s.value=!s.value});const o=a=>{s.value=!s.value,r("toggle",a)};return(a,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.unref(s)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=i.withModifiers(d=>s.value=!0,["prevent"])),c[1]||(c[1]=i.withModifiers(()=>{},["stop"]))]})),i.createElementVNode("div",{class:"top-slider",style:i.normalizeStyle({marginTop:i.unref(s)?`calc(${t.sliderOffHeight} - ${t.sliderOnHeight})`:"0",height:t.sliderOnHeight}),onClick:c[3]||(c[3]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",ip,[i.createElementVNode("div",rp,[i.renderSlot(a.$slots,"default",{},void 0,!0)])]),i.createElementVNode("div",{class:"click-line",style:i.normalizeStyle({height:t.sliderOffHeight}),onClick:c[2]||(c[2]=d=>o(!i.unref(s)))},[i.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function na(t){t.component("PageNotFound",Ui),t.component("AdaptiveContainer",Mo),t.component("AdaptiveContainerHorizontal",Bo),t.component("CarouselImages",Ro),t.component("ContextWindow",$o),t.component("DateInputRangeV2",No),t.component("DateInputRange",Io),t.component("DropList",Ao),t.component("FilterCheckbox",Po),t.component("FiltersButtonsSelect",zo),t.component("FilterSelect",To),t.component("FTSPPanel",Vo),t.component("GeneralItem",Oo),t.component("GridContainer",lr),t.component("InfoItem",Fo),t.component("InfoItemSelectButtons",Do),t.component("LeftRightContainer",Lo),t.component("MessageBody",cr),t.component("PAutocomplete",ur),t.component("PDialog",Ho),t.component("PhoneForm",qo),t.component("PLoader",_o),t.component("PPagination",Uo),t.component("RemoteSearch",jo),t.component("ResearcheContainer",Wo),t.component("RightSliderContainer",Go),t.component("RightTabsContainer",Zo),t.component("SelectValueType",Xo),t.component("SortList",Jo),t.component("SortSelect",Yo),t.component("Switch3Pos",Qo),t.component("ThemeWrapper",Ko),t.component("ToggleInfoItem",ea),t.component("TopSliderContainer",ta)}const sp=Object.freeze(Object.defineProperty({__proto__:null,AdaptiveContainer:Mo,AdaptiveContainerHorizontal:Bo,CarouselImages:Ro,ContextWindow:$o,DateInputRange:Io,DateInputRange_v2:No,DropList:Ao,FTSPPanel:Vo,FilterCheckbox:Po,FilterSelect:To,FiltersButtonsSelect:zo,GeneralItem:Oo,GridContainer:lr,InfoItem:Fo,InfoItemSelectButtons:Do,LeftRightContainer:Lo,MessageBody:cr,PAutocomplete:ur,PDialog:Ho,PLoader:_o,PPagination:Uo,PageNotFound:Ui,PhoneForm:qo,RemoteSearch:jo,ResearcheContainer:Wo,RightSliderContainer:Go,RightTabsContainer:Zo,SelectValueType:Xo,SortList:Jo,SortSelect:Yo,Switch3Pos:Qo,ThemeWrapper:Ko,ToggleInfoItem:ea,TopSliderContainer:ta,default:na},Symbol.toStringTag,{value:"Module"})),ia=x(i.defineComponent({__name:"IconDownload",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:r[0]||(r[0]=s=>e.value=!0),onMouseleave:r[1]||(r[1]=s=>e.value=!1)},r[2]||(r[2]=[i.createElementVNode("use",{"xlink:href":"#download"},null,-1)]),38)),r[3]||(r[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M15.6443 5.06141C15.0797 5.29331 15.0998 5.06141 15.0998 12.1393C15.0998 15.7388 15.0696 18.6728 15.0293 18.6728C14.9889 18.6728 14.1521 17.8763 13.1842 16.9083C11.6819 15.4061 11.3592 15.1338 11.0467 15.0733C10.724 15.0229 10.6333 15.0632 10.3611 15.3254C10.1292 15.5573 10.0586 15.7186 10.0586 16.0211C10.0586 16.3941 10.1594 16.5151 12.8615 19.2071C15.4326 21.7681 15.6947 22 16.0073 22C16.3198 22 16.582 21.7681 19.153 19.2071C21.9156 16.4546 21.9559 16.4042 21.9559 15.9908C21.9559 15.4867 21.6535 15.1641 21.109 15.0733C20.736 15.0128 20.7259 15.0229 18.8808 16.868C17.0357 18.6929 17.0155 18.7131 17.0155 18.3703C17.0054 18.1787 16.9953 15.2145 16.9853 11.7965L16.9651 5.56554L16.713 5.31348C16.4307 5.03117 15.9669 4.92026 15.6443 5.06141Z"}),i.createElementVNode("path",{d:"M5.30247 20.3872L5 20.6997L5.04033 22.081C5.07058 23.4321 5.08066 23.4825 5.44363 24.2488C6.09899 25.6099 7.17782 26.5173 8.59945 26.8904C9.47663 27.1122 22.5335 27.1223 23.4006 26.8904C25.044 26.4669 26.3245 25.2671 26.8084 23.7043C26.9496 23.2506 27 22.7868 27 21.8794C27 20.6796 27 20.6695 26.7076 20.3771C26.3144 19.9839 25.901 19.9839 25.4675 20.3771L25.1347 20.6695L25.1045 21.8189C25.0843 22.8776 25.0541 23.0086 24.7516 23.6035C24.3987 24.3093 23.7938 24.8235 23.088 25.0251C22.5839 25.1663 9.4363 25.1663 8.93217 25.0251C8.30706 24.8436 7.64161 24.3093 7.29881 23.7144C7.00642 23.2002 6.98625 23.0691 6.93584 21.9197L6.88543 20.6695L6.5527 20.3771C6.11916 19.9839 5.70577 19.9839 5.30247 20.3872Z"})])],-1))],64))}}),[["__scopeId","data-v-94c18208"]]),ra=x(i.defineComponent({__name:"IconFilter",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:r[0]||(r[0]=s=>e.value=!0),onMouseleave:r[1]||(r[1]=s=>e.value=!1)},r[2]||(r[2]=[i.createElementVNode("use",{"xlink:href":"#filter"},null,-1)]),38)),r[3]||(r[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M8.58216 5.14236C6.22884 5.77558 4.70721 8.02494 5.04745 10.3688C5.61452 14.2627 10.3684 15.8127 13.0714 12.9962C13.6385 12.4103 14.319 11.2194 14.319 10.8225C14.319 10.6902 14.9428 10.6713 20.3771 10.6713H26.4353L26.7094 10.3972C27.0969 10.0097 27.0969 9.44261 26.7094 9.05511L26.4353 8.78103H20.396H14.3662L14.1867 8.23287C13.4589 5.9646 10.8599 4.52803 8.58216 5.14236ZM10.9638 7.21215C13.0525 8.24232 13.0336 11.2194 10.9355 12.2496C10.2172 12.5993 9.20593 12.6276 8.54436 12.2968C6.21939 11.1533 6.43676 7.81702 8.8846 7.01368C9.45166 6.8341 10.3495 6.91916 10.9638 7.21215Z"}),i.createElementVNode("path",{d:"M21.5953 17.6266C21.1133 17.7211 20.2155 18.0519 19.8752 18.2599C18.9868 18.7986 18.0322 20.0083 17.8054 20.8778L17.6826 21.3504H12.3616C6.66257 21.3504 6.63422 21.3504 6.37904 21.8135C6.20892 22.1443 6.26562 22.6452 6.51135 22.9287L6.73818 23.1933L12.1915 23.2406L17.6448 23.2878L17.8621 23.8738C18.4292 25.4427 19.7334 26.6052 21.2929 26.936C22.1057 27.1061 23.3154 27.0021 24.062 26.6997C25.3379 26.1799 26.4059 25.0174 26.8029 23.7037C26.9635 23.165 27.0013 22.8625 26.9635 22.0781C26.9352 21.1991 26.8974 21.0479 26.5855 20.3864C25.8105 18.7513 24.2794 17.7117 22.5499 17.6172C22.1529 17.5983 21.7276 17.6077 21.5953 17.6266ZM23.5517 19.8004C24.081 20.0556 24.5913 20.5754 24.8748 21.1519C24.9977 21.4071 25.045 21.7095 25.045 22.3427C25.045 23.1555 25.0261 23.2311 24.7236 23.7415C23.5611 25.6412 20.8014 25.5656 19.7902 23.5997C19.5066 23.0421 19.4405 22.0119 19.6484 21.3787C20.1682 19.8004 22.0206 19.0537 23.5517 19.8004Z"})])],-1))],64))}}),[["__scopeId","data-v-d11e6069"]]),sa=x(i.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[i.createElementVNode("path",{d:"M13.4323 2.0816C13.3788 2.0909 13.2951 2.12113 13.2462 2.14904C13.1997 2.17462 11.5439 3.85601 9.56715 5.8816C6.70668 8.81648 5.96017 9.59322 5.90436 9.69787C5.84622 9.8095 5.83691 9.85601 5.83691 9.99787C5.83691 10.1397 5.84622 10.1886 5.90436 10.2979C6.00436 10.4886 13.102 17.7746 13.2764 17.8653C13.3695 17.9142 13.423 17.9258 13.5555 17.9258C13.916 17.9235 14.1788 17.6583 14.1788 17.2932C14.1788 17.0374 14.1392 16.9769 13.623 16.4467C13.3695 16.1862 11.8555 14.6328 10.2555 12.9909C8.65552 11.349 7.35087 9.99787 7.35552 9.9909C7.36017 9.9816 8.86715 8.43276 10.7044 6.54904C12.5416 4.66532 14.0671 3.08392 14.0951 3.03508C14.2392 2.79555 14.1951 2.45834 13.9927 2.25834C13.8462 2.1095 13.6323 2.04206 13.4323 2.0816Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-ca16a90c"]]),oa=x(i.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#edit"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[i.createElementVNode("path",{d:"M21.993 4.16087C21.6831 4.26049 21.2404 4.48185 20.9969 4.64787C20.1778 5.22342 4.60489 20.9402 4.39459 21.4051C4.11789 22.0138 3 25.8434 3 26.1865C3 26.5961 3.30991 27.1938 3.65302 27.4373C4.2507 27.8689 4.58275 27.8468 6.88493 27.1716C8.06923 26.8174 9.23138 26.4411 9.47488 26.3194C10.0062 26.0537 25.4795 10.6468 26.0772 9.79458C26.8519 8.67669 26.9626 7.32637 26.3871 6.10887C25.6234 4.48185 23.6754 3.61853 21.993 4.16087ZM24.0406 6.25276C24.7379 6.70655 25.0035 7.69162 24.6272 8.44426C24.4501 8.78737 9.331 24.0393 8.73332 24.471C8.48982 24.6481 5.2247 25.6995 5.13616 25.6331C5.11402 25.611 5.42393 24.5042 5.82239 23.1871L6.12123 22.1909L14.1125 14.1886C22.5243 5.76576 22.4911 5.79896 23.3101 5.94285C23.4983 5.97605 23.8192 6.11994 24.0406 6.25276Z",fill:"currentColor"}),i.createElementVNode("path",{d:"M15.098 25.9216C14.5446 26.1872 14.4118 27.1169 14.8656 27.5265C15.0759 27.7146 15.4743 27.7257 21.1302 27.7589C25.325 27.781 27.273 27.7478 27.4722 27.6703C28.0367 27.4268 28.1806 26.6521 27.7489 26.154L27.4833 25.8441L21.4069 25.822C17.2674 25.8109 15.264 25.833 15.098 25.9216Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-55ea5a5c"]]),aa=x(i.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#email"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M20 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5.913C2.02243 5.39779 2.24301 4.91116 2.61568 4.5547C2.98835 4.19824 3.4843 3.99951 4 4H20C20.5304 4 21.0391 4.21071 21.4142 4.58579C21.7893 4.96086 22 5.46957 22 6V18C22 18.5304 21.7893 19.0391 21.4142 19.4142C21.0391 19.7893 20.5304 20 20 20ZM4 7.868V18H20V7.868L12 13.2L4 7.868ZM4.8 6L12 10.8L19.2 6H4.8Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-99358e0a"]]),la=x(i.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[i.createElementVNode("path",{d:"M8.91736 3.08529L6.83471 5.17059H8.0843H9.33058V7.25588V9.34117H7.24793H5.16529L5.15868 8.09993L5.14876 6.85868L3.07273 8.93404L1 11.0127L3.08264 13.098L5.16529 15.1833V13.9321V12.6843H7.24793H9.33058V14.7696V16.8548H7.89256C7.10248 16.8548 6.45455 16.8648 6.45785 16.878C6.45785 16.8946 6.60992 17.0402 6.79504 17.2057C7.16529 17.5367 8.90744 19.1189 9.38017 19.5525C10.7058 20.7639 10.9967 21.0188 11.0331 20.999C11.0562 20.9857 12.0876 20.0523 13.3273 18.9236L15.5785 16.8714L14.124 16.8615L12.6694 16.8548V14.7696V12.6843H14.7521H16.8347V13.9255C16.8347 14.6074 16.8446 15.1668 16.8612 15.1668C16.8975 15.1668 21 11.0491 21 11.0127C21 10.9763 16.8975 6.85868 16.8612 6.85868C16.8446 6.85868 16.8347 7.41807 16.8347 8.09993V9.34117H14.7521H12.6694V7.25588V5.17059H13.9091C14.5901 5.17059 15.1488 5.16066 15.1488 5.14411C15.1488 5.12094 11.043 1 11.0165 1C11.0066 1 10.0612 1.93673 8.91736 3.08529ZM12.081 3.24086C12.6595 3.82011 13.1322 4.30337 13.1322 4.31661C13.1322 4.33316 12.8413 4.34309 12.4876 4.34309H11.843V7.25588V10.1687H14.7686H17.6942V9.53646C17.6909 9.18891 17.6975 8.89763 17.7041 8.89101C17.7074 8.88439 18.1934 9.36103 18.7785 9.9469L19.843 11.0127L18.7686 12.0885L17.6942 13.1642V12.9325C17.6909 12.8034 17.6876 12.5155 17.6843 12.2871L17.6777 11.8733L14.762 11.8634L11.843 11.8568V14.7696V17.6823L12.6331 17.689L13.4264 17.6989L12.2165 18.7978L11.0066 19.9L10.7223 19.6419C10.5669 19.5028 10.4314 19.3804 10.4215 19.3704C10.405 19.3539 9.92893 18.917 9.28099 18.3311C9.09917 18.1656 8.86777 17.9538 8.7686 17.8578L8.58678 17.6823H9.37355H10.157V14.7696V11.8568H7.24793H4.33884L4.33223 12.5022L4.32231 13.1477L3.25455 12.0785L2.19008 11.0127L3.25455 9.94359L4.32231 8.87446L4.33223 9.52322L4.33884 10.1687H7.24793H10.157V7.25588V4.34309L9.5124 4.33647L8.86446 4.32654L9.93223 3.25741C10.5174 2.67154 11.0066 2.1916 11.0165 2.1916C11.0264 2.1916 11.5058 2.66492 12.081 3.24086Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-05547f14"]]),ca=x(i.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#phone"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M19.4998 21.75H19.3723C4.63482 20.9025 2.54232 8.4675 2.24982 4.6725C2.22625 4.37744 2.26114 4.08062 2.35248 3.79906C2.44382 3.5175 2.58981 3.25673 2.78211 3.03169C2.9744 2.80665 3.20921 2.62177 3.47308 2.48763C3.73695 2.35349 4.02469 2.27274 4.31982 2.25H8.45232C8.75274 2.24971 9.04632 2.33963 9.29504 2.50812C9.54377 2.67661 9.73617 2.9159 9.84732 3.195L10.9873 6C11.0971 6.27266 11.1243 6.57156 11.0657 6.85957C11.007 7.14758 10.865 7.412 10.6573 7.62L9.05982 9.2325C9.30936 10.6506 9.98846 11.9578 11.0052 12.9772C12.022 13.9967 13.3274 14.6792 14.7448 14.9325L16.3723 13.32C16.5834 13.1146 16.8504 12.9759 17.1398 12.9213C17.4292 12.8666 17.7283 12.8983 17.9998 13.0125L20.8273 14.145C21.1022 14.2597 21.3367 14.4536 21.501 14.702C21.6653 14.9504 21.7519 15.2422 21.7498 15.54V19.5C21.7498 20.0967 21.5128 20.669 21.0908 21.091C20.6689 21.5129 20.0966 21.75 19.4998 21.75ZM4.49982 3.75C4.30091 3.75 4.11014 3.82902 3.96949 3.96967C3.82884 4.11032 3.74982 4.30109 3.74982 4.5V4.56C4.09482 9 6.30732 19.5 19.4548 20.25C19.5534 20.2561 19.6521 20.2427 19.7454 20.2105C19.8388 20.1783 19.9248 20.1281 19.9987 20.0626C20.0726 19.9971 20.1328 19.9176 20.1759 19.8288C20.219 19.74 20.2441 19.6436 20.2498 19.545V15.54L17.4223 14.4075L15.2698 16.545L14.9098 16.5C8.38482 15.6825 7.49982 9.1575 7.49982 9.09L7.45482 8.73L9.58482 6.5775L8.45982 3.75H4.49982Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-131f6ba1"]]),da=x(i.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:r[0]||(r[0]=s=>e.value=!0),onMouseleave:r[1]||(r[1]=s=>e.value=!1)},r[2]||(r[2]=[i.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)]),38)),r[3]||(r[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M656.733 149.806C659.446 147.019 662.69 144.804 666.274 143.292C669.857 141.779 673.707 141 677.597 141C681.486 141 685.337 141.779 688.92 143.292C692.503 144.804 695.748 147.019 698.461 149.806C704.024 155.518 707.138 163.176 707.138 171.15C707.138 179.123 704.024 186.782 698.461 192.494L386.589 512.366L698.461 832.302C701.269 835.176 703.483 838.575 704.976 842.305C706.47 846.035 707.215 850.022 707.167 854.04C707.119 858.057 706.281 862.026 704.699 865.72C703.118 869.413 700.824 872.759 697.949 875.566C695.211 878.242 691.972 880.351 688.417 881.774C684.863 883.197 681.063 883.904 677.235 883.857C673.407 883.809 669.625 883.007 666.107 881.497C662.589 879.986 659.404 877.797 656.733 875.054L325.085 534.702C319.26 528.726 316 520.711 316 512.366C316 504.021 319.26 496.006 325.085 490.03L656.733 149.806Z"})])],-1))],64))}}),[["__scopeId","data-v-ec3439ce"]]),ua=x(i.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:r[0]||(r[0]=s=>e.value=!0),onMouseleave:r[1]||(r[1]=s=>e.value=!1)},r[2]||(r[2]=[i.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)]),38)),r[3]||(r[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M366.436 875.054C363.723 877.84 360.479 880.055 356.895 881.568C353.312 883.08 349.462 883.859 345.572 883.859C341.683 883.859 337.832 883.08 334.249 881.568C330.666 880.055 327.421 877.84 324.708 875.054C319.145 869.342 316.031 861.683 316.031 853.71C316.031 845.736 319.145 838.077 324.708 832.366L636.58 512.494L324.708 192.558C321.9 189.684 319.686 186.284 318.193 182.555C316.699 178.825 315.954 174.837 316.002 170.82C316.049 166.802 316.888 162.833 318.47 159.14C320.051 155.446 322.345 152.1 325.22 149.294C327.958 146.618 331.197 144.508 334.752 143.086C338.306 141.663 342.106 140.955 345.934 141.003C349.762 141.05 353.544 141.852 357.062 143.363C360.58 144.873 363.765 147.063 366.436 149.806L698.084 490.158C703.909 496.134 707.169 504.148 707.169 512.494C707.169 520.839 703.909 528.854 698.084 534.83L366.436 875.054Z"})])],-1))],64))}}),[["__scopeId","data-v-cd0d3c21"]]),ha=x(i.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:r[0]||(r[0]=s=>e.value=!0),onMouseleave:r[1]||(r[1]=s=>e.value=!1)},r[2]||(r[2]=[i.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)]),38)),r[3]||(r[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M529.408 149.376C532.121 146.589 535.365 144.374 538.949 142.862C542.532 141.35 546.382 140.57 550.272 140.57C554.161 140.57 558.011 141.35 561.595 142.862C565.178 144.374 568.422 146.589 571.136 149.376C576.699 155.088 579.813 162.746 579.813 170.72C579.813 178.694 576.699 186.352 571.136 192.064L259.264 511.936L571.136 831.872C573.943 834.746 576.157 838.145 577.651 841.875C579.145 845.605 579.889 849.593 579.842 853.61C579.794 857.628 578.956 861.597 577.374 865.29C575.792 868.984 573.499 872.329 570.624 875.136C567.886 877.812 564.647 879.922 561.092 881.344C557.538 882.767 553.738 883.475 549.91 883.427C546.081 883.38 542.3 882.578 538.782 881.067C535.264 879.556 532.079 877.367 529.408 874.624L197.76 534.272C191.935 528.296 188.675 520.281 188.675 511.936C188.675 503.591 191.935 495.576 197.76 489.6L529.408 149.376ZM785.408 149.376C788.121 146.589 791.365 144.374 794.949 142.862C798.532 141.35 802.382 140.57 806.272 140.57C810.161 140.57 814.011 141.35 817.595 142.862C821.178 144.374 824.422 146.589 827.136 149.376C832.699 155.088 835.813 162.746 835.813 170.72C835.813 178.694 832.699 186.352 827.136 192.064L515.264 511.936L827.136 831.872C829.943 834.746 832.157 838.145 833.651 841.875C835.145 845.605 835.889 849.593 835.842 853.61C835.794 857.628 834.956 861.597 833.374 865.29C831.792 868.984 829.499 872.329 826.624 875.136C823.886 877.812 820.647 879.922 817.092 881.344C813.538 882.767 809.738 883.475 805.91 883.427C802.081 883.38 798.3 882.578 794.782 881.067C791.264 879.556 788.079 877.367 785.408 874.624L453.76 534.272C447.935 528.296 444.675 520.281 444.675 511.936C444.675 503.591 447.935 495.576 453.76 489.6L785.408 149.376Z"})])],-1))],64))}}),[["__scopeId","data-v-98099ad2"]]),fa=x(i.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:r[0]||(r[0]=s=>e.value=!0),onMouseleave:r[1]||(r[1]=s=>e.value=!1)},r[2]||(r[2]=[i.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)]),38)),r[3]||(r[3]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[i.createElementVNode("path",{d:"M495.111 874.624C492.397 877.411 489.153 879.626 485.57 881.138C481.987 882.65 478.136 883.43 474.247 883.43C470.357 883.43 466.507 882.65 462.924 881.138C459.34 879.626 456.096 877.411 453.383 874.624C447.819 868.912 444.706 861.254 444.706 853.28C444.706 845.306 447.819 837.648 453.383 831.936L765.255 512.064L453.383 192.128C450.575 189.254 448.361 185.855 446.867 182.125C445.374 178.395 444.629 174.407 444.677 170.39C444.724 166.372 445.563 162.403 447.145 158.71C448.726 155.016 451.02 151.671 453.895 148.864C456.633 146.188 459.872 144.078 463.426 142.656C466.981 141.233 470.781 140.525 474.609 140.573C478.437 140.62 482.219 141.422 485.737 142.933C489.254 144.444 492.44 146.633 495.111 149.376L826.759 489.728C832.584 495.704 835.844 503.719 835.844 512.064C835.844 520.409 832.584 528.424 826.759 534.4L495.111 874.624ZM239.111 874.624C236.397 877.411 233.153 879.626 229.57 881.138C225.987 882.65 222.136 883.43 218.247 883.43C214.357 883.43 210.507 882.65 206.924 881.138C203.34 879.626 200.096 877.411 197.383 874.624C191.819 868.912 188.706 861.254 188.706 853.28C188.706 845.306 191.819 837.648 197.383 831.936L509.255 512.064L197.383 192.128C194.575 189.254 192.361 185.855 190.867 182.125C189.374 178.395 188.629 174.407 188.677 170.39C188.724 166.372 189.563 162.403 191.145 158.71C192.726 155.016 195.02 151.671 197.895 148.864C200.633 146.188 203.872 144.078 207.426 142.656C210.981 141.233 214.781 140.525 218.609 140.573C222.437 140.62 226.219 141.422 229.737 142.933C233.254 144.444 236.44 146.633 239.111 149.376L570.759 489.728C576.584 495.704 579.844 503.719 579.844 512.064C579.844 520.409 576.584 528.424 570.759 534.4L239.111 874.624Z"})])],-1))],64))}}),[["__scopeId","data-v-053c9917"]]),ma=x(i.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){const e=i.ref(!1);return(n,r)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size,fill:t.hoverColor?i.unref(e)?t.hoverColor:t.color:(i.unref(e),t.color)}),onMouseenter:r[0]||(r[0]=s=>e.value=!0),onMouseleave:r[1]||(r[1]=s=>e.value=!1)},r[2]||(r[2]=[i.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)]),38)),r[3]||(r[3]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-1798f31d><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-1798f31d><path d="M65 135C73.2843 135 80 128.284 80 120C80 111.716 73.2843 105 65 105C56.7157 105 50 111.716 50 120C50 128.284 56.7157 135 65 135Z" data-v-1798f31d></path><path d="M120 135C128.284 135 135 128.284 135 120C135 111.716 128.284 105 120 105C111.716 105 105 111.716 105 120C105 128.284 111.716 135 120 135Z" data-v-1798f31d></path><path d="M175 135C183.284 135 190 128.284 190 120C190 111.716 183.284 105 175 105C166.716 105 160 111.716 160 120C160 128.284 166.716 135 175 135Z" data-v-1798f31d></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-1798f31d"]]);function pa(t){t.component("IconDownload",ia),t.component("IconFilter",ra),t.component("ArrowLeft",da),t.component("ArrowRight",ua),t.component("DoubleArrowLeft",ha),t.component("DoubleArrowRight",fa),t.component("EllipsisSvg",ma),t.component("IconArrowLeft",sa),t.component("IconCheckDefault",rr),t.component("IconClose",ni),t.component("IconEdit",oa),t.component("IconEmail",aa),t.component("IconMove",la),t.component("IconPhone",ca),t.component("IconSearch",dr),t.component("IconSelectArrow",or)}const op=Object.freeze(Object.defineProperty({__proto__:null,ArrowLeft:da,ArrowRight:ua,DoubleArrowLeft:ha,DoubleArrowRight:fa,EllipsisSvg:ma,IconArrowLeft:sa,IconCheckDefault:rr,IconClose:ni,IconDownload:ia,IconEdit:oa,IconEmail:aa,IconFilter:ra,IconMove:la,IconPhone:ca,IconSearch:dr,IconSelectArrow:or,default:pa},Symbol.toStringTag,{value:"Module"})),ap=i.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(t){const e=i.ref(t.initActiveIdx),n=r=>{e.value=r};return i.watch(()=>t.initActiveIdx,()=>{n(t.initActiveIdx)}),{changeActiveId:n,activeIdx:e}}});function lp(t,e,n,r,s,o){return i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default",{activeIdx:t.activeIdx,changeActiveId:t.changeActiveId})])}const ga=x(ap,[["render",lp]]),cp=i.defineComponent({name:"CollapseItem",props:{tabId:{type:String,required:!1,default:""},activeId:{type:String,default:""},isCollaps:{type:Boolean,default:!0},title:{type:String,default:""},showToolsOnHover:{type:Boolean,default:!0},background:{type:String,required:!1,default:"#ffffff"},backgroundAttention:{type:String,required:!1,default:"#ffffff"},changeColor:{type:Boolean,default:!1},margin:{type:String,default:"10px 8px 2px 2px"},padding:{type:String,default:"0 10px"},selectable:{type:Boolean,default:!1}},emits:["changeActiveId"],setup(t,{emit:e}){const n=i.ref(t.activeId==="0"),r=()=>{n.value=!n.value,e("changeActiveId",t.tabId)};return i.onUpdated(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!0)}),i.onBeforeMount(()=>{t.activeId&&t.activeId!==t.tabId&&(n.value=!1)}),{collapsed:n,handleItemClick:r}}}),dp=["for"],up={class:"inside-icon"};function hp(t,e,n,r,s,o){return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{class:"tab",style:i.normalizeStyle({margin:t.margin,height:t.isCollaps&&t.collapsed?"60px":"","box-shadow":t.selectable&&t.activeId===t.tabId?"0px 0px 1px 2px #1979cf":""})},[t.isCollaps&&t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:e[0]||(e[0]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[3]||(e[3]=[i.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)]))):t.isCollaps&&!t.collapsed?(i.openBlock(),i.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:e[1]||(e[1]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},e[4]||(e[4]=[i.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)]))):i.createCommentVNode("",!0),i.createElementVNode("label",{for:t.tabId,onClick:e[2]||(e[2]=(...a)=>t.handleItemClick&&t.handleItemClick(...a))},[i.createElementVNode("div",{style:i.normalizeStyle({cursor:t.isCollaps?"pointer":"default",background:t.changeColor?t.background:t.backgroundAttention,padding:t.padding,borderRadius:"5px"}),class:"tab-name"},[i.createElementVNode("div",up,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),i.createElementVNode("div",{class:"title-in",style:i.normalizeStyle({marginRight:t.isCollaps?"50px":"0",width:t.isCollaps?"calc(100% - 50px)":"100%"})},[i.renderSlot(t.$slots,"inside-title",{},()=>[i.createTextVNode(i.toDisplayString(t.title),1)],!0)],4),i.createElementVNode("div",{class:i.normalizeClass(["tools-bar",{"hidden-part":t.showToolsOnHover}])},[i.renderSlot(t.$slots,"tools",{},void 0,!0)],2)],4)],8,dp),i.createElementVNode("div",{style:i.normalizeStyle({maxHeight:t.isCollaps?"":"1000000vh",background:t.changeColor?t.background:t.backgroundAttention}),class:i.normalizeClass(t.collapsed?"tab-content-down":"tab-content-up")},[i.renderSlot(t.$slots,"default",{},void 0,!0)],6)],4),e[5]||(e[5]=i.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-c2e31ebb><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-c2e31ebb></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-c2e31ebb><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-c2e31ebb></path></symbol></svg>',1))],64)}const ya=x(cp,[["render",hp],["__scopeId","data-v-c2e31ebb"]]),fp={class:"tab"},mp={class:"rotate"},wa=x(i.defineComponent({__name:"VerticalCollapseContainer",setup(t){const e=i.ref(!1),n=async()=>{e.value=!e.value};return(r,s)=>{const o=i.resolveComponent("ArrowRight"),a=i.resolveComponent("ArrowLeft");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",fp,[i.renderSlot(r.$slots,"main",{},void 0,!0),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"20px",transition:"0.3s"}),class:"left"},[i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"100%":"0",transition:"0.3s"}),class:"left-content"},[i.renderSlot(r.$slots,"inside-content-left",{},void 0,!0)],4),i.createElementVNode("div",{class:"arrow-bar",onClick:n},[i.createElementVNode("div",mp,[i.renderSlot(r.$slots,"inside-title",{},void 0,!0)]),i.unref(e)?(i.openBlock(),i.createBlock(o,{key:0,"icon-class":"icon-arrow"})):(i.openBlock(),i.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),i.createElementVNode("div",{style:i.normalizeStyle({width:i.unref(e)?"50%":"100%",transition:"0.3s"}),class:"right"},[i.renderSlot(r.$slots,"inside-content-right",{},void 0,!0)],4)]),i.createVNode(a),i.createVNode(o)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),pp={class:"add-block_body"},ba=x(i.defineComponent({__name:"PAdd",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const r=i.resolveComponent("PSticky");return i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createVNode(r,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",pp,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),Ca=x(i.defineComponent({__name:"PContainer",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"add-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),gp={class:"add-block_body"},Sa=x(i.defineComponent({__name:"PContainerStickyHead",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"0"},padding:{type:String,required:!1,default:"0"},top:{type:String,required:!1,default:"0"},zIndex:{type:Number,required:!1,default:0}},setup(t){return(e,n)=>{const r=i.resolveComponent("PSticky"),s=i.resolveComponent("PContainer");return i.openBlock(),i.createBlock(s,{background:t.background,margin:t.margin,padding:t.padding},{default:i.withCtx(()=>[i.createVNode(r,{top:t.top,"z-index":t.zIndex},{default:i.withCtx(()=>[i.renderSlot(e.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),i.createElementVNode("div",gp,[i.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),yp={class:"del-block_title"},wp={class:"del-block_body"},ka=x(i.defineComponent({__name:"PDel",props:{background:{type:String,required:!1,default:"inherit"},margin:{type:String,required:!1,default:"10px 10px 10px 50px"},padding:{type:String,required:!1,default:"10px"}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("div",{class:"del-block",style:i.normalizeStyle({margin:t.margin,background:t.background,padding:t.padding})},[i.createElementVNode("div",yp,[i.renderSlot(e.$slots,"title",{},void 0,!0)]),i.createElementVNode("div",wp,[i.renderSlot(e.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),ri=x(i.defineComponent({__name:"PModal",props:{showCloseDialog:{type:Boolean,required:!1,default:!1},closable:{type:Boolean,required:!1,default:!1},show:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:String,default:"760px"},maxHeight:{type:String,default:"70vh"},margin:{type:String,default:"auto"},top:{type:String,default:"20vh"},padding:{type:String,default:"var(--modal-window-padding)"},showClose:{type:Boolean,default:!1}},emits:["save","close"],setup(t,{emit:e}){const n=t,r=e,s=a=>{a.key==="Escape"&&o()};i.onMounted(()=>{document.body.addEventListener("keydown",s)}),i.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",s)});const o=()=>{n.closable&&r("close")};return(a,c)=>{const d=i.resolveComponent("IconClose");return i.openBlock(),i.createElementBlock(i.Fragment,null,[t.show?(i.openBlock(),i.createElementBlock("div",{key:0,class:"blur",onClick:o})):i.createCommentVNode("",!0),t.show?(i.openBlock(),i.createElementBlock("div",{key:1,class:"modal-w",style:i.normalizeStyle({maxWidth:t.width,width:t.width,margin:t.margin,padding:t.padding,top:t.top,maxHeight:t.maxHeight})},[t.closable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"icon-box",onClick:o},[i.createVNode(d,{size:"20px"})])):i.createCommentVNode("",!0),i.renderSlot(a.$slots,"default",{},void 0,!0)],4)):i.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]),Ea=x(i.defineComponent({__name:"PNotify",setup(t){const e=i.computed(()=>{switch(ke.GetType()){case"info":return"message info";case"success":return"message success";case"warning":return"message warning";case"error":return"message error";default:return"message neutral"}});return(n,r)=>(i.openBlock(),i.createBlock(i.Transition,{name:"fade"},{default:i.withCtx(()=>[i.unref(ke).IsVisible()?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(e))},[i.createVNode(cr,{title:i.unref(ke).GetTitle(),text:i.unref(ke).GetText()},null,8,["title","text"])],2)):i.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-3714a37b"]]);function xa(t){t.component("CollapseContainer",ga),t.component("CollapseItem",ya),t.component("VerticalCollapseContainer",wa),t.component("PAdd",ba),t.component("PModal",ri),t.component("PContainer",Ca),t.component("PContainerStickyHead",Sa),t.component("PDel",ka),t.component("PNotify",Ea)}const bp=Object.freeze(Object.defineProperty({__proto__:null,CollapseContainer:ga,CollapseItem:ya,PAdd:ba,PContainer:Ca,PContainerStickyHead:Sa,PDel:ka,PModal:ri,PNotify:Ea,VerticalCollapseContainer:wa,default:xa},Symbol.toStringTag,{value:"Module"})),Cp={class:"btn-group"},hr=x(i.defineComponent({__name:"PAuthForm",props:{width:{type:String,default:"auto"},margin:{type:String,default:"auto"},padding:{type:String,default:"0"},background:{type:String,default:"inherit"}},emits:["submit"],setup(t,{emit:e}){const n=e,r=i.computed(()=>ae.Form.GetButtons()),s=i.useTemplateRef("fields"),o=async c=>{if(!c.isSubmit){ae.Form.SetChunk(c.GetChunk()),a();return}const d=ae.Form.Validate();if(d.length>0){lt.Notify.Error(d.join("<br/>"));return}n("submit")},a=()=>{if(!s.value)return;const c=s.value[0];c&&c.$refs.input.focus()};return i.onMounted(async()=>{await a()}),i.onBeforeUnmount(()=>{ae.Form.Reset()}),(c,d)=>(i.openBlock(),i.createElementBlock("div",{class:"auth-card",style:i.normalizeStyle({maxWidth:t.width,margin:t.margin,padding:t.padding,background:t.background})},[i.createVNode(ii,{string:i.unref(ae).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(ae).Form.GetFields(),u=>(i.openBlock(),i.createBlock(ti,{id:u.id,key:u.id,ref_for:!0,ref_key:"fields",ref:s,modelValue:u.value,"onUpdate:modelValue":h=>u.value=h,autocomplete:"nope",type:u.IsPassword?"password":"text",placeholder:u.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder"]))),128)),i.createElementVNode("div",Cp,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(r),(u,h)=>(i.openBlock(),i.createBlock(Kn,{id:u.id,key:u.GetChunk(),disabled:i.unref(ae).Form.IsBlock,type:h===0?i.unref(he).Success:i.unref(he).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:f=>o(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),va=i.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(t){const e=()=>{ae.Form.Reset(),ae.Modal.Close()};return(n,r)=>(i.openBlock(),i.createBlock(ri,{show:i.unref(ae).Modal.Visible,closable:i.unref(ae).Modal.Closable,width:t.width,padding:t.padding,onClose:e},{default:i.withCtx(()=>[i.createVNode(hr,{margin:t.margin,padding:"0",onSubmit:r[0]||(r[0]=s=>n.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),Sp={class:"field"},Ma=x(i.defineComponent({__name:"PNameEdit",props:{withName:{type:Object,required:!0}},emits:["submit"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(!1),o=i.ref(),a=i.ref(n.withName.name),c=i.ref(!1),d=()=>{c.value=!1},u=async()=>{a.value.trim(),n.withName.setName&&n.withName.setName(a.value),s.value=!s.value,r("submit")};return(h,f)=>{const m=i.resolveComponent("PString"),p=i.resolveComponent("PInput"),k=i.resolveComponent("InfoItem"),w=i.resolveComponent("PButton"),b=i.resolveComponent("el-form");return i.openBlock(),i.createBlock(b,{ref_key:"form",ref:o,style:{width:"100%"}},{default:i.withCtx(()=>[i.createVNode(k,{title:"Название","show-save-dialog":c.value,icon:"edit-title","with-hover":!0,close:s.value,width:"100%",onKeyupEnter:u,onAfterClose:d},{"open-inside-content":i.withCtx(()=>[i.createVNode(k,{title:"",icon:"edit-title","with-open-window":!1,"with-hover":!1,"border-color":"#ffffff","base-box-margin":"0 0 15px 0",padding:"0",width:"100%","custom-class":"test","open-width":"100%"},{default:i.withCtx(()=>[i.createElementVNode("div",Sp,[i.createVNode(p,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=E=>a.value=E),style:{width:"100%"},autosize:!0,type:"textarea"},null,8,["modelValue"])])]),_:1}),i.createVNode(w,{type:"admin",color:"blue",text:"Сохранить",onClick:u})]),default:i.withCtx(()=>[a.value.length?(i.openBlock(),i.createBlock(m,{key:0,string:a.value.length>60?a.value.slice(0,60)+"...":a.value},null,8,["string"])):(i.openBlock(),i.createBlock(m,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:1},8,["show-save-dialog","close"])]),_:1},512)}}}),[["__scopeId","data-v-4f7966cb"]]),kp=["onClick"],Ba=x(i.defineComponent({__name:"PTabs",props:{menus:{type:Object,required:!0},tabHeight:{type:String,required:!1,default:"40px"},height:{type:String,required:!1,default:""},minMenuItemWidth:{type:String,required:!1,default:"150px"},outTopMargin:{type:String,required:!1,default:"40px"},background:{type:String,required:!1,default:"#ffffff"},margin:{type:String,required:!1,default:"var(--tabs-margin, 0 10px 10px 10px)"},borderRadius:{type:String,required:!1,default:"var(--tabs-border-radius, 10px)"}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(window.innerWidth),o=i.ref(),a=i.ref(Number(n.tabHeight.replace(/[^+\d]/g,""))),c=()=>{s.value=window.innerWidth,a.value=o.value?o.value.clientHeight:Number(n.tabHeight.replace(/[^+\d]/g,""))};i.onMounted(()=>window.addEventListener("resize",c)),i.onUnmounted(()=>window.removeEventListener("resize",c));const d=i.computed(()=>`calc(100% - ${a.value}px + 1px)`);i.onBeforeMount(()=>{n.menus.Select()});const u=h=>{n.menus.Select(h),r("select")};return(h,f)=>(i.openBlock(),i.createElementBlock("div",{class:"mainblock",style:i.normalizeStyle({height:`calc(100% - ${t.outTopMargin} - ${t.tabHeight}`,margin:t.margin,borderRadius:t.borderRadius})},[i.createElementVNode("div",{ref_key:"menuRef",ref:o,class:"top-menu",style:i.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${t.minMenuItemWidth}, 1fr))`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.menus.items,(m,p)=>(i.openBlock(),i.createElementBlock("div",{key:p},[i.createElementVNode("div",{class:i.normalizeClass({"selected-tab":p===t.menus.idx,tab:p!==t.menus.idx}),style:i.normalizeStyle({minHeight:t.tabHeight,maxHeight:t.tabHeight}),onClick:k=>u(p)},i.toDisplayString(m.name),15,kp)]))),128))],4),i.createElementVNode("div",{class:"body-container",style:i.normalizeStyle({background:t.background,height:i.unref(d)})},[i.renderSlot(h.$slots,"default",{},()=>[t.menus.idx>-1?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.menus.GetComponent()),{key:0})):i.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-caa5b5d8"]]),Ep=["id"],xp=["for"],vp={class:"left-field"},Mp=["href","download"],Bp={key:1,class:"text-field__input"},Rp={class:"right-field"},$p=i.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new ge},formats:{type:Array,default:()=>["pdf","jpeg","jpg"]},label:{type:String,default:"Label",required:!1},margin:{type:String,required:!1,default:"10px 0 0 0"},disabled:{type:Boolean,required:!1,default:!1},padding:{type:String,default:"",required:!1},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"var(--input-border-color)",required:!1},color:{type:String,default:"var(--input-font-color)",required:!1},placeholder:{type:String,required:!1,default:""}},emits:["upload","remove"],setup(t,{emit:e}){const n=t,r=e,s=re.GUID(),o=re.GUID(),a=()=>{const u=document.getElementById(s);if(!u.files)return;const h=u.files[0];if(h){if(!d(h.name)){ke.Error(`Загруженный файл должен быть в одном из форматов: ${n.formats.join(", ")}`);return}n.fileInfo.setFile(h),n.fileInfo.url=URL.createObjectURL(h),r("upload",n.fileInfo)}},c=()=>{n.fileInfo.clearFile(),r("remove",n.fileInfo)};i.onMounted(()=>{const u=document.getElementById(o);u&&(u.onclick=()=>{var h;return(h=document.getElementById(s))==null?void 0:h.click()})});const d=u=>{let h=Ns.Get(u);return!!n.formats.includes(h.toLowerCase())};return(u,h)=>{const f=i.resolveComponent("PString"),m=i.resolveComponent("PFlex"),p=i.resolveComponent("PButton");return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("input",{id:i.unref(s),type:"file",hidden:"",onChange:a},null,40,Ep),i.createElementVNode("div",{class:"text-field",style:i.normalizeStyle({margin:t.margin,padding:t.padding})},[t.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:"text-field__label",for:t.label},i.toDisplayString(t.label),9,xp)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"field",style:i.normalizeStyle({borderColor:t.borderColor})},[i.createElementVNode("div",vp,[i.createVNode(m,null,{default:i.withCtx(()=>[i.renderSlot(u.$slots,"default",{},void 0,!0),i.createVNode(f,{string:t.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),t.fileInfo&&t.fileInfo.originalName?(i.openBlock(),i.createElementBlock("div",{key:0,class:"text-field__input",style:i.normalizeStyle({color:t.color})},[i.createElementVNode("a",{href:t.fileInfo.getFileUrl(),target:"_blank",download:t.fileInfo.originalName},[i.createElementVNode("div",null,i.toDisplayString(t.fileInfo.originalName),1)],8,Mp),i.createVNode(p,{skin:"text",type:"del",onClick:c},{default:i.withCtx(()=>[i.createVNode(ni,{size:"20px",margin:"0 5px"})]),_:1})],4)):(i.openBlock(),i.createElementBlock("div",Bp,[i.createVNode(f,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),i.createElementVNode("div",Rp,[i.createVNode(p,{id:i.unref(o),skin:"text",type:"success","data-test":"upload-btn",text:t.fileInfo&&t.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),Ra=x($p,[["__scopeId","data-v-133c8f3f"]]);function $a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$a(Object(n),!0).forEach(function(r){Ne(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$a(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ip(t,e){if(t==null)return{};var n,r,s=function(a,c){if(a==null)return{};var d,u,h={},f=Object.keys(a);for(u=0;u<f.length;u++)d=f[u],c.indexOf(d)>=0||(h[d]=a[d]);return h}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function Mt(t){return function(e){if(Array.isArray(e))return fr(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,n){if(e){if(typeof e=="string")return fr(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fr(e,n)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
27
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fr(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ia,Np,si,se=(Ia=function(t){/*!
28
- Copyright (c) 2018 Jed Watson.
29
- Licensed under the MIT License (MIT), see
30
- http://jedwatson.github.io/classnames
31
- */(function(){var e={}.hasOwnProperty;function n(){for(var r=[],s=0;s<arguments.length;s++){var o=arguments[s];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var c=n.apply(null,o);c&&r.push(c)}}else if(a==="object")if(o.toString===Object.prototype.toString)for(var d in o)e.call(o,d)&&o[d]&&r.push(d);else r.push(o.toString())}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()},Ia(si={path:Np,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(e==null&&si.path)}},si.exports),si.exports),Oe=function(t){return function(e,n){if(!e)return t;var r;typeof e=="string"?r=e:n=e;var s=t;return r&&(s+="__"+r),s+(n?Object.keys(n).reduce(function(o,a){var c=n[a];return c&&(o+=" "+(typeof c=="boolean"?s+"--"+a:s+"--"+a+"_"+c)),o},""):"")}};function mr(t,e,n){var r,s,o,a,c;function d(){var h=Date.now()-a;h<e&&h>=0?r=setTimeout(d,e-h):(r=null,n||(c=t.apply(o,s),o=s=null))}e==null&&(e=100);var u=function(){o=this,s=arguments,a=Date.now();var h=n&&!r;return r||(r=setTimeout(d,e)),h&&(c=t.apply(o,s),o=s=null),c};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(c=t.apply(o,s),o=s=null,clearTimeout(r),r=null)},u}mr.debounce=mr;var pr=mr,T=function(){return T=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},T.apply(this,arguments)};/*! *****************************************************************************
32
- Copyright (c) Microsoft Corporation.
33
-
34
- Permission to use, copy, modify, and/or distribute this software for any
35
- purpose with or without fee is hereby granted.
36
-
37
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
38
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
40
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
41
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
42
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43
- PERFORMANCE OF THIS SOFTWARE.
44
- ***************************************************************************** */function Na(t,e){var n,r;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),r=t+"-"+e):(n=t||e,r=t||e),{name:n,classname:r}}function Aa(t){return/^blob:/.test(t)}function Pa(t){return Aa(t)||function(e){return/^data:/.test(e)}(t)}function Ut(t){return!!(t&&t.constructor&&t.call&&t.apply)}function ce(t){return t===void 0}function oi(t){return typeof t=="object"&&t!==null}function gr(t,e,n){var r={};return oi(t)?(Object.keys(e).forEach(function(s){ce(t[s])?r[s]=e[s]:oi(e[s])?oi(t[s])?r[s]=gr(t[s],e[s],n[s]):r[s]=t[s]?e[s]:n[s]:e[s]===!0||e[s]===!1?r[s]=!!t[s]:r[s]=t[s]}),r):t?e:n}function ai(t){var e=Number(t);return Number.isNaN(e)?t:e}function za(t){return typeof(t=="number"||function(e){return typeof e=="object"&&e!==null}(t)&&toString.call(t)=="[object Number]")&&!Ta(t)}function Ta(t){return t!=t}function Va(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var mn=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},Ap=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},yr=function(t){this.type="move",this.directions=t},Pp=function(){function t(e,n,r,s,o){this.type="drag",this.nativeEvent=e,this.position=r,this.previousPosition=s,this.element=n,this.anchor=o}return t.prototype.shift=function(){var e=this,n=e.element,r=e.anchor,s=e.position;if(n){var o=n.getBoundingClientRect(),a=o.left,c=o.top;return{left:s.left-a-r.left,top:s.top-c-r.top}}return{left:0,top:0}},t}(),wr={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=Mt(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce(function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}},{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,r=e.right,s=e.bottom,o=e.top;this.anchor={left:t.clientX-n,top:t.clientY-o,bottom:s-t.clientY,right:r-t.clientX}},processMove:function(t,e){var n=Mt(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var r=this.$refs.draggable;this.$emit("drag",new Pp(t,r,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};wr.render=function(t,e,n,r,s,o){return i.openBlock(),i.createBlock("div",{ref:"draggable",class:n.classname,onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onMouseover:e[3]||(e[3]=function(){return o.onMouseOver&&o.onMouseOver.apply(o,arguments)}),onMouseleave:e[4]||(e[4]=function(){return o.onMouseLeave&&o.onMouseLeave.apply(o,arguments)})},[i.renderSlot(t.$slots,"default")],34)};var br=Oe("vue-handler-wrapper"),Oa={name:"HandlerWrapper",components:{DraggableElement:wr},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=Na(this.horizontalPosition,this.verticalPosition);t=br((Ne(e={},n.classname,!0),Ne(e,"disabled",this.disabled),e))}else t=br({disabled:this.disabled});return{root:t,draggable:br("draggable")}}},emits:["leave","enter","drag","drag-end"]};Oa.render=function(t,e,n,r,s,o){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock("div",{class:o.classes.root},[i.createVNode(a,{class:o.classes.draggable,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])],2)};var zp=Oe("vue-line-wrapper"),Fa={name:"LineWrapper",components:{DraggableElement:wr},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return zp((Ne(t={},this.position,!0),Ne(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};Fa.render=function(t,e,n,r,s,o){var a=i.resolveComponent("DraggableElement");return i.openBlock(),i.createBlock(a,{class:o.classname,onDrag:e[1]||(e[1]=function(c){return t.$emit("drag",c)}),onDragEnd:e[2]||(e[2]=function(c){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(c){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(c){return t.$emit("enter")})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["class"])};var je=["left","right","top","bottom"],Tp=["left","right"],Vp=["top","bottom"],Op=["left","top"],Fp=["fill-area","fit-area","stencil","none"],Da={left:0,top:0,width:0,height:0};function La(t,e,n){return!(n=n||["width","height","left","top"]).some(function(r){return t[r]!==e[r]})}function We(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function jt(t,e){return{left:t.left-e.left,top:t.top-e.top}}function me(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function pn(t,e){var n={left:0,top:0,right:0,bottom:0};return je.forEach(function(r){var s=e[r],o=We(t)[r];n[r]=s!==void 0&&o!==void 0?r==="left"||r==="top"?Math.max(0,s-o):Math.max(0,o-s):0}),n}function Ge(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function li(t){return{left:-t.left,top:-t.top}}function xe(t,e){return T(T({},t),{left:t.left+e.left,top:t.top+e.top})}function Ae(t,e,n,r){if(e!==1){if(n){var s=me(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-s.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-s.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function G(t){return t.width/t.height}function Wt(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function Gt(t,e){var n={left:0,top:0},r=pn(t,e);return r.left&&r.left>0?n.left=r.left:r.right&&r.right>0&&(n.left=-r.right),r.top&&r.top>0?n.top=r.top:r.bottom&&r.bottom>0&&(n.top=-r.bottom),n}function Cr(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function Ha(t,e){var n=G(t),r=G(e);return e.width<1/0&&e.height<1/0?n>r?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function qa(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function dt(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function ci(t,e){var n=pn(pe(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,Wt(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,Wt(t,e)):1}function pe(t,e,n){n===void 0&&(n=!1);var r=Gt(t,e);return xe(t,n?li(r):r)}function Sr(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function Dp(t,e){return T(T({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function _a(t,e,n){n===void 0&&(n=!0);var r={};return je.forEach(function(s){var o=t[s],a=e[s];o!==void 0&&a!==void 0?r[s]=s==="left"||s==="top"?n?Math.max(o,a):Math.min(o,a):n?Math.min(o,a):Math.max(o,a):a!==void 0?r[s]=a:o!==void 0&&(r[s]=o)}),r}function di(t,e){return _a(t,e,!0)}function Ua(t){var e=t.size,n=t.aspectRatio,r=t.ignoreMinimum,s=t.sizeRestrictions;return!!((e.correctRatio||G(e)>=n.minimum&&G(e)<=n.maximum)&&e.height<=s.maxHeight&&e.width<=s.maxWidth&&e.width&&e.height&&(r||e.height>=s.minHeight&&e.width>=s.minWidth))}function ja(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function nt(t){var e=t.width,n=t.height,r=t.sizeRestrictions,s={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},o={width:Math.max(r.minWidth,Math.min(r.maxWidth,e)),height:Math.max(r.minHeight,Math.min(r.maxHeight,n))};function a(u,h){return h===void 0&&(h=!1),u.reduce(function(f,m){return Ua({size:m,aspectRatio:s,sizeRestrictions:r,ignoreMinimum:h})&&(!f||ja(m,{width:e,height:n})<ja(f,{width:e,height:n}))?m:f},null)}var c=[];s&&[s.minimum,s.maximum].forEach(function(u){u&&c.push({width:o.width,height:o.width/u,correctRatio:!0},{width:o.height*u,height:o.height,correctRatio:!0})}),Ua({size:o,aspectRatio:s,sizeRestrictions:r})&&c.push(o);var d=a(c)||a(c,!0);return d&&{width:d.width,height:d.height}}function kr(t){var e=t.event,n=t.coordinates,r=t.positionRestrictions,s=r===void 0?{}:r,o=xe(n,e.directions);return xe(o,Gt(o,s))}function Lp(t){var e=t.coordinates,n=t.transform,r=t.imageSize,s=t.sizeRestrictions,o=t.positionRestrictions,a=t.aspectRatio,c=t.visibleArea,d=function(h,f){return kr({coordinates:h,positionRestrictions:o,event:new yr({left:f.left-h.left,top:f.top-h.top})})},u=T({},e);return(Array.isArray(n)?n:[n]).forEach(function(h){var f={};ce((f=typeof h=="function"?h({coordinates:u,imageSize:r,visibleArea:c}):h).width)&&ce(f.height)||(u=function(m,p){var k=T(T(T({},m),nt({width:p.width,height:p.height,sizeRestrictions:s,aspectRatio:a})),{left:0,top:0});return d(k,{left:m.left,top:m.top})}(u,T(T({},u),f))),ce(f.left)&&ce(f.top)||(u=d(u,T(T({},u),f)))}),u}function Hp(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,r=t.coordinates,s=t.visibleArea;t.aspectRatio;var o=t.stencilSize,a=t.sizeRestrictions,c=t.positionRestrictions;t.stencilReference;var d,u,h,f=T({},r),m=T({},s),p=T({},o);d=G(p),u=G(f),h===void 0&&(h=.001),(d===0||u===0?Math.abs(u-d)<h:Math.abs(u/d)<1+h&&Math.abs(u/d)>1-h)||(f=T(T({},f),nt({sizeRestrictions:a,width:f.width,height:f.height,aspectRatio:{minimum:G(p),maximum:G(p)}})));var k=ci(m=Ae(m,f.width*n.width/(m.width*p.width)),e({visibleArea:m,type:"resize"}));return k!==1&&(m=Ae(m,k),f=Ae(f,k)),m=pe(m=xe(m,jt(me(f),me(m))),e({visibleArea:m,type:"move"})),{coordinates:f=pe(f,di(We(m),c)),visibleArea:m}}function qp(t){var e=t.event,n=t.getAreaRestrictions,r=t.boundaries,s=t.coordinates,o=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var a=t.positionRestrictions;t.stencilReference;var c=T({},s),d=T({},o);if(s&&o&&e.type!=="manipulateImage"){var u={width:0,height:0};d.width,r.width,G(r)>G(c)?(u.height=.8*r.height,u.width=u.height*G(c)):(u.width=.8*r.width,u.height=u.width*G(c));var h=ci(d=Ae(d,c.width*r.width/(d.width*u.width)),n({visibleArea:d,type:"resize"}));d=Ae(d,h),h!==1&&(u.height/=h,u.width/=h),d=pe(d=xe(d,jt(me(c),me(d))),n({visibleArea:d,type:"move"})),c=pe(c,di(We(d),a))}return{coordinates:c,visibleArea:d}}function _p(t){var e=t.event,n=t.coordinates,r=t.visibleArea,s=t.getAreaRestrictions,o=T({},r),a=T({},n);if(e.type==="setCoordinates"){var c=Math.max(0,a.width-o.width),d=Math.max(0,a.height-o.height);c>d?o=Ae(o,Math.min(a.width/o.width,Wt(o,s({visibleArea:o,type:"resize"})))):d>c&&(o=Ae(o,Math.min(a.height/o.height,Wt(o,s({visibleArea:o,type:"resize"}))))),o=pe(o=xe(o,li(Gt(a,We(o)))),s({visibleArea:o,type:"move"}))}return{visibleArea:o,coordinates:a}}function Up(t){var e=t.imageSize,n=t.visibleArea,r=t.coordinates,s=n||e;return{left:(n?n.left:0)+s.width/2-r.width/2,top:(n?n.top:0)+s.height/2-r.height/2}}function jp(t){var e=t.imageSize,n=t.visibleArea,r=t.aspectRatio,s=t.sizeRestrictions,o=n||e,a=Math.min(r.maximum||1/0,Math.max(r.minimum||0,G(o))),c=o.width<o.height?{width:.8*o.width,height:.8*o.width/a}:{height:.8*o.height,width:.8*o.height*a};return nt(T(T({},c),{aspectRatio:r,sizeRestrictions:s}))}function Wp(t){var e,n,r=t.imageSize,s=t.visibleArea,o=t.boundaries,a=t.aspectRatio,c=t.sizeRestrictions,d=t.stencilSize,u=s||r;return G(u)>G(o)?n=(e=d.height*u.height/o.height)*G(d):e=(n=d.width*u.width/o.width)/G(d),nt({width:n,height:e,aspectRatio:a,sizeRestrictions:c})}function Gp(t){var e=t.getAreaRestrictions,n=t.coordinates,r=t.imageSize,s=G(t.boundaries);if(n){var o={height:Math.max(n.height,r.height),width:Math.max(n.width,r.width)},a=Ha({width:G(o)>s?o.width:o.height*s,height:G(o)>s?o.width/s:o.height},Sr(e())),c={left:n.left+n.width/2-a.width/2,top:n.top+n.height/2-a.height/2,width:a.width,height:a.height},d=pn(n,We(T({left:0,top:0},r))),u={};return!d.left&&!d.right&&c.width<=r.width&&(u.left=0,u.right=r.width),!d.top&&!d.bottom&&c.height<=r.height&&(u.top=0,u.bottom=r.height),pe(c,u)}var h=G(r);return a={height:h>s?r.height:r.width/s,width:h>s?r.height*s:r.width},{left:r.width/2-a.width/2,top:r.height/2-a.height/2,width:a.width,height:a.height}}function ui(t,e){return _a(t,We(e))}function Zp(t){var e=t.event,n=t.coordinates,r=t.visibleArea,s=t.sizeRestrictions,o=t.getAreaRestrictions,a=t.positionRestrictions,c=t.adjustStencil,d=e.scale,u=e.move,h=T({},r),f=T({},n),m=1,p=1,k=d.factor&&Math.abs(d.factor-1)>.001;h=xe(h,{left:u.left||0,top:u.top||0});var w={stencil:{minimum:Math.max(s.minWidth?s.minWidth/f.width:0,s.minHeight?s.minHeight/f.height:0),maximum:Math.min(s.maxWidth?s.maxWidth/f.width:1/0,s.maxHeight?s.maxHeight/f.height:1/0,Wt(f,a))},area:{maximum:Wt(h,o({visibleArea:h,type:"resize"}))}};d.factor&&k&&(d.factor<1?(p=Math.max(d.factor,w.stencil.minimum))>1&&(p=1):d.factor>1&&(p=Math.min(d.factor,Math.min(w.area.maximum,w.stencil.maximum)))<1&&(p=1)),p&&(h=Ae(h,p,d.center));var b=n.left-r.left,E=r.width+r.left-(n.width+n.left),F=n.top-r.top,A=r.height+r.top-(n.height+n.top);return h=pe(h=xe(h,Gt(h,{left:a.left!==void 0?a.left-b*p:void 0,top:a.top!==void 0?a.top-F*p:void 0,bottom:a.bottom!==void 0?a.bottom+A*p:void 0,right:a.right!==void 0?a.right+E*p:void 0})),o({visibleArea:h,type:"move"})),f.width=f.width*p,f.height=f.height*p,f.left=h.left+b*p,f.top=h.top+F*p,f=pe(f,di(We(h),a)),d.factor&&k&&c&&(d.factor>1?m=Math.min(w.area.maximum,d.factor)/p:d.factor<1&&(m=Math.max(f.height/h.height,f.width/h.width,d.factor/p)),m!==1&&(h=xe(h=pe(h=Ae(h,m,d.factor>1?d.center:me(f)),o({visibleArea:h,type:"move"})),li(Gt(f,We(h)))))),{coordinates:f,visibleArea:h}}function Xp(t){var e=t.aspectRatio,n=t.getAreaRestrictions,r=t.coordinates,s=t.visibleArea,o=t.sizeRestrictions,a=t.positionRestrictions,c=t.imageSize,d=t.previousImageSize,u=t.angle,h=T({},r),f=T({},s),m=dt(me(T({left:0,top:0},d)),u);return(h=T(T({},nt({sizeRestrictions:o,aspectRatio:e,width:h.width,height:h.height})),dt(me(h),u))).left-=m.left-c.width/2+h.width/2,h.top-=m.top-c.height/2+h.height/2,f=Ae(f,ci(f,n({visibleArea:f,type:"resize"}))),{coordinates:h=pe(h,a),visibleArea:f=pe(f=xe(f,jt(me(h),me(r))),n({visibleArea:f,type:"move"}))}}function Jp(t){var e=t.flip,n=t.previousFlip,r=t.rotate,s=t.getAreaRestrictions,o=t.coordinates,a=t.visibleArea,c=t.imageSize,d=T({},o),u=T({},a),h=n.horizontal!==e.horizontal,f=n.vertical!==e.vertical;if(h||f){var m=dt({left:c.width/2,top:c.height/2},-r),p=dt(me(d),-r),k=dt({left:h?m.left-(p.left-m.left):p.left,top:f?m.top-(p.top-m.top):p.top},r);d=xe(d,jt(k,me(d))),p=dt(me(u),-r),u=pe(u=xe(u,jt(k=dt({left:h?m.left-(p.left-m.left):p.left,top:f?m.top-(p.top-m.top):p.top},r),me(u))),s({visibleArea:u,type:"move"}))}return{coordinates:d,visibleArea:u}}function Wa(t){var e=t.directions,n=t.coordinates,r=t.positionRestrictions,s=r===void 0?{}:r,o=t.sizeRestrictions,a=t.preserveRatio,c=t.compensate,d=T({},e),u=Ge(n,d).width,h=Ge(n,d).height;u<0&&(d.left<0&&d.right<0?(d.left=-(n.width-o.minWidth)/(d.left/d.right),d.right=-(n.width-o.minWidth)/(d.right/d.left)):d.left<0?d.left=-(n.width-o.minWidth):d.right<0&&(d.right=-(n.width-o.minWidth))),h<0&&(d.top<0&&d.bottom<0?(d.top=-(n.height-o.minHeight)/(d.top/d.bottom),d.bottom=-(n.height-o.minHeight)/(d.bottom/d.top)):d.top<0?d.top=-(n.height-o.minHeight):d.bottom<0&&(d.bottom=-(n.height-o.minHeight)));var f=pn(Ge(n,d),s);c&&(f.left&&f.left>0&&f.right===0?(d.right+=f.left,d.left-=f.left):f.right&&f.right>0&&f.left===0&&(d.left+=f.right,d.right-=f.right),f.top&&f.top>0&&f.bottom===0?(d.bottom+=f.top,d.top-=f.top):f.bottom&&f.bottom>0&&f.top===0&&(d.top+=f.bottom,d.bottom-=f.bottom),f=pn(Ge(n,d),s));var m={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(je.forEach(function(w){var b=f[w];b&&d[w]&&(m[w]=Math.max(0,1-b/d[w]))}),a){var p=Math.min.apply(null,je.map(function(w){return m[w]}));p!==1/0&&je.forEach(function(w){d[w]*=p})}else je.forEach(function(w){m[w]!==1/0&&(d[w]*=m[w])});if(u=Ge(n,d).width,h=Ge(n,d).height,d.right+d.left&&(u>o.maxWidth?m.width=(o.maxWidth-n.width)/(d.right+d.left):u<o.minWidth&&(m.width=(o.minWidth-n.width)/(d.right+d.left))),d.bottom+d.top&&(h>o.maxHeight?m.height=(o.maxHeight-n.height)/(d.bottom+d.top):h<o.minHeight&&(m.height=(o.minHeight-n.height)/(d.bottom+d.top))),a){var k=Math.min(m.width,m.height);k!==1/0&&je.forEach(function(w){d[w]*=k})}else m.width!==1/0&&Tp.forEach(function(w){d[w]*=m.width}),m.height!==1/0&&Vp.forEach(function(w){d[w]*=m.height});return d}function hi(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var Yp=Oe("vue-simple-handler"),Qp=Oe("vue-simple-handler-wrapper"),Er={name:"SimpleHandler",components:{HandlerWrapper:Oa},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var t,e=(Ne(t={},this.horizontalPosition,!!this.horizontalPosition),Ne(t,this.verticalPosition,!!this.verticalPosition),Ne(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),Ne(t,"hover",this.hover),t);return{default:se(Yp(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:se(Qp(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Er.render=function(t,e,n,r,s,o){var a=i.resolveComponent("HandlerWrapper");return i.openBlock(),i.createBlock(a,{class:o.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:o.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Kp=Oe("vue-simple-line"),eg=Oe("vue-simple-line-wrapper"),xr={name:"SimpleLine",components:{LineWrapper:Fa},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:se(Kp(Ne({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:se(eg(Ne({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};xr.render=function(t,e,n,r,s,o){var a=i.resolveComponent("LineWrapper");return i.openBlock(),i.createBlock(a,{class:o.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:i.withCtx(function(){return[i.createVNode("div",{class:o.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var vr=Oe("vue-bounding-box"),tg=["east","west",null],ng=["south","north",null],Ga={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return Er}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return xr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return tg.forEach(function(e){ng.forEach(function(n){if(e!==n){var r=Na(e,n),s=r.name,o=r.classname;t.push({name:s,classname:o,verticalDirection:n,horizontalDirection:e})}})}),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,r=this.linesWrappersClasses;return{root:vr(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:r}},lineNodes:function(){var t=this,e=[];return this.points.forEach(function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:se(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:se(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})}),e},handlerNodes:function(){var t=this,e=[],n=this.width,r=this.height;return this.points.forEach(function(s){if(t.handlers[s.name]){var o={name:s.name,component:t.handlersComponent,class:se(t.classes.handlers.default,t.classes.handlers[s.name]),wrapperClass:se(t.classes.handlersWrappers.default,t.classes.handlersWrappers[s.name]),hoverClass:t.classes.handlers.hover,verticalDirection:s.verticalDirection,horizontalDirection:s.horizontalDirection,disabled:!t.resizable};if(n&&r){var a=s.horizontalDirection,c=s.verticalDirection,d=a==="east"?n:a==="west"?0:n/2,u=c==="south"?r:c==="north"?0:r/2;o.wrapperClass=vr("handler"),o.wrapperStyle={transform:"translate(".concat(d,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(o.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else o.wrapperClass=vr("handler",Ne({},s.classname,!0));e.push(o)}}),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(t,e,n){var r,s=t.shift(),o=s.left,a=s.top,c={left:0,right:0,top:0,bottom:0};e==="west"?c.left-=o:e==="east"&&(c.right+=o),n==="north"?c.top-=a:n==="south"&&(c.bottom+=a),!n&&e?r="width":n&&!e&&(r="height"),this.resizable&&this.$emit("resize",new Ap(c,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:r}))}},emits:["resize","resize-end"]};Ga.render=function(t,e,n,r,s,o){return i.openBlock(),i.createBlock("div",{ref:"box",class:o.classes.root,style:o.style},[i.renderSlot(t.$slots,"default"),i.createVNode("div",null,[(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(o.lineNodes,function(a){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(c){return o.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(c){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(i.openBlock(!0),i.createBlock(i.Fragment,null,i.renderList(o.handlerNodes,function(a){return i.openBlock(),i.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(c){return o.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(c){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var ig=Oe("vue-draggable-area"),Za={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:ig()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=Mt(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):Va({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,r=e.top;this.anchor={x:t.clientX-n,y:t.clientY-r}},processMove:function(t,e){var n=Mt(e);if(this.touches.length){var r=this.$refs.container.getBoundingClientRect(),s=r.left,o=r.top;this.touches.length===1&&n.length===1&&this.$emit("move",new yr({left:n[0].clientX-(s+this.anchor.x),top:n[0].clientY-(o+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};Za.render=function(t,e,n,r,s,o){return i.openBlock(),i.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)})},[i.renderSlot(t.$slots,"default")],544)};function Mr(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t==null?void 0:t.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t==null?void 0:t.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function rg(t){return new Promise(function(e,n){try{if(t)if(/^data:/i.test(t))e(function(d){d=d.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(d),h=u.length,f=new ArrayBuffer(h),m=new Uint8Array(f),p=0;p<h;p++)m[p]=u.charCodeAt(p);return f}(t));else if(/^blob:/i.test(t)){var r=new FileReader;r.onload=function(d){e(d.target.result)},o=t,a=function(d){r.readAsArrayBuffer(d)},(c=new XMLHttpRequest).open("GET",o,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var s=new XMLHttpRequest;s.onreadystatechange=function(){s.readyState===4&&(s.status===200||s.status===0?e(s.response):n("Warning: could not load an image to parse its orientation"),s=null)},s.onprogress=function(){s.getResponseHeader("content-type")!=="image/jpeg"&&s.abort()},s.withCredentials=!1,s.open("GET",t,!0),s.responseType="arraybuffer",s.send(null)}else n("Error: the image is empty")}catch(d){n(d)}var o,a,c})}function Xa(t){var e=t.rotate,n=t.flip,r=t.scaleX,s=t.scaleY,o="";return o+=" rotate("+e+"deg) ",o+=" scaleX("+r*(n.horizontal?-1:1)+") ",o+=" scaleY("+s*(n.vertical?-1:1)+") "}function sg(t){try{var e,n=new DataView(t),r=void 0,s=void 0,o=void 0,a=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var c=n.byteLength,d=2;d+1<c;){if(n.getUint8(d)===255&&n.getUint8(d+1)===225){o=d;break}d++}if(o&&(r=o+10,function(p,k,w){var b,E="";for(b=k,w+=k;b<w;b++)E+=String.fromCharCode(p.getUint8(b));return E}(n,o+4,4)==="Exif")){var u=n.getUint16(r);if(((s=u===18761)||u===19789)&&n.getUint16(r+2,s)===42){var h=n.getUint32(r+4,s);h>=8&&(a=r+h)}}if(a){for(var f=n.getUint16(a,s),m=0;m<f;m++)if(d=a+12*m+2,n.getUint16(d,s)===274){d+=8,e=n.getUint16(d,s),n.setUint16(d,1,s);break}}return e}catch{return null}}function Ja(t,e){var n=e.getBoundingClientRect(),r=n.left,s=n.top,o={left:0,top:0},a=0;return t.forEach(function(c){o.left+=(c.clientX-r)/t.length,o.top+=(c.clientY-s)/t.length}),t.forEach(function(c){a+=Va({x:o.left,y:o.top},{x:c.clientX-r,y:c.clientY-s})}),{centerMass:o,spread:a,count:t.length}}var Ya={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=pr(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new mn({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=Ja(e,this.$refs.container),r=this.oldGeometricProperties;r.count===n.count&&r.count>1&&this.$emit("resize",new mn({left:r.centerMass.left-n.centerMass.left,top:r.centerMass.top-n.centerMass.top},{factor:r.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),r=n.left,s=n.top,o=n.bottom,a=n.right;this.touches=Mt(t.touches).filter(function(c){return c.clientX>r&&c.clientX<a&&c.clientY>s&&c.clientY<o}),this.oldGeometricProperties=Ja(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=Mt(t.touches).filter(function(r){return!r.identifier||e.touches.find(function(s){return s.identifier===r.identifier})});this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,r=e.top,s=1+this.wheelResize.ratio*(a=t.deltaY||t.detail||t.wheelDelta,(c=+a)==0||Ta(c)?c:c>0?1:-1),o={left:t.clientX-n,top:t.clientY-r};this.$emit("resize",new mn({},{factor:s,center:o})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};Ya.render=function(t,e,n,r,s,o){return i.openBlock(),i.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onWheel:e[3]||(e[3]=function(){return o.onWheel&&o.onWheel.apply(o,arguments)})},[i.renderSlot(t.$slots,"default")],544)};var Br={components:{TransformableImage:Ya},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};Br.render=function(t,e,n,r,s,o){var a=i.resolveComponent("transformable-image");return i.openBlock(),i.createBlock(a,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(c){return t.$emit("move",c)}),onResize:e[2]||(e[2]=function(c){return t.$emit("resize",c)})},{default:i.withCtx(function(){return[i.renderSlot(t.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var fi=Oe("vue-preview"),Qa={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:fi({fill:this.fill}),wrapper:fi("wrapper"),imageWrapper:fi("image-wrapper"),image:se(fi("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=W(W({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,r=this.imageSize.height,s=qa({width:n,height:r},e.rotate),o={width:"".concat(n,"px"),height:"".concat(r,"px"),left:"0px",top:"0px"},a={rotate:{left:(n-s.width)*e.scaleX/2,top:(r-s.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*r/2}};return o.transform=`translate(
45
- `.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+Xa(e),this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){t.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};Qa.render=function(t,e,n,r,s,o){return i.openBlock(),i.createBlock("div",{ref:"root",class:o.classes.root,style:o.style},[i.createVNode("div",{ref:"wrapper",class:o.classes.wrapper,style:o.wrapperStyle},[i.withDirectives(i.createVNode("img",{ref:"image",src:n.image&&n.image.src,class:o.classes.image,style:o.imageStyle},null,14,["src"]),[[i.vShow,n.image&&n.image.src]])],6)],6)};var Ka={components:{Preview:Qa},inheritAttrs:!1};Ka.render=function(t,e,n,r,s,o){var a=i.resolveComponent("preview");return i.openBlock(),i.createBlock(a,i.mergeProps(t.$attrs,{fill:!0}),null,16)};var Rr=Oe("vue-rectangle-stencil"),el={name:"RectangleStencil",components:{StencilPreview:Ka,BoundingBox:Ga,DraggableArea:Za},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Er}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return xr}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:se(Rr({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:se(Rr("preview"),this.previewClass),boundingBox:se(Rr("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,r=t.left,s=t.top,o={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(r,"px, ").concat(s,"px)")};return this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};el.render=function(t,e,n,r,s,o){var a=i.resolveComponent("stencil-preview"),c=i.resolveComponent("draggable-area"),d=i.resolveComponent("bounding-box");return i.openBlock(),i.createBlock("div",{class:o.classes.stencil,style:o.style},[i.createVNode(d,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:o.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:o.onResize,onResizeEnd:o.onResizeEnd},{default:i.withCtx(function(){return[i.createVNode(c,{movable:n.movable,onMove:o.onMove,onMoveEnd:o.onMoveEnd},{default:i.withCtx(function(){return[i.createVNode(a,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:o.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var og=["transitions"],it=Oe("vue-advanced-cropper"),tl={name:"Cropper",components:{BackgroundWrapper:Br},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return el}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Br}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return Fp.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,n=t.coordinates,r=t.aspectRatio,s=t.positionRestrictions,o=t.sizeRestrictions,a=T(T({},n),{right:n.left+n.width,bottom:n.top+n.height}),c=e.params||{},d=T({},e.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};o.widthFrozen&&(d.left=0,d.right=0),o.heightFrozen&&(d.top=0,d.bottom=0),je.forEach(function(v){u[v]||(d[v]=0)});var h=Ge(a,d=Wa({coordinates:a,directions:d,sizeRestrictions:o,positionRestrictions:s})).width,f=Ge(a,d).height,m=c.preserveRatio?G(a):Cr(h/f,r);if(m){var p=c.respectDirection;if(p||(p=a.width>=a.height||m===1?"width":"height"),p==="width"){var k=h/m-a.height;if(u.top&&u.bottom){var w=d.top,b=d.bottom;d.bottom=hi(k,b,w),d.top=hi(k,w,b)}else u.bottom?d.bottom=k:u.top?d.top=k:u.right?d.right=0:u.left&&(d.left=0)}else if(p==="height"){var E=a.width-f*m;if(u.left&&u.right){var F=d.left,A=d.right;d.left=-hi(E,F,A),d.right=-hi(E,A,F)}else u.left?d.left=-E:u.right?d.right=-E:u.top?d.top=0:u.bottom&&(d.bottom=0)}d=Wa({directions:d,coordinates:a,sizeRestrictions:o,positionRestrictions:s,preserveRatio:!0,compensate:c.compensate})}return h=Ge(a,d).width,f=Ge(a,d).height,(m=c.preserveRatio?G(a):Cr(h/f,r))&&Math.abs(m-h/f)>.001&&je.forEach(function(v){u[v]||(d[v]=0)}),kr({event:new yr({left:-d.left,top:-d.top}),coordinates:{width:n.width+d.right+d.left,height:n.height+d.top+d.bottom,left:n.left,top:n.top},positionRestrictions:s})}},moveAlgorithm:{type:Function,default:kr},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,r=G(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/r+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,r=t.aspectRatio,s=t.sizeRestrictions,o=t.positionRestrictions,a=T(T({},n),nt({width:n.width,height:n.height,aspectRatio:r,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,s.minHeight),minWidth:Math.min(e.width,s.minWidth)}}));return a=pe(a=xe(a,jt(me(n),me(a))),di(We(e),o))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,r=t.getAreaRestrictions,s=t.coordinates,o=T({},e);o.height=o.width/G(n),o.top+=(e.height-o.height)/2,(s.height-o.height>0||s.width-o.width>0)&&(o=Ae(o,Math.max(s.height/o.height,s.width/o.width)));var a=li(Gt(s,We(o=Ae(o,ci(o,r({visibleArea:o,type:"resize"}))))));return o.width<s.width&&(a.left=0),o.height<s.height&&(a.top=0),o=pe(o=xe(o,a),r({visibleArea:o,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,r=t.imageSize,s=t.imageRestriction,o=t.type,a={};return s==="fill-area"?a={left:0,top:0,right:r.width,bottom:r.height}:s==="fit-area"&&(G(n)>G(r)?(a={top:0,bottom:r.height},e&&o==="move"&&(e.width>r.width?(a.left=-(e.width-r.width)/2,a.right=r.width-a.left):(a.left=0,a.right=r.width))):(a={left:0,right:r.width},e&&o==="move"&&(e.height>r.height?(a.top=-(e.height-r.height)/2,a.bottom=r.height-a.top):(a.top=0,a.bottom=r.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:W({},Da)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=gr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:gr(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:ce(this.minWidth)?0:ai(this.minWidth),minHeight:ce(this.minHeight)?0:ai(this.minHeight),maxWidth:ce(this.maxWidth)?1/0:ai(this.maxWidth),maxHeight:ce(this.maxHeight)?1/0:ai(this.maxHeight)});if(t=function(r){var s=r.areaRestrictions,o=r.sizeRestrictions,a=r.boundaries,c=r.positionRestrictions,d=T(T({},o),{minWidth:o.minWidth!==void 0?o.minWidth:0,minHeight:o.minHeight!==void 0?o.minHeight:0,maxWidth:o.maxWidth!==void 0?o.maxWidth:1/0,maxHeight:o.maxHeight!==void 0?o.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(d.maxWidth=Math.min(d.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(d.maxHeight=Math.min(d.maxHeight,c.bottom-c.top));var u=Sr(s),h=Ha(a,u);return u.width<1/0&&(!d.maxWidth||d.maxWidth>h.width)&&(d.maxWidth=Math.min(d.maxWidth,h.width)),u.height<1/0&&(!d.maxHeight||d.maxHeight>h.height)&&(d.maxHeight=Math.min(d.maxHeight,h.height)),d.minWidth>d.maxWidth&&(d.minWidth=d.maxWidth,d.widthFrozen=!0),d.minHeight>d.maxHeight&&(d.minHeight=d.maxHeight,d.heightFrozen=!0),d}({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),n=Sr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:it(),image:se(it("image"),this.imageClass),stencil:it("stencil"),boundaries:se(it("boundaries"),this.boundariesClass),stretcher:se(it("stretcher")),background:se(it("background"),this.backgroundClass),foreground:se(it("foreground"),this.foregroundClass),imageWrapper:se(it("image-wrapper")),cropperWrapper:se(it("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,r=t.left,s=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(r-this.visibleArea.left)/this.coefficient,top:(s-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},r=W(W({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),s={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+Xa(r)};return this.transitionsOptions.enabled&&(s.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),s}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return t[n]!==e[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=pr(this.update,this.debounce),this.debouncedDisableTransitions=pr(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(W({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:W({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?W({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,s=r===void 0||r;this.onManipulateImage(new mn({},{factor:1/t,center:e}),{normalize:!1,transitions:s})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,s=r===void 0||r;this.onManipulateImage(new mn({left:t||0,top:e||0}),{normalize:!1,transitions:s})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.autoZoom,s=r===void 0||r,o=n.transitions,a=o===void 0||o;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),s&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var n=e.coordinates,r=e.sizeRestrictions,s=e.positionRestrictions,o={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return o.width>r.maxWidth?o.width=Math.floor(n.width):o.width<r.minWidth&&(o.width=Math.ceil(n.width)),o.height>r.maxHeight?o.height=Math.floor(n.height):o.height<r.minHeight&&(o.height=Math.ceil(n.height)),pe(o,s)}(W(W({},this.getPublicProperties()),{},{positionRestrictions:ui(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,r){var s=this.autoZoomAlgorithm;s||(s=this.stencilSize?Hp:this.autoZoom?qp:_p);var o=s({event:{type:t,params:r},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return W(W({},o),{},{changed:!La(o.visibleArea,e)||!La(o.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,r=n!==void 0&&n,s=Ip(e,og),o=this.processAutoZoom(t,this.visibleArea,this.coordinates,s),a=o.visibleArea,c=o.coordinates,d=o.changed;r&&d&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,r&&d&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var n=e.event,r=e.visibleArea,s=e.coefficient;if(n.type==="manipulateImage")return T(T({},n),{move:{left:n.move&&n.move.left?s*n.move.left:0,top:n.move&&n.move.top?s*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*s+r.left,top:n.scale.center.top*s+r.top}:null}});if(n.type==="resize"){var o=T(T({},n),{directions:T({},n.directions)});return je.forEach(function(c){o.directions[c]*=s}),o}if(n.type==="move"){var a=T(T({},n),{directions:T({},n.directions)});return Op.forEach(function(c){a.directions[c]*=s}),a}return n}(W(W({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,d,u){var h=u.rotate,f=u.flip,m={width:d.naturalWidth,height:d.naturalHeight},p=qa(m,h),k=c.getContext("2d");c.height=p.height,c.width=p.width,k.save();var w=dt(me(T({left:0,top:0},m)),h);return k.translate(-(w.left-p.width/2),-(w.top-p.height/2)),k.rotate(h*Math.PI/180),k.translate(f.horizontal?m.width:0,f.vertical?m.height:0),k.scale(f.horizontal?-1:1,f.vertical?-1:1),k.drawImage(d,0,0,m.width,m.height),k.restore(),c}(this.$refs.sourceCanvas,e,this.imageTransforms):e,r=W({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),s=function(c){return c.find(function(d){return u=d,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},o=nt({sizeRestrictions:{minWidth:s([r.width,r.minWidth])||0,minHeight:s([r.height,r.minHeight])||0,maxWidth:s([r.width,r.maxWidth])||1/0,maxHeight:s([r.height,r.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(r.maxArea&&o.width*o.height>r.maxArea){var a=Math.sqrt(r.maxArea/(o.width*o.height));o={width:Math.round(a*o.width),height:Math.round(a*o.height)}}return function(c,d,u,h,f){c.width=h?h.width:u.width,c.height=h?h.height:u.height;var m=c.getContext("2d");m.clearRect(0,0,c.width,c.height),f&&(f.imageSmoothingEnabled&&(m.imageSmoothingEnabled=f.imageSmoothingEnabled),f.imageSmoothingQuality&&(m.imageSmoothingQuality=f.imageSmoothingQuality),f.fillColor&&(m.fillStyle=f.fillColor,m.fillRect(0,0,c.width,c.height),m.save()));var p=u.left<0?-u.left:0,k=u.top<0?-u.top:0;m.drawImage(d,u.left+p,u.top+k,u.width,u.height,p*(c.width/u.width),k*(c.height/u.height),c.width,c.height)}(t,n,this.coordinates,o,r),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?Dp(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,r=this.visibleArea&&e?ui(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return Lp({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:r,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?Wp:jp);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var r=Ut(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,s=this.defaultPosition||Up,o=[r,function(a){var c=a.coordinates;return W({},Ut(s)?s({coordinates:c,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&o.push.apply(o,Mt(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(o,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var r={cropper:n,imageSize:t.imageSize};if(Ut(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(r):t.defaultBoundaries==="fit"?t.boundaries=function(s){var o=s.cropper,a=s.imageSize,c=o.clientHeight,d=o.clientWidth,u=c,h=a.width*c/a.height;return h>d&&(h=d,u=a.height*d/a.width),{width:h,height:u}}(r):t.boundaries=function(s){var o=s.cropper;return{width:o.clientWidth,height:o.clientHeight}}(r),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=W(W({},this.defaultImageTransforms),{},{flip:W({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,r,s,o,a,c=t.defaultVisibleArea||Gp;t.visibleArea=Ut(c)?c({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,r=e.boundaries,s=e.getAreaRestrictions,o=T({},n),a=G(r),o.width/o.height!==a&&(o.height=o.width/a),pe(o,s({visibleArea:o,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(s){if(Pa(s))return!1;var o=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(s)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},d=function(u){return u.port||((u.protocol||o.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==o.protocol&&c.host&&c.host==o.host&&c.host&&d(c)==d(o))}(this.src)){var n=ce(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var r=(t=this.src,new Promise(function(s){rg(t).then(function(o){var a=sg(o);s(o?{source:t,arrayBuffer:o,orientation:a}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(o){console.warn(o),s({source:t,arrayBuffer:null,orientation:null})})}));setTimeout(function(){r.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,n=t.source,r=t.arrayBuffer,s=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,r&&s&&s>1?Aa(n)||!Pa(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([r])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(o){for(var a=[],c=new Uint8Array(o);c.length>0;){var d=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(d):d.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(r):this.imageAttributes.src=n,Ut(this.defaultTransforms)?this.appliedImageTransforms=Mr(this.defaultTransforms()):oi(this.defaultTransforms)?this.appliedImageTransforms=Mr(this.defaultTransforms):this.appliedImageTransforms=function(o){var a=Mr({});if(o)switch(o){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a}(s),this.defaultImageTransforms=W(W({},this.appliedImageTransforms),{},{flip:W({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var o=e.$refs.image;o&&o.complete&&(function(a){return!!a.naturalWidth}(o)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:ui(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=e.sizeRestrictions,r=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(W(W({},e.getPublicProperties()),{},{positionRestrictions:ui(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,r),minHeight:Math.max(n.minHeight,r)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,r=n!==void 0&&n,s=e.normalize,o=s===void 0||s;r&&this.enableTransitions();var a=Zp(W(W({},this.getPublicProperties()),{},{event:o?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,d=a.coordinates;this.visibleArea=c,this.coordinates=d,this.runAutoZoom("manipulateImage"),this.onChange(),r&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,r=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:r})},getAspectRatio:function(t){var e,n,r=this.stencilProps,s=r.aspectRatio,o=r.minAspectRatio,a=r.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();e=c.minimum,n=c.maximum}if(ce(e)&&(e=ce(s)?o:s),ce(n)&&(n=ce(s)?a:s),!t&&(ce(e)||ce(n))){var d=this.getStencilSize(),u=d?G(d):null;ce(e)&&(e=za(u)?u:void 0),ce(n)&&(n=za(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,n=t.stencilSize,r=t.aspectRatio,Cr(G(s=Ut(n)?n({boundaries:e,aspectRatio:r}):n),r)&&(s=nt({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:s.width,height:s.height,aspectRatio:{minimum:r.minimum,maximum:r.maximum}})),(s.width>e.width||s.height>e.height)&&(s=nt({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:s.width,height:s.height,aspectRatio:{minimum:G(s),maximum:G(s)}})),s;var t,e,n,r,s},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return W({},Da)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,s=r===void 0||r;if(!this.transitionsActive){s&&this.enableTransitions();var o=W({},this.imageTransforms.flip),a=Jp({flip:{horizontal:t?!o.horizontal:o.horizontal,vertical:e?!o.vertical:o.vertical},previousFlip:o,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),c=a.visibleArea,d=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=d,this.onChange(),s&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,r=n===void 0||n;if(!this.transitionsActive){r&&this.enableTransitions();var s=W({},this.imageSize);this.appliedImageTransforms.rotate+=t;var o=Xp({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:s,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=o.visibleArea,c=o.coordinates,d=this.processAutoZoom("rotateImage",a,c);a=d.visibleArea,c=d.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),r&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},ag={key:0,ref:"canvas",style:{display:"none"}},lg={key:1,ref:"sourceCanvas",style:{display:"none"}};tl.render=function(t,e,n,r,s,o){return i.openBlock(),i.createBlock("div",{ref:"cropper",class:o.classes.cropper},[i.createVNode("div",{ref:"stretcher",class:o.classes.stretcher},null,2),i.createVNode("div",{class:o.classes.boundaries,style:o.boundariesStyle},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.backgroundWrapperComponent),{class:o.classes.cropperWrapper,"wheel-resize":o.settings.resizeImage.wheel,"touch-resize":o.settings.resizeImage.touch,"touch-move":o.settings.moveImage.touch,"mouse-move":o.settings.moveImage.mouse,onMove:o.onManipulateImage,onResize:o.onManipulateImage},{default:i.withCtx(function(){return[i.createVNode("div",{class:o.classes.background,style:o.boundariesStyle},null,6),i.createVNode("div",{class:o.classes.imageWrapper},[i.createVNode("img",{ref:"image",crossorigin:s.imageAttributes.crossOrigin,src:s.imageAttributes.src,class:o.classes.image,style:o.imageStyle,onMousedown:e[1]||(e[1]=i.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),i.createVNode("div",{class:o.classes.foreground,style:o.boundariesStyle},null,6),i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.stencilComponent),i.mergeProps({ref:"stencil",image:o.image,coordinates:s.coordinates,"stencil-coordinates":o.stencilCoordinates,transitions:o.transitionsOptions},n.stencilProps,{onResize:o.onResize,onResizeEnd:o.onResizeEnd,onMove:o.onMove,onMoveEnd:o.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[i.vShow,s.imageLoaded]]),n.canvas?(i.openBlock(),i.createBlock("canvas",ag,null,512)):i.createCommentVNode("",!0),n.canvas?(i.openBlock(),i.createBlock("canvas",lg,null,512)):i.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const cg={width:0,height:0,left:0,top:0};class $r{constructor(){l(this,"id");l(this,"ratio",0);l(this,"src","");l(this,"coordinates",cg)}setCoordinates(e){this.coordinates=e}getCoordinates(){return this.coordinates}static Create(e,n=0,r){const s=new $r;return s.src=e,s.ratio=n,s.id=r,s}setRatio(e){this.ratio=e}getRatio(){return this.ratio}setSrc(e){this.src=e}getSrc(){return this.src}}const dg={class:"background-container"},ug={class:"dialog-footer"},hg=x(i.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","close","update:ratio"],setup(t,{emit:e}){const n=t,r=e,s=i.ref(n.ratio),o=i.ref($r.Create(n.src,n.ratio));o.value.setRatio(s.value);const a=()=>{o.value.setRatio(s.value)},c=i.ref(),d=async()=>{const u=c.value.getResult();u&&u.canvas.toBlob(h=>{var f;r("crop",{blob:h,src:(f=u.canvas)==null?void 0:f.toDataURL()}),r("update:ratio",o.value.coordinates.width/o.value.coordinates.height)})};return(u,h)=>(i.openBlock(),i.createElementBlock("div",dg,[i.createVNode(ar,{modelValue:i.unref(s),"onUpdate:modelValue":h[0]||(h[0]=f=>i.isRef(s)?s.value=f:null),label:"Задайте пропорции фото",width:"100%",margin:"0 0 20px 0",onChange:a},{default:i.withCtx(()=>h[2]||(h[2]=[i.createElementVNode("option",{label:"2:3 (формат A4)",value:2/3},null,-1),i.createElementVNode("option",{label:"4:3 (для карточек новостей)",value:4/3},null,-1),i.createElementVNode("option",{label:"1:1 (для фото сотрудников)",value:1},null,-1),i.createElementVNode("option",{label:"3:2",value:3/2},null,-1),i.createElementVNode("option",{label:"16:9",value:16/9},null,-1),i.createElementVNode("option",{label:"3:4 (вертикальное изображение)",value:3/4},null,-1),i.createElementVNode("option",{label:"Задать пропорции вручную",value:0},null,-1)])),_:1,__:[2]},8,["modelValue"]),i.createVNode(i.unref(tl),{ref_key:"cropperRef",ref:c,src:i.unref(o).src,"stencil-props":{aspectRatio:i.unref(o).ratio},style:{"max-height":"50vh","min-height":"50vh"},onChange:h[1]||(h[1]=f=>i.unref(o).setCoordinates(f.coordinates))},null,8,["src","stencil-props"]),i.createElementVNode("div",ug,[i.createVNode(Kn,{skin:"text",type:"primary",text:"Сохранить",onClick:d})])]))}}),[["__scopeId","data-v-7b32def2"]]),fg=x(i.defineComponent({__name:"IconUploaderChange",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#uploader-change"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"uploader-change",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M12.825 15.783C12.175 15.787 11.5393 15.7173 10.918 15.574C10.2967 15.4307 9.762 15.1347 9.314 14.686C8.95467 14.3273 8.678 13.9173 8.484 13.456C8.28933 12.9947 8.192 12.5113 8.192 12.006C8.192 11.788 8.207 11.5807 8.237 11.384C8.26633 11.1867 8.31867 10.9873 8.394 10.786C8.43533 10.6633 8.43133 10.5437 8.382 10.427C8.33267 10.3103 8.25467 10.2293 8.148 10.184C8.038 10.1393 7.92567 10.1427 7.811 10.194C7.69633 10.2453 7.61833 10.3327 7.577 10.456C7.49367 10.706 7.428 10.9593 7.38 11.216C7.332 11.472 7.308 11.7333 7.308 12C7.308 12.628 7.42733 13.227 7.666 13.797C7.90533 14.367 8.24533 14.8723 8.686 15.313C9.20067 15.8437 9.81667 16.202 10.534 16.388C11.2513 16.5747 11.9797 16.6697 12.719 16.673L11.756 17.637C11.67 17.723 11.6237 17.8243 11.617 17.941C11.6103 18.0577 11.6567 18.1653 11.756 18.264C11.8553 18.3627 11.9597 18.412 12.069 18.412C12.1783 18.412 12.283 18.3627 12.383 18.264L13.906 16.741C14.0673 16.579 14.148 16.3903 14.148 16.175C14.148 15.9597 14.0673 15.7713 13.906 15.61L12.383 14.087C12.2963 14.0003 12.195 13.954 12.079 13.948C11.9623 13.9413 11.8547 13.9877 11.756 14.087C11.6573 14.1863 11.608 14.2907 11.608 14.4C11.608 14.5093 11.6573 14.614 11.756 14.714L12.825 15.783ZM11.189 8.212C11.839 8.212 12.4753 8.28333 13.098 8.426C13.7213 8.56867 14.2573 8.86433 14.706 9.313C15.0647 9.67233 15.3413 10.0827 15.536 10.544C15.7307 11.0053 15.8277 11.4887 15.827 11.994C15.827 12.212 15.8123 12.4193 15.783 12.616C15.7537 12.8127 15.701 13.0117 15.625 13.213C15.5843 13.3363 15.5887 13.4573 15.638 13.576C15.6873 13.6947 15.765 13.7763 15.871 13.821C15.9817 13.8657 16.0943 13.8657 16.209 13.821C16.3237 13.7763 16.4013 13.6923 16.442 13.569C16.5253 13.319 16.5913 13.0617 16.64 12.797C16.688 12.5323 16.712 12.2667 16.712 12C16.712 11.372 16.5943 10.773 16.359 10.203C16.1237 9.633 15.7837 9.12567 15.339 8.681C14.8203 8.14967 14.2023 7.79233 13.485 7.609C12.7683 7.425 12.04 7.333 11.3 7.333L12.27 6.363C12.3513 6.277 12.3953 6.17567 12.402 6.059C12.4087 5.94233 12.3627 5.83467 12.264 5.736C12.1653 5.63733 12.0607 5.58833 11.95 5.589C11.8393 5.58967 11.735 5.63867 11.637 5.736L10.114 7.26C9.952 7.422 9.871 7.61067 9.871 7.826C9.871 8.04133 9.952 8.22967 10.114 8.391L11.637 9.914C11.723 10.0007 11.8243 10.047 11.941 10.053C12.0577 10.059 12.1653 10.013 12.264 9.915C12.3627 9.817 12.412 9.71233 12.412 9.601C12.412 9.48967 12.3627 9.38533 12.264 9.288L11.189 8.212ZM12 21C10.7573 21 9.58867 20.7633 8.494 20.29C7.39933 19.816 6.447 19.174 5.637 18.364C4.82633 17.5533 4.18433 16.6007 3.711 15.506C3.237 14.4113 3 13.2427 3 12C3 10.7573 3.23667 9.58867 3.71 8.494C4.18333 7.39933 4.82567 6.447 5.637 5.637C6.44833 4.827 7.40067 4.18467 8.494 3.71C9.58933 3.23667 10.758 3 12 3C13.242 3 14.4107 3.23667 15.506 3.71C16.6007 4.184 17.553 4.82633 18.363 5.637C19.1737 6.447 19.8157 7.39933 20.289 8.494C20.763 9.58933 21 10.758 21 12C21 13.242 20.7633 14.4107 20.29 15.506C19.816 16.6007 19.174 17.553 18.364 18.363C17.5533 19.1737 16.6007 19.8157 15.506 20.289C14.4113 20.763 13.2427 21 12 21ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-24be7852"]]),mg=x(i.defineComponent({__name:"IconUploaderDel",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#uploader-del"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"uploader-del",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[i.createElementVNode("path",{d:"M7.616 20.0005C7.168 20.0005 6.78667 19.8431 6.472 19.5285C6.15733 19.2138 6 18.8328 6 18.3855V6.00047H5V5.00047H9V4.23047H15V5.00047H19V6.00047H18V18.3855C18 18.8455 17.846 19.2298 17.538 19.5385C17.23 19.8471 16.8453 20.0011 16.384 20.0005H7.616ZM17 6.00047H7V18.3855C7 18.5648 7.05767 18.7121 7.173 18.8275C7.28833 18.9428 7.436 19.0005 7.616 19.0005H16.385C16.5383 19.0005 16.6793 18.9365 16.808 18.8085C16.9367 18.6805 17.0007 18.5391 17 18.3845V6.00047ZM9.808 17.0005H10.808V8.00047H9.808V17.0005ZM13.192 17.0005H14.192V8.00047H13.192V17.0005Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-dd770f25"]]),pg=x(i.defineComponent({__name:"IconUploaderPlus",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[(i.openBlock(),i.createElementBlock("svg",{class:i.normalizeClass(["icon",t.iconClass]),style:i.normalizeStyle({margin:t.margin,width:t.size,height:t.size})},n[0]||(n[0]=[i.createElementVNode("use",{"xlink:href":"#uploader-plus"},null,-1)]),6)),n[1]||(n[1]=i.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[i.createElementVNode("symbol",{id:"uploader-plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[i.createElementVNode("path",{d:"M8 12H12V8H13V12H17V13H13V17H12V13H8V12ZM12.5 3C15.0196 3 17.4359 4.00089 19.2175 5.78249C20.9991 7.56408 22 9.98044 22 12.5C22 15.0196 20.9991 17.4359 19.2175 19.2175C17.4359 20.9991 15.0196 22 12.5 22C9.98044 22 7.56408 20.9991 5.78249 19.2175C4.00089 17.4359 3 15.0196 3 12.5C3 9.98044 4.00089 7.56408 5.78249 5.78249C7.56408 4.00089 9.98044 3 12.5 3ZM12.5 4C10.2457 4 8.08365 4.89553 6.48959 6.48959C4.89553 8.08365 4 10.2457 4 12.5C4 14.7543 4.89553 16.9163 6.48959 18.5104C8.08365 20.1045 10.2457 21 12.5 21C13.6162 21 14.7215 20.7801 15.7528 20.353C16.7841 19.9258 17.7211 19.2997 18.5104 18.5104C19.2997 17.7211 19.9258 16.7841 20.353 15.7528C20.7801 14.7215 21 13.6162 21 12.5C21 10.2457 20.1045 8.08365 18.5104 6.48959C16.9163 4.89553 14.7543 4 12.5 4Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-92c28425"]]),gg={key:0},yg=["src"],wg={class:"tools-button"},bg={key:1},Cg=["id"],Sg=i.defineComponent({__name:"PUploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{type:ge,required:!0,default:new ge},height:{type:Number,default:150},emitCrop:{type:Boolean,default:!1},ratio:{type:Number,required:!1,default:1}},emits:["crop","removeFile","update:ratio"],setup(t,{emit:e}){const n=i.computed(()=>({width:o.height*f.value+"px",height:o.height+"px"})),r=i.computed(()=>({width:f.value<.66?o.height*.66+"px":o.height*f.value+"px",height:o.height+"px"})),s=i.computed(()=>({width:f.value<.66?o.height*.66+"px":o.height*f.value+"px",height:o.height+"px"})),o=t,a=e,c=i.ref(void 0),d=re.GUID(),u=i.ref(!1),h=i.ref(),f=i.ref(o.ratio),m=i.ref(""),p=()=>{c.value=void 0,f.value=1,a("update:ratio",1),a("removeFile"),w=document.getElementById(d),w.value=""},k=A=>{A.blob.src=A.src,o.fileInfo.setFile(A.blob),o.fileInfo.fileSystemPath&&(c.value=o.fileInfo),u.value=!1,a("crop")};i.watch(()=>[o.fileInfo.description,o.fileInfo.order,o.fileInfo.fileSystemPath],()=>{o.fileInfo.fileSystemPath&&(c.value=o.fileInfo,c.value.url=o.fileInfo.getFileUrl())}),i.onBeforeMount(()=>{o.fileInfo.fileSystemPath&&(c.value=o.fileInfo,c.value.url=o.fileInfo.getFileUrl())});let w=null;i.onMounted(()=>{document.getElementById("drop-area")&&(w=document.getElementById(d))});const b=()=>{w&&w.click()},E=A=>{m.value=A.url,u.value=!0},F=()=>{if(!w||!w.files||!w.files.length)return;const A=w.files[0];A.url=URL.createObjectURL(A),c.value=A,o.fileInfo.setFile(A),o.withCrop&&E(c.value)};return i.watch(f,A=>{a("update:ratio",A)}),(A,v)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",{id:"drop-area",class:"img-container",style:i.normalizeStyle(i.unref(n))},[i.unref(c)?(i.openBlock(),i.createElementBlock("div",gg,[i.createElementVNode("div",{class:"img-block",style:i.normalizeStyle(i.unref(r))},[i.createElementVNode("img",{src:i.unref(c).url,alt:"upload-image"},null,8,yg)],4),i.createElementVNode("div",wg,[i.createElementVNode("div",{class:"ins",style:i.normalizeStyle(i.unref(s))},[i.createElementVNode("div",{class:"change",onClick:v[0]||(v[0]=U=>E(i.unref(c)))},[i.createVNode(fg,{margin:"0 10px 0 0",size:"40px"})]),i.createElementVNode("div",{claSS:"del",onClick:v[1]||(v[1]=U=>p())},[i.createVNode(mg,{size:"40px"})])],4)])])):(i.openBlock(),i.createElementBlock("div",bg,[i.createElementVNode("div",{class:"add-button",style:i.normalizeStyle({width:t.height*i.unref(f)-2+"px",height:t.height-2+"px"}),onClick:b},[i.createVNode(pg,{size:"40px"})],4)]))],4),i.createElementVNode("input",{id:i.unref(d),ref_key:"uploader",ref:h,hidden:"",type:"file",onChange:F},null,40,Cg),i.createVNode(ri,{show:i.unref(u),title:"Настройка изображения","max-height":"90vh",top:"5vh"},{default:i.withCtx(()=>[i.createVNode(hg,{ratio:i.unref(f),"onUpdate:ratio":v[2]||(v[2]=U=>i.isRef(f)?f.value=U:null),src:i.unref(m),onCrop:k,onClose:v[3]||(v[3]=U=>u.value=!1)},null,8,["ratio","src"])]),_:1},8,["show"])],64))}}),nl=x(Sg,[["__scopeId","data-v-d0c48ec7"]]);function il(t){t.component("PTabs",Ba),t.component("PUploaderFile",Ra),t.component("PUploaderImage",nl),t.component("PAuthForm",hr),t.component("PAuthModal",va),t.component("PNameEdit",Ma)}const kg=Object.freeze(Object.defineProperty({__proto__:null,PAuthForm:hr,PAuthModal:va,PNameEdit:Ma,PTabs:Ba,PUploaderFile:Ra,PUploaderImage:nl,default:il},Symbol.toStringTag,{value:"Module"})),Eg={install:function(t){vo(t),xa(t),pa(t),il(t),na(t)}},xg=["PF","PFM"];j.Auth=ae,j.AuthButtonLogin=bi,j.AuthButtonRefresh=Vr,j.AuthButtonRegister=Ci,j.AuthButtonRestore=Sn,j.AuthChunks=ue,j.AuthFieldsIds=Ye,j.AuthFormSettings=Lr,j.AuthMethods=At,j.EmailField=En,j.LoginField=gf,j.PF=$,j.PFM=pf,j.PasswordField=xn,j.PasswordRepeatField=Dr,j.atoms=rm,j.components=sp,j.icons=op,j.molecules=bp,j.organisms=kg,j.pfName=xg,j.servicesComponents=Eg,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
14
+ ***************************************************************************** */var Ar;(function(s){(function(e){var t=typeof globalThis=="object"?globalThis:typeof Fr=="object"?Fr:typeof self=="object"?self:typeof this=="object"?this:l(),r=i(s);typeof t.Reflect<"u"&&(r=i(t.Reflect,r)),e(r,t),typeof t.Reflect>"u"&&(t.Reflect=s);function i(d,h){return function(m,w){Object.defineProperty(d,m,{configurable:!0,writable:!0,value:w}),h&&h(m,w)}}function o(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function l(){return o()||a()}})(function(e,t){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",l=typeof Object.create=="function",d={__proto__:[]}instanceof Array,h=!l&&!d,m={create:l?function(){return Cr(Object.create(null))}:d?function(){return Cr({__proto__:null})}:function(){return Cr({})},has:h?function(u,f){return r.call(u,f)}:function(u,f){return f in u},get:h?function(u,f){return r.call(u,f)?u[f]:void 0}:function(u,f){return u[f]}},w=Object.getPrototypeOf(Function),I=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Hu(),A=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:qu(),G=typeof WeakMap=="function"?WeakMap:Vu(),N=i?Symbol.for("@reflect-metadata:registry"):void 0,P=Gu(),g=ju(P);function F(u,f,p,y){if(_(p)){if(!Wt(u))throw new TypeError;if(!Jt(f))throw new TypeError;return Rt(u,f)}else{if(!Wt(u))throw new TypeError;if(!X(f))throw new TypeError;if(!X(y)&&!_(y)&&!be(y))throw new TypeError;return be(y)&&(y=void 0),p=Me(p),Ts(u,f,p,y)}}e("decorate",F);function x(u,f){function p(y,T){if(!X(y))throw new TypeError;if(!_(T)&&!Qt(T))throw new TypeError;Fs(u,f,y,T)}return p}e("metadata",x);function L(u,f,p,y){if(!X(p))throw new TypeError;return _(y)||(y=Me(y)),Fs(u,f,p,y)}e("defineMetadata",L);function se(u,f,p){if(!X(f))throw new TypeError;return _(p)||(p=Me(p)),Se(u,f,p)}e("hasMetadata",se);function W(u,f,p){if(!X(f))throw new TypeError;return _(p)||(p=Me(p)),Ve(u,f,p)}e("hasOwnMetadata",W);function xe(u,f,p){if(!X(f))throw new TypeError;return _(p)||(p=Me(p)),ze(u,f,p)}e("getMetadata",xe);function qt(u,f,p){if(!X(f))throw new TypeError;return _(p)||(p=Me(p)),Mt(u,f,p)}e("getOwnMetadata",qt);function Vt(u,f){if(!X(u))throw new TypeError;return _(f)||(f=Me(f)),zt(u,f)}e("getMetadataKeys",Vt);function De(u,f){if(!X(u))throw new TypeError;return _(f)||(f=Me(f)),_e(u,f)}e("getOwnMetadataKeys",De);function Ue(u,f,p){if(!X(f))throw new TypeError;if(_(p)||(p=Me(p)),!X(f))throw new TypeError;_(p)||(p=Me(p));var y=Zt(f,p,!1);return _(y)?!1:y.OrdinaryDeleteMetadata(u,f,p)}e("deleteMetadata",Ue);function Rt(u,f){for(var p=u.length-1;p>=0;--p){var y=u[p],T=y(f);if(!_(T)&&!be(T)){if(!Jt(T))throw new TypeError;f=T}}return f}function Ts(u,f,p,y){for(var T=u.length-1;T>=0;--T){var re=u[T],ee=re(f,p,y);if(!_(ee)&&!be(ee)){if(!X(ee))throw new TypeError;y=ee}}return y}function Se(u,f,p){var y=Ve(u,f,p);if(y)return!0;var T=Yt(f);return be(T)?!1:Se(u,T,p)}function Ve(u,f,p){var y=Zt(f,p,!1);return _(y)?!1:lt(y.OrdinaryHasOwnMetadata(u,f,p))}function ze(u,f,p){var y=Ve(u,f,p);if(y)return Mt(u,f,p);var T=Yt(f);if(!be(T))return ze(u,T,p)}function Mt(u,f,p){var y=Zt(f,p,!1);if(!_(y))return y.OrdinaryGetOwnMetadata(u,f,p)}function Fs(u,f,p,y){var T=Zt(p,y,!0);T.OrdinaryDefineOwnMetadata(u,f,p,y)}function zt(u,f){var p=_e(u,f),y=Yt(u);if(y===null)return p;var T=zt(y,f);if(T.length<=0)return p;if(p.length<=0)return T;for(var re=new A,ee=[],$=0,C=p;$<C.length;$++){var R=C[$],M=re.has(R);M||(re.add(R),ee.push(R))}for(var O=0,B=T;O<B.length;O++){var R=B[O],M=re.has(R);M||(re.add(R),ee.push(R))}return ee}function _e(u,f){var p=Zt(u,f,!1);return p?p.OrdinaryOwnMetadataKeys(u,f):[]}function K(u){if(u===null)return 1;switch(typeof u){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return u===null?1:6;default:return 6}}function _(u){return u===void 0}function be(u){return u===null}function at(u){return typeof u=="symbol"}function X(u){return typeof u=="object"?u!==null:typeof u=="function"}function H(u,f){switch(K(u)){case 0:return u;case 1:return u;case 2:return u;case 3:return u;case 4:return u;case 5:return u}var p="string",y=D(u,o);if(y!==void 0){var T=y.call(u,p);if(X(T))throw new TypeError;return T}return me(u)}function me(u,f){var p,y;{var T=u.toString;if(ge(T)){var y=T.call(u);if(!X(y))return y}var p=u.valueOf;if(ge(p)){var y=p.call(u);if(!X(y))return y}}throw new TypeError}function lt(u){return!!u}function As(u){return""+u}function Me(u){var f=H(u);return at(f)?f:As(f)}function Wt(u){return Array.isArray?Array.isArray(u):u instanceof Object?u instanceof Array:Object.prototype.toString.call(u)==="[object Array]"}function ge(u){return typeof u=="function"}function Jt(u){return typeof u=="function"}function Qt(u){switch(K(u)){case 3:return!0;case 4:return!0;default:return!1}}function Ce(u,f){return u===f||u!==u&&f!==f}function D(u,f){var p=u[f];if(p!=null){if(!ge(p))throw new TypeError;return p}}function ce(u){var f=D(u,a);if(!ge(f))throw new TypeError;var p=f.call(u);if(!X(p))throw new TypeError;return p}function Ie(u){return u.value}function Ne(u){var f=u.next();return f.done?!1:f}function Xt(u){var f=u.return;f&&f.call(u)}function Yt(u){var f=Object.getPrototypeOf(u);if(typeof u!="function"||u===w||f!==w)return f;var p=u.prototype,y=p&&Object.getPrototypeOf(p);if(y==null||y===Object.prototype)return f;var T=y.constructor;return typeof T!="function"||T===u?f:T}function ct(){var u;!_(N)&&typeof t.Reflect<"u"&&!(N in t.Reflect)&&typeof t.Reflect.defineMetadata=="function"&&(u=Lu(t.Reflect));var f,p,y,T=new G,re={registerProvider:ee,getProvider:C,setProvider:M};return re;function ee(O){if(!Object.isExtensible(re))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case u===O:break;case _(f):f=O;break;case f===O:break;case _(p):p=O;break;case p===O:break;default:y===void 0&&(y=new A),y.add(O);break}}function $(O,B){if(!_(f)){if(f.isProviderFor(O,B))return f;if(!_(p)){if(p.isProviderFor(O,B))return f;if(!_(y))for(var z=ce(y);;){var Z=Ne(z);if(!Z)return;var Te=Ie(Z);if(Te.isProviderFor(O,B))return Xt(z),Te}}}if(!_(u)&&u.isProviderFor(O,B))return u}function C(O,B){var z=T.get(O),Z;return _(z)||(Z=z.get(B)),_(Z)&&(Z=$(O,B),_(Z)||(_(z)&&(z=new I,T.set(O,z)),z.set(B,Z))),Z}function R(O){if(_(O))throw new TypeError;return f===O||p===O||!_(y)&&y.has(O)}function M(O,B,z){if(!R(z))throw new Error("Metadata provider not registered.");var Z=C(O,B);if(Z!==z){if(!_(Z))return!1;var Te=T.get(O);_(Te)&&(Te=new I,T.set(O,Te)),Te.set(B,z)}return!0}}function Gu(){var u;return!_(N)&&X(t.Reflect)&&Object.isExtensible(t.Reflect)&&(u=t.Reflect[N]),_(u)&&(u=ct()),!_(N)&&X(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,N,{enumerable:!1,configurable:!1,writable:!1,value:u}),u}function ju(u){var f=new G,p={isProviderFor:function(R,M){var O=f.get(R);return _(O)?!1:O.has(M)},OrdinaryDefineOwnMetadata:ee,OrdinaryHasOwnMetadata:T,OrdinaryGetOwnMetadata:re,OrdinaryOwnMetadataKeys:$,OrdinaryDeleteMetadata:C};return P.registerProvider(p),p;function y(R,M,O){var B=f.get(R),z=!1;if(_(B)){if(!O)return;B=new I,f.set(R,B),z=!0}var Z=B.get(M);if(_(Z)){if(!O)return;if(Z=new I,B.set(M,Z),!u.setProvider(R,M,p))throw B.delete(M),z&&f.delete(R),new Error("Wrong provider for target.")}return Z}function T(R,M,O){var B=y(M,O,!1);return _(B)?!1:lt(B.has(R))}function re(R,M,O){var B=y(M,O,!1);if(!_(B))return B.get(R)}function ee(R,M,O,B){var z=y(O,B,!0);z.set(R,M)}function $(R,M){var O=[],B=y(R,M,!1);if(_(B))return O;for(var z=B.keys(),Z=ce(z),Te=0;;){var ei=Ne(Z);if(!ei)return O.length=Te,O;var zu=Ie(ei);try{O[Te]=zu}catch(Wu){try{Xt(Z)}finally{throw Wu}}Te++}}function C(R,M,O){var B=y(M,O,!1);if(_(B)||!B.delete(R))return!1;if(B.size===0){var z=f.get(M);_(z)||(z.delete(O),z.size===0&&f.delete(z))}return!0}}function Lu(u){var f=u.defineMetadata,p=u.hasOwnMetadata,y=u.getOwnMetadata,T=u.getOwnMetadataKeys,re=u.deleteMetadata,ee=new G,$={isProviderFor:function(C,R){var M=ee.get(C);return!_(M)&&M.has(R)?!0:T(C,R).length?(_(M)&&(M=new A,ee.set(C,M)),M.add(R),!0):!1},OrdinaryDefineOwnMetadata:f,OrdinaryHasOwnMetadata:p,OrdinaryGetOwnMetadata:y,OrdinaryOwnMetadataKeys:T,OrdinaryDeleteMetadata:re};return $}function Zt(u,f,p){var y=P.getProvider(u,f);if(!_(y))return y;if(p){if(P.setProvider(u,f,g))return g;throw new Error("Illegal state.")}}function Hu(){var u={},f=[],p=function(){function $(C,R,M){this._index=0,this._keys=C,this._values=R,this._selector=M}return $.prototype["@@iterator"]=function(){return this},$.prototype[a]=function(){return this},$.prototype.next=function(){var C=this._index;if(C>=0&&C<this._keys.length){var R=this._selector(this._keys[C],this._values[C]);return C+1>=this._keys.length?(this._index=-1,this._keys=f,this._values=f):this._index++,{value:R,done:!1}}return{value:void 0,done:!0}},$.prototype.throw=function(C){throw this._index>=0&&(this._index=-1,this._keys=f,this._values=f),C},$.prototype.return=function(C){return this._index>=0&&(this._index=-1,this._keys=f,this._values=f),{value:C,done:!0}},$}(),y=function(){function $(){this._keys=[],this._values=[],this._cacheKey=u,this._cacheIndex=-2}return Object.defineProperty($.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),$.prototype.has=function(C){return this._find(C,!1)>=0},$.prototype.get=function(C){var R=this._find(C,!1);return R>=0?this._values[R]:void 0},$.prototype.set=function(C,R){var M=this._find(C,!0);return this._values[M]=R,this},$.prototype.delete=function(C){var R=this._find(C,!1);if(R>=0){for(var M=this._keys.length,O=R+1;O<M;O++)this._keys[O-1]=this._keys[O],this._values[O-1]=this._values[O];return this._keys.length--,this._values.length--,Ce(C,this._cacheKey)&&(this._cacheKey=u,this._cacheIndex=-2),!0}return!1},$.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=u,this._cacheIndex=-2},$.prototype.keys=function(){return new p(this._keys,this._values,T)},$.prototype.values=function(){return new p(this._keys,this._values,re)},$.prototype.entries=function(){return new p(this._keys,this._values,ee)},$.prototype["@@iterator"]=function(){return this.entries()},$.prototype[a]=function(){return this.entries()},$.prototype._find=function(C,R){if(!Ce(this._cacheKey,C)){this._cacheIndex=-1;for(var M=0;M<this._keys.length;M++)if(Ce(this._keys[M],C)){this._cacheIndex=M;break}}return this._cacheIndex<0&&R&&(this._cacheIndex=this._keys.length,this._keys.push(C),this._values.push(void 0)),this._cacheIndex},$}();return y;function T($,C){return $}function re($,C){return C}function ee($,C){return[$,C]}}function qu(){var u=function(){function f(){this._map=new I}return Object.defineProperty(f.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),f.prototype.has=function(p){return this._map.has(p)},f.prototype.add=function(p){return this._map.set(p,p),this},f.prototype.delete=function(p){return this._map.delete(p)},f.prototype.clear=function(){this._map.clear()},f.prototype.keys=function(){return this._map.keys()},f.prototype.values=function(){return this._map.keys()},f.prototype.entries=function(){return this._map.entries()},f.prototype["@@iterator"]=function(){return this.keys()},f.prototype[a]=function(){return this.keys()},f}();return u}function Vu(){var u=16,f=m.create(),p=y();return function(){function C(){this._key=y()}return C.prototype.has=function(R){var M=T(R,!1);return M!==void 0?m.has(M,this._key):!1},C.prototype.get=function(R){var M=T(R,!1);return M!==void 0?m.get(M,this._key):void 0},C.prototype.set=function(R,M){var O=T(R,!0);return O[this._key]=M,this},C.prototype.delete=function(R){var M=T(R,!1);return M!==void 0?delete M[this._key]:!1},C.prototype.clear=function(){this._key=y()},C}();function y(){var C;do C="@@WeakMap@@"+$();while(m.has(f,C));return f[C]=!0,C}function T(C,R){if(!r.call(C,p)){if(!R)return;Object.defineProperty(C,p,{value:m.create()})}return C[p]}function re(C,R){for(var M=0;M<R;++M)C[M]=Math.random()*255|0;return C}function ee(C){if(typeof Uint8Array=="function"){var R=new Uint8Array(C);return typeof crypto<"u"?crypto.getRandomValues(R):typeof msCrypto<"u"?msCrypto.getRandomValues(R):re(R,C),R}return re(new Array(C),C)}function $(){var C=ee(u);C[6]=C[6]&79|64,C[8]=C[8]&191|128;for(var R="",M=0;M<u;++M){var O=C[M];(M===4||M===6||M===8)&&(R+="-"),O<16&&(R+="0"),R+=O.toString(16).toLowerCase()}return R}}function Cr(u){return u.__=void 0,delete u.__,u}})})(Ar||(Ar={}));const ne=[];for(let s=0;s<256;++s)ne.push((s+256).toString(16).slice(1));function Oi(s,e=0){return(ne[s[e+0]]+ne[s[e+1]]+ne[s[e+2]]+ne[s[e+3]]+"-"+ne[s[e+4]]+ne[s[e+5]]+"-"+ne[s[e+6]]+ne[s[e+7]]+"-"+ne[s[e+8]]+ne[s[e+9]]+"-"+ne[s[e+10]]+ne[s[e+11]]+ne[s[e+12]]+ne[s[e+13]]+ne[s[e+14]]+ne[s[e+15]]).toLowerCase()}const Pi=new Uint8Array(16);function _i(){return crypto.getRandomValues(Pi)}function Be(s,e,t){return crypto.randomUUID?crypto.randomUUID():Ii(s)}function Ii(s,e,t){var i;s=s||{};const r=s.random??((i=s.rng)==null?void 0:i.call(s))??_i();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Oi(r)}class de{static UUID(){return Be()}static GUID(){const e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}function Ti(s){var e=[];if(s.length===0)return"";if(typeof s[0]!="string")throw new TypeError("Url must be a string. Received "+s[0]);if(s[0].match(/^[^/:]+:\/*$/)&&s.length>1){var t=s.shift();s[0]=t+s[0]}s[0].match(/^file:\/\/\//)?s[0]=s[0].replace(/^([^/:]+):\/*/,"$1:///"):s[0]=s[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<s.length;r++){var i=s[r];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(r>0&&(i=i.replace(/^[\/]+/,"")),r<s.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),e.push(i))}var o=e.join("/");o=o.replace(/\/(\?|&|#[^!])/g,"$1");var a=o.split("?");return o=a.shift()+(a.length>0?"?":"")+a.join("&"),o}function Gs(){var s;return typeof arguments[0]=="object"?s=arguments[0]:s=[].slice.call(arguments),Ti(s)}class j{static Capitalize(e){return e?e[0].toUpperCase()+e.slice(1):""}static BuildSafeUrl(e,t,r){try{const i=new URL(e);return t&&(i.port=t.toString()),Gs(i.toString(),r)}catch{throw new Error(`Invalid host URL: ${e}`)}}static ToCamelCase(e){const t=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return e.match(t).map((i,o)=>o===0?i.toLowerCase():j.Capitalize(i.toLowerCase())).join("")}static ToKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(e,t,r){return e.substring(e.indexOf(t)+2,e.lastIndexOf(r))}static Translit(e,t){const r={q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","[":"х","]":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю","/":"."};return t&&/[а-яА-Я]/g.test(e)?e.replace(/[А-я/,.;'\][]/g,i=>{if(i===i.toLowerCase()){const a=Object.keys(r).find(l=>r[l]===i);return a||""}const o=Object.keys(r).find(a=>r[a]===i.toLowerCase());return o?o.toUpperCase():""}):e.replace(/[A-z/,.;'\][]/g,i=>i===i.toLowerCase()?r[i]:r[i.toLowerCase()].toUpperCase())}static RemoveEmoji(e){const t=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return e.replace(t,"")}static CanBeTranslited(e){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(e)}static StringsEquals(e,t){const r=e.toLowerCase().replaceAll(/\s/g,""),i=t.toLowerCase().replaceAll(/\s/g,""),o=j.Translit(r),a=j.Translit(i);return r.includes(i)||o.includes(i)||r.includes(a)}static SearchIn(e,t){return j.StringsEquals(e,t)}static SearchInFields(e,t){let r=!1;for(let i=0;i<t.length;i++)if(j.SearchIn(t[i],e)){r=!0;break}return r}static FormatToPercentage(e){return`${e}%`}static ApplyClassToSubStr(e,t,r){const i=r??"highlight-text",o=new RegExp(j.GetVariants(t).join("|"),"gi");return e.replace(o,`<span class="${i}">$&</span>`)}static GetVariants(e){const t=j.Translit(e);return[e,j.Capitalize(e),e.toLowerCase(),e.toUpperCase(),t,j.Capitalize(t),t.toLowerCase(),t.toUpperCase()]}static ContainsNum(e){return/\d/.test(e)}static JoinSnake(...e){return e.join("_")}static GetDynamicCountName(e,t){const r=[2,0,1,1,1,2];return e.length+" "+t[e.length%100>4&&e.length%100<20?2:r[e.length%10<5?e.length%10:5]]}static TrimText(e){return typeof e=="string"?e.trim():e}}const He=class He{static BuildClass(e,t){t&&Object.keys(t).forEach(r=>{const i=t[r];if(this.isPrimitive(i))e[r]instanceof Date?e[r]=new Date(i):e[r]=i;else if(i!=null&&!Array.isArray(i))if(e[r]&&e[r].constructor)e[r]=new e[r].constructor(i);else{const o=Reflect.getMetadata(r,e);o&&(e[r]=new o[r](i))}if(Array.isArray(i)){if(i.length===0)return;const o=Reflect.getMetadata(r,e);i.length!==0&&!o&&(e[r]=i),o&&(e[r]=i.map(a=>new o[r](a)))}})}static isPrimitive(e){return e!==null&&typeof e<"u"&&e!==Object(e)}static RemoveFromClassByIndex(e,t,r){He.RemoveFromClass(e,t,r)}static RemoveFromClassById(e,t,r){if(!e)return;const i=t.findIndex(o=>o.id===e);He.RemoveFromClass(i,t,r)}static RemoveFromClass(e,t,r){if(e<0)return;const i=t[e].id;i&&r&&r.push(i),t.splice(e,1)}static GetPropertyName(e){const t=new e;return new Proxy(t,{get(r,i){return i}})}static InitClassInstance(e,t){const r=e.constructor(t);return He.BuildClass(r),r.id=de.UUID(),r}static ExistsWithId(e,t){return e.some(r=>r.id===t)}static DeepMap(e){return t=>Array.isArray(t)?t.map(He.DeepMap(e)):Object(t)===t?Object.fromEntries(Object.entries(t).map(([r,i])=>[r,He.DeepMap(e)(i)])):e(t)}static DeepTrim(e){return this.DeepMap(j.TrimText)(e)}};n(He,"GetClassConstructor",e=>(t,r)=>{const i=Reflect.getMetadata(`property:${r}`,t)||{};i[r]=e,Reflect.defineMetadata(r,i,t)});let v=He;class Je{constructor(e){n(this,"id");n(this,"address");n(this,"description");n(this,"contactId");v.BuildClass(this,e)}static Create(){const e=new Je;return e.id=de.UUID(),e}}class js{static Setup(e="http://localhost",t="9000",r="api"){this.staticUrl=j.BuildSafeUrl(e,t,r),this.staticUrl=Gs(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}n(js,"staticUrl","");class we{constructor(e){n(this,"name","");n(this,"url","");n(this,"src","");n(this,"raw");n(this,"blob");n(this,"file");n(this,"type","");n(this,"id");n(this,"originalName","");n(this,"fileSystemPath","");n(this,"itemId");n(this,"itemOneId");n(this,"description","");n(this,"order",0);v.BuildClass(this,e)}getFileUrl(){const e=this.url?this.url:`${js.StaticUrl}/${this.fileSystemPath}`;return new URL(e,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Oe&&Oe.tagName.toUpperCase()==="SCRIPT"&&Oe.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(e,t){const r=new we;return r.id=t??de.UUID(),r.originalName=e.name,r.file=e.blob,r.fileSystemPath=de.UUID(),r}setFile(e){this.id||(this.id=de.UUID()),this.originalName=e.name,this.file=e,this.fileSystemPath=de.UUID(),this.url=e.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(e,t){if(e.target){let r="";return t&&(r=`@/assets/img/${t}`),new URL(r,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Oe&&Oe.tagName.toUpperCase()==="SCRIPT"&&Oe.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(e){const t=e.split(".");return t[t.length-1]}}class xr{constructor(e){n(this,"id");n(this,"name","");n(this,"surname","");n(this,"patronymic","");n(this,"isMale",!0);n(this,"dateBirth",new Date);n(this,"contactId");n(this,"slug","");n(this,"postIndex","");n(this,"address","");n(this,"editNameMode",!1);v.BuildClass(this,e)}setEditNameMode(e){this.editNameMode=e}getFullName(){return!this.surname.length&&!this.name.length&&!this.patronymic.length?"":`${this.surname} ${this.name} ${this.patronymic}`}getInitialsName(){return`${this.name.slice(0,1)}.${this.patronymic.slice(0,1)}. ${this.surname}`}getGender(e){return e?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=j.Capitalize(this.name),this.surname=j.Capitalize(this.surname),this.patronymic=j.Capitalize(this.patronymic)}trimName(){this.name=this.name.trim(),this.surname=this.surname.trim(),this.patronymic=this.patronymic.trim()}sanitizeName(){this.trimName(),this.capitalizeName()}setFullName(e){this.surname=e.surname,this.name=e.name,this.patronymic=e.patronymic}}class Qe{constructor(e){n(this,"id");n(this,"number");n(this,"description");n(this,"contactId");v.BuildClass(this,e)}static Create(){const e=new Qe;return e.id=de.UUID(),e}}class rs{constructor(e){n(this,"id");n(this,"address");n(this,"description");v.BuildClass(this,e)}}class ns{constructor(e){n(this,"id");n(this,"login","");n(this,"email","");n(this,"password","");v.BuildClass(this,e)}static Create(){const e=new ns;return e.id=de.UUID(),e}}class Ls{constructor(e){n(this,"id");n(this,"address");n(this,"description");v.BuildClass(this,e)}}class Ge{}n(Ge,"Phone",Qe),n(Ge,"FileInfo",we),n(Ge,"Website",Ls),n(Ge,"Email",Je),n(Ge,"Human",xr),n(Ge,"PostAddress",rs),n(Ge,"UserAccount",ns);var J=(s=>(s.Eq="=",s.Ne="!=",s.Gt=">",s.Lt="<",s.Btw="between",s.In="in",s.Like="like",s.Null="is null",s.NotNull="is not null",s))(J||{});class is{constructor(e){n(this,"field","");n(this,"operator",J.Eq);n(this,"value","");v.BuildClass(this,e)}setValue(e){this.value=e}static Create(e,t){return new is({operator:t,field:e})}eq(e){return this.field===e.field&&this.operator===e.operator}isUnary(){return this.operator===J.Eq||this.operator===J.Gt||this.operator===J.Lt}isBetween(){return this.operator===J.Btw}isSet(){return this.operator===J.In}}class Hs{constructor(e){n(this,"model","");n(this,"field","");n(this,"value","");n(this,"wheres",[]);v.BuildClass(this,e)}static Create(e){const t=new Hs;return t.model=e.GetClassName(),t}eq(e){return e.model===this.model&&e.field===this.field}addWhere(e,t){const r=this.findWhere({field:e,operator:t});if(r)return r;const i=is.Create(e,t);return this.wheres.push(i),i}findWhere(e){return this.wheres.find(t=>t.eq(e))}}let Dr=class ti{constructor(e){n(this,"id");n(this,"model","");n(this,"wheres",[]);n(this,"joins",[]);v.BuildClass(this,e)}static Create(e){const t=new ti;return t.model=e.GetClassName(),t}addWhere(e,t){const r=this.findWhere({field:e,operator:t});if(r)return r;const i=is.Create(e,t);return this.wheres.push(i),i}removeWhere(e){const t=this.wheres.findIndex(r=>r.eq(e));t>-1&&this.wheres.splice(t,1)}addJoin(e){const t=this.findJoin({model:e.GetClassName()});if(t)return t;const r=Hs.Create(e);return this.joins.push(r),r}findJoin(e){return this.joins.find(t=>t.eq(e))}findWhere(e){return this.wheres.find(t=>t.eq(e))}toRef(){return E.ref(this)}};class Xe{static Shuffle(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1));[e[t],e[r]]=[e[r],e[t]]}}static GenerateNumsRange(e,t,r=1){return Array.from({length:(t-e)/r+1},(i,o)=>e+o*r)}static GetLast(e){return e[e.length-1]}static GetFirst(e){return e[0]}static GetRandEL(e){return e[Math.floor(Math.random()*e.length)]}static Sort(e){e.forEach((t,r)=>t.order=r)}static Refill(e,t){e.splice(0,e.length),e.push(...t)}static Eq(e,t){return e.length===t.length&&(e==null?void 0:e.every((r,i)=>e[i]==t[i]))}static SwipeById(e,t,r){const i=e.findIndex(a=>t.id===a.id),o=e.findIndex(a=>r.id===a.id);i||o||([e[i],e[o]]=[e[o],e[i]])}static Swap(e,t,r){if(t<0||t>=e.length||r<0||r>=e.length)return;const i=e[t];e[t]=e[r],e[r]=i}static MoveUp(e,t){e[t].order=t-1,e[t-1]&&(e[t-1].order=t),[e[t],e[t-1]]=[e[t-1],e[t]]}static MoveDown(e,t){e[t].order=t+1,e[t+1]&&(e[t+1].order=t),[e[t],e[t+1]]=[e[t+1],e[t]]}}var te=(s=>(s.Date="date",s.String="string",s.Boolean="boolean",s.Number="number",s.Set="set",s.Join="join",s.ArrayString="arrayString",s.ArrayNumber="arrayNumber",s))(te||{}),Fi=Object.defineProperty,Ai=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&Fi(e,t,i),i};const Ur=class Kt{constructor(e){n(this,"id");n(this,"model","");n(this,"label","");n(this,"col","");n(this,"operator",J.Eq);n(this,"date1");n(this,"date2");n(this,"value1","");n(this,"boolean",!1);n(this,"number",0);n(this,"type",te.String);n(this,"set",[]);n(this,"isSet",!1);n(this,"joinTable","");n(this,"joinTableModel","");n(this,"joinTableFk","");n(this,"joinTablePk","");n(this,"joinTableId","");n(this,"joinTableIdCol","");v.BuildClass(this,e)}eq(e){if(!e)return!1;if(this.type===te.Join){const t=e.model===this.model&&e.operator===this.operator&&this.joinTableModel===e.joinTableModel;return e.operator===J.In?t&&Xe.Eq(this.set,e.set):t}return e.model===this.model&&e.col===this.col&&e.operator===this.operator}valueEq(e){return!this||!e||!this.eq(e)?!1:this.type===te.Boolean?this.boolean===(e==null?void 0:e.boolean):this.type===te.String?this.value1===(e==null?void 0:e.value1):this.type===te.Join&&this.set.length?Xe.Eq(this.set,e.set):!1}toUrlQuery(){const e=this.type?`"type":"${this.type}"`:"",t=this.model?`"model":"${this.model}"`:"",r=this.col?`"col":"${this.col}"`:"",i=this.operator?`"operator":"${this.operator}"`:"",o=this.value1?`"value1":"${this.value1}"`:"",a=this.type===te.Boolean?`"boolean":${this.boolean}`:"",l=this.type===te.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",d=this.type===te.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",h=this.type===te.Number?`"number":${this.number}`:"",m=this.type===te.Set||this.operator===J.In?`"set":${JSON.stringify(this.set)}`:"",w=this.type===te.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[e,t,r,i,o,a,l,d,h,m,w].filter(I=>I!=="").toString()}fromUrlQuery(e){this.model=e.get("model")??"",this.col=e.get("col")??"",this.label=e.get("label")??"",this.operator=e.get("operator")??"",this.value1=e.get("value1")??"",this.type=e.get("type")??"",this.boolean=!!(e.get("boolean")??""),this.joinTableModel=e.get("joinTableModel")??"",this.joinTableId=e.get("joinTableId")??"",this.joinTableFk=e.get("joinTableFk")??"",this.joinTableIdCol=e.get("joinTableIdCol")??"",this.joinTablePk=e.get("joinTablePk")??""}isUnaryFilter(){return this.operator===J.Eq||this.operator===J.Gt||this.operator===J.Lt}isBetweenFilter(){return this.operator===J.Btw}isSetFilter(){return this.operator===J.In}static Create(e,t,r){const i=new Kt;return i.model=e.GetClassName(),i.col=t??"",i.type=r,i.type===te.Number&&(i.value1="0"),i.type===te.String&&(i.value1=""),i.type===te.Boolean&&(i.value1="false",i.operator=J.Eq),i}static CreateFilterModelWithJoin(e,t,r,i,o,a,l,d){const h=new Kt;return h.id=Be(),h.joinTable=r,h.joinTablePk=i,h.joinTableFk=o,h.col=t,h.type=a,l&&(h.joinTableId=l),d&&(h.joinTableIdCol=d),h}static CreateFilterModelWithJoinV2(e,t,r,i,o,a,l){const d=new Kt;return d.model=e,d.joinTableModel=r,d.joinTablePk=i,d.joinTableFk=o,d.col=t,d.type=te.Join,a&&(d.joinTableId=a),l&&(d.joinTableIdCol=l),d}static OnlyIfSecondModelExists(e,t){const r=new Kt;return r.id=Be(),r.model=j.ToCamelCase(e.GetClassName()),r.joinTableModel=j.ToCamelCase(t.GetClassName()),r.type=te.Join,r}addToSet(...e){e.forEach(t=>{if(this.set.indexOf(t)===-1){this.set.push(t);return}this.set=this.set.filter(r=>r!==t)})}pushToSet(...e){e.forEach(t=>{this.set.indexOf(t)===-1&&this.set.push(t)})}replaceSet(...e){this.set=e}setBoolean(e){this.boolean=e}toRef(){return E.ref(this)}setDate1(e){this.date1=e}setDate2(e){this.date2=e}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(e,t){if(!e&&!t){this.dropDates();return}if(!t){this.setDate1(e),this.operator=J.Eq;return}this.setDate2(t),this.operator=J.Btw}};Ai([v.GetClassConstructor(String)],Ur.prototype,"set");let Nr=Ur;class xi{constructor(){n(this,"operation",J.Lt);n(this,"column","");n(this,"value");n(this,"initial",!0);n(this,"tableName","");n(this,"version","");n(this,"model","")}toUrlQuery(){const e=this.operation?`"operation":"${this.operation}"`:"",t=this.column?`"column":"${this.column}"`:"",r=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,i=r?`"value":"${r}"`:"",o=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[e,t,i,o,a].filter(l=>l!=="").toString()}fromUrlQuery(e){e.cursvalue&&(this.value=e.cursvalue),e.curscolumn&&(this.column=String(e.curscolumn)),e.cursinitial!==void 0&&(this.initial=!!e.cursinitial),e.curstableName&&(this.tableName=String(e.curstableName)),e.cursoperation&&(this.operation=e.cursoperation)}}class os{constructor(e){n(this,"page",0);n(this,"rowsPerPage",25);n(this,"rowsNumber",0);n(this,"cursor",new xi);n(this,"cursorMode",!1);n(this,"append",!1);n(this,"allLoaded",!1);n(this,"version","");v.BuildClass(this,e)}setLoadMore(e,t,r){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=J.Gt,this.cursor.column=t,this.cursor.tableName=r,this.cursorMode=!0}setLoadMoreV2(e,t,r){this.cursor.value=e,this.cursor.initial=!1,this.cursor.operation=J.Gt,this.cursor.column=t,this.cursor.model=r,this.cursorMode=!0,this.version="v2"}setOffset(e){this.page=e}toUrlQuery(){const e=`"offset":${this.offset}`,t=`"limit":${this.limit}`,r=`"cursorMode":${this.cursorMode}`,i=`"append":${this.append}`,o=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[e,t,r,i,o,a].toString()}fromUrlQuery(){const e=window.location.search,t=e.substring(e.indexOf("p=")+2,e.lastIndexOf("|")),r=new URLSearchParams(decodeURIComponent(t));this.page=Number(r.get("offset")),this.rowsPerPage=Number(r.get("col"))}setAllLoaded(e){this.allLoaded=!(e>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,v.BuildClass(this)}}var Ee=(s=>(s.Asc="asc",s.Desc="desc",s))(Ee||{});class as{constructor(e){n(this,"model","");n(this,"col","");n(this,"order");n(this,"label","");n(this,"default",!1);n(this,"selected",!1);v.BuildClass(this,e)}static Create(e,t,r=Ee.Asc,i,o){const a=new as;return a.model=e.GetClassName(),a.col=t??"",a.order=r??Ee.Asc,a.label=i??"",a.default=o??!1,a}isAsc(){return this.order===Ee.Asc}isDesc(){return this.order===Ee.Desc}eq(e){return e.model===this.model&&e.col===this.col&&e.order===this.order}toUrlQuery(){const e=this.model?`"model":"${this.model}"`:"",t=this.col?`"col":"${this.col}"`:"",r=this.order?`"order":"${this.order}"`:"";return[e,t,r].toString()}async fromUrlQuery(){const e=window.location.search,t=e.substring(e.indexOf("s=")+2,e.indexOf("|")),r=new URLSearchParams(decodeURIComponent(t));this.model=r.get("model")??"",this.col=r.get("col")??"",this.label=r.get("label")??"",this.default=!!r.get("default"),this.order=r.get("order")??""}asc(){this.order=Ee.Asc}desc(){this.order=Ee.Desc}}class ls{constructor(){n(this,"model","");n(this,"cols",[]);n(this,"models",[])}static Create(e,t){const r=new ls;return r.model=e.GetClassName(),r.cols=t,r}}var Di=Object.defineProperty,It=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&Di(e,t,i),i};const dt=(pe=class{constructor(e){n(this,"id");n(this,"f",[]);n(this,"f2",[]);n(this,"s",[]);n(this,"p",new os);n(this,"t",new ls);v.BuildClass(this,e)}static Get(){return this.instance||(this.instance=new pe),this.instance}createFrom(e){const t=new pe(JSON.parse(e));this.f=t.f}clearForHTTP(){const e=new pe(this);return e.f=this.f.map(t=>pe.EmptyEntiries(t)),e.f2=this.f2.map(t=>pe.EmptyEntiries(t)),e.s=this.s.map(t=>pe.EmptyEntiries(t)),e.p=pe.EmptyEntiries(this.p),e.t=pe.EmptyEntiries(this.t),e}static EmptyEntiries(e){if(!e)return;const r=Object.entries(e).filter(([i,o])=>i!=="label"&&o!==""&&o!==null);return Object.fromEntries(r)}findFilterModel(e){return this.f.find(t=>e.id===t.id)}getFirstSortModel(){return Xe.GetLast(this.s)}setSortModel(e){e&&(this.s[0]=e)}setS(e){this.s[0]=e}setF(e){this.f.push(e)}setF2(e){this.f2.push(e)}replaceF(e,t){this.removeF(t),e&&this.setF(e)}removeF(e){const t=this.f.findIndex(r=>r.eq(e));v.RemoveFromClassByIndex(t,this.f)}reset(){this.f=[],this.s=[],this.p=new os}resetF(){this.f=[]}},n(pe,"instance"),pe);It([v.GetClassConstructor(Nr)],dt.prototype,"f"),It([v.GetClassConstructor(Dr)],dt.prototype,"f2"),It([v.GetClassConstructor(as)],dt.prototype,"s"),It([v.GetClassConstructor(os)],dt.prototype,"p"),It([v.GetClassConstructor(ls)],dt.prototype,"t");let $r=dt;class Tt{}n(Tt,"SortModel",as),n(Tt,"FilterModel",Nr),n(Tt,"FilterModelV2",Dr),n(Tt,"FTSP",$r);function kr(s,e){return function(){return s.apply(e,arguments)}}const{toString:Ui}=Object.prototype,{getPrototypeOf:ft}=Object,{iterator:Ft,toStringTag:Br}=Symbol,cs=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),At=(s,e)=>{let t=s;const r=[];for(;t!=null&&t!==Object.prototype;){if(r.indexOf(t)!==-1)return!1;if(r.push(t),cs(t,e))return!0;t=ft(t)}return!1},Ni=(s,e)=>s!=null&&At(s,e)?s[e]:void 0,qs=(s=>e=>{const t=Ui.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Pe=s=>(s=s.toLowerCase(),e=>qs(e)===s),us=s=>e=>typeof e===s,{isArray:Ye}=Array,ht=us("undefined");function pt(s){return s!==null&&!ht(s)&&s.constructor!==null&&!ht(s.constructor)&&he(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Gr=Pe("ArrayBuffer");function $i(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&Gr(s.buffer),e}const ki=us("string"),he=us("function"),jr=us("number"),mt=s=>s!==null&&typeof s=="object",Bi=s=>s===!0||s===!1,ds=s=>{if(!mt(s))return!1;const e=ft(s);return(e===null||e===Object.prototype||ft(e)===null)&&!At(s,Br)&&!At(s,Ft)},Gi=s=>{if(!mt(s)||pt(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},ji=Pe("Date"),Li=Pe("File"),Hi=s=>!!(s&&typeof s.uri<"u"),qi=s=>s&&typeof s.getParts<"u",Vi=Pe("Blob"),zi=Pe("FileList"),Wi=s=>mt(s)&&he(s.pipe);function Ji(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Lr=Ji(),Hr=typeof Lr.FormData<"u"?Lr.FormData:void 0,Qi=s=>{if(!s)return!1;if(Hr&&s instanceof Hr)return!0;const e=ft(s);if(!e||e===Object.prototype||!he(s.append))return!1;const t=qs(s);return t==="formdata"||t==="object"&&he(s.toString)&&s.toString()==="[object FormData]"},Xi=Pe("URLSearchParams"),[Yi,Zi,Ki,eo]=["ReadableStream","Request","Response","Headers"].map(Pe),to=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xt(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let r,i;if(typeof s!="object"&&(s=[s]),Ye(s))for(r=0,i=s.length;r<i;r++)e.call(null,s[r],r,s);else{if(pt(s))return;const o=t?Object.getOwnPropertyNames(s):Object.keys(s),a=o.length;let l;for(r=0;r<a;r++)l=o[r],e.call(null,s[l],l,s)}}function qr(s,e){if(pt(s))return null;e=e.toLowerCase();const t=Object.keys(s);let r=t.length,i;for(;r-- >0;)if(i=t[r],e===i.toLowerCase())return i;return null}const Ze=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vr=s=>!ht(s)&&s!==Ze;function Vs(...s){const{caseless:e,skipUndefined:t}=Vr(this)&&this||{},r={},i=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=e&&typeof a=="string"&&qr(r,a)||a,d=cs(r,l)?r[l]:void 0;ds(d)&&ds(o)?r[l]=Vs(d,o):ds(o)?r[l]=Vs({},o):Ye(o)?r[l]=o.slice():(!t||!ht(o))&&(r[l]=o)};for(let o=0,a=s.length;o<a;o++){const l=s[o];if(!l||pt(l)||(xt(l,i),typeof l!="object"||Ye(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let h=0;h<d.length;h++){const m=d[h];po.call(l,m)&&i(l[m],m)}}return r}const so=(s,e,t,{allOwnKeys:r}={})=>(xt(e,(i,o)=>{t&&he(i)?Object.defineProperty(s,o,{__proto__:null,value:kr(i,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(s,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),s),ro=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),no=(s,e,t,r)=>{s.prototype=Object.create(e.prototype,r),Object.defineProperty(s.prototype,"constructor",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(s,"super",{__proto__:null,value:e.prototype}),t&&Object.assign(s.prototype,t)},io=(s,e,t,r)=>{let i,o,a;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),o=i.length;o-- >0;)a=i[o],(!r||r(a,s,e))&&!l[a]&&(e[a]=s[a],l[a]=!0);s=t!==!1&&ft(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},oo=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const r=s.indexOf(e,t);return r!==-1&&r===t},ao=s=>{if(!s)return null;if(Ye(s))return s;let e=s.length;if(!jr(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},lo=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&ft(Uint8Array)),co=(s,e)=>{const r=(s&&s[Ft]).call(s);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(s,o[0],o[1])}},uo=(s,e)=>{let t;const r=[];for(;(t=s.exec(e))!==null;)r.push(t);return r},fo=Pe("HTMLFormElement"),ho=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:po}=Object.prototype,mo=Pe("RegExp"),zr=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),r={};xt(t,(i,o)=>{let a;(a=e(i,o,s))!==!1&&(r[o]=a||i)}),Object.defineProperties(s,r)},go=s=>{zr(s,(e,t)=>{if(he(s)&&["arguments","caller","callee"].includes(t))return!1;const r=s[t];if(he(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},wo=(s,e)=>{const t={},r=i=>{i.forEach(o=>{t[o]=!0})};return Ye(s)?r(s):r(String(s).split(e)),t},yo=()=>{},So=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e;function bo(s){return!!(s&&he(s.append)&&s[Br]==="FormData"&&s[Ft])}const Co=s=>{const e=new WeakSet,t=r=>{if(mt(r)){if(e.has(r))return;if(pt(r))return r;if(!("toJSON"in r)){e.add(r);const i=Ye(r)?[]:{};return xt(r,(o,a)=>{const l=t(o);!ht(l)&&(i[a]=l)}),e.delete(r),i}}return r};return t(s)},vo=Pe("AsyncFunction"),Eo=s=>s&&(mt(s)||he(s))&&he(s.then)&&he(s.catch),Wr=((s,e)=>s?setImmediate:e?((t,r)=>(Ze.addEventListener("message",({source:i,data:o})=>{i===Ze&&o===t&&r.length&&r.shift()()},!1),i=>{r.push(i),Ze.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",he(Ze.postMessage)),Ro=typeof queueMicrotask<"u"?queueMicrotask.bind(Ze):typeof process<"u"&&process.nextTick||Wr,Jr=s=>s!=null&&he(s[Ft]),c={isArray:Ye,isArrayBuffer:Gr,isBuffer:pt,isFormData:Qi,isArrayBufferView:$i,isString:ki,isNumber:jr,isBoolean:Bi,isObject:mt,isPlainObject:ds,isEmptyObject:Gi,isReadableStream:Yi,isRequest:Zi,isResponse:Ki,isHeaders:eo,isUndefined:ht,isDate:ji,isFile:Li,isReactNativeBlob:Hi,isReactNative:qi,isBlob:Vi,isRegExp:mo,isFunction:he,isStream:Wi,isURLSearchParams:Xi,isTypedArray:lo,isFileList:zi,forEach:xt,merge:Vs,extend:so,trim:to,stripBOM:ro,inherits:no,toFlatObject:io,kindOf:qs,kindOfTest:Pe,endsWith:oo,toArray:ao,forEachEntry:co,matchAll:uo,isHTMLForm:fo,hasOwnProperty:cs,hasOwnProp:cs,hasOwnInPrototypeChain:At,getSafeProp:Ni,reduceDescriptors:zr,freezeMethods:go,toObjectSet:wo,toCamelCase:ho,noop:yo,toFiniteNumber:So,findKey:qr,global:Ze,isContextDefined:Vr,isSpecCompliantForm:bo,toJSONObject:Co,isAsyncFn:vo,isThenable:Eo,setImmediate:Wr,asap:Ro,isIterable:Jr,isSafeIterable:s=>s!=null&&At(s,Ft)&&Jr(s)},Mo=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Oo=s=>{const e={};let t,r,i;return s&&s.split(`
15
+ `).forEach(function(a){i=a.indexOf(":"),t=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!t||e[t]&&Mo[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e};function Po(s){let e=0,t=s.length;for(;e<t;){const r=s.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;t>e;){const r=s.charCodeAt(t-1);if(r!==9&&r!==32)break;t-=1}return e===0&&t===s.length?s:s.slice(e,t)}const _o=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Io=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function zs(s,e){return c.isArray(s)?s.map(t=>zs(t,e)):Po(String(s).replace(e,""))}const To=s=>zs(s,_o),Fo=s=>zs(s,Io);function Qr(s){const e=Object.create(null);return c.forEach(s.toJSON(),(t,r)=>{e[r]=Fo(t)}),e}const Xr=Symbol("internals");function Dt(s){return s&&String(s).trim().toLowerCase()}function fs(s){return s===!1||s==null?s:c.isArray(s)?s.map(fs):To(String(s))}function Ao(s){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(s);)e[r[1]]=r[2];return e}const xo=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function Ws(s,e,t,r,i){if(c.isFunction(r))return r.call(this,e,t);if(i&&(e=t),!!c.isString(e)){if(c.isString(r))return e.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(e)}}function Do(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function Uo(s,e){const t=c.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(s,r+t,{__proto__:null,value:function(i,o,a){return this[r].call(this,e,i,o,a)},configurable:!0})})}let ae=class{constructor(e){e&&this.set(e)}set(e,t,r){const i=this;function o(l,d,h){const m=Dt(d);if(!m)return;const w=c.findKey(i,m);(!w||i[w]===void 0||h===!0||h===void 0&&i[w]!==!1)&&(i[w||d]=fs(l))}const a=(l,d)=>c.forEach(l,(h,m)=>o(h,m,d));if(c.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(c.isString(e)&&(e=e.trim())&&!xo(e))a(Oo(e),t);else if(c.isObject(e)&&c.isSafeIterable(e)){let l=Object.create(null),d,h;for(const m of e){if(!c.isArray(m))throw new TypeError("Object iterator must return a key-value pair");h=m[0],c.hasOwnProp(l,h)?(d=l[h],l[h]=c.isArray(d)?[...d,m[1]]:[d,m[1]]):l[h]=m[1]}a(l,t)}else e!=null&&o(t,e,r);return this}get(e,t){if(e=Dt(e),e){const r=c.findKey(this,e);if(r){const i=this[r];if(!t)return i;if(t===!0)return Ao(i);if(c.isFunction(t))return t.call(this,i,r);if(c.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Dt(e),e){const r=c.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Ws(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let i=!1;function o(a){if(a=Dt(a),a){const l=c.findKey(r,a);l&&(!t||Ws(r,r[l],l,t))&&(delete r[l],i=!0)}}return c.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let r=t.length,i=!1;for(;r--;){const o=t[r];(!e||Ws(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,r={};return c.forEach(this,(i,o)=>{const a=c.findKey(r,o);if(a){t[a]=fs(i),delete t[o];return}const l=e?Do(o):String(o).trim();l!==o&&delete t[o],t[l]=fs(i),r[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return c.forEach(this,(r,i)=>{r!=null&&r!==!1&&(t[i]=e&&c.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
16
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Xr]=this[Xr]={accessors:{}}).accessors,i=this.prototype;function o(a){const l=Dt(a);r[l]||(Uo(i,a),r[l]=!0)}return c.isArray(e)?e.forEach(o):o(e),this}};ae.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(ae.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(r){this[t]=r}}}),c.freezeMethods(ae);const No="[REDACTED ****]";function $o(s){if(c.hasOwnProp(s,"toJSON"))return!0;let e=Object.getPrototypeOf(s);for(;e&&e!==Object.prototype;){if(c.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function ko(s,e){const t=new Set(e.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||c.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof ae&&(o=o.toJSON()),r.push(o);let a;if(c.isArray(o))a=[],o.forEach((l,d)=>{const h=i(l);c.isUndefined(h)||(a[d]=h)});else{if(!c.isPlainObject(o)&&$o(o))return r.pop(),o;a=Object.create(null);for(const[l,d]of Object.entries(o)){const h=t.has(l.toLowerCase())?No:i(d);c.isUndefined(h)||(a[l]=h)}}return r.pop(),a};return i(s)}let S=class si extends Error{static from(e,t,r,i,o,a){const l=new si(e.message,t||e.code,r,i,o);return Object.defineProperty(l,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),l.name=e.name,e.status!=null&&l.status==null&&(l.status=e.status),a&&Object.assign(l,a),l}constructor(e,t,r,i,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&c.hasOwnProp(e,"redact")?e.redact:void 0,r=c.isArray(t)&&t.length>0?ko(e,t):c.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};S.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",S.ERR_BAD_OPTION="ERR_BAD_OPTION",S.ECONNABORTED="ECONNABORTED",S.ETIMEDOUT="ETIMEDOUT",S.ECONNREFUSED="ECONNREFUSED",S.ERR_NETWORK="ERR_NETWORK",S.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",S.ERR_DEPRECATED="ERR_DEPRECATED",S.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",S.ERR_BAD_REQUEST="ERR_BAD_REQUEST",S.ERR_CANCELED="ERR_CANCELED",S.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",S.ERR_INVALID_URL="ERR_INVALID_URL",S.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Bo=null,Yr=100;function Js(s){return c.isPlainObject(s)||c.isArray(s)}function Zr(s){return c.endsWith(s,"[]")?s.slice(0,-2):s}function Qs(s,e,t){return s?s.concat(e).map(function(i,o){return i=Zr(i),!t&&o?"["+i+"]":i}).join(t?".":""):e}function Go(s){return c.isArray(s)&&!s.some(Js)}const jo=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function hs(s,e,t){if(!c.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=c.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(F,x){return!c.isUndefined(x[F])});const r=t.metaTokens,i=t.visitor||G,o=t.dots,a=t.indexes,l=t.Blob||typeof Blob<"u"&&Blob,d=t.maxDepth===void 0?Yr:t.maxDepth,h=l&&c.isSpecCompliantForm(e),m=[];if(!c.isFunction(i))throw new TypeError("visitor must be a function");function w(g){if(g===null)return"";if(c.isDate(g))return g.toISOString();if(c.isBoolean(g))return g.toString();if(!h&&c.isBlob(g))throw new S("Blob is not supported. Use a Buffer instead.");if(c.isArrayBuffer(g)||c.isTypedArray(g)){if(h&&typeof l=="function")return new l([g]);if(typeof Buffer<"u")return Buffer.from(g);throw new S("Blob is not supported. Use a Buffer instead.",S.ERR_NOT_SUPPORT)}return g}function I(g){if(g>d)throw new S("Object is too deeply nested ("+g+" levels). Max depth: "+d,S.ERR_FORM_DATA_DEPTH_EXCEEDED)}function A(g,F){if(d===1/0)return JSON.stringify(g);const x=[];return JSON.stringify(g,function(se,W){if(!c.isObject(W))return W;for(;x.length&&x[x.length-1]!==this;)x.pop();return x.push(W),I(F+x.length-1),W})}function G(g,F,x){let L=g;if(c.isReactNative(e)&&c.isReactNativeBlob(g))return e.append(Qs(x,F,o),w(g)),!1;if(g&&!x&&typeof g=="object"){if(c.endsWith(F,"{}"))F=r?F:F.slice(0,-2),g=A(g,1);else if(c.isArray(g)&&Go(g)||(c.isFileList(g)||c.endsWith(F,"[]"))&&(L=c.toArray(g)))return F=Zr(F),L.forEach(function(W,xe){!(c.isUndefined(W)||W===null)&&e.append(a===!0?Qs([F],xe,o):a===null?F:F+"[]",w(W))}),!1}return Js(g)?!0:(e.append(Qs(x,F,o),w(g)),!1)}const N=Object.assign(jo,{defaultVisitor:G,convertValue:w,isVisitable:Js});function P(g,F,x=0){if(!c.isUndefined(g)){if(I(x),m.indexOf(g)!==-1)throw new Error("Circular reference detected in "+F.join("."));m.push(g),c.forEach(g,function(se,W){(!(c.isUndefined(se)||se===null)&&i.call(e,se,c.isString(W)?W.trim():W,F,N))===!0&&P(se,F?F.concat(W):[W],x+1)}),m.pop()}}if(!c.isObject(s))throw new TypeError("data must be an object");return P(s),e}function Kr(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(s).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Xs(s,e){this._pairs=[],s&&hs(s,this,e)}const en=Xs.prototype;en.append=function(e,t){this._pairs.push([e,t])},en.toString=function(e){const t=e?r=>e.call(this,r,Kr):Kr;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function Lo(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tn(s,e,t){if(!e)return s;s=s||"";const r=c.isFunction(t)?{serialize:t}:t,i=c.getSafeProp(r,"encode")||Lo,o=c.getSafeProp(r,"serialize");let a;if(o?a=o(e,r):a=c.isURLSearchParams(e)?e.toString():new Xs(e,r).toString(i),a){const l=s.indexOf("#");l!==-1&&(s=s.slice(0,l)),s+=(s.indexOf("?")===-1?"?":"&")+a}return s}class sn{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Ys={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Ho={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Xs,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Zs=typeof window<"u"&&typeof document<"u",Ks=typeof navigator=="object"&&navigator||void 0,qo=Zs&&(!Ks||["ReactNative","NativeScript","NS"].indexOf(Ks.product)<0),Vo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zo=Zs&&window.location.href||"http://localhost",ie={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Zs,hasStandardBrowserEnv:qo,hasStandardBrowserWebWorkerEnv:Vo,navigator:Ks,origin:zo},Symbol.toStringTag,{value:"Module"})),...Ho};function Wo(s,e){return hs(s,new ie.classes.URLSearchParams,{visitor:function(t,r,i,o){return ie.isNode&&c.isBuffer(t)?(this.append(r,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}const rn=Yr;function nn(s){if(s>rn)throw new S("FormData field is too deeply nested ("+s+" levels). Max depth: "+rn,S.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Jo(s){const e=[],t=/\w+|\[(\w*)]/g;let r;for(;(r=t.exec(s))!==null;)nn(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function Qo(s){const e={},t=Object.keys(s);let r;const i=t.length;let o;for(r=0;r<i;r++)o=t[r],e[o]=s[o];return e}function on(s){function e(t,r,i,o){nn(o);let a=t[o++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),d=o>=t.length;return a=!a&&c.isArray(i)?i.length:a,d?(c.hasOwnProp(i,a)?i[a]=c.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!l):((!c.hasOwnProp(i,a)||!c.isObject(i[a]))&&(i[a]=[]),e(t,r,i[a],o)&&c.isArray(i[a])&&(i[a]=Qo(i[a])),!l)}if(c.isFormData(s)&&c.isFunction(s.entries)){const t={};return c.forEachEntry(s,(r,i)=>{e(Jo(r),i,t,0)}),t}return null}const gt=(s,e)=>s!=null&&c.hasOwnProp(s,e)?s[e]:void 0;function Xo(s,e,t){if(c.isString(s))try{return(e||JSON.parse)(s),c.trim(s)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(s)}const Ut={transitional:Ys,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",i=r.indexOf("application/json")>-1,o=c.isObject(e);if(o&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return i?JSON.stringify(on(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(o){const d=gt(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Wo(e,d).toString();if((l=c.isFileList(e))||r.indexOf("multipart/form-data")>-1){const h=gt(this,"env"),m=h&&h.FormData;return hs(l?{"files[]":e}:e,m&&new m,d)}}return o||i?(t.setContentType("application/json",!1),Xo(e)):e}],transformResponse:[function(e){const t=gt(this,"transitional")||Ut.transitional,r=t&&t.forcedJSONParsing,i=gt(this,"responseType"),o=i==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(r&&!i||o)){const l=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,gt(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?S.from(d,S.ERR_BAD_RESPONSE,this,null,gt(this,"response")):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch","query"],s=>{Ut.headers[s]={}});function er(s,e){const t=this||Ut,r=e||t,i=ae.from(r.headers);let o=r.data;return c.forEach(s,function(l){o=l.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function an(s){return!!(s&&s.__CANCEL__)}let Nt=class extends S{constructor(e,t,r){super(e??"canceled",S.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function ln(s,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?s(t):e(new S("Request failed with status code "+t.status,t.status>=400&&t.status<500?S.ERR_BAD_REQUEST:S.ERR_BAD_RESPONSE,t.config,t.request,t))}function Yo(s){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(s);return e&&e[1]||""}function Zo(s,e){s=s||10;const t=new Array(s),r=new Array(s);let i=0,o=0,a;return e=e!==void 0?e:1e3,function(d){const h=Date.now(),m=r[o];a||(a=h),t[i]=d,r[i]=h;let w=o,I=0;for(;w!==i;)I+=t[w++],w=w%s;if(i=(i+1)%s,i===o&&(o=(o+1)%s),h-a<e)return;const A=m&&h-m;return A?Math.round(I*1e3/A):void 0}}function Ko(s,e){let t=0,r=1e3/e,i,o;const a=(h,m=Date.now())=>{t=m,i=null,o&&(clearTimeout(o),o=null),s(...h)};return[(...h)=>{const m=Date.now(),w=m-t;w>=r?a(h,m):(i=h,o||(o=setTimeout(()=>{o=null,a(i)},r-w)))},()=>i&&a(i)]}const ps=(s,e,t=3)=>{let r=0;const i=Zo(50,250);return Ko(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,l=o.lengthComputable?o.total:void 0,d=l!=null?Math.min(a,l):a,h=Math.max(0,d-r),m=i(h);r=Math.max(r,d);const w={loaded:d,total:l,progress:l?d/l:void 0,bytes:h,rate:m||void 0,estimated:m&&l?(l-d)/m:void 0,event:o,lengthComputable:l!=null,[e?"download":"upload"]:!0};s(w)},t)},cn=(s,e)=>{const t=s!=null;return[r=>e[0]({lengthComputable:t,total:s,loaded:r}),e[1]]},un=s=>(...e)=>c.asap(()=>s(...e)),ea=ie.hasStandardBrowserEnv?((s,e)=>t=>(t=new URL(t,ie.origin),s.protocol===t.protocol&&s.host===t.host&&(e||s.port===t.port)))(new URL(ie.origin),ie.navigator&&/(msie|trident)/i.test(ie.navigator.userAgent)):()=>!0,ta=ie.hasStandardBrowserEnv?{write(s,e,t,r,i,o,a){if(typeof document>"u")return;const l=[`${s}=${encodeURIComponent(e)}`];c.isNumber(t)&&l.push(`expires=${new Date(t).toUTCString()}`),c.isString(r)&&l.push(`path=${r}`),c.isString(i)&&l.push(`domain=${i}`),o===!0&&l.push("secure"),c.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(s){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let t=0;t<e.length;t++){const r=e[t].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===s)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(s){this.write(s,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function sa(s){return typeof s!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function ra(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}const na=/^https?:(?!\/\/)/i,ia=/[\t\n\r]/g;function oa(s){let e=0;for(;e<s.length&&s.charCodeAt(e)<=32;)e++;return s.slice(e)}function aa(s){return oa(s).replace(ia,"")}function dn(s,e){if(typeof s=="string"&&na.test(aa(s)))throw new S('Invalid URL: missing "//" after protocol',S.ERR_INVALID_URL,e)}function fn(s,e,t,r){dn(e,r);let i=!sa(e);return s&&(i||t===!1)?(dn(s,r),ra(s,e)):e}const hn=s=>s instanceof ae?{...s}:s;function Ke(s,e){s=s||{},e=e||{};const t=Object.create(null);Object.defineProperty(t,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(m,w,I,A){return c.isPlainObject(m)&&c.isPlainObject(w)?c.merge.call({caseless:A},m,w):c.isPlainObject(w)?c.merge({},w):c.isArray(w)?w.slice():w}function i(m,w,I,A){if(c.isUndefined(w)){if(!c.isUndefined(m))return r(void 0,m,I,A)}else return r(m,w,I,A)}function o(m,w){if(!c.isUndefined(w))return r(void 0,w)}function a(m,w){if(c.isUndefined(w)){if(!c.isUndefined(m))return r(void 0,m)}else return r(void 0,w)}function l(m){const w=c.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!c.isUndefined(w))if(c.isPlainObject(w)){if(c.hasOwnProp(w,m))return w[m]}else return;const I=c.hasOwnProp(s,"transitional")?s.transitional:void 0;if(c.isPlainObject(I)&&c.hasOwnProp(I,m))return I[m]}function d(m,w,I){if(c.hasOwnProp(e,I))return r(m,w);if(c.hasOwnProp(s,I))return r(void 0,m)}const h={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:d,headers:(m,w,I)=>i(hn(m),hn(w),I,!0)};return c.forEach(Object.keys({...s,...e}),function(w){if(w==="__proto__"||w==="constructor"||w==="prototype")return;const I=c.hasOwnProp(h,w)?h[w]:i,A=c.hasOwnProp(s,w)?s[w]:void 0,G=c.hasOwnProp(e,w)?e[w]:void 0,N=I(A,G,w);c.isUndefined(N)&&I!==d||(t[w]=N)}),c.hasOwnProp(e,"validateStatus")&&c.isUndefined(e.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(c.hasOwnProp(s,"validateStatus")?t.validateStatus=r(void 0,s.validateStatus):delete t.validateStatus),t}const la=["content-type","content-length"];function ca(s,e,t){if(t!=="content-only"){s.set(e);return}Object.entries(e||{}).forEach(([r,i])=>{la.includes(r.toLowerCase())&&s.set(r,i)})}const ua=s=>encodeURIComponent(s).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function pn(s){const e=Ke({},s),t=I=>c.hasOwnProp(e,I)?e[I]:void 0,r=t("data");let i=t("withXSRFToken");const o=t("xsrfHeaderName"),a=t("xsrfCookieName");let l=t("headers");const d=t("auth"),h=t("baseURL"),m=t("allowAbsoluteUrls"),w=t("url");if(e.headers=l=ae.from(l),e.url=tn(fn(h,w,m,e),t("params"),t("paramsSerializer")),d){const I=c.getSafeProp(d,"username")||"",A=c.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(I+":"+(A?ua(A):"")))}catch(G){throw S.from(G,S.ERR_BAD_OPTION_VALUE,s)}}if(c.isFormData(r)&&(ie.hasStandardBrowserEnv||ie.hasStandardBrowserWebWorkerEnv||c.isReactNative(r)?l.setContentType(void 0):c.isFunction(r.getHeaders)&&ca(l,r.getHeaders(),t("formDataHeaderPolicy"))),ie.hasStandardBrowserEnv&&(c.isFunction(i)&&(i=i(e)),i===!0||i==null&&ea(e.url))){const A=o&&a&&ta.read(a);A&&l.set(o,A)}return e}const da=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(t,r){const i=pn(s);let o=i.data;const a=ae.from(i.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:h}=i,m,w,I,A,G;function N(){A&&A(),G&&G(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let P=new XMLHttpRequest;P.open(i.method.toUpperCase(),i.url,!0),P.timeout=i.timeout;function g(){if(!P)return;const x=ae.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),se={data:!l||l==="text"||l==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:x,config:s,request:P};ln(function(xe){t(xe),N()},function(xe){r(xe),N()},se),P=null}"onloadend"in P?P.onloadend=g:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.startsWith("file:"))||setTimeout(g)},P.onabort=function(){P&&(r(new S("Request aborted",S.ECONNABORTED,s,P)),N(),P=null)},P.onerror=function(L){const se=L&&L.message?L.message:"Network Error",W=new S(se,S.ERR_NETWORK,s,P);W.event=L||null,r(W),N(),P=null},P.ontimeout=function(){let L=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const se=i.transitional||Ys;i.timeoutErrorMessage&&(L=i.timeoutErrorMessage),r(new S(L,se.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,s,P)),N(),P=null},o===void 0&&a.setContentType(null),"setRequestHeader"in P&&c.forEach(Qr(a),function(L,se){P.setRequestHeader(se,L)}),c.isUndefined(i.withCredentials)||(P.withCredentials=!!i.withCredentials),l&&l!=="json"&&(P.responseType=i.responseType),h&&([I,G]=ps(h,!0),P.addEventListener("progress",I)),d&&P.upload&&([w,A]=ps(d),P.upload.addEventListener("progress",w),P.upload.addEventListener("loadend",A)),(i.cancelToken||i.signal)&&(m=x=>{P&&(r(!x||x.type?new Nt(null,s,P):x),P.abort(),N(),P=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const F=Yo(i.url);if(F&&!ie.protocols.includes(F)){r(new S("Unsupported protocol "+F+":",S.ERR_BAD_REQUEST,s)),N();return}P.send(o||null)})},fa=(s,e)=>{if(s=s?s.filter(Boolean):[],!e&&!s.length)return;const t=new AbortController;let r=!1;const i=function(d){if(!r){r=!0,a();const h=d instanceof Error?d:this.reason;t.abort(h instanceof S?h:new Nt(h instanceof Error?h.message:h))}};let o=e&&setTimeout(()=>{o=null,i(new S(`timeout of ${e}ms exceeded`,S.ETIMEDOUT))},e);const a=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),s=null)};s.forEach(d=>d.addEventListener("abort",i,{once:!0}));const{signal:l}=t;return l.unsubscribe=()=>c.asap(a),l},ha=function*(s,e){let t=s.byteLength;if(t<e){yield s;return}let r=0,i;for(;r<t;)i=r+e,yield s.slice(r,i),r=i},pa=async function*(s,e){for await(const t of ma(s))yield*ha(t,e)},ma=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const e=s.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},mn=(s,e,t,r)=>{const i=pa(s,e);let o=0,a,l=d=>{a||(a=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:h,value:m}=await i.next();if(h){l(),d.close();return}let w=m.byteLength;if(t){let I=o+=w;t(I)}d.enqueue(new Uint8Array(m))}catch(h){throw l(h),h}},cancel(d){return l(d),i.return()}},{highWaterMark:2})},ms=s=>s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102,ga=(s,e,t)=>e+2<t&&ms(s.charCodeAt(e+1))&&ms(s.charCodeAt(e+2));function wa(s){if(!s||typeof s!="string"||!s.startsWith("data:"))return 0;const e=s.indexOf(",");if(e<0)return 0;const t=s.slice(5,e),r=s.slice(e+1);if(/;base64/i.test(t)){let a=r.length;const l=r.length;for(let A=0;A<l;A++)if(r.charCodeAt(A)===37&&A+2<l){const G=r.charCodeAt(A+1),N=r.charCodeAt(A+2);ms(G)&&ms(N)&&(a-=2,A+=2)}let d=0,h=l-1;const m=A=>A>=2&&r.charCodeAt(A-2)===37&&r.charCodeAt(A-1)===51&&(r.charCodeAt(A)===68||r.charCodeAt(A)===100);h>=0&&(r.charCodeAt(h)===61?(d++,h--):m(h)&&(d++,h-=3)),d===1&&h>=0&&(r.charCodeAt(h)===61||m(h))&&d++;const I=Math.floor(a/4)*3-(d||0);return I>0?I:0}let o=0;for(let a=0,l=r.length;a<l;a++){const d=r.charCodeAt(a);if(d===37&&ga(r,a,l))o+=1,a+=2;else if(d<128)o+=1;else if(d<2048)o+=2;else if(d>=55296&&d<=56319&&a+1<l){const h=r.charCodeAt(a+1);h>=56320&&h<=57343?(o+=4,a++):o+=3}else o+=3}return o}const tr="1.18.1",gn=64*1024,{isFunction:gs}=c,ya=s=>encodeURIComponent(s).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),wn=s=>{if(!c.isString(s))return s;try{return decodeURIComponent(s)}catch{return s}},yn=(s,...e)=>{try{return!!s(...e)}catch{return!1}},Sa=s=>{const e=s.indexOf("://");let t=s;return e!==-1&&(t=t.slice(e+3)),t.includes("@")||t.includes(":")},ba=s=>{const e=c.global!==void 0&&c.global!==null?c.global:globalThis,{ReadableStream:t,TextEncoder:r}=e;s=c.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},s);const{fetch:i,Request:o,Response:a}=s,l=i?gs(i):typeof fetch=="function",d=gs(o),h=gs(a);if(!l)return!1;const m=l&&gs(t),w=l&&(typeof r=="function"?(g=>F=>g.encode(F))(new r):async g=>new Uint8Array(await new o(g).arrayBuffer())),I=d&&m&&yn(()=>{let g=!1;const F=new o(ie.origin,{body:new t,method:"POST",get duplex(){return g=!0,"half"}}),x=F.headers.has("Content-Type");return F.body!=null&&F.body.cancel(),g&&!x}),A=h&&m&&yn(()=>c.isReadableStream(new a("").body)),G={stream:A&&(g=>g.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!G[g]&&(G[g]=(F,x)=>{let L=F&&F[g];if(L)return L.call(F);throw new S(`Response type '${g}' is not supported`,S.ERR_NOT_SUPPORT,x)})});const N=async g=>{if(g==null)return 0;if(c.isBlob(g))return g.size;if(c.isSpecCompliantForm(g))return(await new o(ie.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(c.isArrayBufferView(g)||c.isArrayBuffer(g))return g.byteLength;if(c.isURLSearchParams(g)&&(g=g+""),c.isString(g))return(await w(g)).byteLength},P=async(g,F)=>{const x=c.toFiniteNumber(g.getContentLength());return x??N(F)};return async g=>{let{url:F,method:x,data:L,signal:se,cancelToken:W,timeout:xe,onDownloadProgress:qt,onUploadProgress:Vt,responseType:De,headers:Ue,withCredentials:Rt="same-origin",fetchOptions:Ts,maxContentLength:Se,maxBodyLength:Ve}=pn(g);const ze=c.isNumber(Se)&&Se>-1,Mt=c.isNumber(Ve)&&Ve>-1,Fs=H=>c.hasOwnProp(g,H)?g[H]:void 0;let zt=i||fetch;De=De?(De+"").toLowerCase():"text";let _e=fa([se,W&&W.toAbortSignal()],xe),K=null;const _=_e&&_e.unsubscribe&&(()=>{_e.unsubscribe()});let be,at=null;const X=()=>new S("Request body larger than maxBodyLength limit",S.ERR_BAD_REQUEST,g,K);try{let H;const me=Fs("auth");if(me){const D=c.getSafeProp(me,"username")||"",ce=c.getSafeProp(me,"password")||"";H={username:D,password:ce}}if(Sa(F)){const D=new URL(F,ie.origin);if(!H&&(D.username||D.password)){const ce=wn(D.username),Ie=wn(D.password);H={username:ce,password:Ie}}(D.username||D.password)&&(D.username="",D.password="",F=D.href)}if(H&&(Ue.delete("authorization"),Ue.set("Authorization","Basic "+btoa(ya((H.username||"")+":"+(H.password||""))))),ze&&typeof F=="string"&&F.startsWith("data:")&&wa(F)>Se)throw new S("maxContentLength size of "+Se+" exceeded",S.ERR_BAD_RESPONSE,g,K);if(Mt&&x!=="get"&&x!=="head"){const D=await N(L);if(typeof D=="number"&&isFinite(D)&&(be=D,D>Ve))throw X()}const lt=Mt&&(c.isReadableStream(L)||c.isStream(L)),As=(D,ce,Ie)=>mn(D,gn,Ne=>{if(Mt&&Ne>Ve)throw at=X();ce&&ce(Ne)},Ie);if(I&&x!=="get"&&x!=="head"&&(Vt||lt)){if(be=be??await P(Ue,L),be!==0||lt){let D=new o(F,{method:"POST",body:L,duplex:"half"}),ce;if(c.isFormData(L)&&(ce=D.headers.get("content-type"))&&Ue.setContentType(ce),D.body){const[Ie,Ne]=Vt&&cn(be,ps(un(Vt)))||[];L=As(D.body,Ie,Ne)}}}else if(lt&&!d&&m&&x!=="get"&&x!=="head")L=As(L);else if(lt&&d&&!I&&x!=="get"&&x!=="head")throw new S("Stream request bodies are not supported by the current fetch implementation",S.ERR_NOT_SUPPORT,g,K);c.isString(Rt)||(Rt=Rt?"include":"omit");const Me=d&&"credentials"in o.prototype;if(c.isFormData(L)){const D=Ue.getContentType();D&&/^multipart\/form-data/i.test(D)&&!/boundary=/i.test(D)&&Ue.delete("content-type")}Ue.set("User-Agent","axios/"+tr,!1);const Wt={...Ts,signal:_e,method:x.toUpperCase(),headers:Qr(Ue.normalize()),body:L,duplex:"half",credentials:Me?Rt:void 0};K=d&&new o(F,Wt);let ge=await(d?zt(K,Ts):zt(F,Wt));const Jt=ae.from(ge.headers);if(ze){const D=c.toFiniteNumber(Jt.getContentLength());if(D!=null&&D>Se)throw new S("maxContentLength size of "+Se+" exceeded",S.ERR_BAD_RESPONSE,g,K)}const Qt=A&&(De==="stream"||De==="response");if(A&&ge.body&&(qt||ze||Qt&&_)){const D={};["status","statusText","headers"].forEach(ct=>{D[ct]=ge[ct]});const ce=c.toFiniteNumber(Jt.getContentLength()),[Ie,Ne]=qt&&cn(ce,ps(un(qt),!0))||[];let Xt=0;const Yt=ct=>{if(ze&&(Xt=ct,Xt>Se))throw new S("maxContentLength size of "+Se+" exceeded",S.ERR_BAD_RESPONSE,g,K);Ie&&Ie(ct)};ge=new a(mn(ge.body,gn,Yt,()=>{Ne&&Ne(),_&&_()}),D)}De=De||"text";let Ce=await G[c.findKey(G,De)||"text"](ge,g);if(ze&&!A&&!Qt){let D;if(Ce!=null&&(typeof Ce.byteLength=="number"?D=Ce.byteLength:typeof Ce.size=="number"?D=Ce.size:typeof Ce=="string"&&(D=typeof r=="function"?new r().encode(Ce).byteLength:Ce.length)),typeof D=="number"&&D>Se)throw new S("maxContentLength size of "+Se+" exceeded",S.ERR_BAD_RESPONSE,g,K)}return!Qt&&_&&_(),await new Promise((D,ce)=>{ln(D,ce,{data:Ce,headers:ae.from(ge.headers),status:ge.status,statusText:ge.statusText,config:g,request:K})})}catch(H){if(_&&_(),_e&&_e.aborted&&_e.reason instanceof S){const me=_e.reason;throw me.config=g,K&&(me.request=K),H!==me&&Object.defineProperty(me,"cause",{__proto__:null,value:H,writable:!0,enumerable:!1,configurable:!0}),me}if(at)throw K&&!at.request&&(at.request=K),at;if(H instanceof S)throw K&&!H.request&&(H.request=K),H;if(H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)){const me=new S("Network Error",S.ERR_NETWORK,g,K,H&&H.response);throw Object.defineProperty(me,"cause",{__proto__:null,value:H.cause||H,writable:!0,enumerable:!1,configurable:!0}),me}throw S.from(H,H&&H.code,g,K,H&&H.response)}}},Ca=new Map,Sn=s=>{let e=s&&s.env||{};const{fetch:t,Request:r,Response:i}=e,o=[r,i,t];let a=o.length,l=a,d,h,m=Ca;for(;l--;)d=o[l],h=m.get(d),h===void 0&&m.set(d,h=l?new Map:ba(e)),m=h;return h};Sn();const sr={http:Bo,xhr:da,fetch:{get:Sn}};c.forEach(sr,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(s,"adapterName",{__proto__:null,value:e})}});const bn=s=>`- ${s}`,va=s=>c.isFunction(s)||s===null||s===!1;function Ea(s,e){s=c.isArray(s)?s:[s];const{length:t}=s;let r,i;const o={};for(let a=0;a<t;a++){r=s[a];let l;if(i=r,!va(r)&&(i=sr[(l=String(r)).toLowerCase()],i===void 0))throw new S(`Unknown adapter '${l}'`);if(i&&(c.isFunction(i)||(i=i.get(e))))break;o[l||"#"+a]=i}if(!i){const a=Object.entries(o).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let l=t?a.length>1?`since :
17
+ `+a.map(bn).join(`
18
+ `):" "+bn(a[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+l,S.ERR_NOT_SUPPORT)}return i}const Cn={getAdapter:Ea,adapters:sr};function rr(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Nt(null,s)}function vn(s){return rr(s),s.headers=ae.from(s.headers),s.data=er.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),Cn.getAdapter(s.adapter||Ut.adapter,s)(s).then(function(r){rr(s),s.response=r;try{r.data=er.call(s,s.transformResponse,r)}finally{delete s.response}return r.headers=ae.from(r.headers),r},function(r){if(!an(r)&&(rr(s),r&&r.response)){s.response=r.response;try{r.response.data=er.call(s,s.transformResponse,r.response)}finally{delete s.response}r.response.headers=ae.from(r.response.headers)}return Promise.reject(r)})}const ws={};["object","boolean","number","function","string","symbol"].forEach((s,e)=>{ws[s]=function(r){return typeof r===s||"a"+(e<1?"n ":" ")+s}});const En={};ws.transitional=function(e,t,r){function i(o,a){return"[Axios v"+tr+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,l)=>{if(e===!1)throw new S(i(a," has been removed"+(t?" in "+t:"")),S.ERR_DEPRECATED);return t&&!En[a]&&(En[a]=!0,console.warn(i(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,a,l):!0}},ws.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Ra(s,e,t){if(typeof s!="object"||s===null)throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(s);let i=r.length;for(;i-- >0;){const o=r[i],a=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(a){const l=s[o],d=l===void 0||a(l,o,s);if(d!==!0)throw new S("option "+o+" must be "+d,S.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new S("Unknown option "+o,S.ERR_BAD_OPTION)}}const ys={assertOptions:Ra,validators:ws},le=ys.validators;let et=class{constructor(e){this.defaults=e||{},this.interceptors={request:new sn,response:new sn}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const a=i.stack.indexOf(`
19
+ `);return a===-1?"":i.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
20
+ `),l=a===-1?-1:o.indexOf(`
21
+ `,a+1),d=l===-1?"":o.slice(l+1);String(r.stack).endsWith(d)||(r.stack+=`
22
+ `+o)}}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Ke(this.defaults,t);const{transitional:r,paramsSerializer:i,headers:o}=t;r!==void 0&&ys.assertOptions(r,{silentJSONParsing:le.transitional(le.boolean),forcedJSONParsing:le.transitional(le.boolean),clarifyTimeoutError:le.transitional(le.boolean),legacyInterceptorReqResOrdering:le.transitional(le.boolean),advertiseZstdAcceptEncoding:le.transitional(le.boolean),validateStatusUndefinedResolves:le.transitional(le.boolean)},!1),i!=null&&(c.isFunction(i)?t.paramsSerializer={serialize:i}:ys.assertOptions(i,{encode:le.function,serialize:le.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ys.assertOptions(t,{baseUrl:le.spelling("baseURL"),withXsrfToken:le.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&c.merge(o.common,o[t.method]);o&&c.forEach(["delete","get","head","post","put","patch","query","common"],G=>{delete o[G]}),t.headers=ae.concat(a,o);const l=[];let d=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen=="function"&&N.runWhen(t)===!1)return;d=d&&N.synchronous;const P=t.transitional||Ys;P&&P.legacyInterceptorReqResOrdering?l.unshift(N.fulfilled,N.rejected):l.push(N.fulfilled,N.rejected)});const h=[];this.interceptors.response.forEach(function(N){h.push(N.fulfilled,N.rejected)});let m,w=0,I;if(!d){const G=[vn.bind(this),void 0];for(G.unshift(...l),G.push(...h),I=G.length,m=Promise.resolve(t);w<I;)m=m.then(G[w++],G[w++]);return m}I=l.length;let A=t;for(;w<I;){const G=l[w++],N=l[w++];try{A=G(A)}catch(P){N.call(this,P);break}}try{m=vn.call(this,A)}catch(G){return Promise.reject(G)}for(w=0,I=h.length;w<I;)m=m.then(h[w++],h[w++]);return m}getUri(e){e=Ke(this.defaults,e);const t=fn(e.baseURL,e.url,e.allowAbsoluteUrls,e);return tn(t,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(e){et.prototype[e]=function(t,r){return this.request(Ke(r||{},{method:e,url:t,data:r&&c.hasOwnProp(r,"data")?r.data:void 0}))}}),c.forEach(["post","put","patch","query"],function(e){function t(r){return function(o,a,l){return this.request(Ke(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}et.prototype[e]=t(),e!=="query"&&(et.prototype[e+"Form"]=t(!0))});let Ma=class ri{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(l=>{r.subscribe(l),o=l}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,l){r.reason||(r.reason=new Nt(o,a,l),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ri(function(i){e=i}),cancel:e}}};function Oa(s){return function(t){return s.apply(null,t)}}function Pa(s){return c.isObject(s)&&s.isAxiosError===!0}const nr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(nr).forEach(([s,e])=>{nr[e]=s});function Rn(s){const e=new et(s),t=kr(et.prototype.request,e);return c.extend(t,et.prototype,e,{allOwnKeys:!0}),c.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Rn(Ke(s,i))},t}const Y=Rn(Ut);Y.Axios=et,Y.CanceledError=Nt,Y.CancelToken=Ma,Y.isCancel=an,Y.VERSION=tr,Y.toFormData=hs,Y.AxiosError=S,Y.Cancel=Y.CanceledError,Y.all=function(e){return Promise.all(e)},Y.spread=Oa,Y.isAxiosError=Pa,Y.mergeConfig=Ke,Y.AxiosHeaders=ae,Y.formToJSON=s=>on(c.isHTMLForm(s)?new FormData(s):s),Y.getAdapter=Cn.getAdapter,Y.HttpStatusCode=nr,Y.default=Y;const{Axios:sd,AxiosError:rd,CanceledError:nd,isCancel:id,CancelToken:od,VERSION:ad,all:ld,Cancel:cd,isAxiosError:ud,spread:dd,toFormData:fd,AxiosHeaders:hd,HttpStatusCode:pd,formToJSON:md,getAdapter:gd,mergeConfig:wd,create:yd}=Y;var $t=(s=>(s.GET="get",s.POST="post",s.PUT="put",s.DELETE="delete",s))($t||{});const kt=(()=>{function s(){const d=i();return!(!d||d==="undefined")}function e(d){d.accessToken&&localStorage.setItem("access_token",d.accessToken),d.refreshToken&&localStorage.setItem("refresh_token",d.refreshToken)}function t(){const d=localStorage.getItem("user");return d?JSON.parse(d).id:""}function r(){const d=localStorage.getItem("user");if(d)return JSON.parse(d)}function i(){return localStorage.getItem("access_token")}function o(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function l(d){if(!s())return;const h=kt.getUser();h&&(h.human=d,localStorage.setItem("user",JSON.stringify(h)))}return{isAuth:s,setTokens:e,getAccessToken:i,getRefreshToken:o,getUserId:t,clearTokens:a,getUser:r,updateHuman:l}})();class ir{constructor(e){n(this,"code",400);n(this,"err","");v.BuildClass(this,e)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(e,t){const r=e.config;if(e.response){if(e.response.status===401&&!r._retry)return r._retry=!0,t.defaults.headers.common.token=kt.getAccessToken(),e.config.headers.token=kt.getAccessToken(),e.config.baseURL=void 0,t.request(r);if(e.response.status>=500){if(e.response.data==="неверный логин или пароль"){_t.Error("Неверный логин или пароль");return}_t.Error("Ошибка на сервере, попробуйте позже")}if(e.response.status>=400&&e.response.status<500){const i=new ir(e.response.data).getErr();i&&_t.Error(i)}return Promise.reject(e)}}}const wt=Y.create();wt.interceptors.response.use(s=>s,async s=>await ir.Handle(s,wt));class Bt{static async Get(e,t,r){return await wt({method:$t.GET,url:e,headers:t,responseType:r})}static async Post(e,t,r,i){return t["Content-Type"]="multipart/form-data",await wt({method:$t.POST,url:e,headers:t,responseType:r,data:i})}static async Put(e,t,r){return t["Content-Type"]="multipart/form-data",await wt({method:$t.PUT,url:e,headers:t,data:r})}static async Delete(e,t){return await wt({method:$t.DELETE,url:e,headers:t})}}class Ss{constructor(e){n(this,"name","");v.BuildClass(this,e)}static Set(){}static Get(e,t){const r=sessionStorage.getItem(e);if(r){const i=JSON.parse(r),o=new Date,a=new Date(i.time),l=o.getTime()-a.getTime();return Math.round(l/6e4)>(t||10)?null:i.data}else return null}static async TryGet(e,t,r){let i;return i=Ss.Get(e,r),i||(i=await t()),i}}var or=(s=>(s.ContentType="Content-Type",s.Token="token",s))(or||{}),Mn=(s=>(s.ApplicationJson="application/json",s.MultipartFormData="multipart/form-data",s))(Mn||{});const q=class q{static Setup(e="http://localhost",t,r="api"){this.baseUrl=j.BuildSafeUrl(e,t,r),this.host=e,this.apiVersion=r}static newWebSocket(e){const t=this.host.replace("http","ws")+"/ws/"+e;return new WebSocket(t)}static download(e,t){const r=q.getDownloadFileName(e,t.headers);if(!(t.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const i=URL.createObjectURL(t.data),o=document.createElement("a");o.href=i,o.setAttribute("download",r),o.setAttribute("target","_blank"),document.body.appendChild(o),o.click()}static getDownloadFileName(e,t){if(e)return e;const r=t["content-disposition"];if(!r)return"file";const i=r.indexOf('"')+1,o=r.lastIndexOf('"'),a=r.substring(i,o);return a||"file"}static getHeaders(e){const t=Fe.Get(ve.AccessToken);return e||(e=q.headers),t&&(e[or.Token]=t),e??q.headers}static returnResponse(e,t){if(t)return e!=null&&e.isBlob?q.download(e.downloadFileName,t):t.data}static async Get(e){return q.returnResponse(e,await Bt.Get(q.buildUrl((e==null?void 0:e.query)??""),q.getHeaders(e==null?void 0:e.headers),q.getResponseType(e==null?void 0:e.isBlob)))}static async Post(e){return q.returnResponse(e,await Bt.Post(q.buildUrl(e==null?void 0:e.query),q.getHeaders(e==null?void 0:e.headers),q.getResponseType(e.isBlob),q.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Put(e){return q.returnResponse(e,await Bt.Put(q.buildUrl(e==null?void 0:e.query),q.getHeaders(e==null?void 0:e.headers),q.createFormDataPayload(e==null?void 0:e.payload,e==null?void 0:e.fileInfos)))}static async Delete(e){return q.returnResponse(e,await Bt.Delete(q.buildUrl(e==null?void 0:e.query),q.getHeaders(e==null?void 0:e.headers)))}static async Subscribe(e){const{query:t}=e;return new EventSource(q.buildUrl(t))}static buildUrl(e=""){try{return Gs(this.baseUrl,e)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(e){return e?"blob":"json"}static createFormDataPayload(e,t){const r=new FormData;if(r.append("form",JSON.stringify(e)),t)for(const i of t)i.file&&r.append(i.id??"files",i.file,i.originalName);return r}};n(q,"baseUrl",""),n(q,"apiVersion","api"),n(q,"host",""),n(q,"headers",{[or.ContentType]:Mn.ApplicationJson});let Q=q;const ar=(s,e)=>{const t=s.__vccOpts||s;for(const[r,i]of e)t[r]=i;return t},_a={},Ia={style:{"text-align":"center"}};function Ta(s,e){return E.openBlock(),E.createElementBlock("div",Ia,[...e[0]||(e[0]=[E.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Fa=[{path:"/:pathMatch(.*)*",name:"NotFound",component:ar(_a,[["render",Ta]])}],Re=class Re{static Setup(e,t=""){this.router=e,this.title=t,this.ChangeDocumentTitle(),this.AddRoutes(Fa)}static Get(){return this.router}static AddRoutes(e){e.forEach(t=>{this.Get().addRoute(t)})}static async To(e){await this.Get().push(e)}static async ToHome(){}static async Replace(e){await this.Get().replace(e)}static Id(){return Re.GetStringParam("id")}static Slug(){return Re.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return Re.GetStringQueryParam("qid")}static Route(){var e;return(e=this.Get())==null?void 0:e.currentRoute.value}static RouterPushBlank(e){const t=this.Get().resolve({path:e});window.open(t==null?void 0:t.href,"_blank")}static GetPath(){var t;const e=(t=Re.Route())==null?void 0:t.path.split("/");return!e||e.length<=0?"":e[e.length-1]}static async ToAdmin(e){if(!e){await this.Get().push("/admin");return}let t=e;t[0]==="/"&&(t=e.substring(1)),await Re.To(`/admin/${t}`)}static GetStringQueryParam(e){return String(this.Route().query[e])}static GetNumberQueryParam(e){return Number(this.Route().query[e]??0)}static GetStringParam(e){var t;return(t=this.Route())==null?void 0:t.params[e]}static SetQueryParam(e,t){const r=new URL(window.location);r.searchParams.set(e,String(t)),history.replaceState(null,"",r)}static Resolve(e){return this.Get().resolve(e)}};n(Re,"router"),n(Re,"title",""),n(Re,"ChangeDocumentTitle",(e="")=>{let t=Re.Route().meta.title??e;t&&(t=" | "+t),document.title=Re.title+t});let Ae=Re;class V{constructor(e,t){n(this,"items",E.reactive([]));n(this,"item");n(this,"options",E.reactive([]));n(this,"count",E.ref(0));n(this,"classConstructor");n(this,"url","");n(this,"searchStr",E.ref(""));this.classConstructor=e,this.item=E.reactive(new this.classConstructor),this.url=t}Set(e){Object.assign(this.item,new this.classConstructor(e))}getUrl(e){return e?`${this.url}/${e}`:this.url}async GetOptions(e="name",t="id"){const r=`${this.getUrl()}/options/${e}/${t}`;try{const i=await Q.Get({query:r});i&&(this.options.splice(0,this.options.length),this.options.push(...i))}catch(i){console.warn("GetOptions failed:",i)}}async GetAll(e){try{let t;const r=Q.Get;e&&e.withCache?t=await Ss.TryGet(this.getUrl(),r):t=await r({query:this.getUrl()}),Array.isArray(t)?this.SetAll(t):this.SetAllWithCount(t)}catch(t){console.warn("GetAll failed:",t)}}async Get(e){try{e||(e=Ae.Id()),this.Set(await Q.Get({query:this.getUrl(e)}))}catch(t){console.warn("Get failed:",t)}}async GetBySlug(e){try{e||(e=Ae.Slug()),this.Set(await b.H.HttpClient.Get({query:this.getUrl("by-slug/"+e)}))}catch(t){console.warn("GetBySlug failed:",t)}}async FTSP(e){var t;try{const i=((e==null?void 0:e.ftsp)??$r.Get()).clearForHTTP(),o={payload:{ftsp:i},query:this.getUrl("ftsp")},a=await Q.Post(o);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(i.p.append){this.AppendToAll((t=a.data)==null?void 0:t.items);return}this.SetAllWithCount(a.data)}}catch(r){console.warn("FTSP failed:",r)}}async Create(e){try{const t=e??this.item,r={payload:t,query:this.getUrl()};return t.getFileInfos&&(r.fileInfos=t.getFileInfos()),await Q.Post(r)}catch(t){console.warn("Create failed:",t)}}async CreateAndSet(e){const t=await this.Create(e);this.Set(t)}async CreateMany(e){if(!e)return;const t=[];e.forEach(r=>{t.push(new Promise(()=>this.Create(r)))}),Promise.all(t)}async Update(e){try{const t=e??this.item,r={query:this.getUrl(`${t.id}`),payload:t};return t.getFileInfos&&(r.fileInfos=t.getFileInfos(),r.fileInfos.forEach(i=>i.url="")),await Q.Put(r)}catch(t){console.warn("Update failed:",t)}}async UpdateAndSet(e){const t=await this.Update(e);this.Set(t)}async UpdateAndReset(e){await this.Update(e??this.item),this.Set()}async Remove(e){if(e)try{await Q.Delete({query:this.getUrl(`${e}`)}),this.RemoveItem(e)}catch(t){console.warn("Remove failed:",t)}}async UpdateMany(e){if(e||(e=this.items),!e)return;const t=[];e.forEach(r=>{t.push(new Promise(()=>this.Update(r)))}),Promise.all(t)}SetAll(e){this.items.splice(0,this.items.length),e&&this.items.push(...e.map(t=>new this.classConstructor(t)))}SetAllWithCount(e){this.SetAll(e.items),this.count.value=e.count}RemoveItem(e){const t=this.items.findIndex(r=>r.id===e);t<0||this.items.splice(t,1)}AppendToAll(e){if(e){if(Array.isArray(e)){const t=e.map(r=>new this.classConstructor(r));this.items.push(...t);return}this.items.push(new this.classConstructor(e))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){v.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(e){if(e){if(Array.isArray(e)){const t=e.map(r=>new this.classConstructor(r));this.items.unshift(...t);return}this.items.unshift(new this.classConstructor(e))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(e=>b.H.Strings.SearchInFields(this.searchStr.value,e.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function Aa(s,e){s=="left"&&e.next(),s=="right"&&e.prev()}const xa=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Da{static GetRandColor(e){return Xe.GetRandEL(e??xa)}}function On(s,e){const t=[],r=e||Ee.Asc,i=r===Ee.Asc?Ee.Desc:Ee.Asc;return Object.values(s).forEach(o=>{t.push(o(r)),t.push(o(i))}),t.length>0&&!t.some(o=>o.default)&&(t[0].default=!0),e&&t.forEach(o=>{o.default&&(o.default=o.order===e)}),t}let Ua=class{constructor(){n(this,"startHour",9);n(this,"endHour",19);n(this,"timelinePxHeight",50);n(this,"timelineStep",Ot.FiveMinutes);n(this,"activeTime","");n(this,"activeObjectId","");n(this,"dragged",!1);n(this,"draggedStartTime","");n(this,"draggedEndTime","");n(this,"timelines",ss[Ot.FiveMinutes])}startDrag(e,t){this.draggedStartTime=e,this.draggedEndTime=t,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=ss[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Xe.GenerateNumsRange(this.startHour,this.endHour)}};const lr=s=>s===8||s===46,Na=s=>s>46&&s<58,$a=s=>s>34&&s<41,ka=s=>s+".",Ba=(s,e,t)=>{lr(e)||$a(e)||(!Na(e)||t>9)&&s.preventDefault()};function Ga(s,e){if(e>8){let t=s.substring(0,2).replace(".","1");Number(t)>31&&(t="31");let r=s.substring(3,5).replace(".","1");Number(r)>12&&(r="12");let i=s.substring(6,10).replace(".","1");Number(i)>2100&&(i="2100"),s=t+"."+r+"."+i}return s}function ja(s){const e=s.keyCode;let t=s.srcElement.value;const r=t.length;Ba(s,e,r),!lr(e)&&(r===2||r===5)&&(t=ka(t));const i=s.srcElement.value+String.fromCharCode(s.which);if(lr(e)){s.srcElement.value=t;return}t.length===0&&Number(i)>3&&(t="3",s.preventDefault()),t.length===1&&Number(i)>31&&(t="31",s.preventDefault()),i.length===5&&Number(i.substring(3,5))>12&&(t=t.substring(0,3)+"12",s.preventDefault()),t=Ga(t,r),s.srcElement.value=t}const La=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Ha="ru-RU";class je{constructor(){n(this,"locale","ru-RU")}static Format(e,t){if(!e)return"";const r={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return t&&(r.year=t.year||t.year===void 0?t.year:r.year,r.month=t.month||t.month===void 0?t.month:r.month,r.day=t.day||t.day===void 0?t.day:r.day,r.hour=t.hour??r.hour,r.minute=t.minute??r.minute),Intl.DateTimeFormat(Ha,r).format(new Date(e))}static FormatWithTime(e){return je.Format(e,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(e){const t=e.split(".");return new Date(`${t[2]}-${t[1]}-${t[0]}`)}static GetPeriod(e,t,r){return`${this.Format(e,r)}-${this.Format(t,r)}`}static GetShortDayName(e){return e?La[e.getDay()]:""}static GetCurrentWeekPeriod(e){const t=new Date,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()-t.getDay()+1),i=new Date(t.getFullYear(),t.getMonth(),r.getDate()+7);return this.GetPeriod(r,i,e||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(e,t){const r=new Date,i=new Date,o=je.SplitHourTime(e),a=je.SplitHourTime(t);return r.setHours(o[0],o[1],0,0),i.setHours(a[0],a[1],0,0),(i.getTime()-r.getTime())/1e3/60}static HourTimeinMunutes(e){const t=je.SplitHourTime(e);return t[0]*60+t[1]}static SplitHourTime(e){const t=e.split(":");return[Number(t[0]),Number(t[1])]}static AddMinutesToHM(e,t){const r=new Date,i=je.SplitHourTime(e);r.setHours(i[0],i[1],0,0);const o=new Date(r.getTime()+t*6e4),a=o.getHours(),l=o.getMinutes();return`${a}:${l}`}static GetMonthsDiff(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}static StringToDate(e){const t=e.split(".");return new Date(`${t[2]}-${t[1]}-${t[0]}`)}static GetDateOrToday(e){return e?e.date:new Date}static InPeriod(e,t,r){return new Date(e)>=new Date(t)&&new Date(e)<=new Date(r)}static GetDatesFromPeriod(e,t){const r=[new Date(e)];let i=e;for(;i<=t;)i=je.AddDays(i,1),r.push(i);return r}static AddDays(e,t){const r=new Date(e);return r.setDate(r.getDate()+t),r}static Eq(e,t){return e.getTime()===t.getTime()}}class qa{constructor(){n(this,"dragged",!1);n(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(e){this.dragged=!0,e&&e.dataTransfer&&e.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class Va{static Get(e){const t=e.split(".");return t[t.length-1]}}const za=(()=>{function s(o,a){localStorage.setItem(`${o}_favourite`,a.toString())}function e(o,a){const l=localStorage.getItem(`${o}_favourite`);return l?l.split(",").includes(a):!1}function t(o,a){const l=localStorage.getItem(`${o}_favourite`);if(!l){s(o,[a]);return}const d=l.split(",");d.push(a),s(o,d)}function r(o,a){const l=localStorage.getItem(`${o}_favourite`);if(!l)return;const d=l.split(",").filter(h=>h!==a);s(o,d)}function i(){for(const o in localStorage)o.includes("_favourite")&&localStorage.removeItem(o)}return{addToFavourite:t,removeFromFavourite:r,setFavourite:s,isFavourite:e,clearFavourite:i}})();/*!
23
+ * vue-router v4.6.4
24
+ * (c) 2025 Eduardo San Martin Morote
25
+ * @license MIT
26
+ */function Pn(s){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+s].concat(e))}Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");const Wa=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Ja(s,e,t){const r=()=>{s[e].delete(t)};E.onUnmounted(r),E.onDeactivated(r),E.onActivated(()=>{s[e].add(t)}),s[e].add(t)}function Qa(s){if(process.env.NODE_ENV!=="production"&&!E.getCurrentInstance()){Pn("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=E.inject(Wa,{}).value;if(!e){process.env.NODE_ENV!=="production"&&Pn("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}Ja(e,"leaveGuards",s)}class Xa{constructor(){n(this,"list",[]);n(this,"defaultSortModel");n(this,"changeFlag",!1)}Set(e){this.Reset(),e&&(Array.isArray(e)?this.list=e:this.list=On(e),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(e=>e.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const Ya=new Xa;function Za(){const s=E.ref(!1),e=E.ref(!1);return{confirmLeave:s,saveButtonClick:e,beforeWindowUnload:o=>{s.value&&o.preventDefault()},formUpdated:()=>{s.value=!0},showConfirmModal:(o,a)=>{s.value&&!e.value?o():a()}}}const Ka=(()=>{const s=(o,a)=>E.onBeforeMount(async()=>{b.F.FTSP.Get().reset(),Ya.Set(a==null?void 0:a.sortsLib),await o()}),{saveButtonClick:e,showConfirmModal:t}=Za(),r=o=>Qa((a,l,d)=>{t((o||i)(),d)}),i=o=>async()=>{e.value=!0;try{o&&await o()}catch{return}};return{onBeforeMount:s,onBeforeRouteLeave:r,submit:i}})();function el(s,e){const t=[];if(s)for(let r=0;r<Math.ceil(s.length/e);r++)t[r]=s.slice(r*e,r*e+e);return t}class cr{constructor(){n(this,"items",[]);n(this,"idx",0);n(this,"key","")}preSelect(){const e=Ae.GetStringQueryParam(this.key);if(!e||e==="undefined"){this.Select(0);return}const t=this.items.findIndex(r=>r.slug===e);t>-1&&this.Select(t)}static Create(e,t){const r=new cr;return r.key=e,r.items=t,r.items.length&&r.preSelect(),r}Select(e){if(this.items.length){if(e===void 0)return this.preSelect();this.idx=e,Ae.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.items[this.idx]}GetComponent(){return this.items[this.idx].component}GetSlug(){return this.items[this.idx].slug}}const Is=class Is{static Format(e){let t=e;if(!t)e=t;else{(t[0]==="7"||t[0]==="8")&&t.length!==1&&(t=t.slice(1));const r=t.replace(/\+7|[^\d]/g,""),i=r.length;switch(!0){case i===0:e="";break;case(i===1&&t.length===1&&r==="7"):case(i===1&&t.length===1&&r==="8"):e="+7 (";break;case i<4:e=`+7 (${r}`;break;case i<7:e=`+7 (${r.slice(0,3)}) ${r.slice(3)}`;break;case i<9:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}`;break;default:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}-${r.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};n(Is,"validatePhone",(e,t,r)=>{Is.getPhoneRegExp().test(t)||!t?r():r(new Error("Пожалуйста, введите корректный номер телефона"))});let ur=Is;class tl{static Count(e){const t=e.filter(o=>o.rating!==0);let r=0;t.forEach(o=>r=r+o.rating);const i=r/t.length;return isNaN(i)?0:Number((r/t.length).toFixed(2))}}class sl{static async Auth(e){e&&e()}static Dev(){}}class rl{constructor(){n(this,"startHour",9);n(this,"startHM",`${this.startHour}:00`);n(this,"endHour",19);n(this,"endHM",`${this.endHour}:00`);n(this,"timelinePxHeight",50);n(this,"timelineStep",Ot.FiveMinutes);n(this,"timelines",ss[Ot.FiveMinutes])}periodIsCorrect(e,t){return U.GtOrEq(e,this.startHM)&&U.GtOrEq(this.endHM,t)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=ss[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Xe.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,t,r,i){return i.filter(o=>o.id!==r).every(o=>!U.PeriodsIntersects(e,t,o.startTime,o.endTime))}sortByStartTime(e){e.sort((t,r)=>U.HMtoM(t.startTime)-U.HMtoM(r.startTime))}}const nl=-68;function il(s,e){if(!s){document.body.scrollTo({top:0,behavior:"smooth"});return}const t=document.querySelector(s),r=e??nl;let i=0;t&&(i=t.getBoundingClientRect().top+r+document.body.scrollTop),i&&document.body.scrollTo({top:i,behavior:"smooth"})}class ol{static Sort(e){e.forEach((t,r)=>t.order=r)}}function al(s,e){let t=!0;return s.value.validate(r=>(r||(t=!1),t)),t}const ll=s=>new Promise(e=>{if(document.querySelector(s))return e(document.querySelector(s));const t=new MutationObserver(()=>{document.querySelector(s)&&(t.disconnect(),e(document.querySelector(s)))});t.observe(document.body,{childList:!0,subtree:!0})});let cl=class vr{constructor(e){n(this,"id");n(this,"message","");n(this,"userName");n(this,"createdOn",new Date);n(this,"chatId");n(this,"type","message");v.BuildClass(this,e)}static Create(e,t,r,i){const o=new vr;return o.id=Be(),o.chatId=e,o.message=r,o.userName=i,o}static CreatePingMessage(){const e=new vr;return e.type="ping",e.id=Be(),e}isMessage(){return this.type==="message"||this.type===""}};const ul="";class dl{constructor(e="",t="",r="set"){n(this,"client");n(this,"endpoint","");n(this,"query","");n(this,"period",2e4);v.BuildClass(this,{endpoint:e,query:t,mutation:r}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(cl.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,ul.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}class k{}n(k,"Arrays",Xe),n(k,"Axios",Bt),n(k,"BaseStore",V),n(k,"Cache",Ss),n(k,"Classes",v),n(k,"CarouselSwipe",Aa),n(k,"Color",Da),n(k,"CreateSortModels",On),n(k,"Cursor",Ua),n(k,"DateMask",ja),n(k,"Dates",je),n(k,"Dragger",qa),n(k,"Extension",Va),n(k,"Favourite",za),n(k,"Hooks",Ka),n(k,"HttpClient",Q),n(k,"Id",de),n(k,"MakeCarousel",el),n(k,"Period",ks),n(k,"PhoneService",ur),n(k,"Rating",tl),n(k,"Router",Ae),n(k,"RouterGuard",sl),n(k,"Scheduler",rl),n(k,"Scroll",il),n(k,"Sorter",ol),n(k,"Static",js),n(k,"Strings",j),n(k,"Time",U),n(k,"Timer",Pt),n(k,"Token",kt),n(k,"Menus",cr),n(k,"validate",al),n(k,"WaitElement",ll),n(k,"WebSocketClient",dl);class fl{constructor(){n(this,"limit",25);n(this,"count",0);n(this,"curPage",1);n(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const hl=new fl;var _n=(s=>(s.TableList="tableList",s.Default="",s))(_n||{}),In=(s=>(s.None="None",s.Next="Next",s.Prev="Prev",s))(In||{}),Tn=(s=>(s.Year="Год",s.Month="Месяц",s.Week="Неделя",s.Day="День",s))(Tn||{}),Fn=(s=>(s.YouTube="YouTube",s.VK="VK",s.Instagram="Instagram",s.Facebook="Facebook",s))(Fn||{}),dr=(s=>(s.simple="simple",s.oneToMany="oneToMany",s.manyToMany="manyToMany",s))(dr||{});const pl=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:_n,Animations:In,CalendarScale:Tn,LocalStoreKeys:ve,SocialTypes:Fn,ValueRelation:dr},Symbol.toStringTag,{value:"Module"}));let ml=class{async Login(e=ut.Form.GetValues()){const t=await Q.Post({query:"auth/login",payload:e});if(!t)throw"Ошибка авторизации";ut.Status.SetState(t)}async LoginAs(e){await Q.Post({query:"auth/login-as",payload:{email:e}})}async Register(e=ut.Form.GetValues()){const t=await Q.Post({query:"auth/register",payload:e});if(!t)throw t}async RestorePassword(e=ut.Form.GetValues()){await Q.Post({query:"auth/restore-password",payload:e})}async PasswordChange(e=ut.Form.GetValues()){e.id=Ae.GetStringParam("userId"),await Q.Put({query:"auth/password-change",payload:e})}async RefreshToken(){await Q.Post({query:"auth/refresh-token",payload:{refreshToken:kt.getRefreshToken()}})}async CheckUuid(e){await Q.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}async ConfirmEmail(e){await Q.Get({query:`auth/confirm-email/${e}`})}async EmailIsConfirm(e){await Q.Get({query:`auth/email-is-confirm/${e}`})}};const gl=new ml;var wl=Object.defineProperty,bs=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&wl(e,t,i),i};const Gt=class ni{constructor(e){n(this,"id");n(this,"description","");n(this,"time","");n(this,"latitude","");n(this,"longitude","");n(this,"emails",[]);n(this,"postAddresses",[new rs]);n(this,"phones",[]);n(this,"websites",[]);v.BuildClass(this,e)}addEmail(){const e=Je.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Qe.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new ni;return e.id=de.UUID(),e}removeEmail(e){v.RemoveFromClassById(e,this.emails)}removePhone(e){v.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new rs)}addWebsite(){this.websites.push(new Ls)}pushFirst(){this.emails.length||this.emails.push(new Je),this.phones.length||this.phones.push(new Qe)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};bs([v.GetClassConstructor(Je)],Gt.prototype,"emails"),bs([v.GetClassConstructor(rs)],Gt.prototype,"postAddresses"),bs([v.GetClassConstructor(Qe)],Gt.prototype,"phones"),bs([v.GetClassConstructor(Ls)],Gt.prototype,"websites");let An=Gt,yl=class extends V{constructor(){super(An,"contacts")}};const Sl=new yl;let bl=class extends V{constructor(){super(Je,"emails")}};const Cl=new bl;class fr{constructor(e){n(this,"id");n(this,"ftsp");n(this,"name","");v.BuildClass(this,e)}static Create(e){const t=new fr;return t.id=de.UUID(),t.ftsp=JSON.stringify(e),t}}let vl=class extends V{constructor(){super(fr,"ftsp-presets")}};const El=new vl;let Rl=class extends V{constructor(){super(xr,"humans")}};const Ml=new Rl;let Ol=class extends V{constructor(){super(Qe,"phones")}};const Pl=new Ol;class _l{constructor(e){n(this,"id");n(this,"nameRus","");v.BuildClass(this,e)}}var Il=Object.defineProperty,Tl=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&Il(e,t,i),i};class xn{constructor(e){n(this,"id");n(this,"nameRus","");n(this,"fields",[]);v.BuildClass(this,e)}}Tl([v.GetClassConstructor(_l)],xn.prototype,"fields");let Fl=class extends V{constructor(){super(xn,"schemas")}};const Al=new Fl;class Dn{constructor(e){n(this,"id","");n(this,"value","");n(this,"label","");n(this,"key","");n(this,"description","");n(this,"route","");n(this,"searchElementMetas",[]);v.BuildClass(this,e)}}class xl{constructor(e){n(this,"id");n(this,"name","");n(this,"label","");v.BuildClass(this,e)}}var Dl=Object.defineProperty,Un=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&Dl(e,t,i),i};class yt{constructor(e){n(this,"id");n(this,"key","");n(this,"label","");n(this,"order",0);n(this,"route","");n(this,"table","");n(this,"active",!0);n(this,"searchColumn","");n(this,"descriptionColumn","");n(this,"labelColumn","");n(this,"valueColumn","");n(this,"options",[]);n(this,"searchGroupMetaColumns",[]);v.BuildClass(this,e)}}Un([v.GetClassConstructor(Dn)],yt.prototype,"options"),Un([v.GetClassConstructor(xl)],yt.prototype,"searchGroupMetaColumns");class hr{constructor(e){n(this,"query","");n(this,"key","");n(this,"params","");n(this,"suggester",!1);n(this,"mustBeTranslated",!0);n(this,"options",[]);n(this,"searchGroupId","");n(this,"searchGroups",[]);n(this,"searchGroup",new yt);n(this,"searchObjects",[]);n(this,"pagination",new os);n(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(t=>new yt(t))),e.searchGroup&&(this.searchGroup=new yt(e.searchGroup)),e.options&&(this.options=e.options.map(t=>new Dn(t))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const t=this.searchGroups.find(r=>r.id===e);t?this.searchGroup=t:this.searchGroup=new yt}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Ae.Route().query.groupId)}setQuery(){const e=Ae.Route().query.query;e&&(this.query=e)}}let Ul=class{constructor(){n(this,"isSearchDrawerOpen",E.ref(!1));n(this,"searchModel",E.reactive(new hr));n(this,"searchGroups",E.reactive([]));n(this,"count",0)}async Search(e){const t=await Q.Get({query:`search?key=${e.key}&query=${e.query}`});t&&t.searchGroup&&t.searchGroup.options.forEach(r=>{e.searchObjects.push({id:r.id,value:r.value,label:r.label,description:r.description})})}async mainSearch(e){this.SetSearchModel(await Q.Get({query:`search/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(r=>{r.options=[]});const t=await Q.Get({query:`search/main?searchModel=${e.toUrl()}`});return this.SetSearchModel(t),t}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new hr}SetSearchModel(e){e&&(this.searchModel=new hr(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Nl=new Ul;let $l=class extends V{constructor(){super(ns,"users-accounts")}};const kl=new $l;var tt=(s=>(s.String="string",s.Text="text",s.Number="number",s.Date="date",s.DateTime="dateTime",s.Radio="radio",s.Set="set",s.Boolean="boolean",s.Files="files",s.File="file",s.MatrixRadio="matrixRadio",s.MatrixSet="matrixSet",s))(tt||{});class Nn{constructor(e){n(this,"id");n(this,"name",tt.String);n(this,"valueRelation",dr.simple);v.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===tt.Radio)return"RadioProp";if(this.name===tt.Set)return"SetProp";if(this.name===tt.Number)return"NumberProp";if(this.name===tt.String)return"StringProp"}}let Bl=class extends V{constructor(){super(Nn,"value-types")}};const Gl=new Bl;let jl=(ye=class{},n(ye,"Auth",gl),n(ye,"Contacts",Sl),n(ye,"Emails",Cl),n(ye,"FileInfos",new V(we,"file-infos")),n(ye,"FTSPPresets",El),n(ye,"Humans",Ml),n(ye,"Phones",Pl),n(ye,"Schemas",Al),n(ye,"UserAccounts",kl),n(ye,"ValueTypes",Gl),n(ye,"Search",Nl),ye);var $n=(s=>(s.XS="xs",s.S="s",s.M="m",s.L="l",s.XL="xl",s))($n||{});let Ll=(qe=class{},n(qe,"Orders",Ee),n(qe,"Sizes",$n),n(qe,"Statuses",fe),n(qe,"DataTypes",te),n(qe,"ValueTypes",tt),n(qe,"Operators",J),qe);class Hl{constructor(){n(this,"title","");n(this,"buttons",[]);n(this,"editTitle",E.ref(!1));n(this,"showEdit",E.ref(!1))}Set(e="",t){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=t}}const ql=new Hl;class Vl{constructor(){n(this,"menu",[]);n(this,"path","");n(this,"isOpen",!0);n(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var t;return j.SearchIn(e.name,this.filterString)||((t=e.children)==null?void 0:t.some(r=>j.SearchIn(r.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var t;return this.filterString?(t=e.children)==null?void 0:t.filter(r=>j.SearchIn(r.name,this.filterString)):e.children}}const zl=new Vl;class Wl{constructor(){n(this,"Menu",E.reactive(zl));n(this,"Head",E.reactive(ql))}}const Jl=new Wl;class Ql extends _r{constructor(){super(...arguments);n(this,"confirmButtonText","Да");n(this,"cancelButtonText","Нет");n(this,"resolve");n(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(t){return super.show(),typeof t!="string"&&(this.confirmButtonText=t.confirmButtonText,this.cancelButtonText=t.cancelButtonText),new Promise((r,i)=>{this.resolve=r,this.reject=i})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const Xl=new Ql;class Yl extends Pr{Show(){super.show()}Hide(){super.hide()}}const Zl=new Yl;class st{}n(st,"Admin",Jl),n(st,"Dialog",Xl),n(st,"Loading",Zl),n(st,"Notify",E.reactive(_t)),n(st,"Btn",We),n(st,"Input",Or);class b{}n(b,"Auth",E.reactive(ut)),n(b,"UI",E.reactive(st)),n(b,"Paginator",E.reactive(hl)),n(b,"S",jl),n(b,"H",k),n(b,"C",Ge),n(b,"T",Ll),n(b,"I",pl),n(b,"F",Tt);class kn{constructor(e){n(this,"id");n(this,"name","");n(this,"address","");n(this,"number");n(this,"building");n(this,"buildingId");b.H.Classes.BuildClass(this,e),this.setName()}setName(){this.building&&(this.name=this.building.address+", вход "+this.number,this.address=this.name)}getBuildingNumber(){var e;return String((e=this.building)==null?void 0:e.number)}getEntranceNumber(){return String(this.number)}}class Bn{constructor(e){n(this,"id");n(this,"number");n(this,"buildingId");b.H.Classes.BuildClass(this,e)}}var Kl=Object.defineProperty,Gn=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&Kl(e,t,i),i};class Cs{constructor(e){n(this,"id");n(this,"number","");n(this,"address","");n(this,"name","");n(this,"status","");n(this,"description","");n(this,"floors",[]);n(this,"entrances",[]);b.H.Classes.BuildClass(this,e)}}Gn([b.H.Classes.GetClassConstructor(Bn)],Cs.prototype,"floors"),Gn([b.H.Classes.GetClassConstructor(kn)],Cs.prototype,"entrances");const ec=Object.freeze(Object.defineProperty({__proto__:null,Building:Cs,Entrance:kn,Floor:Bn},Symbol.toStringTag,{value:"Module"}));let tc=class extends V{constructor(){super(Cs,"buildings")}};const sc=new tc,rc=Object.freeze(Object.defineProperty({__proto__:null,C:ec,S:Object.freeze(Object.defineProperty({__proto__:null,BuildingsStore:sc},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var St=(s=>(s.Ping="ping",s.Enter="enter",s.Exit="exit",s.Message="message",s.Write="write",s.Empty="",s))(St||{});class rt{constructor(e){n(this,"id");n(this,"userId");n(this,"chatId");n(this,"message","");n(this,"fileInfo",new b.C.FileInfo);n(this,"createdAt",new Date);n(this,"type",St.Message);v.BuildClass(this,e)}static Create(e,t,r){const i=new rt;return i.id=b.H.Id.UUID(),i.chatId=t,i.userId=r,i.message=e,i}static CreatePingMessage(){const e=new rt;return e.type=St.Ping,e.id=b.H.Id.UUID(),e}isMessage(){return this.type===St.Message||this.type===St.Empty}}var nc=Object.defineProperty,ic=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&nc(e,t,i),i};const jn=class ii{constructor(e){n(this,"id");n(this,"name","");n(this,"createdAt",new Date);n(this,"newMesage","");n(this,"userId","");n(this,"chatMessages",[]);b.H.Classes.BuildClass(this,e)}static Create(){const e=new ii;return e.id=b.H.Id.UUID(),e}addMessage(){if(this.newMesage==="")return;const e=rt.Create(this.newMesage,this.id,this.userId);return this.chatMessages.push(e),this.newMesage="",e}};ic([b.H.Classes.GetClassConstructor(rt)],jn.prototype,"chatMessages");let Ln=jn;const oc=Object.freeze(Object.defineProperty({__proto__:null,Chat:Ln,ChatMessage:rt},Symbol.toStringTag,{value:"Module"}));let ac=class extends V{constructor(){super(rt,"chat-messages")}};const lc=new ac;let cc=class extends V{constructor(){super(Ln,"chats")}};const uc=new cc,dc=Object.freeze(Object.defineProperty({__proto__:null,ChatMessages:lc,Chats:uc},Symbol.toStringTag,{value:"Module"}));class Hn{}n(Hn,"ChatMessage",St);const fc=Object.freeze(Object.defineProperty({__proto__:null,C:oc,S:dc,T:Hn},Symbol.toStringTag,{value:"Module"}));class qn{constructor(e){n(this,"id");n(this,"num","");n(this,"fileInfoId");n(this,"fileInfo",new we);b.H.Classes.BuildClass(this,e)}}class jt{constructor(e){n(this,"id");n(this,"passportId");n(this,"fileInfoId");n(this,"fileInfo",new b.C.FileInfo);n(this,"order",0);v.BuildClass(this,e)}static Create(e){const t=new jt;return t.id=b.H.Id.UUID(),t.passportId=e,t}}var hc=Object.defineProperty,pc=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&hc(e,t,i),i};class pr{constructor(e){n(this,"id");n(this,"num","");n(this,"seria","");n(this,"division","");n(this,"divisionCode","");n(this,"citzenship","");n(this,"date",new Date);n(this,"address","");n(this,"passportScans",[]);v.BuildClass(this,e)}}pc([v.GetClassConstructor(jt)],pr.prototype,"passportScans");class Vn{constructor(e){n(this,"id");n(this,"num","");n(this,"fileInfoId");n(this,"fileInfo",new we);b.H.Classes.BuildClass(this,e)}}const mc=Object.freeze(Object.defineProperty({__proto__:null,Inn:qn,Passport:pr,PassportScan:jt,Snils:Vn},Symbol.toStringTag,{value:"Module"}));let gc=class extends V{constructor(){super(qn,"inns")}};const wc=new gc;let yc=class extends V{constructor(){super(jt,"passport-scans")}};const Sc=new yc;let bc=class extends V{constructor(){super(pr,"passports")}};const Cc=new bc;let vc=class extends V{constructor(){super(Vn,"snilss")}};const Ec=new vc,Rc=Object.freeze(Object.defineProperty({__proto__:null,C:mc,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:wc,PassportScans:Sc,Passports:Cc,Snilss:Ec},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class mr{constructor(e){n(this,"id");n(this,"name","");b.H.Classes.BuildClass(this,e)}static Create(e){const t=new mr;return t.id=b.H.Id.UUID(),t.name=e,t}}const Mc=Object.freeze(Object.defineProperty({__proto__:null,Extract:mr},Symbol.toStringTag,{value:"Module"})),Oc=[{path:"/admin/extracts",name:"ExtractsList",component:()=>Promise.resolve().then(()=>Bu)}];class Lt{constructor(e){n(this,"id");n(this,"name","");n(this,"label","");b.H.Classes.BuildClass(this,e)}static Create(e,t){const r=new Lt;return r.id=b.H.Id.UUID(),r.name=e,r.label=t,r}}let Pc=class extends V{constructor(){super(Lt,"extracts")}};const _c=new Pc,Ic=Object.freeze(Object.defineProperty({__proto__:null,C:Mc,R:Oc,S:Object.freeze(Object.defineProperty({__proto__:null,ExtractsStore:_c},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class nt{constructor(e){n(this,"id");n(this,"name","");n(this,"score",0);n(this,"order",0);n(this,"showMoreQuestions",!1);n(this,"showOther",!1);n(this,"fieldId");n(this,"isMatrixY",!1);b.H.Classes.BuildClass(this,e)}static Create(e){const t=new nt;return t.id=b.H.Id.UUID(),t.fieldId=e,t}}class zn{constructor(e){n(this,"id");n(this,"name","");n(this,"order",0);n(this,"fieldId");b.H.Classes.BuildClass(this,e)}}class gr{constructor(e){n(this,"id");n(this,"name","");n(this,"order",0);b.H.Classes.BuildClass(this,e)}}class bt{constructor(e){n(this,"id");n(this,"name","");n(this,"fieldId");b.H.Classes.BuildClass(this,e)}static Create(e){const t=new bt;return t.id=b.H.Id.UUID(),t.fieldId=e,t}}var Tc=Object.defineProperty,Ht=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&Tc(e,t,i),i};const it=class xs{constructor(e){n(this,"id");n(this,"name","");n(this,"code","");n(this,"valueTypeId");n(this,"order",0);n(this,"ageCompare",!1);n(this,"answerVariants",[]);n(this,"answerVariantsForDelete",[]);n(this,"fieldExamples",[]);n(this,"fieldVariants",[]);n(this,"valueType",new Nn);n(this,"fieldMeasures",[]);n(this,"showSet",!1);n(this,"showRadio",!1);n(this,"isEdit",!1);n(this,"children",[]);n(this,"parentId");n(this,"formSectionId");n(this,"selected",!1);b.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const t=new xs;return t.id=b.H.Id.UUID(),t.formSectionId=e,t}getRegisterPropertyRadioOriginalValue(e){const t=this.answerVariants.find(r=>r.id===e);return t?t.name:""}addRadioItem(e){const t=new nt(e);t.order=this.answerVariants.length,this.answerVariants.push(t)}removeRadioItem(e){const t=this.answerVariants[e].id;t&&this.answerVariantsForDelete.push(t),this.answerVariants.splice(e,1)}changeRelation(e){const t=e.find(r=>r.id===this.valueTypeId);if(t){if(t.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(t.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=t}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,t)=>e.order=t)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new gr(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new bt)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=nt.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=xs.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=bt.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new xs(this);return e.id=b.H.Id.UUID(),e.answerVariants.forEach(t=>{t.id=b.H.Id.UUID(),t.fieldId=e.id}),e.children=e.children.map(t=>{const r=t.copy();return r.parentId=e.id,r}),e}};Ht([b.H.Classes.GetClassConstructor(nt)],it.prototype,"answerVariants"),Ht([b.H.Classes.GetClassConstructor(zn)],it.prototype,"fieldExamples"),Ht([b.H.Classes.GetClassConstructor(bt)],it.prototype,"fieldVariants"),Ht([b.H.Classes.GetClassConstructor(gr)],it.prototype,"fieldMeasures"),Ht([b.H.Classes.GetClassConstructor(it)],it.prototype,"children");let vs=it;class wr{constructor(e){n(this,"id");n(this,"answerId");n(this,"comment","");n(this,"fileInfoId");n(this,"fileInfo",new we);b.H.Classes.BuildClass(this,e)}}class ot{constructor(e){n(this,"id");n(this,"answerVariantId");n(this,"answerVariantIdY");n(this,"fieldFillId");b.H.Classes.BuildClass(this,e)}static Create(e,t){const r=new ot;return r.id=Be(),r.fieldFillId=e,r.answerVariantId=t,r}static GetClassName(){return"selectedAnswerVariant"}}var Fc=Object.defineProperty,Wn=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&Fc(e,t,i),i};const yr=class Er{constructor(e){n(this,"id");n(this,"valueString");n(this,"valueOther");n(this,"valueNumber");n(this,"valueDate");n(this,"fileInfo",new we);n(this,"fileInfoId");n(this,"order",0);n(this,"selectedAnswerVariants",[]);n(this,"patientId");n(this,"fieldId");n(this,"formFillId");n(this,"answerVariantId");n(this,"filled",!1);n(this,"researchResultId");n(this,"answerFiles",[]);n(this,"answerFilesForDelete",[]);b.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,t){const r=new Er;return r.id=Be(),r.fieldId=e.id,r.formFillId=t,r.order=e.order,r.valueNumber=0,r.valueString="",r.valueDate=new Date,r}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,t){return e.map(r=>Er.Create(r,t))}addFile(){const e=new wr;return e.id=Be(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(t=>e.push(t.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,t){const r=ot.Create(this.id,e);return r.answerVariantIdY=t,this.selectedAnswerVariants.push(r),this.filled=!0,r}getMatrixValue(e,t){return this.selectedAnswerVariants.find(r=>r.answerVariantId===e&&r.answerVariantIdY===t)}addSelectedAnswerVariant(e){const t=ot.Create(this.id,e);return this.selectedAnswerVariants.push(t),this.filled=!0,t}static GetClassName(){return"answer"}showOther(e){const t=e.find(r=>r.showOther);return t?this.answerVariantId===t.id||this.selectedAnswerVariants.some(r=>r.answerVariantId===t.id):!1}};Wn([b.H.Classes.GetClassConstructor(ot)],yr.prototype,"selectedAnswerVariants"),Wn([b.H.Classes.GetClassConstructor(wr)],yr.prototype,"answerFiles");let Ct=yr;class Ac{constructor(e){n(this,"id");n(this,"fieldId");b.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var xc=Object.defineProperty,Dc=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&xc(e,t,i),i};const Jn=class oi{constructor(e){n(this,"id");n(this,"name","");n(this,"order",0);n(this,"fields",[]);n(this,"formId");b.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,t){return`${this.getFieldN(e)}.${t+1}`}static Create(e){const t=new oi;return t.id=b.H.Id.UUID(),t.formId=e,t}addField(){const e=vs.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,t)=>e.order=t)}getAnswerVariants(){const e=[];return this.fields.forEach(t=>e.push(...t.answerVariants)),e}};Dc([b.H.Classes.GetClassConstructor(vs)],Jn.prototype,"fields");let Es=Jn;var Uc=Object.defineProperty,Nc=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&Uc(e,t,i),i};const Qn=class ai{constructor(e){n(this,"id");n(this,"name","");n(this,"order",0);n(this,"isLaboratory",!1);n(this,"formSections",[]);n(this,"isEdit",!1);n(this,"withDates",!1);n(this,"withScores",!1);n(this,"selectedForExport",!1);n(this,"filterString","");n(this,"showOnlyNotFilled",!1);n(this,"showOnlyFilled",!1);b.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new ai;return e.id=b.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=Es.Create(this.id);return this.formSections.push(e),b.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(r=>r.fields).flat(),t=e.map(r=>r.children).flat();return e.concat(t).filter(r=>r.children.length===0)}};Nc([b.H.Classes.GetClassConstructor(Es)],Qn.prototype,"formSections");let Xn=Qn;var $c=Object.defineProperty,kc=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&$c(e,t,i),i};const Yn=class li{constructor(e){n(this,"id");n(this,"date",new Date);n(this,"editMode",!1);n(this,"userFormId");n(this,"fillingPercentage",0);n(this,"fieldFills",[]);n(this,"num","");n(this,"formId");b.H.Classes.BuildClass(this,e)}static Create(e){const t=new li;return t.id=b.H.Id.UUID(),t.formId=e.id,t.fieldFills.push(...Ct.CreateMany(e.getFields(),t.id)),t}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var t;return(t=this.fieldFills)==null?void 0:t.find(r=>r.fieldId===e)}pushRegisterProperty(e){const t=new Ct;t.researchResultId=e,this.fieldFills.push(t)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(t=>t.researchResultId===e)}getOrCreateFieldFill(e){let t=this.getFieldFill(e.id);return t||(t=Ct.Create(e),this.addFieldFill(t)),t}getFileInfos(){const e=[];return this.fieldFills.forEach(t=>e.push(...t.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(r=>r.filled).length,t=this.fieldFills.length;this.fillingPercentage=Math.round(e/t*100)}getFieldFillByFieldId(e){return this.fieldFills.find(t=>t.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(t=>t.answerVariantId===e)}getFieldsFieldFillsMap(e){const t={};return e.forEach(r=>{var i;if(r.code){const o=(i=this.getFieldFillByFieldId(r.id))==null?void 0:i.valueNumber;t[r.code]=o}}),t}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};kc([b.H.Classes.GetClassConstructor(Ct)],Yn.prototype,"fieldFills");let Zn=Yn;const Bc=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:nt,Field:vs,FieldExample:zn,FieldFill:Ct,FieldFillFile:wr,FieldFilter:Ac,FieldMeasure:gr,FieldVariant:bt,Form:Xn,FormFill:Zn,FormSection:Es,SelectedAnswerVariant:ot},Symbol.toStringTag,{value:"Module"}));let Gc=class extends V{constructor(){super(nt,"answer-variants")}};const jc=new Gc;let Lc=class extends V{constructor(){super(Ct,"field-fills")}};const Hc=new Lc;let qc=class extends V{constructor(){super(vs,"fields")}};const Vc=new qc;let zc=class extends V{constructor(){super(Zn,"form-fills")}};const Wc=new zc;let Jc=class extends V{constructor(){super(Es,"form-sections")}};const Qc=new Jc;let Xc=class extends V{constructor(){super(Xn,"forms")}};const Yc=new Xc;let Zc=class extends V{constructor(){super(ot,"selected-answer-variants")}};const Kc=new Zc,eu=Object.freeze(Object.defineProperty({__proto__:null,C:Bc,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:jc,FieldFills:Hc,Fields:Vc,FormFills:Wc,FormSections:Qc,Forms:Yc,SelectedAnswerVariants:Kc},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Rs{constructor(e){n(this,"id");n(this,"name","");n(this,"link","");n(this,"selected",!1);n(this,"hide",!1);n(this,"editMode",!1);n(this,"color","");n(this,"background","");n(this,"order",0);n(this,"menuId");n(this,"iconId");n(this,"icon",new we);n(this,"iconName","");n(this,"svgCode","");v.BuildClass(this,e)}addFile(e){this.icon.id||(this.icon.id=de.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}}var tu=Object.defineProperty,su=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&tu(e,t,i),i};class Sr{constructor(e){n(this,"id");n(this,"name","");n(this,"link","");n(this,"top",!0);n(this,"side",!0);n(this,"show",!1);n(this,"hide",!1);n(this,"active",!1);n(this,"order",0);n(this,"selected",!1);n(this,"editMode",!1);n(this,"subMenus",[]);n(this,"subMenusForDelete",[]);n(this,"iconId");n(this,"icon",new we);v.BuildClass(this,e)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const e=[];return e.push(this.icon),this.subMenus.forEach(t=>{e.push(t.icon)}),e}addFile(e){this.icon.id||(this.icon.id=de.UUID()),this.icon.originalName=e.name,this.icon.file=e.raw}addSubMenu(){this.subMenus.push(new Rs)}removeSubMenu(e){const t=this.subMenus[e].id;t&&this.subMenusForDelete.push(t),this.subMenus.splice(e,1)}setColorsForSubMenus(){const e=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let t=0;this.subMenus.forEach(r=>{r.color=e[t],t=e.length-1?t=0:t++})}containPath(e){return this.link===e||!!this.subMenus.find(t=>t.link===e)}static GetClassName(){return"menu"}}su([v.GetClassConstructor(Rs)],Sr.prototype,"subMenus");const ru=Object.freeze(Object.defineProperty({__proto__:null,Menu:Sr,SubMenu:Rs},Symbol.toStringTag,{value:"Module"}));let nu=class extends b.H.BaseStore{constructor(){super(Sr,"menus")}};const iu=new nu;let ou=class extends b.H.BaseStore{constructor(){super(Rs,"sub-menus")}};const au=new ou,lu=Object.freeze(Object.defineProperty({__proto__:null,C:ru,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:iu,SubMenus:au},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ms{constructor(e){n(this,"id","");n(this,"name","");n(this,"component","");n(this,"order");n(this,"active",!1);n(this,"key",0);v.BuildClass(this,e)}static Create(e,t,r,i,o){const a=new Ms;return a.id=e,a.name=t,a.component=r,a.order=i,a.active=!!o,a}}var Kn=(s=>(s.User="USER",s.Admin="ADMIN",s))(Kn||{});class cu{constructor(e){n(this,"id");n(this,"name",Kn.User);n(this,"label","");n(this,"startPage","");v.BuildClass(this,e)}}class br{constructor(e){n(this,"id");n(this,"document",new we);n(this,"documentId");n(this,"pageId");v.BuildClass(this,e)}}var uu=Object.defineProperty,du=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&uu(e,t,i),i};class Os{constructor(e){n(this,"id");n(this,"pageId");n(this,"fileInfoId");n(this,"fileInfo");n(this,"description");v.BuildClass(this,e)}}du([v.GetClassConstructor(we)],Os.prototype,"fileInfo");class Ps{constructor(e){n(this,"id");n(this,"name","");n(this,"order",0);n(this,"downloadToFile",!1);n(this,"pageSectionId");n(this,"scan",new we);n(this,"scanId");v.BuildClass(this,e)}getFileInfos(){return[this.scan]}getFileName(){return this.name?this.name:this.scan.originalName}}var fu=Object.defineProperty,hu=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&fu(e,t,i),i};class vt{constructor(e){n(this,"id");n(this,"name","");n(this,"singleScan",!1);n(this,"scan");n(this,"scanId");n(this,"order",0);n(this,"description","");n(this,"scans",[]);n(this,"scansForDelete",[]);n(this,"pageSectionDocuments",[]);n(this,"pageSideMenuId");n(this,"pageId");n(this,"text","");n(this,"documents",[]);v.BuildClass(this,e),this.documents=this.pageSectionDocuments,this.text=this.description.replace("<p>undefined</p>","")}addDocument(){const e=new Ps;e.order=this.pageSectionDocuments.length-1,this.pageSectionDocuments.push(e)}getFileInfos(){const e=[];return this.pageSectionDocuments.forEach(t=>{e.push(...t.getFileInfos())}),e}infoExists(e){const t=j.SearchIn(this.name,e),r=j.SearchIn(this.description,e),i=this.getDocuments(e);return t||r||i.length>0}getDocuments(e){return this.pageSectionDocuments.filter(t=>j.SearchIn(t.name,e))}getDescription(e){return e?j.WrapSubStr(this.description,e):this.description}filter(e){if(!e){this.text=this.description,this.documents=this.pageSectionDocuments;return}this.text=j.SearchIn(this.description,e)?j.WrapSubStr(this.description,e):"",this.documents=this.pageSectionDocuments.filter(t=>j.SearchIn(t.name,e))}}hu([v.GetClassConstructor(Ps)],vt.prototype,"pageSectionDocuments");var pu=Object.defineProperty,mu=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&pu(e,t,i),i};class Le{constructor(e){n(this,"id");n(this,"name","Новое меню");n(this,"order",0);n(this,"description","");n(this,"routeAnchor","");n(this,"slug","");n(this,"pageSections",[]);n(this,"showContent",!1);n(this,"pageId");n(this,"selected",!1);n(this,"sections",[]);n(this,"text","");v.BuildClass(this,e),this.sections=this.pageSections,this.text=this.description.replace("<p>undefined</p>","")}getFileInfos(){const e=[];return this.pageSections.forEach(t=>{e.push(...t.getFileInfos())}),e}addPageSection(){const e=new vt;e.order=this.pageSections.length+1,e.name=`Новой раздел ${e.order}`,e.id=de.UUID(),this.pageSections.push(e)}infoExists(e){const t=j.SearchIn(this.name,e),r=j.SearchIn(this.description,e),i=this.getPageSections(e).length>0;return t||r||i}getPageSections(e){return e.length?this.pageSections.filter(t=>t.infoExists(e)):this.pageSections}filter(e){e.length?(this.sections=this.pageSections.filter(t=>t.infoExists(e)),this.text=j.SearchIn(this.description,e)?j.WrapSubStr(this.description,e):""):(this.sections=this.pageSections,this.text=this.description),this.sections.forEach(t=>t.filter(e))}}mu([v.GetClassConstructor(vt)],Le.prototype,"pageSections");var gu=Object.defineProperty,_s=(s,e,t,r)=>{for(var i=void 0,o=s.length-1,a;o>=0;o--)(a=s[o])&&(i=a(e,t,i)||i);return i&&gu(e,t,i),i};class Et{constructor(e){n(this,"id");n(this,"title","");n(this,"content","");n(this,"slug","");n(this,"pagesGroup","Без группы");n(this,"link","");n(this,"withComments",!1);n(this,"showContacts",!1);n(this,"collaps",!1);n(this,"showContent",!1);n(this,"pageImages",[]);n(this,"pageImagesForDelete",[]);n(this,"pageImagesNames",[]);n(this,"pageSideMenus",[]);n(this,"menus",[]);n(this,"pageSideMenusForDelete",[]);n(this,"pageSections",[]);n(this,"pageSectionsForDelete",[]);n(this,"pageDocuments",[]);n(this,"contact",new An);n(this,"contactId");n(this,"role",new cu);n(this,"roleId");n(this,"filterStr","");n(this,"activeMenuId","");v.BuildClass(this,e),this.menus=this.pageSideMenus}getActiveMenu(){const e=this.pageSideMenus.find(t=>t.id===this.activeMenuId);return e||this.pageSideMenus[0]}setActiveMenuId(e){this.activeMenuId=e}getLink(){return this.slug!==""?`/pages/${this.slug}`:"404"}getFileInfos(){const e=[];return this.pageSideMenus.forEach(t=>{e.push(...t.getFileInfos())}),this.pageImages.forEach(t=>{t.fileInfo&&e.push(t.fileInfo)}),e}addSideMenu(){const e=new Le;return e.order=this.pageSideMenus.length+1,e.name=`Новое меню ${e.order}`,e.id=de.UUID(),this.pageSideMenus.push(e),e.id}selectSideMenu(e,t){if(!e&&this.pageSideMenus.length>0){this.pageSideMenus[0].selected=!0;return}this.pageSideMenus.forEach(r=>{t?r.selected=r.id===e:r.selected=r.slug===e})}getSelectedSideMenu(){const e=this.pageSideMenus.find(t=>t.selected);return e||new Le}addCustomSectionsToSideMenu(e){e.forEach(t=>{const r=new Le;r.id=t.id,r.name=t.name,typeof t.order<"u"?this.pageSideMenus.splice(t.order,0,r):this.pageSideMenus.push(r)})}getPageSideMenus(){if(this.showContacts&&!this.pageSideMenus.find(e=>e.id==="contacts")){const e=new Le;e.id="contacts",e.name="Контакты",this.pageSideMenus.push(e)}return this.filterStr===""?this.pageSideMenus:this.pageSideMenus.filter(e=>e.infoExists(this.filterStr))}filter(){this.filterStr===""?this.menus=this.pageSideMenus:this.menus=this.pageSideMenus.filter(e=>e.infoExists(this.filterStr)),this.menus.forEach(e=>e.filter(this.filterStr))}static GetClassName(){return"page"}}_s([v.GetClassConstructor(Os)],Et.prototype,"pageImages"),_s([v.GetClassConstructor(Le)],Et.prototype,"pageSideMenus"),_s([v.GetClassConstructor(vt)],Et.prototype,"pageSections"),_s([v.GetClassConstructor(br)],Et.prototype,"pageDocuments");const wu=Object.freeze(Object.defineProperty({__proto__:null,CustomSection:Ms,Page:Et,PageDocument:br,PageImage:Os,PageSection:vt,PageSectionDocument:Ps,PageSideMenu:Le},Symbol.toStringTag,{value:"Module"}));let yu=class extends b.H.BaseStore{constructor(){super(Ms,"custom-sections")}};const Su=new yu;let bu=class extends b.H.BaseStore{constructor(){super(br,"page-documents")}};const Cu=new bu;let vu=class extends b.H.BaseStore{constructor(){super(Os,"page-images")}};const Eu=new vu;let Ru=class extends b.H.BaseStore{constructor(){super(Ps,"page-section-documents")}};const Mu=new Ru;let Ou=class extends b.H.BaseStore{constructor(){super(vt,"page-sections")}};const Pu=new Ou;let _u=class extends b.H.BaseStore{constructor(){super(Le,"page-side-menus")}};const Iu=new _u;let Tu=class extends b.H.BaseStore{constructor(){super(Et,"pages")}};const Fu=new Tu,Au=Object.freeze(Object.defineProperty({__proto__:null,C:wu,S:Object.freeze(Object.defineProperty({__proto__:null,CustomSections:Su,PageDocuments:Cu,PageImages:Eu,PageSectionDocuments:Mu,PageSections:Pu,PageSideMenus:Iu,Pages:Fu},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),xu=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:Lt},Symbol.toStringTag,{value:"Module"}));class Du extends V{constructor(){super(Lt,"color-themes")}}const Uu=new Du,Nu=Object.freeze(Object.defineProperty({__proto__:null,Buildings:rc,Chats:fc,Docs:Rc,Extracts:Ic,Forms:eu,Menus:lu,Pages:Au,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:xu,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Uu},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),$u=["PF","PFM"],ku=ar(E.defineComponent({__name:"ExtractCreateForm",emits:["create"],setup(s,{emit:e}){const t=e,r=ExtractsStore.Item,i=async()=>{await ExtractsStore.Create(),ExtractsStore.AppendToAll([r]),t("create")};return(o,a)=>{const l=E.resolveComponent("PInput"),d=E.resolveComponent("PButton");return E.openBlock(),E.createElementBlock(E.Fragment,null,[E.createVNode(l,{modelValue:E.unref(r).name,"onUpdate:modelValue":a[0]||(a[0]=h=>E.unref(r).name=h)},null,8,["modelValue"]),E.createVNode(d,{text:"Создать",onClick:i})],64)}}}),[["__scopeId","data-v-acdf750a"]]),Bu=Object.freeze(Object.defineProperty({__proto__:null,default:ar(E.defineComponent({__name:"ExtractsList",setup(s){const e=E.ref(!1),t=E.ref(!1),r=async()=>{t.value=!0},i=async()=>{await Promise.all([r()])},o=()=>{e.value=!e.value};return b.H.Hooks.onBeforeMount(i),(a,l)=>{const d=ku,h=E.resolveComponent("PModal");return E.unref(e)?(E.openBlock(),E.createBlock(h,{key:0,show:E.unref(e)},{default:E.withCtx(()=>[E.createVNode(d,{onCreate:o})]),_:1},8,["show"])):E.createCommentVNode("",!0)}}}),[["__scopeId","data-v-03915680"]])},Symbol.toStringTag,{value:"Module"}));ue.PF=b,ue.PFM=Nu,ue.pfName=$u,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});