sprof 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/components/atoms/PDateInput/PDateInput.stories.d.ts +72 -0
- package/dist/core/components/atoms/PDateInput/PDateInput.vue.d.ts +13 -0
- package/dist/core/components/atoms/PInput/PInput.stories.d.ts +66 -0
- package/dist/core/components/atoms/PInput/PInput.vue.d.ts +20 -0
- package/dist/core/components/organisms/PAuthForm/PAuthForm.stories.d.ts +56 -4
- package/dist/core/components/organisms/PAuthForm/PAuthForm.vue.d.ts +28 -2
- package/dist/core/helpers/Dates.d.ts +8 -0
- package/dist/core/helpers/Validate.d.ts +6 -0
- package/dist/modules/schedule/components/DateField.vue.d.ts +13 -0
- package/dist/modules/schedule/components/TimeField.vue.d.ts +13 -0
- package/dist/sprof.js +4411 -4191
- package/dist/sprof.umd.cjs +12 -12
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/sprof.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(O,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("quasar"),require("vue"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","quasar","vue","vuedraggable","vue-router"],E):(O=typeof globalThis<"u"?globalThis:O||self,E(O.sprof={},O.Quasar,O.Vue,O.draggable,O.VueRouter))})(this,function(O,E,e,bi,nc){"use strict";var Iw=Object.defineProperty;var Rw=(O,E,e)=>E in O?Iw(O,E,{enumerable:!0,configurable:!0,writable:!0,value:e}):O[E]=e;var d=(O,E,e)=>Rw(O,typeof E!="symbol"?E+"":E,e);var _t,Ht,Je,Wn,re,at,Xt;var En=typeof document<"u"?document.currentScript:null,Fe=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Fe||{}),pe=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(pe||{});class on{constructor(t,o,i,r){d(this,"text","Сохранить");d(this,"type",pe.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=t,this.type=i,this.action=o,r!==void 0&&(this.condition=r)}static Primary(t,o,i){return new on(t,o,pe.Primary,i)}static Success(t,o,i){return new on(t,o,pe.Success,i)}static Warning(t,o,i){return new on(t,o,pe.Warning,i)}static Error(t,o,i){return new on(t,o,pe.Error,i)}}class Eo extends on{constructor(){super();d(this,"id","auth-button");d(this,"chunk",Fe.Login);d(this,"text","");d(this,"isSubmit",!1);d(this,"isLink",!0)}GetChunk(){return this.chunk}}let Ci=class extends Eo{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"chunk",Fe.Login)}};class es extends Eo{constructor(){super(...arguments);d(this,"id","auth-button-refresh");d(this,"text","Обновить пароль");d(this,"isSubmit",!1);d(this,"chunk",Fe.Refresh)}}class Si extends Eo{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"chunk",Fe.Register)}}class Bo extends Eo{constructor(){super(...arguments);d(this,"id","auth-button-restore");d(this,"text","Забыли пароль?");d(this,"isSubmit",!1);d(this,"chunk",Fe.Restore)}}class ts{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var zt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(zt||{});class No extends ts{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}get IsPassword(){return this.id===zt.Password||this.id===zt.PasswordRepeat}}var Bn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(Bn||{});const oc=/\S+@\S+\.\S+/;class ns{constructor(){d(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),oc.test(t)||this.errors.push("Некорректный email"),this.errors}}let ic=class extends No{constructor(){super(...arguments);d(this,"id",zt.Email);d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new ns);d(this,"method",Bn.Email)}};const Vo=new ic;class rc{constructor(){d(this,"errors",[]);d(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let sc=class extends No{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new rc);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id",zt.Password)}};const $o=new sc;let ac=class extends No{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id",zt.PasswordRepeat)}};const os=new ac,is={allowRestore:!1,[Fe.Login]:{methods:[Bn.Email],title:"Вход в систему",action:"login",buttons:[new Ci,new Si,new Bo],fields:[Vo,$o],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Fe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new Si,new Ci,new Bo],fields:[Vo,$o,os],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Fe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Bo],fields:[Vo]},[Fe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new es],fields:[$o]}};class lc{constructor(){d(this,"block",!1);d(this,"settings",is);d(this,"chunk",Fe.Login);d(this,"selectedMethod",Bn.Email)}async Block(t){this.block=!0,await t(),this.block=!1}get IsBlock(){return this.block}GetValues(){const t=this.GetFields(),o=new Map;return t.forEach(i=>{i.value&&o.set(i.name,i.value)}),Object.fromEntries(o)}Validate(){if(this.IsRegister){const t=this.GetField(zt.Password),o=this.GetField(zt.PasswordRepeat);if((t==null?void 0:t.value)!==(o==null?void 0:o.value))return["Пароли не совпадают"]}return this.GetFields().map(t=>t.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(t=>!t.method||t.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===Fe.Login}get IsRegister(){return this.chunk===Fe.Register}get IsRestore(){return this.chunk===Fe.Restore}get IsRefresh(){return this.chunk===Fe.Refresh}SetChunk(t){this.chunk=t}GetTitle(){return this.GetCurSet().title}GetButtons(){const t=this.GetCurSet().buttons;return t.forEach(o=>{o.isSubmit=!1}),t[0].isSubmit=!0,t}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(t=>t.Reset())}Reset(){this.SetChunk(Fe.Login),this.ResetFields()}GetField(t){return this.GetFields().find(o=>o.id===t)}}class cc{constructor(){d(this,"visible",!1);d(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(t){t&&(this.closable=!0),this.visible=!0}}class Nn{constructor(){d(this,"type",pe.Success);d(this,"text","");d(this,"title","")}static ToQuasarColor(t){switch(t){case pe.Success:return"positive";case pe.Warning:return"warning";case pe.Error:return"negative";case pe.Info:return"info";default:return"primary"}}static ContainsHtml(t){return/<[a-z][\s\S]*>/i.test(t)}showMessage(t,o){this.type=o,typeof t=="string"?(this.text=t,this.title=""):(this.text=t.text,this.title=t.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return Nn.ToQuasarColor(this.type)}Info(t){this.showMessage(t,pe.Info)}Success(t){this.showMessage(t,pe.Success)}Error(t){this.showMessage(t,pe.Error)}Warning(t){this.showMessage(t,pe.Warning)}FormMessage(t){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const i of Object.keys(t))t[i][0]&&t[i][0].message&&(o+=`<li>${t[i][0].message}</li>`);return o+="</ul>",o}}class ki{static Get(t,o,i="-"){return!t||!o?"":`${t}${i}${o}`}static In(t,o,i){return t>=o&&t<=i}static Intersects(t,o,i,r){return t===i||o===r||t>i&&t<r||o>i&&o<r||o>r&&t<i}}const rs=1e3,ss=60*rs,xi=60*ss;var Xn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Xn||{});const To={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class ie{static S(t){return rs*t}static M(t){return ss*t}static H(t){return xi*t}static D(t){return xi*t}static W(t){return xi*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const o=ie.SplitHM(t);return o.length>1?ie.HtoM(o[0])+o[1]:ie.HtoM(o[0])}static HtoM(t){return Number(t)*60}static SplitHM(t){if(!t)return[];const o=t.split(":");return[Number(o[0]),Number(o[1])]}static HmsToHm(t){const o=ie.SplitHM(t);return ie.ConcatHM(o[0],o[1])}static AddMtoHM(t,o){const i=new Date,r=ie.SplitHM(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return ie.ConcatHM(a,c)}static ConcatHM(t,o){return`${t}:${ie.NormalizeTime(o)}`}static DiffM(t,o){return ie.Gt(o,t)?ie.HMtoM(o)-ie.HMtoM(t):ie.HMtoM(t)-ie.HMtoM(o)}static GetPeriod(t,o){return ki.Get(t,o)}static Gt(t,o){return ie.HMtoM(t)>ie.HMtoM(o)}static GtOrEq(t,o){return ie.Gt(t,o)||ie.Eq(t,o)}static Eq(t,o){return ie.HMtoM(t)===ie.HMtoM(o)}static PeriodInPeriod(t,o,i,r){return ie.HMtoM(t)>=ie.HMtoM(i)&&ie.HMtoM(o)<=ie.HMtoM(r)}static PeriodsIntersects(t,o,i,r){return ki.Intersects(ie.HMtoM(t),ie.HMtoM(o),ie.HMtoM(i),ie.HMtoM(r))}}const dc="top";class uc extends Nn{constructor(){super(...arguments);d(this,"duration",ie.S(3))}showMessage(o,i){if(super.showMessage(o,i),typeof E.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof o=="string"?{}:o;E.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Nn.ContainsHtml(this.text),position:dc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",pe.Warning)}Save(){this.showMessage("Изменения успешно сохранены",pe.Success)}}const Vn=new uc;class St{static Get(t){const o=localStorage.getItem(t);if(o)return JSON.parse(o)}static Set(t,o){o&&localStorage.setItem(t,JSON.stringify(o))}static Remove(t){localStorage.removeItem(t)}}var ct=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(ct||{});class fc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return St.Get(ct.AccessToken)}getRefreshToken(){return St.Get(ct.RefreshToken)}setAccessToken(t){St.Set(ct.AccessToken,t)}setRefreshToken(t){St.Set(ct.RefreshToken,t)}reset(){St.Remove(ct.AccessToken),St.Remove(ct.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class mc{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(t){t.user=this.get()}setUserConstructor(t){this.userConstructor=t}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(t){this.userConstructor&&(this.user=new this.userConstructor(t),St.Set(ct.User,this.user))}reset(){this.user=void 0,St.Remove(ct.User)}actualize(){const t=St.Get(ct.User);t&&this.set(t)}}class hc{constructor(){d(this,"isAuth",!1);d(this,"user",new mc);d(this,"tokens",new fc);d(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(t){this.user.setUserConstructor(t)}SetUser(t){this.user.set(t)}SetState(t){this.SetUser(t.user),this.tokens.set(t.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Vn.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 pc=(_t=class{constructor(){d(this,"form",e.reactive(new lc));d(this,"status",e.reactive(new hc));d(this,"modal",e.reactive(new cc));if(_t.instance)return _t.instance;_t.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},d(_t,"instance"),_t);const Oe=new pc;var as=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/*! *****************************************************************************
|
|
1
|
+
(function(O,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("quasar"),require("vue"),require("vuedraggable"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","quasar","vue","vuedraggable","vue-router"],C):(O=typeof globalThis<"u"?globalThis:O||self,C(O.sprof={},O.Quasar,O.Vue,O.draggable,O.VueRouter))})(this,function(O,C,e,Ci,rc){"use strict";var vw=Object.defineProperty;var qw=(O,C,e)=>C in O?vw(O,C,{enumerable:!0,configurable:!0,writable:!0,value:e}):O[C]=e;var d=(O,C,e)=>qw(O,typeof C!="symbol"?C+"":C,e);var _t,Ht,Ke,Qn,re,lt,Yt;var En=typeof document<"u"?document.currentScript:null,Fe=(n=>(n.Login="login",n.Register="register",n.Restore="restore",n.Refresh="refresh",n))(Fe||{}),pe=(n=>(n.Primary="primary",n.Success="success",n.Warning="warning",n.Error="error",n.Info="info",n))(pe||{});class on{constructor(t,o,i,r){d(this,"text","Сохранить");d(this,"type",pe.Success);d(this,"condition",!0);d(this,"action");d(this,"id","button");d(this,"disabled",!1);this.text=t,this.type=i,this.action=o,r!==void 0&&(this.condition=r)}static Primary(t,o,i){return new on(t,o,pe.Primary,i)}static Success(t,o,i){return new on(t,o,pe.Success,i)}static Warning(t,o,i){return new on(t,o,pe.Warning,i)}static Error(t,o,i){return new on(t,o,pe.Error,i)}}class Bo extends on{constructor(){super();d(this,"id","auth-button");d(this,"chunk",Fe.Login);d(this,"text","");d(this,"isSubmit",!1);d(this,"isLink",!0)}GetChunk(){return this.chunk}}let Si=class extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-login");d(this,"text","Войти");d(this,"isSubmit",!1);d(this,"chunk",Fe.Login)}};class ts extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-refresh");d(this,"text","Обновить пароль");d(this,"isSubmit",!1);d(this,"chunk",Fe.Refresh)}}class ki extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-register");d(this,"text","Зарегистрироваться");d(this,"isSubmit",!1);d(this,"chunk",Fe.Register)}}class Vo extends Bo{constructor(){super(...arguments);d(this,"id","auth-button-restore");d(this,"text","Забыли пароль?");d(this,"isSubmit",!1);d(this,"chunk",Fe.Restore)}}class ns{constructor(){d(this,"value","");d(this,"label","");d(this,"placeholder","");d(this,"validator")}Validate(){return this.validator?(this.validator.errors=[],this.validator.validate(this.value),this.validator.errors):[]}Reset(){this.value=""}}var zt=(n=>(n.Email="field-auth-email",n.Password="field-auth-password",n.PasswordRepeat="field-auth-password-repeat",n))(zt||{});class No extends ns{constructor(){super(...arguments);d(this,"method");d(this,"id","field-auth");d(this,"name","")}get IsPassword(){return this.id===zt.Password||this.id===zt.PasswordRepeat}}var Bn=(n=>(n.Login="login",n.Email="email",n.Phone="phone",n.VK="vk",n.ESIA="esia",n))(Bn||{});const sc=/\S+@\S+\.\S+/;class os{constructor(){d(this,"errors",[])}validate(t){return(t===""||!t)&&this.errors.push("Введите email"),sc.test(t)||this.errors.push("Некорректный email"),this.errors}}let ac=class extends No{constructor(){super(...arguments);d(this,"id",zt.Email);d(this,"label","Email");d(this,"name","email");d(this,"placeholder","Введите email");d(this,"validator",new os);d(this,"method",Bn.Email)}};const $o=new ac;class lc{constructor(){d(this,"errors",[]);d(this,"length",3)}validate(t){return t===""||!t?(this.errors.push("Введите пароль"),this.errors):(t.length<this.length&&this.errors.push("Пароль должен быть длиннее 3 символов"),this.errors)}}let cc=class extends No{constructor(){super(...arguments);d(this,"label","Пароль");d(this,"validator",new lc);d(this,"name","password");d(this,"placeholder","Введите пароль");d(this,"id",zt.Password)}};const To=new cc;let dc=class extends No{constructor(){super(...arguments);d(this,"label","Повторите пароль");d(this,"id",zt.PasswordRepeat)}};const is=new dc,rs={allowRestore:!1,[Fe.Login]:{methods:[Bn.Email],title:"Вход в систему",action:"login",buttons:[new Si,new ki,new Vo],fields:[$o,To],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно вошли в систему"},[Fe.Register]:{methods:[],title:"Регистрация",action:"register",buttons:[new ki,new Si,new Vo],fields:[$o,To,is],errorMessage:"Неверно указан email или пароль",successMessage:"Вы успешно зарегистрировались в системе, войдите под своим паролем"},[Fe.Restore]:{title:"Восстановление пароля",methods:[],action:"restorePassword",successMessage:"Ссылка для восстановления пароля отправлена на Вашу почту",errorMessage:"Неверно указан email",buttons:[new Vo],fields:[$o]},[Fe.Refresh]:{methods:[],title:"Создание нового пароля",action:"passwordChange",successMessage:"Воспользуйтесь новым паролем для входа",errorMessage:"Неверно указан email",buttons:[new ts],fields:[To]}};class uc{constructor(){d(this,"block",!1);d(this,"settings",rs);d(this,"chunk",Fe.Login);d(this,"selectedMethod",Bn.Email)}async Block(t){this.block=!0,await t(),this.block=!1}get IsBlock(){return this.block}GetValues(){const t=this.GetFields(),o=new Map;return t.forEach(i=>{i.value&&o.set(i.name,i.value)}),Object.fromEntries(o)}Validate(){if(this.IsRegister){const t=this.GetField(zt.Password),o=this.GetField(zt.PasswordRepeat);if((t==null?void 0:t.value)!==(o==null?void 0:o.value))return["Пароли не совпадают"]}return this.GetFields().map(t=>t.Validate()).flat()}GetFields(){return this.GetCurSet().fields.filter(t=>!t.method||t.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===Fe.Login}get IsRegister(){return this.chunk===Fe.Register}get IsRestore(){return this.chunk===Fe.Restore}get IsRefresh(){return this.chunk===Fe.Refresh}SetChunk(t){this.chunk=t}GetTitle(){return this.GetCurSet().title}GetButtons(){const t=this.GetCurSet().buttons;return t.forEach(o=>{o.isSubmit=!1}),t[0].isSubmit=!0,t}GetSuccessMessage(){return this.GetCurSet().successMessage}GetErrorMessage(){return this.GetCurSet().errorMessage}GetAction(){return this.GetCurSet().action}ResetFields(){this.GetCurSet().fields.forEach(t=>t.Reset())}Reset(){this.SetChunk(Fe.Login),this.ResetFields()}GetField(t){return this.GetFields().find(o=>o.id===t)}}class fc{constructor(){d(this,"visible",!1);d(this,"closable",!1)}get Closable(){return this.closable}get Visible(){return this.visible}Close(){this.visible=!1}Open(t){t&&(this.closable=!0),this.visible=!0}}class Vn{constructor(){d(this,"type",pe.Success);d(this,"text","");d(this,"title","")}static ToQuasarColor(t){switch(t){case pe.Success:return"positive";case pe.Warning:return"warning";case pe.Error:return"negative";case pe.Info:return"info";default:return"primary"}}static ContainsHtml(t){return/<[a-z][\s\S]*>/i.test(t)}showMessage(t,o){this.type=o,typeof t=="string"?(this.text=t,this.title=""):(this.text=t.text,this.title=t.title??"")}GetText(){return this.text}GetTitle(){return this.title}GetType(){return this.type}GetQuasarColor(){return Vn.ToQuasarColor(this.type)}Info(t){this.showMessage(t,pe.Info)}Success(t){this.showMessage(t,pe.Success)}Error(t){this.showMessage(t,pe.Error)}Warning(t){this.showMessage(t,pe.Warning)}FormMessage(t){let o="<strong>Проверьте правильность введенных данных:</strong><ul>";for(const i of Object.keys(t))t[i][0]&&t[i][0].message&&(o+=`<li>${t[i][0].message}</li>`);return o+="</ul>",o}}class xi{static Get(t,o,i="-"){return!t||!o?"":`${t}${i}${o}`}static In(t,o,i){return t>=o&&t<=i}static Intersects(t,o,i,r){return t===i||o===r||t>i&&t<r||o>i&&o<r||o>r&&t<i}}const ss=1e3,as=60*ss,Ei=60*as;var Jn=(n=>(n.FiveMinutes="5",n.HourQuarter="15",n.HourHalf="30",n.Hour="60",n))(Jn||{});const Po={5:["00","05","10","15","20","25","30","35","40","45","50","55"],15:["00","15","30","45"],30:["00","30"],60:["00"]};class ie{static S(t){return ss*t}static M(t){return as*t}static H(t){return Ei*t}static D(t){return Ei*t}static W(t){return Ei*t}static NormalizeTime(t){return String(t).padStart(2,"0")}static HMtoM(t){const o=ie.SplitHM(t);return o.length>1?ie.HtoM(o[0])+o[1]:ie.HtoM(o[0])}static HtoM(t){return Number(t)*60}static SplitHM(t){if(!t)return[];const o=t.split(":");return[Number(o[0]),Number(o[1])]}static HmsToHm(t){const o=ie.SplitHM(t);return ie.ConcatHM(o[0],o[1])}static AddMtoHM(t,o){const i=new Date,r=ie.SplitHM(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return ie.ConcatHM(a,c)}static ConcatHM(t,o){return`${t}:${ie.NormalizeTime(o)}`}static DiffM(t,o){return ie.Gt(o,t)?ie.HMtoM(o)-ie.HMtoM(t):ie.HMtoM(t)-ie.HMtoM(o)}static GetPeriod(t,o){return xi.Get(t,o)}static Gt(t,o){return ie.HMtoM(t)>ie.HMtoM(o)}static GtOrEq(t,o){return ie.Gt(t,o)||ie.Eq(t,o)}static Eq(t,o){return ie.HMtoM(t)===ie.HMtoM(o)}static PeriodInPeriod(t,o,i,r){return ie.HMtoM(t)>=ie.HMtoM(i)&&ie.HMtoM(o)<=ie.HMtoM(r)}static PeriodsIntersects(t,o,i,r){return xi.Intersects(ie.HMtoM(t),ie.HMtoM(o),ie.HMtoM(i),ie.HMtoM(r))}}const mc="top";class hc extends Vn{constructor(){super(...arguments);d(this,"duration",ie.S(3))}showMessage(o,i){if(super.showMessage(o,i),typeof C.Notify.create!="function"){console.warn("[sprof] Quasar Notify plugin is not installed. Add `app.use(Quasar, { plugins: { Notify } })` (imported from 'quasar') to your app.");return}const r=typeof o=="string"?{}:o;C.Notify.create({message:this.text,caption:this.title||void 0,color:this.GetQuasarColor(),timeout:r.duration??this.duration,html:Vn.ContainsHtml(this.text),position:mc})}GetDuration(){return this.duration}Dev(){this.showMessage("В режиме разработки",pe.Warning)}Save(){this.showMessage("Изменения успешно сохранены",pe.Success)}}const Nn=new hc;class St{static Get(t){const o=localStorage.getItem(t);if(o)return JSON.parse(o)}static Set(t,o){o&&localStorage.setItem(t,JSON.stringify(o))}static Remove(t){localStorage.removeItem(t)}}var dt=(n=>(n.User="user",n.AccessToken="accessToken",n.RefreshToken="refreshToken",n))(dt||{});class pc{set(t){this.setAccessToken(t.accessToken),this.setRefreshToken(t.refreshToken)}getAccessToken(){return St.Get(dt.AccessToken)}getRefreshToken(){return St.Get(dt.RefreshToken)}setAccessToken(t){St.Set(dt.AccessToken,t)}setRefreshToken(t){St.Set(dt.RefreshToken,t)}reset(){St.Remove(dt.AccessToken),St.Remove(dt.RefreshToken)}actualize(){this.setAccessToken(this.getAccessToken()),this.setRefreshToken(this.getAccessToken())}}class gc{constructor(){d(this,"user");d(this,"userConstructor")}AssignTo(t){t.user=this.get()}setUserConstructor(t){this.userConstructor=t}get(){if(!this.userConstructor){console.warn("No userConstructor was set");return}return this.user}set(t){this.userConstructor&&(this.user=new this.userConstructor(t),St.Set(dt.User,this.user))}reset(){this.user=void 0,St.Remove(dt.User)}actualize(){const t=St.Get(dt.User);t&&this.set(t)}}class yc{constructor(){d(this,"isAuth",!1);d(this,"user",new gc);d(this,"tokens",new pc);d(this,"preventLogout",!1)}DeprecateLogout(){this.preventLogout=!0}AllowLogout(){this.preventLogout=!1}get IsAuth(){return this.isAuth}get User(){return this.user.get()}SetUserConstructor(t){this.user.setUserConstructor(t)}SetUser(t){this.user.set(t)}SetState(t){this.SetUser(t.user),this.tokens.set(t.tokens),this.isAuth=!0}Logout(){if(this.preventLogout){Nn.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 wc=(_t=class{constructor(){d(this,"form",e.reactive(new uc));d(this,"status",e.reactive(new yc));d(this,"modal",e.reactive(new fc));if(_t.instance)return _t.instance;_t.instance=this,Object.freeze(this)}get Form(){return this.form}get Status(){return this.status}get Modal(){return this.modal}},d(_t,"instance"),_t);const Oe=new wc;var ls=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,23 +11,23 @@
|
|
|
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 ls;(function(n){(function(t){var o=typeof globalThis=="object"?globalThis:typeof as=="object"?as:typeof self=="object"?self:typeof this=="object"?this:c(),i=r(n);typeof o.Reflect<"u"&&(i=r(o.Reflect,i)),t(i,o),typeof o.Reflect>"u"&&(o.Reflect=n);function r(l,u){return function(f,m){Object.defineProperty(l,f,{configurable:!0,writable:!0,value:m}),u&&u(f,m)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(t,o){var i=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,f={create:c?function(){return tn(Object.create(null))}:l?function(){return tn({__proto__:null})}:function(){return tn({})},has:u?function(B,P){return i.call(B,P)}:function(B,P){return P in B},get:u?function(B,P){return i.call(B,P)?B[P]:void 0}:function(B,P){return B[P]}},m=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:jr(),S=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Wr(),x=typeof WeakMap=="function"?WeakMap:Gr(),N=r?Symbol.for("@reflect-metadata:registry"):void 0,V=qr(),C=xn(V);function T(B,P,I,L){if(G(I)){if(!st(B))throw new TypeError;if(!Jt(P))throw new TypeError;return Ke(B,P)}else{if(!st(B))throw new TypeError;if(!we(P))throw new TypeError;if(!we(L)&&!G(L)&&!Qe(L))throw new TypeError;return Qe(L)&&(L=void 0),I=rt(I),ht(B,P,I,L)}}t("decorate",T);function y(B,P){function I(L,Z){if(!we(L))throw new TypeError;if(!G(Z)&&!Ut(Z))throw new TypeError;Gn(B,P,L,Z)}return I}t("metadata",y);function b(B,P,I,L){if(!we(I))throw new TypeError;return G(L)||(L=rt(L)),Gn(B,P,I,L)}t("defineMetadata",b);function $(B,P,I){if(!we(P))throw new TypeError;return G(I)||(I=rt(I)),ye(B,P,I)}t("hasMetadata",$);function R(B,P,I){if(!we(P))throw new TypeError;return G(I)||(I=rt(I)),Se(B,P,I)}t("hasOwnMetadata",R);function j(B,P,I){if(!we(P))throw new TypeError;return G(I)||(I=rt(I)),bt(B,P,I)}t("getMetadata",j);function se(B,P,I){if(!we(P))throw new TypeError;return G(I)||(I=rt(I)),Zt(B,P,I)}t("getOwnMetadata",se);function ze(B,P){if(!we(B))throw new TypeError;return G(P)||(P=rt(P)),Cn(B,P)}t("getMetadataKeys",ze);function Te(B,P){if(!we(B))throw new TypeError;return G(P)||(P=rt(P)),it(B,P)}t("getOwnMetadataKeys",Te);function Ve(B,P,I){if(!we(P))throw new TypeError;if(G(I)||(I=rt(I)),!we(P))throw new TypeError;G(I)||(I=rt(I));var L=en(P,I,!1);return G(L)?!1:L.OrdinaryDeleteMetadata(B,P,I)}t("deleteMetadata",Ve);function Ke(B,P){for(var I=B.length-1;I>=0;--I){var L=B[I],Z=L(P);if(!G(Z)&&!Qe(Z)){if(!Jt(Z))throw new TypeError;P=Z}}return P}function ht(B,P,I,L){for(var Z=B.length-1;Z>=0;--Z){var ke=B[Z],be=ke(P,I,L);if(!G(be)&&!Qe(be)){if(!we(be))throw new TypeError;L=be}}return L}function ye(B,P,I){var L=Se(B,P,I);if(L)return!0;var Z=kn(P);return Qe(Z)?!1:ye(B,Z,I)}function Se(B,P,I){var L=en(P,I,!1);return G(L)?!1:Mt(L.OrdinaryHasOwnMetadata(B,P,I))}function bt(B,P,I){var L=Se(B,P,I);if(L)return Zt(B,P,I);var Z=kn(P);if(!Qe(Z))return bt(B,Z,I)}function Zt(B,P,I){var L=en(P,I,!1);if(!G(L))return L.OrdinaryGetOwnMetadata(B,P,I)}function Gn(B,P,I,L){var Z=en(I,L,!0);Z.OrdinaryDefineOwnMetadata(B,P,I,L)}function Cn(B,P){var I=it(B,P),L=kn(B);if(L===null)return I;var Z=Cn(L,P);if(Z.length<=0)return I;if(I.length<=0)return Z;for(var ke=new S,be=[],te=0,H=I;te<H.length;te++){var U=H[te],v=ke.has(U);v||(ke.add(U),be.push(U))}for(var q=0,oe=Z;q<oe.length;q++){var U=oe[q],v=ke.has(U);v||(ke.add(U),be.push(U))}return be}function it(B,P){var I=en(B,P,!1);return I?I.OrdinaryOwnMetadataKeys(B,P):[]}function he(B){if(B===null)return 1;switch(typeof B){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return B===null?1:6;default:return 6}}function G(B){return B===void 0}function Qe(B){return B===null}function Pt(B){return typeof B=="symbol"}function we(B){return typeof B=="object"?B!==null:typeof B=="function"}function ae(B,P){switch(he(B)){case 0:return B;case 1:return B;case 2:return B;case 3:return B;case 4:return B;case 5:return B}var I="string",L=ee(B,s);if(L!==void 0){var Z=L.call(B,I);if(we(Z))throw new TypeError;return Z}return ve(B)}function ve(B,P){var I,L;{var Z=B.toString;if(Ye(Z)){var L=Z.call(B);if(!we(L))return L}var I=B.valueOf;if(Ye(I)){var L=I.call(B);if(!we(L))return L}}throw new TypeError}function Mt(B){return!!B}function Sn(B){return""+B}function rt(B){var P=ae(B);return Pt(P)?P:Sn(P)}function st(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Ye(B){return typeof B=="function"}function Jt(B){return typeof B=="function"}function Ut(B){switch(he(B)){case 3:return!0;case 4:return!0;default:return!1}}function De(B,P){return B===P||B!==B&&P!==P}function ee(B,P){var I=B[P];if(I!=null){if(!Ye(I))throw new TypeError;return I}}function le(B){var P=ee(B,a);if(!Ye(P))throw new TypeError;var I=P.call(B);if(!we(I))throw new TypeError;return I}function lt(B){return B.value}function pt(B){var P=B.next();return P.done?!1:P}function Kt(B){var P=B.return;P&&P.call(B)}function kn(B){var P=Object.getPrototypeOf(B);if(typeof B!="function"||B===m||P!==m)return P;var I=B.prototype,L=I&&Object.getPrototypeOf(I);if(L==null||L===Object.prototype)return P;var Z=L.constructor;return typeof Z!="function"||Z===B?P:Z}function It(){var B;!G(N)&&typeof o.Reflect<"u"&&!(N in o.Reflect)&&typeof o.Reflect.defineMetadata=="function"&&(B=pi(o.Reflect));var P,I,L,Z=new x,ke={registerProvider:be,getProvider:H,setProvider:v};return ke;function be(q){if(!Object.isExtensible(ke))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===q:break;case G(P):P=q;break;case P===q:break;case G(I):I=q;break;case I===q:break;default:L===void 0&&(L=new S),L.add(q);break}}function te(q,oe){if(!G(P)){if(P.isProviderFor(q,oe))return P;if(!G(I)){if(I.isProviderFor(q,oe))return P;if(!G(L))for(var me=le(L);;){var xe=pt(me);if(!xe)return;var et=lt(xe);if(et.isProviderFor(q,oe))return Kt(me),et}}}if(!G(B)&&B.isProviderFor(q,oe))return B}function H(q,oe){var me=Z.get(q),xe;return G(me)||(xe=me.get(oe)),G(xe)&&(xe=te(q,oe),G(xe)||(G(me)&&(me=new p,Z.set(q,me)),me.set(oe,xe))),xe}function U(q){if(G(q))throw new TypeError;return P===q||I===q||!G(L)&&L.has(q)}function v(q,oe,me){if(!U(me))throw new Error("Metadata provider not registered.");var xe=H(q,oe);if(xe!==me){if(!G(xe))return!1;var et=Z.get(q);G(et)&&(et=new p,Z.set(q,et)),et.set(oe,me)}return!0}}function qr(){var B;return!G(N)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&(B=o.Reflect[N]),G(B)&&(B=It()),!G(N)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&Object.defineProperty(o.Reflect,N,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function xn(B){var P=new x,I={isProviderFor:function(U,v){var q=P.get(U);return G(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:be,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:ke,OrdinaryOwnMetadataKeys:te,OrdinaryDeleteMetadata:H};return V.registerProvider(I),I;function L(U,v,q){var oe=P.get(U),me=!1;if(G(oe)){if(!q)return;oe=new p,P.set(U,oe),me=!0}var xe=oe.get(v);if(G(xe)){if(!q)return;if(xe=new p,oe.set(v,xe),!B.setProvider(U,v,I))throw oe.delete(v),me&&P.delete(U),new Error("Wrong provider for target.")}return xe}function Z(U,v,q){var oe=L(v,q,!1);return G(oe)?!1:Mt(oe.has(U))}function ke(U,v,q){var oe=L(v,q,!1);if(!G(oe))return oe.get(U)}function be(U,v,q,oe){var me=L(q,oe,!0);me.set(U,v)}function te(U,v){var q=[],oe=L(U,v,!1);if(G(oe))return q;for(var me=oe.keys(),xe=le(me),et=0;;){var So=pt(xe);if(!So)return q.length=et,q;var Qn=lt(So);try{q[et]=Qn}catch(Qr){try{Kt(xe)}finally{throw Qr}}et++}}function H(U,v,q){var oe=L(v,q,!1);if(G(oe)||!oe.delete(U))return!1;if(oe.size===0){var me=P.get(v);G(me)||(me.delete(q),me.size===0&&P.delete(me))}return!0}}function pi(B){var P=B.defineMetadata,I=B.hasOwnMetadata,L=B.getOwnMetadata,Z=B.getOwnMetadataKeys,ke=B.deleteMetadata,be=new x,te={isProviderFor:function(H,U){var v=be.get(H);return!G(v)&&v.has(U)?!0:Z(H,U).length?(G(v)&&(v=new S,be.set(H,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:P,OrdinaryHasOwnMetadata:I,OrdinaryGetOwnMetadata:L,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:ke};return te}function en(B,P,I){var L=V.getProvider(B,P);if(!G(L))return L;if(I){if(V.setProvider(B,P,C))return C;throw new Error("Illegal state.")}}function jr(){var B={},P=[],I=function(){function te(H,U,v){this._index=0,this._keys=H,this._values=U,this._selector=v}return te.prototype["@@iterator"]=function(){return this},te.prototype[a]=function(){return this},te.prototype.next=function(){var H=this._index;if(H>=0&&H<this._keys.length){var U=this._selector(this._keys[H],this._values[H]);return H+1>=this._keys.length?(this._index=-1,this._keys=P,this._values=P):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},te.prototype.throw=function(H){throw this._index>=0&&(this._index=-1,this._keys=P,this._values=P),H},te.prototype.return=function(H){return this._index>=0&&(this._index=-1,this._keys=P,this._values=P),{value:H,done:!0}},te}(),L=function(){function te(){this._keys=[],this._values=[],this._cacheKey=B,this._cacheIndex=-2}return Object.defineProperty(te.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),te.prototype.has=function(H){return this._find(H,!1)>=0},te.prototype.get=function(H){var U=this._find(H,!1);return U>=0?this._values[U]:void 0},te.prototype.set=function(H,U){var v=this._find(H,!0);return this._values[v]=U,this},te.prototype.delete=function(H){var U=this._find(H,!1);if(U>=0){for(var v=this._keys.length,q=U+1;q<v;q++)this._keys[q-1]=this._keys[q],this._values[q-1]=this._values[q];return this._keys.length--,this._values.length--,De(H,this._cacheKey)&&(this._cacheKey=B,this._cacheIndex=-2),!0}return!1},te.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=B,this._cacheIndex=-2},te.prototype.keys=function(){return new I(this._keys,this._values,Z)},te.prototype.values=function(){return new I(this._keys,this._values,ke)},te.prototype.entries=function(){return new I(this._keys,this._values,be)},te.prototype["@@iterator"]=function(){return this.entries()},te.prototype[a]=function(){return this.entries()},te.prototype._find=function(H,U){if(!De(this._cacheKey,H)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(De(this._keys[v],H)){this._cacheIndex=v;break}}return this._cacheIndex<0&&U&&(this._cacheIndex=this._keys.length,this._keys.push(H),this._values.push(void 0)),this._cacheIndex},te}();return L;function Z(te,H){return te}function ke(te,H){return H}function be(te,H){return[te,H]}}function Wr(){var B=function(){function P(){this._map=new p}return Object.defineProperty(P.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),P.prototype.has=function(I){return this._map.has(I)},P.prototype.add=function(I){return this._map.set(I,I),this},P.prototype.delete=function(I){return this._map.delete(I)},P.prototype.clear=function(){this._map.clear()},P.prototype.keys=function(){return this._map.keys()},P.prototype.values=function(){return this._map.keys()},P.prototype.entries=function(){return this._map.entries()},P.prototype["@@iterator"]=function(){return this.keys()},P.prototype[a]=function(){return this.keys()},P}();return B}function Gr(){var B=16,P=f.create(),I=L();return function(){function H(){this._key=L()}return H.prototype.has=function(U){var v=Z(U,!1);return v!==void 0?f.has(v,this._key):!1},H.prototype.get=function(U){var v=Z(U,!1);return v!==void 0?f.get(v,this._key):void 0},H.prototype.set=function(U,v){var q=Z(U,!0);return q[this._key]=v,this},H.prototype.delete=function(U){var v=Z(U,!1);return v!==void 0?delete v[this._key]:!1},H.prototype.clear=function(){this._key=L()},H}();function L(){var H;do H="@@WeakMap@@"+te();while(f.has(P,H));return P[H]=!0,H}function Z(H,U){if(!i.call(H,I)){if(!U)return;Object.defineProperty(H,I,{value:f.create()})}return H[I]}function ke(H,U){for(var v=0;v<U;++v)H[v]=Math.random()*255|0;return H}function be(H){if(typeof Uint8Array=="function"){var U=new Uint8Array(H);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):ke(U,H),U}return ke(new Array(H),H)}function te(){var H=be(B);H[6]=H[6]&79|64,H[8]=H[8]&191|128;for(var U="",v=0;v<B;++v){var q=H[v];(v===4||v===6||v===8)&&(U+="-"),q<16&&(U+="0"),U+=q.toString(16).toLowerCase()}return U}}function tn(B){return B.__=void 0,delete B.__,B}})})(ls||(ls={}));const Le=[];for(let n=0;n<256;++n)Le.push((n+256).toString(16).slice(1));function gc(n,t=0){return(Le[n[t+0]]+Le[n[t+1]]+Le[n[t+2]]+Le[n[t+3]]+"-"+Le[n[t+4]]+Le[n[t+5]]+"-"+Le[n[t+6]]+Le[n[t+7]]+"-"+Le[n[t+8]]+Le[n[t+9]]+"-"+Le[n[t+10]]+Le[n[t+11]]+Le[n[t+12]]+Le[n[t+13]]+Le[n[t+14]]+Le[n[t+15]]).toLowerCase()}const yc=new Uint8Array(16);function wc(){return crypto.getRandomValues(yc)}function qt(n,t,o){return crypto.randomUUID?crypto.randomUUID():bc(n)}function bc(n,t,o){var r;n=n||{};const i=n.random??((r=n.rng)==null?void 0:r.call(n))??wc();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,gc(i)}class Xe{static UUID(){return qt()}static GUID(){const t=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}function Cc(n){var t=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var o=n.shift();n[0]=o+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<n.length;i++){var r=n[i];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(i>0&&(r=r.replace(/^[\/]+/,"")),i<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),t.push(r))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function Ei(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),Cc(n)}class Ee{static Capitalize(t){return t?t[0].toUpperCase()+t.slice(1):""}static BuildSafeUrl(t,o,i){try{const r=new URL(t);return o&&(r.port=o.toString()),Ei(r.toString(),i)}catch{throw new Error(`Invalid host URL: ${t}`)}}static ToCamelCase(t){const o=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return t.match(o).map((r,s)=>s===0?r.toLowerCase():Ee.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(t,o,i){return t.substring(t.indexOf(o)+2,t.lastIndexOf(i))}static Translit(t,o){const i={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 o&&/[а-яА-Я]/g.test(t)?t.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(i).find(c=>i[c]===r);return a||""}const s=Object.keys(i).find(a=>i[a]===r.toLowerCase());return s?s.toUpperCase():""}):t.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?i[r]:i[r.toLowerCase()].toUpperCase())}static RemoveEmoji(t){const o=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return t.replace(o,"")}static CanBeTranslited(t){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(t)}static StringsEquals(t,o){const i=t.toLowerCase().replaceAll(/\s/g,""),r=o.toLowerCase().replaceAll(/\s/g,""),s=Ee.Translit(i),a=Ee.Translit(r);return i.includes(r)||s.includes(r)||i.includes(a)}static SearchIn(t,o){return Ee.StringsEquals(t,o)}static SearchInFields(t,o){let i=!1;for(let r=0;r<o.length;r++)if(Ee.SearchIn(o[r],t)){i=!0;break}return i}static FormatToPercentage(t){return`${t}%`}static ApplyClassToSubStr(t,o,i){const r=i??"highlight-text",s=new RegExp(Ee.GetVariants(o).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const o=Ee.Translit(t);return[t,Ee.Capitalize(t),t.toLowerCase(),t.toUpperCase(),o,Ee.Capitalize(o),o.toLowerCase(),o.toUpperCase()]}static ContainsNum(t){return/\d/.test(t)}static JoinSnake(...t){return t.join("_")}static GetDynamicCountName(t,o){const i=[2,0,1,1,1,2];return t.length+" "+o[t.length%100>4&&t.length%100<20?2:i[t.length%10<5?t.length%10:5]]}static TrimText(t){return typeof t=="string"?t.trim():t}}const Yt=class Yt{static BuildClass(t,o){o&&Object.keys(o).forEach(i=>{const r=o[i];if(this.isPrimitive(r))t[i]instanceof Date?t[i]=new Date(r):t[i]=r;else if(r!=null&&!Array.isArray(r))if(t[i]&&t[i].constructor)t[i]=new t[i].constructor(r);else{const s=Reflect.getMetadata(i,t);s&&(t[i]=new s[i](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(i,t);r.length!==0&&!s&&(t[i]=r),s&&(t[i]=r.map(a=>new s[i](a)))}})}static isPrimitive(t){return t!==null&&typeof t<"u"&&t!==Object(t)}static RemoveFromClassByIndex(t,o,i){Yt.RemoveFromClass(t,o,i)}static RemoveFromClassById(t,o,i){if(!t)return;const r=o.findIndex(s=>s.id===t);if(!(r<0))return Yt.RemoveFromClass(r,o,i),t}static RemoveFromClass(t,o,i){if(t<0)return;const r=o[t].id;r&&i&&i.push(r),o.splice(t,1)}static GetPropertyName(t){const o=new t;return new Proxy(o,{get(i,r){return r}})}static InitClassInstance(t,o){const i=t.constructor(o);return Yt.BuildClass(i),i.id=Xe.UUID(),i}static ExistsWithId(t,o){return t.some(i=>i.id===o)}static DeepMap(t){return o=>Array.isArray(o)?o.map(Yt.DeepMap(t)):Object(o)===o?Object.fromEntries(Object.entries(o).map(([i,r])=>[i,Yt.DeepMap(t)(r)])):t(o)}static DeepTrim(t){return this.DeepMap(Ee.TrimText)(t)}};d(Yt,"GetClassConstructor",t=>(o,i)=>{const r=Reflect.getMetadata(`property:${i}`,o)||{};r[i]=t,Reflect.defineMetadata(i,r,o)});let K=Yt,Zn=class jl{constructor(t){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new jl;return t.id=Xe.UUID(),t}};class Bi{static Setup(t="http://localhost",o="9000",i="api"){this.staticUrl=Ee.BuildSafeUrl(t,o,i),this.staticUrl=Ei(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}d(Bi,"staticUrl","");class kt{constructor(t){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"type","");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");d(this,"itemId");d(this,"itemOneId");d(this,"description","");d(this,"order",0);K.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${Bi.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,o){const i=new kt;return i.id=o??Xe.UUID(),i.originalName=t.name,i.file=t.blob,i.fileSystemPath=Xe.UUID(),i}setFile(t){this.id||(this.id=Xe.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=Xe.UUID(),this.url=t.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(t,o){if(t.target){let i="";return o&&(i=`@/assets/img/${o}`),new URL(i,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(t){const o=t.split(".");return o[o.length-1]}}class cs{constructor(t){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);K.BuildClass(this,t)}setEditNameMode(t){this.editNameMode=t}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(t){return t?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=Ee.Capitalize(this.name),this.surname=Ee.Capitalize(this.surname),this.patronymic=Ee.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(t){this.surname=t.surname,this.name=t.name,this.patronymic=t.patronymic}}class rn{constructor(t){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");K.BuildClass(this,t)}static Create(){const t=new rn;return t.id=Xe.UUID(),t}}class Po{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}class Mo{constructor(t){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");K.BuildClass(this,t)}static Create(){const t=new Mo;return t.id=Xe.UUID(),t}}class Ni{constructor(t){d(this,"id");d(this,"address");d(this,"description");K.BuildClass(this,t)}}let Sc=(Ht=class{},d(Ht,"Phone",rn),d(Ht,"FileInfo",kt),d(Ht,"Website",Ni),d(Ht,"Email",Zn),d(Ht,"Human",cs),d(Ht,"PostAddress",Po),d(Ht,"UserAccount",Mo),Ht);var Be=(n=>(n.Eq="=",n.Ne="!=",n.Gt=">",n.Lt="<",n.Btw="between",n.In="in",n.Like="like",n.Null="is null",n.NotNull="is not null",n))(Be||{});class Io{constructor(t){d(this,"field","");d(this,"operator",Be.Eq);d(this,"value","");K.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,o){return new Io({operator:o,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===Be.Eq||this.operator===Be.Gt||this.operator===Be.Lt}isBetween(){return this.operator===Be.Btw}isSet(){return this.operator===Be.In}}class Vi{constructor(t){d(this,"model","");d(this,"field","");d(this,"value","");d(this,"wheres",[]);K.BuildClass(this,t)}static Create(t){const o=new Vi;return o.model=t.GetClassName(),o}eq(t){return t.model===this.model&&t.field===this.field}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Io.Create(t,o);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(o=>o.eq(t))}}let ds=class Wl{constructor(t){d(this,"id");d(this,"model","");d(this,"wheres",[]);d(this,"joins",[]);K.BuildClass(this,t)}static Create(t){const o=new Wl;return o.model=t.GetClassName(),o}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Io.Create(t,o);return this.wheres.push(r),r}removeWhere(t){const o=this.wheres.findIndex(i=>i.eq(t));o>-1&&this.wheres.splice(o,1)}addJoin(t){const o=this.findJoin({model:t.GetClassName()});if(o)return o;const i=Vi.Create(t);return this.joins.push(i),i}findJoin(t){return this.joins.find(o=>o.eq(t))}findWhere(t){return this.wheres.find(o=>o.eq(t))}toRef(){return e.ref(this)}};class Dt{static Shuffle(t){for(let o=t.length-1;o>0;o--){const i=Math.floor(Math.random()*(o+1));[t[o],t[i]]=[t[i],t[o]]}}static GenerateNumsRange(t,o,i=1){return Array.from({length:(o-t)/i+1},(r,s)=>t+s*i)}static GetLast(t){return t[t.length-1]}static GetFirst(t){return t[0]}static GetRandEL(t){return t[Math.floor(Math.random()*t.length)]}static Sort(t){t.forEach((o,i)=>o.order=i)}static Refill(t,o){t.splice(0,t.length),t.push(...o)}static Eq(t,o){return t.length===o.length&&(t==null?void 0:t.every((i,r)=>t[r]==o[r]))}static SwipeById(t,o,i){const r=t.findIndex(a=>o.id===a.id),s=t.findIndex(a=>i.id===a.id);r<0||s<0||([t[r],t[s]]=[t[s],t[r]])}static Swap(t,o,i){if(o<0||o>=t.length||i<0||i>=t.length)return;const r=t[o];t[o]=t[i],t[i]=r}static MoveUp(t,o){t[o].order=o-1,t[o-1]&&(t[o-1].order=o),[t[o],t[o-1]]=[t[o-1],t[o]]}static MoveDown(t,o){t[o].order=o+1,t[o+1]&&(t[o+1].order=o),[t[o],t[o+1]]=[t[o+1],t[o]]}}var Re=(n=>(n.Date="date",n.String="string",n.Boolean="boolean",n.Number="number",n.Set="set",n.Join="join",n.ArrayString="arrayString",n.ArrayNumber="arrayNumber",n))(Re||{}),kc=Object.defineProperty,xc=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&kc(t,o,r),r};const us=class xo{constructor(t){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",Be.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Re.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");K.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Re.Join){const o=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===Be.In?o&&Dt.Eq(this.set,t.set):o}return t.model===this.model&&t.col===this.col&&t.operator===this.operator}valueEq(t){return!this||!t||!this.eq(t)?!1:this.type===Re.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Re.String?this.value1===(t==null?void 0:t.value1):this.type===Re.Join&&this.set.length?Dt.Eq(this.set,t.set):!1}toUrlQuery(){const t=this.type?`"type":"${this.type}"`:"",o=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Re.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Re.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Re.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Re.Number?`"number":${this.number}`:"",f=this.type===Re.Set||this.operator===Be.In?`"set":${JSON.stringify(this.set)}`:"",m=this.type===Re.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,o,i,r,s,a,c,l,u,f,m].filter(p=>p!=="").toString()}fromUrlQuery(t){this.model=t.get("model")??"",this.col=t.get("col")??"",this.label=t.get("label")??"",this.operator=t.get("operator")??"",this.value1=t.get("value1")??"",this.type=t.get("type")??"",this.boolean=!!(t.get("boolean")??""),this.joinTableModel=t.get("joinTableModel")??"",this.joinTableId=t.get("joinTableId")??"",this.joinTableFk=t.get("joinTableFk")??"",this.joinTableIdCol=t.get("joinTableIdCol")??"",this.joinTablePk=t.get("joinTablePk")??""}isUnaryFilter(){return this.operator===Be.Eq||this.operator===Be.Gt||this.operator===Be.Lt}isBetweenFilter(){return this.operator===Be.Btw}isSetFilter(){return this.operator===Be.In}static Create(t,o,i){const r=new xo;return r.model=t.GetClassName(),r.col=o??"",r.type=i,r.type===Re.Number&&(r.value1="0"),r.type===Re.String&&(r.value1=""),r.type===Re.Boolean&&(r.value1="false",r.operator=Be.Eq),r}static CreateFilterModelWithJoin(t,o,i,r,s,a,c,l){const u=new xo;return u.id=qt(),u.joinTable=i,u.joinTablePk=r,u.joinTableFk=s,u.col=o,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(t,o,i,r,s,a,c){const l=new xo;return l.model=t,l.joinTableModel=i,l.joinTablePk=r,l.joinTableFk=s,l.col=o,l.type=Re.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(t,o){const i=new xo;return i.id=qt(),i.model=Ee.ToCamelCase(t.GetClassName()),i.joinTableModel=Ee.ToCamelCase(o.GetClassName()),i.type=Re.Join,i}addToSet(...t){t.forEach(o=>{if(this.set.indexOf(o)===-1){this.set.push(o);return}this.set=this.set.filter(i=>i!==o)})}pushToSet(...t){t.forEach(o=>{this.set.indexOf(o)===-1&&this.set.push(o)})}replaceSet(...t){this.set=t}setBoolean(t){this.boolean=t}toRef(){return e.ref(this)}setDate1(t){this.date1=t}setDate2(t){this.date2=t}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(t,o){if(!t&&!o){this.dropDates();return}if(!o){this.setDate1(t),this.operator=Be.Eq;return}this.setDate2(o),this.operator=Be.Btw}};xc([K.GetClassConstructor(String)],us.prototype,"set");let $i=us;class Ec{constructor(){d(this,"operation",Be.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const t=this.operation?`"operation":"${this.operation}"`:"",o=this.column?`"column":"${this.column}"`:"",i=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=i?`"value":"${i}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[t,o,r,s,a].filter(c=>c!=="").toString()}fromUrlQuery(t){t.cursvalue&&(this.value=t.cursvalue),t.curscolumn&&(this.column=String(t.curscolumn)),t.cursinitial!==void 0&&(this.initial=!!t.cursinitial),t.curstableName&&(this.tableName=String(t.curstableName)),t.cursoperation&&(this.operation=t.cursoperation)}}class Ro{constructor(t){d(this,"page",0);d(this,"rowsPerPage",25);d(this,"rowsNumber",0);d(this,"cursor",new Ec);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");K.BuildClass(this,t)}setLoadMore(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Be.Gt,this.cursor.column=o,this.cursor.tableName=i,this.cursorMode=!0}setLoadMoreV2(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Be.Gt,this.cursor.column=o,this.cursor.model=i,this.cursorMode=!0,this.version="v2"}setOffset(t){this.page=t}toUrlQuery(){const t=`"offset":${this.offset}`,o=`"limit":${this.limit}`,i=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[t,o,i,r,s,a].toString()}fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("p=")+2,t.lastIndexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.page=Number(i.get("offset")),this.rowsPerPage=Number(i.get("col"))}setAllLoaded(t){this.allLoaded=!(t>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,K.BuildClass(this)}}var dt=(n=>(n.Asc="asc",n.Desc="desc",n))(dt||{});class Ao{constructor(t){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);K.BuildClass(this,t)}static Create(t,o,i=dt.Asc,r,s){const a=new Ao;return a.model=t.GetClassName(),a.col=o??"",a.order=i??dt.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===dt.Asc}isDesc(){return this.order===dt.Desc}eq(t){return t.model===this.model&&t.col===this.col&&t.order===this.order}toUrlQuery(){const t=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",i=this.order?`"order":"${this.order}"`:"";return[t,o,i].toString()}async fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("s=")+2,t.indexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.model=i.get("model")??"",this.col=i.get("col")??"",this.label=i.get("label")??"",this.default=!!i.get("default"),this.order=i.get("order")??""}asc(){this.order=dt.Asc}desc(){this.order=dt.Desc}}class zo{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(t,o){const i=new zo;return i.model=t.GetClassName(),i.cols=o,i}}var Bc=Object.defineProperty,Jn=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Bc(t,o,r),r};const $n=(Je=class{constructor(t){d(this,"id");d(this,"f",[]);d(this,"f2",[]);d(this,"s",[]);d(this,"p",new Ro);d(this,"t",new zo);K.BuildClass(this,t)}static Get(){return this.instance||(this.instance=Je.create()),this.instance}static create(){return e.reactive(new Je)}createFrom(t){const o=new Je(JSON.parse(t));this.f=o.f}clearForHTTP(){const t=new Je(this);return t.f=this.f.map(o=>Je.EmptyEntiries(o)),t.f2=this.f2.map(o=>Je.EmptyEntiries(o)),t.s=this.s.map(o=>Je.EmptyEntiries(o)),t.p=Je.EmptyEntiries(this.p),t.t=Je.EmptyEntiries(this.t),t}static EmptyEntiries(t){if(!t)return;const i=Object.entries(t).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(i)}findFilterModel(t){return this.f.find(o=>t.id===o.id)}getFirstSortModel(){return Dt.GetLast(this.s)}setSortModel(t){t&&(this.s[0]=t)}setS(t){this.s[0]=t}setF(t){this.f.push(t)}setF2(t){this.f2.push(t)}replaceF(t,o){this.removeF(o),t&&this.setF(t)}removeF(t){const o=this.f.findIndex(i=>i.eq(t));K.RemoveFromClassByIndex(o,this.f)}reset(){this.f=[],this.s=[],this.p=new Ro}resetF(){this.f=[]}},d(Je,"instance"),Je);Jn([K.GetClassConstructor($i)],$n.prototype,"f"),Jn([K.GetClassConstructor(ds)],$n.prototype,"f2"),Jn([K.GetClassConstructor(Ao)],$n.prototype,"s"),Jn([K.GetClassConstructor(Ro)],$n.prototype,"p"),Jn([K.GetClassConstructor(zo)],$n.prototype,"t");let xt=$n,Nc=(Wn=class{},d(Wn,"SortModel",Ao),d(Wn,"FilterModel",$i),d(Wn,"FilterModelV2",ds),d(Wn,"FTSP",xt),Wn);function fs(n,t){return function(){return n.apply(t,arguments)}}const{toString:Vc}=Object.prototype,{getPrototypeOf:Tn}=Object,{iterator:Kn,toStringTag:ms}=Symbol,Do=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),eo=(n,t)=>{let o=n;const i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),Do(o,t))return!0;o=Tn(o)}return!1},$c=(n,t)=>n!=null&&eo(n,t)?n[t]:void 0,Ti=(n=>t=>{const o=Vc.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),gt=n=>(n=n.toLowerCase(),t=>Ti(t)===n),Fo=n=>t=>typeof t===n,{isArray:sn}=Array,Pn=Fo("undefined");function Mn(n){return n!==null&&!Pn(n)&&n.constructor!==null&&!Pn(n.constructor)&&tt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const hs=gt("ArrayBuffer");function Tc(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&hs(n.buffer),t}const Pc=Fo("string"),tt=Fo("function"),ps=Fo("number"),In=n=>n!==null&&typeof n=="object",Mc=n=>n===!0||n===!1,Oo=n=>{if(!In(n))return!1;const t=Tn(n);return(t===null||t===Object.prototype||Tn(t)===null)&&!eo(n,ms)&&!eo(n,Kn)},Ic=n=>{if(!In(n)||Mn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Rc=gt("Date"),Ac=gt("File"),zc=n=>!!(n&&typeof n.uri<"u"),Dc=n=>n&&typeof n.getParts<"u",Fc=gt("Blob"),Oc=gt("FileList"),Lc=n=>In(n)&&tt(n.pipe);function _c(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const gs=_c(),ys=typeof gs.FormData<"u"?gs.FormData:void 0,Hc=n=>{if(!n)return!1;if(ys&&n instanceof ys)return!0;const t=Tn(n);if(!t||t===Object.prototype||!tt(n.append))return!1;const o=Ti(n);return o==="formdata"||o==="object"&&tt(n.toString)&&n.toString()==="[object FormData]"},Uc=gt("URLSearchParams"),[vc,qc,jc,Wc]=["ReadableStream","Request","Response","Headers"].map(gt),Gc=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function to(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),sn(n))for(i=0,r=n.length;i<r;i++)t.call(null,n[i],i,n);else{if(Mn(n))return;const s=o?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let c;for(i=0;i<a;i++)c=s[i],t.call(null,n[c],c,n)}}function ws(n,t){if(Mn(n))return null;t=t.toLowerCase();const o=Object.keys(n);let i=o.length,r;for(;i-- >0;)if(r=o[i],t===r.toLowerCase())return r;return null}const an=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bs=n=>!Pn(n)&&n!==an;function Pi(...n){const{caseless:t,skipUndefined:o}=bs(this)&&this||{},i={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&ws(i,a)||a,l=Do(i,c)?i[c]:void 0;Oo(l)&&Oo(s)?i[c]=Pi(l,s):Oo(s)?i[c]=Pi({},s):sn(s)?i[c]=s.slice():(!o||!Pn(s))&&(i[c]=s)};for(let s=0,a=n.length;s<a;s++){const c=n[s];if(!c||Mn(c)||(to(c,r),typeof c!="object"||sn(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let u=0;u<l.length;u++){const f=l[u];rd.call(c,f)&&r(c[f],f)}}return i}const Qc=(n,t,o,{allOwnKeys:i}={})=>(to(t,(r,s)=>{o&&tt(r)?Object.defineProperty(n,s,{__proto__:null,value:fs(r,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),Yc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Xc=(n,t,o,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},Zc=(n,t,o,i)=>{let r,s,a;const c={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!i||i(a,n,t))&&!c[a]&&(t[a]=n[a],c[a]=!0);n=o!==!1&&Tn(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},Jc=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;const i=n.indexOf(t,o);return i!==-1&&i===o},Kc=n=>{if(!n)return null;if(sn(n))return n;let t=n.length;if(!ps(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},ed=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Tn(Uint8Array)),td=(n,t)=>{const i=(n&&n[Kn]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},nd=(n,t)=>{let o;const i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},od=gt("HTMLFormElement"),id=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,r){return i.toUpperCase()+r}),{propertyIsEnumerable:rd}=Object.prototype,sd=gt("RegExp"),Cs=(n,t)=>{const o=Object.getOwnPropertyDescriptors(n),i={};to(o,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(i[s]=a||r)}),Object.defineProperties(n,i)},ad=n=>{Cs(n,(t,o)=>{if(tt(n)&&["arguments","caller","callee"].includes(o))return!1;const i=n[o];if(tt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},ld=(n,t)=>{const o={},i=r=>{r.forEach(s=>{o[s]=!0})};return sn(n)?i(n):i(String(n).split(t)),o},cd=()=>{},dd=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function ud(n){return!!(n&&tt(n.append)&&n[ms]==="FormData"&&n[Kn])}const fd=n=>{const t=new WeakSet,o=i=>{if(In(i)){if(t.has(i))return;if(Mn(i))return i;if(!("toJSON"in i)){t.add(i);const r=sn(i)?[]:{};return to(i,(s,a)=>{const c=o(s);!Pn(c)&&(r[a]=c)}),t.delete(i),r}}return i};return o(n)},md=gt("AsyncFunction"),hd=n=>n&&(In(n)||tt(n))&&tt(n.then)&&tt(n.catch),Ss=((n,t)=>n?setImmediate:t?((o,i)=>(an.addEventListener("message",({source:r,data:s})=>{r===an&&s===o&&i.length&&i.shift()()},!1),r=>{i.push(r),an.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",tt(an.postMessage)),pd=typeof queueMicrotask<"u"?queueMicrotask.bind(an):typeof process<"u"&&process.nextTick||Ss,ks=n=>n!=null&&tt(n[Kn]),k={isArray:sn,isArrayBuffer:hs,isBuffer:Mn,isFormData:Hc,isArrayBufferView:Tc,isString:Pc,isNumber:ps,isBoolean:Mc,isObject:In,isPlainObject:Oo,isEmptyObject:Ic,isReadableStream:vc,isRequest:qc,isResponse:jc,isHeaders:Wc,isUndefined:Pn,isDate:Rc,isFile:Ac,isReactNativeBlob:zc,isReactNative:Dc,isBlob:Fc,isRegExp:sd,isFunction:tt,isStream:Lc,isURLSearchParams:Uc,isTypedArray:ed,isFileList:Oc,forEach:to,merge:Pi,extend:Qc,trim:Gc,stripBOM:Yc,inherits:Xc,toFlatObject:Zc,kindOf:Ti,kindOfTest:gt,endsWith:Jc,toArray:Kc,forEachEntry:td,matchAll:nd,isHTMLForm:od,hasOwnProperty:Do,hasOwnProp:Do,hasOwnInPrototypeChain:eo,getSafeProp:$c,reduceDescriptors:Cs,freezeMethods:ad,toObjectSet:ld,toCamelCase:id,noop:cd,toFiniteNumber:dd,findKey:ws,global:an,isContextDefined:bs,isSpecCompliantForm:ud,toJSONObject:fd,isAsyncFn:md,isThenable:hd,setImmediate:Ss,asap:pd,isIterable:ks,isSafeIterable:n=>n!=null&&eo(n,Kn)&&ks(n)},gd=k.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"]),yd=n=>{const t={};let o,i,r;return n&&n.split(`
|
|
15
|
-
`).forEach(function(a){r=a.indexOf(":"),o=a.substring(0,r).trim().toLowerCase(),i=a.substring(r+1).trim(),!(!o||t[o]&&
|
|
16
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const i=new this(t);return o.forEach(r=>i.set(r)),i}static accessor(t){const i=(this[Es]=this[Es]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=no(a);i[c]||(Nd(r,a),i[c]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}};qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),k.reduceDescriptors(qe.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}}),k.freezeMethods(qe);const Vd="[REDACTED ****]";function $d(n){if(k.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(k.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Td(n,t){const o=new Set(t.map(s=>String(s).toLowerCase())),i=[],r=s=>{if(s===null||typeof s!="object"||k.isBuffer(s))return s;if(i.indexOf(s)!==-1)return;s instanceof qe&&(s=s.toJSON()),i.push(s);let a;if(k.isArray(s))a=[],s.forEach((c,l)=>{const u=r(c);k.isUndefined(u)||(a[l]=u)});else{if(!k.isPlainObject(s)&&$d(s))return i.pop(),s;a=Object.create(null);for(const[c,l]of Object.entries(s)){const u=o.has(c.toLowerCase())?Vd:r(l);k.isUndefined(u)||(a[c]=u)}}return i.pop(),a};return r(n)}let _=class Gl extends Error{static from(t,o,i,r,s,a){const c=new Gl(t.message,o||t.code,i,r,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,o,i,r,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,o=t&&k.hasOwnProp(t,"redact")?t.redact:void 0,i=k.isArray(o)&&o.length>0?Td(t,o):k.toJSONObject(t);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:i,code:this.code,status:this.status}}};_.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_.ERR_BAD_OPTION="ERR_BAD_OPTION",_.ECONNABORTED="ECONNABORTED",_.ETIMEDOUT="ETIMEDOUT",_.ECONNREFUSED="ECONNREFUSED",_.ERR_NETWORK="ERR_NETWORK",_.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_.ERR_DEPRECATED="ERR_DEPRECATED",_.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_.ERR_CANCELED="ERR_CANCELED",_.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_.ERR_INVALID_URL="ERR_INVALID_URL",_.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Pd=null,Bs=100;function Ri(n){return k.isPlainObject(n)||k.isArray(n)}function Ns(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function Ai(n,t,o){return n?n.concat(t).map(function(r,s){return r=Ns(r),!o&&s?"["+r+"]":r}).join(o?".":""):t}function Md(n){return k.isArray(n)&&!n.some(Ri)}const Id=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function _o(n,t,o){if(!k.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,o=k.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,y){return!k.isUndefined(y[T])});const i=o.metaTokens,r=o.visitor||x,s=o.dots,a=o.indexes,c=o.Blob||typeof Blob<"u"&&Blob,l=o.maxDepth===void 0?Bs:o.maxDepth,u=c&&k.isSpecCompliantForm(t),f=[];if(!k.isFunction(r))throw new TypeError("visitor must be a function");function m(C){if(C===null)return"";if(k.isDate(C))return C.toISOString();if(k.isBoolean(C))return C.toString();if(!u&&k.isBlob(C))throw new _("Blob is not supported. Use a Buffer instead.");if(k.isArrayBuffer(C)||k.isTypedArray(C)){if(u&&typeof c=="function")return new c([C]);if(typeof Buffer<"u")return Buffer.from(C);throw new _("Blob is not supported. Use a Buffer instead.",_.ERR_NOT_SUPPORT)}return C}function p(C){if(C>l)throw new _("Object is too deeply nested ("+C+" levels). Max depth: "+l,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function S(C,T){if(l===1/0)return JSON.stringify(C);const y=[];return JSON.stringify(C,function($,R){if(!k.isObject(R))return R;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(R),p(T+y.length-1),R})}function x(C,T,y){let b=C;if(k.isReactNative(t)&&k.isReactNativeBlob(C))return t.append(Ai(y,T,s),m(C)),!1;if(C&&!y&&typeof C=="object"){if(k.endsWith(T,"{}"))T=i?T:T.slice(0,-2),C=S(C,1);else if(k.isArray(C)&&Md(C)||(k.isFileList(C)||k.endsWith(T,"[]"))&&(b=k.toArray(C)))return T=Ns(T),b.forEach(function(R,j){!(k.isUndefined(R)||R===null)&&t.append(a===!0?Ai([T],j,s):a===null?T:T+"[]",m(R))}),!1}return Ri(C)?!0:(t.append(Ai(y,T,s),m(C)),!1)}const N=Object.assign(Id,{defaultVisitor:x,convertValue:m,isVisitable:Ri});function V(C,T,y=0){if(!k.isUndefined(C)){if(p(y),f.indexOf(C)!==-1)throw new Error("Circular reference detected in "+T.join("."));f.push(C),k.forEach(C,function($,R){(!(k.isUndefined($)||$===null)&&r.call(t,$,k.isString(R)?R.trim():R,T,N))===!0&&V($,T?T.concat(R):[R],y+1)}),f.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return V(n),t}function Vs(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function zi(n,t){this._pairs=[],n&&_o(n,this,t)}const $s=zi.prototype;$s.append=function(t,o){this._pairs.push([t,o])},$s.toString=function(t){const o=t?i=>t.call(this,i,Vs):Vs;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Rd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ts(n,t,o){if(!t)return n;n=n||"";const i=k.isFunction(o)?{serialize:o}:o,r=k.getSafeProp(i,"encode")||Rd,s=k.getSafeProp(i,"serialize");let a;if(s?a=s(t,i):a=k.isURLSearchParams(t)?t.toString():new zi(t,i).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Ps{constructor(){this.handlers=[]}use(t,o,i){return this.handlers.push({fulfilled:t,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Di={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Ad={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:zi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Fi=typeof window<"u"&&typeof document<"u",Oi=typeof navigator=="object"&&navigator||void 0,zd=Fi&&(!Oi||["ReactNative","NativeScript","NS"].indexOf(Oi.product)<0),Dd=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fd=Fi&&window.location.href||"http://localhost",_e={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fi,hasStandardBrowserEnv:zd,hasStandardBrowserWebWorkerEnv:Dd,navigator:Oi,origin:Fd},Symbol.toStringTag,{value:"Module"})),...Ad};function Od(n,t){return _o(n,new _e.classes.URLSearchParams,{visitor:function(o,i,r,s){return _e.isNode&&k.isBuffer(o)?(this.append(i,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Ms=Bs;function Is(n){if(n>Ms)throw new _("FormData field is too deeply nested ("+n+" levels). Max depth: "+Ms,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ld(n){const t=[],o=/\w+|\[(\w*)]/g;let i;for(;(i=o.exec(n))!==null;)Is(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function _d(n){const t={},o=Object.keys(n);let i;const r=o.length;let s;for(i=0;i<r;i++)s=o[i],t[s]=n[s];return t}function Rs(n){function t(o,i,r,s){Is(s);let a=o[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=o.length;return a=!a&&k.isArray(r)?r.length:a,l?(k.hasOwnProp(r,a)?r[a]=k.isArray(r[a])?r[a].concat(i):[r[a],i]:r[a]=i,!c):((!k.hasOwnProp(r,a)||!k.isObject(r[a]))&&(r[a]=[]),t(o,i,r[a],s)&&k.isArray(r[a])&&(r[a]=_d(r[a])),!c)}if(k.isFormData(n)&&k.isFunction(n.entries)){const o={};return k.forEachEntry(n,(i,r)=>{t(Ld(i),r,o,0)}),o}return null}const Rn=(n,t)=>n!=null&&k.hasOwnProp(n,t)?n[t]:void 0;function Hd(n,t,o){if(k.isString(n))try{return(t||JSON.parse)(n),k.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}const oo={transitional:Di,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const i=o.getContentType()||"",r=i.indexOf("application/json")>-1,s=k.isObject(t);if(s&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return r?JSON.stringify(Rs(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){const l=Rn(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Od(t,l).toString();if((c=k.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=Rn(this,"env"),f=u&&u.FormData;return _o(c?{"files[]":t}:t,f&&new f,l)}}return s||r?(o.setContentType("application/json",!1),Hd(t)):t}],transformResponse:[function(t){const o=Rn(this,"transitional")||oo.transitional,i=o&&o.forcedJSONParsing,r=Rn(this,"responseType"),s=r==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(i&&!r||s)){const c=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,Rn(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?_.from(l,_.ERR_BAD_RESPONSE,this,null,Rn(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch","query"],n=>{oo.headers[n]={}});function Li(n,t){const o=this||oo,i=t||o,r=qe.from(i.headers);let s=i.data;return k.forEach(n,function(c){s=c.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function As(n){return!!(n&&n.__CANCEL__)}let io=class extends _{constructor(t,o,i){super(t??"canceled",_.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function zs(n,t,o){const i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new _("Request failed with status code "+o.status,o.status>=400&&o.status<500?_.ERR_BAD_REQUEST:_.ERR_BAD_RESPONSE,o.config,o.request,o))}function Ud(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function vd(n,t){n=n||10;const o=new Array(n),i=new Array(n);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=i[s];a||(a=u),o[r]=l,i[r]=u;let m=s,p=0;for(;m!==r;)p+=o[m++],m=m%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const S=f&&u-f;return S?Math.round(p*1e3/S):void 0}}function qd(n,t){let o=0,i=1e3/t,r,s;const a=(u,f=Date.now())=>{o=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),m=f-o;m>=i?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},i-m)))},()=>r&&a(r)]}const Ho=(n,t,o=3)=>{let i=0;const r=vd(50,250);return qd(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=c!=null?Math.min(a,c):a,u=Math.max(0,l-i),f=r(u);i=Math.max(i,l);const m={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:f||void 0,estimated:f&&c?(c-l)/f:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};n(m)},o)},Ds=(n,t)=>{const o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},Fs=n=>(...t)=>k.asap(()=>n(...t)),jd=_e.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,_e.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,Wd=_e.hasStandardBrowserEnv?{write(n,t,o,i,r,s,a){if(typeof document>"u")return;const c=[`${n}=${encodeURIComponent(t)}`];k.isNumber(o)&&c.push(`expires=${new Date(o).toUTCString()}`),k.isString(i)&&c.push(`path=${i}`),k.isString(r)&&c.push(`domain=${r}`),s===!0&&c.push("secure"),k.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let o=0;o<t.length;o++){const i=t[o].replace(/^\s+/,""),r=i.indexOf("=");if(r!==-1&&i.slice(0,r)===n)try{return decodeURIComponent(i.slice(r+1))}catch{return i.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Gd(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Qd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Yd=/^https?:(?!\/\/)/i,Xd=/[\t\n\r]/g;function Zd(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function Jd(n){return Zd(n).replace(Xd,"")}function Os(n,t){if(typeof n=="string"&&Yd.test(Jd(n)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,t)}function Ls(n,t,o,i){Os(t,i);let r=!Gd(t);return n&&(r||o===!1)?(Os(n,i),Qd(n,t)):t}const _s=n=>n instanceof qe?{...n}:n;function ln(n,t){n=n||{},t=t||{};const o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(f,m,p,S){return k.isPlainObject(f)&&k.isPlainObject(m)?k.merge.call({caseless:S},f,m):k.isPlainObject(m)?k.merge({},m):k.isArray(m)?m.slice():m}function r(f,m,p,S){if(k.isUndefined(m)){if(!k.isUndefined(f))return i(void 0,f,p,S)}else return i(f,m,p,S)}function s(f,m){if(!k.isUndefined(m))return i(void 0,m)}function a(f,m){if(k.isUndefined(m)){if(!k.isUndefined(f))return i(void 0,f)}else return i(void 0,m)}function c(f){const m=k.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!k.isUndefined(m))if(k.isPlainObject(m)){if(k.hasOwnProp(m,f))return m[f]}else return;const p=k.hasOwnProp(n,"transitional")?n.transitional:void 0;if(k.isPlainObject(p)&&k.hasOwnProp(p,f))return p[f]}function l(f,m,p){if(k.hasOwnProp(t,p))return i(f,m);if(k.hasOwnProp(n,p))return i(void 0,f)}const u={url:s,method:s,data:s,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:l,headers:(f,m,p)=>r(_s(f),_s(m),p,!0)};return k.forEach(Object.keys({...n,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const p=k.hasOwnProp(u,m)?u[m]:r,S=k.hasOwnProp(n,m)?n[m]:void 0,x=k.hasOwnProp(t,m)?t[m]:void 0,N=p(S,x,m);k.isUndefined(N)&&p!==l||(o[m]=N)}),k.hasOwnProp(t,"validateStatus")&&k.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(k.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}const Kd=["content-type","content-length"];function eu(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,r])=>{Kd.includes(i.toLowerCase())&&n.set(i,r)})}const tu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function Hs(n){const t=ln({},n),o=p=>k.hasOwnProp(t,p)?t[p]:void 0,i=o("data");let r=o("withXSRFToken");const s=o("xsrfHeaderName"),a=o("xsrfCookieName");let c=o("headers");const l=o("auth"),u=o("baseURL"),f=o("allowAbsoluteUrls"),m=o("url");if(t.headers=c=qe.from(c),t.url=Ts(Ls(u,m,f,t),o("params"),o("paramsSerializer")),l){const p=k.getSafeProp(l,"username")||"",S=k.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(p+":"+(S?tu(S):"")))}catch(x){throw _.from(x,_.ERR_BAD_OPTION_VALUE,n)}}if(k.isFormData(i)&&(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv||k.isReactNative(i)?c.setContentType(void 0):k.isFunction(i.getHeaders)&&eu(c,i.getHeaders(),o("formDataHeaderPolicy"))),_e.hasStandardBrowserEnv&&(k.isFunction(r)&&(r=r(t)),r===!0||r==null&&jd(t.url))){const S=s&&a&&Wd.read(a);S&&c.set(s,S)}return t}const nu=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(o,i){const r=Hs(n);let s=r.data;const a=qe.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,f,m,p,S,x;function N(){S&&S(),x&&x(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let V=new XMLHttpRequest;V.open(r.method.toUpperCase(),r.url,!0),V.timeout=r.timeout;function C(){if(!V)return;const y=qe.from("getAllResponseHeaders"in V&&V.getAllResponseHeaders()),$={data:!c||c==="text"||c==="json"?V.responseText:V.response,status:V.status,statusText:V.statusText,headers:y,config:n,request:V};zs(function(j){o(j),N()},function(j){i(j),N()},$),V=null}"onloadend"in V?V.onloadend=C:V.onreadystatechange=function(){!V||V.readyState!==4||V.status===0&&!(V.responseURL&&V.responseURL.startsWith("file:"))||setTimeout(C)},V.onabort=function(){V&&(i(new _("Request aborted",_.ECONNABORTED,n,V)),N(),V=null)},V.onerror=function(b){const $=b&&b.message?b.message:"Network Error",R=new _($,_.ERR_NETWORK,n,V);R.event=b||null,i(R),N(),V=null},V.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const $=r.transitional||Di;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),i(new _(b,$.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,n,V)),N(),V=null},s===void 0&&a.setContentType(null),"setRequestHeader"in V&&k.forEach(xs(a),function(b,$){V.setRequestHeader($,b)}),k.isUndefined(r.withCredentials)||(V.withCredentials=!!r.withCredentials),c&&c!=="json"&&(V.responseType=r.responseType),u&&([p,x]=Ho(u,!0),V.addEventListener("progress",p)),l&&V.upload&&([m,S]=Ho(l),V.upload.addEventListener("progress",m),V.upload.addEventListener("loadend",S)),(r.cancelToken||r.signal)&&(f=y=>{V&&(i(!y||y.type?new io(null,n,V):y),V.abort(),N(),V=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const T=Ud(r.url);if(T&&!_e.protocols.includes(T)){i(new _("Unsupported protocol "+T+":",_.ERR_BAD_REQUEST,n)),N();return}V.send(s||null)})},ou=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const o=new AbortController;let i=!1;const r=function(l){if(!i){i=!0,a();const u=l instanceof Error?l:this.reason;o.abort(u instanceof _?u:new io(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new _(`timeout of ${t}ms exceeded`,_.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),n=null)};n.forEach(l=>l.addEventListener("abort",r,{once:!0}));const{signal:c}=o;return c.unsubscribe=()=>k.asap(a),c},iu=function*(n,t){let o=n.byteLength;if(o<t){yield n;return}let i=0,r;for(;i<o;)r=i+t,yield n.slice(i,r),i=r},ru=async function*(n,t){for await(const o of su(n))yield*iu(o,t)},su=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:o,value:i}=await t.read();if(o)break;yield i}}finally{await t.cancel()}},Us=(n,t,o,i)=>{const r=ru(n,t);let s=0,a,c=l=>{a||(a=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await r.next();if(u){c(),l.close();return}let m=f.byteLength;if(o){let p=s+=m;o(p)}l.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},Uo=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,au=(n,t,o)=>t+2<o&&Uo(n.charCodeAt(t+1))&&Uo(n.charCodeAt(t+2));function lu(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const o=n.slice(5,t),i=n.slice(t+1);if(/;base64/i.test(o)){let a=i.length;const c=i.length;for(let S=0;S<c;S++)if(i.charCodeAt(S)===37&&S+2<c){const x=i.charCodeAt(S+1),N=i.charCodeAt(S+2);Uo(x)&&Uo(N)&&(a-=2,S+=2)}let l=0,u=c-1;const f=S=>S>=2&&i.charCodeAt(S-2)===37&&i.charCodeAt(S-1)===51&&(i.charCodeAt(S)===68||i.charCodeAt(S)===100);u>=0&&(i.charCodeAt(u)===61?(l++,u--):f(u)&&(l++,u-=3)),l===1&&u>=0&&(i.charCodeAt(u)===61||f(u))&&l++;const p=Math.floor(a/4)*3-(l||0);return p>0?p:0}let s=0;for(let a=0,c=i.length;a<c;a++){const l=i.charCodeAt(a);if(l===37&&au(i,a,c))s+=1,a+=2;else if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&a+1<c){const u=i.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const _i="1.18.1",vs=64*1024,{isFunction:vo}=k,cu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),qs=n=>{if(!k.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},js=(n,...t)=>{try{return!!n(...t)}catch{return!1}},du=n=>{const t=n.indexOf("://");let o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},uu=n=>{const t=k.global!==void 0&&k.global!==null?k.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=k.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,c=r?vo(r):typeof fetch=="function",l=vo(s),u=vo(a);if(!c)return!1;const f=c&&vo(o),m=c&&(typeof i=="function"?(C=>T=>C.encode(T))(new i):async C=>new Uint8Array(await new s(C).arrayBuffer())),p=l&&f&&js(()=>{let C=!1;const T=new s(_e.origin,{body:new o,method:"POST",get duplex(){return C=!0,"half"}}),y=T.headers.has("Content-Type");return T.body!=null&&T.body.cancel(),C&&!y}),S=u&&f&&js(()=>k.isReadableStream(new a("").body)),x={stream:S&&(C=>C.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!x[C]&&(x[C]=(T,y)=>{let b=T&&T[C];if(b)return b.call(T);throw new _(`Response type '${C}' is not supported`,_.ERR_NOT_SUPPORT,y)})});const N=async C=>{if(C==null)return 0;if(k.isBlob(C))return C.size;if(k.isSpecCompliantForm(C))return(await new s(_e.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(k.isArrayBufferView(C)||k.isArrayBuffer(C))return C.byteLength;if(k.isURLSearchParams(C)&&(C=C+""),k.isString(C))return(await m(C)).byteLength},V=async(C,T)=>{const y=k.toFiniteNumber(C.getContentLength());return y??N(T)};return async C=>{let{url:T,method:y,data:b,signal:$,cancelToken:R,timeout:j,onDownloadProgress:se,onUploadProgress:ze,responseType:Te,headers:Ve,withCredentials:Ke="same-origin",fetchOptions:ht,maxContentLength:ye,maxBodyLength:Se}=Hs(C);const bt=k.isNumber(ye)&&ye>-1,Zt=k.isNumber(Se)&&Se>-1,Gn=ae=>k.hasOwnProp(C,ae)?C[ae]:void 0;let Cn=r||fetch;Te=Te?(Te+"").toLowerCase():"text";let it=ou([$,R&&R.toAbortSignal()],j),he=null;const G=it&&it.unsubscribe&&(()=>{it.unsubscribe()});let Qe,Pt=null;const we=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,C,he);try{let ae;const ve=Gn("auth");if(ve){const ee=k.getSafeProp(ve,"username")||"",le=k.getSafeProp(ve,"password")||"";ae={username:ee,password:le}}if(du(T)){const ee=new URL(T,_e.origin);if(!ae&&(ee.username||ee.password)){const le=qs(ee.username),lt=qs(ee.password);ae={username:le,password:lt}}(ee.username||ee.password)&&(ee.username="",ee.password="",T=ee.href)}if(ae&&(Ve.delete("authorization"),Ve.set("Authorization","Basic "+btoa(cu((ae.username||"")+":"+(ae.password||""))))),bt&&typeof T=="string"&&T.startsWith("data:")&&lu(T)>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,C,he);if(Zt&&y!=="get"&&y!=="head"){const ee=await N(b);if(typeof ee=="number"&&isFinite(ee)&&(Qe=ee,ee>Se))throw we()}const Mt=Zt&&(k.isReadableStream(b)||k.isStream(b)),Sn=(ee,le,lt)=>Us(ee,vs,pt=>{if(Zt&&pt>Se)throw Pt=we();le&&le(pt)},lt);if(p&&y!=="get"&&y!=="head"&&(ze||Mt)){if(Qe=Qe??await V(Ve,b),Qe!==0||Mt){let ee=new s(T,{method:"POST",body:b,duplex:"half"}),le;if(k.isFormData(b)&&(le=ee.headers.get("content-type"))&&Ve.setContentType(le),ee.body){const[lt,pt]=ze&&Ds(Qe,Ho(Fs(ze)))||[];b=Sn(ee.body,lt,pt)}}}else if(Mt&&!l&&f&&y!=="get"&&y!=="head")b=Sn(b);else if(Mt&&l&&!p&&y!=="get"&&y!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,C,he);k.isString(Ke)||(Ke=Ke?"include":"omit");const rt=l&&"credentials"in s.prototype;if(k.isFormData(b)){const ee=Ve.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Ve.delete("content-type")}Ve.set("User-Agent","axios/"+_i,!1);const st={...ht,signal:it,method:y.toUpperCase(),headers:xs(Ve.normalize()),body:b,duplex:"half",credentials:rt?Ke:void 0};he=l&&new s(T,st);let Ye=await(l?Cn(he,ht):Cn(T,st));const Jt=qe.from(Ye.headers);if(bt){const ee=k.toFiniteNumber(Jt.getContentLength());if(ee!=null&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,C,he)}const Ut=S&&(Te==="stream"||Te==="response");if(S&&Ye.body&&(se||bt||Ut&&G)){const ee={};["status","statusText","headers"].forEach(It=>{ee[It]=Ye[It]});const le=k.toFiniteNumber(Jt.getContentLength()),[lt,pt]=se&&Ds(le,Ho(Fs(se),!0))||[];let Kt=0;const kn=It=>{if(bt&&(Kt=It,Kt>ye))throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,C,he);lt&<(It)};Ye=new a(Us(Ye.body,vs,kn,()=>{pt&&pt(),G&&G()}),ee)}Te=Te||"text";let De=await x[k.findKey(x,Te)||"text"](Ye,C);if(bt&&!S&&!Ut){let ee;if(De!=null&&(typeof De.byteLength=="number"?ee=De.byteLength:typeof De.size=="number"?ee=De.size:typeof De=="string"&&(ee=typeof i=="function"?new i().encode(De).byteLength:De.length)),typeof ee=="number"&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,C,he)}return!Ut&&G&&G(),await new Promise((ee,le)=>{zs(ee,le,{data:De,headers:qe.from(Ye.headers),status:Ye.status,statusText:Ye.statusText,config:C,request:he})})}catch(ae){if(G&&G(),it&&it.aborted&&it.reason instanceof _){const ve=it.reason;throw ve.config=C,he&&(ve.request=he),ae!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),ve}if(Pt)throw he&&!Pt.request&&(Pt.request=he),Pt;if(ae instanceof _)throw he&&!ae.request&&(ae.request=he),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const ve=new _("Network Error",_.ERR_NETWORK,C,he,ae&&ae.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),ve}throw _.from(ae,ae&&ae.code,C,he,ae&&ae.response)}}},fu=new Map,Ws=n=>{let t=n&&n.env||{};const{fetch:o,Request:i,Response:r}=t,s=[i,r,o];let a=s.length,c=a,l,u,f=fu;for(;c--;)l=s[c],u=f.get(l),u===void 0&&f.set(l,u=c?new Map:uu(t)),f=u;return u};Ws();const Hi={http:Pd,xhr:nu,fetch:{get:Ws}};k.forEach(Hi,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Gs=n=>`- ${n}`,mu=n=>k.isFunction(n)||n===null||n===!1;function hu(n,t){n=k.isArray(n)?n:[n];const{length:o}=n;let i,r;const s={};for(let a=0;a<o;a++){i=n[a];let c;if(r=i,!mu(i)&&(r=Hi[(c=String(i)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${c}'`);if(r&&(k.isFunction(r)||(r=r.get(t))))break;s[c||"#"+a]=r}if(!r){const a=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=o?a.length>1?`since :
|
|
17
|
-
`+a.map(
|
|
18
|
-
`):" "+
|
|
14
|
+
***************************************************************************** */var cs;(function(n){(function(t){var o=typeof globalThis=="object"?globalThis:typeof ls=="object"?ls:typeof self=="object"?self:typeof this=="object"?this:c(),i=r(n);typeof o.Reflect<"u"&&(i=r(o.Reflect,i)),t(i,o),typeof o.Reflect>"u"&&(o.Reflect=n);function r(l,u){return function(f,m){Object.defineProperty(l,f,{configurable:!0,writable:!0,value:m}),u&&u(f,m)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function c(){return s()||a()}})(function(t,o){var i=Object.prototype.hasOwnProperty,r=typeof Symbol=="function",s=r&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=r&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,f={create:c?function(){return en(Object.create(null))}:l?function(){return en({__proto__:null})}:function(){return en({})},has:u?function(B,T){return i.call(B,T)}:function(B,T){return T in B},get:u?function(B,T){return i.call(B,T)?B[T]:void 0}:function(B,T){return B[T]}},m=Object.getPrototypeOf(Function),p=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Wr(),S=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Gr(),E=typeof WeakMap=="function"?WeakMap:Qr(),P=r?Symbol.for("@reflect-metadata:registry"):void 0,V=jr(),x=xn(V);function $(B,T,R,L){if(W(R)){if(!at(B))throw new TypeError;if(!Zt(T))throw new TypeError;return et(B,T)}else{if(!at(B))throw new TypeError;if(!we(T))throw new TypeError;if(!we(L)&&!W(L)&&!Qe(L))throw new TypeError;return Qe(L)&&(L=void 0),R=st(R),pt(B,T,R,L)}}t("decorate",$);function b(B,T){function R(L,Z){if(!we(L))throw new TypeError;if(!W(Z)&&!Ut(Z))throw new TypeError;Yn(B,T,L,Z)}return R}t("metadata",b);function y(B,T,R,L){if(!we(R))throw new TypeError;return W(L)||(L=st(L)),Yn(B,T,R,L)}t("defineMetadata",y);function N(B,T,R){if(!we(T))throw new TypeError;return W(R)||(R=st(R)),ye(B,T,R)}t("hasMetadata",N);function I(B,T,R){if(!we(T))throw new TypeError;return W(R)||(R=st(R)),Se(B,T,R)}t("hasOwnMetadata",I);function j(B,T,R){if(!we(T))throw new TypeError;return W(R)||(R=st(R)),Ct(B,T,R)}t("getMetadata",j);function se(B,T,R){if(!we(T))throw new TypeError;return W(R)||(R=st(R)),Xt(B,T,R)}t("getOwnMetadata",se);function ze(B,T){if(!we(B))throw new TypeError;return W(T)||(T=st(T)),Cn(B,T)}t("getMetadataKeys",ze);function Te(B,T){if(!we(B))throw new TypeError;return W(T)||(T=st(T)),rt(B,T)}t("getOwnMetadataKeys",Te);function Ne(B,T,R){if(!we(T))throw new TypeError;if(W(R)||(R=st(R)),!we(T))throw new TypeError;W(R)||(R=st(R));var L=Kt(T,R,!1);return W(L)?!1:L.OrdinaryDeleteMetadata(B,T,R)}t("deleteMetadata",Ne);function et(B,T){for(var R=B.length-1;R>=0;--R){var L=B[R],Z=L(T);if(!W(Z)&&!Qe(Z)){if(!Zt(Z))throw new TypeError;T=Z}}return T}function pt(B,T,R,L){for(var Z=B.length-1;Z>=0;--Z){var ke=B[Z],be=ke(T,R,L);if(!W(be)&&!Qe(be)){if(!we(be))throw new TypeError;L=be}}return L}function ye(B,T,R){var L=Se(B,T,R);if(L)return!0;var Z=kn(T);return Qe(Z)?!1:ye(B,Z,R)}function Se(B,T,R){var L=Kt(T,R,!1);return W(L)?!1:Mt(L.OrdinaryHasOwnMetadata(B,T,R))}function Ct(B,T,R){var L=Se(B,T,R);if(L)return Xt(B,T,R);var Z=kn(T);if(!Qe(Z))return Ct(B,Z,R)}function Xt(B,T,R){var L=Kt(T,R,!1);if(!W(L))return L.OrdinaryGetOwnMetadata(B,T,R)}function Yn(B,T,R,L){var Z=Kt(R,L,!0);Z.OrdinaryDefineOwnMetadata(B,T,R,L)}function Cn(B,T){var R=rt(B,T),L=kn(B);if(L===null)return R;var Z=Cn(L,T);if(Z.length<=0)return R;if(R.length<=0)return Z;for(var ke=new S,be=[],te=0,H=R;te<H.length;te++){var U=H[te],v=ke.has(U);v||(ke.add(U),be.push(U))}for(var q=0,oe=Z;q<oe.length;q++){var U=oe[q],v=ke.has(U);v||(ke.add(U),be.push(U))}return be}function rt(B,T){var R=Kt(B,T,!1);return R?R.OrdinaryOwnMetadataKeys(B,T):[]}function he(B){if(B===null)return 1;switch(typeof B){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return B===null?1:6;default:return 6}}function W(B){return B===void 0}function Qe(B){return B===null}function Pt(B){return typeof B=="symbol"}function we(B){return typeof B=="object"?B!==null:typeof B=="function"}function ae(B,T){switch(he(B)){case 0:return B;case 1:return B;case 2:return B;case 3:return B;case 4:return B;case 5:return B}var R="string",L=ee(B,s);if(L!==void 0){var Z=L.call(B,R);if(we(Z))throw new TypeError;return Z}return ve(B)}function ve(B,T){var R,L;{var Z=B.toString;if(Ye(Z)){var L=Z.call(B);if(!we(L))return L}var R=B.valueOf;if(Ye(R)){var L=R.call(B);if(!we(L))return L}}throw new TypeError}function Mt(B){return!!B}function Sn(B){return""+B}function st(B){var T=ae(B);return Pt(T)?T:Sn(T)}function at(B){return Array.isArray?Array.isArray(B):B instanceof Object?B instanceof Array:Object.prototype.toString.call(B)==="[object Array]"}function Ye(B){return typeof B=="function"}function Zt(B){return typeof B=="function"}function Ut(B){switch(he(B)){case 3:return!0;case 4:return!0;default:return!1}}function De(B,T){return B===T||B!==B&&T!==T}function ee(B,T){var R=B[T];if(R!=null){if(!Ye(R))throw new TypeError;return R}}function le(B){var T=ee(B,a);if(!Ye(T))throw new TypeError;var R=T.call(B);if(!we(R))throw new TypeError;return R}function ct(B){return B.value}function gt(B){var T=B.next();return T.done?!1:T}function Jt(B){var T=B.return;T&&T.call(B)}function kn(B){var T=Object.getPrototypeOf(B);if(typeof B!="function"||B===m||T!==m)return T;var R=B.prototype,L=R&&Object.getPrototypeOf(R);if(L==null||L===Object.prototype)return T;var Z=L.constructor;return typeof Z!="function"||Z===B?T:Z}function It(){var B;!W(P)&&typeof o.Reflect<"u"&&!(P in o.Reflect)&&typeof o.Reflect.defineMetadata=="function"&&(B=pi(o.Reflect));var T,R,L,Z=new E,ke={registerProvider:be,getProvider:H,setProvider:v};return ke;function be(q){if(!Object.isExtensible(ke))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case B===q:break;case W(T):T=q;break;case T===q:break;case W(R):R=q;break;case R===q:break;default:L===void 0&&(L=new S),L.add(q);break}}function te(q,oe){if(!W(T)){if(T.isProviderFor(q,oe))return T;if(!W(R)){if(R.isProviderFor(q,oe))return T;if(!W(L))for(var me=le(L);;){var xe=gt(me);if(!xe)return;var tt=ct(xe);if(tt.isProviderFor(q,oe))return Jt(me),tt}}}if(!W(B)&&B.isProviderFor(q,oe))return B}function H(q,oe){var me=Z.get(q),xe;return W(me)||(xe=me.get(oe)),W(xe)&&(xe=te(q,oe),W(xe)||(W(me)&&(me=new p,Z.set(q,me)),me.set(oe,xe))),xe}function U(q){if(W(q))throw new TypeError;return T===q||R===q||!W(L)&&L.has(q)}function v(q,oe,me){if(!U(me))throw new Error("Metadata provider not registered.");var xe=H(q,oe);if(xe!==me){if(!W(xe))return!1;var tt=Z.get(q);W(tt)&&(tt=new p,Z.set(q,tt)),tt.set(oe,me)}return!0}}function jr(){var B;return!W(P)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&(B=o.Reflect[P]),W(B)&&(B=It()),!W(P)&&we(o.Reflect)&&Object.isExtensible(o.Reflect)&&Object.defineProperty(o.Reflect,P,{enumerable:!1,configurable:!1,writable:!1,value:B}),B}function xn(B){var T=new E,R={isProviderFor:function(U,v){var q=T.get(U);return W(q)?!1:q.has(v)},OrdinaryDefineOwnMetadata:be,OrdinaryHasOwnMetadata:Z,OrdinaryGetOwnMetadata:ke,OrdinaryOwnMetadataKeys:te,OrdinaryDeleteMetadata:H};return V.registerProvider(R),R;function L(U,v,q){var oe=T.get(U),me=!1;if(W(oe)){if(!q)return;oe=new p,T.set(U,oe),me=!0}var xe=oe.get(v);if(W(xe)){if(!q)return;if(xe=new p,oe.set(v,xe),!B.setProvider(U,v,R))throw oe.delete(v),me&&T.delete(U),new Error("Wrong provider for target.")}return xe}function Z(U,v,q){var oe=L(v,q,!1);return W(oe)?!1:Mt(oe.has(U))}function ke(U,v,q){var oe=L(v,q,!1);if(!W(oe))return oe.get(U)}function be(U,v,q,oe){var me=L(q,oe,!0);me.set(U,v)}function te(U,v){var q=[],oe=L(U,v,!1);if(W(oe))return q;for(var me=oe.keys(),xe=le(me),tt=0;;){var ko=gt(xe);if(!ko)return q.length=tt,q;var Xn=ct(ko);try{q[tt]=Xn}catch(Yr){try{Jt(xe)}finally{throw Yr}}tt++}}function H(U,v,q){var oe=L(v,q,!1);if(W(oe)||!oe.delete(U))return!1;if(oe.size===0){var me=T.get(v);W(me)||(me.delete(q),me.size===0&&T.delete(me))}return!0}}function pi(B){var T=B.defineMetadata,R=B.hasOwnMetadata,L=B.getOwnMetadata,Z=B.getOwnMetadataKeys,ke=B.deleteMetadata,be=new E,te={isProviderFor:function(H,U){var v=be.get(H);return!W(v)&&v.has(U)?!0:Z(H,U).length?(W(v)&&(v=new S,be.set(H,v)),v.add(U),!0):!1},OrdinaryDefineOwnMetadata:T,OrdinaryHasOwnMetadata:R,OrdinaryGetOwnMetadata:L,OrdinaryOwnMetadataKeys:Z,OrdinaryDeleteMetadata:ke};return te}function Kt(B,T,R){var L=V.getProvider(B,T);if(!W(L))return L;if(R){if(V.setProvider(B,T,x))return x;throw new Error("Illegal state.")}}function Wr(){var B={},T=[],R=function(){function te(H,U,v){this._index=0,this._keys=H,this._values=U,this._selector=v}return te.prototype["@@iterator"]=function(){return this},te.prototype[a]=function(){return this},te.prototype.next=function(){var H=this._index;if(H>=0&&H<this._keys.length){var U=this._selector(this._keys[H],this._values[H]);return H+1>=this._keys.length?(this._index=-1,this._keys=T,this._values=T):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},te.prototype.throw=function(H){throw this._index>=0&&(this._index=-1,this._keys=T,this._values=T),H},te.prototype.return=function(H){return this._index>=0&&(this._index=-1,this._keys=T,this._values=T),{value:H,done:!0}},te}(),L=function(){function te(){this._keys=[],this._values=[],this._cacheKey=B,this._cacheIndex=-2}return Object.defineProperty(te.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),te.prototype.has=function(H){return this._find(H,!1)>=0},te.prototype.get=function(H){var U=this._find(H,!1);return U>=0?this._values[U]:void 0},te.prototype.set=function(H,U){var v=this._find(H,!0);return this._values[v]=U,this},te.prototype.delete=function(H){var U=this._find(H,!1);if(U>=0){for(var v=this._keys.length,q=U+1;q<v;q++)this._keys[q-1]=this._keys[q],this._values[q-1]=this._values[q];return this._keys.length--,this._values.length--,De(H,this._cacheKey)&&(this._cacheKey=B,this._cacheIndex=-2),!0}return!1},te.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=B,this._cacheIndex=-2},te.prototype.keys=function(){return new R(this._keys,this._values,Z)},te.prototype.values=function(){return new R(this._keys,this._values,ke)},te.prototype.entries=function(){return new R(this._keys,this._values,be)},te.prototype["@@iterator"]=function(){return this.entries()},te.prototype[a]=function(){return this.entries()},te.prototype._find=function(H,U){if(!De(this._cacheKey,H)){this._cacheIndex=-1;for(var v=0;v<this._keys.length;v++)if(De(this._keys[v],H)){this._cacheIndex=v;break}}return this._cacheIndex<0&&U&&(this._cacheIndex=this._keys.length,this._keys.push(H),this._values.push(void 0)),this._cacheIndex},te}();return L;function Z(te,H){return te}function ke(te,H){return H}function be(te,H){return[te,H]}}function Gr(){var B=function(){function T(){this._map=new p}return Object.defineProperty(T.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),T.prototype.has=function(R){return this._map.has(R)},T.prototype.add=function(R){return this._map.set(R,R),this},T.prototype.delete=function(R){return this._map.delete(R)},T.prototype.clear=function(){this._map.clear()},T.prototype.keys=function(){return this._map.keys()},T.prototype.values=function(){return this._map.keys()},T.prototype.entries=function(){return this._map.entries()},T.prototype["@@iterator"]=function(){return this.keys()},T.prototype[a]=function(){return this.keys()},T}();return B}function Qr(){var B=16,T=f.create(),R=L();return function(){function H(){this._key=L()}return H.prototype.has=function(U){var v=Z(U,!1);return v!==void 0?f.has(v,this._key):!1},H.prototype.get=function(U){var v=Z(U,!1);return v!==void 0?f.get(v,this._key):void 0},H.prototype.set=function(U,v){var q=Z(U,!0);return q[this._key]=v,this},H.prototype.delete=function(U){var v=Z(U,!1);return v!==void 0?delete v[this._key]:!1},H.prototype.clear=function(){this._key=L()},H}();function L(){var H;do H="@@WeakMap@@"+te();while(f.has(T,H));return T[H]=!0,H}function Z(H,U){if(!i.call(H,R)){if(!U)return;Object.defineProperty(H,R,{value:f.create()})}return H[R]}function ke(H,U){for(var v=0;v<U;++v)H[v]=Math.random()*255|0;return H}function be(H){if(typeof Uint8Array=="function"){var U=new Uint8Array(H);return typeof crypto<"u"?crypto.getRandomValues(U):typeof msCrypto<"u"?msCrypto.getRandomValues(U):ke(U,H),U}return ke(new Array(H),H)}function te(){var H=be(B);H[6]=H[6]&79|64,H[8]=H[8]&191|128;for(var U="",v=0;v<B;++v){var q=H[v];(v===4||v===6||v===8)&&(U+="-"),q<16&&(U+="0"),U+=q.toString(16).toLowerCase()}return U}}function en(B){return B.__=void 0,delete B.__,B}})})(cs||(cs={}));const Le=[];for(let n=0;n<256;++n)Le.push((n+256).toString(16).slice(1));function bc(n,t=0){return(Le[n[t+0]]+Le[n[t+1]]+Le[n[t+2]]+Le[n[t+3]]+"-"+Le[n[t+4]]+Le[n[t+5]]+"-"+Le[n[t+6]]+Le[n[t+7]]+"-"+Le[n[t+8]]+Le[n[t+9]]+"-"+Le[n[t+10]]+Le[n[t+11]]+Le[n[t+12]]+Le[n[t+13]]+Le[n[t+14]]+Le[n[t+15]]).toLowerCase()}const Cc=new Uint8Array(16);function Sc(){return crypto.getRandomValues(Cc)}function qt(n,t,o){return crypto.randomUUID?crypto.randomUUID():kc(n)}function kc(n,t,o){var r;n=n||{};const i=n.random??((r=n.rng)==null?void 0:r.call(n))??Sc();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,bc(i)}class Xe{static UUID(){return qt()}static GUID(){const t=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}function xc(n){var t=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var o=n.shift();n[0]=o+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var i=0;i<n.length;i++){var r=n[i];if(typeof r!="string")throw new TypeError("Url must be a string. Received "+r);r!==""&&(i>0&&(r=r.replace(/^[\/]+/,"")),i<n.length-1?r=r.replace(/[\/]+$/,""):r=r.replace(/[\/]+$/,"/"),t.push(r))}var s=t.join("/");s=s.replace(/\/(\?|&|#[^!])/g,"$1");var a=s.split("?");return s=a.shift()+(a.length>0?"?":"")+a.join("&"),s}function Bi(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),xc(n)}class Ee{static Capitalize(t){return t?t[0].toUpperCase()+t.slice(1):""}static BuildSafeUrl(t,o,i){try{const r=new URL(t);return o&&(r.port=o.toString()),Bi(r.toString(),i)}catch{throw new Error(`Invalid host URL: ${t}`)}}static ToCamelCase(t){const o=new RegExp(["[А-Я][а-я][A-Z][a-z]+","[А-Я]+(?=[А-Я][а-я])","[A-Z]+(?=[A-Z][a-z])","[А-Я]+","[A-Z]+","[а-я]+","[a-z]+","[0-9]+"].join("|"),"g");return t.match(o).map((r,s)=>s===0?r.toLowerCase():Ee.Capitalize(r.toLowerCase())).join("")}static ToKebabCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}static GetStringBetweenChars(t,o,i){return t.substring(t.indexOf(o)+2,t.lastIndexOf(i))}static Translit(t,o){const i={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 o&&/[а-яА-Я]/g.test(t)?t.replace(/[А-я/,.;'\][]/g,r=>{if(r===r.toLowerCase()){const a=Object.keys(i).find(c=>i[c]===r);return a||""}const s=Object.keys(i).find(a=>i[a]===r.toLowerCase());return s?s.toUpperCase():""}):t.replace(/[A-z/,.;'\][]/g,r=>r===r.toLowerCase()?i[r]:i[r.toLowerCase()].toUpperCase())}static RemoveEmoji(t){const o=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;return t.replace(o,"")}static CanBeTranslited(t){return/^[~`!@#$%^&*()_+=[\]\\{}|;':",.\/<>?a-zA-Z0-9-]+$/.test(t)}static StringsEquals(t,o){const i=t.toLowerCase().replaceAll(/\s/g,""),r=o.toLowerCase().replaceAll(/\s/g,""),s=Ee.Translit(i),a=Ee.Translit(r);return i.includes(r)||s.includes(r)||i.includes(a)}static SearchIn(t,o){return Ee.StringsEquals(t,o)}static SearchInFields(t,o){let i=!1;for(let r=0;r<o.length;r++)if(Ee.SearchIn(o[r],t)){i=!0;break}return i}static FormatToPercentage(t){return`${t}%`}static ApplyClassToSubStr(t,o,i){const r=i??"highlight-text",s=new RegExp(Ee.GetVariants(o).join("|"),"gi");return t.replace(s,`<span class="${r}">$&</span>`)}static GetVariants(t){const o=Ee.Translit(t);return[t,Ee.Capitalize(t),t.toLowerCase(),t.toUpperCase(),o,Ee.Capitalize(o),o.toLowerCase(),o.toUpperCase()]}static ContainsNum(t){return/\d/.test(t)}static JoinSnake(...t){return t.join("_")}static GetDynamicCountName(t,o){const i=[2,0,1,1,1,2];return t.length+" "+o[t.length%100>4&&t.length%100<20?2:i[t.length%10<5?t.length%10:5]]}static TrimText(t){return typeof t=="string"?t.trim():t}}const Qt=class Qt{static BuildClass(t,o){o&&Object.keys(o).forEach(i=>{const r=o[i];if(this.isPrimitive(r))t[i]instanceof Date?t[i]=new Date(r):t[i]=r;else if(r!=null&&!Array.isArray(r))if(t[i]&&t[i].constructor)t[i]=new t[i].constructor(r);else{const s=Reflect.getMetadata(i,t);s&&(t[i]=new s[i](r))}if(Array.isArray(r)){if(r.length===0)return;const s=Reflect.getMetadata(i,t);r.length!==0&&!s&&(t[i]=r),s&&(t[i]=r.map(a=>new s[i](a)))}})}static isPrimitive(t){return t!==null&&typeof t<"u"&&t!==Object(t)}static RemoveFromClassByIndex(t,o,i){Qt.RemoveFromClass(t,o,i)}static RemoveFromClassById(t,o,i){if(!t)return;const r=o.findIndex(s=>s.id===t);if(!(r<0))return Qt.RemoveFromClass(r,o,i),t}static RemoveFromClass(t,o,i){if(t<0)return;const r=o[t].id;r&&i&&i.push(r),o.splice(t,1)}static GetPropertyName(t){const o=new t;return new Proxy(o,{get(i,r){return r}})}static InitClassInstance(t,o){const i=t.constructor(o);return Qt.BuildClass(i),i.id=Xe.UUID(),i}static ExistsWithId(t,o){return t.some(i=>i.id===o)}static DeepMap(t){return o=>Array.isArray(o)?o.map(Qt.DeepMap(t)):Object(o)===o?Object.fromEntries(Object.entries(o).map(([i,r])=>[i,Qt.DeepMap(t)(r)])):t(o)}static DeepTrim(t){return this.DeepMap(Ee.TrimText)(t)}};d(Qt,"GetClassConstructor",t=>(o,i)=>{const r=Reflect.getMetadata(`property:${i}`,o)||{};r[i]=t,Reflect.defineMetadata(i,r,o)});let J=Qt,Kn=class Ql{constructor(t){d(this,"id");d(this,"address");d(this,"description");d(this,"contactId");J.BuildClass(this,t)}static Create(){const t=new Ql;return t.id=Xe.UUID(),t}};class Vi{static Setup(t="http://localhost",o="9000",i="api"){this.staticUrl=Ee.BuildSafeUrl(t,o,i),this.staticUrl=Bi(this.staticUrl,"static")}static get StaticUrl(){return this.staticUrl}}d(Vi,"staticUrl","");class kt{constructor(t){d(this,"name","");d(this,"url","");d(this,"src","");d(this,"raw");d(this,"blob");d(this,"file");d(this,"type","");d(this,"id");d(this,"originalName","");d(this,"fileSystemPath","");d(this,"itemId");d(this,"itemOneId");d(this,"description","");d(this,"order",0);J.BuildClass(this,t)}getFileUrl(){const t=this.url?this.url:`${Vi.StaticUrl}/${this.fileSystemPath}`;return new URL(t,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("sprof.umd.cjs",document.baseURI).href)}getFileListObject(){return{name:this.originalName,url:this.url}}static CreatePreviewFile(t,o){const i=new kt;return i.id=o??Xe.UUID(),i.originalName=t.name,i.file=t.blob,i.fileSystemPath=Xe.UUID(),i}setFile(t){this.id||(this.id=Xe.UUID()),this.originalName=t.name,this.file=t,this.fileSystemPath=Xe.UUID(),this.url=t.src}clearFile(){this.url="",this.file=void 0,this.fileSystemPath="",this.originalName=""}errorImg(t,o){if(t.target){let i="";return o&&(i=`@/assets/img/${o}`),new URL(i,typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("sprof.umd.cjs",document.baseURI).href)}}getFileInfos(){return[this]}isPdf(){return this.getExtension(this.originalName)===""}getExtension(t){const o=t.split(".");return o[o.length-1]}}class ds{constructor(t){d(this,"id");d(this,"name","");d(this,"surname","");d(this,"patronymic","");d(this,"isMale",!0);d(this,"dateBirth",new Date);d(this,"contactId");d(this,"slug","");d(this,"postIndex","");d(this,"address","");d(this,"editNameMode",!1);J.BuildClass(this,t)}setEditNameMode(t){this.editNameMode=t}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(t){return t?this.isMale?"Мужской":"Женский":this.isMale?"М":"Ж"}capitalizeName(){this.name=Ee.Capitalize(this.name),this.surname=Ee.Capitalize(this.surname),this.patronymic=Ee.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(t){this.surname=t.surname,this.name=t.name,this.patronymic=t.patronymic}}class rn{constructor(t){d(this,"id");d(this,"number");d(this,"description");d(this,"contactId");J.BuildClass(this,t)}static Create(){const t=new rn;return t.id=Xe.UUID(),t}}class Mo{constructor(t){d(this,"id");d(this,"address");d(this,"description");J.BuildClass(this,t)}}class Io{constructor(t){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");J.BuildClass(this,t)}static Create(){const t=new Io;return t.id=Xe.UUID(),t}}class Ni{constructor(t){d(this,"id");d(this,"address");d(this,"description");J.BuildClass(this,t)}}let Ec=(Ht=class{},d(Ht,"Phone",rn),d(Ht,"FileInfo",kt),d(Ht,"Website",Ni),d(Ht,"Email",Kn),d(Ht,"Human",ds),d(Ht,"PostAddress",Mo),d(Ht,"UserAccount",Io),Ht);var Be=(n=>(n.Eq="=",n.Ne="!=",n.Gt=">",n.Lt="<",n.Btw="between",n.In="in",n.Like="like",n.Null="is null",n.NotNull="is not null",n))(Be||{});class Ro{constructor(t){d(this,"field","");d(this,"operator",Be.Eq);d(this,"value","");J.BuildClass(this,t)}setValue(t){this.value=t}static Create(t,o){return new Ro({operator:o,field:t})}eq(t){return this.field===t.field&&this.operator===t.operator}isUnary(){return this.operator===Be.Eq||this.operator===Be.Gt||this.operator===Be.Lt}isBetween(){return this.operator===Be.Btw}isSet(){return this.operator===Be.In}}class $i{constructor(t){d(this,"model","");d(this,"field","");d(this,"value","");d(this,"wheres",[]);J.BuildClass(this,t)}static Create(t){const o=new $i;return o.model=t.GetClassName(),o}eq(t){return t.model===this.model&&t.field===this.field}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Ro.Create(t,o);return this.wheres.push(r),r}findWhere(t){return this.wheres.find(o=>o.eq(t))}}let us=class Yl{constructor(t){d(this,"id");d(this,"model","");d(this,"wheres",[]);d(this,"joins",[]);J.BuildClass(this,t)}static Create(t){const o=new Yl;return o.model=t.GetClassName(),o}addWhere(t,o){const i=this.findWhere({field:t,operator:o});if(i)return i;const r=Ro.Create(t,o);return this.wheres.push(r),r}removeWhere(t){const o=this.wheres.findIndex(i=>i.eq(t));o>-1&&this.wheres.splice(o,1)}addJoin(t){const o=this.findJoin({model:t.GetClassName()});if(o)return o;const i=$i.Create(t);return this.joins.push(i),i}findJoin(t){return this.joins.find(o=>o.eq(t))}findWhere(t){return this.wheres.find(o=>o.eq(t))}toRef(){return e.ref(this)}};class Dt{static Shuffle(t){for(let o=t.length-1;o>0;o--){const i=Math.floor(Math.random()*(o+1));[t[o],t[i]]=[t[i],t[o]]}}static GenerateNumsRange(t,o,i=1){return Array.from({length:(o-t)/i+1},(r,s)=>t+s*i)}static GetLast(t){return t[t.length-1]}static GetFirst(t){return t[0]}static GetRandEL(t){return t[Math.floor(Math.random()*t.length)]}static Sort(t){t.forEach((o,i)=>o.order=i)}static Refill(t,o){t.splice(0,t.length),t.push(...o)}static Eq(t,o){return t.length===o.length&&(t==null?void 0:t.every((i,r)=>t[r]==o[r]))}static SwipeById(t,o,i){const r=t.findIndex(a=>o.id===a.id),s=t.findIndex(a=>i.id===a.id);r<0||s<0||([t[r],t[s]]=[t[s],t[r]])}static Swap(t,o,i){if(o<0||o>=t.length||i<0||i>=t.length)return;const r=t[o];t[o]=t[i],t[i]=r}static MoveUp(t,o){t[o].order=o-1,t[o-1]&&(t[o-1].order=o),[t[o],t[o-1]]=[t[o-1],t[o]]}static MoveDown(t,o){t[o].order=o+1,t[o+1]&&(t[o+1].order=o),[t[o],t[o+1]]=[t[o+1],t[o]]}}var Re=(n=>(n.Date="date",n.String="string",n.Boolean="boolean",n.Number="number",n.Set="set",n.Join="join",n.ArrayString="arrayString",n.ArrayNumber="arrayNumber",n))(Re||{}),Bc=Object.defineProperty,Vc=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Bc(t,o,r),r};const fs=class Eo{constructor(t){d(this,"id");d(this,"model","");d(this,"label","");d(this,"col","");d(this,"operator",Be.Eq);d(this,"date1");d(this,"date2");d(this,"value1","");d(this,"boolean",!1);d(this,"number",0);d(this,"type",Re.String);d(this,"set",[]);d(this,"isSet",!1);d(this,"joinTable","");d(this,"joinTableModel","");d(this,"joinTableFk","");d(this,"joinTablePk","");d(this,"joinTableId","");d(this,"joinTableIdCol","");J.BuildClass(this,t)}eq(t){if(!t)return!1;if(this.type===Re.Join){const o=t.model===this.model&&t.operator===this.operator&&this.joinTableModel===t.joinTableModel;return t.operator===Be.In?o&&Dt.Eq(this.set,t.set):o}return t.model===this.model&&t.col===this.col&&t.operator===this.operator}valueEq(t){return!this||!t||!this.eq(t)?!1:this.type===Re.Boolean?this.boolean===(t==null?void 0:t.boolean):this.type===Re.String?this.value1===(t==null?void 0:t.value1):this.type===Re.Join&&this.set.length?Dt.Eq(this.set,t.set):!1}toUrlQuery(){const t=this.type?`"type":"${this.type}"`:"",o=this.model?`"model":"${this.model}"`:"",i=this.col?`"col":"${this.col}"`:"",r=this.operator?`"operator":"${this.operator}"`:"",s=this.value1?`"value1":"${this.value1}"`:"",a=this.type===Re.Boolean?`"boolean":${this.boolean}`:"",c=this.type===Re.Date&&this.date1?`"date1":"${this.date1.toISOString()}"`:"",l=this.type===Re.Date&&this.date2?`"date2":"${this.date2.toISOString()}"`:"",u=this.type===Re.Number?`"number":${this.number}`:"",f=this.type===Re.Set||this.operator===Be.In?`"set":${JSON.stringify(this.set)}`:"",m=this.type===Re.Join?`"joinTableModel":"${this.joinTableModel}"`:"";return[t,o,i,r,s,a,c,l,u,f,m].filter(p=>p!=="").toString()}fromUrlQuery(t){this.model=t.get("model")??"",this.col=t.get("col")??"",this.label=t.get("label")??"",this.operator=t.get("operator")??"",this.value1=t.get("value1")??"",this.type=t.get("type")??"",this.boolean=!!(t.get("boolean")??""),this.joinTableModel=t.get("joinTableModel")??"",this.joinTableId=t.get("joinTableId")??"",this.joinTableFk=t.get("joinTableFk")??"",this.joinTableIdCol=t.get("joinTableIdCol")??"",this.joinTablePk=t.get("joinTablePk")??""}isUnaryFilter(){return this.operator===Be.Eq||this.operator===Be.Gt||this.operator===Be.Lt}isBetweenFilter(){return this.operator===Be.Btw}isSetFilter(){return this.operator===Be.In}static Create(t,o,i){const r=new Eo;return r.model=t.GetClassName(),r.col=o??"",r.type=i,r.type===Re.Number&&(r.value1="0"),r.type===Re.String&&(r.value1=""),r.type===Re.Boolean&&(r.value1="false",r.operator=Be.Eq),r}static CreateFilterModelWithJoin(t,o,i,r,s,a,c,l){const u=new Eo;return u.id=qt(),u.joinTable=i,u.joinTablePk=r,u.joinTableFk=s,u.col=o,u.type=a,c&&(u.joinTableId=c),l&&(u.joinTableIdCol=l),u}static CreateFilterModelWithJoinV2(t,o,i,r,s,a,c){const l=new Eo;return l.model=t,l.joinTableModel=i,l.joinTablePk=r,l.joinTableFk=s,l.col=o,l.type=Re.Join,a&&(l.joinTableId=a),c&&(l.joinTableIdCol=c),l}static OnlyIfSecondModelExists(t,o){const i=new Eo;return i.id=qt(),i.model=Ee.ToCamelCase(t.GetClassName()),i.joinTableModel=Ee.ToCamelCase(o.GetClassName()),i.type=Re.Join,i}addToSet(...t){t.forEach(o=>{if(this.set.indexOf(o)===-1){this.set.push(o);return}this.set=this.set.filter(i=>i!==o)})}pushToSet(...t){t.forEach(o=>{this.set.indexOf(o)===-1&&this.set.push(o)})}replaceSet(...t){this.set=t}setBoolean(t){this.boolean=t}toRef(){return e.ref(this)}setDate1(t){this.date1=t}setDate2(t){this.date2=t}dropDates(){this.setDate1(),this.setDate2()}setDatesRange(t,o){if(!t&&!o){this.dropDates();return}if(!o){this.setDate1(t),this.operator=Be.Eq;return}this.setDate2(o),this.operator=Be.Btw}};Vc([J.GetClassConstructor(String)],fs.prototype,"set");let Ti=fs;class Nc{constructor(){d(this,"operation",Be.Lt);d(this,"column","");d(this,"value");d(this,"initial",!0);d(this,"tableName","");d(this,"version","");d(this,"model","")}toUrlQuery(){const t=this.operation?`"operation":"${this.operation}"`:"",o=this.column?`"column":"${this.column}"`:"",i=this.value&&typeof this.value.toISOString=="function"?this.value.toISOString():this.value,r=i?`"value":"${i}"`:"",s=this.model?`"model":"${this.model}"`:"",a=`"initial":${this.initial}`;return[t,o,r,s,a].filter(c=>c!=="").toString()}fromUrlQuery(t){t.cursvalue&&(this.value=t.cursvalue),t.curscolumn&&(this.column=String(t.curscolumn)),t.cursinitial!==void 0&&(this.initial=!!t.cursinitial),t.curstableName&&(this.tableName=String(t.curstableName)),t.cursoperation&&(this.operation=t.cursoperation)}}class Ao{constructor(t){d(this,"page",0);d(this,"rowsPerPage",25);d(this,"rowsNumber",0);d(this,"cursor",new Nc);d(this,"cursorMode",!1);d(this,"append",!1);d(this,"allLoaded",!1);d(this,"version","");J.BuildClass(this,t)}setLoadMore(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Be.Gt,this.cursor.column=o,this.cursor.tableName=i,this.cursorMode=!0}setLoadMoreV2(t,o,i){this.cursor.value=t,this.cursor.initial=!1,this.cursor.operation=Be.Gt,this.cursor.column=o,this.cursor.model=i,this.cursorMode=!0,this.version="v2"}setOffset(t){this.page=t}toUrlQuery(){const t=`"offset":${this.offset}`,o=`"limit":${this.limit}`,i=`"cursorMode":${this.cursorMode}`,r=`"append":${this.append}`,s=`"allLoaded":${this.allLoaded}`,a=`"cursor":{${this.cursor.toUrlQuery()}}`;return[t,o,i,r,s,a].toString()}fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("p=")+2,t.lastIndexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.page=Number(i.get("offset")),this.rowsPerPage=Number(i.get("col"))}setAllLoaded(t){this.allLoaded=!(t>=this.rowsPerPage)}resetAllLoaded(){this.allLoaded=!1}getPageNum(){return this.page/this.rowsPerPage+1}drop(){this.page=0,this.rowsPerPage=25,J.BuildClass(this)}}var ut=(n=>(n.Asc="asc",n.Desc="desc",n))(ut||{});class zo{constructor(t){d(this,"model","");d(this,"col","");d(this,"order");d(this,"label","");d(this,"default",!1);d(this,"selected",!1);J.BuildClass(this,t)}static Create(t,o,i=ut.Asc,r,s){const a=new zo;return a.model=t.GetClassName(),a.col=o??"",a.order=i??ut.Asc,a.label=r??"",a.default=s??!1,a}isAsc(){return this.order===ut.Asc}isDesc(){return this.order===ut.Desc}eq(t){return t.model===this.model&&t.col===this.col&&t.order===this.order}toUrlQuery(){const t=this.model?`"model":"${this.model}"`:"",o=this.col?`"col":"${this.col}"`:"",i=this.order?`"order":"${this.order}"`:"";return[t,o,i].toString()}async fromUrlQuery(){const t=window.location.search,o=t.substring(t.indexOf("s=")+2,t.indexOf("|")),i=new URLSearchParams(decodeURIComponent(o));this.model=i.get("model")??"",this.col=i.get("col")??"",this.label=i.get("label")??"",this.default=!!i.get("default"),this.order=i.get("order")??""}asc(){this.order=ut.Asc}desc(){this.order=ut.Desc}}class Do{constructor(){d(this,"model","");d(this,"cols",[]);d(this,"models",[])}static Create(t,o){const i=new Do;return i.model=t.GetClassName(),i.cols=o,i}}var $c=Object.defineProperty,eo=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&$c(t,o,r),r};const $n=(Ke=class{constructor(t){d(this,"id");d(this,"f",[]);d(this,"f2",[]);d(this,"s",[]);d(this,"p",new Ao);d(this,"t",new Do);J.BuildClass(this,t)}static Get(){return this.instance||(this.instance=Ke.create()),this.instance}static create(){return e.reactive(new Ke)}createFrom(t){const o=new Ke(JSON.parse(t));this.f=o.f}clearForHTTP(){const t=new Ke(this);return t.f=this.f.map(o=>Ke.EmptyEntiries(o)),t.f2=this.f2.map(o=>Ke.EmptyEntiries(o)),t.s=this.s.map(o=>Ke.EmptyEntiries(o)),t.p=Ke.EmptyEntiries(this.p),t.t=Ke.EmptyEntiries(this.t),t}static EmptyEntiries(t){if(!t)return;const i=Object.entries(t).filter(([r,s])=>r!=="label"&&s!==""&&s!==null);return Object.fromEntries(i)}findFilterModel(t){return this.f.find(o=>t.id===o.id)}getFirstSortModel(){return Dt.GetLast(this.s)}setSortModel(t){t&&(this.s[0]=t)}setS(t){this.s[0]=t}setF(t){this.f.push(t)}setF2(t){this.f2.push(t)}replaceF(t,o){this.removeF(o),t&&this.setF(t)}removeF(t){const o=this.f.findIndex(i=>i.eq(t));J.RemoveFromClassByIndex(o,this.f)}reset(){this.f=[],this.s=[],this.p=new Ao}resetF(){this.f=[]}},d(Ke,"instance"),Ke);eo([J.GetClassConstructor(Ti)],$n.prototype,"f"),eo([J.GetClassConstructor(us)],$n.prototype,"f2"),eo([J.GetClassConstructor(zo)],$n.prototype,"s"),eo([J.GetClassConstructor(Ao)],$n.prototype,"p"),eo([J.GetClassConstructor(Do)],$n.prototype,"t");let xt=$n,Tc=(Qn=class{},d(Qn,"SortModel",zo),d(Qn,"FilterModel",Ti),d(Qn,"FilterModelV2",us),d(Qn,"FTSP",xt),Qn);function ms(n,t){return function(){return n.apply(t,arguments)}}const{toString:Pc}=Object.prototype,{getPrototypeOf:Tn}=Object,{iterator:to,toStringTag:hs}=Symbol,Fo=(({hasOwnProperty:n})=>(t,o)=>n.call(t,o))(Object.prototype),no=(n,t)=>{let o=n;const i=[];for(;o!=null&&o!==Object.prototype;){if(i.indexOf(o)!==-1)return!1;if(i.push(o),Fo(o,t))return!0;o=Tn(o)}return!1},Mc=(n,t)=>n!=null&&no(n,t)?n[t]:void 0,Pi=(n=>t=>{const o=Pc.call(t);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),yt=n=>(n=n.toLowerCase(),t=>Pi(t)===n),Oo=n=>t=>typeof t===n,{isArray:sn}=Array,Pn=Oo("undefined");function Mn(n){return n!==null&&!Pn(n)&&n.constructor!==null&&!Pn(n.constructor)&&nt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const ps=yt("ArrayBuffer");function Ic(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&ps(n.buffer),t}const Rc=Oo("string"),nt=Oo("function"),gs=Oo("number"),In=n=>n!==null&&typeof n=="object",Ac=n=>n===!0||n===!1,Lo=n=>{if(!In(n))return!1;const t=Tn(n);return(t===null||t===Object.prototype||Tn(t)===null)&&!no(n,hs)&&!no(n,to)},zc=n=>{if(!In(n)||Mn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Dc=yt("Date"),Fc=yt("File"),Oc=n=>!!(n&&typeof n.uri<"u"),Lc=n=>n&&typeof n.getParts<"u",_c=yt("Blob"),Hc=yt("FileList"),Uc=n=>In(n)&&nt(n.pipe);function vc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const ys=vc(),ws=typeof ys.FormData<"u"?ys.FormData:void 0,qc=n=>{if(!n)return!1;if(ws&&n instanceof ws)return!0;const t=Tn(n);if(!t||t===Object.prototype||!nt(n.append))return!1;const o=Pi(n);return o==="formdata"||o==="object"&&nt(n.toString)&&n.toString()==="[object FormData]"},jc=yt("URLSearchParams"),[Wc,Gc,Qc,Yc]=["ReadableStream","Request","Response","Headers"].map(yt),Xc=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oo(n,t,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),sn(n))for(i=0,r=n.length;i<r;i++)t.call(null,n[i],i,n);else{if(Mn(n))return;const s=o?Object.getOwnPropertyNames(n):Object.keys(n),a=s.length;let c;for(i=0;i<a;i++)c=s[i],t.call(null,n[c],c,n)}}function bs(n,t){if(Mn(n))return null;t=t.toLowerCase();const o=Object.keys(n);let i=o.length,r;for(;i-- >0;)if(r=o[i],t===r.toLowerCase())return r;return null}const an=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cs=n=>!Pn(n)&&n!==an;function Mi(...n){const{caseless:t,skipUndefined:o}=Cs(this)&&this||{},i={},r=(s,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&bs(i,a)||a,l=Fo(i,c)?i[c]:void 0;Lo(l)&&Lo(s)?i[c]=Mi(l,s):Lo(s)?i[c]=Mi({},s):sn(s)?i[c]=s.slice():(!o||!Pn(s))&&(i[c]=s)};for(let s=0,a=n.length;s<a;s++){const c=n[s];if(!c||Mn(c)||(oo(c,r),typeof c!="object"||sn(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let u=0;u<l.length;u++){const f=l[u];ld.call(c,f)&&r(c[f],f)}}return i}const Zc=(n,t,o,{allOwnKeys:i}={})=>(oo(t,(r,s)=>{o&&nt(r)?Object.defineProperty(n,s,{__proto__:null,value:ms(r,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),Jc=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Kc=(n,t,o,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),o&&Object.assign(n.prototype,o)},ed=(n,t,o,i)=>{let r,s,a;const c={};if(t=t||{},n==null)return t;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)a=r[s],(!i||i(a,n,t))&&!c[a]&&(t[a]=n[a],c[a]=!0);n=o!==!1&&Tn(n)}while(n&&(!o||o(n,t))&&n!==Object.prototype);return t},td=(n,t,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=t.length;const i=n.indexOf(t,o);return i!==-1&&i===o},nd=n=>{if(!n)return null;if(sn(n))return n;let t=n.length;if(!gs(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=n[t];return o},od=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Tn(Uint8Array)),id=(n,t)=>{const i=(n&&n[to]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;t.call(n,s[0],s[1])}},rd=(n,t)=>{let o;const i=[];for(;(o=n.exec(t))!==null;)i.push(o);return i},sd=yt("HTMLFormElement"),ad=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,i,r){return i.toUpperCase()+r}),{propertyIsEnumerable:ld}=Object.prototype,cd=yt("RegExp"),Ss=(n,t)=>{const o=Object.getOwnPropertyDescriptors(n),i={};oo(o,(r,s)=>{let a;(a=t(r,s,n))!==!1&&(i[s]=a||r)}),Object.defineProperties(n,i)},dd=n=>{Ss(n,(t,o)=>{if(nt(n)&&["arguments","caller","callee"].includes(o))return!1;const i=n[o];if(nt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},ud=(n,t)=>{const o={},i=r=>{r.forEach(s=>{o[s]=!0})};return sn(n)?i(n):i(String(n).split(t)),o},fd=()=>{},md=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function hd(n){return!!(n&&nt(n.append)&&n[hs]==="FormData"&&n[to])}const pd=n=>{const t=new WeakSet,o=i=>{if(In(i)){if(t.has(i))return;if(Mn(i))return i;if(!("toJSON"in i)){t.add(i);const r=sn(i)?[]:{};return oo(i,(s,a)=>{const c=o(s);!Pn(c)&&(r[a]=c)}),t.delete(i),r}}return i};return o(n)},gd=yt("AsyncFunction"),yd=n=>n&&(In(n)||nt(n))&&nt(n.then)&&nt(n.catch),ks=((n,t)=>n?setImmediate:t?((o,i)=>(an.addEventListener("message",({source:r,data:s})=>{r===an&&s===o&&i.length&&i.shift()()},!1),r=>{i.push(r),an.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",nt(an.postMessage)),wd=typeof queueMicrotask<"u"?queueMicrotask.bind(an):typeof process<"u"&&process.nextTick||ks,xs=n=>n!=null&&nt(n[to]),k={isArray:sn,isArrayBuffer:ps,isBuffer:Mn,isFormData:qc,isArrayBufferView:Ic,isString:Rc,isNumber:gs,isBoolean:Ac,isObject:In,isPlainObject:Lo,isEmptyObject:zc,isReadableStream:Wc,isRequest:Gc,isResponse:Qc,isHeaders:Yc,isUndefined:Pn,isDate:Dc,isFile:Fc,isReactNativeBlob:Oc,isReactNative:Lc,isBlob:_c,isRegExp:cd,isFunction:nt,isStream:Uc,isURLSearchParams:jc,isTypedArray:od,isFileList:Hc,forEach:oo,merge:Mi,extend:Zc,trim:Xc,stripBOM:Jc,inherits:Kc,toFlatObject:ed,kindOf:Pi,kindOfTest:yt,endsWith:td,toArray:nd,forEachEntry:id,matchAll:rd,isHTMLForm:sd,hasOwnProperty:Fo,hasOwnProp:Fo,hasOwnInPrototypeChain:no,getSafeProp:Mc,reduceDescriptors:Ss,freezeMethods:dd,toObjectSet:ud,toCamelCase:ad,noop:fd,toFiniteNumber:md,findKey:bs,global:an,isContextDefined:Cs,isSpecCompliantForm:hd,toJSONObject:pd,isAsyncFn:gd,isThenable:yd,setImmediate:ks,asap:wd,isIterable:xs,isSafeIterable:n=>n!=null&&no(n,to)&&xs(n)},bd=k.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"]),Cd=n=>{const t={};let o,i,r;return n&&n.split(`
|
|
15
|
+
`).forEach(function(a){r=a.indexOf(":"),o=a.substring(0,r).trim().toLowerCase(),i=a.substring(r+1).trim(),!(!o||t[o]&&bd[o])&&(o==="set-cookie"?t[o]?t[o].push(i):t[o]=[i]:t[o]=t[o]?t[o]+", "+i:i)}),t};function Sd(n){let t=0,o=n.length;for(;t<o;){const i=n.charCodeAt(t);if(i!==9&&i!==32)break;t+=1}for(;o>t;){const i=n.charCodeAt(o-1);if(i!==9&&i!==32)break;o-=1}return t===0&&o===n.length?n:n.slice(t,o)}const kd=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),xd=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ii(n,t){return k.isArray(n)?n.map(o=>Ii(o,t)):Sd(String(n).replace(t,""))}const Ed=n=>Ii(n,kd),Bd=n=>Ii(n,xd);function Es(n){const t=Object.create(null);return k.forEach(n.toJSON(),(o,i)=>{t[i]=Bd(o)}),t}const Bs=Symbol("internals");function io(n){return n&&String(n).trim().toLowerCase()}function _o(n){return n===!1||n==null?n:k.isArray(n)?n.map(_o):Ed(String(n))}function Vd(n){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=o.exec(n);)t[i[1]]=i[2];return t}const Nd=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Ri(n,t,o,i,r){if(k.isFunction(i))return i.call(this,t,o);if(r&&(t=o),!!k.isString(t)){if(k.isString(i))return t.indexOf(i)!==-1;if(k.isRegExp(i))return i.test(t)}}function $d(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,i)=>o.toUpperCase()+i)}function Td(n,t){const o=k.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+o,{__proto__:null,value:function(r,s,a){return this[i].call(this,t,r,s,a)},configurable:!0})})}let qe=class{constructor(t){t&&this.set(t)}set(t,o,i){const r=this;function s(c,l,u){const f=io(l);if(!f)return;const m=k.findKey(r,f);(!m||r[m]===void 0||u===!0||u===void 0&&r[m]!==!1)&&(r[m||l]=_o(c))}const a=(c,l)=>k.forEach(c,(u,f)=>s(u,f,l));if(k.isPlainObject(t)||t instanceof this.constructor)a(t,o);else if(k.isString(t)&&(t=t.trim())&&!Nd(t))a(Cd(t),o);else if(k.isObject(t)&&k.isSafeIterable(t)){let c=Object.create(null),l,u;for(const f of t){if(!k.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],k.hasOwnProp(c,u)?(l=c[u],c[u]=k.isArray(l)?[...l,f[1]]:[l,f[1]]):c[u]=f[1]}a(c,o)}else t!=null&&s(o,t,i);return this}get(t,o){if(t=io(t),t){const i=k.findKey(this,t);if(i){const r=this[i];if(!o)return r;if(o===!0)return Vd(r);if(k.isFunction(o))return o.call(this,r,i);if(k.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=io(t),t){const i=k.findKey(this,t);return!!(i&&this[i]!==void 0&&(!o||Ri(this,this[i],i,o)))}return!1}delete(t,o){const i=this;let r=!1;function s(a){if(a=io(a),a){const c=k.findKey(i,a);c&&(!o||Ri(i,i[c],c,o))&&(delete i[c],r=!0)}}return k.isArray(t)?t.forEach(s):s(t),r}clear(t){const o=Object.keys(this);let i=o.length,r=!1;for(;i--;){const s=o[i];(!t||Ri(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const o=this,i={};return k.forEach(this,(r,s)=>{const a=k.findKey(i,s);if(a){o[a]=_o(r),delete o[s];return}const c=t?$d(s):String(s).trim();c!==s&&delete o[s],o[c]=_o(r),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return k.forEach(this,(i,r)=>{i!=null&&i!==!1&&(o[r]=t&&k.isArray(i)?i.join(", "):i)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(`
|
|
16
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const i=new this(t);return o.forEach(r=>i.set(r)),i}static accessor(t){const i=(this[Bs]=this[Bs]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=io(a);i[c]||(Td(r,a),i[c]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}};qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),k.reduceDescriptors(qe.prototype,({value:n},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[o]=i}}}),k.freezeMethods(qe);const Pd="[REDACTED ****]";function Md(n){if(k.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(k.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Id(n,t){const o=new Set(t.map(s=>String(s).toLowerCase())),i=[],r=s=>{if(s===null||typeof s!="object"||k.isBuffer(s))return s;if(i.indexOf(s)!==-1)return;s instanceof qe&&(s=s.toJSON()),i.push(s);let a;if(k.isArray(s))a=[],s.forEach((c,l)=>{const u=r(c);k.isUndefined(u)||(a[l]=u)});else{if(!k.isPlainObject(s)&&Md(s))return i.pop(),s;a=Object.create(null);for(const[c,l]of Object.entries(s)){const u=o.has(c.toLowerCase())?Pd:r(l);k.isUndefined(u)||(a[c]=u)}}return i.pop(),a};return r(n)}let _=class Xl extends Error{static from(t,o,i,r,s,a){const c=new Xl(t.message,o||t.code,i,r,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,o,i,r,s){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),i&&(this.config=i),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){const t=this.config,o=t&&k.hasOwnProp(t,"redact")?t.redact:void 0,i=k.isArray(o)&&o.length>0?Id(t,o):k.toJSONObject(t);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:i,code:this.code,status:this.status}}};_.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_.ERR_BAD_OPTION="ERR_BAD_OPTION",_.ECONNABORTED="ECONNABORTED",_.ETIMEDOUT="ETIMEDOUT",_.ECONNREFUSED="ECONNREFUSED",_.ERR_NETWORK="ERR_NETWORK",_.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_.ERR_DEPRECATED="ERR_DEPRECATED",_.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_.ERR_CANCELED="ERR_CANCELED",_.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_.ERR_INVALID_URL="ERR_INVALID_URL",_.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Rd=null,Vs=100;function Ai(n){return k.isPlainObject(n)||k.isArray(n)}function Ns(n){return k.endsWith(n,"[]")?n.slice(0,-2):n}function zi(n,t,o){return n?n.concat(t).map(function(r,s){return r=Ns(r),!o&&s?"["+r+"]":r}).join(o?".":""):t}function Ad(n){return k.isArray(n)&&!n.some(Ai)}const zd=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function Ho(n,t,o){if(!k.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,o=k.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function($,b){return!k.isUndefined(b[$])});const i=o.metaTokens,r=o.visitor||E,s=o.dots,a=o.indexes,c=o.Blob||typeof Blob<"u"&&Blob,l=o.maxDepth===void 0?Vs:o.maxDepth,u=c&&k.isSpecCompliantForm(t),f=[];if(!k.isFunction(r))throw new TypeError("visitor must be a function");function m(x){if(x===null)return"";if(k.isDate(x))return x.toISOString();if(k.isBoolean(x))return x.toString();if(!u&&k.isBlob(x))throw new _("Blob is not supported. Use a Buffer instead.");if(k.isArrayBuffer(x)||k.isTypedArray(x)){if(u&&typeof c=="function")return new c([x]);if(typeof Buffer<"u")return Buffer.from(x);throw new _("Blob is not supported. Use a Buffer instead.",_.ERR_NOT_SUPPORT)}return x}function p(x){if(x>l)throw new _("Object is too deeply nested ("+x+" levels). Max depth: "+l,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function S(x,$){if(l===1/0)return JSON.stringify(x);const b=[];return JSON.stringify(x,function(N,I){if(!k.isObject(I))return I;for(;b.length&&b[b.length-1]!==this;)b.pop();return b.push(I),p($+b.length-1),I})}function E(x,$,b){let y=x;if(k.isReactNative(t)&&k.isReactNativeBlob(x))return t.append(zi(b,$,s),m(x)),!1;if(x&&!b&&typeof x=="object"){if(k.endsWith($,"{}"))$=i?$:$.slice(0,-2),x=S(x,1);else if(k.isArray(x)&&Ad(x)||(k.isFileList(x)||k.endsWith($,"[]"))&&(y=k.toArray(x)))return $=Ns($),y.forEach(function(I,j){!(k.isUndefined(I)||I===null)&&t.append(a===!0?zi([$],j,s):a===null?$:$+"[]",m(I))}),!1}return Ai(x)?!0:(t.append(zi(b,$,s),m(x)),!1)}const P=Object.assign(zd,{defaultVisitor:E,convertValue:m,isVisitable:Ai});function V(x,$,b=0){if(!k.isUndefined(x)){if(p(b),f.indexOf(x)!==-1)throw new Error("Circular reference detected in "+$.join("."));f.push(x),k.forEach(x,function(N,I){(!(k.isUndefined(N)||N===null)&&r.call(t,N,k.isString(I)?I.trim():I,$,P))===!0&&V(N,$?$.concat(I):[I],b+1)}),f.pop()}}if(!k.isObject(n))throw new TypeError("data must be an object");return V(n),t}function $s(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function Di(n,t){this._pairs=[],n&&Ho(n,this,t)}const Ts=Di.prototype;Ts.append=function(t,o){this._pairs.push([t,o])},Ts.toString=function(t){const o=t?i=>t.call(this,i,$s):$s;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};function Dd(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ps(n,t,o){if(!t)return n;n=n||"";const i=k.isFunction(o)?{serialize:o}:o,r=k.getSafeProp(i,"encode")||Dd,s=k.getSafeProp(i,"serialize");let a;if(s?a=s(t,i):a=k.isURLSearchParams(t)?t.toString():new Di(t,i).toString(r),a){const c=n.indexOf("#");c!==-1&&(n=n.slice(0,c)),n+=(n.indexOf("?")===-1?"?":"&")+a}return n}class Ms{constructor(){this.handlers=[]}use(t,o,i){return this.handlers.push({fulfilled:t,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Fi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Fd={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Di,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Oi=typeof window<"u"&&typeof document<"u",Li=typeof navigator=="object"&&navigator||void 0,Od=Oi&&(!Li||["ReactNative","NativeScript","NS"].indexOf(Li.product)<0),Ld=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_d=Oi&&window.location.href||"http://localhost",_e={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Oi,hasStandardBrowserEnv:Od,hasStandardBrowserWebWorkerEnv:Ld,navigator:Li,origin:_d},Symbol.toStringTag,{value:"Module"})),...Fd};function Hd(n,t){return Ho(n,new _e.classes.URLSearchParams,{visitor:function(o,i,r,s){return _e.isNode&&k.isBuffer(o)?(this.append(i,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}const Is=Vs;function Rs(n){if(n>Is)throw new _("FormData field is too deeply nested ("+n+" levels). Max depth: "+Is,_.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ud(n){const t=[],o=/\w+|\[(\w*)]/g;let i;for(;(i=o.exec(n))!==null;)Rs(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function vd(n){const t={},o=Object.keys(n);let i;const r=o.length;let s;for(i=0;i<r;i++)s=o[i],t[s]=n[s];return t}function As(n){function t(o,i,r,s){Rs(s);let a=o[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=o.length;return a=!a&&k.isArray(r)?r.length:a,l?(k.hasOwnProp(r,a)?r[a]=k.isArray(r[a])?r[a].concat(i):[r[a],i]:r[a]=i,!c):((!k.hasOwnProp(r,a)||!k.isObject(r[a]))&&(r[a]=[]),t(o,i,r[a],s)&&k.isArray(r[a])&&(r[a]=vd(r[a])),!c)}if(k.isFormData(n)&&k.isFunction(n.entries)){const o={};return k.forEachEntry(n,(i,r)=>{t(Ud(i),r,o,0)}),o}return null}const Rn=(n,t)=>n!=null&&k.hasOwnProp(n,t)?n[t]:void 0;function qd(n,t,o){if(k.isString(n))try{return(t||JSON.parse)(n),k.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(o||JSON.stringify)(n)}const ro={transitional:Fi,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const i=o.getContentType()||"",r=i.indexOf("application/json")>-1,s=k.isObject(t);if(s&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return r?JSON.stringify(As(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){const l=Rn(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return Hd(t,l).toString();if((c=k.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=Rn(this,"env"),f=u&&u.FormData;return Ho(c?{"files[]":t}:t,f&&new f,l)}}return s||r?(o.setContentType("application/json",!1),qd(t)):t}],transformResponse:[function(t){const o=Rn(this,"transitional")||ro.transitional,i=o&&o.forcedJSONParsing,r=Rn(this,"responseType"),s=r==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(i&&!r||s)){const c=!(o&&o.silentJSONParsing)&&s;try{return JSON.parse(t,Rn(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?_.from(l,_.ERR_BAD_RESPONSE,this,null,Rn(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch","query"],n=>{ro.headers[n]={}});function _i(n,t){const o=this||ro,i=t||o,r=qe.from(i.headers);let s=i.data;return k.forEach(n,function(c){s=c.call(o,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function zs(n){return!!(n&&n.__CANCEL__)}let so=class extends _{constructor(t,o,i){super(t??"canceled",_.ERR_CANCELED,o,i),this.name="CanceledError",this.__CANCEL__=!0}};function Ds(n,t,o){const i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):t(new _("Request failed with status code "+o.status,o.status>=400&&o.status<500?_.ERR_BAD_REQUEST:_.ERR_BAD_RESPONSE,o.config,o.request,o))}function jd(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Wd(n,t){n=n||10;const o=new Array(n),i=new Array(n);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=i[s];a||(a=u),o[r]=l,i[r]=u;let m=s,p=0;for(;m!==r;)p+=o[m++],m=m%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-a<t)return;const S=f&&u-f;return S?Math.round(p*1e3/S):void 0}}function Gd(n,t){let o=0,i=1e3/t,r,s;const a=(u,f=Date.now())=>{o=f,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{const f=Date.now(),m=f-o;m>=i?a(u,f):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},i-m)))},()=>r&&a(r)]}const Uo=(n,t,o=3)=>{let i=0;const r=Wd(50,250);return Gd(s=>{if(!s||typeof s.loaded!="number")return;const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=c!=null?Math.min(a,c):a,u=Math.max(0,l-i),f=r(u);i=Math.max(i,l);const m={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:f||void 0,estimated:f&&c?(c-l)/f:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};n(m)},o)},Fs=(n,t)=>{const o=n!=null;return[i=>t[0]({lengthComputable:o,total:n,loaded:i}),t[1]]},Os=n=>(...t)=>k.asap(()=>n(...t)),Qd=_e.hasStandardBrowserEnv?((n,t)=>o=>(o=new URL(o,_e.origin),n.protocol===o.protocol&&n.host===o.host&&(t||n.port===o.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,Yd=_e.hasStandardBrowserEnv?{write(n,t,o,i,r,s,a){if(typeof document>"u")return;const c=[`${n}=${encodeURIComponent(t)}`];k.isNumber(o)&&c.push(`expires=${new Date(o).toUTCString()}`),k.isString(i)&&c.push(`path=${i}`),k.isString(r)&&c.push(`domain=${r}`),s===!0&&c.push("secure"),k.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let o=0;o<t.length;o++){const i=t[o].replace(/^\s+/,""),r=i.indexOf("=");if(r!==-1&&i.slice(0,r)===n)try{return decodeURIComponent(i.slice(r+1))}catch{return i.slice(r+1)}}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Xd(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Zd(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}const Jd=/^https?:(?!\/\/)/i,Kd=/[\t\n\r]/g;function eu(n){let t=0;for(;t<n.length&&n.charCodeAt(t)<=32;)t++;return n.slice(t)}function tu(n){return eu(n).replace(Kd,"")}function Ls(n,t){if(typeof n=="string"&&Jd.test(tu(n)))throw new _('Invalid URL: missing "//" after protocol',_.ERR_INVALID_URL,t)}function _s(n,t,o,i){Ls(t,i);let r=!Xd(t);return n&&(r||o===!1)?(Ls(n,i),Zd(n,t)):t}const Hs=n=>n instanceof qe?{...n}:n;function ln(n,t){n=n||{},t=t||{};const o=Object.create(null);Object.defineProperty(o,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(f,m,p,S){return k.isPlainObject(f)&&k.isPlainObject(m)?k.merge.call({caseless:S},f,m):k.isPlainObject(m)?k.merge({},m):k.isArray(m)?m.slice():m}function r(f,m,p,S){if(k.isUndefined(m)){if(!k.isUndefined(f))return i(void 0,f,p,S)}else return i(f,m,p,S)}function s(f,m){if(!k.isUndefined(m))return i(void 0,m)}function a(f,m){if(k.isUndefined(m)){if(!k.isUndefined(f))return i(void 0,f)}else return i(void 0,m)}function c(f){const m=k.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!k.isUndefined(m))if(k.isPlainObject(m)){if(k.hasOwnProp(m,f))return m[f]}else return;const p=k.hasOwnProp(n,"transitional")?n.transitional:void 0;if(k.isPlainObject(p)&&k.hasOwnProp(p,f))return p[f]}function l(f,m,p){if(k.hasOwnProp(t,p))return i(f,m);if(k.hasOwnProp(n,p))return i(void 0,f)}const u={url:s,method:s,data:s,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:l,headers:(f,m,p)=>r(Hs(f),Hs(m),p,!0)};return k.forEach(Object.keys({...n,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const p=k.hasOwnProp(u,m)?u[m]:r,S=k.hasOwnProp(n,m)?n[m]:void 0,E=k.hasOwnProp(t,m)?t[m]:void 0,P=p(S,E,m);k.isUndefined(P)&&p!==l||(o[m]=P)}),k.hasOwnProp(t,"validateStatus")&&k.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(k.hasOwnProp(n,"validateStatus")?o.validateStatus=i(void 0,n.validateStatus):delete o.validateStatus),o}const nu=["content-type","content-length"];function ou(n,t,o){if(o!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,r])=>{nu.includes(i.toLowerCase())&&n.set(i,r)})}const iu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));function Us(n){const t=ln({},n),o=p=>k.hasOwnProp(t,p)?t[p]:void 0,i=o("data");let r=o("withXSRFToken");const s=o("xsrfHeaderName"),a=o("xsrfCookieName");let c=o("headers");const l=o("auth"),u=o("baseURL"),f=o("allowAbsoluteUrls"),m=o("url");if(t.headers=c=qe.from(c),t.url=Ps(_s(u,m,f,t),o("params"),o("paramsSerializer")),l){const p=k.getSafeProp(l,"username")||"",S=k.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(p+":"+(S?iu(S):"")))}catch(E){throw _.from(E,_.ERR_BAD_OPTION_VALUE,n)}}if(k.isFormData(i)&&(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv||k.isReactNative(i)?c.setContentType(void 0):k.isFunction(i.getHeaders)&&ou(c,i.getHeaders(),o("formDataHeaderPolicy"))),_e.hasStandardBrowserEnv&&(k.isFunction(r)&&(r=r(t)),r===!0||r==null&&Qd(t.url))){const S=s&&a&&Yd.read(a);S&&c.set(s,S)}return t}const ru=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(o,i){const r=Us(n);let s=r.data;const a=qe.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,f,m,p,S,E;function P(){S&&S(),E&&E(),r.cancelToken&&r.cancelToken.unsubscribe(f),r.signal&&r.signal.removeEventListener("abort",f)}let V=new XMLHttpRequest;V.open(r.method.toUpperCase(),r.url,!0),V.timeout=r.timeout;function x(){if(!V)return;const b=qe.from("getAllResponseHeaders"in V&&V.getAllResponseHeaders()),N={data:!c||c==="text"||c==="json"?V.responseText:V.response,status:V.status,statusText:V.statusText,headers:b,config:n,request:V};Ds(function(j){o(j),P()},function(j){i(j),P()},N),V=null}"onloadend"in V?V.onloadend=x:V.onreadystatechange=function(){!V||V.readyState!==4||V.status===0&&!(V.responseURL&&V.responseURL.startsWith("file:"))||setTimeout(x)},V.onabort=function(){V&&(i(new _("Request aborted",_.ECONNABORTED,n,V)),P(),V=null)},V.onerror=function(y){const N=y&&y.message?y.message:"Network Error",I=new _(N,_.ERR_NETWORK,n,V);I.event=y||null,i(I),P(),V=null},V.ontimeout=function(){let y=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const N=r.transitional||Fi;r.timeoutErrorMessage&&(y=r.timeoutErrorMessage),i(new _(y,N.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,n,V)),P(),V=null},s===void 0&&a.setContentType(null),"setRequestHeader"in V&&k.forEach(Es(a),function(y,N){V.setRequestHeader(N,y)}),k.isUndefined(r.withCredentials)||(V.withCredentials=!!r.withCredentials),c&&c!=="json"&&(V.responseType=r.responseType),u&&([p,E]=Uo(u,!0),V.addEventListener("progress",p)),l&&V.upload&&([m,S]=Uo(l),V.upload.addEventListener("progress",m),V.upload.addEventListener("loadend",S)),(r.cancelToken||r.signal)&&(f=b=>{V&&(i(!b||b.type?new so(null,n,V):b),V.abort(),P(),V=null)},r.cancelToken&&r.cancelToken.subscribe(f),r.signal&&(r.signal.aborted?f():r.signal.addEventListener("abort",f)));const $=jd(r.url);if($&&!_e.protocols.includes($)){i(new _("Unsupported protocol "+$+":",_.ERR_BAD_REQUEST,n)),P();return}V.send(s||null)})},su=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const o=new AbortController;let i=!1;const r=function(l){if(!i){i=!0,a();const u=l instanceof Error?l:this.reason;o.abort(u instanceof _?u:new so(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,r(new _(`timeout of ${t}ms exceeded`,_.ETIMEDOUT))},t);const a=()=>{n&&(s&&clearTimeout(s),s=null,n.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),n=null)};n.forEach(l=>l.addEventListener("abort",r,{once:!0}));const{signal:c}=o;return c.unsubscribe=()=>k.asap(a),c},au=function*(n,t){let o=n.byteLength;if(o<t){yield n;return}let i=0,r;for(;i<o;)r=i+t,yield n.slice(i,r),i=r},lu=async function*(n,t){for await(const o of cu(n))yield*au(o,t)},cu=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:o,value:i}=await t.read();if(o)break;yield i}}finally{await t.cancel()}},vs=(n,t,o,i)=>{const r=lu(n,t);let s=0,a,c=l=>{a||(a=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await r.next();if(u){c(),l.close();return}let m=f.byteLength;if(o){let p=s+=m;o(p)}l.enqueue(new Uint8Array(f))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},vo=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,du=(n,t,o)=>t+2<o&&vo(n.charCodeAt(t+1))&&vo(n.charCodeAt(t+2));function uu(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const o=n.slice(5,t),i=n.slice(t+1);if(/;base64/i.test(o)){let a=i.length;const c=i.length;for(let S=0;S<c;S++)if(i.charCodeAt(S)===37&&S+2<c){const E=i.charCodeAt(S+1),P=i.charCodeAt(S+2);vo(E)&&vo(P)&&(a-=2,S+=2)}let l=0,u=c-1;const f=S=>S>=2&&i.charCodeAt(S-2)===37&&i.charCodeAt(S-1)===51&&(i.charCodeAt(S)===68||i.charCodeAt(S)===100);u>=0&&(i.charCodeAt(u)===61?(l++,u--):f(u)&&(l++,u-=3)),l===1&&u>=0&&(i.charCodeAt(u)===61||f(u))&&l++;const p=Math.floor(a/4)*3-(l||0);return p>0?p:0}let s=0;for(let a=0,c=i.length;a<c;a++){const l=i.charCodeAt(a);if(l===37&&du(i,a,c))s+=1,a+=2;else if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&a+1<c){const u=i.charCodeAt(a+1);u>=56320&&u<=57343?(s+=4,a++):s+=3}else s+=3}return s}const Hi="1.18.1",qs=64*1024,{isFunction:qo}=k,fu=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16))),js=n=>{if(!k.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},Ws=(n,...t)=>{try{return!!n(...t)}catch{return!1}},mu=n=>{const t=n.indexOf("://");let o=n;return t!==-1&&(o=o.slice(t+3)),o.includes("@")||o.includes(":")},hu=n=>{const t=k.global!==void 0&&k.global!==null?k.global:globalThis,{ReadableStream:o,TextEncoder:i}=t;n=k.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:r,Request:s,Response:a}=n,c=r?qo(r):typeof fetch=="function",l=qo(s),u=qo(a);if(!c)return!1;const f=c&&qo(o),m=c&&(typeof i=="function"?(x=>$=>x.encode($))(new i):async x=>new Uint8Array(await new s(x).arrayBuffer())),p=l&&f&&Ws(()=>{let x=!1;const $=new s(_e.origin,{body:new o,method:"POST",get duplex(){return x=!0,"half"}}),b=$.headers.has("Content-Type");return $.body!=null&&$.body.cancel(),x&&!b}),S=u&&f&&Ws(()=>k.isReadableStream(new a("").body)),E={stream:S&&(x=>x.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!E[x]&&(E[x]=($,b)=>{let y=$&&$[x];if(y)return y.call($);throw new _(`Response type '${x}' is not supported`,_.ERR_NOT_SUPPORT,b)})});const P=async x=>{if(x==null)return 0;if(k.isBlob(x))return x.size;if(k.isSpecCompliantForm(x))return(await new s(_e.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(k.isArrayBufferView(x)||k.isArrayBuffer(x))return x.byteLength;if(k.isURLSearchParams(x)&&(x=x+""),k.isString(x))return(await m(x)).byteLength},V=async(x,$)=>{const b=k.toFiniteNumber(x.getContentLength());return b??P($)};return async x=>{let{url:$,method:b,data:y,signal:N,cancelToken:I,timeout:j,onDownloadProgress:se,onUploadProgress:ze,responseType:Te,headers:Ne,withCredentials:et="same-origin",fetchOptions:pt,maxContentLength:ye,maxBodyLength:Se}=Us(x);const Ct=k.isNumber(ye)&&ye>-1,Xt=k.isNumber(Se)&&Se>-1,Yn=ae=>k.hasOwnProp(x,ae)?x[ae]:void 0;let Cn=r||fetch;Te=Te?(Te+"").toLowerCase():"text";let rt=su([N,I&&I.toAbortSignal()],j),he=null;const W=rt&&rt.unsubscribe&&(()=>{rt.unsubscribe()});let Qe,Pt=null;const we=()=>new _("Request body larger than maxBodyLength limit",_.ERR_BAD_REQUEST,x,he);try{let ae;const ve=Yn("auth");if(ve){const ee=k.getSafeProp(ve,"username")||"",le=k.getSafeProp(ve,"password")||"";ae={username:ee,password:le}}if(mu($)){const ee=new URL($,_e.origin);if(!ae&&(ee.username||ee.password)){const le=js(ee.username),ct=js(ee.password);ae={username:le,password:ct}}(ee.username||ee.password)&&(ee.username="",ee.password="",$=ee.href)}if(ae&&(Ne.delete("authorization"),Ne.set("Authorization","Basic "+btoa(fu((ae.username||"")+":"+(ae.password||""))))),Ct&&typeof $=="string"&&$.startsWith("data:")&&uu($)>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,x,he);if(Xt&&b!=="get"&&b!=="head"){const ee=await P(y);if(typeof ee=="number"&&isFinite(ee)&&(Qe=ee,ee>Se))throw we()}const Mt=Xt&&(k.isReadableStream(y)||k.isStream(y)),Sn=(ee,le,ct)=>vs(ee,qs,gt=>{if(Xt&>>Se)throw Pt=we();le&&le(gt)},ct);if(p&&b!=="get"&&b!=="head"&&(ze||Mt)){if(Qe=Qe??await V(Ne,y),Qe!==0||Mt){let ee=new s($,{method:"POST",body:y,duplex:"half"}),le;if(k.isFormData(y)&&(le=ee.headers.get("content-type"))&&Ne.setContentType(le),ee.body){const[ct,gt]=ze&&Fs(Qe,Uo(Os(ze)))||[];y=Sn(ee.body,ct,gt)}}}else if(Mt&&!l&&f&&b!=="get"&&b!=="head")y=Sn(y);else if(Mt&&l&&!p&&b!=="get"&&b!=="head")throw new _("Stream request bodies are not supported by the current fetch implementation",_.ERR_NOT_SUPPORT,x,he);k.isString(et)||(et=et?"include":"omit");const st=l&&"credentials"in s.prototype;if(k.isFormData(y)){const ee=Ne.getContentType();ee&&/^multipart\/form-data/i.test(ee)&&!/boundary=/i.test(ee)&&Ne.delete("content-type")}Ne.set("User-Agent","axios/"+Hi,!1);const at={...pt,signal:rt,method:b.toUpperCase(),headers:Es(Ne.normalize()),body:y,duplex:"half",credentials:st?et:void 0};he=l&&new s($,at);let Ye=await(l?Cn(he,pt):Cn($,at));const Zt=qe.from(Ye.headers);if(Ct){const ee=k.toFiniteNumber(Zt.getContentLength());if(ee!=null&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,x,he)}const Ut=S&&(Te==="stream"||Te==="response");if(S&&Ye.body&&(se||Ct||Ut&&W)){const ee={};["status","statusText","headers"].forEach(It=>{ee[It]=Ye[It]});const le=k.toFiniteNumber(Zt.getContentLength()),[ct,gt]=se&&Fs(le,Uo(Os(se),!0))||[];let Jt=0;const kn=It=>{if(Ct&&(Jt=It,Jt>ye))throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,x,he);ct&&ct(It)};Ye=new a(vs(Ye.body,qs,kn,()=>{gt&>(),W&&W()}),ee)}Te=Te||"text";let De=await E[k.findKey(E,Te)||"text"](Ye,x);if(Ct&&!S&&!Ut){let ee;if(De!=null&&(typeof De.byteLength=="number"?ee=De.byteLength:typeof De.size=="number"?ee=De.size:typeof De=="string"&&(ee=typeof i=="function"?new i().encode(De).byteLength:De.length)),typeof ee=="number"&&ee>ye)throw new _("maxContentLength size of "+ye+" exceeded",_.ERR_BAD_RESPONSE,x,he)}return!Ut&&W&&W(),await new Promise((ee,le)=>{Ds(ee,le,{data:De,headers:qe.from(Ye.headers),status:Ye.status,statusText:Ye.statusText,config:x,request:he})})}catch(ae){if(W&&W(),rt&&rt.aborted&&rt.reason instanceof _){const ve=rt.reason;throw ve.config=x,he&&(ve.request=he),ae!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),ve}if(Pt)throw he&&!Pt.request&&(Pt.request=he),Pt;if(ae instanceof _)throw he&&!ae.request&&(ae.request=he),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const ve=new _("Network Error",_.ERR_NETWORK,x,he,ae&&ae.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),ve}throw _.from(ae,ae&&ae.code,x,he,ae&&ae.response)}}},pu=new Map,Gs=n=>{let t=n&&n.env||{};const{fetch:o,Request:i,Response:r}=t,s=[i,r,o];let a=s.length,c=a,l,u,f=pu;for(;c--;)l=s[c],u=f.get(l),u===void 0&&f.set(l,u=c?new Map:hu(t)),f=u;return u};Gs();const Ui={http:Rd,xhr:ru,fetch:{get:Gs}};k.forEach(Ui,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Qs=n=>`- ${n}`,gu=n=>k.isFunction(n)||n===null||n===!1;function yu(n,t){n=k.isArray(n)?n:[n];const{length:o}=n;let i,r;const s={};for(let a=0;a<o;a++){i=n[a];let c;if(r=i,!gu(i)&&(r=Ui[(c=String(i)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${c}'`);if(r&&(k.isFunction(r)||(r=r.get(t))))break;s[c||"#"+a]=r}if(!r){const a=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let c=o?a.length>1?`since :
|
|
17
|
+
`+a.map(Qs).join(`
|
|
18
|
+
`):" "+Qs(a[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+c,_.ERR_NOT_SUPPORT)}return r}const Ys={getAdapter:yu,adapters:Ui};function vi(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new so(null,n)}function Xs(n){return vi(n),n.headers=qe.from(n.headers),n.data=_i.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ys.getAdapter(n.adapter||ro.adapter,n)(n).then(function(i){vi(n),n.response=i;try{i.data=_i.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=qe.from(i.headers),i},function(i){if(!zs(i)&&(vi(n),i&&i.response)){n.response=i.response;try{i.response.data=_i.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=qe.from(i.response.headers)}return Promise.reject(i)})}const jo={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{jo[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const Zs={};jo.transitional=function(t,o,i){function r(s,a){return"[Axios v"+Hi+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return(s,a,c)=>{if(t===!1)throw new _(r(a," has been removed"+(o?" in "+o:"")),_.ERR_DEPRECATED);return o&&!Zs[a]&&(Zs[a]=!0,console.warn(r(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(s,a,c):!0}},jo.spelling=function(t){return(o,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function wu(n,t,o){if(typeof n!="object"||n===null)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let r=i.length;for(;r-- >0;){const s=i[r],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const c=n[s],l=c===void 0||a(c,s,n);if(l!==!0)throw new _("option "+s+" must be "+l,_.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new _("Unknown option "+s,_.ERR_BAD_OPTION)}}const Wo={assertOptions:wu,validators:jo},je=Wo.validators;let cn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ms,response:new Ms}}async request(t,o){try{return await this._request(t,o)}catch(i){if(i instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=(()=>{if(!r.stack)return"";const a=r.stack.indexOf(`
|
|
19
19
|
`);return a===-1?"":r.stack.slice(a+1)})();try{if(!i.stack)i.stack=s;else if(s){const a=s.indexOf(`
|
|
20
20
|
`),c=a===-1?-1:s.indexOf(`
|
|
21
21
|
`,a+1),l=c===-1?"":s.slice(c+1);String(i.stack).endsWith(l)||(i.stack+=`
|
|
22
|
-
`+s)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=ln(this.defaults,o);const{transitional:i,paramsSerializer:r,headers:s}=o;i!==void 0&&jo.assertOptions(i,{silentJSONParsing:je.transitional(je.boolean),forcedJSONParsing:je.transitional(je.boolean),clarifyTimeoutError:je.transitional(je.boolean),legacyInterceptorReqResOrdering:je.transitional(je.boolean),advertiseZstdAcceptEncoding:je.transitional(je.boolean),validateStatusUndefinedResolves:je.transitional(je.boolean)},!1),r!=null&&(k.isFunction(r)?o.paramsSerializer={serialize:r}:jo.assertOptions(r,{encode:je.function,serialize:je.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),jo.assertOptions(o,{baseUrl:je.spelling("baseURL"),withXsrfToken:je.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&k.merge(s.common,s[o.method]);s&&k.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete s[x]}),o.headers=qe.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen=="function"&&N.runWhen(o)===!1)return;l=l&&N.synchronous;const V=o.transitional||Di;V&&V.legacyInterceptorReqResOrdering?c.unshift(N.fulfilled,N.rejected):c.push(N.fulfilled,N.rejected)});const u=[];this.interceptors.response.forEach(function(N){u.push(N.fulfilled,N.rejected)});let f,m=0,p;if(!l){const x=[Ys.bind(this),void 0];for(x.unshift(...c),x.push(...u),p=x.length,f=Promise.resolve(o);m<p;)f=f.then(x[m++],x[m++]);return f}p=c.length;let S=o;for(;m<p;){const x=c[m++],N=c[m++];try{S=x(S)}catch(V){N.call(this,V);break}}try{f=Ys.call(this,S)}catch(x){return Promise.reject(x)}for(m=0,p=u.length;m<p;)f=f.then(u[m++],u[m++]);return f}getUri(t){t=ln(this.defaults,t);const o=Ls(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Ts(o,t.params,t.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(t){cn.prototype[t]=function(o,i){return this.request(ln(i||{},{method:t,url:o,data:i&&k.hasOwnProp(i,"data")?i.data:void 0}))}}),k.forEach(["post","put","patch","query"],function(t){function o(i){return function(s,a,c){return this.request(ln(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}cn.prototype[t]=o(),t!=="query"&&(cn.prototype[t+"Form"]=o(!0))});let gu=class Ql{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{i.subscribe(c),s=c}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},t(function(s,a,c){i.reason||(i.reason=new io(s,a,c),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=i=>{t.abort(i)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new Ql(function(r){t=r}),cancel:t}}};function yu(n){return function(o){return n.apply(null,o)}}function wu(n){return k.isObject(n)&&n.isAxiosError===!0}const vi={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(vi).forEach(([n,t])=>{vi[t]=n});function Zs(n){const t=new cn(n),o=fs(cn.prototype.request,t);return k.extend(o,cn.prototype,t,{allOwnKeys:!0}),k.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return Zs(ln(n,r))},o}const $e=Zs(oo);$e.Axios=cn,$e.CanceledError=io,$e.CancelToken=gu,$e.isCancel=As,$e.VERSION=_i,$e.toFormData=_o,$e.AxiosError=_,$e.Cancel=$e.CanceledError,$e.all=function(t){return Promise.all(t)},$e.spread=yu,$e.isAxiosError=wu,$e.mergeConfig=ln,$e.AxiosHeaders=qe,$e.formToJSON=n=>Rs(k.isHTMLForm(n)?new FormData(n):n),$e.getAdapter=Qs.getAdapter,$e.HttpStatusCode=vi,$e.default=$e;const{Axios:_w,AxiosError:Hw,CanceledError:Uw,isCancel:vw,CancelToken:qw,VERSION:jw,all:Ww,Cancel:Gw,isAxiosError:Qw,spread:Yw,toFormData:Xw,AxiosHeaders:Zw,HttpStatusCode:Jw,formToJSON:Kw,getAdapter:eb,mergeConfig:tb,create:nb}=$e;var ro=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(ro||{});const so=(()=>{function n(){const l=r();return!(!l||l==="undefined")}function t(l){l.accessToken&&localStorage.setItem("access_token",l.accessToken),l.refreshToken&&localStorage.setItem("refresh_token",l.refreshToken)}function o(){const l=localStorage.getItem("user");return l?JSON.parse(l).id:""}function i(){const l=localStorage.getItem("user");if(l)return JSON.parse(l)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(l){if(!n())return;const u=so.getUser();u&&(u.human=l,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:o,clearTokens:a,getUser:i,updateHuman:c}})();class qi{constructor(t){d(this,"code",400);d(this,"err","");K.BuildClass(this,t)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(t,o){const i=t.config;if(t.response){if(t.response.status===401&&!i._retry)return i._retry=!0,o.defaults.headers.common.token=so.getAccessToken(),t.config.headers.token=so.getAccessToken(),t.config.baseURL=void 0,o.request(i);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Vn.Error("Неверный логин или пароль");return}Vn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new qi(t.response.data).getErr();r&&Vn.Error(r)}return Promise.reject(t)}}}const An=$e.create();An.interceptors.response.use(n=>n,async n=>await qi.Handle(n,An));class ao{static async Get(t,o,i){return await An({method:ro.GET,url:t,headers:o,responseType:i})}static async Post(t,o,i,r){return o["Content-Type"]="multipart/form-data",await An({method:ro.POST,url:t,headers:o,responseType:i,data:r})}static async Put(t,o,i){return o["Content-Type"]="multipart/form-data",await An({method:ro.PUT,url:t,headers:o,data:i})}static async Delete(t,o){return await An({method:ro.DELETE,url:t,headers:o})}}class Wo{constructor(t){d(this,"name","");K.BuildClass(this,t)}static Set(){}static Get(t,o){const i=sessionStorage.getItem(t);if(i){const r=JSON.parse(i),s=new Date,a=new Date(r.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(o||10)?null:r.data}else return null}static async TryGet(t,o,i){let r;return r=Wo.Get(t,i),r||(r=await o()),r}}var ji=(n=>(n.ContentType="Content-Type",n.Token="token",n))(ji||{}),Js=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Js||{});const ge=class ge{static Setup(t="http://localhost",o,i="api"){this.baseUrl=Ee.BuildSafeUrl(t,o,i),this.host=t,this.apiVersion=i}static newWebSocket(t){const o=this.host.replace("http","ws")+"/ws/"+t;return new WebSocket(o)}static download(t,o){const i=ge.getDownloadFileName(t,o.headers);if(!(o.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(o.data),s=document.createElement("a");s.href=r,s.setAttribute("download",i),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(t,o){if(t)return t;const i=o["content-disposition"];if(!i)return"file";const r=i.indexOf('"')+1,s=i.lastIndexOf('"'),a=i.substring(r,s);return a||"file"}static getHeaders(t){const o=St.Get(ct.AccessToken);return t||(t=ge.headers),o&&(t[ji.Token]=o),t??ge.headers}static returnResponse(t,o){if(o)return t!=null&&t.isBlob?ge.download(t.downloadFileName,o):o.data}static async Get(t){return ge.returnResponse(t,await ao.Get(ge.buildUrl((t==null?void 0:t.query)??""),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return ge.returnResponse(t,await ao.Post(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t.isBlob),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return ge.returnResponse(t,await ao.Put(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return ge.returnResponse(t,await ao.Delete(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:o}=t;return new EventSource(ge.buildUrl(o))}static buildUrl(t=""){try{return Ei(this.baseUrl,t)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(t){return t?"blob":"json"}static createFormDataPayload(t,o){const i=new FormData;if(i.append("form",JSON.stringify(t)),o)for(const r of o)r.file&&i.append(r.id??"files",r.file,r.originalName);return i}};d(ge,"baseUrl",""),d(ge,"apiVersion","api"),d(ge,"host",""),d(ge,"headers",{[ji.ContentType]:Js.ApplicationJson});let Ce=ge;const D=(n,t)=>{const o=n.__vccOpts||n;for(const[i,r]of t)o[i]=r;return o},bu={},Cu={style:{"text-align":"center"}};function Su(n,t){return e.openBlock(),e.createElementBlock("div",Cu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const Ks=D(bu,[["render",Su]]),ku=[{path:"/:pathMatch(.*)*",name:"NotFound",component:Ks}],mt=class mt{static Setup(t,o=""){this.router=t,this.title=o,this.ChangeDocumentTitle(),this.AddRoutes(ku)}static Get(){return this.router}static AddRoutes(t){t.forEach(o=>{this.Get().addRoute(o)})}static async To(t){await this.Get().push(t)}static async ToHome(){}static async Replace(t){await this.Get().replace(t)}static Id(){return mt.GetStringParam("id")}static Slug(){return mt.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return mt.GetStringQueryParam("qid")}static Route(){var t;return(t=this.Get())==null?void 0:t.currentRoute.value}static RouterPushBlank(t){const o=this.Get().resolve({path:t});window.open(o==null?void 0:o.href,"_blank")}static GetPath(){var o;const t=(o=mt.Route())==null?void 0:o.path.split("/");return!t||t.length<=0?"":t[t.length-1]}static async ToAdmin(t){if(!t){await this.Get().push("/admin");return}let o=t;o[0]==="/"&&(o=t.substring(1)),await mt.To(`/admin/${o}`)}static GetStringQueryParam(t){return String(this.Route().query[t])}static GetNumberQueryParam(t){return Number(this.Route().query[t]??0)}static GetStringParam(t){var o;return(o=this.Route())==null?void 0:o.params[t]}static SetQueryParam(t,o){const i=new URL(window.location);i.searchParams.set(t,String(o)),history.replaceState(null,"",i)}static Resolve(t){return this.Get().resolve(t)}};d(mt,"router"),d(mt,"title",""),d(mt,"ChangeDocumentTitle",(t="")=>{let o=mt.Route().meta.title??t;o&&(o=" | "+o),document.title=mt.title+o});let Et=mt;class Ne{constructor(t,o){d(this,"items",e.reactive([]));d(this,"item");d(this,"options",e.reactive([]));d(this,"count",e.ref(0));d(this,"classConstructor");d(this,"url","");d(this,"searchStr",e.ref(""));this.classConstructor=t,this.item=e.reactive(new this.classConstructor),this.url=o}Set(t){Object.assign(this.item,new this.classConstructor(t))}getUrl(t){return t?`${this.url}/${t}`:this.url}async GetOptions(t="name",o="id"){const i=`${this.getUrl()}/options/${t}/${o}`;try{const r=await Ce.Get({query:i});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(t){try{let o;const i=Ce.Get;t&&t.withCache?o=await Wo.TryGet(this.getUrl(),i):o=await i({query:this.getUrl()}),Array.isArray(o)?this.SetAll(o):this.SetAllWithCount(o)}catch(o){console.warn("GetAll failed:",o)}}async Get(t){try{t||(t=Et.Id()),this.Set(await Ce.Get({query:this.getUrl(t)}))}catch(o){console.warn("Get failed:",o)}}async GetBySlug(t){try{t||(t=Et.Slug()),this.Set(await z.H.HttpClient.Get({query:this.getUrl("by-slug/"+t)}))}catch(o){console.warn("GetBySlug failed:",o)}}async FTSP(t){var o;try{const r=((t==null?void 0:t.ftsp)??xt.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ce.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((o=a.data)==null?void 0:o.items);return}this.SetAllWithCount(a.data)}}catch(i){console.warn("FTSP failed:",i)}}async Create(t){try{const o=t??this.item,i={payload:o,query:this.getUrl()};return o.getFileInfos&&(i.fileInfos=o.getFileInfos()),await Ce.Post(i)}catch(o){console.warn("Create failed:",o)}}async CreateAndSet(t){const o=await this.Create(t);this.Set(o)}async CreateMany(t){if(!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Create(i)))}),Promise.all(o)}async Update(t){try{const o=t??this.item,i={query:this.getUrl(`${o.id}`),payload:o};return o.getFileInfos&&(i.fileInfos=o.getFileInfos(),i.fileInfos.forEach(r=>r.url="")),await Ce.Put(i)}catch(o){console.warn("Update failed:",o)}}async UpdateAndSet(t){const o=await this.Update(t);this.Set(o)}async UpdateAndReset(t){await this.Update(t??this.item),this.Set()}async Remove(t){if(t)try{await Ce.Delete({query:this.getUrl(`${t}`)}),this.RemoveItem(t)}catch(o){console.warn("Remove failed:",o)}}async UpdateMany(t){if(t||(t=this.items),!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Update(i)))}),Promise.all(o)}SetAll(t){this.items.splice(0,this.items.length),t&&this.items.push(...t.map(o=>new this.classConstructor(o)))}SetAllWithCount(t){this.SetAll(t.items),this.count.value=t.count}RemoveItem(t){const o=this.items.findIndex(i=>i.id===t);o<0||this.items.splice(o,1)}AppendToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.push(...o);return}this.items.push(new this.classConstructor(t))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){K.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.unshift(...o);return}this.items.unshift(new this.classConstructor(t))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(t=>z.H.Strings.SearchInFields(this.searchStr.value,t.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function xu(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const Eu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class Bu{static GetRandColor(t){return Dt.GetRandEL(t??Eu)}}function ea(n,t){const o=[],i=t||dt.Asc,r=i===dt.Asc?dt.Desc:dt.Asc;return Object.values(n).forEach(s=>{o.push(s(i)),o.push(s(r))}),o.length>0&&!o.some(s=>s.default)&&(o[0].default=!0),t&&o.forEach(s=>{s.default&&(s.default=s.order===t)}),o}let Nu=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Xn.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",To[Xn.FiveMinutes])}startDrag(t,o){this.draggedStartTime=t,this.draggedEndTime=o,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=To[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}};const Wi=n=>n===8||n===46,Vu=n=>n>46&&n<58,$u=n=>n>34&&n<41,Tu=n=>n+".",Pu=(n,t,o)=>{Wi(t)||$u(t)||(!Vu(t)||o>9)&&n.preventDefault()};function Mu(n,t){if(t>8){let o=n.substring(0,2).replace(".","1");Number(o)>31&&(o="31");let i=n.substring(3,5).replace(".","1");Number(i)>12&&(i="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=o+"."+i+"."+r}return n}function Iu(n){const t=n.keyCode;let o=n.srcElement.value;const i=o.length;Pu(n,t,i),!Wi(t)&&(i===2||i===5)&&(o=Tu(o));const r=n.srcElement.value+String.fromCharCode(n.which);if(Wi(t)){n.srcElement.value=o;return}o.length===0&&Number(r)>3&&(o="3",n.preventDefault()),o.length===1&&Number(r)>31&&(o="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(o=o.substring(0,3)+"12",n.preventDefault()),o=Mu(o,i),n.srcElement.value=o}const Ru=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Au="ru-RU";class jt{constructor(){d(this,"locale","ru-RU")}static Format(t,o){if(!t)return"";const i={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return o&&(i.year=o.year||o.year===void 0?o.year:i.year,i.month=o.month||o.month===void 0?o.month:i.month,i.day=o.day||o.day===void 0?o.day:i.day,i.hour=o.hour??i.hour,i.minute=o.minute??i.minute),Intl.DateTimeFormat(Au,i).format(new Date(t))}static FormatWithTime(t){return jt.Format(t,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetPeriod(t,o,i){return`${this.Format(t,i)}-${this.Format(o,i)}`}static GetShortDayName(t){return t?Ru[t.getDay()]:""}static GetCurrentWeekPeriod(t){const o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate()-o.getDay()+1),r=new Date(o.getFullYear(),o.getMonth(),i.getDate()+7);return this.GetPeriod(i,r,t||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(t,o){const i=new Date,r=new Date,s=jt.SplitHourTime(t),a=jt.SplitHourTime(o);return i.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-i.getTime())/1e3/60}static HourTimeinMunutes(t){const o=jt.SplitHourTime(t);return o[0]*60+o[1]}static SplitHourTime(t){const o=t.split(":");return[Number(o[0]),Number(o[1])]}static AddMinutesToHM(t,o){const i=new Date,r=jt.SplitHourTime(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return`${a}:${c}`}static GetMonthsDiff(t,o){return o.getMonth()-t.getMonth()+12*(o.getFullYear()-t.getFullYear())}static StringToDate(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetDateOrToday(t){return t?t.date:new Date}static InPeriod(t,o,i){return new Date(t)>=new Date(o)&&new Date(t)<=new Date(i)}static GetDatesFromPeriod(t,o){const i=[new Date(t)];let r=t;for(;r<=o;)r=jt.AddDays(r,1),i.push(r);return i}static AddDays(t,o){const i=new Date(t);return i.setDate(i.getDate()+o),i}static Eq(t,o){return t.getTime()===o.getTime()}}class zu{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(t){this.dragged=!0,t&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class ta{static Get(t){const o=t.split(".");return o[o.length-1]}}const Du=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function o(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){n(s,[a]);return}const l=c.split(",");l.push(a),n(s,l)}function i(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);n(s,l)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:o,removeFromFavourite:i,setFavourite:n,isFavourite:t,clearFavourite:r}})();class Fu{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=ea(t),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(t=>t.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const dn=new Fu;function Ou(){const n=e.ref(!1),t=e.ref(!1);return{confirmLeave:n,saveButtonClick:t,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!t.value?s():a()}}}const Lu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{z.F.FTSP.Get().reset(),dn.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:o}=Ou(),i=s=>nc.onBeforeRouteLeave((a,c,l)=>{o((s||r)(),l)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:i,submit:r}})();function na(n,t){const o=[];if(n)for(let i=0;i<Math.ceil(n.length/t);i++)o[i]=n.slice(i*t,i*t+t);return o}class Gi{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const t=Et.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select(0);return}const o=this.items.findIndex(i=>i.slug===t);o>-1&&this.Select(o)}static Create(t,o){const i=new Gi;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(this.items.length){if(t===void 0)return this.preSelect();this.idx=t,Et.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 hi=class hi{static Format(t){let o=t;if(!o)t=o;else{(o[0]==="7"||o[0]==="8")&&o.length!==1&&(o=o.slice(1));const i=o.replace(/\+7|[^\d]/g,""),r=i.length;switch(!0){case r===0:t="";break;case(r===1&&o.length===1&&i==="7"):case(r===1&&o.length===1&&i==="8"):t="+7 (";break;case r<4:t=`+7 (${i}`;break;case r<7:t=`+7 (${i.slice(0,3)}) ${i.slice(3)}`;break;case r<9:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}`;break;default:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}-${i.slice(8,10)}`;break}}return t}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(hi,"validatePhone",(t,o,i)=>{hi.getPhoneRegExp().test(o)||!o?i():i(new Error("Пожалуйста, введите корректный номер телефона"))});let Qi=hi;class _u{static Count(t){const o=t.filter(s=>s.rating!==0);let i=0;o.forEach(s=>i=i+s.rating);const r=i/o.length;return isNaN(r)?0:Number((i/o.length).toFixed(2))}}class Hu{static async Auth(t){t&&t()}static Dev(){}}class Uu{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",Xn.FiveMinutes);d(this,"timelines",To[Xn.FiveMinutes])}periodIsCorrect(t,o){return ie.GtOrEq(t,this.startHM)&&ie.GtOrEq(this.endHM,o)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=To[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(t,o,i,r){return r.filter(s=>s.id!==i).every(s=>!ie.PeriodsIntersects(t,o,s.startTime,s.endTime))}sortByStartTime(t){t.sort((o,i)=>ie.HMtoM(o.startTime)-ie.HMtoM(i.startTime))}}const vu=-68;function qu(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const o=document.querySelector(n),i=t??vu;let r=0;o&&(r=o.getBoundingClientRect().top+i+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class ju{static Sort(t){t.forEach((o,i)=>o.order=i)}}class Go{static Wait(t,o){return new Promise(i=>setTimeout(()=>i(o),t))}static WaitS(t,o){return Go.Wait(ie.S(t),o)}static WaitM(t,o){return Go.Wait(ie.M(t),o)}}const lo=n=>n===""||n===null||n===void 0||Array.isArray(n)&&n.length===0,Wu=Object.freeze(Object.defineProperty({__proto__:null,Compose:(...n)=>t=>{for(const o of n){const i=o(t);if(i!==!0)return i}return!0},Email:(n="Некорректный email")=>t=>lo(t)||/^\S+@\S+\.\S+$/.test(String(t))?!0:n,MaxLen:(n,t=`Максимум ${n} символов`)=>o=>lo(o)||String(o).length<=n?!0:t,MinLen:(n,t=`Минимум ${n} символов`)=>o=>lo(o)||String(o).length>=n?!0:t,Regex:(n,t="Некорректное значение")=>o=>lo(o)||n.test(String(o))?!0:t,Required:(n="Обязательное поле")=>t=>lo(t)?n:!0},Symbol.toStringTag,{value:"Module"})),Gu=n=>new Promise(t=>{if(document.querySelector(n))return t(document.querySelector(n));const o=new MutationObserver(()=>{document.querySelector(n)&&(o.disconnect(),t(document.querySelector(n)))});o.observe(document.body,{childList:!0,subtree:!0})});class Qo{constructor(t){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");K.BuildClass(this,t)}static Create(t,o,i,r){const s=new Qo;return s.id=qt(),s.chatId=t,s.message=i,s.userName=r,s}static CreatePingMessage(){const t=new Qo;return t.type="ping",t.id=qt(),t}isMessage(){return this.type==="message"||this.type===""}}const Qu="";class Yu{constructor(t="",o="",i="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);K.BuildClass(this,{endpoint:t,query:o,mutation:i}),this.connect(),this.ping()}send(t){!this.client||this.client.readyState!==1||this.client.send(t)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Qo.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,Qu.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 Xu=(re=class{},d(re,"Arrays",Dt),d(re,"Axios",ao),d(re,"BaseStore",Ne),d(re,"Cache",Wo),d(re,"Classes",K),d(re,"CarouselSwipe",xu),d(re,"Color",Bu),d(re,"CreateSortModels",ea),d(re,"Cursor",Nu),d(re,"DateMask",Iu),d(re,"Dates",jt),d(re,"Dragger",zu),d(re,"Extension",ta),d(re,"Favourite",Du),d(re,"Hooks",Lu),d(re,"HttpClient",Ce),d(re,"Id",Xe),d(re,"MakeCarousel",na),d(re,"Period",ki),d(re,"PhoneService",Qi),d(re,"Rating",_u),d(re,"Router",Et),d(re,"RouterGuard",Hu),d(re,"Scheduler",Uu),d(re,"Scroll",qu),d(re,"Sorter",ju),d(re,"Static",Bi),d(re,"Strings",Ee),d(re,"Time",ie),d(re,"Timer",Go),d(re,"Token",so),d(re,"Menus",Gi),d(re,"Validate",Wu),d(re,"WaitElement",Gu),d(re,"WebSocketClient",Yu),re);class Zu{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(t){this.curPage=t}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const oa=new Zu;var ia=(n=>(n.TableList="tableList",n.Default="",n))(ia||{}),Bt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Bt||{}),ra=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(ra||{}),sa=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(sa||{}),Yi=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Yi||{});const Ju=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:ia,Animations:Bt,CalendarScale:ra,LocalStoreKeys:ct,SocialTypes:sa,ValueRelation:Yi},Symbol.toStringTag,{value:"Module"}));let Ku=class{async Login(t=Oe.Form.GetValues()){const o=await Ce.Post({query:"auth/login",payload:t});if(!o)throw"Ошибка авторизации";Oe.Status.SetState(o)}async LoginAs(t){await Ce.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=Oe.Form.GetValues()){const o=await Ce.Post({query:"auth/register",payload:t});if(!o)throw o}async RestorePassword(t=Oe.Form.GetValues()){await Ce.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=Oe.Form.GetValues()){t.id=Et.GetStringParam("userId"),await Ce.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await Ce.Post({query:"auth/refresh-token",payload:{refreshToken:so.getRefreshToken()}})}async CheckUuid(t){await Ce.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await Ce.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await Ce.Get({query:`auth/email-is-confirm/${t}`})}};const ef=new Ku;var tf=Object.defineProperty,Yo=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&tf(t,o,r),r};const co=class Yl{constructor(t){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new Po]);d(this,"phones",[]);d(this,"websites",[]);K.BuildClass(this,t)}addEmail(){const t=Zn.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=rn.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Yl;return t.id=Xe.UUID(),t}removeEmail(t){K.RemoveFromClassById(t,this.emails)}removePhone(t){K.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Po)}addWebsite(){this.websites.push(new Ni)}pushFirst(){this.emails.length||this.emails.push(new Zn),this.phones.length||this.phones.push(new rn)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(t){this.description=t}updateTime(t){this.time=t}updateLatitude(t){this.latitude=t}updateLongitutde(t){this.longitude=t}};Yo([K.GetClassConstructor(Zn)],co.prototype,"emails"),Yo([K.GetClassConstructor(Po)],co.prototype,"postAddresses"),Yo([K.GetClassConstructor(rn)],co.prototype,"phones"),Yo([K.GetClassConstructor(Ni)],co.prototype,"websites");let nf=co,of=class extends Ne{constructor(){super(nf,"contacts")}};const rf=new of;let sf=class extends Ne{constructor(){super(Zn,"emails")}};const af=new sf;class Xi{constructor(t){d(this,"id");d(this,"ftsp");d(this,"name","");K.BuildClass(this,t)}static Create(t){const o=new Xi;return o.id=Xe.UUID(),o.ftsp=JSON.stringify(t),o}}let lf=class extends Ne{constructor(){super(Xi,"ftsp-presets")}};const cf=new lf;let df=class extends Ne{constructor(){super(cs,"humans")}};const uf=new df;let ff=class extends Ne{constructor(){super(rn,"phones")}};const mf=new ff;class hf{constructor(t){d(this,"id");d(this,"nameRus","");K.BuildClass(this,t)}}var pf=Object.defineProperty,gf=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&pf(t,o,r),r};class aa{constructor(t){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);K.BuildClass(this,t)}}gf([K.GetClassConstructor(hf)],aa.prototype,"fields");let yf=class extends Ne{constructor(){super(aa,"schemas")}};const wf=new yf;class la{constructor(t){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);K.BuildClass(this,t)}}class bf{constructor(t){d(this,"id");d(this,"name","");d(this,"label","");K.BuildClass(this,t)}}var Cf=Object.defineProperty,ca=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Cf(t,o,r),r};class zn{constructor(t){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);K.BuildClass(this,t)}}ca([K.GetClassConstructor(la)],zn.prototype,"options"),ca([K.GetClassConstructor(bf)],zn.prototype,"searchGroupMetaColumns");class Zi{constructor(t){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new zn);d(this,"searchObjects",[]);d(this,"pagination",new Ro);d(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(o=>new zn(o))),t.searchGroup&&(this.searchGroup=new zn(t.searchGroup)),t.options&&(this.options=t.options.map(o=>new la(o))),this.count=t.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(t){const o=this.searchGroups.find(i=>i.id===t);o?this.searchGroup=o:this.searchGroup=new zn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Et.Route().query.groupId)}setQuery(){const t=Et.Route().query.query;t&&(this.query=t)}}let Sf=class{constructor(){d(this,"isSearchDrawerOpen",e.ref(!1));d(this,"searchModel",e.reactive(new Zi));d(this,"searchGroups",e.reactive([]));d(this,"count",0)}async Search(t){const o=await Ce.Get({query:`search?key=${t.key}&query=${t.query}`});o&&o.searchGroup&&o.searchGroup.options.forEach(i=>{t.searchObjects.push({id:i.id,value:i.value,label:i.label,description:i.description})})}async mainSearch(t){this.SetSearchModel(await Ce.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(i=>{i.options=[]});const o=await Ce.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(o),o}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Zi}SetSearchModel(t){t&&(this.searchModel=new Zi(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Ji=new Sf;let kf=class extends Ne{constructor(){super(Mo,"users-accounts")}};const xf=new kf;var We=(n=>(n.String="string",n.Text="text",n.Number="number",n.Date="date",n.DateTime="dateTime",n.Radio="radio",n.Set="set",n.Boolean="boolean",n.Files="files",n.File="file",n.MatrixRadio="matrixRadio",n.MatrixSet="matrixSet",n))(We||{});class da{constructor(t){d(this,"id");d(this,"name",We.String);d(this,"valueRelation",Yi.simple);K.BuildClass(this,t)}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 Ef=class extends Ne{constructor(){super(da,"value-types")}};const Bf=new Ef;let ua=(at=class{},d(at,"Auth",ef),d(at,"Contacts",rf),d(at,"Emails",af),d(at,"FileInfos",new Ne(kt,"file-infos")),d(at,"FTSPPresets",cf),d(at,"Humans",uf),d(at,"Phones",mf),d(at,"Schemas",wf),d(at,"UserAccounts",xf),d(at,"ValueTypes",Bf),d(at,"Search",Ji),at);var Wt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(Wt||{});let Nf=(Xt=class{},d(Xt,"Orders",dt),d(Xt,"Sizes",Wt),d(Xt,"Statuses",pe),d(Xt,"DataTypes",Re),d(Xt,"ValueTypes",We),d(Xt,"Operators",Be),Xt);class Vf{constructor(){d(this,"title","");d(this,"buttons",[]);d(this,"editTitle",e.ref(!1));d(this,"showEdit",e.ref(!1))}Set(t="",o){typeof t=="function"?this.title=t():typeof t=="string"?this.title=t:this.title=t.value,this.buttons=o}}const $f=new Vf;class Tf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var o;return Ee.SearchIn(t.name,this.filterString)||((o=t.children)==null?void 0:o.some(i=>Ee.SearchIn(i.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(t){this.path=t}GetPath(){return this.path}SetFilter(t){this.filterString=t}GetChildren(t){var o;return this.filterString?(o=t.children)==null?void 0:o.filter(i=>Ee.SearchIn(i.name,this.filterString)):t.children}}const Pf=new Tf;class Mf{constructor(){d(this,"Menu",e.reactive(Pf));d(this,"Head",e.reactive($f))}}const If=new Mf,fa="Да",ma="Нет";class Rf extends Nn{constructor(){super(...arguments);d(this,"confirmButtonText",fa);d(this,"cancelButtonText",ma);d(this,"persistent",!0);d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(o){const i=typeof o=="string"?{text:o}:o;return this.confirmButtonText=i.confirmButtonText??fa,this.cancelButtonText=i.cancelButtonText??ma,this.persistent=i.persistent??!0,super.showMessage(i,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof E.Dialog.create!="function"){console.warn("[sprof] Quasar Dialog plugin is not installed. Add `app.use(Quasar, { plugins: { Dialog } })` (imported from 'quasar') to your app."),this.Settle(()=>s({type:"cancel"}));return}const a=E.Dialog.create({title:this.title||void 0,message:this.text,html:Nn.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var o;return(o=this.resolve)==null?void 0:o.call(this,!0)})}Cancel(){this.Settle(()=>{var o;return(o=this.reject)==null?void 0:o.call(this)})}Settle(o){o==null||o(),this.resolve=void 0,this.reject=void 0}}const Af=new Rf;class zf{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class Df extends zf{Show(){super.show()}Hide(){super.hide()}}const Ff=new Df;class Gt{}d(Gt,"Admin",If),d(Gt,"Dialog",Af),d(Gt,"Loading",Ff),d(Gt,"Notify",Vn),d(Gt,"Btn",on),d(Gt,"Input",ts);class z{}d(z,"Auth",e.reactive(Oe)),d(z,"UI",e.reactive(Gt)),d(z,"Paginator",e.reactive(oa)),d(z,"S",ua),d(z,"H",Xu),d(z,"C",Sc),d(z,"T",Nf),d(z,"I",Ju),d(z,"F",Nc);const uo=e.defineComponent({inheritAttrs:!1,__name:"PBadge",props:{label:{type:[String,Number],default:void 0},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},floating:{type:Boolean,default:!1},multiLine:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1}},setup(n){const t=e.useAttrs(),o=e.computed(()=>{const i={};for(const r of Object.keys(t))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(i[r]=t[r]);return i});return(i,r)=>(e.openBlock(),e.createBlock(e.unref(E.QBadge),e.mergeProps(e.unref(o),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),ne=e.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:Wt.M,required:!1},type:{type:String,default:pe.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const t=n,o=e.useAttrs(),i=e.computed(()=>{const C={};for(const T of Object.keys(o))["disable","color","size","flat","outline","unelevated","type"].includes(T)||(C[T]=o[T]);return C}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),c=e.computed(()=>s.value?pe.Primary:t.type),l=e.computed(()=>{const C={};return t.margin&&(C.margin=t.margin),t.padding&&(C.padding=t.padding),t.width&&(C.maxWidth=t.width,C.minWidth=t.width),t.height&&(C.minHeight=t.height,C.maxHeight=t.height),t.fontSize&&(C.fontSize=t.fontSize),C}),u={[pe.Primary]:"primary",[pe.Success]:"positive",[pe.Warning]:"warning",[pe.Error]:"negative",[pe.Info]:"info"},f=e.computed(()=>o.color!==void 0?o.color:u[c.value]??"primary"),m={[Wt.XS]:"xs",[Wt.S]:"sm",[Wt.M]:"md",[Wt.L]:"lg",[Wt.XL]:"xl"},p=e.computed(()=>o.size!==void 0?o.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:m[t.size]??"md"),S=e.computed(()=>o.flat!==void 0?o.flat:["text","pag","text_ano"].includes(t.skin)),x=e.computed(()=>o.outline!==void 0?o.outline:t.skin==="invert"),N=e.computed(()=>o.unelevated!==void 0?o.unelevated:t.skin==="base"),V=e.computed(()=>o.disable??t.disabled);return(C,T)=>(e.openBlock(),e.createBlock(e.unref(E.QBtn),e.mergeProps(e.unref(i),{style:e.unref(l),color:e.unref(f),size:e.unref(p),flat:e.unref(S),outline:e.unref(x),unelevated:e.unref(N),disable:e.unref(V),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Of=["innerHTML"],Lf={key:1},Ki=D(e.defineComponent({__name:"PString",props:{string:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},fontSize:{type:String,required:!1,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(n){const t=n,o={color:t.color||void 0,fontSize:t.fontSize||void 0,fontWeight:t.fontWeight||void 0,background:t.background||void 0,padding:t.padding||void 0,width:t.width||void 0,maxWidth:t.width||void 0,minWidth:t.minWidth||void 0,margin:t.margin||void 0,justifyContent:t.justifyContent||void 0};return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["string",n.customClass]),style:o,onClick:r[0]||(r[0]=s=>i.$emit("click"))},[e.createVNode(e.unref(E.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,Of)):(e.openBlock(),e.createElementBlock("span",Lf,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),nt=D(e.defineComponent({inheritAttrs:!1,__name:"PTooltip",props:{tooltipText:{type:String,default:void 0,required:!1},timeout:{type:Number,default:0,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(n){const t=n,o=e.useAttrs(),i=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="delay"&&(l[u]=o[u]);return l}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${l}`}),a=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${l}`}),c=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(l,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(i),{class:"tooltip-wrapper"}),[e.renderSlot(l.$slots,"default",{},void 0,!0),e.createVNode(e.unref(E.QTooltip),{delay:n.timeout,anchor:e.unref(s),self:e.unref(a),class:"tooltip-box",style:e.normalizeStyle(e.unref(c))},{default:e.withCtx(()=>[e.createVNode(Ki,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(e.openBlock(),e.createBlock(e.unref(E.QTooltip),e.mergeProps({key:1},e.unref(i),{delay:n.timeout,class:"tooltip-box"}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),Nt={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},Ze=D(e.defineComponent({inheritAttrs:!1,__name:"PInput",props:e.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},width:{type:String,required:!1,default:""},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"modelValue"),s=e.useAttrs(),a=e.computed(()=>typeof s.id=="string"?s.id:void 0),c=e.computed(()=>{const y={};for(const b of Object.keys(s))b!=="id"&&b!=="disable"&&(y[b]=s[b]);return y}),l=n,u=e.computed(()=>s.disable??l.disabled),f=e.ref(null);function m(){var y;(y=f.value)==null||y.focus()}function p(){var y;(y=f.value)==null||y.blur()}function S(){var y;(y=f.value)==null||y.select()}function x(){var y;return(y=f.value)==null?void 0:y.getNativeElement()}async function N(){var y;return await((y=f.value)==null?void 0:y.validate())??!0}function V(){var y;(y=f.value)==null||y.resetValidation()}t({focus:m,blur:p,select:S,getNativeElement:x,validate:N,resetValidation:V});const C=()=>{i("input",r.value)},T=e.computed(()=>{const y={};return l.margin&&(y.margin=l.margin),l.padding&&(y.padding=l.padding),l.width&&(y.width=l.width),l.borderColor&&(y["--p-border-color"]=l.borderColor),y});return(y,b)=>(e.openBlock(),e.createBlock(e.unref(E.QInput),e.mergeProps({ref_key:"input",ref:f,modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=$=>r.value=$)},e.unref(c),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(u),rules:n.rules,"input-style":{color:n.color||void 0},style:e.unref(T),class:"p-input",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":C,onBlur:b[1]||(b[1]=$=>y.$emit("blur",r.value)),onFocus:b[2]||(b[2]=$=>y.$emit("focus",r.value)),onClear:b[3]||(b[3]=$=>y.$emit("clear"))}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(y.$slots,"before",{},()=>[e.renderSlot(y.$slots,"default",{},void 0,!0)],!0)]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append",{},()=>[e.renderSlot(y.$slots,"right",{},void 0,!0)],!0)]),_:2},[y.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,y.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,y.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,y.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,y.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,y.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,y.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","input-style","style"]))}}),[["__scopeId","data-v-661f4aa7"]]),un=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:{modelValue:{type:Boolean,default:!1,required:!1},persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},emits:["update:modelValue"],setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.ref(i.modelValue);e.watch(()=>i.modelValue,p=>{s.value=p},{immediate:!0});const a=p=>{s.value=p,r("update:modelValue",p)};t({show:()=>a(!0),hide:()=>a(!1),toggle:()=>a(!s.value),opened:s});const f=e.useAttrs(),m=e.computed(()=>{const p={};for(const S of Object.keys(f))["modelValue","persistent","maximized","transition-show","transition-hide","onUpdate:modelValue"].includes(S)||(p[S]=f[S]);return p});return(p,S)=>(e.openBlock(),e.createBlock(e.unref(E.QDialog),e.mergeProps({modelValue:e.unref(s),"onUpdate:modelValue":S[0]||(S[0]=x=>e.isRef(s)?s.value=x:null)},e.unref(m),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide,"onUpdate:modelValue":a}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[p.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"title")]),key:"0"}:void 0,p.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"header")]),key:"1"}:void 0,p.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"body")]),key:"2"}:void 0,p.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),_f={class:"q-mb-md"},Hf={class:"text-subtitle1 text-weight-medium text-grey-9"},Uf={class:"text-caption text-grey-6 q-mt-xs"},fo=e.defineComponent({__name:"PContactFormDeleteDialog",props:e.mergeModels({title:{type:String,default:"Удалить элемент?"},subtitle:{type:String,default:"Это действие нельзя отменить."},loading:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["confirm"],["update:modelValue"]),setup(n){const t=E.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(un,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",_f,[e.createVNode(e.unref(E.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",Hf,e.toDisplayString(n.title),1),e.createElementVNode("div",Uf,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(E.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),vf={class:"q-mr-md"},qf={class:"text-subtitle1 text-weight-medium text-grey-9"},mo=e.defineComponent({__name:"PContactFormEditDialog",props:e.mergeModels({icon:{type:String,default:"edit"},title:{type:String,default:"Редактирование"},saving:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["save"],["update:modelValue"]),setup(n){const t=E.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(un,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",vf,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",qf,e.toDisplayString(n.title),1),e.createVNode(e.unref(E.QSpace)),e.withDirectives(e.createVNode(ne,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[e.unref(t)]])]),_:1}),e.createVNode(e.unref(E.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(E.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"]))}}),jf={class:"q-mt-sm"},Wf={class:"row items-center justify-between q-mb-xs q-px-xs"},Gf={class:"row items-center q-gutter-xs"},Qf={class:"text-uppercase text-caption text-weight-medium text-grey-7"},Yf={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},Xf={style:{"min-width":"0"}},Zf={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},Jf={key:0,class:"text-caption text-grey-6 ellipsis"},Kf={class:"row items-center no-wrap q-gutter-xs"},em={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},tm={class:"text-body2 text-grey-7"},fn=D(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Nt,...t.labels})),i=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),p=e.ref(!1),S=e.ref(-1),x=async b=>{b&&(await navigator.clipboard.writeText(b),z.UI.Notify.Success(o.value.copiedEmail))},N=b=>{var $,R;s.value=b,a.value=i.value[b],c.value=t.adapter.emailValue(i.value[b]),l.value=((R=($=t.adapter).emailDescription)==null?void 0:R.call($,i.value[b]))??"",r.value=!0},V=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(o.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:c.value,description:l.value}),await t.adapter.updateEmail(a.value),r.value=!1,z.UI.Notify.Success(o.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},C=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),N(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},T=b=>{S.value=b,p.value=!0},y=async()=>{var b,$;m.value=!0;try{const R=i.value[S.value];await t.adapter.removeEmail(($=(b=t.adapter).emailId)==null?void 0:$.call(b,R)),i.value.splice(S.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(b,$)=>(e.openBlock(),e.createElementBlock("div",jf,[e.createElementVNode("div",Wf,[e.createElementVNode("div",Gf,[e.createVNode(e.unref(E.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",Qf,e.toDisplayString(e.unref(o).emailsTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(uo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:C},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(R,j)=>{var se,ze,Te,Ve,Ke,ht;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).emailId)==null?void 0:ze.call(se,R))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",b.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",Yf,[e.createVNode(e.unref(E.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",Xf,[e.createElementVNode("div",Zf,e.toDisplayString(n.adapter.emailValue(R)),1),(Ve=(Te=n.adapter).emailDescription)!=null&&Ve.call(Te,R)?(e.openBlock(),e.createElementBlock("div",Jf,e.toDisplayString((ht=(Ke=n.adapter).emailDescription)==null?void 0:ht.call(Ke,R)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Kf,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>x(n.adapter.emailValue(R))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[4]||($[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>N(j)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[5]||($[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>T(j)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[6]||($[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",em,[e.createVNode(e.unref(E.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",tm,e.toDisplayString(e.unref(o).noEmails),1),$[7]||($[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(ne,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:C},null,8,["loading"])])),e.createVNode(mo,{modelValue:e.unref(r),"onUpdate:modelValue":$[2]||($[2]=R=>e.isRef(r)?r.value=R:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:V},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":$[0]||($[0]=R=>e.isRef(c)?c.value=R:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[R=>!!R||e.unref(o).enterEmail,R=>!R||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(R)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(E.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":$[1]||($[1]=R=>e.isRef(l)?l.value=R:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(E.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(fo,{modelValue:e.unref(p),"onUpdate:modelValue":$[3]||($[3]=R=>e.isRef(p)?p.value=R:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:y},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),nm={class:"q-mt-sm"},om={class:"row items-center justify-between q-mb-xs q-px-xs"},im={class:"row items-center q-gutter-xs"},rm={class:"text-uppercase text-caption text-weight-medium text-grey-7"},sm={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},am={style:{"min-width":"0"}},lm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},cm={key:0,class:"text-caption text-grey-6 ellipsis"},dm={class:"row items-center no-wrap q-gutter-xs"},um={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},fm={class:"text-body2 text-grey-7"},mn=D(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Nt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),p=e.ref(!1),S=e.ref(-1),x=async b=>{b&&(await navigator.clipboard.writeText(b),z.UI.Notify.Success(o.value.copiedNumber))},N=b=>{var $,R;s.value=b,a.value=i.value[b],c.value=t.adapter.phoneNumber(i.value[b]),l.value=((R=($=t.adapter).phoneDescription)==null?void 0:R.call($,i.value[b]))??"",r.value=!0},V=async()=>{if(!a.value||!c.value){z.UI.Notify.Warning(o.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:c.value,description:l.value}),await t.adapter.updatePhone(a.value),r.value=!1,z.UI.Notify.Success(o.value.saved)}catch{z.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},C=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),N(i.value.length-1)}catch{z.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},T=b=>{S.value=b,p.value=!0},y=async()=>{var b,$;m.value=!0;try{const R=i.value[S.value];await t.adapter.removePhone(($=(b=t.adapter).phoneId)==null?void 0:$.call(b,R)),i.value.splice(S.value,1),p.value=!1,z.UI.Notify.Success(o.value.deleted)}catch{z.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(b,$)=>(e.openBlock(),e.createElementBlock("div",nm,[e.createElementVNode("div",om,[e.createElementVNode("div",im,[e.createVNode(e.unref(E.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",rm,e.toDisplayString(e.unref(o).phonesTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(uo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:C},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(R,j)=>{var se,ze,Te,Ve,Ke,ht;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).phoneId)==null?void 0:ze.call(se,R))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",b.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",sm,[e.createVNode(e.unref(E.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",am,[e.createElementVNode("div",lm,e.toDisplayString(n.adapter.phoneNumber(R)),1),(Ve=(Te=n.adapter).phoneDescription)!=null&&Ve.call(Te,R)?(e.openBlock(),e.createElementBlock("div",cm,e.toDisplayString((ht=(Ke=n.adapter).phoneDescription)==null?void 0:ht.call(Ke,R)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",dm,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>x(n.adapter.phoneNumber(R))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[4]||($[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>N(j)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[5]||($[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>T(j)},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...$[6]||($[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",um,[e.createVNode(e.unref(E.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",fm,e.toDisplayString(e.unref(o).noPhones),1),$[7]||($[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(ne,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:C},null,8,["loading"])])),e.createVNode(mo,{modelValue:e.unref(r),"onUpdate:modelValue":$[2]||($[2]=R=>e.isRef(r)?r.value=R:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:V},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Ze,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":$[0]||($[0]=R=>e.isRef(c)?c.value=R:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[R=>!!R||e.unref(o).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(E.QIcon),{name:"phone",color:"primary"})]),_:1},8,["modelValue","mask","rules"])):e.createCommentVNode("",!0),e.unref(a)&&e.unref(s)>=n.presetted?(e.openBlock(),e.createBlock(Ze,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":$[1]||($[1]=R=>e.isRef(l)?l.value=R:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(E.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(fo,{modelValue:e.unref(p),"onUpdate:modelValue":$[3]||($[3]=R=>e.isRef(p)?p.value=R:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:y},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),mm={class:"row items-center q-gutter-sm"},hm={class:"text-weight-medium text-grey-9"},pm=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:Nt.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Nt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.computed(()=>t.adapter.emails(t.contact)),s=e.computed(()=>t.adapter.copyAll(t.contact)),a=e.ref(!1),c=()=>{a.value=!a.value},l=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),z.UI.Notify.Success(o.value.copied))};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(E.QCard),{flat:"",bordered:"",class:"contact-form-card",style:e.normalizeStyle({margin:n.margin})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"row items-center cursor-pointer q-py-sm q-px-md bg-grey-1",onClick:c},[e.createElementVNode("div",mm,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:e.unref(a)?"keyboard_arrow_right":"keyboard_arrow_down",size:"sm",color:"grey-6"},null,8,["icon"]),e.createVNode(e.unref(E.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",hm,e.toDisplayString(n.title),1),e.unref(i).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(uo,{key:0,outline:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length+e.unref(r).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(E.QSpace)),e.createElementVNode("div",{class:"row items-center q-gutter-xs",onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},[e.unref(s)?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",dense:"",round:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:l},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(E.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(E.QSeparator)),e.createVNode(e.unref(E.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(E.QSeparator),{class:"q-my-sm"}),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"])]),_:1})],512),[[e.vShow,!e.unref(a)]])]),_:1})]),_:1},8,["style"]))}}),er=D(pm,[["__scopeId","data-v-327b9235"]]),gm={class:"contact-edit-wrapper"},tr=D(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Nt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",gm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"edit-sections-divider"},null,-1)),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),ym={class:"edit-emails-wrapper"},nr=D(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Nt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",ym,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),wm={class:"edit-phones-wrapper"},or=D(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...Nt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",wm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-59e80623"]]),bm={class:"contact-view-wrapper"},ir=D(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...Nt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",bm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"view-sections-divider"},null,-1)),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function ha(n){n.component("PContactForm",er),n.component("PContactFormDeleteDialog",fo),n.component("PContactFormEdit",tr),n.component("PContactFormEditDialog",mo),n.component("PContactFormEditEmails",nr),n.component("PContactFormEditPhones",or),n.component("PContactFormView",ir),n.component("PContactFormViewEmails",fn),n.component("PContactFormViewPhones",mn)}const Cm=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:er,PContactFormDeleteDialog:fo,PContactFormEdit:tr,PContactFormEditDialog:mo,PContactFormEditEmails:nr,PContactFormEditPhones:or,PContactFormView:ir,PContactFormViewEmails:fn,PContactFormViewPhones:mn,default:ha,defaultContactsLabels:Nt},Symbol.toStringTag,{value:"Module"}));class hn{constructor(t){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);z.H.Classes.BuildClass(this,t)}static Create(t){const o=new hn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}class pa{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");z.H.Classes.BuildClass(this,t)}}class rr{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);z.H.Classes.BuildClass(this,t)}}class Dn{constructor(t){d(this,"id");d(this,"name","");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Dn;return o.id=z.H.Id.UUID(),o.fieldId=t,o}}var Sm=Object.defineProperty,ho=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Sm(t,o,r),r};const pn=class wi{constructor(t){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new da);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);z.H.Classes.BuildClass(this,t),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(t=>!t.isMatrixY)}getMatrixY(){return this.answerVariants.filter(t=>t.isMatrixY)}static Create(t){const o=new wi;return o.id=z.H.Id.UUID(),o.formSectionId=t,o}getRegisterPropertyRadioOriginalValue(t){const o=this.answerVariants.find(i=>i.id===t);return o?o.name:""}addRadioItem(t){const o=new hn(t);o.order=this.answerVariants.length,this.answerVariants.push(o)}removeRadioItem(t){const o=this.answerVariants[t].id;o&&this.answerVariantsForDelete.push(o),this.answerVariants.splice(t,1)}changeRelation(t){const o=t.find(i=>i.id===this.valueTypeId);if(o){if(o.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(o.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=o}}editRegisterProperty(t){this.isEdit=t??!this.isEdit}sortExamples(){this.fieldExamples.forEach((t,o)=>t.order=o)}addRegisterPropertyMeasure(t){this.fieldMeasures.push(new rr(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new Dn)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(t){this.valueType=t,this.valueTypeId=t.id}setName(t){this.name=t}addAnswerVariant(){const t=hn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=wi.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=Dn.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new wi(this);return t.id=z.H.Id.UUID(),t.answerVariants.forEach(o=>{o.id=z.H.Id.UUID(),o.fieldId=t.id}),t.children=t.children.map(o=>{const i=o.copy();return i.parentId=t.id,i}),t}};ho([z.H.Classes.GetClassConstructor(hn)],pn.prototype,"answerVariants"),ho([z.H.Classes.GetClassConstructor(pa)],pn.prototype,"fieldExamples"),ho([z.H.Classes.GetClassConstructor(Dn)],pn.prototype,"fieldVariants"),ho([z.H.Classes.GetClassConstructor(rr)],pn.prototype,"fieldMeasures"),ho([z.H.Classes.GetClassConstructor(pn)],pn.prototype,"children");let Xo=pn;class sr{constructor(t){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new kt);z.H.Classes.BuildClass(this,t)}}class gn{constructor(t){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");z.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new gn;return i.id=qt(),i.fieldFillId=t,i.answerVariantId=o,i}static GetClassName(){return"selectedAnswerVariant"}}var km=Object.defineProperty,ga=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&km(t,o,r),r};const ar=class Kr{constructor(t){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new kt);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);z.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,o){const i=new Kr;return i.id=qt(),i.fieldId=t.id,i.formFillId=o,i.order=t.order,i.valueNumber=0,i.valueString="",i.valueDate=new Date,i}setString(t){this.valueString=t,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(t){this.valueNumber=t,this.valueNumber&&(this.filled=!0)}setOther(t){this.valueOther=t,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(t){this.valueDate=t,this.filled=!0}setRadio(t){this.answerVariantId=t,this.filled=!!this.answerVariantId}static CreateMany(t,o){return t.map(i=>Kr.Create(i,o))}addFile(){const t=new sr;return t.id=qt(),t.answerId=this.id,this.answerFiles.push(t),t}getFileInfos(){const t=[];return this.answerFiles.forEach(o=>t.push(o.fileInfo)),t}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(t,o){const i=gn.Create(this.id,t);return i.answerVariantIdY=o,this.selectedAnswerVariants.push(i),this.filled=!0,i}getMatrixValue(t,o){return this.selectedAnswerVariants.find(i=>i.answerVariantId===t&&i.answerVariantIdY===o)}addSelectedAnswerVariant(t){const o=gn.Create(this.id,t);return this.selectedAnswerVariants.push(o),this.filled=!0,o}static GetClassName(){return"answer"}showOther(t){const o=t.find(i=>i.showOther);return o?this.answerVariantId===o.id||this.selectedAnswerVariants.some(i=>i.answerVariantId===o.id):!1}};ga([z.H.Classes.GetClassConstructor(gn)],ar.prototype,"selectedAnswerVariants"),ga([z.H.Classes.GetClassConstructor(sr)],ar.prototype,"answerFiles");let Fn=ar;class xm{constructor(t){d(this,"id");d(this,"fieldId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var Em=Object.defineProperty,Bm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Em(t,o,r),r};const ya=class Xl{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");z.H.Classes.BuildClass(this,t)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(t){return`${this.getN()}.${t+1}`}getSubFieldN(t,o){return`${this.getFieldN(t)}.${o+1}`}static Create(t){const o=new Xl;return o.id=z.H.Id.UUID(),o.formId=t,o}addField(){const t=Xo.Create(this.id);return this.fields.push(t),this.sortFields(),t}sortFields(){this.fields.forEach((t,o)=>t.order=o)}getAnswerVariants(){const t=[];return this.fields.forEach(o=>t.push(...o.answerVariants)),t}};Bm([z.H.Classes.GetClassConstructor(Xo)],ya.prototype,"fields");let Zo=ya;var Nm=Object.defineProperty,Vm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Nm(t,o,r),r};const wa=class Zl{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);z.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new Zl;return t.id=z.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Zo.Create(this.id);return this.formSections.push(t),z.H.Sorter.Sort(this.formSections),t}getFields(){const t=this.formSections.map(i=>i.fields).flat(),o=t.map(i=>i.children).flat();return t.concat(o).filter(i=>i.children.length===0)}};Vm([z.H.Classes.GetClassConstructor(Zo)],wa.prototype,"formSections");let ba=wa;var $m=Object.defineProperty,Tm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&$m(t,o,r),r};const Ca=class Jl{constructor(t){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Jl;return o.id=z.H.Id.UUID(),o.formId=t.id,o.fieldFills.push(...Fn.CreateMany(t.getFields(),o.id)),o}addFieldFill(t){this.fieldFills.push(t)}getFieldFill(t){var o;return(o=this.fieldFills)==null?void 0:o.find(i=>i.fieldId===t)}pushRegisterProperty(t){const o=new Fn;o.researchResultId=t,this.fieldFills.push(o)}getRegisterPropertyToPatient(t){return this.fieldFills.filter(o=>o.researchResultId===t)}getOrCreateFieldFill(t){let o=this.getFieldFill(t.id);return o||(o=Fn.Create(t),this.addFieldFill(o)),o}getFileInfos(){const t=[];return this.fieldFills.forEach(o=>t.push(...o.getFileInfos())),t}calculateFilling(){const t=this.fieldFills.filter(i=>i.filled).length,o=this.fieldFills.length;this.fillingPercentage=Math.round(t/o*100)}getFieldFillByFieldId(t){return this.fieldFills.find(o=>o.fieldId===t)}getFieldVariantFieldFill(t){return this.fieldFills.find(o=>o.answerVariantId===t)}getFieldsFieldFillsMap(t){const o={};return t.forEach(i=>{var r;if(i.code){const s=(r=this.getFieldFillByFieldId(i.id))==null?void 0:r.valueNumber;o[i.code]=s}}),o}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};Tm([z.H.Classes.GetClassConstructor(Fn)],Ca.prototype,"fieldFills");let Sa=Ca;const Pm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:hn,Field:Xo,FieldExample:pa,FieldFill:Fn,FieldFillFile:sr,FieldFilter:xm,FieldMeasure:rr,FieldVariant:Dn,Form:ba,FormFill:Sa,FormSection:Zo,SelectedAnswerVariant:gn},Symbol.toStringTag,{value:"Module"}));let Mm=class extends Ne{constructor(){super(hn,"answer-variants")}};const Im=new Mm;let Rm=class extends Ne{constructor(){super(Fn,"field-fills")}};const Am=new Rm;let zm=class extends Ne{constructor(){super(Xo,"fields")}};const Dm=new zm;let Fm=class extends Ne{constructor(){super(Sa,"form-fills")}};const Om=new Fm;let Lm=class extends Ne{constructor(){super(Zo,"form-sections")}};const _m=new Lm;let Hm=class extends Ne{constructor(){super(ba,"forms")}};const Um=new Hm;let vm=class extends Ne{constructor(){super(gn,"selected-answer-variants")}};const qm=new vm,jm=Object.freeze(Object.defineProperty({__proto__:null,C:Pm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:Im,FieldFills:Am,Fields:Dm,FormFills:Om,FormSections:_m,Forms:Um,SelectedAnswerVariants:qm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Jo{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"selected",!1);d(this,"hide",!1);d(this,"editMode",!1);d(this,"color","");d(this,"background","");d(this,"order",0);d(this,"menuId");d(this,"iconId");d(this,"icon",new kt);d(this,"iconName","");d(this,"svgCode","");K.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var Wm=Object.defineProperty,Gm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Wm(t,o,r),r};class lr{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"top",!0);d(this,"side",!0);d(this,"show",!1);d(this,"hide",!1);d(this,"active",!1);d(this,"order",0);d(this,"selected",!1);d(this,"editMode",!1);d(this,"subMenus",[]);d(this,"subMenusForDelete",[]);d(this,"iconId");d(this,"icon",new kt);K.BuildClass(this,t)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const t=[];return t.push(this.icon),this.subMenus.forEach(o=>{t.push(o.icon)}),t}addFile(t){this.icon.id||(this.icon.id=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Jo)}removeSubMenu(t){const o=this.subMenus[t].id;o&&this.subMenusForDelete.push(o),this.subMenus.splice(t,1)}setColorsForSubMenus(){const t=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let o=0;this.subMenus.forEach(i=>{i.color=t[o],o=t.length-1?o=0:o++})}containPath(t){return this.link===t||!!this.subMenus.find(o=>o.link===t)}static GetClassName(){return"menu"}}Gm([K.GetClassConstructor(Jo)],lr.prototype,"subMenus");const Qm=Object.freeze(Object.defineProperty({__proto__:null,Menu:lr,SubMenu:Jo},Symbol.toStringTag,{value:"Module"}));let Ym=class extends z.H.BaseStore{constructor(){super(lr,"menus")}};const Xm=new Ym;let Zm=class extends z.H.BaseStore{constructor(){super(Jo,"sub-menus")}};const Jm=new Zm,Km=Object.freeze(Object.defineProperty({__proto__:null,C:Qm,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:Xm,SubMenus:Jm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ft{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"sessionId");d(this,"payload",{});z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Ft;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}}var eh=Object.defineProperty,th=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&eh(t,o,r),r};const ka=class Kl{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t){const o=new Kl;return o.id=z.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}};th([z.H.Classes.GetClassConstructor(Ft)],ka.prototype,"slots");let On=ka;var nh=Object.defineProperty,xa=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&nh(t,o,r),r};const cr=class ec{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"scheduleDayId");d(this,"placeId");d(this,"sessions",[]);d(this,"slots",[]);z.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new ec;return i.id=z.H.Id.UUID(),i.placeId=t,i.scheduleDayId=o,i}addSession(){const t=On.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Ft.Create(this.id);return this.slots.push(t),t}};xa([z.H.Classes.GetClassConstructor(On)],cr.prototype,"sessions"),xa([z.H.Classes.GetClassConstructor(Ft)],cr.prototype,"slots");let po=cr;var oh=Object.defineProperty,ih=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&oh(t,o,r),r};const Ea=class tc{constructor(t){d(this,"id");d(this,"date",new Date(0));d(this,"description","");d(this,"ownerId");d(this,"ownerType","");d(this,"schedules",[]);z.H.Classes.BuildClass(this,t)}static Create(t,o,i=new Date){const r=new tc;return r.id=z.H.Id.UUID(),r.ownerId=t,r.ownerType=o||"",r.date=i,r}};ih([z.H.Classes.GetClassConstructor(po)],Ea.prototype,"schedules");let Ko=Ea;class Ln{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"color","");z.H.Classes.BuildClass(this,t)}static Create(){const t=new Ln;return t.id=z.H.Id.UUID(),t}}const rh=Object.freeze(Object.defineProperty({__proto__:null,Schedule:po,ScheduleDay:Ko,SchedulePlace:Ln,ScheduleSession:On,ScheduleSlot:Ft},Symbol.toStringTag,{value:"Module"})),ce=n=>n?z.H.Time.HMtoM(n):NaN,Ge=n=>z.H.Time.ConcatHM(Math.floor(n/60),n%60),yn=n=>{if(!n)return"";const t=z.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},_n=(n,t)=>z.H.Time.DiffM(n,t),yt=(n,t)=>z.H.Time.AddMtoHM(n,t),dr=(n,t)=>{const o=ce(n.startTime),i=ce(t.startTime);return isFinite(o)?isFinite(i)?o-i:-1:1},go=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime),r=ce(t.startTime),s=ce(t.endTime);return!isFinite(o)||!isFinite(i)||!isFinite(r)||!isFinite(s)?!1:o<s&&r<i},yo=(n,t)=>Math.round(n/t)*t,Ba=(n,t=8*60,o=20*60)=>{let i=t,r=o;for(const{item:c}of n){const l=ce(c.startTime),u=ce(c.endTime);isFinite(l)&&(i=Math.min(i,l)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(i/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},Na=(n,t)=>{const o=ce(n.item.startTime),i=ce(n.item.endTime);if(!isFinite(o)||!isFinite(i))return{top:"0%",height:"48px"};const r=(o-t.start)/t.total*100,s=Math.max((i-o)/t.total*100,2.5);return{top:r+"%",height:s+"%"}},Va=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime);if(!isFinite(o)||!isFinite(i)||i<=o)return{top:"0%",height:"auto"};const r=i-o,s=ce(t.startTime),a=ce(t.endTime),c=isFinite(s)?Math.max((s-o)/r*100,0):0;let l=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return l=Math.min(Math.max(l,3),100-c),{top:c+"%",height:l+"%"}},$a=(n,t,o)=>n.some(i=>i.item.id===t.item.id||t.kind==="session"&&i.kind==="slot"&&i.item.sessionId===t.item.id?!1:o(t.item,i.item)),Ta=(n,t,o)=>n.some(i=>i.id!==t.id&&o(t,i)),Pa=(n,t,o,i)=>{if(!(!isFinite(t)||!isFinite(o)||o<=t))return(n||[]).find(r=>{const s=i(r.startTime),a=i(r.endTime);return isFinite(s)&&isFinite(a)&&t>=s&&o<=a})},Ma=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",ur={hall:"Зал",halls:"Залы",session:"Секция",sessions:"Секции",slot:"Событие",slots:"События",addHall:"Добавить зал",addSession:"Добавить секцию",addSlot:"Добавить событие",addDay:"Добавить день",deleteDay:"Удалить день",deleteHall:"Удалить расписание (зал)",noDays:"Сначала укажите даты",noHalls:"Для этого дня не добавлены залы.",date:"Дата",newHallPlaceholder:"Название нового зала",create:"Создать",close:"Закрыть",save:"Сохранить",cancel:"Отмена",delete:"Удалить",edit:"Редактировать",grid:"Сетка",list:"Список",startTime:"Начало",endTime:"Конец",sessionSelect:"Секция",sessionsTitle:"Секции",slotsTitle:"События",noSlots:"Пусто",noSlotsInDay:"Докладов нет",conflictTitle:"Пересечение с другим блоком в этом зале",changeDurationTitle:"Изменить длительность",gridHint:"Перетаскивайте блоки мышью или пальцем — в другой зал или на другое время. Блоки не сдвигают друг друга: пересечения подсвечиваются красным. Событие, брошенное внутрь секции, автоматически становится её частью. Секции помечены фиолетовым корешком. Клик по блоку — редактирование, нижняя кромка — длительность, двойной клик по пустому месту — новое событие.",listHint:"Перетаскивайте строки — порядок сохраняется, время блоков при этом не меняется.",alreadyAdded:"Зал уже добавлен в этот день",selectDayFirst:"Сначала выберите день",cannotCreate:"Не удалось добавить зал: сервер не ответил",createFailed:"Ошибка при добавлении зала",hallCreated:"Зал «{name}» создан",hallCreateFailed:"Не удалось создать зал",hallNotAdded:"Не удалось добавить зал: сервер не ответил",dayAdded:"День добавлен",saveEventFirst:"Сначала сохраните",correctStartTime:"Укажите корректное время начала",name:"Название",description:"Описание",participants:"Участники",enterName:"Введите название",intoSession:"в секцию",conflictCount:"пересечение"},Ia={createDay(n){return Ko.Create(void 0,void 0,n)},createSchedule(n,t){return po.Create(n,t)},createSession(n){const t=(n==null?void 0:n.sessions)||[],o=t[t.length-1],i=(o==null?void 0:o.endTime)||"9:00",r=On.Create(n==null?void 0:n.id);return r.startTime=i,r.endTime=z.H.Time.AddMtoHM(i,30),r},createSlot(n){return Ft.Create(n==null?void 0:n.id)},createPlace(n){const t=Ln.Create();return t.name=n||"",t}},sh={class:"schedule-admin"},ah={key:0,class:"no-days text-center text-grey q-py-xl"},lh={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},ch={key:5,class:"row items-center q-gutter-xs zoom-control"},dh={key:0,class:"grid-view"},uh={key:0,class:"text-grey text-center q-py-lg"},fh={class:"grid-header"},mh={class:"row items-center justify-center q-gutter-xs"},hh={class:"ellipsis"},ph={class:"time-gutter"},gh=["data-schedule-id","onDblclick","onContextmenu"],yh=["title","onPointerdown","onClick","onContextmenu"],wh={class:"block-content"},bh={class:"block-time"},Ch={class:"block-name ellipsis"},Sh={key:0,class:"block-speakers ellipsis"},kh={key:0,class:"session-perfoms"},xh=["title","onPointerdown","onClick","onContextmenu"],Eh={class:"nested-time"},Bh={class:"nested-name ellipsis"},Nh={key:0,class:"nested-speakers ellipsis"},Vh=["title","onPointerdown"],$h={class:"block-actions"},Th=["title","onPointerdown"],Ph=["title"],Mh={class:"session-spine-name"},Ih={class:"block-time"},Rh={key:0,class:"session-badge"},Ah={key:1,class:"conflict-badge"},zh={class:"block-name ellipsis"},Dh={class:"text-caption text-grey-6 q-pa-xs"},Fh={key:1,class:"list-view"},Oh={class:"row items-center q-gutter-sm"},Lh={class:"text-subtitle2"},_h={key:0,class:"sub-block"},Hh={class:"sub-title"},Uh={class:"list-row session-row"},vh={key:0,class:"nested-list"},qh={class:"col-4 ellipsis"},jh={class:"time-text"},Wh={class:"sub-block"},Gh={class:"sub-title"},Qh={class:"list-row slot-row"},Yh={key:0,class:"text-grey text-center q-py-sm"},Xh={class:"text-caption text-grey-6 q-mb-sm"},Zh={class:"text-h6"},Jh={class:"row items-center q-gutter-sm q-mb-md"},Kh={key:0,class:"text-grey text-center q-py-md"},ep={class:"col ellipsis"},tp={class:"text-h6"},np={class:"row q-col-gutter-sm q-mb-sm"},op={class:"col-6"},ip={class:"col-6"},rp=["onClick"],wn=15,Ra=6,Aa=D(e.defineComponent({__name:"ScheduleGridEditor",props:{days:{},places:{},persist:{},labels:{default:()=>({})},factories:{default:()=>({})},hallName:{type:Function,default:void 0},dayTitle:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotSubtitle:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},sessionsEnabled:{type:Boolean,default:!0},daysEnabled:{type:Boolean,default:!0},placesEnabled:{type:Boolean,default:!0}},setup(n){var vl,ql;const t=n,o=e.computed(()=>t.sessionsEnabled!==!1),i=e.computed(()=>t.daysEnabled!==!1),r=e.computed(()=>t.placesEnabled!==!1),s=e.computed(()=>({...ur,duplicate:"Дублировать",...t.labels})),a=e.computed(()=>({...Ia,...t.factories})),c=h=>t.slotListOf?t.slotListOf(h):(h==null?void 0:h.slots)||[],l=h=>t.nestedSlotListOf?t.nestedSlotListOf(h):(h==null?void 0:h.slots)||[],u=h=>(h==null?void 0:h.name)||s.value.hall,f=h=>t.sessionName?t.sessionName(h):(h==null?void 0:h.name)||`${s.value.session} ${(h==null?void 0:h.startTime)||""}–${(h==null?void 0:h.endTime)||""}`.trim(),m=h=>t.slotName?t.slotName(h):(h==null?void 0:h.name)||s.value.slot,p=h=>t.slotSubtitle?t.slotSubtitle(h):"",S=e.ref("grid"),x=e.ref((ql=(vl=t.days)==null?void 0:vl[0])==null?void 0:ql.id),N=e.ref(!1),V=e.ref(""),C=e.ref(!1),T=e.ref(null),y=e.ref(null),b=e.ref(void 0),$=e.ref(null),R=e.ref(null),j=e.ref(!1),se=e.ref(0),ze=e.ref(null),Te=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],Ve=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch(Ve,h=>localStorage.setItem("schedule-grid-zoom",String(h)));const Ke=e.computed(()=>Math.max(le.value.total/60*Ve.value,360)),ht=e.computed(()=>Ke.value+"px"),ye=e.computed(()=>[...t.days||[]].sort((h,g)=>new Date(h.date).getTime()-new Date(g.date).getTime())),Se=e.computed(()=>ye.value.find(h=>h.id===x.value));e.watch(()=>ye.value.map(h=>h.id).join(","),()=>{var h;(!x.value||!ye.value.some(g=>g.id===x.value))&&(x.value=(h=ye.value[0])==null?void 0:h.id)});const bt=h=>{if(t.dayTitle)return t.dayTitle(h);const g=new Date(h.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Zt=h=>{const g=new Date(h);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Gn=async(h,g)=>{g&&(h.date=new Date(g),await t.persist.updateDay(h),await t.persist.refresh())},Cn=async h=>{var w;if(!h)return;for(const M of he(h))await Sn(M);await t.persist.removeDay(h);const g=(t.days||[]).indexOf(h);g>=0&&t.days.splice(g,1),await t.persist.refresh(),x.value=(w=ye.value[0])==null?void 0:w.id},it=async()=>{var F,Y;const h=ye.value,g=h[h.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let M;try{M=a.value.createDay(w)}catch{t.persist.notify("warning",s.value.saveEventFirst);return}try{await((Y=(F=t.persist).createDay)==null?void 0:Y.call(F,M));for(const fe of t.places||[])await we(fe,M);await t.persist.refresh()}catch{t.persist.notify("negative",s.value.createFailed);return}x.value=M.id,t.persist.notify("positive",`${s.value.dayAdded}: ${bt(M)}`)},he=h=>((h==null?void 0:h.schedules)||[]).slice().sort((g,w)=>{const M=G(g),F=G(w);return M.localeCompare(F,"ru")}),G=h=>{if(t.hallName)return t.hallName(h);const g=h.place||(t.places||[]).find(w=>w.id===h.placeId);return(g==null?void 0:g.name)||s.value.hall},Qe=()=>{N.value=!0},Pt=e.computed(()=>{const h=Se.value,g=new Set(((h==null?void 0:h.schedules)||[]).map(w=>w.placeId));return(t.places||[]).filter(w=>!g.has(w.id))}),we=async(h,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(h,g,a.value.createSchedule);return}const w=a.value.createSchedule(h.id,g.id);await t.persist.createSchedule(w)},ae=async h=>{N.value=!1;const g=Se.value;if(!g){t.persist.notify("warning",s.value.selectDayFirst);return}if(he(g).some(w=>w.placeId===h.id)){t.persist.notify("warning",s.value.alreadyAdded);return}try{await we(h,g)}catch(w){console.warn("addPlaceToDay failed:",w),t.persist.notify("negative",s.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),x.value=g.id},ve=async()=>{var w,M,F;const h=(w=V.value)==null?void 0:w.trim();if(!h){t.persist.notify("warning",s.value.enterName);return}const g=a.value.createPlace(h);try{if(!await((F=(M=t.persist).createPlace)==null?void 0:F.call(M,g))){t.persist.notify("negative",s.value.hallCreateFailed);return}}catch(Y){console.warn("createPlace failed:",Y),t.persist.notify("negative",s.value.hallCreateFailed);return}V.value="",await ae(g),t.persist.notify("positive",s.value.hallCreated.replace("{name}",h))},Mt=async h=>{await Sn(h);const g=rt(h);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==h.id)),await t.persist.refresh()},Sn=async h=>{for(const g of h.sessions||[]){for(const w of l(g))await t.persist.removeSlot(w);await t.persist.removeSession(g)}for(const g of c(h))await t.persist.removeSlot(g);await t.persist.removeSchedule(h)},rt=h=>(t.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===h.id)),st=h=>[...l(h)].sort(dr),Ye=h=>(h.sessions||[]).some(g=>l(g).length>0),Jt=new WeakMap,Ut=h=>{const g=Jt.get(h),w=c(h);if(g&&g.src===w)return g.list;const M=new Set((h.sessions||[]).map(Y=>Y.id)),F=w.filter(Y=>!Y.sessionId||!M.has(Y.sessionId));return Jt.set(h,{src:w,list:F}),F},De=h=>[...o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],...Ut(h).map(g=>({kind:"slot",item:g}))],ee=h=>o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],le=e.computed(()=>{var g,w;const h=(((g=Se.value)==null?void 0:g.schedules)||[]).flatMap(M=>De(M));for(const M of((w=Se.value)==null?void 0:w.schedules)||[])for(const F of M.sessions||[])h.push(...st(F).map(Y=>({kind:"slot",item:Y})));return Ba(h)}),lt=e.computed(()=>{const h=[];for(let g=le.value.start;g<=le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),pt=e.computed(()=>{const h=[];for(let g=le.value.start+30;g<le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),Kt=h=>Na(h,le.value),kn=e.computed(()=>{if(!$.value||!y.value)return{};const h=le.value,g=($.value.minutes-h.start)/h.total*100,w=Math.max(y.value.duration/h.total*100,2.5);return{top:g+"%",height:w+"%"}}),It=e.computed(()=>!$.value||!y.value?"":Ge($.value.minutes+y.value.duration)),qr=e.computed(()=>{if(!$.value)return{};const h=le.value,g=($.value.minutes-h.start)/h.total*100,w=Math.max(wn/h.total*100,1.5);return{top:g+"%",height:w+"%"}}),xn=e.computed(()=>{var F,Y,fe,Pe,Ie;if(!$.value||!y.value||!y.value.id)return 0;const h=Yn($.value.scheduleId);if(!h)return 0;const g={startTime:$.value.time,endTime:It.value},w=(F=$.value.session)==null?void 0:F.id;let M=0;for(const A of De(h))A.item.id!==((Y=y.value)==null?void 0:Y.id)&&(((fe=y.value)==null?void 0:fe.kind)==="slot"&&A.kind==="session"&&A.item.id===w||go(g,A.item)&&M++);if(((Pe=y.value)==null?void 0:Pe.kind)==="slot"&&$.value.session)for(const A of st($.value.session))A.id!==((Ie=y.value)==null?void 0:Ie.id)&&go(g,A)&&M++;return M}),pi=e.computed(()=>xn.value>0),en=(h,g)=>$a(De(h),g,go),jr=(h,g)=>Ta(st(h),g,go),Wr=(h,g)=>Va(h,g),Gr=h=>{const g=le.value,w=ce(h.item.startTime),M=ce(h.item.endTime);return!isFinite(w)||!isFinite(M)?48:(M-w)/g.total*Ke.value},tn=h=>Ma(Gr(h)),B=h=>{const g=t.slotName?t.slotName(h.item):h.item.name||(h.kind==="session"?s.value.session:s.value.slot);if(h.kind==="slot"&&tn(h)!=="h-full"){const w=p(h.item);if(w)return`${g} — ${w}`}return g},P=(h,g)=>{const w=m(h);if(g!=="h-full"){const M=p(h);if(M)return`${w} — ${M}`}return w},I=h=>{const g=`${h.item.startTime||"?"}–${h.item.endTime||"?"}`;if(h.kind==="slot"){const w=p(h.item);return[m(h.item),g,w?`${s.value.participants}: ${w}`:""].filter(Boolean).join(`
|
|
22
|
+
`+s)}}catch{}}throw i}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=ln(this.defaults,o);const{transitional:i,paramsSerializer:r,headers:s}=o;i!==void 0&&Wo.assertOptions(i,{silentJSONParsing:je.transitional(je.boolean),forcedJSONParsing:je.transitional(je.boolean),clarifyTimeoutError:je.transitional(je.boolean),legacyInterceptorReqResOrdering:je.transitional(je.boolean),advertiseZstdAcceptEncoding:je.transitional(je.boolean),validateStatusUndefinedResolves:je.transitional(je.boolean)},!1),r!=null&&(k.isFunction(r)?o.paramsSerializer={serialize:r}:Wo.assertOptions(r,{encode:je.function,serialize:je.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Wo.assertOptions(o,{baseUrl:je.spelling("baseURL"),withXsrfToken:je.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=s&&k.merge(s.common,s[o.method]);s&&k.forEach(["delete","get","head","post","put","patch","query","common"],E=>{delete s[E]}),o.headers=qe.concat(a,s);const c=[];let l=!0;this.interceptors.request.forEach(function(P){if(typeof P.runWhen=="function"&&P.runWhen(o)===!1)return;l=l&&P.synchronous;const V=o.transitional||Fi;V&&V.legacyInterceptorReqResOrdering?c.unshift(P.fulfilled,P.rejected):c.push(P.fulfilled,P.rejected)});const u=[];this.interceptors.response.forEach(function(P){u.push(P.fulfilled,P.rejected)});let f,m=0,p;if(!l){const E=[Xs.bind(this),void 0];for(E.unshift(...c),E.push(...u),p=E.length,f=Promise.resolve(o);m<p;)f=f.then(E[m++],E[m++]);return f}p=c.length;let S=o;for(;m<p;){const E=c[m++],P=c[m++];try{S=E(S)}catch(V){P.call(this,V);break}}try{f=Xs.call(this,S)}catch(E){return Promise.reject(E)}for(m=0,p=u.length;m<p;)f=f.then(u[m++],u[m++]);return f}getUri(t){t=ln(this.defaults,t);const o=_s(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Ps(o,t.params,t.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(t){cn.prototype[t]=function(o,i){return this.request(ln(i||{},{method:t,url:o,data:i&&k.hasOwnProp(i,"data")?i.data:void 0}))}}),k.forEach(["post","put","patch","query"],function(t){function o(i){return function(s,a,c){return this.request(ln(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}cn.prototype[t]=o(),t!=="query"&&(cn.prototype[t+"Form"]=o(!0))});let bu=class Zl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(c=>{i.subscribe(c),s=c}).then(r);return a.cancel=function(){i.unsubscribe(s)},a},t(function(s,a,c){i.reason||(i.reason=new so(s,a,c),o(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=i=>{t.abort(i)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new Zl(function(r){t=r}),cancel:t}}};function Cu(n){return function(o){return n.apply(null,o)}}function Su(n){return k.isObject(n)&&n.isAxiosError===!0}const qi={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(qi).forEach(([n,t])=>{qi[t]=n});function Js(n){const t=new cn(n),o=ms(cn.prototype.request,t);return k.extend(o,cn.prototype,t,{allOwnKeys:!0}),k.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return Js(ln(n,r))},o}const $e=Js(ro);$e.Axios=cn,$e.CanceledError=so,$e.CancelToken=bu,$e.isCancel=zs,$e.VERSION=Hi,$e.toFormData=Ho,$e.AxiosError=_,$e.Cancel=$e.CanceledError,$e.all=function(t){return Promise.all(t)},$e.spread=Cu,$e.isAxiosError=Su,$e.mergeConfig=ln,$e.AxiosHeaders=qe,$e.formToJSON=n=>As(k.isHTMLForm(n)?new FormData(n):n),$e.getAdapter=Ys.getAdapter,$e.HttpStatusCode=qi,$e.default=$e;const{Axios:Zw,AxiosError:Jw,CanceledError:Kw,isCancel:eb,CancelToken:tb,VERSION:nb,all:ob,Cancel:ib,isAxiosError:rb,spread:sb,toFormData:ab,AxiosHeaders:lb,HttpStatusCode:cb,formToJSON:db,getAdapter:ub,mergeConfig:fb,create:mb}=$e;var ao=(n=>(n.GET="get",n.POST="post",n.PUT="put",n.DELETE="delete",n))(ao||{});const lo=(()=>{function n(){const l=r();return!(!l||l==="undefined")}function t(l){l.accessToken&&localStorage.setItem("access_token",l.accessToken),l.refreshToken&&localStorage.setItem("refresh_token",l.refreshToken)}function o(){const l=localStorage.getItem("user");return l?JSON.parse(l).id:""}function i(){const l=localStorage.getItem("user");if(l)return JSON.parse(l)}function r(){return localStorage.getItem("access_token")}function s(){return localStorage.getItem("refresh_token")}function a(){localStorage.removeItem("access_token"),localStorage.removeItem("refresh_token")}function c(l){if(!n())return;const u=lo.getUser();u&&(u.human=l,localStorage.setItem("user",JSON.stringify(u)))}return{isAuth:n,setTokens:t,getAccessToken:r,getRefreshToken:s,getUserId:o,clearTokens:a,getUser:i,updateHuman:c}})();class ji{constructor(t){d(this,"code",400);d(this,"err","");J.BuildClass(this,t)}getErr(){return this.capitalizedErr()}capitalizedErr(){return this.err.charAt(0).toUpperCase()+this.err.slice(1)}static async Handle(t,o){const i=t.config;if(t.response){if(t.response.status===401&&!i._retry)return i._retry=!0,o.defaults.headers.common.token=lo.getAccessToken(),t.config.headers.token=lo.getAccessToken(),t.config.baseURL=void 0,o.request(i);if(t.response.status>=500){if(t.response.data==="неверный логин или пароль"){Nn.Error("Неверный логин или пароль");return}Nn.Error("Ошибка на сервере, попробуйте позже")}if(t.response.status>=400&&t.response.status<500){const r=new ji(t.response.data).getErr();r&&Nn.Error(r)}return Promise.reject(t)}}}const An=$e.create();An.interceptors.response.use(n=>n,async n=>await ji.Handle(n,An));class co{static async Get(t,o,i){return await An({method:ao.GET,url:t,headers:o,responseType:i})}static async Post(t,o,i,r){return o["Content-Type"]="multipart/form-data",await An({method:ao.POST,url:t,headers:o,responseType:i,data:r})}static async Put(t,o,i){return o["Content-Type"]="multipart/form-data",await An({method:ao.PUT,url:t,headers:o,data:i})}static async Delete(t,o){return await An({method:ao.DELETE,url:t,headers:o})}}class Go{constructor(t){d(this,"name","");J.BuildClass(this,t)}static Set(){}static Get(t,o){const i=sessionStorage.getItem(t);if(i){const r=JSON.parse(i),s=new Date,a=new Date(r.time),c=s.getTime()-a.getTime();return Math.round(c/6e4)>(o||10)?null:r.data}else return null}static async TryGet(t,o,i){let r;return r=Go.Get(t,i),r||(r=await o()),r}}var Wi=(n=>(n.ContentType="Content-Type",n.Token="token",n))(Wi||{}),Ks=(n=>(n.ApplicationJson="application/json",n.MultipartFormData="multipart/form-data",n))(Ks||{});const ge=class ge{static Setup(t="http://localhost",o,i="api"){this.baseUrl=Ee.BuildSafeUrl(t,o,i),this.host=t,this.apiVersion=i}static newWebSocket(t){const o=this.host.replace("http","ws")+"/ws/"+t;return new WebSocket(o)}static download(t,o){const i=ge.getDownloadFileName(t,o.headers);if(!(o.data instanceof Blob)){console.warn("download: response data is not a Blob");return}const r=URL.createObjectURL(o.data),s=document.createElement("a");s.href=r,s.setAttribute("download",i),s.setAttribute("target","_blank"),document.body.appendChild(s),s.click()}static getDownloadFileName(t,o){if(t)return t;const i=o["content-disposition"];if(!i)return"file";const r=i.indexOf('"')+1,s=i.lastIndexOf('"'),a=i.substring(r,s);return a||"file"}static getHeaders(t){const o=St.Get(dt.AccessToken);return t||(t=ge.headers),o&&(t[Wi.Token]=o),t??ge.headers}static returnResponse(t,o){if(o)return t!=null&&t.isBlob?ge.download(t.downloadFileName,o):o.data}static async Get(t){return ge.returnResponse(t,await co.Get(ge.buildUrl((t==null?void 0:t.query)??""),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t==null?void 0:t.isBlob)))}static async Post(t){return ge.returnResponse(t,await co.Post(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.getResponseType(t.isBlob),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Put(t){return ge.returnResponse(t,await co.Put(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers),ge.createFormDataPayload(t==null?void 0:t.payload,t==null?void 0:t.fileInfos)))}static async Delete(t){return ge.returnResponse(t,await co.Delete(ge.buildUrl(t==null?void 0:t.query),ge.getHeaders(t==null?void 0:t.headers)))}static async Subscribe(t){const{query:o}=t;return new EventSource(ge.buildUrl(o))}static buildUrl(t=""){try{return Bi(this.baseUrl,t)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}`)}}static getResponseType(t){return t?"blob":"json"}static createFormDataPayload(t,o){const i=new FormData;if(i.append("form",JSON.stringify(t)),o)for(const r of o)r.file&&i.append(r.id??"files",r.file,r.originalName);return i}};d(ge,"baseUrl",""),d(ge,"apiVersion","api"),d(ge,"host",""),d(ge,"headers",{[Wi.ContentType]:Ks.ApplicationJson});let Ce=ge;const z=(n,t)=>{const o=n.__vccOpts||n;for(const[i,r]of t)o[i]=r;return o},ku={},xu={style:{"text-align":"center"}};function Eu(n,t){return e.openBlock(),e.createElementBlock("div",xu,[...t[0]||(t[0]=[e.createElementVNode("h1",null,"Страница не найдена",-1)])])}const ea=z(ku,[["render",Eu]]),Bu=[{path:"/:pathMatch(.*)*",name:"NotFound",component:ea}],ht=class ht{static Setup(t,o=""){this.router=t,this.title=o,this.ChangeDocumentTitle(),this.AddRoutes(Bu)}static Get(){return this.router}static AddRoutes(t){t.forEach(o=>{this.Get().addRoute(o)})}static async To(t){await this.Get().push(t)}static async ToHome(){}static async Replace(t){await this.Get().replace(t)}static Id(){return ht.GetStringParam("id")}static Slug(){return ht.GetStringParam("slug")}static async Back(){this.Get().go(-1)}static GetQid(){return ht.GetStringQueryParam("qid")}static Route(){var t;return(t=this.Get())==null?void 0:t.currentRoute.value}static RouterPushBlank(t){const o=this.Get().resolve({path:t});window.open(o==null?void 0:o.href,"_blank")}static GetPath(){var o;const t=(o=ht.Route())==null?void 0:o.path.split("/");return!t||t.length<=0?"":t[t.length-1]}static async ToAdmin(t){if(!t){await this.Get().push("/admin");return}let o=t;o[0]==="/"&&(o=t.substring(1)),await ht.To(`/admin/${o}`)}static GetStringQueryParam(t){return String(this.Route().query[t])}static GetNumberQueryParam(t){return Number(this.Route().query[t]??0)}static GetStringParam(t){var o;return(o=this.Route())==null?void 0:o.params[t]}static SetQueryParam(t,o){const i=new URL(window.location);i.searchParams.set(t,String(o)),history.replaceState(null,"",i)}static Resolve(t){return this.Get().resolve(t)}};d(ht,"router"),d(ht,"title",""),d(ht,"ChangeDocumentTitle",(t="")=>{let o=ht.Route().meta.title??t;o&&(o=" | "+o),document.title=ht.title+o});let Et=ht;class Ve{constructor(t,o){d(this,"items",e.reactive([]));d(this,"item");d(this,"options",e.reactive([]));d(this,"count",e.ref(0));d(this,"classConstructor");d(this,"url","");d(this,"searchStr",e.ref(""));this.classConstructor=t,this.item=e.reactive(new this.classConstructor),this.url=o}Set(t){Object.assign(this.item,new this.classConstructor(t))}getUrl(t){return t?`${this.url}/${t}`:this.url}async GetOptions(t="name",o="id"){const i=`${this.getUrl()}/options/${t}/${o}`;try{const r=await Ce.Get({query:i});r&&(this.options.splice(0,this.options.length),this.options.push(...r))}catch(r){console.warn("GetOptions failed:",r)}}async GetAll(t){try{let o;const i=Ce.Get;t&&t.withCache?o=await Go.TryGet(this.getUrl(),i):o=await i({query:this.getUrl()}),Array.isArray(o)?this.SetAll(o):this.SetAllWithCount(o)}catch(o){console.warn("GetAll failed:",o)}}async Get(t){try{t||(t=Et.Id()),this.Set(await Ce.Get({query:this.getUrl(t)}))}catch(o){console.warn("Get failed:",o)}}async GetBySlug(t){try{t||(t=Et.Slug()),this.Set(await D.H.HttpClient.Get({query:this.getUrl("by-slug/"+t)}))}catch(o){console.warn("GetBySlug failed:",o)}}async FTSP(t){var o;try{const r=((t==null?void 0:t.ftsp)??xt.Get()).clearForHTTP(),s={payload:{ftsp:r},query:this.getUrl("ftsp")},a=await Ce.Post(s);if(!a||!a.ftsp)return;if(Array.isArray(a.data))this.SetAll(a.data);else{if(r.p.append){this.AppendToAll((o=a.data)==null?void 0:o.items);return}this.SetAllWithCount(a.data)}}catch(i){console.warn("FTSP failed:",i)}}async Create(t){try{const o=t??this.item,i={payload:o,query:this.getUrl()};return o.getFileInfos&&(i.fileInfos=o.getFileInfos()),await Ce.Post(i)}catch(o){console.warn("Create failed:",o)}}async CreateAndSet(t){const o=await this.Create(t);this.Set(o)}async CreateMany(t){if(!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Create(i)))}),Promise.all(o)}async Update(t){try{const o=t??this.item,i={query:this.getUrl(`${o.id}`),payload:o};return o.getFileInfos&&(i.fileInfos=o.getFileInfos(),i.fileInfos.forEach(r=>r.url="")),await Ce.Put(i)}catch(o){console.warn("Update failed:",o)}}async UpdateAndSet(t){const o=await this.Update(t);this.Set(o)}async UpdateAndReset(t){await this.Update(t??this.item),this.Set()}async Remove(t){if(t)try{await Ce.Delete({query:this.getUrl(`${t}`)}),this.RemoveItem(t)}catch(o){console.warn("Remove failed:",o)}}async UpdateMany(t){if(t||(t=this.items),!t)return;const o=[];t.forEach(i=>{o.push(new Promise(()=>this.Update(i)))}),Promise.all(o)}SetAll(t){this.items.splice(0,this.items.length),t&&this.items.push(...t.map(o=>new this.classConstructor(o)))}SetAllWithCount(t){this.SetAll(t.items),this.count.value=t.count}RemoveItem(t){const o=this.items.findIndex(i=>i.id===t);o<0||this.items.splice(o,1)}AppendToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.push(...o);return}this.items.push(new this.classConstructor(t))}}ResetState(){this.ResetItem(),this.ClearItems(),this.count.value=0}ResetItem(){J.BuildClass(this.item,new this.classConstructor)}ClearItems(){this.items.splice(0,this.items.length)}UnshiftToAll(t){if(t){if(Array.isArray(t)){const o=t.map(i=>new this.classConstructor(i));this.items.unshift(...o);return}this.items.unshift(new this.classConstructor(t))}}get Items(){return this.items}get ItemsFiltered(){return this.searchStr.value.trim()?this.Items.filter(t=>D.H.Strings.SearchInFields(this.searchStr.value,t.SearchFields())):this.Items}get Options(){return this.options}get Item(){return this.item}get Count(){return this.count}get SearchStr(){return this.searchStr}}function Vu(n,t){n=="left"&&t.next(),n=="right"&&t.prev()}const Nu=["#31af5e","#ff4d3b","#006BB5","#f3911c"];class $u{static GetRandColor(t){return Dt.GetRandEL(t??Nu)}}function ta(n,t){const o=[],i=t||ut.Asc,r=i===ut.Asc?ut.Desc:ut.Asc;return Object.values(n).forEach(s=>{o.push(s(i)),o.push(s(r))}),o.length>0&&!o.some(s=>s.default)&&(o[0].default=!0),t&&o.forEach(s=>{s.default&&(s.default=s.order===t)}),o}let Tu=class{constructor(){d(this,"startHour",9);d(this,"endHour",19);d(this,"timelinePxHeight",50);d(this,"timelineStep",Jn.FiveMinutes);d(this,"activeTime","");d(this,"activeObjectId","");d(this,"dragged",!1);d(this,"draggedStartTime","");d(this,"draggedEndTime","");d(this,"timelines",Po[Jn.FiveMinutes])}startDrag(t,o){this.draggedStartTime=t,this.draggedEndTime=o,this.dragged=!0}endDrag(){this.activeTime="",this.dragged=!1}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Po[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}};const Gi=n=>n===8||n===46,Pu=n=>n>46&&n<58,Mu=n=>n>34&&n<41,Iu=n=>n+".",Ru=(n,t,o)=>{Gi(t)||Mu(t)||(!Pu(t)||o>9)&&n.preventDefault()};function Au(n,t){if(t>8){let o=n.substring(0,2).replace(".","1");Number(o)>31&&(o="31");let i=n.substring(3,5).replace(".","1");Number(i)>12&&(i="12");let r=n.substring(6,10).replace(".","1");Number(r)>2100&&(r="2100"),n=o+"."+i+"."+r}return n}function zu(n){const t=n.keyCode;let o=n.srcElement.value;const i=o.length;Ru(n,t,i),!Gi(t)&&(i===2||i===5)&&(o=Iu(o));const r=n.srcElement.value+String.fromCharCode(n.which);if(Gi(t)){n.srcElement.value=o;return}o.length===0&&Number(r)>3&&(o="3",n.preventDefault()),o.length===1&&Number(r)>31&&(o="31",n.preventDefault()),r.length===5&&Number(r.substring(3,5))>12&&(o=o.substring(0,3)+"12",n.preventDefault()),o=Au(o,i),n.srcElement.value=o}const Du=["ВС","ПН","ВТ","СР","ЧТ","ПТ","СБ"],Fu="ru-RU";class Ze{constructor(){d(this,"locale","ru-RU")}static Format(t,o){if(!t)return"";const i={year:"numeric",month:"2-digit",day:"2-digit",hour:void 0,minute:void 0};return o&&(i.year=o.year||o.year===void 0?o.year:i.year,i.month=o.month||o.month===void 0?o.month:i.month,i.day=o.day||o.day===void 0?o.day:i.day,i.hour=o.hour??i.hour,i.minute=o.minute??i.minute),Intl.DateTimeFormat(Fu,i).format(new Date(t))}static FormatWithTime(t){return Ze.Format(t,{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric"})}static FromRuStr(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetPeriod(t,o,i){return`${this.Format(t,i)}-${this.Format(o,i)}`}static GetShortDayName(t){return t?Du[t.getDay()]:""}static GetCurrentWeekPeriod(t){const o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate()-o.getDay()+1),r=new Date(o.getFullYear(),o.getMonth(),i.getDate()+7);return this.GetPeriod(i,r,t||{month:"2-digit",day:"numeric",year:void 0})}static GetDurationInDay(t,o){const i=new Date,r=new Date,s=Ze.SplitHourTime(t),a=Ze.SplitHourTime(o);return i.setHours(s[0],s[1],0,0),r.setHours(a[0],a[1],0,0),(r.getTime()-i.getTime())/1e3/60}static HourTimeinMunutes(t){const o=Ze.SplitHourTime(t);return o[0]*60+o[1]}static SplitHourTime(t){const o=t.split(":");return[Number(o[0]),Number(o[1])]}static AddMinutesToHM(t,o){const i=new Date,r=Ze.SplitHourTime(t);i.setHours(r[0],r[1],0,0);const s=new Date(i.getTime()+o*6e4),a=s.getHours(),c=s.getMinutes();return`${a}:${c}`}static GetMonthsDiff(t,o){return o.getMonth()-t.getMonth()+12*(o.getFullYear()-t.getFullYear())}static StringToDate(t){const o=t.split(".");return new Date(`${o[2]}-${o[1]}-${o[0]}`)}static GetDateOrToday(t){return t?t.date:new Date}static InPeriod(t,o,i){return new Date(t)>=new Date(o)&&new Date(t)<=new Date(i)}static GetDatesFromPeriod(t,o){const i=[new Date(t)];let r=t;for(;r<=o;)r=Ze.AddDays(r,1),i.push(r);return i}static AddDays(t,o){const i=new Date(t);return i.setDate(i.getDate()+o),i}static Eq(t,o){return t.getTime()===o.getTime()}static ParseRu(t){if(!t)return null;const o=String(t).match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!o)return null;const i=+o[1],r=+o[2],s=+o[3];if(i<1||i>31||r<1||r>12||s<1900||s>2100)return null;const a=new Date(s,r-1,i);return a.getFullYear()!==s||a.getMonth()!==r-1||a.getDate()!==i?null:a}static ToRu(t){if(!t||Number.isNaN(t.getTime()))return"";const o=String(t.getDate()).padStart(2,"0"),i=String(t.getMonth()+1).padStart(2,"0");return`${o}.${i}.${t.getFullYear()}`}static RuToIso(t){const o=Ze.ParseRu(t);if(!o)return"";const i=String(o.getMonth()+1).padStart(2,"0"),r=String(o.getDate()).padStart(2,"0");return`${o.getFullYear()}-${i}-${r}`}static IsoToRu(t){if(!t)return"";const o=String(t).match(/^(\d{4})-(\d{2})-(\d{2})/);if(o)return`${o[3]}.${o[2]}.${o[1]}`;const i=new Date(t);return Number.isNaN(i.getTime())?"":Ze.ToRu(i)}}class Ou{constructor(){d(this,"dragged",!1);d(this,"dragImg",new Image);this.dragImg.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="}start(t){this.dragged=!0,t&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImg,0,0)}end(){this.dragged=!1}isDragged(){return this.dragged}}class na{static Get(t){const o=t.split(".");return o[o.length-1]}}const Lu=(()=>{function n(s,a){localStorage.setItem(`${s}_favourite`,a.toString())}function t(s,a){const c=localStorage.getItem(`${s}_favourite`);return c?c.split(",").includes(a):!1}function o(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c){n(s,[a]);return}const l=c.split(",");l.push(a),n(s,l)}function i(s,a){const c=localStorage.getItem(`${s}_favourite`);if(!c)return;const l=c.split(",").filter(u=>u!==a);n(s,l)}function r(){for(const s in localStorage)s.includes("_favourite")&&localStorage.removeItem(s)}return{addToFavourite:o,removeFromFavourite:i,setFavourite:n,isFavourite:t,clearFavourite:r}})();class _u{constructor(){d(this,"list",[]);d(this,"defaultSortModel");d(this,"changeFlag",!1)}Set(t){this.Reset(),t&&(Array.isArray(t)?this.list=t:this.list=ta(t),this.SetDefault())}SetDefault(){this.defaultSortModel=this.list.find(t=>t.default)??this.list[0],this.changeFlag=!this.changeFlag}Get(){return this.list}GetDefault(){return this.defaultSortModel}Reset(){this.list=[],this.defaultSortModel=void 0}}const dn=new _u;function Hu(){const n=e.ref(!1),t=e.ref(!1);return{confirmLeave:n,saveButtonClick:t,beforeWindowUnload:s=>{n.value&&s.preventDefault()},formUpdated:()=>{n.value=!0},showConfirmModal:(s,a)=>{n.value&&!t.value?s():a()}}}const Uu=(()=>{const n=(s,a)=>e.onBeforeMount(async()=>{D.F.FTSP.Get().reset(),dn.Set(a==null?void 0:a.sortsLib),await s()}),{saveButtonClick:t,showConfirmModal:o}=Hu(),i=s=>rc.onBeforeRouteLeave((a,c,l)=>{o((s||r)(),l)}),r=s=>async()=>{t.value=!0;try{s&&await s()}catch{return}};return{onBeforeMount:n,onBeforeRouteLeave:i,submit:r}})();function oa(n,t){const o=[];if(n)for(let i=0;i<Math.ceil(n.length/t);i++)o[i]=n.slice(i*t,i*t+t);return o}class Qi{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const t=Et.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select(0);return}const o=this.items.findIndex(i=>i.slug===t);o>-1&&this.Select(o)}static Create(t,o){const i=new Qi;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(this.items.length){if(t===void 0)return this.preSelect();this.idx=t,Et.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 hi=class hi{static Format(t){let o=t;if(!o)t=o;else{(o[0]==="7"||o[0]==="8")&&o.length!==1&&(o=o.slice(1));const i=o.replace(/\+7|[^\d]/g,""),r=i.length;switch(!0){case r===0:t="";break;case(r===1&&o.length===1&&i==="7"):case(r===1&&o.length===1&&i==="8"):t="+7 (";break;case r<4:t=`+7 (${i}`;break;case r<7:t=`+7 (${i.slice(0,3)}) ${i.slice(3)}`;break;case r<9:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}`;break;default:t=`+7 (${i.slice(0,3)}) ${i.slice(3,6)}-${i.slice(6,8)}-${i.slice(8,10)}`;break}}return t}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(hi,"validatePhone",(t,o,i)=>{hi.getPhoneRegExp().test(o)||!o?i():i(new Error("Пожалуйста, введите корректный номер телефона"))});let Yi=hi;class vu{static Count(t){const o=t.filter(s=>s.rating!==0);let i=0;o.forEach(s=>i=i+s.rating);const r=i/o.length;return isNaN(r)?0:Number((i/o.length).toFixed(2))}}class qu{static async Auth(t){t&&t()}static Dev(){}}class ju{constructor(){d(this,"startHour",9);d(this,"startHM",`${this.startHour}:00`);d(this,"endHour",19);d(this,"endHM",`${this.endHour}:00`);d(this,"timelinePxHeight",50);d(this,"timelineStep",Jn.FiveMinutes);d(this,"timelines",Po[Jn.FiveMinutes])}periodIsCorrect(t,o){return ie.GtOrEq(t,this.startHM)&&ie.GtOrEq(this.endHM,o)}setTimelineStep(t){this.timelineStep=t,this.setTimelines()}setTimelines(){this.timelines=Po[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return Dt.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(t,o,i,r){return r.filter(s=>s.id!==i).every(s=>!ie.PeriodsIntersects(t,o,s.startTime,s.endTime))}sortByStartTime(t){t.sort((o,i)=>ie.HMtoM(o.startTime)-ie.HMtoM(i.startTime))}}const Wu=-68;function Gu(n,t){if(!n){document.body.scrollTo({top:0,behavior:"smooth"});return}const o=document.querySelector(n),i=t??Wu;let r=0;o&&(r=o.getBoundingClientRect().top+i+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class Qu{static Sort(t){t.forEach((o,i)=>o.order=i)}}class Qo{static Wait(t,o){return new Promise(i=>setTimeout(()=>i(o),t))}static WaitS(t,o){return Qo.Wait(ie.S(t),o)}static WaitM(t,o){return Qo.Wait(ie.M(t),o)}}const zn=n=>n===""||n===null||n===void 0||Array.isArray(n)&&n.length===0,Yu=(n="Обязательное поле")=>t=>zn(t)?n:!0,Xu=(n="Некорректный email")=>t=>zn(t)||/^\S+@\S+\.\S+$/.test(String(t))?!0:n,Zu=(n,t=`Минимум ${n} символов`)=>o=>zn(o)||String(o).length>=n?!0:t,Ju=(n,t=`Максимум ${n} символов`)=>o=>zn(o)||String(o).length<=n?!0:t,Ku=(n,t="Некорректное значение")=>o=>zn(o)||n.test(String(o))?!0:t,ia=(n="Некорректная дата",t=!1)=>o=>zn(o)?t?n:!0:Ze.ParseRu(String(o))?!0:n,ef=Object.freeze(Object.defineProperty({__proto__:null,Compose:(...n)=>t=>{for(const o of n){const i=o(t);if(i!==!0)return i}return!0},DateRu:ia,Email:Xu,MaxLen:Ju,MinLen:Zu,Regex:Ku,Required:Yu},Symbol.toStringTag,{value:"Module"})),tf=n=>new Promise(t=>{if(document.querySelector(n))return t(document.querySelector(n));const o=new MutationObserver(()=>{document.querySelector(n)&&(o.disconnect(),t(document.querySelector(n)))});o.observe(document.body,{childList:!0,subtree:!0})});class Yo{constructor(t){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");J.BuildClass(this,t)}static Create(t,o,i,r){const s=new Yo;return s.id=qt(),s.chatId=t,s.message=i,s.userName=r,s}static CreatePingMessage(){const t=new Yo;return t.type="ping",t.id=qt(),t}isMessage(){return this.type==="message"||this.type===""}}const nf="";class of{constructor(t="",o="",i="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);J.BuildClass(this,{endpoint:t,query:o,mutation:i}),this.connect(),this.ping()}send(t){!this.client||this.client.readyState!==1||this.client.send(t)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(Yo.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=t=>{t.data})}buildUrl(){const t=`ws/${this.endpoint}/${this.query}`;return new URL(t,nf.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 rf=(re=class{},d(re,"Arrays",Dt),d(re,"Axios",co),d(re,"BaseStore",Ve),d(re,"Cache",Go),d(re,"Classes",J),d(re,"CarouselSwipe",Vu),d(re,"Color",$u),d(re,"CreateSortModels",ta),d(re,"Cursor",Tu),d(re,"DateMask",zu),d(re,"Dates",Ze),d(re,"Dragger",Ou),d(re,"Extension",na),d(re,"Favourite",Lu),d(re,"Hooks",Uu),d(re,"HttpClient",Ce),d(re,"Id",Xe),d(re,"MakeCarousel",oa),d(re,"Period",xi),d(re,"PhoneService",Yi),d(re,"Rating",vu),d(re,"Router",Et),d(re,"RouterGuard",qu),d(re,"Scheduler",ju),d(re,"Scroll",Gu),d(re,"Sorter",Qu),d(re,"Static",Vi),d(re,"Strings",Ee),d(re,"Time",ie),d(re,"Timer",Qo),d(re,"Token",lo),d(re,"Menus",Qi),d(re,"Validate",ef),d(re,"WaitElement",tf),d(re,"WebSocketClient",of),re);class sf{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(t){this.curPage=t}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const ra=new sf;var sa=(n=>(n.TableList="tableList",n.Default="",n))(sa||{}),Bt=(n=>(n.None="None",n.Next="Next",n.Prev="Prev",n))(Bt||{}),aa=(n=>(n.Year="Год",n.Month="Месяц",n.Week="Неделя",n.Day="День",n))(aa||{}),la=(n=>(n.YouTube="YouTube",n.VK="VK",n.Instagram="Instagram",n.Facebook="Facebook",n))(la||{}),Xi=(n=>(n.simple="simple",n.oneToMany="oneToMany",n.manyToMany="manyToMany",n))(Xi||{});const af=Object.freeze(Object.defineProperty({__proto__:null,AdminLayout:sa,Animations:Bt,CalendarScale:aa,LocalStoreKeys:dt,SocialTypes:la,ValueRelation:Xi},Symbol.toStringTag,{value:"Module"}));let lf=class{async Login(t=Oe.Form.GetValues()){const o=await Ce.Post({query:"auth/login",payload:t});if(!o)throw"Ошибка авторизации";Oe.Status.SetState(o)}async LoginAs(t){await Ce.Post({query:"auth/login-as",payload:{email:t}})}async Register(t=Oe.Form.GetValues()){const o=await Ce.Post({query:"auth/register",payload:t});if(!o)throw o}async RestorePassword(t=Oe.Form.GetValues()){await Ce.Post({query:"auth/restore-password",payload:t})}async PasswordChange(t=Oe.Form.GetValues()){t.id=Et.GetStringParam("userId"),await Ce.Put({query:"auth/password-change",payload:t})}async RefreshToken(){await Ce.Post({query:"auth/refresh-token",payload:{refreshToken:lo.getRefreshToken()}})}async CheckUuid(t){await Ce.Get({query:`auth/check-uuid/${t.userId}/${t.uniqueId}`})}async ConfirmEmail(t){await Ce.Get({query:`auth/confirm-email/${t}`})}async EmailIsConfirm(t){await Ce.Get({query:`auth/email-is-confirm/${t}`})}};const cf=new lf;var df=Object.defineProperty,Xo=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&df(t,o,r),r};const uo=class Jl{constructor(t){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new Mo]);d(this,"phones",[]);d(this,"websites",[]);J.BuildClass(this,t)}addEmail(){const t=Kn.Create();return t.contactId=this.id,this.emails.push(t),t}addPhone(){const t=rn.Create();return t.contactId=this.id,this.phones.push(t),t}static Create(){const t=new Jl;return t.id=Xe.UUID(),t}removeEmail(t){J.RemoveFromClassById(t,this.emails)}removePhone(t){J.RemoveFromClassById(t,this.phones)}addPostAddress(){this.postAddresses.push(new Mo)}addWebsite(){this.websites.push(new Ni)}pushFirst(){this.emails.length||this.emails.push(new Kn),this.phones.length||this.phones.push(new rn)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(t){this.description=t}updateTime(t){this.time=t}updateLatitude(t){this.latitude=t}updateLongitutde(t){this.longitude=t}};Xo([J.GetClassConstructor(Kn)],uo.prototype,"emails"),Xo([J.GetClassConstructor(Mo)],uo.prototype,"postAddresses"),Xo([J.GetClassConstructor(rn)],uo.prototype,"phones"),Xo([J.GetClassConstructor(Ni)],uo.prototype,"websites");let uf=uo,ff=class extends Ve{constructor(){super(uf,"contacts")}};const mf=new ff;let hf=class extends Ve{constructor(){super(Kn,"emails")}};const pf=new hf;class Zi{constructor(t){d(this,"id");d(this,"ftsp");d(this,"name","");J.BuildClass(this,t)}static Create(t){const o=new Zi;return o.id=Xe.UUID(),o.ftsp=JSON.stringify(t),o}}let gf=class extends Ve{constructor(){super(Zi,"ftsp-presets")}};const yf=new gf;let wf=class extends Ve{constructor(){super(ds,"humans")}};const bf=new wf;let Cf=class extends Ve{constructor(){super(rn,"phones")}};const Sf=new Cf;class kf{constructor(t){d(this,"id");d(this,"nameRus","");J.BuildClass(this,t)}}var xf=Object.defineProperty,Ef=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&xf(t,o,r),r};class ca{constructor(t){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);J.BuildClass(this,t)}}Ef([J.GetClassConstructor(kf)],ca.prototype,"fields");let Bf=class extends Ve{constructor(){super(ca,"schemas")}};const Vf=new Bf;class da{constructor(t){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);J.BuildClass(this,t)}}class Nf{constructor(t){d(this,"id");d(this,"name","");d(this,"label","");J.BuildClass(this,t)}}var $f=Object.defineProperty,ua=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&$f(t,o,r),r};class Dn{constructor(t){d(this,"id");d(this,"key","");d(this,"label","");d(this,"order",0);d(this,"route","");d(this,"table","");d(this,"active",!0);d(this,"searchColumn","");d(this,"descriptionColumn","");d(this,"labelColumn","");d(this,"valueColumn","");d(this,"options",[]);d(this,"searchGroupMetaColumns",[]);J.BuildClass(this,t)}}ua([J.GetClassConstructor(da)],Dn.prototype,"options"),ua([J.GetClassConstructor(Nf)],Dn.prototype,"searchGroupMetaColumns");class Ji{constructor(t){d(this,"query","");d(this,"key","");d(this,"params","");d(this,"suggester",!1);d(this,"mustBeTranslated",!0);d(this,"options",[]);d(this,"searchGroupId","");d(this,"searchGroups",[]);d(this,"searchGroup",new Dn);d(this,"searchObjects",[]);d(this,"pagination",new Ao);d(this,"count",0);t&&(this.query=t.query,t.searchGroups&&(this.searchGroups=t.searchGroups.map(o=>new Dn(o))),t.searchGroup&&(this.searchGroup=new Dn(t.searchGroup)),t.options&&(this.options=t.options.map(o=>new da(o))),this.count=t.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(t){const o=this.searchGroups.find(i=>i.id===t);o?this.searchGroup=o:this.searchGroup=new Dn}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Et.Route().query.groupId)}setQuery(){const t=Et.Route().query.query;t&&(this.query=t)}}let Tf=class{constructor(){d(this,"isSearchDrawerOpen",e.ref(!1));d(this,"searchModel",e.reactive(new Ji));d(this,"searchGroups",e.reactive([]));d(this,"count",0)}async Search(t){const o=await Ce.Get({query:`search?key=${t.key}&query=${t.query}`});o&&o.searchGroup&&o.searchGroup.options.forEach(i=>{t.searchObjects.push({id:i.id,value:i.value,label:i.label,description:i.description})})}async mainSearch(t){this.SetSearchModel(await Ce.Get({query:`search/main?searchModel=${t.toUrl()}`}))}async Full(t){t.options=[],t.searchGroups.forEach(i=>{i.options=[]});const o=await Ce.Get({query:`search/main?searchModel=${t.toUrl()}`});return this.SetSearchModel(o),o}ToggleDrawer(t){this.isSearchDrawerOpen.value=t,this.searchModel=new Ji}SetSearchModel(t){t&&(this.searchModel=new Ji(t))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Ki=new Tf;let Pf=class extends Ve{constructor(){super(Io,"users-accounts")}};const Mf=new Pf;var We=(n=>(n.String="string",n.Text="text",n.Number="number",n.Date="date",n.DateTime="dateTime",n.Radio="radio",n.Set="set",n.Boolean="boolean",n.Files="files",n.File="file",n.MatrixRadio="matrixRadio",n.MatrixSet="matrixSet",n))(We||{});class fa{constructor(t){d(this,"id");d(this,"name",We.String);d(this,"valueRelation",Xi.simple);J.BuildClass(this,t)}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 If=class extends Ve{constructor(){super(fa,"value-types")}};const Rf=new If;let ma=(lt=class{},d(lt,"Auth",cf),d(lt,"Contacts",mf),d(lt,"Emails",pf),d(lt,"FileInfos",new Ve(kt,"file-infos")),d(lt,"FTSPPresets",yf),d(lt,"Humans",bf),d(lt,"Phones",Sf),d(lt,"Schemas",Vf),d(lt,"UserAccounts",Mf),d(lt,"ValueTypes",Rf),d(lt,"Search",Ki),lt);var jt=(n=>(n.XS="xs",n.S="s",n.M="m",n.L="l",n.XL="xl",n))(jt||{});let Af=(Yt=class{},d(Yt,"Orders",ut),d(Yt,"Sizes",jt),d(Yt,"Statuses",pe),d(Yt,"DataTypes",Re),d(Yt,"ValueTypes",We),d(Yt,"Operators",Be),Yt);class zf{constructor(){d(this,"title","");d(this,"buttons",[]);d(this,"editTitle",e.ref(!1));d(this,"showEdit",e.ref(!1))}Set(t="",o){typeof t=="function"?this.title=t():typeof t=="string"?this.title=t:this.title=t.value,this.buttons=o}}const Df=new zf;class Ff{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(t){this.menu=t}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(t=>{var o;return Ee.SearchIn(t.name,this.filterString)||((o=t.children)==null?void 0:o.some(i=>Ee.SearchIn(i.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(t){this.path=t}GetPath(){return this.path}SetFilter(t){this.filterString=t}GetChildren(t){var o;return this.filterString?(o=t.children)==null?void 0:o.filter(i=>Ee.SearchIn(i.name,this.filterString)):t.children}}const Of=new Ff;class Lf{constructor(){d(this,"Menu",e.reactive(Of));d(this,"Head",e.reactive(Df))}}const _f=new Lf,ha="Да",pa="Нет";class Hf extends Vn{constructor(){super(...arguments);d(this,"confirmButtonText",ha);d(this,"cancelButtonText",pa);d(this,"persistent",!0);d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(o){const i=typeof o=="string"?{text:o}:o;return this.confirmButtonText=i.confirmButtonText??ha,this.cancelButtonText=i.cancelButtonText??pa,this.persistent=i.persistent??!0,super.showMessage(i,this.type),new Promise((r,s)=>{if(this.resolve=r,this.reject=s,typeof C.Dialog.create!="function"){console.warn("[sprof] Quasar Dialog plugin is not installed. Add `app.use(Quasar, { plugins: { Dialog } })` (imported from 'quasar') to your app."),this.Settle(()=>s({type:"cancel"}));return}const a=C.Dialog.create({title:this.title||void 0,message:this.text,html:Vn.ContainsHtml(this.text),persistent:this.persistent,ok:{label:this.confirmButtonText,flat:!0,color:"primary"},cancel:{label:this.cancelButtonText,flat:!0,color:"warning"}});a.onOk(()=>this.Settle(()=>r({type:"submit"}))),a.onCancel(()=>this.Settle(()=>s({type:"cancel"}))),a.onDismiss(()=>this.Settle())})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.Settle(()=>{var o;return(o=this.resolve)==null?void 0:o.call(this,!0)})}Cancel(){this.Settle(()=>{var o;return(o=this.reject)==null?void 0:o.call(this)})}Settle(o){o==null||o(),this.resolve=void 0,this.reject=void 0}}const Uf=new Hf;class vf{constructor(){d(this,"visible",!1)}hide(){this.visible=!1}show(){this.hide(),this.visible=!0}IsVisible(){return this.visible}}class qf extends vf{Show(){super.show()}Hide(){super.hide()}}const jf=new qf;class Wt{}d(Wt,"Admin",_f),d(Wt,"Dialog",Uf),d(Wt,"Loading",jf),d(Wt,"Notify",Nn),d(Wt,"Btn",on),d(Wt,"Input",ns);class D{}d(D,"Auth",e.reactive(Oe)),d(D,"UI",e.reactive(Wt)),d(D,"Paginator",e.reactive(ra)),d(D,"S",ma),d(D,"H",rf),d(D,"C",Ec),d(D,"T",Af),d(D,"I",af),d(D,"F",Tc);const fo=e.defineComponent({inheritAttrs:!1,__name:"PBadge",props:{label:{type:[String,Number],default:void 0},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},floating:{type:Boolean,default:!1},multiLine:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1}},setup(n){const t=e.useAttrs(),o=e.computed(()=>{const i={};for(const r of Object.keys(t))["label","color","text-color","outline","rounded","floating","multi-line","transparent"].includes(r)||(i[r]=t[r]);return i});return(i,r)=>(e.openBlock(),e.createBlock(e.unref(C.QBadge),e.mergeProps(e.unref(o),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,rounded:n.rounded,floating:n.floating,"multi-line":n.multiLine,transparent:n.transparent}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["label","color","text-color","outline","rounded","floating","multi-line","transparent"]))}}),ne=e.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:jt.M,required:!1},type:{type:String,default:pe.Primary,required:!1},fontSize:{type:String,default:"",required:!1},disabled:{type:Boolean,default:!1,required:!1}},setup(n){const t=n,o=e.useAttrs(),i=e.computed(()=>{const x={};for(const $ of Object.keys(o))["disable","color","size","flat","outline","unelevated","type"].includes($)||(x[$]=o[$]);return x}),r=["submit","button","reset"],s=e.computed(()=>r.includes(t.type)),a=e.computed(()=>s.value?t.type:void 0),c=e.computed(()=>s.value?pe.Primary:t.type),l=e.computed(()=>{const x={};return t.margin&&(x.margin=t.margin),t.padding&&(x.padding=t.padding),t.width&&(x.maxWidth=t.width,x.minWidth=t.width),t.height&&(x.minHeight=t.height,x.maxHeight=t.height),t.fontSize&&(x.fontSize=t.fontSize),x}),u={[pe.Primary]:"primary",[pe.Success]:"positive",[pe.Warning]:"warning",[pe.Error]:"negative",[pe.Info]:"info"},f=e.computed(()=>o.color!==void 0?o.color:u[c.value]??"primary"),m={[jt.XS]:"xs",[jt.S]:"sm",[jt.M]:"md",[jt.L]:"lg",[jt.XL]:"xl"},p=e.computed(()=>o.size!==void 0?o.size:["xs","sm","md","lg","xl"].includes(t.size)?t.size:m[t.size]??"md"),S=e.computed(()=>o.flat!==void 0?o.flat:["text","pag","text_ano"].includes(t.skin)),E=e.computed(()=>o.outline!==void 0?o.outline:t.skin==="invert"),P=e.computed(()=>o.unelevated!==void 0?o.unelevated:t.skin==="base"),V=e.computed(()=>o.disable??t.disabled);return(x,$)=>(e.openBlock(),e.createBlock(e.unref(C.QBtn),e.mergeProps(e.unref(i),{style:e.unref(l),color:e.unref(f),size:e.unref(p),flat:e.unref(S),outline:e.unref(E),unelevated:e.unref(P),disable:e.unref(V),type:e.unref(a),"no-wrap":""}),{default:e.withCtx(()=>[e.renderSlot(x.$slots,"default"),e.createTextVNode(" "+e.toDisplayString(n.text),1)]),_:3},16,["style","color","size","flat","outline","unelevated","disable","type"]))}}),Wf=["innerHTML"],Gf={key:1},er=z(e.defineComponent({__name:"PString",props:{string:{type:String,required:!1,default:""},color:{type:String,required:!1,default:""},fontSize:{type:String,required:!1,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(n){const t=n,o={color:t.color||void 0,fontSize:t.fontSize||void 0,fontWeight:t.fontWeight||void 0,background:t.background||void 0,padding:t.padding||void 0,width:t.width||void 0,maxWidth:t.width||void 0,minWidth:t.minWidth||void 0,margin:t.margin||void 0,justifyContent:t.justifyContent||void 0};return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["string",n.customClass]),style:o,onClick:r[0]||(r[0]=s=>i.$emit("click"))},[e.createVNode(e.unref(C.QItemLabel),null,{default:e.withCtx(()=>[n.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.string},null,8,Wf)):(e.openBlock(),e.createElementBlock("span",Gf,e.toDisplayString(n.string),1))]),_:1})],2))}}),[["__scopeId","data-v-049d3e33"]]),ot=z(e.defineComponent({inheritAttrs:!1,__name:"PTooltip",props:{tooltipText:{type:String,default:void 0,required:!1},timeout:{type:Number,default:0,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(n){const t=n,o=e.useAttrs(),i=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="delay"&&(l[u]=o[u]);return l}),r={primary:"var(--q-primary)",success:"var(--q-positive)",warning:"var(--q-warning)",danger:"var(--q-negative)",neutral:"var(--q-dark)"},s=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"top":"bottom"} ${l}`}),a=e.computed(()=>{const l=t.relPosition==="left"?"right":"left";return`${t.level==="top"?"bottom":"top"} ${l}`}),c=e.computed(()=>({background:r[t.typeStyle],whiteSpace:"pre",height:t.height,borderRadius:"2px",display:"flex",justifyContent:"center",alignItems:"center"}));return(l,u)=>n.tooltipText?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0},e.unref(i),{class:"tooltip-wrapper"}),[e.renderSlot(l.$slots,"default",{},void 0,!0),e.createVNode(e.unref(C.QTooltip),{delay:n.timeout,anchor:e.unref(s),self:e.unref(a),class:"tooltip-box",style:e.normalizeStyle(e.unref(c))},{default:e.withCtx(()=>[e.createVNode(er,{string:n.tooltipText,padding:"0 3px",height:n.height},null,8,["string","height"])]),_:1},8,["delay","anchor","self","style"])],16)):(e.openBlock(),e.createBlock(e.unref(C.QTooltip),e.mergeProps({key:1},e.unref(i),{delay:n.timeout,class:"tooltip-box"}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),_:3},16,["delay"]))}}),[["__scopeId","data-v-ee5e83fd"]]),Vt={title:"Контактная информация",phonesTitle:"Телефоны",emailsTitle:"Электронная почта",addPhone:"Добавить телефон",addEmail:"Добавить email",noPhones:"Нет телефонных номеров",noEmails:"Нет email адресов",copied:"Скопировано в буфер обмена",copiedNumber:"Номер скопирован в буфер обмена",copiedEmail:"Email скопирован в буфер обмена",saved:"Сохранено",deleted:"Удалено",enterPhone:"Введите номер телефона",enterEmail:"Введите email адрес"},Je=z(e.defineComponent({inheritAttrs:!1,__name:"PInput",props:e.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},width:{type:String,required:!1,default:""},mask:{type:String,required:!1,default:void 0},borderColor:{type:String,default:"",required:!1},color:{type:String,default:"",required:!1},rules:{type:Array,required:!1,default:void 0},error:{type:Boolean,default:!1},errorMessage:{type:String,default:"",required:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"modelValue"),s=e.useAttrs(),a=e.computed(()=>typeof s.id=="string"?s.id:void 0),c=e.computed(()=>{const y={};for(const N of Object.keys(s))N!=="id"&&N!=="disable"&&(y[N]=s[N]);return y}),l=n,u=e.computed(()=>{var y;return!!((y=l.rules)!=null&&y.length)}),f=e.computed(()=>s.disable??l.disabled),m=e.ref(null);function p(){var y;(y=m.value)==null||y.focus()}function S(){var y;(y=m.value)==null||y.blur()}function E(){var y;(y=m.value)==null||y.select()}function P(){var y;return(y=m.value)==null?void 0:y.getNativeElement()}async function V(){var y;return await((y=m.value)==null?void 0:y.validate())??!0}function x(){var y;(y=m.value)==null||y.resetValidation()}t({focus:p,blur:S,select:E,getNativeElement:P,validate:V,resetValidation:x});const $=()=>{i("input",r.value)},b=e.computed(()=>{const y={};return l.margin&&(y.margin=l.margin),l.padding&&(y.padding=l.padding),l.width&&(y.width=l.width),l.borderColor&&(y["--p-border-color"]=l.borderColor),y});return(y,N)=>(e.openBlock(),e.createBlock(e.unref(C.QInput),e.mergeProps({ref_key:"input",ref:m,modelValue:r.value,"onUpdate:modelValue":N[0]||(N[0]=I=>r.value=I)},e.unref(c),{for:e.unref(a),label:n.label||void 0,mask:n.mask,disable:e.unref(f),rules:n.rules,error:n.error,"error-message":n.errorMessage,"hide-bottom-space":!n.error&&!n.errorMessage&&!e.unref(u),"input-style":{color:n.color||void 0},style:e.unref(b),class:"p-input",outlined:"",dense:"","onUpdate:modelValue":$,onBlur:N[1]||(N[1]=I=>y.$emit("blur",r.value)),onFocus:N[2]||(N[2]=I=>y.$emit("focus",r.value)),onClear:N[3]||(N[3]=I=>y.$emit("clear"))}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(y.$slots,"before",{},()=>[e.renderSlot(y.$slots,"default",{},void 0,!0)],!0)]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append",{},()=>[e.renderSlot(y.$slots,"right",{},void 0,!0)],!0)]),_:2},[y.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"prepend",{},void 0,!0)]),key:"0"}:void 0,y.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after",{},void 0,!0)]),key:"1"}:void 0,y.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"label",{},void 0,!0)]),key:"2"}:void 0,y.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"error",{},void 0,!0)]),key:"3"}:void 0,y.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"hint",{},void 0,!0)]),key:"4"}:void 0,y.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"counter",{},void 0,!0)]),key:"5"}:void 0,y.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"loading",{},void 0,!0)]),key:"6"}:void 0]),1040,["modelValue","for","label","mask","disable","rules","error","error-message","hide-bottom-space","input-style","style"]))}}),[["__scopeId","data-v-7c6dfabd"]]),un=e.defineComponent({inheritAttrs:!1,__name:"PDialog",props:{modelValue:{type:Boolean,default:!1,required:!1},persistent:{type:Boolean,default:!1},maximized:{type:Boolean,default:!1},transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"}},emits:["update:modelValue"],setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.ref(i.modelValue);e.watch(()=>i.modelValue,p=>{s.value=p},{immediate:!0});const a=p=>{s.value=p,r("update:modelValue",p)};t({show:()=>a(!0),hide:()=>a(!1),toggle:()=>a(!s.value),opened:s});const f=e.useAttrs(),m=e.computed(()=>{const p={};for(const S of Object.keys(f))["modelValue","persistent","maximized","transition-show","transition-hide","onUpdate:modelValue"].includes(S)||(p[S]=f[S]);return p});return(p,S)=>(e.openBlock(),e.createBlock(e.unref(C.QDialog),e.mergeProps({modelValue:e.unref(s),"onUpdate:modelValue":S[0]||(S[0]=E=>e.isRef(s)?s.value=E:null)},e.unref(m),{persistent:n.persistent,maximized:n.maximized,"transition-show":n.transitionShow,"transition-hide":n.transitionHide,"onUpdate:modelValue":a}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:2},[p.$slots.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"title")]),key:"0"}:void 0,p.$slots.header?{name:"header",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"header")]),key:"1"}:void 0,p.$slots.body?{name:"body",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"body")]),key:"2"}:void 0,p.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"footer")]),key:"3"}:void 0]),1040,["modelValue","persistent","maximized","transition-show","transition-hide"]))}}),Qf={class:"q-mb-md"},Yf={class:"text-subtitle1 text-weight-medium text-grey-9"},Xf={class:"text-caption text-grey-6 q-mt-xs"},mo=e.defineComponent({__name:"PContactFormDeleteDialog",props:e.mergeModels({title:{type:String,default:"Удалить элемент?"},subtitle:{type:String,default:"Это действие нельзя отменить."},loading:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["confirm"],["update:modelValue"]),setup(n){const t=C.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(un,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{style:{width:"340px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),{class:"column items-center q-pt-xl q-pb-sm text-center"},{default:e.withCtx(()=>[e.createElementVNode("div",Qf,[e.createVNode(e.unref(C.QIcon),{name:"delete_outline",size:"40px",color:"negative"})]),e.createElementVNode("div",Yf,e.toDisplayString(n.title),1),e.createElementVNode("div",Xf,e.toDisplayString(n.subtitle),1)]),_:1}),e.createVNode(e.unref(C.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{unelevated:"",label:"Удалить",color:"negative",loading:n.loading,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("confirm"))},null,8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),Zf={class:"q-mr-md"},Jf={class:"text-subtitle1 text-weight-medium text-grey-9"},ho=e.defineComponent({__name:"PContactFormEditDialog",props:e.mergeModels({icon:{type:String,default:"edit"},title:{type:String,default:"Редактирование"},saving:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["save"],["update:modelValue"]),setup(n){const t=C.ClosePopup,o=e.useModel(n,"modelValue");return(i,r)=>(e.openBlock(),e.createBlock(un,{modelValue:o.value,"onUpdate:modelValue":r[1]||(r[1]=s=>o.value=s),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{style:{width:"380px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createElementVNode("div",Zf,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:n.icon,color:"primary",size:"md",disable:!0},null,8,["icon"])]),e.createElementVNode("div",Jf,e.toDisplayString(n.title),1),e.createVNode(e.unref(C.QSpace)),e.withDirectives(e.createVNode(ne,{flat:"",round:"",dense:"",icon:"close",size:"sm",color:"grey-6"},null,512),[[e.unref(t)]])]),_:1}),e.createVNode(e.unref(C.QCardSection),{class:"q-pt-md"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3}),e.createVNode(e.unref(C.QCardActions),{class:"q-px-lg q-pb-lg justify-between"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne,{flat:"",label:"Отмена",color:"grey-7","no-caps":""},null,512),[[e.unref(t)]]),e.createVNode(ne,{unelevated:"",label:"Сохранить",color:"primary",loading:n.saving,"no-caps":"",onClick:r[0]||(r[0]=s=>i.$emit("save"))},null,8,["loading"])]),_:1})]),_:3})]),_:3},8,["modelValue"]))}}),Kf={class:"q-mt-sm"},em={class:"row items-center justify-between q-mb-xs q-px-xs"},tm={class:"row items-center q-gutter-xs"},nm={class:"text-uppercase text-caption text-weight-medium text-grey-7"},om={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},im={style:{"min-width":"0"}},rm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},sm={key:0,class:"text-caption text-grey-6 ellipsis"},am={class:"row items-center no-wrap q-gutter-xs"},lm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},cm={class:"text-body2 text-grey-7"},fn=z(e.defineComponent({__name:"PContactFormViewEmails",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.emails(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),p=e.ref(!1),S=e.ref(-1),E=async y=>{y&&(await navigator.clipboard.writeText(y),D.UI.Notify.Success(o.value.copiedEmail))},P=y=>{var N,I;s.value=y,a.value=i.value[y],c.value=t.adapter.emailValue(i.value[y]),l.value=((I=(N=t.adapter).emailDescription)==null?void 0:I.call(N,i.value[y]))??"",r.value=!0},V=async()=>{if(!a.value||!c.value){D.UI.Notify.Warning(o.value.enterEmail);return}u.value=!0;try{Object.assign(a.value,{...a.value,email:c.value,description:l.value}),await t.adapter.updateEmail(a.value),r.value=!1,D.UI.Notify.Success(o.value.saved)}catch{D.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},x=async()=>{f.value=!0;try{await t.adapter.addEmail(t.contact),P(i.value.length-1)}catch{D.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},$=y=>{S.value=y,p.value=!0},b=async()=>{var y,N;m.value=!0;try{const I=i.value[S.value];await t.adapter.removeEmail((N=(y=t.adapter).emailId)==null?void 0:N.call(y,I)),i.value.splice(S.value,1),p.value=!1,D.UI.Notify.Success(o.value.deleted)}catch{D.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(y,N)=>(e.openBlock(),e.createElementBlock("div",Kf,[e.createElementVNode("div",em,[e.createElementVNode("div",tm,[e.createVNode(e.unref(C.QIcon),{name:"email",size:"16px",color:"primary"}),e.createElementVNode("span",nm,e.toDisplayString(e.unref(o).emailsTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(fo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:x},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(I,j)=>{var se,ze,Te,Ne,et,pt;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).emailId)==null?void 0:ze.call(se,I))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",y.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",om,[e.createVNode(e.unref(C.QIcon),{name:"email",size:"16px",color:"positive"}),e.createElementVNode("div",im,[e.createElementVNode("div",rm,e.toDisplayString(n.adapter.emailValue(I)),1),(Ne=(Te=n.adapter).emailDescription)!=null&&Ne.call(Te,I)?(e.openBlock(),e.createElementBlock("div",sm,e.toDisplayString((pt=(et=n.adapter).emailDescription)==null?void 0:pt.call(et,I)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",am,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>E(n.adapter.emailValue(I))},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[4]||(N[4]=[e.createTextVNode("Скопировать email",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>P(j)},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[5]||(N[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>$(j)},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[6]||(N[6]=[e.createTextVNode("Удалить email",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",lm,[e.createVNode(e.unref(C.QIcon),{name:"email",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",cm,e.toDisplayString(e.unref(o).noEmails),1),N[7]||(N[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать email",-1)),e.createVNode(ne,{icon:"add",label:"Добавить email",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:x},null,8,["loading"])])),e.createVNode(ho,{modelValue:e.unref(r),"onUpdate:modelValue":N[2]||(N[2]=I=>e.isRef(r)?r.value=I:null),icon:"email",title:"Редактирование email",saving:e.unref(u),onSave:V},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Je,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":N[0]||(N[0]=I=>e.isRef(c)?c.value=I:null),dense:"",autofocus:"",label:"Email адрес",type:"email",class:"q-mb-md",rules:[I=>!!I||e.unref(o).enterEmail,I=>!I||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(I)||"Некорректный email"],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"email",color:"primary"})]),_:1},8,["modelValue","rules"])):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(Je,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":N[1]||(N[1]=I=>e.isRef(l)?l.value=I:null),dense:"",label:"Описание (например: Рабочая, Личная)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(mo,{modelValue:e.unref(p),"onUpdate:modelValue":N[3]||(N[3]=I=>e.isRef(p)?p.value=I:null),title:"Удалить email адрес?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:b},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-7446b74e"]]),dm={class:"q-mt-sm"},um={class:"row items-center justify-between q-mb-xs q-px-xs"},fm={class:"row items-center q-gutter-xs"},mm={class:"text-uppercase text-caption text-weight-medium text-grey-7"},hm={class:"row items-center q-gutter-sm",style:{"min-width":"0",flex:"1"}},pm={style:{"min-width":"0"}},gm={class:"text-body2 text-weight-medium text-grey-9 ellipsis"},ym={key:0,class:"text-caption text-grey-6 ellipsis"},wm={class:"row items-center no-wrap q-gutter-xs"},bm={key:1,class:"column items-center q-py-lg bg-grey-1 rounded-borders"},Cm={class:"text-body2 text-grey-7"},mn=z(e.defineComponent({__name:"PContactFormViewPhones",props:{presetted:{},contact:{},adapter:{},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.ref(!1),s=e.ref(-1),a=e.ref(null),c=e.ref(""),l=e.ref(""),u=e.ref(!1),f=e.ref(!1),m=e.ref(!1),p=e.ref(!1),S=e.ref(-1),E=async y=>{y&&(await navigator.clipboard.writeText(y),D.UI.Notify.Success(o.value.copiedNumber))},P=y=>{var N,I;s.value=y,a.value=i.value[y],c.value=t.adapter.phoneNumber(i.value[y]),l.value=((I=(N=t.adapter).phoneDescription)==null?void 0:I.call(N,i.value[y]))??"",r.value=!0},V=async()=>{if(!a.value||!c.value){D.UI.Notify.Warning(o.value.enterPhone);return}u.value=!0;try{Object.assign(a.value,{...a.value,number:c.value,description:l.value}),await t.adapter.updatePhone(a.value),r.value=!1,D.UI.Notify.Success(o.value.saved)}catch{D.UI.Notify.Error("Ошибка при сохранении")}finally{u.value=!1}},x=async()=>{f.value=!0;try{await t.adapter.addPhone(t.contact),P(i.value.length-1)}catch{D.UI.Notify.Error("Ошибка при добавлении")}finally{f.value=!1}},$=y=>{S.value=y,p.value=!0},b=async()=>{var y,N;m.value=!0;try{const I=i.value[S.value];await t.adapter.removePhone((N=(y=t.adapter).phoneId)==null?void 0:N.call(y,I)),i.value.splice(S.value,1),p.value=!1,D.UI.Notify.Success(o.value.deleted)}catch{D.UI.Notify.Error("Ошибка при удалении")}finally{m.value=!1}};return(y,N)=>(e.openBlock(),e.createElementBlock("div",dm,[e.createElementVNode("div",um,[e.createElementVNode("div",fm,[e.createVNode(e.unref(C.QIcon),{name:"phone",size:"16px",color:"primary"}),e.createElementVNode("span",mm,e.toDisplayString(e.unref(o).phonesTitle),1),e.unref(i).length>0?(e.openBlock(),e.createBlock(fo,{key:0,rounded:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(ne,{flat:"",dense:"",icon:"add",label:"Добавить",size:"sm",color:"primary","no-caps":"",loading:e.unref(f),onClick:x},null,8,["loading"])]),e.unref(i).length>0?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:0,name:"list",tag:"div",class:"column q-gutter-xs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(I,j)=>{var se,ze,Te,Ne,et,pt;return e.openBlock(),e.createElementBlock("div",{key:((ze=(se=n.adapter).phoneId)==null?void 0:ze.call(se,I))??j,class:e.normalizeClass(["row items-center justify-between q-pa-sm bg-grey-1 rounded-borders",y.$q.dark.isActive?"":"hover-item"]),style:{border:"1px solid transparent",transition:"all 0.2s ease"}},[e.createElementVNode("div",hm,[e.createVNode(e.unref(C.QIcon),{name:"phone",size:"16px",color:"positive"}),e.createElementVNode("div",pm,[e.createElementVNode("div",gm,e.toDisplayString(n.adapter.phoneNumber(I)),1),(Ne=(Te=n.adapter).phoneDescription)!=null&&Ne.call(Te,I)?(e.openBlock(),e.createElementBlock("div",ym,e.toDisplayString((pt=(et=n.adapter).phoneDescription)==null?void 0:pt.call(et,I)),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",wm,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:ye=>E(n.adapter.phoneNumber(I))},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[4]||(N[4]=[e.createTextVNode("Скопировать номер",-1)])]),_:1})]),_:1},8,["onClick"]),e.createVNode(ne,{flat:"",round:"",dense:"",icon:"edit",size:"sm",color:"grey-6",onClick:ye=>P(j)},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[5]||(N[5]=[e.createTextVNode("Редактировать",-1)])]),_:1})]),_:1},8,["onClick"]),j>=n.presetted?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",round:"",dense:"",icon:"delete",size:"sm",color:"negative",onClick:ye=>$(j)},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...N[6]||(N[6]=[e.createTextVNode("Удалить номер",-1)])]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2)}),128))]),_:1})):(e.openBlock(),e.createElementBlock("div",bm,[e.createVNode(e.unref(C.QIcon),{name:"phone",size:"32px",color:"grey-4",class:"q-mb-sm"}),e.createElementVNode("div",Cm,e.toDisplayString(e.unref(o).noPhones),1),N[7]||(N[7]=e.createElementVNode("div",{class:"text-caption text-grey-5 q-mb-sm"},"Нажмите «Добавить», чтобы указать номер",-1)),e.createVNode(ne,{icon:"add",label:"Добавить телефон",color:"primary",outline:"",size:"sm",loading:e.unref(f),onClick:x},null,8,["loading"])])),e.createVNode(ho,{modelValue:e.unref(r),"onUpdate:modelValue":N[2]||(N[2]=I=>e.isRef(r)?r.value=I:null),icon:"phone",title:"Редактирование телефона",saving:e.unref(u),onSave:V},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(Je,{key:0,modelValue:e.unref(c),"onUpdate:modelValue":N[0]||(N[0]=I=>e.isRef(c)?c.value=I:null),mask:n.adapter.phoneMask(e.unref(a)),dense:"",autofocus:"",label:"Номер телефона",class:"q-mb-md",rules:[I=>!!I||e.unref(o).enterPhone],"lazy-rules":"",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"phone",color:"primary"})]),_:1},8,["modelValue","mask","rules"])):e.createCommentVNode("",!0),e.unref(a)&&e.unref(s)>=n.presetted?(e.openBlock(),e.createBlock(Je,{key:1,modelValue:e.unref(l),"onUpdate:modelValue":N[1]||(N[1]=I=>e.isRef(l)?l.value=I:null),dense:"",label:"Описание (например: Рабочий, Личный)",outlined:"","bg-color":"grey-1"},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"notes",color:"grey-6"})]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","saving"]),e.createVNode(mo,{modelValue:e.unref(p),"onUpdate:modelValue":N[3]||(N[3]=I=>e.isRef(p)?p.value=I:null),title:"Удалить телефонный номер?",subtitle:"Это действие нельзя отменить.",loading:e.unref(m),onConfirm:b},null,8,["modelValue","loading"])]))}}),[["__scopeId","data-v-ea5459be"]]),Sm={class:"row items-center q-gutter-sm"},km={class:"text-weight-medium text-grey-9"},xm=e.defineComponent({__name:"PContactForm",props:{contact:{},adapter:{},title:{default:Vt.title},phonesPresetted:{default:3},emailsPresetted:{default:2},margin:{default:"0"},labels:{}},setup(n){const t=n,o=e.computed(()=>({...Vt,...t.labels})),i=e.computed(()=>t.adapter.phones(t.contact)),r=e.computed(()=>t.adapter.emails(t.contact)),s=e.computed(()=>t.adapter.copyAll(t.contact)),a=e.ref(!1),c=()=>{a.value=!a.value},l=async()=>{const u=s.value;u&&(await navigator.clipboard.writeText(u),D.UI.Notify.Success(o.value.copied))};return(u,f)=>(e.openBlock(),e.createBlock(e.unref(C.QCard),{flat:"",bordered:"",class:"contact-form-card",style:e.normalizeStyle({margin:n.margin})},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"row items-center cursor-pointer q-py-sm q-px-md bg-grey-1",onClick:c},[e.createElementVNode("div",Sm,[e.createVNode(ne,{flat:"",round:"",dense:"",icon:e.unref(a)?"keyboard_arrow_right":"keyboard_arrow_down",size:"sm",color:"grey-6"},null,8,["icon"]),e.createVNode(e.unref(C.QIcon),{name:"contact_phone",size:"18px",color:"primary"}),e.createElementVNode("span",km,e.toDisplayString(n.title),1),e.unref(i).length+e.unref(r).length>0?(e.openBlock(),e.createBlock(fo,{key:0,outline:"",color:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).length+e.unref(r).length),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(C.QSpace)),e.createElementVNode("div",{class:"row items-center q-gutter-xs",onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},[e.unref(s)?(e.openBlock(),e.createBlock(ne,{key:0,flat:"",dense:"",round:"",icon:"content_copy",size:"sm",color:"grey-6",onClick:l},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...f[1]||(f[1]=[e.createTextVNode("Скопировать все контакты",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(C.QSlideTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createVNode(e.unref(C.QSeparator)),e.createVNode(e.unref(C.QCardSection),{class:"q-pt-xs q-pb-md q-px-md"},{default:e.withCtx(()=>[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"]),e.createVNode(e.unref(C.QSeparator),{class:"q-my-sm"}),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(o)},null,8,["contact","adapter","presetted","labels"])]),_:1})],512),[[e.vShow,!e.unref(a)]])]),_:1})]),_:1},8,["style"]))}}),tr=z(xm,[["__scopeId","data-v-327b9235"]]),Em={class:"contact-edit-wrapper"},nr=z(e.defineComponent({__name:"PContactFormEdit",props:{contact:{},adapter:{},phonesPresetted:{default:3},emailsPresetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Em,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.phonesPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"edit-sections-divider"},null,-1)),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.emailsPresetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-8548f1de"]]),Bm={class:"edit-emails-wrapper"},or=z(e.defineComponent({__name:"PContactFormEditEmails",props:{contact:{},adapter:{},presetted:{default:2},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Bm,[e.createVNode(fn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-2f0b3c6b"]]),Vm={class:"edit-phones-wrapper"},ir=z(e.defineComponent({__name:"PContactFormEditPhones",props:{contact:{},adapter:{},presetted:{default:3},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Vm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,presetted:n.presetted,labels:e.unref(t)},null,8,["contact","adapter","presetted","labels"])]))}}),[["__scopeId","data-v-59e80623"]]),Nm={class:"contact-view-wrapper"},rr=z(e.defineComponent({__name:"PContactFormView",props:{contact:{},adapter:{},labels:{}},setup(n){const t=e.computed(()=>({...Vt}));return(o,i)=>(e.openBlock(),e.createElementBlock("div",Nm,[e.createVNode(mn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"]),i[0]||(i[0]=e.createElementVNode("div",{class:"view-sections-divider"},null,-1)),e.createVNode(fn,{contact:n.contact,adapter:n.adapter,labels:e.unref(t)},null,8,["contact","adapter","labels"])]))}}),[["__scopeId","data-v-f1271bd5"]]);function ga(n){n.component("PContactForm",tr),n.component("PContactFormDeleteDialog",mo),n.component("PContactFormEdit",nr),n.component("PContactFormEditDialog",ho),n.component("PContactFormEditEmails",or),n.component("PContactFormEditPhones",ir),n.component("PContactFormView",rr),n.component("PContactFormViewEmails",fn),n.component("PContactFormViewPhones",mn)}const $m=Object.freeze(Object.defineProperty({__proto__:null,PContactForm:tr,PContactFormDeleteDialog:mo,PContactFormEdit:nr,PContactFormEditDialog:ho,PContactFormEditEmails:or,PContactFormEditPhones:ir,PContactFormView:rr,PContactFormViewEmails:fn,PContactFormViewPhones:mn,default:ga,defaultContactsLabels:Vt},Symbol.toStringTag,{value:"Module"}));class hn{constructor(t){d(this,"id");d(this,"name","");d(this,"score",0);d(this,"order",0);d(this,"showMoreQuestions",!1);d(this,"showOther",!1);d(this,"fieldId");d(this,"isMatrixY",!1);D.H.Classes.BuildClass(this,t)}static Create(t){const o=new hn;return o.id=D.H.Id.UUID(),o.fieldId=t,o}}class ya{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");D.H.Classes.BuildClass(this,t)}}class sr{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);D.H.Classes.BuildClass(this,t)}}class Fn{constructor(t){d(this,"id");d(this,"name","");d(this,"fieldId");D.H.Classes.BuildClass(this,t)}static Create(t){const o=new Fn;return o.id=D.H.Id.UUID(),o.fieldId=t,o}}var Tm=Object.defineProperty,po=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Tm(t,o,r),r};const pn=class bi{constructor(t){d(this,"id");d(this,"name","");d(this,"code","");d(this,"valueTypeId");d(this,"order",0);d(this,"ageCompare",!1);d(this,"answerVariants",[]);d(this,"answerVariantsForDelete",[]);d(this,"fieldExamples",[]);d(this,"fieldVariants",[]);d(this,"valueType",new fa);d(this,"fieldMeasures",[]);d(this,"showSet",!1);d(this,"showRadio",!1);d(this,"isEdit",!1);d(this,"children",[]);d(this,"parentId");d(this,"formSectionId");d(this,"selected",!1);D.H.Classes.BuildClass(this,t),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(t=>!t.isMatrixY)}getMatrixY(){return this.answerVariants.filter(t=>t.isMatrixY)}static Create(t){const o=new bi;return o.id=D.H.Id.UUID(),o.formSectionId=t,o}getRegisterPropertyRadioOriginalValue(t){const o=this.answerVariants.find(i=>i.id===t);return o?o.name:""}addRadioItem(t){const o=new hn(t);o.order=this.answerVariants.length,this.answerVariants.push(o)}removeRadioItem(t){const o=this.answerVariants[t].id;o&&this.answerVariantsForDelete.push(o),this.answerVariants.splice(t,1)}changeRelation(t){const o=t.find(i=>i.id===this.valueTypeId);if(o){if(o.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(o.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=o}}editRegisterProperty(t){this.isEdit=t??!this.isEdit}sortExamples(){this.fieldExamples.forEach((t,o)=>t.order=o)}addRegisterPropertyMeasure(t){this.fieldMeasures.push(new sr(t))}addRegisterPropertyVariant(){this.fieldVariants.push(new Fn)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(t){this.valueType=t,this.valueTypeId=t.id}setName(t){this.name=t}addAnswerVariant(){const t=hn.Create(this.id);return t.name="Вариант",t.order=this.answerVariants.length,this.answerVariants.push(t),t}addChild(){const t=bi.Create();return t.parentId=this.id,t.name="Вопрос",t.order=this.children.length,this.children.push(t),t}addFieldVariant(){const t=Fn.Create(this.id);return this.fieldVariants.push(t),t}copy(){const t=new bi(this);return t.id=D.H.Id.UUID(),t.answerVariants.forEach(o=>{o.id=D.H.Id.UUID(),o.fieldId=t.id}),t.children=t.children.map(o=>{const i=o.copy();return i.parentId=t.id,i}),t}};po([D.H.Classes.GetClassConstructor(hn)],pn.prototype,"answerVariants"),po([D.H.Classes.GetClassConstructor(ya)],pn.prototype,"fieldExamples"),po([D.H.Classes.GetClassConstructor(Fn)],pn.prototype,"fieldVariants"),po([D.H.Classes.GetClassConstructor(sr)],pn.prototype,"fieldMeasures"),po([D.H.Classes.GetClassConstructor(pn)],pn.prototype,"children");let Zo=pn;class ar{constructor(t){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new kt);D.H.Classes.BuildClass(this,t)}}class gn{constructor(t){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");D.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new gn;return i.id=qt(),i.fieldFillId=t,i.answerVariantId=o,i}static GetClassName(){return"selectedAnswerVariant"}}var Pm=Object.defineProperty,wa=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Pm(t,o,r),r};const lr=class es{constructor(t){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new kt);d(this,"fileInfoId");d(this,"order",0);d(this,"selectedAnswerVariants",[]);d(this,"patientId");d(this,"fieldId");d(this,"formFillId");d(this,"answerVariantId");d(this,"filled",!1);d(this,"researchResultId");d(this,"answerFiles",[]);d(this,"answerFilesForDelete",[]);D.H.Classes.BuildClass(this,t)}setFilled(t){this.filled=t}static Create(t,o){const i=new es;return i.id=qt(),i.fieldId=t.id,i.formFillId=o,i.order=t.order,i.valueNumber=0,i.valueString="",i.valueDate=new Date,i}setString(t){this.valueString=t,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(t){this.valueNumber=t,this.valueNumber&&(this.filled=!0)}setOther(t){this.valueOther=t,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(t){this.valueDate=t,this.filled=!0}setRadio(t){this.answerVariantId=t,this.filled=!!this.answerVariantId}static CreateMany(t,o){return t.map(i=>es.Create(i,o))}addFile(){const t=new ar;return t.id=qt(),t.answerId=this.id,this.answerFiles.push(t),t}getFileInfos(){const t=[];return this.answerFiles.forEach(o=>t.push(o.fileInfo)),t}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(t,o){const i=gn.Create(this.id,t);return i.answerVariantIdY=o,this.selectedAnswerVariants.push(i),this.filled=!0,i}getMatrixValue(t,o){return this.selectedAnswerVariants.find(i=>i.answerVariantId===t&&i.answerVariantIdY===o)}addSelectedAnswerVariant(t){const o=gn.Create(this.id,t);return this.selectedAnswerVariants.push(o),this.filled=!0,o}static GetClassName(){return"answer"}showOther(t){const o=t.find(i=>i.showOther);return o?this.answerVariantId===o.id||this.selectedAnswerVariants.some(i=>i.answerVariantId===o.id):!1}};wa([D.H.Classes.GetClassConstructor(gn)],lr.prototype,"selectedAnswerVariants"),wa([D.H.Classes.GetClassConstructor(ar)],lr.prototype,"answerFiles");let On=lr;class Mm{constructor(t){d(this,"id");d(this,"fieldId");D.H.Classes.BuildClass(this,t)}static GetClassName(){return"fieldFilter"}}var Im=Object.defineProperty,Rm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Im(t,o,r),r};const ba=class Kl{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");D.H.Classes.BuildClass(this,t)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(t){return`${this.getN()}.${t+1}`}getSubFieldN(t,o){return`${this.getFieldN(t)}.${o+1}`}static Create(t){const o=new Kl;return o.id=D.H.Id.UUID(),o.formId=t,o}addField(){const t=Zo.Create(this.id);return this.fields.push(t),this.sortFields(),t}sortFields(){this.fields.forEach((t,o)=>t.order=o)}getAnswerVariants(){const t=[];return this.fields.forEach(o=>t.push(...o.answerVariants)),t}};Rm([D.H.Classes.GetClassConstructor(Zo)],ba.prototype,"fields");let Jo=ba;var Am=Object.defineProperty,zm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Am(t,o,r),r};const Ca=class ec{constructor(t){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"isLaboratory",!1);d(this,"formSections",[]);d(this,"isEdit",!1);d(this,"withDates",!1);d(this,"withScores",!1);d(this,"selectedForExport",!1);d(this,"filterString","");d(this,"showOnlyNotFilled",!1);d(this,"showOnlyFilled",!1);D.H.Classes.BuildClass(this,t)}static GetClassName(){return"Form"}static Create(){const t=new ec;return t.id=D.H.Id.UUID(),t}editRegisterGroup(t){this.isEdit=t??!this.isEdit}addFormSection(){const t=Jo.Create(this.id);return this.formSections.push(t),D.H.Sorter.Sort(this.formSections),t}getFields(){const t=this.formSections.map(i=>i.fields).flat(),o=t.map(i=>i.children).flat();return t.concat(o).filter(i=>i.children.length===0)}};zm([D.H.Classes.GetClassConstructor(Jo)],Ca.prototype,"formSections");let Sa=Ca;var Dm=Object.defineProperty,Fm=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&Dm(t,o,r),r};const ka=class tc{constructor(t){d(this,"id");d(this,"date",new Date);d(this,"editMode",!1);d(this,"userFormId");d(this,"fillingPercentage",0);d(this,"fieldFills",[]);d(this,"num","");d(this,"formId");D.H.Classes.BuildClass(this,t)}static Create(t){const o=new tc;return o.id=D.H.Id.UUID(),o.formId=t.id,o.fieldFills.push(...On.CreateMany(t.getFields(),o.id)),o}addFieldFill(t){this.fieldFills.push(t)}getFieldFill(t){var o;return(o=this.fieldFills)==null?void 0:o.find(i=>i.fieldId===t)}pushRegisterProperty(t){const o=new On;o.researchResultId=t,this.fieldFills.push(o)}getRegisterPropertyToPatient(t){return this.fieldFills.filter(o=>o.researchResultId===t)}getOrCreateFieldFill(t){let o=this.getFieldFill(t.id);return o||(o=On.Create(t),this.addFieldFill(o)),o}getFileInfos(){const t=[];return this.fieldFills.forEach(o=>t.push(...o.getFileInfos())),t}calculateFilling(){const t=this.fieldFills.filter(i=>i.filled).length,o=this.fieldFills.length;this.fillingPercentage=Math.round(t/o*100)}getFieldFillByFieldId(t){return this.fieldFills.find(o=>o.fieldId===t)}getFieldVariantFieldFill(t){return this.fieldFills.find(o=>o.answerVariantId===t)}getFieldsFieldFillsMap(t){const o={};return t.forEach(i=>{var r;if(i.code){const s=(r=this.getFieldFillByFieldId(i.id))==null?void 0:r.valueNumber;o[i.code]=s}}),o}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};Fm([D.H.Classes.GetClassConstructor(On)],ka.prototype,"fieldFills");let xa=ka;const Om=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:hn,Field:Zo,FieldExample:ya,FieldFill:On,FieldFillFile:ar,FieldFilter:Mm,FieldMeasure:sr,FieldVariant:Fn,Form:Sa,FormFill:xa,FormSection:Jo,SelectedAnswerVariant:gn},Symbol.toStringTag,{value:"Module"}));let Lm=class extends Ve{constructor(){super(hn,"answer-variants")}};const _m=new Lm;let Hm=class extends Ve{constructor(){super(On,"field-fills")}};const Um=new Hm;let vm=class extends Ve{constructor(){super(Zo,"fields")}};const qm=new vm;let jm=class extends Ve{constructor(){super(xa,"form-fills")}};const Wm=new jm;let Gm=class extends Ve{constructor(){super(Jo,"form-sections")}};const Qm=new Gm;let Ym=class extends Ve{constructor(){super(Sa,"forms")}};const Xm=new Ym;let Zm=class extends Ve{constructor(){super(gn,"selected-answer-variants")}};const Jm=new Zm,Km=Object.freeze(Object.defineProperty({__proto__:null,C:Om,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:_m,FieldFills:Um,Fields:qm,FormFills:Wm,FormSections:Qm,Forms:Xm,SelectedAnswerVariants:Jm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ko{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"selected",!1);d(this,"hide",!1);d(this,"editMode",!1);d(this,"color","");d(this,"background","");d(this,"order",0);d(this,"menuId");d(this,"iconId");d(this,"icon",new kt);d(this,"iconName","");d(this,"svgCode","");J.BuildClass(this,t)}addFile(t){this.icon.id||(this.icon.id=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}}var eh=Object.defineProperty,th=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&eh(t,o,r),r};class cr{constructor(t){d(this,"id");d(this,"name","");d(this,"link","");d(this,"top",!0);d(this,"side",!0);d(this,"show",!1);d(this,"hide",!1);d(this,"active",!1);d(this,"order",0);d(this,"selected",!1);d(this,"editMode",!1);d(this,"subMenus",[]);d(this,"subMenusForDelete",[]);d(this,"iconId");d(this,"icon",new kt);J.BuildClass(this,t)}withoutChildren(){return this.subMenus.length===0}getFileInfos(){const t=[];return t.push(this.icon),this.subMenus.forEach(o=>{t.push(o.icon)}),t}addFile(t){this.icon.id||(this.icon.id=Xe.UUID()),this.icon.originalName=t.name,this.icon.file=t.raw}addSubMenu(){this.subMenus.push(new Ko)}removeSubMenu(t){const o=this.subMenus[t].id;o&&this.subMenusForDelete.push(o),this.subMenus.splice(t,1)}setColorsForSubMenus(){const t=["#00A248","#E63021","#006BB5","#F3911F","#6F6D6B"];let o=0;this.subMenus.forEach(i=>{i.color=t[o],o=t.length-1?o=0:o++})}containPath(t){return this.link===t||!!this.subMenus.find(o=>o.link===t)}static GetClassName(){return"menu"}}th([J.GetClassConstructor(Ko)],cr.prototype,"subMenus");const nh=Object.freeze(Object.defineProperty({__proto__:null,Menu:cr,SubMenu:Ko},Symbol.toStringTag,{value:"Module"}));let oh=class extends D.H.BaseStore{constructor(){super(cr,"menus")}};const ih=new oh;let rh=class extends D.H.BaseStore{constructor(){super(Ko,"sub-menus")}};const sh=new rh,ah=Object.freeze(Object.defineProperty({__proto__:null,C:nh,S:Object.freeze(Object.defineProperty({__proto__:null,Menus:ih,SubMenus:sh},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class Ft{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"sessionId");d(this,"payload",{});D.H.Classes.BuildClass(this,t)}static Create(t){const o=new Ft;return o.id=D.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}}var lh=Object.defineProperty,ch=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&lh(t,o,r),r};const Ea=class nc{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"startTime","");d(this,"endTime","");d(this,"scheduleId");d(this,"slots",[]);D.H.Classes.BuildClass(this,t)}static Create(t){const o=new nc;return o.id=D.H.Id.UUID(),o.scheduleId=t,o.startTime="9:00",o.endTime="9:30",o}};ch([D.H.Classes.GetClassConstructor(Ft)],Ea.prototype,"slots");let Ln=Ea;var dh=Object.defineProperty,Ba=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&dh(t,o,r),r};const dr=class oc{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"scheduleDayId");d(this,"placeId");d(this,"sessions",[]);d(this,"slots",[]);D.H.Classes.BuildClass(this,t)}static Create(t,o){const i=new oc;return i.id=D.H.Id.UUID(),i.placeId=t,i.scheduleDayId=o,i}addSession(){const t=Ln.Create(this.id);return this.sessions.push(t),t}addSlot(){const t=Ft.Create(this.id);return this.slots.push(t),t}};Ba([D.H.Classes.GetClassConstructor(Ln)],dr.prototype,"sessions"),Ba([D.H.Classes.GetClassConstructor(Ft)],dr.prototype,"slots");let go=dr;var uh=Object.defineProperty,fh=(n,t,o,i)=>{for(var r=void 0,s=n.length-1,a;s>=0;s--)(a=n[s])&&(r=a(t,o,r)||r);return r&&uh(t,o,r),r};const Va=class ic{constructor(t){d(this,"id");d(this,"date",new Date(0));d(this,"description","");d(this,"ownerId");d(this,"ownerType","");d(this,"schedules",[]);D.H.Classes.BuildClass(this,t)}static Create(t,o,i=new Date){const r=new ic;return r.id=D.H.Id.UUID(),r.ownerId=t,r.ownerType=o||"",r.date=i,r}};fh([D.H.Classes.GetClassConstructor(go)],Va.prototype,"schedules");let ei=Va;class _n{constructor(t){d(this,"id");d(this,"name","");d(this,"description","");d(this,"color","");D.H.Classes.BuildClass(this,t)}static Create(){const t=new _n;return t.id=D.H.Id.UUID(),t}}const mh=Object.freeze(Object.defineProperty({__proto__:null,Schedule:go,ScheduleDay:ei,SchedulePlace:_n,ScheduleSession:Ln,ScheduleSlot:Ft},Symbol.toStringTag,{value:"Module"})),ce=n=>n?D.H.Time.HMtoM(n):NaN,Ge=n=>D.H.Time.ConcatHM(Math.floor(n/60),n%60),yn=n=>{if(!n)return"";const t=D.H.Time.HmsToHm(n);return/^\d{1,2}:\d{2}$/.test(t)?t:""},Hn=(n,t)=>D.H.Time.DiffM(n,t),wt=(n,t)=>D.H.Time.AddMtoHM(n,t),ur=(n,t)=>{const o=ce(n.startTime),i=ce(t.startTime);return isFinite(o)?isFinite(i)?o-i:-1:1},yo=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime),r=ce(t.startTime),s=ce(t.endTime);return!isFinite(o)||!isFinite(i)||!isFinite(r)||!isFinite(s)?!1:o<s&&r<i},wo=(n,t)=>Math.round(n/t)*t,Na=(n,t=8*60,o=20*60)=>{let i=t,r=o;for(const{item:c}of n){const l=ce(c.startTime),u=ce(c.endTime);isFinite(l)&&(i=Math.min(i,l)),isFinite(u)&&(r=Math.max(r,u))}const s=Math.floor(i/60)*60,a=Math.ceil(r/60)*60;return{start:s,end:a,total:a-s||60}},$a=(n,t)=>{const o=ce(n.item.startTime),i=ce(n.item.endTime);if(!isFinite(o)||!isFinite(i))return{top:"0%",height:"48px"};const r=(o-t.start)/t.total*100,s=Math.max((i-o)/t.total*100,2.5);return{top:r+"%",height:s+"%"}},Ta=(n,t)=>{const o=ce(n.startTime),i=ce(n.endTime);if(!isFinite(o)||!isFinite(i)||i<=o)return{top:"0%",height:"auto"};const r=i-o,s=ce(t.startTime),a=ce(t.endTime),c=isFinite(s)?Math.max((s-o)/r*100,0):0;let l=isFinite(s)&&isFinite(a)?(a-s)/r*100:8;return l=Math.min(Math.max(l,3),100-c),{top:c+"%",height:l+"%"}},Pa=(n,t,o)=>n.some(i=>i.item.id===t.item.id||t.kind==="session"&&i.kind==="slot"&&i.item.sessionId===t.item.id?!1:o(t.item,i.item)),Ma=(n,t,o)=>n.some(i=>i.id!==t.id&&o(t,i)),Ia=(n,t,o,i)=>{if(!(!isFinite(t)||!isFinite(o)||o<=t))return(n||[]).find(r=>{const s=i(r.startTime),a=i(r.endTime);return isFinite(s)&&isFinite(a)&&t>=s&&o<=a})},Ra=n=>n<26?"h-tiny":n<34?"h-short":n<60?"h-medium":"h-full",fr={hall:"Зал",halls:"Залы",session:"Секция",sessions:"Секции",slot:"Событие",slots:"События",addHall:"Добавить зал",addSession:"Добавить секцию",addSlot:"Добавить событие",addDay:"Добавить день",deleteDay:"Удалить день",deleteHall:"Удалить расписание (зал)",noDays:"Сначала укажите даты",noHalls:"Для этого дня не добавлены залы.",date:"Дата",newHallPlaceholder:"Название нового зала",create:"Создать",close:"Закрыть",save:"Сохранить",cancel:"Отмена",delete:"Удалить",edit:"Редактировать",grid:"Сетка",list:"Список",startTime:"Начало",endTime:"Конец",sessionSelect:"Секция",sessionsTitle:"Секции",slotsTitle:"События",noSlots:"Пусто",noSlotsInDay:"Докладов нет",conflictTitle:"Пересечение с другим блоком в этом зале",changeDurationTitle:"Изменить длительность",gridHint:"Перетаскивайте блоки мышью или пальцем — в другой зал или на другое время. Блоки не сдвигают друг друга: пересечения подсвечиваются красным. Событие, брошенное внутрь секции, автоматически становится её частью. Секции помечены фиолетовым корешком. Клик по блоку — редактирование, нижняя кромка — длительность, двойной клик по пустому месту — новое событие.",listHint:"Перетаскивайте строки — порядок сохраняется, время блоков при этом не меняется.",alreadyAdded:"Зал уже добавлен в этот день",selectDayFirst:"Сначала выберите день",cannotCreate:"Не удалось добавить зал: сервер не ответил",createFailed:"Ошибка при добавлении зала",hallCreated:"Зал «{name}» создан",hallCreateFailed:"Не удалось создать зал",hallNotAdded:"Не удалось добавить зал: сервер не ответил",dayAdded:"День добавлен",saveEventFirst:"Сначала сохраните",correctStartTime:"Укажите корректное время начала",name:"Название",description:"Описание",participants:"Участники",enterName:"Введите название",intoSession:"в секцию",conflictCount:"пересечение"},Aa={createDay(n){return ei.Create(void 0,void 0,n)},createSchedule(n,t){return go.Create(n,t)},createSession(n){const t=(n==null?void 0:n.sessions)||[],o=t[t.length-1],i=(o==null?void 0:o.endTime)||"9:00",r=Ln.Create(n==null?void 0:n.id);return r.startTime=i,r.endTime=D.H.Time.AddMtoHM(i,30),r},createSlot(n){return Ft.Create(n==null?void 0:n.id)},createPlace(n){const t=_n.Create();return t.name=n||"",t}},hh={class:"date-field"},ph=z(e.defineComponent({__name:"DateField",props:{modelValue:{default:""},label:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(""),a=e.computed(()=>{if(!o.modelValue)return"";const u=new Date(`${o.modelValue}T00:00:00`);return isNaN(u.getTime())?o.modelValue:u.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})});e.watch(r,u=>{u&&(s.value=o.modelValue||"")});const c=()=>{i("update:modelValue",s.value),r.value=!1},l=()=>{r.value=!1};return(u,f)=>(e.openBlock(),e.createElementBlock("div",hh,[e.createVNode(e.unref(C.QInput),{"model-value":a.value,label:n.label,dense:"",outlined:"",readonly:"",class:"date-field__input","hide-bottom-space":""},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"event",size:"18px",class:"text-grey-6"})]),append:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"expand_more",size:"18px",class:"cursor-pointer text-grey-6"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{modelValue:r.value,"onUpdate:modelValue":f[1]||(f[1]=m=>r.value=m),"transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{class:"date-field__popup",bordered:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QDate),{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=m=>s.value=m),mask:"YYYY-MM-DD",color:"primary",navigation:"","today-btn":""},null,8,["modelValue"]),e.createVNode(e.unref(C.QCardActions),{align:"right",class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QBtn),{flat:"",dense:"",label:"Отмена",color:"grey-7",onClick:l}),e.createVNode(e.unref(C.QBtn),{flat:"",dense:"",label:"Готово",color:"primary",onClick:c})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model-value","label"])]))}}),[["__scopeId","data-v-5eaf00e0"]]),gh={class:"time-field"},Un=z(e.defineComponent({__name:"TimeField",props:{modelValue:{default:""},label:{default:""}},emits:["update:modelValue"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref("09:00"),a=m=>{const p=/^(\d{1,2}):(\d{2})$/.exec((m??"").trim());return p?`${p[1].padStart(2,"0")}:${p[2]}`:"09:00"},c=m=>{const p=/^(\d{2}):(\d{2})$/.exec(m??"");return p?`${Number(p[1])}:${p[2]}`:m},l=e.computed(()=>o.modelValue||"");e.watch(r,m=>{m&&(s.value=a(o.modelValue))});const u=()=>{i("update:modelValue",c(s.value)),r.value=!1},f=()=>{r.value=!1};return(m,p)=>(e.openBlock(),e.createElementBlock("div",gh,[e.createVNode(e.unref(C.QInput),{"model-value":l.value,label:n.label,dense:"",outlined:"",readonly:"",class:"time-field__input","hide-bottom-space":""},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"schedule",size:"18px",class:"text-grey-6"})]),append:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"expand_more",size:"18px",class:"cursor-pointer text-grey-6"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{modelValue:r.value,"onUpdate:modelValue":p[1]||(p[1]=S=>r.value=S),"transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{class:"time-field__popup",bordered:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QTime),{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=S=>s.value=S),format24h:"",color:"primary",class:"q-pa-sm"},null,8,["modelValue"]),e.createVNode(e.unref(C.QCardActions),{align:"right",class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QBtn),{flat:"",dense:"",label:"Отмена",color:"grey-7",onClick:f}),e.createVNode(e.unref(C.QBtn),{flat:"",dense:"",label:"Готово",color:"primary",onClick:u})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model-value","label"])]))}}),[["__scopeId","data-v-5c1e0137"]]),yh={class:"schedule-admin"},wh={key:0,class:"no-days text-center text-grey q-py-xl"},bh={class:"schedule-toolbar row items-center q-gutter-sm q-mb-md"},Ch={key:5,class:"row items-center q-gutter-xs zoom-control"},Sh={key:0,class:"grid-view"},kh={key:0,class:"text-grey text-center q-py-lg"},xh={class:"grid-header"},Eh={class:"row items-center justify-center q-gutter-xs"},Bh={class:"ellipsis"},Vh={class:"time-gutter"},Nh=["data-schedule-id","onDblclick","onContextmenu"],$h=["title","onPointerdown","onClick","onContextmenu"],Th={class:"block-content"},Ph={class:"block-time"},Mh={class:"block-name ellipsis"},Ih={key:0,class:"block-speakers ellipsis"},Rh={key:0,class:"session-perfoms"},Ah=["title","onPointerdown","onClick","onContextmenu"],zh={class:"nested-time"},Dh={class:"nested-name ellipsis"},Fh={key:0,class:"nested-speakers ellipsis"},Oh=["title","onPointerdown"],Lh={class:"block-actions"},_h=["title","onPointerdown"],Hh=["title"],Uh={class:"session-spine-name"},vh={class:"block-time"},qh={key:0,class:"session-badge"},jh={key:1,class:"conflict-badge"},Wh={class:"block-name ellipsis"},Gh={class:"text-caption text-grey-6 q-pa-xs"},Qh={key:1,class:"list-view"},Yh={class:"row items-center q-gutter-sm"},Xh={class:"text-subtitle2"},Zh={key:0,class:"sub-block"},Jh={class:"sub-title"},Kh={class:"list-row session-row"},ep={key:0,class:"nested-list"},tp={class:"col-4 ellipsis"},np={class:"time-text"},op={class:"sub-block"},ip={class:"sub-title"},rp={class:"list-row slot-row"},sp={key:0,class:"text-grey text-center q-py-sm"},ap={class:"text-caption text-grey-6 q-mb-sm"},lp={class:"text-h6"},cp={class:"row items-center q-gutter-sm q-mb-md"},dp={key:0,class:"text-grey text-center q-py-md"},up={class:"col ellipsis"},fp={class:"text-h6"},mp={class:"row q-col-gutter-sm q-mb-sm"},hp={class:"col-6"},pp={class:"col-6"},gp=["onClick"],wn=15,za=6,Da=z(e.defineComponent({__name:"ScheduleGridEditor",props:{days:{},places:{},persist:{},labels:{default:()=>({})},factories:{default:()=>({})},hallName:{type:Function,default:void 0},dayTitle:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotSubtitle:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},sessionsEnabled:{type:Boolean,default:!0},daysEnabled:{type:Boolean,default:!0},placesEnabled:{type:Boolean,default:!0}},setup(n){var Wl,Gl;const t=n,o=e.computed(()=>t.sessionsEnabled!==!1),i=e.computed(()=>t.daysEnabled!==!1),r=e.computed(()=>t.placesEnabled!==!1),s=e.computed(()=>({...fr,duplicate:"Дублировать",...t.labels})),a=e.computed(()=>({...Aa,...t.factories})),c=h=>t.slotListOf?t.slotListOf(h):(h==null?void 0:h.slots)||[],l=h=>t.nestedSlotListOf?t.nestedSlotListOf(h):(h==null?void 0:h.slots)||[],u=h=>(h==null?void 0:h.name)||s.value.hall,f=h=>t.sessionName?t.sessionName(h):(h==null?void 0:h.name)||`${s.value.session} ${(h==null?void 0:h.startTime)||""}–${(h==null?void 0:h.endTime)||""}`.trim(),m=h=>t.slotName?t.slotName(h):(h==null?void 0:h.name)||s.value.slot,p=h=>t.slotSubtitle?t.slotSubtitle(h):"",S=e.ref("grid"),E=e.ref((Gl=(Wl=t.days)==null?void 0:Wl[0])==null?void 0:Gl.id),P=e.ref(!1),V=e.ref(""),x=e.ref(!1),$=e.ref(null),b=e.ref(null),y=e.ref(void 0),N=e.ref(null),I=e.ref(null),j=e.ref(!1),se=e.ref(0),ze=e.ref(null),Te=[{label:"40",value:40},{label:"60",value:60},{label:"90",value:90},{label:"120",value:120}],Ne=e.ref(Number(localStorage.getItem("schedule-grid-zoom"))||60);e.watch(Ne,h=>localStorage.setItem("schedule-grid-zoom",String(h)));const et=e.computed(()=>Math.max(le.value.total/60*Ne.value,360)),pt=e.computed(()=>et.value+"px"),ye=e.computed(()=>[...t.days||[]].sort((h,g)=>new Date(h.date).getTime()-new Date(g.date).getTime())),Se=e.computed(()=>ye.value.find(h=>h.id===E.value));e.watch(()=>ye.value.map(h=>h.id).join(","),()=>{var h;(!E.value||!ye.value.some(g=>g.id===E.value))&&(E.value=(h=ye.value[0])==null?void 0:h.id)});const Ct=h=>{if(t.dayTitle)return t.dayTitle(h);const g=new Date(h.date);return isNaN(g.getTime())||g.getFullYear()<2e3?"Дата":g.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})},Xt=h=>{const g=new Date(h);return isNaN(g.getTime())||g.getFullYear()<2e3?"":g.toISOString().slice(0,10)},Yn=async(h,g)=>{g&&(h.date=new Date(g),await t.persist.updateDay(h),await t.persist.refresh())},Cn=async h=>{var w;if(!h)return;for(const M of he(h))await Sn(M);await t.persist.removeDay(h);const g=(t.days||[]).indexOf(h);g>=0&&t.days.splice(g,1),await t.persist.refresh(),E.value=(w=ye.value[0])==null?void 0:w.id},rt=async()=>{var F,Y;const h=ye.value,g=h[h.length-1],w=g?new Date(new Date(g.date).getTime()+864e5):new Date;let M;try{M=a.value.createDay(w)}catch{t.persist.notify("warning",s.value.saveEventFirst);return}try{await((Y=(F=t.persist).createDay)==null?void 0:Y.call(F,M));for(const fe of t.places||[])await we(fe,M);await t.persist.refresh()}catch{t.persist.notify("negative",s.value.createFailed);return}E.value=M.id,t.persist.notify("positive",`${s.value.dayAdded}: ${Ct(M)}`)},he=h=>((h==null?void 0:h.schedules)||[]).slice().sort((g,w)=>{const M=W(g),F=W(w);return M.localeCompare(F,"ru")}),W=h=>{if(t.hallName)return t.hallName(h);const g=h.place||(t.places||[]).find(w=>w.id===h.placeId);return(g==null?void 0:g.name)||s.value.hall},Qe=()=>{P.value=!0},Pt=e.computed(()=>{const h=Se.value,g=new Set(((h==null?void 0:h.schedules)||[]).map(w=>w.placeId));return(t.places||[]).filter(w=>!g.has(w.id))}),we=async(h,g)=>{if(t.persist.bindPlaceToDay){await t.persist.bindPlaceToDay(h,g,a.value.createSchedule);return}const w=a.value.createSchedule(h.id,g.id);await t.persist.createSchedule(w)},ae=async h=>{P.value=!1;const g=Se.value;if(!g){t.persist.notify("warning",s.value.selectDayFirst);return}if(he(g).some(w=>w.placeId===h.id)){t.persist.notify("warning",s.value.alreadyAdded);return}try{await we(h,g)}catch(w){console.warn("addPlaceToDay failed:",w),t.persist.notify("negative",s.value.createFailed),await t.persist.refresh();return}await t.persist.refresh(),E.value=g.id},ve=async()=>{var w,M,F;const h=(w=V.value)==null?void 0:w.trim();if(!h){t.persist.notify("warning",s.value.enterName);return}const g=a.value.createPlace(h);try{if(!await((F=(M=t.persist).createPlace)==null?void 0:F.call(M,g))){t.persist.notify("negative",s.value.hallCreateFailed);return}}catch(Y){console.warn("createPlace failed:",Y),t.persist.notify("negative",s.value.hallCreateFailed);return}V.value="",await ae(g),t.persist.notify("positive",s.value.hallCreated.replace("{name}",h))},Mt=async h=>{await Sn(h);const g=st(h);g&&(g.schedules=(g.schedules||[]).filter(w=>w.id!==h.id)),await t.persist.refresh()},Sn=async h=>{for(const g of h.sessions||[]){for(const w of l(g))await t.persist.removeSlot(w);await t.persist.removeSession(g)}for(const g of c(h))await t.persist.removeSlot(g);await t.persist.removeSchedule(h)},st=h=>(t.days||[]).find(g=>(g.schedules||[]).some(w=>w.id===h.id)),at=h=>[...l(h)].sort(ur),Ye=h=>(h.sessions||[]).some(g=>l(g).length>0),Zt=new WeakMap,Ut=h=>{const g=Zt.get(h),w=c(h);if(g&&g.src===w)return g.list;const M=new Set((h.sessions||[]).map(Y=>Y.id)),F=w.filter(Y=>!Y.sessionId||!M.has(Y.sessionId));return Zt.set(h,{src:w,list:F}),F},De=h=>[...o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],...Ut(h).map(g=>({kind:"slot",item:g}))],ee=h=>o.value?(h.sessions||[]).map(g=>({kind:"session",item:g})):[],le=e.computed(()=>{var g,w;const h=(((g=Se.value)==null?void 0:g.schedules)||[]).flatMap(M=>De(M));for(const M of((w=Se.value)==null?void 0:w.schedules)||[])for(const F of M.sessions||[])h.push(...at(F).map(Y=>({kind:"slot",item:Y})));return Na(h)}),ct=e.computed(()=>{const h=[];for(let g=le.value.start;g<=le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),gt=e.computed(()=>{const h=[];for(let g=le.value.start+30;g<le.value.end;g+=60)h.push({min:g,label:Ge(g)});return h}),Jt=h=>$a(h,le.value),kn=e.computed(()=>{if(!N.value||!b.value)return{};const h=le.value,g=(N.value.minutes-h.start)/h.total*100,w=Math.max(b.value.duration/h.total*100,2.5);return{top:g+"%",height:w+"%"}}),It=e.computed(()=>!N.value||!b.value?"":Ge(N.value.minutes+b.value.duration)),jr=e.computed(()=>{if(!N.value)return{};const h=le.value,g=(N.value.minutes-h.start)/h.total*100,w=Math.max(wn/h.total*100,1.5);return{top:g+"%",height:w+"%"}}),xn=e.computed(()=>{var F,Y,fe,Pe,Ie;if(!N.value||!b.value||!b.value.id)return 0;const h=Zn(N.value.scheduleId);if(!h)return 0;const g={startTime:N.value.time,endTime:It.value},w=(F=N.value.session)==null?void 0:F.id;let M=0;for(const A of De(h))A.item.id!==((Y=b.value)==null?void 0:Y.id)&&(((fe=b.value)==null?void 0:fe.kind)==="slot"&&A.kind==="session"&&A.item.id===w||yo(g,A.item)&&M++);if(((Pe=b.value)==null?void 0:Pe.kind)==="slot"&&N.value.session)for(const A of at(N.value.session))A.id!==((Ie=b.value)==null?void 0:Ie.id)&&yo(g,A)&&M++;return M}),pi=e.computed(()=>xn.value>0),Kt=(h,g)=>Pa(De(h),g,yo),Wr=(h,g)=>Ma(at(h),g,yo),Gr=(h,g)=>Ta(h,g),Qr=h=>{const g=le.value,w=ce(h.item.startTime),M=ce(h.item.endTime);return!isFinite(w)||!isFinite(M)?48:(M-w)/g.total*et.value},en=h=>Ra(Qr(h)),B=h=>{const g=t.slotName?t.slotName(h.item):h.item.name||(h.kind==="session"?s.value.session:s.value.slot);if(h.kind==="slot"&&en(h)!=="h-full"){const w=p(h.item);if(w)return`${g} — ${w}`}return g},T=(h,g)=>{const w=m(h);if(g!=="h-full"){const M=p(h);if(M)return`${w} — ${M}`}return w},R=h=>{const g=`${h.item.startTime||"?"}–${h.item.endTime||"?"}`;if(h.kind==="slot"){const w=p(h.item);return[m(h.item),g,w?`${s.value.participants}: ${w}`:""].filter(Boolean).join(`
|
|
23
23
|
`)}return[f(h.item),g].filter(Boolean).join(`
|
|
24
24
|
`)},L=h=>{const g=p(h);return[m(h),`${h.startTime}–${h.endTime}`,g?`${s.value.participants}: ${g}`:""].filter(Boolean).join(`
|
|
25
|
-
`)},Z=(h,g)=>{var w;return{conflict:jr(h.item,g),dragging:((w=Rt.value)==null?void 0:w.perfom.id)===g.id,[tn(h)]:!0}},ke=e.ref(null),be=(h,g)=>{const w=h.getBoundingClientRect(),M=Math.min(Math.max((g-w.top)/w.height,0),1);return le.value.start+yo(M*le.value.total,wn)},te=(h,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||j.value||(ke.value={gi:h,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",H),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",et),window.addEventListener("keydown",So))},H=h=>{const g=ke.value;if(g){if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<Ra)return;g.moved=!0;const w=_n(g.gi.item.startTime,g.gi.item.endTime);y.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?s.value.session:s.value.slot),duration:isFinite(w)&&w>0?w:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}U(h.clientX,h.clientY),v(h.clientX,h.clientY)}},U=(h,g)=>{var Pe,Ie;const w=document.elementFromPoint(h,g),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id");if(!M||!F){b.value=void 0,$.value=null;return}const Y=Yn(F);if(!Y)return;b.value=Y.id;const fe=be(M,g);$.value={scheduleId:Y.id,minutes:fe,time:Ge(fe),hallName:G(Y),...((Pe=y.value)==null?void 0:Pe.kind)==="slot"&&o.value?{session:gi(Y.sessions,fe,fe+(((Ie=y.value)==null?void 0:Ie.duration)||30),ce)}:{}},R.value={x:h,y:g}},v=(h,g)=>{const w=ze.value;if(!w)return;const M=w.getBoundingClientRect();g<M.top+48?w.scrollTop-=14:g>M.bottom-48&&(w.scrollTop+=14),h<M.left+48?w.scrollLeft-=14:h>M.right-48&&(w.scrollLeft+=14)},q=h=>{oe(h)},oe=async h=>{const g=ke.value;if(me(),ke.value=null,!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Yn(F):void 0;if(M&&Y){const fe=be(M,h.clientY);await Pl(Y,fe)}xe()},me=()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",et),window.removeEventListener("keydown",So)},xe=()=>{ke.value=null,y.value=null,b.value=void 0,$.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor="",se.value=Date.now()},et=()=>{me(),xe()},So=h=>{h.key==="Escape"&&et()};e.onBeforeUnmount(()=>{me(),Xr(),xw(),document.body.style.userSelect="",document.body.style.cursor=""});const Qn=h=>{if(!h)return null;for(const g of t.days||[])for(const w of g.schedules||[]){const M=(w.sessions||[]).find(Y=>Y.id===h);if(M)return{kind:"session",item:M,schedule:w};const F=c(w).find(Y=>Y.id===h);if(F)return{kind:"slot",item:F,schedule:w}}return null},Qr=()=>{var h;return Qn((h=y.value)==null?void 0:h.id)},hw=(h,g)=>{g.preventDefault(),g.stopPropagation();const w=h.item,M=ce(w.startTime),F=ce(w.endTime);if(!isFinite(M)||!isFinite(F))return;const Y=g.clientY;j.value=!0;const fe=A=>{const Q=(A.clientY-Y)/Ve.value*60,J=yo(F+Q,wn);w.endTime=Ge(Math.max(J,M+wn))},Pe=async()=>{window.removeEventListener("pointermove",fe),window.removeEventListener("pointerup",Ie),j.value=!1,se.value=Date.now();const A=Qn(w.id);A&&(await Ct(w,A.kind),await t.persist.refresh())},Ie=()=>{Pe()};window.addEventListener("pointermove",fe),window.addEventListener("pointerup",Ie)},Rt=e.ref(null),pw=(h,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||j.value)return;const M=w.target.closest(".session-perfoms"),F=ce(h.startTime),Y=ce(h.endTime),fe=_n(g.startTime,g.endTime);!M||!isFinite(F)||!isFinite(Y)||Y<=F||(Rt.value={perfom:g,session:h,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:F,sessionDur:Y-F,durMin:isFinite(fe)&&fe>0?fe:30,container:M},window.addEventListener("pointermove",Vl),window.addEventListener("pointerup",$l),window.addEventListener("pointercancel",Yr),window.addEventListener("keydown",Tl))},Vl=h=>{const g=Rt.value;if(!g)return;if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<Ra)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),M=Math.min(Math.max((h.clientY-w.top)/w.height,0),1);let F=g.sessionStart+yo(M*g.sessionDur,wn);const Y=g.sessionStart+g.sessionDur-g.durMin;F=Math.min(Math.max(F,g.sessionStart),Math.max(Y,g.sessionStart)),g.perfom.startTime=Ge(F),g.perfom.endTime=Ge(F+g.durMin),R.value={x:h.clientX,y:h.clientY}},$l=h=>{gw(h)},gw=async h=>{var fe;const g=Rt.value;if(Xr(),Rt.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Yn(F):void 0;if(M&&Y){y.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||s.value.slot,duration:g.durMin};const Pe=be(M,h.clientY),Ie=Ge(Pe),A=_n(g.perfom.startTime,g.perfom.endTime),Q=yt(Ie,A>0?A:30),J=((fe=Rl(g.perfom))==null?void 0:fe.id)===Y.id&&g.perfom.startTime===Ie&&g.perfom.endTime===Q;await Pl(Y,Pe),J&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),y.value=null;return}g.perfom.startTime=yn(g.perfom.startTime),g.perfom.endTime=yn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},Yr=()=>{const h=Rt.value;Xr(),h&&(h.perfom.startTime=h.savedStart,h.perfom.endTime=h.savedEnd),Rt.value=null,R.value=null,document.body.style.userSelect="",document.body.style.cursor=""},Xr=()=>{window.removeEventListener("pointermove",Vl),window.removeEventListener("pointerup",$l),window.removeEventListener("pointercancel",Yr),window.removeEventListener("keydown",Tl)},Tl=h=>{h.key==="Escape"&&Yr()},yw=(h,g,w)=>{w.preventDefault(),w.stopPropagation();const M=ce(h.startTime),F=ce(h.endTime),Y=ce(g.startTime),fe=w.target.closest(".nested-perfom"),Pe=fe==null?void 0:fe.closest(".session-perfoms");if(!fe||!Pe||!isFinite(M)||!isFinite(F)||F<=M||!isFinite(Y))return;const Ie=Pe.getBoundingClientRect(),A=F-M;j.value=!0;const Q=vt=>{const Pw=Math.min(Math.max((vt.clientY-Ie.top)/Ie.height,0),1),Mw=Math.min(Math.max(Y+wn,M+yo(Pw*A,wn)),F);g.endTime=Ge(Mw)},J=async()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",W),j.value=!1,se.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},W=()=>{J()};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",W)},Pl=async(h,g)=>{var Q;b.value=void 0,$.value=null,R.value=null;const w=Qr();if(!w)return;const M=Ge(g),F=_n(w.item.startTime,w.item.endTime),Y=yt(M,F>0?F:30);if(((Q=w.schedule)==null?void 0:Q.id)===h.id&&w.item.startTime===M&&w.item.endTime===Y)return;const fe=w.item.startTime;if(w.item.startTime=M,w.item.endTime=Y,w.kind==="slot"&&o.value){const J=gi(h.sessions,ce(M),ce(Y),ce);J?w.item.sessionId=J.id:delete w.item.sessionId}else w.kind==="slot"&&delete w.item.sessionId;if(w.kind==="session"){const J=ce(M)-ce(fe);for(const W of st(w.item))W.startTime&&(W.startTime=yt(W.startTime,J),W.endTime&&(W.endTime=yt(W.endTime,J)),W.scheduleId=h.id,await Ct(W,"slot"))}const Pe=w.schedule,Ie=w.kind==="session"?h.sessions:c(h),A=w.item;if(Pe&&Pe.id!==h.id){A.scheduleId=h.id;const J=w.kind==="session"?Pe.sessions:c(Pe);z.H.Classes.RemoveFromClassById(A.id,J,[]),Ie.push(A)}await Ct(A,w.kind),await t.persist.refresh()},ww=async(h,g)=>{if(g.target.closest(".timeline-block"))return;const w=be(g.currentTarget,g.clientY),M=a.value.createSlot(h);if(M.startTime=Ge(w),M.endTime=Ge(w+30),o.value){const Y=gi(h.sessions,w,w+30,ce);Y!=null&&Y.id&&(M.sessionId=Y.id)}await t.persist.createSlot(M),await t.persist.refresh();const F=Qn(M.id);F&&nn(F)},Ml=async(h,g,w)=>{if(h.added){if(h.added.element.scheduleId=g.id,w==="slot"&&h.added.element.sessionId&&((g.sessions||[]).some(F=>F.id===h.added.element.sessionId)||delete h.added.element.sessionId),await Ct(h.added.element,w),w==="session")for(const M of l(h.added.element))M.scheduleId=g.id,await t.persist.updateSlot(M);await t.persist.refresh()}},Yn=h=>{for(const g of t.days||[]){const w=(g.schedules||[]).find(M=>M.id===h);if(w)return w}},gi=(h,g,w,M)=>Pa(h,g,w,M),Il=h=>o.value?((h==null?void 0:h.sessions)||[]).map(g=>({id:g.id,label:f(g)})):[],Rl=h=>{for(const g of t.days||[])for(const w of g.schedules||[])if(c(w).some(M=>M.id===h.id)||h.sessionId&&(w.sessions||[]).some(M=>M.id===h.sessionId))return w},Al=e.computed(()=>{const h=T.value;if(h)return h.kind==="session"?Yn(h.item.scheduleId)||zl(h.item,"session"):Rl(h.item)}),bw=e.computed(()=>{const h=T.value;return!h||h.kind!=="slot"?[]:Il(Al.value)}),zl=(h,g)=>{for(const w of t.days||[])for(const M of w.schedules||[])if(g==="session"){if((M.sessions||[]).some(F=>F.id===h.id))return M}else if(c(M).some(F=>F.id===h.id))return M},Dl=async(h,g)=>{g?h.sessionId=g:delete h.sessionId,await t.persist.updateSlot(h),await t.persist.refresh()},Fl=async h=>{if(!o.value)return;const g=a.value.createSession(h);await t.persist.createSession(g),await t.persist.refresh()},Cw=async(h,g)=>{const w=a.value.createSlot(h);if(w.startTime=Ge(g),w.endTime=yt(w.startTime,30),o.value){const F=gi(h.sessions,g,g+30,ce);F!=null&&F.id&&(w.sessionId=F.id)}await t.persist.createSlot(w),await t.persist.refresh();const M=Qn(w.id);M&&nn(M)},Ol=async h=>{const g=a.value.createSlot(h),w=[...c(h)].sort(dr).slice(-1)[0];g.startTime=yn(w==null?void 0:w.endTime)||"9:00",g.endTime=yt(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},At=e.ref(null),Sw=h=>{At.value=null,h.action()},Zr=(h,g)=>{const w=g.length*34+12;At.value={x:Math.min(h.clientX,window.innerWidth-210),y:Math.min(h.clientY,window.innerHeight-w-8),items:g}},Ll=()=>{At.value=null},_l=()=>{At.value=null},Hl=h=>{h.key==="Escape"&&(At.value=null)},yi=()=>{At.value=null},Jr=e.ref(!1),kw=()=>{Jr.value||(window.addEventListener("click",Ll),window.addEventListener("contextmenu",_l),window.addEventListener("keydown",Hl),window.addEventListener("scroll",yi,!0),window.addEventListener("resize",yi),Jr.value=!0)},xw=()=>{window.removeEventListener("click",Ll),window.removeEventListener("contextmenu",_l),window.removeEventListener("keydown",Hl),window.removeEventListener("scroll",yi,!0),window.removeEventListener("resize",yi),Jr.value=!1};kw();const Ew=(h,g)=>{const w=[{icon:"edit",label:s.value.edit,action:()=>nn(h)},{icon:"content_copy",label:s.value.duplicate,action:()=>void Ul(h)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void ko(h.item,h.kind)}];Zr(g,w)},Bw=(h,g)=>{const w={kind:"slot",item:h},M=[{icon:"edit",label:s.value.edit,action:()=>nn(w)},{icon:"content_copy",label:s.value.duplicate,action:()=>void Ul(w)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void ko(h,"slot")}];Zr(g,M)},Nw=(h,g)=>{const w=be(g.currentTarget,g.clientY),M=Ge(w),F=[{icon:"mic",label:`${s.value.addSlot} · ${M}`,action:()=>void Cw(h,w)}];o.value&&F.push({icon:"groups",label:`${s.value.addSession} · ${M}`,action:()=>void Vw(h,w)}),Zr(g,F)},Vw=async(h,g)=>{if(!o.value)return;const w=a.value.createSession(h);w.startTime=Ge(g),w.endTime=yt(w.startTime,30),await t.persist.createSession(w),await t.persist.refresh()},Ul=async h=>{const g=Yn(h.item.scheduleId)||zl(h.item,h.kind);if(!g)return;const w=_n(h.item.startTime,h.item.endTime)||30,M=yn(h.item.endTime)||"9:00";if(h.kind==="slot"){const F=a.value.createSlot(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=yt(M,w),F.sessionId=h.item.sessionId,h.item.description&&(F.description=h.item.description),h.item.payload&&(F.payload={...h.item.payload}),await t.persist.createSlot(F)}else{const F=a.value.createSession(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=yt(M,w),F.scheduleId=g.id,await t.persist.createSession(F)}await t.persist.refresh()},ko=async(h,g)=>{if(g==="slot")await t.persist.removeSlot(h);else{for(const w of l(h))delete w.sessionId,await t.persist.updateSlot(w);await t.persist.removeSession(h)}await t.persist.refresh()},Ct=async(h,g)=>{const w=yn(h.startTime),M=yn(h.endTime);if(!w){t.persist.notify("warning",s.value.correctStartTime);return}h.startTime=w,h.endTime=M||yt(w,30),g==="slot"?await t.persist.updateSlot(h):await t.persist.updateSession(h)},nn=h=>{j.value||Date.now()-se.value<400||(T.value={kind:h.kind,item:h.item},C.value=!0)},$w=async()=>{const h=T.value;h&&(await Ct(h.item,h.kind),C.value=!1,T.value=null,await t.persist.refresh())},Tw=async()=>{const h=T.value;h&&(await ko(h.item,h.kind),C.value=!1,T.value=null)};return t.persist.loadOptions&&t.persist.loadOptions(),(h,g)=>{var Pe,Ie;const w=e.resolveComponent("PButton"),M=e.resolveComponent("PInput"),F=e.resolveComponent("PTooltip"),Y=e.resolveComponent("PSelect"),fe=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",sh,[(Pe=n.days)!=null&&Pe.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",lh,[i.value?(e.openBlock(),e.createBlock(e.unref(E.QTabs),{key:0,modelValue:x.value,"onUpdate:modelValue":g[0]||(g[0]=A=>x.value=A),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,A=>(e.openBlock(),e.createBlock(e.unref(E.QTab),{key:A.id,name:A.id,label:bt(A)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(E.QSpace)),i.value&&Se.value?(e.openBlock(),e.createBlock(M,{key:1,"model-value":Zt(Se.value.date),label:s.value.date,type:"date",dense:"",outlined:"",class:"date-input","onUpdate:modelValue":g[1]||(g[1]=A=>Gn(Se.value,A))},null,8,["model-value","label"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:2,size:"sm",color:"negative",outline:"",icon:"delete",label:s.value.deleteDay,disable:!Se.value,onClick:g[2]||(g[2]=A=>Cn(Se.value))},null,8,["label","disable"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:3,size:"sm",color:"primary",outline:"",icon:"event",label:s.value.addDay,onClick:it},null,8,["label"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:4,size:"sm",color:"primary",outline:"",icon:"add",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0),S.value==="grid"?(e.openBlock(),e.createElementBlock("div",ch,[e.createVNode(e.unref(E.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(E.QBtnToggle),{modelValue:Ve.value,"onUpdate:modelValue":g[3]||(g[3]=A=>Ve.value=A),"toggle-color":"primary",options:Te,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(E.QBtnToggle),{modelValue:S.value,"onUpdate:modelValue":g[4]||(g[4]=A=>S.value=A),"toggle-color":"primary",options:[{label:s.value.grid,value:"grid",icon:"calendar_view_week"},{label:s.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),S.value==="grid"?(e.openBlock(),e.createElementBlock("div",dh,[he(Se.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:ze,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":he(Se.value).length,"--hours":Math.max(le.value.total/60,1),"--half-hours":Math.max(le.value.total/60*2,2)})},[e.createElementVNode("div",fh,[g[17]||(g[17]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-head",{"drag-over":b.value===A.id}])},[e.createElementVNode("div",mh,[e.createVNode(e.unref(E.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",hh,e.toDisplayString(G(A)),1),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:Q=>Ol(A)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),o.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:Q=>Fl(A)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addSession),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:1,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>Mt(A)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:ht.value})},[e.createElementVNode("div",ph,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(lt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"hour-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"half-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-col",{"drag-over":b.value===A.id}]),"data-schedule-id":A.id,onDblclick:Q=>ww(A,Q),onContextmenu:e.withModifiers(Q=>Nw(A,Q),["prevent","stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De(A),Q=>{var J;return e.openBlock(),e.createElementBlock("div",{key:Q.item.id,class:e.normalizeClass(["timeline-block",[Q.kind,{conflict:en(A,Q),dragging:((J=y.value)==null?void 0:J.id)===Q.item.id},tn(Q)]]),style:e.normalizeStyle(Kt(Q)),title:I(Q),onPointerdown:W=>te(Q,W),onClick:W=>nn(Q),onContextmenu:e.withModifiers(W=>Ew(Q,W),["prevent","stop"])},[e.createVNode(e.unref(E.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",wh,[e.createElementVNode("div",bh,e.toDisplayString(Q.item.startTime)+"–"+e.toDisplayString(Q.item.endTime),1),e.createElementVNode("div",Ch,e.toDisplayString(B(Q)),1),Q.kind==="slot"&&p(Q.item)?(e.openBlock(),e.createElementBlock("div",Sh,e.toDisplayString(p(Q.item)),1)):e.createCommentVNode("",!0)]),Q.kind==="session"&&st(Q.item).length?(e.openBlock(),e.createElementBlock("div",kh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st(Q.item),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:e.normalizeClass(["nested-perfom",Z(Q,W)]),style:e.normalizeStyle(Wr(Q.item,W)),title:L(W),onPointerdown:e.withModifiers(vt=>pw(Q.item,W,vt),["stop"]),onClick:e.withModifiers(vt=>nn({kind:"slot",item:W}),["stop"]),onContextmenu:e.withModifiers(vt=>Bw(W,vt),["prevent","stop"])},[e.createElementVNode("div",Eh,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createElementVNode("div",Bh,e.toDisplayString(P(W,tn(Q))),1),p(W)?(e.openBlock(),e.createElementBlock("div",Nh,e.toDisplayString(p(W)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(E.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(vt=>yw(Q.item,W,vt),["stop","prevent"])},null,40,Vh)],46,xh))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",$h,[en(A,Q)?(e.openBlock(),e.createBlock(e.unref(E.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(E.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(W=>nn(Q),["stop"])},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(W=>hw(Q,W),["stop","prevent"])},null,40,Th)],46,yh)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee(A),Q=>{var J;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+Q.item.id,class:e.normalizeClass(["session-spine",{dragging:((J=y.value)==null?void 0:J.id)===Q.item.id}]),style:e.normalizeStyle(Kt(Q)),title:f(Q.item)},[e.createVNode(e.unref(E.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Mh,e.toDisplayString(f(Q.item)),1)],14,Ph)}),128)),$.value&&$.value.scheduleId===A.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:pi.value}]),style:e.normalizeStyle(qr.value)},null,6)):e.createCommentVNode("",!0),$.value&&$.value.scheduleId===A.id&&y.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[y.value.kind,{conflict:pi.value}]]),style:e.normalizeStyle(kn.value)},[e.createElementVNode("div",Ih,[e.createTextVNode(e.toDisplayString($.value.time)+"–"+e.toDisplayString(It.value)+" ",1),$.value.session?(e.openBlock(),e.createElementBlock("span",Rh,e.toDisplayString(s.value.intoSession),1)):e.createCommentVNode("",!0),xn.value?(e.openBlock(),e.createElementBlock("span",Ah," ⚠ "+e.toDisplayString(s.value.conflictCount)+": "+e.toDisplayString(xn.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",zh,e.toDisplayString(y.value.name),1)],6)):e.createCommentVNode("",!0)],42,gh))),128))],4),e.createElementVNode("div",Dh,e.toDisplayString(s.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",uh,[e.createTextVNode(e.toDisplayString(s.value.noHalls)+" ",1),r.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"primary",size:"sm",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0)])),R.value&&$.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:R.value.x+"px",top:R.value.y+"px"})},[e.createVNode(e.unref(E.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString($.value.time)+" · "+e.toDisplayString($.value.hallName)+" ",1),$.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[18]||(g[18]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(E.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(s.value.intoSession)+" «"+e.toDisplayString(f($.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),xn.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[19]||(g[19]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(E.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(xn.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(Ie=Rt.value)!=null&&Ie.moved&&R.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:R.value.x+"px",top:R.value.y+"px"})},[e.createVNode(e.unref(E.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(Rt.value.perfom.startTime)+"–"+e.toDisplayString(Rt.value.perfom.endTime)+" · "+e.toDisplayString(s.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Fh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createBlock(e.unref(E.QCard),{key:A.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",Oh,[e.createVNode(e.unref(E.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Lh,e.toDisplayString(G(A)),1),e.createVNode(e.unref(E.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.session,onClick:Q=>Fl(A)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.slot,onClick:Q=>Ol(A)},null,8,["label","onClick"]),r.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>Mt(A)},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]),_:2},1024),e.createVNode(e.unref(E.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var Q;return[o.value&&((Q=A.sessions)!=null&&Q.length)?(e.openBlock(),e.createElementBlock("div",_h,[e.createElementVNode("div",Hh,[e.createVNode(e.unref(E.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.sessionsTitle),1)]),e.createVNode(e.unref(bi),{list:A.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:J=>Ml(J,A,"session")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",Uh,[e.createVNode(e.unref(E.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(M,{"model-value":J.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>J.name=W,onBlur:W=>Ct(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(M,{"model-value":J.startTime,label:s.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>J.startTime=W,onBlur:W=>Ct(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(M,{"model-value":J.endTime,label:s.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>J.endTime=W,onBlur:W=>Ct(J,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.renderSlot(h.$slots,"session-row-extra",{element:J,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>ko(J,"session")},null,8,["onClick"])]),st(J).length?(e.openBlock(),e.createElementBlock("div",vh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(st(J),W=>(e.openBlock(),e.createElementBlock("div",{key:W.id,class:"list-row nested-row"},[e.createVNode(e.unref(E.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",qh,e.toDisplayString(m(W)),1),e.createElementVNode("div",jh,e.toDisplayString(W.startTime)+"–"+e.toDisplayString(W.endTime),1),e.createVNode(e.unref(E.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:vt=>nn({kind:"slot",item:W})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Wh,[e.createElementVNode("div",Gh,[e.createVNode(e.unref(E.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.slotsTitle),1)]),e.createVNode(e.unref(bi),{list:Ut(A),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:J=>Ml(J,A,"slot")},{item:e.withCtx(({element:J})=>[e.createElementVNode("div",Qh,[e.createVNode(e.unref(E.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(M,{"model-value":J.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":W=>J.name=W,onBlur:W=>Ct(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(M,{"model-value":J.startTime,label:s.value.startTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>J.startTime=W,onBlur:W=>Ct(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(M,{"model-value":J.endTime,label:s.value.endTime,type:"time",dense:"",outlined:"",class:"time-input","onUpdate:modelValue":W=>J.endTime=W,onBlur:W=>Ct(J,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":J.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:Il(A),"option-value":"id","option-label":"label","onUpdate:modelValue":W=>Dl(J,W)},null,8,["model-value","label","options","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"slot-row-extra",{element:J,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:W=>ko(J,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Ut(A).length&&!Ye(A)?(e.openBlock(),e.createElementBlock("div",Yh,e.toDisplayString(s.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",Xh,e.toDisplayString(s.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",ah,[e.createVNode(e.unref(E.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(s.value.noDays),1),e.createVNode(w,{color:"primary",outline:"",label:s.value.addDay,icon:"event",class:"q-mt-sm",onClick:it},null,8,["label"])])),e.createVNode(fe,{modelValue:N.value,"onUpdate:modelValue":g[7]||(g[7]=A=>N.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",Zh,e.toDisplayString(s.value.addHall),1)]),_:1}),e.createVNode(e.unref(E.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",Jh,[e.createVNode(M,{modelValue:V.value,"onUpdate:modelValue":g[5]||(g[5]=A=>V.value=A),label:s.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(ve,["enter"])},null,8,["modelValue","label"]),e.createVNode(w,{color:"primary",label:s.value.create,icon:"add",dense:"",onClick:ve},null,8,["label"])]),e.renderSlot(h.$slots,"places-list",{day:Se.value,add:ae},()=>[Pt.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Kh,e.toDisplayString(s.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(E.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",ep,e.toDisplayString(u(A)),1),e.createVNode(w,{size:"sm",color:"primary",outline:"",label:s.value.addHall,icon:"add",dense:"",onClick:Q=>ae(A)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(E.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(w,{label:s.value.close,color:"primary",onClick:g[6]||(g[6]=A=>N.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(fe,{modelValue:C.value,"onUpdate:modelValue":g[14]||(g[14]=A=>C.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCardSection),null,{default:e.withCtx(()=>{var A;return[e.createElementVNode("div",tp,e.toDisplayString(((A=T.value)==null?void 0:A.kind)==="session"?s.value.session:s.value.slot),1)]}),_:1}),T.value?(e.openBlock(),e.createBlock(e.unref(E.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(M,{modelValue:T.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=A=>T.value.item.name=A),label:s.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",np,[e.createElementVNode("div",op,[e.createVNode(M,{modelValue:T.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=A=>T.value.item.startTime=A),label:s.value.startTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",ip,[e.createVNode(M,{modelValue:T.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=A=>T.value.item.endTime=A),label:s.value.endTime,type:"time",dense:"",outlined:""},null,8,["modelValue","label"])])]),T.value.kind==="slot"&&o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":T.value.item.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:bw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=A=>Dl(T.value.item,A))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"edit-form",{kind:T.value.kind,item:T.value.item,schedule:Al.value},void 0,!0),T.value.kind==="slot"?(e.openBlock(),e.createBlock(M,{key:1,modelValue:T.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=A=>T.value.item.description=A),label:s.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(E.QCardActions),{align:"right"},{default:e.withCtx(()=>[T.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"negative",label:s.value.delete,onClick:Tw},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(E.QSpace)),e.createVNode(w,{flat:"",label:s.value.cancel,color:"primary",onClick:g[13]||(g[13]=A=>C.value=!1)},null,8,["label"]),e.createVNode(w,{label:s.value.save,color:"primary",onClick:$w},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),At.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"ctx-menu",style:e.normalizeStyle({left:At.value.x+"px",top:At.value.y+"px"}),onClick:g[15]||(g[15]=e.withModifiers(()=>{},["stop"])),onContextmenu:g[16]||(g[16]=e.withModifiers(()=>{},["prevent","stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value.items,(A,Q)=>(e.openBlock(),e.createElementBlock("div",{key:Q,class:e.normalizeClass(["ctx-item",{"ctx-item--danger":A.danger}]),onClick:J=>Sw(A)},[e.createVNode(e.unref(E.QIcon),{name:A.icon,size:"15px"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(A.label),1)],10,rp))),128))],36)):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-b4f8340b"]]),sp={class:"schedule-timeline"},ap={key:0,class:"timeline-container"},lp={class:"day-header"},cp={class:"day-title"},dp={class:"timeline"},up={key:0,class:"schedule-place"},fp={class:"events-column"},mp={key:0,class:"event-item session-item"},hp={class:"event-content"},pp={class:"event-time"},gp={class:"event-main"},yp={class:"event-name"},wp={key:0,class:"speakers-list"},bp=["onClick"],Cp={class:"speaker-details"},Sp={class:"speaker-name"},kp={class:"bio-text"},xp=["onClick"],Ep={key:0,class:"perfom-divider"},Bp={class:"event-content"},Np={class:"event-time"},Vp={class:"event-main"},$p={class:"event-name"},Tp={class:"event-badges"},Pp={key:0,class:"speakers-list"},Mp=["onClick"],Ip={class:"speaker-details"},Rp={class:"speaker-name"},Ap={class:"bio-text"},zp={key:1,class:"no-program"},za=D(e.defineComponent({__name:"ScheduleTimeline",props:{days:{},dayTitle:{type:Function,default:void 0},placeName:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotParticipants:{type:Function,default:void 0},sessionParticipants:{type:Function,default:void 0},participantName:{type:Function,default:void 0},participantBio:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},noProgramText:{default:"Программа пока не опубликована"},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},slotClickable:{type:Boolean,default:!1}},emits:["open-participant","slot-click"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>({noProgram:o.noProgramText||"Программа пока не опубликована"})),s=y=>{if(o.dayTitle)return o.dayTitle(y);const b=new Date(y.date);return isNaN(b.getTime())||b.getFullYear()<2e3?"":b.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=y=>{var b;return o.placeName?o.placeName(y):((b=y.place)==null?void 0:b.name)||y.placeName||""},c=y=>o.slotName?o.slotName(y):(y==null?void 0:y.name)||"",l=y=>o.sessionName?o.sessionName(y):(y==null?void 0:y.name)||"",u=y=>o.slotParticipants?o.slotParticipants(y):(y==null?void 0:y.participants)||[],f=y=>o.sessionParticipants?o.sessionParticipants(y):(y==null?void 0:y.participants)||[],m=y=>{var b,$;return o.participantName?o.participantName(y):(y==null?void 0:y.name)||(y==null?void 0:y.fullName)||(($=(b=y==null?void 0:y.human)==null?void 0:b.getFullName)==null?void 0:$.call(b))||""},p=y=>o.participantBio?o.participantBio(y):(y==null?void 0:y.bio)||(y==null?void 0:y.regalias)||"",S=y=>o.slotListOf?o.slotListOf(y):(y==null?void 0:y.slots)||[],x=y=>o.nestedSlotListOf?o.nestedSlotListOf(y):(y==null?void 0:y.slots)||[],N=y=>y.schedules.filter(b=>{var $;return S(b).length>0||((($=b.sessions)==null?void 0:$.length)||0)>0}),V=y=>{const b=[],$=new Set((y.sessions||[]).map(j=>j.id));for(const j of y.sessions||[]){b.push({kind:"session",item:j,nested:!1,index:0});for(const se of x(j))b.push({kind:"slot",item:se,nested:!0,index:0})}let R=0;for(const j of S(y).filter(se=>!se.sessionId||!$.has(se.sessionId)))b.push({kind:"slot",item:j,nested:!1,index:R++});return b},C=e.computed(()=>{var y;return(y=o.days)==null?void 0:y.some(b=>{var $;return($=b.schedules)==null?void 0:$.some(R=>{var j;return S(R).length>0||(((j=R.sessions)==null?void 0:j.length)||0)>0})})}),T=(y,b)=>`${y} - ${b}`;return(y,b)=>(e.openBlock(),e.createElementBlock("div",sp,[C.value?(e.openBlock(),e.createElementBlock("div",ap,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,$=>(e.openBlock(),e.createElementBlock("div",{key:$.id,class:"day-section"},[e.createElementVNode("div",lp,[e.createElementVNode("div",cp,[e.createVNode(e.unref(E.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s($)),1)])]),e.createElementVNode("div",dp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N($),R=>(e.openBlock(),e.createElementBlock("div",{key:R.id,class:"time-slot"},[a(R)?(e.openBlock(),e.createElementBlock("div",up,[e.createVNode(e.unref(E.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(R)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",fp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V(R),j=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:j.item.id},[j.kind==="session"?(e.openBlock(),e.createElementBlock("div",mp,[e.createElementVNode("div",hp,[e.createElementVNode("div",pp,e.toDisplayString(T(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",gp,[e.createElementVNode("div",yp,e.toDisplayString(l(j.item)),1),f(j.item).length?(e.openBlock(),e.createElementBlock("div",wp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",Cp,[e.createElementVNode("div",Sp,[e.createVNode(e.unref(E.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",kp,e.toDisplayString(p(se)),1)])],8,bp))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":j.item.active,"nested-item":j.nested},{clickable:o.slotClickable}]]),onClick:se=>o.slotClickable&&i("slot-click",j.item)},[!j.nested&&j.index>0?(e.openBlock(),e.createElementBlock("div",Ep)):e.createCommentVNode("",!0),e.createElementVNode("div",Bp,[e.createElementVNode("div",Np,e.toDisplayString(T(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",Vp,[e.createElementVNode("div",$p,e.toDisplayString(c(j.item)),1),e.createElementVNode("div",Tp,[e.renderSlot(y.$slots,"badges",{item:j.item},void 0,!0)]),u(j.item).length?(e.openBlock(),e.createElementBlock("div",Pp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",Ip,[e.createElementVNode("div",Rp,[e.createVNode(e.unref(E.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Ap,e.toDisplayString(p(se)),1)])],8,Mp))),128))])):e.createCommentVNode("",!0)])])],10,xp))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",zp,[e.createVNode(e.unref(E.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(y.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Dp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Aa,ScheduleTimeline:za},Symbol.toStringTag,{value:"Module"})),Fp=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:yt,blockSizeClass:Ma,blockStyle:Na,byStart:dr,diffM:_n,findEnclosingSession:Pa,fromMin:Ge,gridBounds:Ba,hasConflict:$a,intersects:go,nestedConflict:Ta,nestedSlotStyle:Va,normTime:yn,snapMinutes:yo,toMin:ce},Symbol.toStringTag,{value:"Module"}));let Op=class extends Ne{constructor(){super(Ko,"schedule-days")}};const Lp=new Op;let _p=class extends Ne{constructor(){super(Ln,"schedule-places")}};const Hp=new _p;let Up=class extends Ne{constructor(){super(On,"schedule-sessions")}};const vp=new Up;let qp=class extends Ne{constructor(){super(Ft,"schedule-slots")}};const jp=new qp;let Wp=class extends Ne{constructor(){super(po,"schedule-timetables")}};const Gp=new Wp,Qp=Object.freeze(Object.defineProperty({__proto__:null,C:rh,Components:Dp,H:Fp,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Lp,SchedulePlacesStore:Hp,ScheduleSessionsStore:vp,ScheduleSlotsStore:jp,SchedulesStore:Gp},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Ia,defaultScheduleLabels:ur},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),fr=e.defineComponent({inheritAttrs:!1,__name:"PChip",props:{label:{type:String,default:""},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},square:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["remove","update:model-value","update:selected"],setup(n,{emit:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>{const s={};for(const a of Object.keys(i))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=i[a]);return s});return(s,a)=>(e.openBlock(),e.createBlock(e.unref(E.QChip),e.mergeProps(e.unref(r),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,square:n.square,dense:n.dense,removable:n.removable,onRemove:a[0]||(a[0]=c=>o("remove"))}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),Yp={class:"tags-selector"},Xp={key:0,class:"empty-state"},ei=D(e.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:t}){const o=n,i=e.ref(""),r=o.store.Options,s=e.computed(()=>r.filter(l=>z.H.Strings.SearchIn(l.label,i.value))),a=t;e.onBeforeMount(async()=>{await o.store.GetOptions()});const c=async l=>{await o.store.Get(l.value),a("select",o.store.Item)};return(l,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",Yp,[e.createVNode(Ze,{modelValue:e.unref(i),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(i)?i.value=m:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(E.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QList),{dense:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(E.QItem),{key:m.value,clickable:"",class:"tag-item",onClick:p=>c(m)},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QItemSection),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),e.unref(s).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xp,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),Zp={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},Jp={class:"edit-dialog-header"},Kp={class:"edit-dialog-title"},eg={class:"edit-dialog-content"},tg={key:0,class:"edit-dialog-actions"},Hn=D(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},Zp),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:o}){const i=E.ClosePopup,r=n,s=o,a=e.ref(!1);e.watch(()=>r.modelValue,p=>{a.value=p},{immediate:!0});const c=async()=>{s("confirm"),l()},l=()=>{s("close"),a.value=!1,s("update:modelValue",!1)},u=()=>{a.value&&l()};t({opened:a,toggle:()=>{a.value=!a.value,s("update:modelValue",a.value)}});const m=async()=>{await e.nextTick();const p=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');p&&"focus"in p&&p.focus()};return(p,S)=>(e.openBlock(),e.createBlock(un,{modelValue:e.unref(a),"onUpdate:modelValue":[S[0]||(S[0]=x=>e.isRef(a)?a.value=x:null),l],position:"top",onKeydown:[e.withKeys(c,["enter"]),e.withKeys(u,["escape"])],onShow:m},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:r.width})},[e.createElementVNode("div",Jp,[e.createElementVNode("div",Kp,e.toDisplayString(r.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(i)]])]),e.createElementVNode("div",eg,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),r.showConfirm?(e.openBlock(),e.createElementBlock("div",tg,[e.withDirectives(e.createVNode(ne,{flat:"",label:r.cancelLabel,size:"sm"},null,8,["label"]),[[e.unref(i)]]),e.createVNode(ne,{flat:"",label:r.confirmLabel,color:"primary",disable:r.disabled,size:"sm",onClick:c},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-4c8226ef"]]),mr=D(e.defineComponent({__name:"PTableBadge",props:{row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(),s=()=>{r.value.toggle(),i("click")},a=async c=>{o.row[o.prop]=c,await o.store.Update(o.row),r.value.toggle()};return(c,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(E.QTd),{key:n.prop,class:"tags-cell"},{default:e.withCtx(()=>{var u,f,m;return[e.createVNode(fr,{color:(u=n.row[n.prop])!=null&&u.id?"primary":"grey-3","text-color":(f=n.row[n.prop])!=null&&f.id?"white":"grey-6",outline:!((m=n.row[n.prop])!=null&&m.id),size:"sm",clickable:"",class:"tags-chip",onClick:s},{default:e.withCtx(()=>{var p;return[(p=n.row[n.prop])!=null&&p.id?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.row[n.prop][n.labelKey]),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(E.QIcon),{name:"add",size:"16px"}),l[0]||(l[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(Hn,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},()=>[e.createVNode(ei,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),ng={class:"tag-name"},og={key:0,class:"tag-extra"},hr=e.defineComponent({__name:"PTableBadges",props:{items:{},row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"},cellKey:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.items!==void 0?t.items:t.row?t.row[t.prop??""]:[]),r=e.computed(()=>i.value?(Array.isArray(i.value)?i.value:[i.value]).filter(f=>f==null?void 0:f.id):[]),s=e.computed(()=>r.value.length),a=e.computed(()=>{var u;return((u=r.value[0])==null?void 0:u[t.labelKey])||""}),c=e.computed(()=>Math.max(0,s.value-1)),l=async u=>{t.row&&t.prop&&t.store&&(t.row[t.prop]=u,await t.store.Update(t.row)),o.value.toggle()};return(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(E.QTd),{key:n.cellKey,class:"tags-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["tags-badge",{empty:!e.unref(s),clickable:e.unref(s)}]),onClick:f[1]||(f[1]=e.withModifiers(m=>e.unref(s)?e.unref(o).toggle():void 0,["stop"]))},[e.unref(s)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",ng,e.toDisplayString(e.unref(a)),1),e.unref(c)?(e.openBlock(),e.createElementBlock("span",og,"+"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(E.QIcon),{key:1,name:"add",size:"18px",color:"grey-5",onClick:f[0]||(f[0]=m=>e.unref(o).toggle())}))],2)]),_:1})),e.createVNode(Hn,{ref_key:"edit",ref:o,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(ei,{key:0,store:n.storeOpts,onSelect:l},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),ig={key:0,class:"relation-label"},rg={class:"relation-count"},pr=D(e.defineComponent({__name:"PTableCount",props:{label:{},count:{},to:{},cellKey:{default:""}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=()=>{o.count!==0&&(o.to&&z.H.Router.To(o.to),i("click"))};return(s,a)=>(e.openBlock(),e.createBlock(e.unref(E.QTd),{key:n.cellKey,class:"relation-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["relation-badge",{"has-items":n.count>0}]),onClick:r},[n.label?(e.openBlock(),e.createElementBlock("span",ig,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",rg,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),gr=e.defineComponent({__name:"PTableEdit",props:{domen:{},row:{}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(E.QTd),{"auto-width":""},{default:e.withCtx(()=>[e.createVNode(ne,{size:"sm",round:"",dense:"",icon:"edit",color:"primary",class:"q-mr-xs",onClick:o[0]||(o[0]=i=>e.unref(z).H.Router.To(`/admin/${n.domen}/${n.row.id}`))})]),_:1}))}}),sg={class:"cell-text"},yr=D(e.defineComponent({__name:"PTableNumber",props:{row:{},prop:{default:"name"},store:{},readonly:{type:Boolean,default:!1},label:{default:""},decimals:{default:void 0},min:{default:void 0},max:{default:void 0},step:{default:void 0},emptyPlaceholder:{default:"—"},tooltipThreshold:{default:10}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return l!=null&&String(l).length>t.tooltipThreshold}),a=e.computed(()=>{const l=i.value;return l==null||l===""?t.emptyPlaceholder:typeof l=="number"&&t.decimals!==void 0?l.toFixed(t.decimals):String(l)}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(E.QTd),{key:n.prop,class:"p-table-number-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",sg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(nt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(Hn,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Ze,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),modelModifiers:{number:!0},type:"number",class:"q-mb-md",autofocus:"",label:n.label,min:n.min,max:n.max,step:n.step},null,8,["modelValue","label","min","max","step"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-4e17e527"]]),wo=e.defineComponent({inheritAttrs:!1,__name:"PSelect",props:e.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:""},options:{type:Array,required:!1,default:()=>[]},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=e.useModel(n,"modelValue"),r=o,s=e.ref(null);function a(){var b;(b=s.value)==null||b.focus()}function c(){var b;(b=s.value)==null||b.blur()}function l(){var b;(b=s.value)==null||b.showPopup()}function u(){var b;(b=s.value)==null||b.hidePopup()}async function f(){var b;return await((b=s.value)==null?void 0:b.validate())??!0}function m(){var b;(b=s.value)==null||b.resetValidation()}t({focus:a,blur:c,showPopup:l,hidePopup:u,validate:f,resetValidation:m});const p=e.useAttrs(),S=e.computed(()=>typeof p.id=="string"?p.id:void 0),x=e.computed(()=>{const b={};for(const $ of Object.keys(p))$!=="id"&&$!=="disable"&&(b[$]=p[$]);return b}),N=n,V=e.computed(()=>p.disable??N.disabled),C=b=>{r("change",b)},T=()=>{r("clear",void 0)},y=e.computed(()=>{const b={};return N.margin&&(b.margin=N.margin),N.padding&&(b.padding=N.padding),N.width&&(b.width=N.width),N.inPadding&&(b.padding=N.inPadding),b});return(b,$)=>(e.openBlock(),e.createBlock(e.unref(E.QSelect),e.mergeProps({ref_key:"selectRef",ref:s,modelValue:i.value,"onUpdate:modelValue":$[0]||($[0]=R=>i.value=R)},e.unref(x),{for:e.unref(S),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,rules:n.rules,disable:e.unref(V),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(y),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":C,onClear:T}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(b.$slots,"before",{},()=>[e.renderSlot(b.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(b.$slots,"append",{},()=>[e.renderSlot(b.$slots,"right")])]),_:2},[b.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"prepend")]),key:"0"}:void 0,b.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"after")]),key:"1"}:void 0,b.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"default")]),key:"2"}:void 0,b.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"label")]),key:"3"}:void 0,b.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"error")]),key:"4"}:void 0,b.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"hint")]),key:"5"}:void 0,b.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"counter")]),key:"6"}:void 0,b.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"loading")]),key:"7"}:void 0,b.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"selected")]),key:"8"}:void 0,b.$slots.option?{name:"option",fn:e.withCtx(R=>[e.renderSlot(b.$slots,"option",e.normalizeProps(e.guardReactiveProps(R)))]),key:"9"}:void 0,b.$slots["no-option"]?{name:"no-option",fn:e.withCtx(R=>[e.renderSlot(b.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(R)))]),key:"10"}:void 0,b.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"before-options")]),key:"11"}:void 0,b.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"after-options")]),key:"12"}:void 0,b.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(R=>[e.renderSlot(b.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(R)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","rules","disable","readonly","input-style","style"]))}}),wr=D(e.defineComponent({__name:"PTableSelect",props:{row:{},prop:{},storeOpts:{},store:{}},setup(n){const t=n,o=e.computed(()=>t.storeOpts.Options);return e.onBeforeMount(async()=>{await t.storeOpts.GetOptions()}),(i,r)=>(e.openBlock(),e.createBlock(e.unref(E.QTd),{key:n.prop,class:"relation-cell"},{default:e.withCtx(()=>[e.createVNode(wo,{modelValue:n.row[n.prop+"Id"],"onUpdate:modelValue":r[0]||(r[0]=s=>n.row[n.prop+"Id"]=s),clearable:!1,dense:"",filled:"","map-options":"",options:e.unref(o)},null,8,["modelValue","options"])]),_:1}))}}),[["__scopeId","data-v-a2c49ff8"]]),ag={class:"cell-text"},br=D(e.defineComponent({__name:"PTableString",props:{row:{},prop:{default:"name"},store:{},maxLength:{default:200},truncateLength:{default:40},readonly:{type:Boolean,default:!1},label:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]||""),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return typeof l=="string"&&l.length>t.truncateLength}),a=e.computed(()=>{const l=i.value;return typeof l!="string"?l:l.length>t.truncateLength?l.slice(0,t.truncateLength)+"...":l}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(E.QTd),{key:n.prop,class:"p-table-string-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",ag,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(nt,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(Hn,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Ze,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),class:"q-mb-md",maxlength:n.maxLength,autofocus:"",label:n.label},null,8,["modelValue","maxlength","label"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-8856da5a"]]),Cr=D(e.defineComponent({__name:"PTable",props:{cols:{},items:{},store:{},rowKey:{default:"name"},rowsPerPageOptions:{default:()=>[25,50,75,100]},paginationLabel:{type:Function,default:(n,t,o)=>`${n}-${t} из ${o}`}},emits:["request"],setup(n,{emit:t}){const o=n,i=t,r=e.ref({page:0,rowsNumber:o.store.Count,rowsPerPage:25,sortBy:"desc",descending:!1});e.watch(()=>o.store.Count,()=>{r.value.rowsNumber=o.store.Count});const s=c=>{z.F.FTSP.Get().p.page=c.pagination.page-1,z.F.FTSP.Get().p.rowsPerPage=c.pagination.rowsPerPage,r.value.page=c.pagination.page,r.value.rowsPerPage=c.pagination.rowsPerPage},a=async c=>{s(c),await o.store.FTSP(),i("request")};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(E.QTable),{pagination:e.unref(r),"onUpdate:pagination":l[0]||(l[0]=u=>e.isRef(r)?r.value=u:null),columns:n.cols,rows:n.items,"row-key":n.rowKey,flat:"",bordered:"","rows-per-page-label":"На странице","pagination-label":n.paginationLabel,"rows-per-page-options":n.rowsPerPageOptions,class:"p-table",onRequest:a},{header:e.withCtx(u=>[e.createVNode(e.unref(E.QTr),{props:u},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QTh),{"auto-width":""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.cols,f=>(e.openBlock(),e.createBlock(e.unref(E.QTh),{key:f.name,props:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),body:e.withCtx(u=>[e.createVNode(e.unref(E.QTr),{props:u},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{row:u.row},void 0,!0)]),_:2},1032,["props"])]),_:3},8,["pagination","columns","rows","row-key","pagination-label","rows-per-page-options"]))}}),[["__scopeId","data-v-025f97ac"]]);function Da(n){n.component("PTable",Cr),n.component("PTableBadge",mr),n.component("PTableBadges",hr),n.component("PTableCount",pr),n.component("PTableEdit",gr),n.component("PTableNumber",yr),n.component("PTableSelect",wr),n.component("PTableString",br)}const lg=Object.freeze(Object.defineProperty({__proto__:null,PTable:Cr,PTableBadge:mr,PTableBadges:hr,PTableCount:pr,PTableEdit:gr,PTableNumber:yr,PTableSelect:wr,PTableString:br,default:Da},Symbol.toStringTag,{value:"Module"})),cg=["innerHTML"],Sr=D(e.defineComponent({__name:"PTabs",props:{tabsStore:{type:Object,required:!0},vertical:{type:Boolean,default:!1},color:{type:String,default:"",required:!1},dark:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const o=n,i=t;e.onBeforeMount(()=>{o.tabsStore.Select()});const r=s=>{o.tabsStore.Select(s),i("select")};return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[e.createVNode(e.unref(E.QTabs),{"model-value":n.tabsStore.value,vertical:n.vertical,class:e.normalizeClass(["tabs-header",n.color?`bg-${n.color} text-white`:"",{"tabs-header--dark":n.dark}]),dense:"",align:"justify","narrow-indicator":"","active-class":"active-tab","onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(E.QTab),{key:c.value,name:c.value,label:c.htmlLabel?void 0:c.label,icon:c.icon,"no-caps":""},{default:e.withCtx(()=>[c.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:c.htmlLabel},null,8,cg)):e.createCommentVNode("",!0),c.alert?(e.openBlock(),e.createBlock(e.unref(E.QBadge),{key:1,color:"negative",floating:"",rounded:""},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("!",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["name","label","icon"]))),128))]),_:1},8,["model-value","vertical","class"]),e.createVNode(e.unref(E.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"tabs-panels","transition-prev":"slide-right","transition-next":"slide-left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(E.QTabPanel),{key:c.value,name:c.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:c,tab:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),dg={class:"q-pa-md"},kr=D(e.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:t}){const o=n,i=t,r=a=>{o.tabsStore.Select(a),i("select")},s=e.ref(20);return(a,c)=>(e.openBlock(),e.createBlock(e.unref(E.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":c[0]||(c[0]=l=>e.isRef(s)?s.value=l:null),class:"full-height"},{before:e.withCtx(()=>[e.createVNode(e.unref(E.QTabs),{vertical:"",class:"text-teal","model-value":n.tabsStore.value,"onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,l=>(e.openBlock(),e.createBlock(e.unref(E.QTab),{key:l.value,name:l.value,label:l.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",dg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(l,u)=>(e.openBlock(),e.createBlock(ne,{key:u,label:l.text,color:l.color,class:"q-mb-sm full-width",onClick:f=>l.action(l)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(E.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"shadow-2 rounded-borders"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.GetItems(),l=>(e.openBlock(),e.createBlock(e.unref(E.QTabPanel),{key:l.value,name:l.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:l},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class ti{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","");d(this,"value","")}preSelect(){var o;const t=z.H.Router.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select((o=this.items[0])==null?void 0:o.value);return}this.Select(t)}static ToTab(t,o="",i=""){return{label:i,value:o,...t}}static Create(t,o){const i=new ti;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(!this.items.length)return;if(t===void 0)return this.preSelect();this.idx=this.items.findIndex(i=>i.value===t),this.value=t;const o=this.GetValue();o&&z.H.Router.SetQueryParam(this.key,o)}GetMenu(){return this.items[this.idx]}GetComponent(){var t;return(t=this.items[this.idx])==null?void 0:t.component}GetValue(){var t;return(t=this.items[this.idx])==null?void 0:t.value}GetItems(){return this.items}}function Fa(n){n.component("PTabs",Sr),n.component("PTabsLeft",kr)}const ug=Object.freeze(Object.defineProperty({__proto__:null,Contacts:Cm,Forms:jm,Menus:Km,Schedule:Qp,Table:lg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:Sr,PTabsLeft:kr,TabsStore:ti,default:Fa},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Oa=e.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-checkbox",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(E.QCheckbox),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),fg={class:"row items-center justify-end"},ni="DD.MM.YYYY",La=e.defineComponent({__name:"PDateInput",props:e.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},dense:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},modelType:{type:String,default:void 0,required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=E.ClosePopup,i=n,r=t,s=e.useModel(n,"modelValue"),a=ni.replace(/[DMY]/g,"#"),c=e.ref(null),l=N=>{if(i.modelType){c.value=i.modelType;return}N instanceof Date?c.value="date":(typeof N=="string"&&N||c.value===null)&&(c.value="string")},u=N=>{if(!N)return"";if(N instanceof Date)return Number.isNaN(N.getTime())?"":E.date.formatDate(N,ni);const V=String(N).match(/^(\d{4})-(\d{2})-(\d{2})/);if(V)return`${V[3]}.${V[2]}.${V[1]}`;const C=new Date(N);return Number.isNaN(C.getTime())?"":E.date.formatDate(C,ni)},f=N=>{const V=N.match(/^(\d{2})\.(\d{2})\.(\d{4})$/);if(!V)return null;const C=+V[1],T=+V[2],y=+V[3];if(C<1||C>31||T<1||T>12||y<1900||y>2100)return null;const b=new Date(y,T-1,C);return b.getFullYear()!==y||b.getMonth()!==T-1||b.getDate()!==C?null:b},m=e.ref(u(s.value));l(s.value),e.watch(s,N=>{l(N);const V=u(N);V!==m.value&&(m.value=V)});const p=N=>{const V=typeof N=="number"?String(N):N;if(!V){const T=c.value==="date"?null:"";s.value=T,r("input",T);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(V))return;const C=f(V);if(C)if(c.value==="date")s.value=C,r("input",C);else{const T=C.getFullYear(),y=String(C.getMonth()+1).padStart(2,"0"),b=String(C.getDate()).padStart(2,"0"),$=`${T}-${y}-${b}`;s.value=$,r("input",$)}},S=()=>{r("blur",s.value)},x={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(N,V)=>(e.openBlock(),e.createBlock(Ze,{modelValue:e.unref(m),"onUpdate:modelValue":[V[1]||(V[1]=C=>e.isRef(m)?m.value=C:null),p],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(a),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,rules:n.rules,inputmode:"numeric",onBlur:S},{prepend:e.withCtx(()=>[e.createVNode(e.unref(E.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QDate),{modelValue:e.unref(m),"onUpdate:modelValue":V[0]||(V[0]=C=>e.isRef(m)?m.value=C:null),mask:ni,"today-btn":"",locale:x},{default:e.withCtx(()=>[e.createElementVNode("div",fg,[e.withDirectives(e.createVNode(ne,{label:"Готово",color:"primary",flat:""},null,512),[[e.unref(o)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(N.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(N.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width","rules"]))}}),mg={class:"row items-center justify-end"},hg={class:"row items-center justify-end"},_a=e.defineComponent({__name:"PDateTimeInput",props:e.mergeModels({label:{type:String,default:"Дата и время"},placeholder:{type:String,default:"ДД.ММ.ГГГГ ЧЧ:мм"},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=E.ClosePopup,o=e.useModel(n,"modelValue"),i=e.ref(""),r=e.ref(""),s=e.ref(""),a=x=>x?E.date.formatDate(x,"DD.MM.YYYY HH:mm"):"",c=x=>{if(!x||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(x))return null;const N=E.date.extractDate(x,"DD.MM.YYYY HH:mm");return Number.isNaN(N.getTime())?null:N},l=x=>{o.value=x},u=x=>{const N=String(x??"");i.value=N.replace(/[_\s]/g,"")===""?"":N},f=()=>{const x=c(i.value);x?l(x):i.value===""?l(null):i.value=a(o.value)},m=()=>{if(r.value){const x=o.value?E.date.formatDate(o.value,"HH:mm"):"00:00",N=`${r.value} ${x}`,V=c(N);V&&(i.value=a(V),l(V))}r.value=""},p=()=>{if(s.value){const x=o.value?E.date.formatDate(o.value,"DD.MM.YYYY"):"",N=E.date.formatDate(new Date,"DD.MM.YYYY"),V=x?`${x} ${s.value}`:`${N} ${s.value}`,C=c(V);C&&(i.value=a(C),l(C))}s.value=""};e.watch(o,x=>{x!==c(i.value)&&(i.value=a(x??null))},{immediate:!0});const S={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(x,N)=>(e.openBlock(),e.createBlock(Ze,{"model-value":e.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,rules:n.rules,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":u,onBlur:f},{prepend:e.withCtx(()=>[e.createVNode(e.unref(E.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QDate),{modelValue:e.unref(r),"onUpdate:modelValue":N[0]||(N[0]=V=>e.isRef(r)?r.value=V:null),mask:"DD.MM.YYYY",locale:S},{default:e.withCtx(()=>[e.createElementVNode("div",mg,[e.withDirectives(e.createVNode(ne,{label:"OK",color:"primary",flat:"",onClick:m},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(E.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QTime),{modelValue:e.unref(s),"onUpdate:modelValue":N[1]||(N[1]=V=>e.isRef(s)?s.value=V:null),mask:"HH:mm",format24h:"",locale:S},{default:e.withCtx(()=>[e.createElementVNode("div",hg,[e.withDirectives(e.createVNode(ne,{label:"OK",color:"primary",flat:"",onClick:p},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message","rules"]))}}),pg=D(e.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(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"flex-line flex",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,height:n.height,justifyContent:n.justifyContent,background:n.background,alignItems:n.alignItems})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),gg={key:0,class:"p-form__actions row justify-end q-gutter-sm q-mt-md"},yg=D(e.defineComponent({name:"PForm",__name:"PForm",props:e.mergeModels({greedy:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},noErrorFocus:{type:Boolean,default:!1},noResetFocus:{type:Boolean,default:!1}},{valid:{type:Boolean,default:void 0},validModifiers:{}}),emits:e.mergeModels(["submit","reset","validation-success","validation-error"],["update:valid"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"valid"),s=e.ref(!0),a=C=>{s.value=C,r.value!==void 0&&(r.value=C)},c=e.ref(),l=()=>{a(!0),i("validation-success")},u=()=>{a(!1),i("validation-error")},f=C=>{i("submit",C)},m=()=>{var C;(C=c.value)==null||C.resetValidation(),a(!0),i("reset")},p=async()=>{var T;const C=await((T=c.value)==null?void 0:T.validate())??!1;return a(C),C},S=()=>{var C;(C=c.value)==null||C.resetValidation(),a(!0)};return t({validate:p,resetValidation:S,focus:()=>{var C;return(C=c.value)==null?void 0:C.focus()},submit:C=>{var T;return(T=c.value)==null?void 0:T.submit(C)},reset:C=>{var T;return(T=c.value)==null?void 0:T.reset(C)}}),(C,T)=>(e.openBlock(),e.createBlock(e.unref(E.QForm),{ref_key:"qFormRef",ref:c,greedy:n.greedy,autofocus:n.autofocus,"no-error-focus":n.noErrorFocus,"no-reset-focus":n.noResetFocus,class:"p-form",onSubmit:f,onReset:m,onValidationSuccess:l,onValidationError:u},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default",{},void 0,!0),C.$slots.actions?(e.openBlock(),e.createElementBlock("div",gg,[e.renderSlot(C.$slots,"actions",{valid:e.unref(s),validate:p,resetValidation:S},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["greedy","autofocus","no-error-focus","no-reset-focus"]))}}),[["__scopeId","data-v-a64ba3d2"]]),wg={class:"p-hint-popup"},xr=D(e.defineComponent({__name:"PHint",props:{text:{}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.text?(e.openBlock(),e.createBlock(e.unref(E.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:i[0]||(i[0]=e.withModifiers(r=>t.value=!0,["stop"]))},{default:e.withCtx(()=>[e.createVNode(nt,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(E.QMenu),{modelValue:e.unref(t),"onUpdate:modelValue":i[1]||(i[1]=r=>e.isRef(t)?t.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:e.withCtx(()=>[e.createElementVNode("div",wg,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),bg=D(e.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),Cg=D(e.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.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"]]),Sg=e.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:e.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1},color:{type:String,default:"",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},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>typeof i.id=="string"?i.id:void 0),s=e.computed(()=>{const $={};for(const R of Object.keys(i))R!=="id"&&($[R]=i[R]);return $}),a=n,c=()=>{const $=a.step.toString();return $.includes(".")?$.split(".")[1].length:0},l=c(),u=e.useModel(n,"modelValue"),m=($=>Math.min(Math.max($,a.min),a.max))(u.value);m!==u.value&&(u.value=m);const p=e.ref(m.toFixed(c())),S=e.computed(()=>{const $={};return a.margin&&($.margin=a.margin),a.padding&&($.padding=a.padding),$}),x=$=>{const R=Math.pow(10,l);return Math.round($*R)/R},N=($,...R)=>{u.value=x($),p.value=x($).toFixed(c()),R.forEach(j=>o(j,u.value))},V=($,...R)=>{a.disabled||$>a.max||$<a.min||N($,...R)},C=()=>V(+p.value+a.step,"change"),T=()=>V(+p.value-a.step,"change"),y=$=>V(Number($),"input"),b=()=>V(+p.value,"change","blur");return($,R)=>(e.openBlock(),e.createBlock(e.unref(E.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(p),label:n.label||void 0,rules:n.rules,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(S),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":y,onBlur:b}),{before:e.withCtx(()=>[e.createVNode(e.unref(E.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:T},{default:e.withCtx(()=>[e.createVNode(bg)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(E.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:C},{default:e.withCtx(()=>[e.createVNode(Cg)]),_:1})]),_:1},16,["for","model-value","label","rules","disable","input-style","style"]))}}),kg=D(Sg,[["__scopeId","data-v-1aec76d0"]]),xg=D(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.shift?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),e.createElementVNode("div",{class:"LS-body",style:e.normalizeStyle({marginLeft:e.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute",background:n.background,height:n.height})},[e.createElementVNode("div",{class:"LS-content",style:e.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4),e.createVNode(e.unref(E.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),Eg=e.defineComponent({__name:"PList",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"300px"}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(E.QList),{tag:"ul",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),Bg=e.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(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(E.QItem),{tag:"li",style:e.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),Ha=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var c;const t=n,o=((c=t.storeOpts)==null?void 0:c.Options)??[],i=e.ref(o);async function r(l,u,f,m){var N,V;const S="set"+(((N=u[0])==null?void 0:N.toUpperCase())+u.slice(1)),x=l[S];typeof x=="function"?x(f):(l[u]=f,l[u+"Id"]=f==null?void 0:f.id),await((V=m==null?void 0:m.Update)==null?void 0:V.call(m,l))}const s=(l,u)=>{if(l===""){u(()=>{i.value=o});return}u(()=>{i.value=o.filter(f=>z.H.Strings.SearchInFields(l,[f.label]))})},a=async l=>{l?(await t.storeOpts.Get(l.value),await r(t.item,t.prop,t.storeOpts.Item,t.store)):await r(t.item,t.prop,void 0,t.store)};return e.onBeforeMount(async()=>{o.length>0||await t.storeOpts.GetOptions(t.optLabel,t.optValue)}),(l,u)=>(e.openBlock(),e.createBlock(wo,{"use-input":"",options:e.unref(i),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:e.withCtx(()=>[e.createVNode(xr,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),Ng=e.defineComponent({__name:"PRadio",props:e.mergeModels({label:{type:String,default:""},name:{type:String,default:"group"},fontSize:{type:String,default:""},size:{type:String,default:"md"},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:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=n,s=()=>{i("change",r.value)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-radio",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(E.QRadio),{modelValue:o.value,"onUpdate:modelValue":[c[0]||(c[0]=l=>o.value=l),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:e.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),Vg=D(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"wrapper",style:e.normalizeStyle({maxHeight:n.height,height:n.height})},[e.createElementVNode("div",{class:"content",style:e.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[e.renderSlot(a.$slots,"content",{},void 0,!0)],4),e.createElementVNode("div",{class:"RS-body",style:e.normalizeStyle({marginRight:e.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"-5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute"})},[e.createVNode(e.unref(E.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),e.createElementVNode("div",{class:"RS-content",style:e.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),$g=D(e.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:"rgba(0, 0, 0, 0.12)"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"sticky-block",style:e.normalizeStyle({zIndex:1+n.zIndex,top:n.top,background:n.background,padding:n.padding,boxShadow:n.shadow?"0 0 5px 2px rgba(0,0,0,0.3)":"none",borderBottom:n.divider?"1px solid":"none",borderColor:n.dividerColor})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),Ua=D(e.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.row[t.prop]),i=async()=>{t.row[t.prop]=!t.row[t.prop],await t.store.Update(t.row)};return(r,s)=>(e.openBlock(),e.createBlock(e.unref(E.QTd),{key:n.prop},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["toggle-cell",{clickable:!t.readonly}]),onClick:s[0]||(s[0]=a=>t.readonly?void 0:i())},[e.createVNode(e.unref(E.QIcon),{name:e.unref(o)?"check_circle":"radio_button_unchecked",color:e.unref(o)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),e.createVNode(nt,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),Tg=D(e.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:e.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:"",required:!1},color:{type:String,default:"",required:!1},resize:{type:String,default:"vertical",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue"),o=e.useAttrs(),i=e.computed(()=>typeof o.id=="string"?o.id:void 0),r=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="id"&&(l[u]=o[u]);return l}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),c=e.computed(()=>{const l={};return s.margin&&(l.margin=s.margin),s.padding&&(l.padding=s.padding),s.borderColor&&(l["--p-border-color"]=s.borderColor),l});return(l,u)=>(e.openBlock(),e.createBlock(e.unref(E.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=f=>t.value=f)},e.unref(r),{for:e.unref(i),label:n.label||void 0,mask:n.mask,rules:n.rules,type:"textarea","input-style":e.unref(a),style:e.unref(c),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>l.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>l.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>l.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(l.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","rules","input-style","style"]))}}),[["__scopeId","data-v-4cbcc0ca"]]),va=e.defineComponent({inheritAttrs:!1,__name:"PToggle",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},size:{type:String,default:"md"},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-toggle",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(E.QToggle),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Pg={class:"top-slider-content"},Mg={class:"center"},Ig=D(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Pg,[e.createElementVNode("div",Mg,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(E.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function Rg(n){n.component("PButton",ne),n.component("PBadge",uo),n.component("PCheckBox",Oa),n.component("PChip",fr),n.component("PDateInput",La),n.component("PDateTimeInput",_a),n.component("PDialog",un),n.component("PFlex",pg),n.component("PForm",yg),n.component("PHint",xr),n.component("PInput",Ze),n.component("PInputNumber",kg),n.component("PLeftSlider",xg),n.component("PList",Eg),n.component("PListItem",Bg),n.component("POptionsListSingle",ei),n.component("POpts",Ha),n.component("PRadio",Ng),n.component("PRightSlider",Vg),n.component("PSelect",wo),n.component("PSticky",$g),n.component("PString",Ki),n.component("PTextarea",Tg),n.component("PTopSlider",Ig),n.component("PTableToggle",Ua),n.component("PToggle",va),n.component("PTooltip",nt)}const Ag={key:0,class:"mainblock"},zg={class:"mainblock-right"},Dg={class:"body"},Fg=D(e.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",Ag,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,maxWidth:e.unref(r)?"100%":n.menuWidth,marginLeft:e.unref(r)?"-110%":"0",position:e.unref(r)?"fixed":"relative",top:e.unref(r)?"140px":""})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"auto":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!e.unref(i)&&e.unref(r)?"110%":"0",borderTopLeftRadius:e.unref(r)?"0":"",borderBottomLeftRadius:e.unref(r)?"0":""}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",zg,[a.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"title",style:e.normalizeStyle({display:a.$slots.title?"flex":"none"})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",Dg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),Og={class:"mainblock-right"},Lg={class:"body"},_g=D(e.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(n){const t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mainblock",style:e.normalizeStyle({display:e.unref(r)?"block":"flex"})},[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:e.unref(r)?"58px":"80px"})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!e.unref(i)&&e.unref(r),"0"),overflowX:e.unref(r)?"scroll":"hidden",display:e.unref(r)?"flex":"block",background:e.unref(r)?"#ffffff":"",overflowY:e.unref(r)?"hidden":"auto"}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Og,[e.createElementVNode("div",{class:"title",style:e.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?e.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",Lg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),qa=D(e.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(n){return e.useCssVars(t=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-block",n.customClass])},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Hg={class:"container"},Ug={class:"slide-box"},vg={class:"image"},qg={class:"image-box"},jg=["id","src","alt"],Wg={class:"link-number"},Gg=["id","onClick"],Qg=D(e.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(n){e.useCssVars(S=>({v582c9d05:o}));const t=n,o=`${t.animationTime}ms`,i=e.ref(t.startActiveGroupIndex),r=e.ref(Bt.None),s=e.ref(na(t.events,t.quantity)),a=e.computed(()=>s.value[i.value]);e.onMounted(()=>{});const c=()=>i.value=i.value+1<s.value.length?i.value+1:0,l=()=>i.value=i.value-1<0?s.value.length-1:i.value-1,u=S=>{r.value=S,setTimeout(()=>r.value=Bt.None,t.animationTime)},f=S=>{S!=i.value&&(u(S<i.value?Bt.Prev:Bt.Next),setTimeout(()=>i.value=S,t.animationTime/2))},m=()=>{u(Bt.Next),setTimeout(c,t.animationTime/2)},p=()=>{u(Bt.Prev),setTimeout(l,t.animationTime/2)};return(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",Hg,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:x[0]||(x[0]=e.withModifiers(N=>p(),["stop"]))},[...x[3]||(x[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",Ug,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(N,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Bt).Next,animationprev:e.unref(r)===e.unref(Bt).Prev})},[e.createElementVNode("div",vg,[e.createElementVNode("div",qg,[e.createElementVNode("img",{id:N.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:N.fileInfo.getImageUrl(),alt:N.fileInfo.originalName,onClick:x[1]||(x[1]=C=>S.showImageInFullScreen())},null,12,jg)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:x[2]||(x[2]=e.withModifiers(N=>m(),["stop"]))},[...x[4]||(x[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",Wg,[e.createVNode(qa,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(N,V)=>(e.openBlock(),e.createElementBlock("div",{id:V.toString(),key:V,class:"number",style:e.normalizeStyle({background:V.toString()===e.unref(i).toString()?"#9D9D9D":""}),onClick:e.withModifiers(C=>f(V),["stop"])},e.toDisplayString(V+1),13,Gg))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),Yg=e.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.x),s=e.ref(o.y),a=e.computed(()=>r.value+"px"),c=e.computed(()=>s.value+"px"),l=()=>{i("close")};return(u,f)=>{const m=e.resolveDirective("click-outside");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"context-window",style:e.normalizeStyle({left:e.unref(a),top:e.unref(c)})},[e.renderSlot(u.$slots,"default")],4)),[[m,l]])}}}),Xg={class:"drop-item"},Zg={key:0,class:"drop-item-list"},Jg=D(e.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const t=n,o=e.ref(t.rolledUp),i=async()=>{o.value=!o.value};return(r,s)=>{const a=e.resolveComponent("PString"),c=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",Xg,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=l=>i())},[e.createVNode(a,{"font-size":"13px","font-weight":"600",string:n.name,"justify-content":"left",width:"auto",margin:"0 5px 0 0",padding:"6px 0",color:"inherit"},null,8,["string"]),e.createElementVNode("div",{style:e.normalizeStyle({transform:e.unref(o)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[e.createVNode(c,{size:"10px",margin:"0"})],4)]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",Zg,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),Kg=e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new $i,required:!0}},emits:["load"],setup(n,{emit:t}){const o=n,i=e.ref(!1),r=t,s=()=>{o.model.setBoolean(i.value),i.value?z.F.FTSP.Get().setF(o.model):z.F.FTSP.Get().removeF(o.model),r("load")};return(a,c)=>{const l=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=u=>e.isRef(i)?i.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),e1=D(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1},ftsp:{type:Object,required:!1}},emits:["load"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>o.ftsp??xt.Get()),s=e.ref(void 0),a=async l=>{r.value.replaceF(l,s.value),s.value=l,r.value.p.drop()},c=async l=>{await a(l),i("load")};return(l,u)=>{const f=e.resolveComponent("PString"),m=e.resolveComponent("PButton"),p=e.resolveComponent("GridContainer"),S=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(f,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(S,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...u[0]||(u[0]=[])]),default:e.withCtx(()=>[e.createVNode(p,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(x,N)=>(e.openBlock(),e.createBlock(m,{key:N,color:"blue",height:"auto",text:x.label,"is-toggle":x.valueEq(e.unref(s)),"toggle-mode":!0,inverse:n.inverse,onClick:V=>c(x.valueEq(e.unref(s))?void 0:x)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-22f3c81d"]]),t1=["value","label"],n1=D(e.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const o=t,i=xt.Get(),r=e.ref(void 0),s=async c=>{i.replaceF(c,r.value),r.value=c},a=async c=>{c?await s(r.value):await s(void 0),o("load")};return(c,l)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>e.isRef(r)?r.value=f:null),clearable:e.unref(r),placeholder:n.defaultLabel,onChange:a},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(f,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,value:f,label:f.label},null,8,t1))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-fec113c5"]]),o1=D(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,o)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-963d049b"]]),i1=D(e.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(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"general-block-item",style:e.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&e.unref(t)?"scale(1.03, 1.03)":""}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[e.createElementVNode("div",{class:"green",style:e.normalizeStyle({width:`${n.ready}`})},null,4),e.createElementVNode("div",{class:"general-block-item-title",style:e.normalizeStyle({fontSize:n.fontSize})},[e.renderSlot(o.$slots,"general-item",{},void 0,!0)],4),e.createElementVNode("div",{class:"tools-icon",style:e.normalizeStyle({display:n.withIcon?"flex":"none"})},[...i[2]||(i[2]=[e.createElementVNode("svg",{class:"icon-del"},[e.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[e.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"]]),r1={key:0,class:"blur"},s1={style:{display:"flex","justify-content":"center"}},a1=D(e.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(n,{emit:t}){const o=n,i=t,r=o.customClass!==""?o.customClass:"inside-class",s=e.ref(!1),a=e.ref(!1),c=e.ref(!1),l=e.ref(o.close);e.watch(()=>o.close,()=>{a.value=!1});const u=b=>{b.stopPropagation(),b.key==="Escape"&&(o.showSaveDialog?c.value=!0:a.value=!1)};e.watch(a,async()=>{var b,$;await e.nextTick(),a.value?(($=(b=document.getElementById("info-item-opened-content"))==null?void 0:b.querySelector("input"))==null||$.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&i("after-close")});const f=()=>{i("click"),a.value=!!o.withOpenWindow,l.value!==o.close&&(a.value=!1,l.value=!l.value)},m=e.computed(()=>o.customClass===""?{width:o.width,minHeight:"40px",height:"auto",maxWidth:o.maxWidth,minWidth:o.minWidth,margin:o.baseBoxMargin}:void 0),p=e.computed(()=>a.value&&o.withOpenWindow),S=e.computed(()=>({background:o.background?o.background:void 0,zIndex:p.value?"2":"0",padding:p.value?"0":o.padding,margin:o.margin,width:p.value?o.openWidth:o.width,height:p.value?o.openHeight:o.height,minHeight:"40px",maxWidth:o.maxWidth,minWidth:o.minWidth,borderColor:s.value||a.value?o.colorSelected:o.borderColor,color:s.value?o.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${o.colorSelected}`:"none",alignItems:p.value?"end":"center",cursor:(o.withHover,"pointer")})),x=e.computed(()=>({height:p.value?"0":"",overflow:o.closeWindowOverflow,width:o.width})),N=e.computed(()=>({height:p.value?"auto":"0"})),V=e.computed(()=>({color:s.value?o.colorSelected:"#343E5C",fill:s.value?o.colorSelected:"#343E5C",background:o.background})),C=()=>{o.showSaveDialog?c.value=!0:a.value=!1},T=async()=>{await i("keyup-enter"),o.close&&(a.value=!1),c.value=!1},y=()=>{a.value=!1,c.value=!1};return(b,$)=>{const R=e.resolveComponent("PString"),j=e.resolveComponent("PButton"),se=e.resolveComponent("PModal"),ze=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",r1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(m)),onClick:$[2]||($[2]=e.withModifiers(Te=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(S)),onMouseenter:$[0]||($[0]=Te=>n.withHover?s.value=!0:s.value=!1),onMouseleave:$[1]||($[1]=Te=>s.value=!1)},[e.unref(a)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["close-window",n.customClass]),style:e.normalizeStyle(e.unref(x))},[e.renderSlot(b.$slots,"default",{},void 0,!0)],6)),e.unref(a)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:e.normalizeStyle(e.unref(N))},[e.renderSlot(b.$slots,"open-inside-content",{},void 0,!0)],4)),[[ze,C,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(V))},[e.renderSlot(b.$slots,"title",{},()=>[e.createVNode(R,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:e.normalizeStyle({color:e.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),e.createVNode(se,{show:e.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",s1,[e.createVNode(j,{text:"Не сохранять",onClick:y}),e.createVNode(j,{text:"Сохранять",onClick:T})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-999853f7"]]),l1=D(e.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=s=>{o.value=!o.value,i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{close:e.unref(o),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,f=>(e.openBlock(),e.createBlock(l,{key:f,type:"admin",color:"blue",text:f,onClick:m=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(c,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),c1={class:"mainblock"},d1={class:"mainline"},u1=D(e.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",c1,[e.createElementVNode("div",d1,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[e.renderSlot(t.$slots,"left",{},void 0,!0)],4),e.createElementVNode("div",{class:"mainblock-right",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),ja=D(e.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),f1={class:"search-list"},m1=["onClick"],Wa=D(e.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(n,{emit:t}){const o=t,i=n,r=e.ref(i.modelValue),s=e.ref([]);async function a(){o("input",r.value),await c()}async function c(){i.searchFunc&&(s.value=await i.searchFunc(r.value))}async function l(u){r.value="",o("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(Ze,{modelValue:e.unref(r),"onUpdate:modelValue":f[0]||(f[0]=m=>e.isRef(r)?r.value=m:null),placeholder:"Найти",onInput:a},{right:e.withCtx(()=>[e.createVNode(ja,{size:"24px"})]),_:1},8,["modelValue"]),e.unref(r)&&e.unref(r).length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"result",style:e.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[e.createElementVNode("ul",f1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,onClick:p=>l(m)},e.toDisplayString(m.label),9,m1))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),h1=D(e.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=async()=>{};return(i,r)=>{const s=e.resolveComponent("PInput");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{modelValue:t.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value.number=a),onBlur:o},null,8,["modelValue"]),e.createVNode(s,{modelValue:t.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>t.value.description=a),onBlur:o},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-8479448f"]]),p1={style:{display:"flex","justify-content":"center",width:"100%"}},g1={class:"pag-number"},y1={class:"pag-ul"},w1={key:2},b1=D(e.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const t=n,o=m=>m?"active":"neutral",i=m=>m?"not-active":"neutral",r=e.ref(oa),s=e.ref(!1),a=e.ref(!1);r.value.count=t.store.Count.value,e.watch(t.store.Count,()=>{r.value.count=t.store.Count.value});const c=async m=>{if(m!==r.value.curPage&&(m<1&&(m=1),m>r.value.pagesCount()&&(m=r.value.pagesCount()),!t.showConfirm))return await l(m)},l=async(m,p)=>{r.value.setCurPage(m),xt.Get().p.offset=(m-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const m=r.value.pagesCount();return m<8?Dt.GenerateNumsRange(2,m-1).filter(p=>p<m&&p>1):Dt.GenerateNumsRange(r.value.curPage-2,r.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 e.onBeforeUnmount(()=>{xt.Get().p.drop()}),(m,p)=>{const S=e.resolveComponent("ArrowLeft"),x=e.resolveComponent("PButton"),N=e.resolveComponent("DoubleArrowLeft"),V=e.resolveComponent("EllipsisSvg"),C=e.resolveComponent("DoubleArrowRight"),T=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",p1,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",g1,[e.createVNode(x,{skin:"pag",type:i(e.unref(r).curPage===1),onClick:p[0]||(p[0]=y=>c(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(S)]),_:1},8,["type"]),e.createElementVNode("ul",y1,[e.createElementVNode("li",null,[e.createVNode(x,{skin:"pag",type:o(e.unref(r).curPage===1),text:"1",onClick:p[1]||(p[1]=y=>c(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=y=>s.value=!0),onMouseleave:p[4]||(p[4]=y=>s.value=!1)},[e.createVNode(x,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=y=>c(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(N,{key:0})):(e.openBlock(),e.createBlock(V,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),y=>(e.openBlock(),e.createElementBlock("li",{key:y},[e.createVNode(x,{skin:"pag",type:o(y===e.unref(r).curPage),text:y,onClick:b=>c(y)},null,8,["type","text","onClick"])]))),128)),e.unref(r).pagesCount()>=8&&e.unref(r).curPage<e.unref(r).pagesCount()-3?(e.openBlock(),e.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=y=>a.value=!0),onMouseleave:p[7]||(p[7]=y=>a.value=!1)},[e.createVNode(x,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=y=>c(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(C,{key:0})):(e.openBlock(),e.createBlock(V,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",w1,[e.createVNode(x,{skin:"pag",type:o(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:p[8]||(p[8]=y=>c(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(x,{skin:"pag",type:i(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:p[9]||(p[9]=y=>c(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode(T)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),C1=D(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(o.modelValue),s=e.ref();let a=Ji.SearchModel();e.watch(()=>o.focus,()=>{o.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async f=>{if(f.length<2)return;s.value.activated=!0,a=Ji.SearchModel(),a.searchObjects=[],a.query=f,a.key=o.keyValue;const m=a.searchGroups.find(p=>p.key===o.keyValue);return m&&(a.searchGroup=m),await ua.Search.Search(a),a.searchObjects},l=async f=>{i("select",f),r.value=""},u=f=>{i("input",f),f.length===0&&i("input","")};return(f,m)=>(e.openBlock(),e.createBlock(Wa,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":m[0]||(m[0]=p=>e.isRef(r)?r.value=p:null),"max-height-result-list":n.maxHeightResultList,"z-index-result-list":n.zIndexResultList,"box-shadow-result-list":n.boxShadowResultList,width:n.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:n.placeholder,"search-func":c,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:l,onInput:u},null,8,["modelValue","max-height-result-list","z-index-result-list","box-shadow-result-list","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-46a1d0c0"]]),S1={class:"mainblock-body"},k1={class:"mainblock-footer"},x1=D(e.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({background:n.background,padding:n.padding})},[e.createElementVNode("div",{class:"mainblock-header",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"header",{},void 0,!0)],4),e.createElementVNode("div",S1,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",k1,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),E1={class:"right-slider-content"},B1={class:"right-slider-content-header"},N1={class:"right-slider-content-box"},V1={class:"right-slider-button"},$1=D(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(!1);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"right-slider",style:e.normalizeStyle({marginRight:e.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[e.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",E1,[e.createElementVNode("div",B1,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",N1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",V1,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),T1={class:"mainblock"},P1={class:"body-block"},M1={class:"tab-block"},I1=D(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{i("toggle",l)},c=e.ref(!1);return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(o.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").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}),r.value=!0}),(l,u)=>(e.openBlock(),e.createElementBlock("div",T1,[e.createElementVNode("div",{class:"slider-block",style:e.normalizeStyle({marginRight:e.unref(s)?n.isToggle?"49px":`calc(49px - ${n.sliderOnWidth})`:n.isToggle?n.sliderOffWidth:`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`,width:n.sliderOnWidth,minHeight:n.sliderOffWidth,height:n.isToggle?"auto":"100px"})},[e.createElementVNode("div",{class:"slider-icon",style:e.normalizeStyle({border:n.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:n.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=f=>a(!n.isToggle)),onMouseenter:u[1]||(u[1]=f=>c.value=!0),onMouseleave:u[2]||(u[2]=f=>c.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(c)?n.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":n.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:n.isToggle?"#379FFF":"#00B5A4"})},[e.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",P1,[e.renderSlot(l.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",M1,[e.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),R1=["label","value"],A1=D(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const o={[We.String]:"Текстовый ответ",[We.Text]:"Развёрнутый текстовый ответ",[We.Number]:"Числовой ответ",[We.Date]:"Ответ в виде даты",[We.Radio]:"Выбор одного из вариантов",[We.Set]:"Выбор нескольких вариантов",[We.File]:"Ответ в виде файла",[We.MatrixRadio]:"Матрица с одним выбором",[We.MatrixSet]:"Матрица с несколькими выборами"},i=t,r=s=>{i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(l,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(u,f)=>e.createElementVNode("option",{key:u,label:u,value:f},null,8,R1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),z1=["label","value"],D1=D(e.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=e.ref();e.onBeforeMount(()=>{o.value=!0,r.value=dn.GetDefault()});const s=async c=>{r.value=c??dn.GetDefault(),i("load")},a=async c=>{await s(c)};return(c,l)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(o)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=m=>e.isRef(r)?r.value=m:null),"popper-append-to-body":!1,clearable:!((f=e.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=m=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dn).Get(),(m,p)=>(e.openBlock(),e.createElementBlock("option",{key:p,label:m.label,value:m},null,8,z1))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-dbb21f2f"]]),F1=["label","value"],O1=D(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250},ftsp:{type:Object,required:!1}},emits:["load"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>o.ftsp??xt.Get()),s=e.ref();e.onBeforeMount(()=>{s.value=dn.GetDefault()});const a=async l=>{l||(s.value=dn.GetDefault()),r.value.setSortModel(s.value),r.value.p.drop(),i("load")},c=async l=>{await a(l)};return(l,u)=>{var m;const f=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(s),"onUpdate:modelValue":u[0]||(u[0]=p=>e.isRef(s)?s.value=p:null),"popper-append-to-body":!1,clearable:!((m=e.unref(s))!=null&&m.default),"value-key":"label",onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dn).Get(),(p,S)=>(e.openBlock(),e.createElementBlock("option",{key:S,label:p.label,value:p},null,8,F1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-1e73245e"]]),L1={class:"switch-container"},_1={class:"line"},H1={class:"line"},U1=D(e.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:t}){const o=n,i={background:"inherit",border:"1px solid #c4c4c4"},r=()=>o.firstModel.valueEq(u.value)?void 0:i,s=()=>u.value?i:void 0,a=()=>o.secondModel.valueEq(u.value)?void 0:i,c=m=>{var S;return{color:(S=u.value)!=null&&S.valueEq(m)?"#006bb4":"#B0A4C0"}},l=t,u=e.ref(void 0),f=async m=>{var p;(p=u.value)!=null&&p.valueEq(m)||(u.value=m,l("load"))};return(m,p)=>{const S=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",L1,[e.createElementVNode("div",_1,[e.createVNode(S,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.firstModel)),onClick:p[0]||(p[0]=x=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(S,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(c()),onClick:p[1]||(p[1]=x=>f())},null,8,["style"]),e.createVNode(S,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.secondModel)),onClick:p[2]||(p[2]=x=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",H1,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:p[3]||(p[3]=x=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:p[4]||(p[4]=x=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:p[5]||(p[5]=x=>f(n.secondModel))},null,6),p[6]||(p[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),p[7]||(p[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),p[8]||(p[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),p[9]||(p[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),v1={},q1={class:"flex"};function j1(n,t){return e.openBlock(),e.createElementBlock("div",q1,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const W1=D(v1,[["render",j1],["__scopeId","data-v-5023d414"]]),G1=D(e.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=async()=>{i("submit"),o.value=!o.value};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("GridContainer"),f=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:e.unref(o),width:"100%",onKeyupEnter:r},{"open-inside-content":e.withCtx(()=>[e.createVNode(u,{"custom-class":"grid"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0),e.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(c,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-65abc352"]]),Q1={class:"top-slider-content"},Y1={class:"center"},X1=D(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(!0);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Q1,[e.createElementVNode("div",Y1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function Z1(n){n.component("PageNotFound",Ks),n.component("AdaptiveContainer",Fg),n.component("AdaptiveContainerHorizontal",_g),n.component("CarouselImages",Qg),n.component("ContextWindow",Yg),n.component("DropList",Jg),n.component("FilterCheckbox",Kg),n.component("FiltersButtonsSelect",e1),n.component("FilterSelect",n1),n.component("FTSPPanel",o1),n.component("GeneralItem",i1),n.component("GridContainer",qa),n.component("InfoItem",a1),n.component("InfoItemSelectButtons",l1),n.component("LeftRightContainer",u1),n.component("PAutocomplete",Wa),n.component("PhoneForm",h1),n.component("PPagination",b1),n.component("RemoteSearch",C1),n.component("ResearcheContainer",x1),n.component("RightSliderContainer",$1),n.component("RightTabsContainer",I1),n.component("SelectValueType",A1),n.component("SortList",D1),n.component("SortSelect",O1),n.component("Switch3Pos",U1),n.component("ThemeWrapper",W1),n.component("ToggleInfoItem",G1),n.component("TopSliderContainer",X1)}const J1=D(e.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(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),K1=D(e.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(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),ey=D(e.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e.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"]]),ty=D(e.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"]]),Ga=D(e.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[e.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"]]),ny=D(e.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),oy=D(e.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),iy=D(e.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[e.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"]]),ry=D(e.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),sy=D(e.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[e.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"}),e.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"]]),ay=D(e.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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-46c690c8"]]),ly=D(e.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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-b688738b"]]),cy=D(e.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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-bd131770"]]),dy=D(e.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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-db5832a2"]]),uy=D(e.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),i[3]||(i[3]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-5abed3e4><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-5abed3e4><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-5abed3e4></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-5abed3e4></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-5abed3e4></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-5abed3e4"]]);function fy(n){n.component("IconDownload",J1),n.component("IconFilter",K1),n.component("ArrowLeft",ay),n.component("ArrowRight",ly),n.component("DoubleArrowLeft",cy),n.component("DoubleArrowRight",dy),n.component("EllipsisSvg",uy),n.component("IconArrowLeft",ey),n.component("IconCheckDefault",ty),n.component("IconClose",Ga),n.component("IconEdit",ny),n.component("IconEmail",oy),n.component("IconMove",iy),n.component("IconPhone",ry),n.component("IconSearch",ja),n.component("IconSelectArrow",sy)}const my=e.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const t=e.ref(n.initActiveIdx),o=i=>{t.value=i};return e.watch(()=>n.initActiveIdx,()=>{o(n.initActiveIdx)}),{changeActiveId:o,activeIdx:t}}});function hy(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const py=D(my,[["render",hy]]),gy=e.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(n,{emit:t}){const o=e.ref(n.activeId==="0"),i=()=>{o.value=!o.value,t("changeActiveId",n.tabId)};return e.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!0)}),e.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!1)}),{collapsed:o,handleItemClick:i}}}),yy=["for"],wy={class:"inside-icon"};function by(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"tab",style:e.normalizeStyle({margin:n.margin,height:n.isCollaps&&n.collapsed?"60px":"","box-shadow":n.selectable&&n.activeId===n.tabId?"0px 0px 1px 2px #1979cf":""})},[n.isCollaps&&n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:t[0]||(t[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[3]||(t[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:t[1]||(t[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[4]||(t[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("label",{for:n.tabId,onClick:t[2]||(t[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[e.createElementVNode("div",{style:e.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[e.createElementVNode("div",wy,[e.renderSlot(n.$slots,"icon",{},void 0,!0)]),e.createElementVNode("div",{class:"title-in",style:e.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[e.renderSlot(n.$slots,"inside-title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],4),e.createElementVNode("div",{class:e.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[e.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,yy),e.createElementVNode("div",{style:e.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:e.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[e.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),t[5]||(t[5]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-37d79495><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-37d79495></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-37d79495></path></symbol></svg>',1))],64)}const Cy=D(gy,[["render",by],["__scopeId","data-v-37d79495"]]),Sy={class:"tab"},ky={class:"rotate"},xy=D(e.defineComponent({__name:"VerticalCollapseContainer",setup(n){const t=e.ref(!1),o=async()=>{t.value=!t.value};return(i,r)=>{const s=e.resolveComponent("ArrowRight"),a=e.resolveComponent("ArrowLeft");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Sy,[e.renderSlot(i.$slots,"main",{},void 0,!0),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"20px",transition:"0.3s"}),class:"left"},[e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"100%":"0",transition:"0.3s"}),class:"left-content"},[e.renderSlot(i.$slots,"inside-content-left",{},void 0,!0)],4),e.createElementVNode("div",{class:"arrow-bar",onClick:o},[e.createElementVNode("div",ky,[e.renderSlot(i.$slots,"inside-title",{},void 0,!0)]),e.unref(t)?(e.openBlock(),e.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(e.openBlock(),e.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"100%",transition:"0.3s"}),class:"right"},[e.renderSlot(i.$slots,"inside-content-right",{},void 0,!0)],4)]),e.createVNode(a),e.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),Ey={class:"add-block_body"},By=D(e.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(n){return(t,o)=>{const i=e.resolveComponent("PSticky");return e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",Ey,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),Ny=D(e.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(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),Vy={class:"add-block_body"},$y=D(e.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(n){return(t,o)=>{const i=e.resolveComponent("PSticky"),r=e.resolveComponent("PContainer");return e.openBlock(),e.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:e.withCtx(()=>[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",Vy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),Ty={class:"select-dialog"},Py={class:"select-dialog-header"},My={class:"select-dialog-title"},Iy={class:"select-dialog-content"},Ry={class:"select-dialog-actions"},Qa=D(e.defineComponent({__name:"PAddDialog",props:e.mergeModels({title:{type:String,default:""},store:{type:Object,required:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["add","close"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.useModel(n,"modelValue"),a=e.ref([]),c=E.Ripple,l=E.ClosePopup,u=async()=>{await i.store.GetOptions(),a.value=i.store.Options},f=async V=>{await i.store.Get(V.value);const C=i.store.Item,T=new C.constructor(C);r("add",T),m()},m=()=>{r("close"),s.value=!1},p=V=>{V||r("close")},S=()=>{s.value&&m()},x=()=>{s.value=!s.value},N=async()=>{await e.nextTick();const V=document.querySelector(".select-dialog-content .q-item");V&&"focus"in V&&V.focus()};return t({opened:s,toggle:x}),e.onBeforeMount(u),(V,C)=>(e.openBlock(),e.createBlock(un,{modelValue:s.value,"onUpdate:modelValue":[C[0]||(C[0]=T=>s.value=T),p],position:"top",onKeydown:e.withKeys(S,["escape"]),onShow:N},{default:e.withCtx(()=>[e.createElementVNode("div",Ty,[e.createElementVNode("div",Py,[e.createElementVNode("div",My,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(l)]])]),e.createElementVNode("div",Iy,[e.createVNode(e.unref(E.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),T=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(E.QItem),{key:T.value,clickable:"",class:"q-px-md q-py-sm",onClick:y=>f(T)},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(E.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(c)]])),128))]),_:1})]),e.createElementVNode("div",Ry,[e.withDirectives(e.createVNode(ne,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[e.unref(l)]])])])]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-9f6a2f5b"]]),Ay=["src"],zy={key:0,class:"header-row"},Dy={class:"title-wrapper"},Fy={key:0,class:"title-icon"},Oy={class:"title-text"},Ly={class:"text-subtitle1 text-weight-medium"},_y={key:0,class:"caption-row"},Hy={class:"text-caption text-grey-6"},Uy=["innerHTML"],vy={key:1,class:"card-footer"},Ya=D(e.defineComponent({__name:"PCard",props:{height:{type:String,default:"auto"},maxHeight:{type:String,default:"none"},img:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},caption:{type:String,default:""},icon:{type:String,default:""},isMain:{type:Boolean,default:!1},noPointer:{type:Boolean,default:!1},noHover:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:t}){const o=e.ref(null),i=n,r=t,s=e.computed(()=>i.img?i.isMain?"365px":"200px":"0"),a=c=>{i.noPointer||r("click",c)};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(E.QCard),{class:e.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:e.normalizeStyle({height:n.height}),onClick:a},{default:e.withCtx(()=>[n.img?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-container",style:e.normalizeStyle({height:s.value})},[e.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:e.normalizeStyle({height:s.value})},null,12,Ay)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(E.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||c.$slots.title||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",zy,[e.createElementVNode("div",Dy,[n.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Fy,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(e.unref(E.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Oy,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",Ly,e.toDisplayString(n.title),1)],!0)])]),c.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",_y,[e.renderSlot(c.$slots,"caption",{},()=>[e.createElementVNode("span",Hy,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||c.$slots.title?(e.openBlock(),e.createBlock(e.unref(E.QSeparator),{key:1,class:"header-separator"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"content-wrapper"},[e.renderSlot(c.$slots,"default",{},()=>[n.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,Uy)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",vy,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),qy={key:0,class:"list-title"},jy={class:"draggable-item"},Wy={class:"drag-handle"},Gy={class:"item-content"},Qy={key:0,class:"item-actions"},Yy={class:"item-content"},Xy={key:0,class:"item-actions"},Zy={key:4,class:"add-button-container"},Jy=e.defineComponent({__name:"PCrudList",props:{sortable:{type:Boolean,default:!0},showAdd:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},title:{type:String,required:!0,default:""},store:{type:z.H.BaseStore,default:void 0},addFunc:{type:Function,default:void 0},addToList:{type:Boolean,default:!0},removeFromList:{type:Boolean,default:!0},margin:{type:String,required:!0,default:"0"},background:{type:String,required:!0,default:"var(--background-color)"}},emits:["add","remove","update","sort"],setup(n,{emit:t}){e.useCssVars(l=>({v2a47a50e:n.background}));const o=n,i=t,r=async()=>{const l=o.addFunc?await o.addFunc():void 0;l&&(typeof l.order<"u"&&(l.order=o.list.length),o.addToList&&o.store&&o.store.AppendToAll(l),o.store&&await o.store.Create(l)),await c(),i("add",l)},s=async l=>{o.removeFromList&&z.H.Classes.RemoveFromClassById(l,o.list),o.store&&await o.store.Remove(l),await c(),i("remove",l)},a=async l=>{o.store&&await o.store.Update(l),i("update",l)},c=async()=>{!o.sortable||o.list.length===0||typeof o.list[0].order>"u"||(z.H.Sorter.Sort(o.list),o.store&&await o.store.UpdateMany(o.list),i("sort"))};return(l,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(l.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",qy,e.toDisplayString(n.title),1)):e.renderSlot(l.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(bi),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:c},{item:e.withCtx(({element:f,index:m})=>[e.createElementVNode("div",jy,[e.createElementVNode("div",Wy,[e.createVNode(e.unref(E.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",Gy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Ze,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",Qy,[e.createVNode(ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)])]),_:3},8,["list"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(n.list,(f,m)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"static-item",style:e.normalizeStyle({background:n.background})},[e.createElementVNode("div",Yy,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Ze,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",Xy,[e.createVNode(ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",Zy,[e.createVNode(ne,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),Xa=D(Jy,[["__scopeId","data-v-c87ed91c"]]),Ky={class:"del-block_title"},e0={class:"del-block_body"},t0=D(e.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(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"del-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createElementVNode("div",Ky,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",e0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),Za=D(e.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(n,{emit:t}){const o=n,i=t,r=a=>{a.key==="Escape"&&s()};e.onMounted(()=>{document.body.addEventListener("keydown",r)}),e.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{o.closable&&i("close")};return(a,c)=>{const l=e.resolveComponent("IconClose");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:s})):e.createCommentVNode("",!0),n.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"modal-w",style:e.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[e.createVNode(l,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function n0(n){n.component("CollapseContainer",py),n.component("CollapseItem",Cy),n.component("VerticalCollapseContainer",xy),n.component("PAdd",By),n.component("PAddDialog",Qa),n.component("PCard",Ya),n.component("PCrudList",Xa),n.component("PEditDialog",Hn),n.component("PModal",Za),n.component("PContainer",Ny),n.component("PContainerStickyHead",$y),n.component("PDel",t0)}const o0={class:"btn-group"},Ja=D(e.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(n,{emit:t}){const o=t,i=e.computed(()=>Oe.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async c=>{if(!c.isSubmit){Oe.Form.SetChunk(c.GetChunk()),a();return}const l=Oe.Form.Validate();if(l.length>0){Gt.Notify.Error(l.join("<br/>"));return}o("submit")},a=()=>{if(!r.value)return;const c=r.value[0];c&&c.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{Oe.Form.Reset()}),(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"auth-card",style:e.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[e.createVNode(Ki,{string:e.unref(Oe).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Oe).Form.GetFields(),u=>(e.openBlock(),e.createBlock(Ze,{id:u.id,key:u.id,ref_for:!0,ref_key:"fields",ref:r,modelValue:u.value,"onUpdate:modelValue":f=>u.value=f,autocomplete:"nope",type:u.IsPassword?"password":"text",placeholder:u.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder"]))),128)),e.createElementVNode("div",o0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(u,f)=>(e.openBlock(),e.createBlock(ne,{id:u.id,key:u.GetChunk(),disabled:e.unref(Oe).Form.IsBlock,type:f===0?e.unref(pe).Success:e.unref(pe).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:m=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),i0=e.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const t=()=>{Oe.Form.Reset(),Oe.Modal.Close()};return(o,i)=>(e.openBlock(),e.createBlock(Za,{show:e.unref(Oe).Modal.Visible,closable:e.unref(Oe).Modal.Closable,width:n.width,padding:n.padding,onClose:t},{default:e.withCtx(()=>[e.createVNode(Ja,{margin:n.margin,padding:"0",onSubmit:i[0]||(i[0]=r=>o.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),r0=["onClick"],s0=D(e.defineComponent({__name:"PMenuTabs",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(n,{emit:t}){const o=n,i=t,r=e.ref(window.innerWidth),s=e.ref(),a=e.ref(Number(o.tabHeight.replace(/[^+\d]/g,""))),c=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(o.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",c)),e.onUnmounted(()=>window.removeEventListener("resize",c));const l=e.computed(()=>`calc(100% - ${a.value}px + 1px)`);e.onBeforeMount(()=>{o.menus.Select()});const u=f=>{o.menus.Select(f),i("select")};return(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[e.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:e.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menus.items,(p,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":S===n.menus.idx,tab:S!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:x=>u(S)},e.toDisplayString(p.name),15,r0)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(l)})},[e.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):e.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-1046962d"]]),a0=["id"],l0=["for"],c0={class:"left-field"},d0=["href","download"],u0={key:1,class:"text-field__input"},f0={class:"right-field"},m0=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new kt},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(n,{emit:t}){const o=n,i=t,r=Xe.GUID(),s=Xe.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!l(f.name)){Vn.Error(`Загруженный файл должен быть в одном из форматов: ${o.formats.join(", ")}`);return}const m=new kt;m.setFile(f),m.url=URL.createObjectURL(f),i("upload",m)},c=()=>{i("remove")};e.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const l=u=>{let f=ta.Get(u);return!!o.formats.includes(f.toLowerCase())};return(u,f)=>{const m=e.resolveComponent("PString"),p=e.resolveComponent("PFlex"),S=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{id:e.unref(r),type:"file",hidden:"",onChange:a},null,40,a0),e.createElementVNode("div",{class:"text-field",style:e.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},e.toDisplayString(n.label),9,l0)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",c0,[e.createVNode(p,null,{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},void 0,!0),e.createVNode(m,{string:n.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),n.fileInfo&&n.fileInfo.originalName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"text-field__input",style:e.normalizeStyle({color:n.color})},[e.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[e.createElementVNode("div",null,e.toDisplayString(n.fileInfo.originalName),1)],8,d0),e.createVNode(S,{skin:"text",type:"del",onClick:c},{default:e.withCtx(()=>[e.createVNode(Ga,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",u0,[e.createVNode(m,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",f0,[e.createVNode(S,{id:e.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:n.fileInfo&&n.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),h0=D(m0,[["__scopeId","data-v-8b73ee22"]]);function Ka(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),o.push.apply(o,i)}return o}function de(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Ka(Object(o),!0).forEach(function(i){ut(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ka(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function ut(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function p0(n,t){if(n==null)return{};var o,i,r=function(a,c){if(a==null)return{};var l,u,f={},m=Object.keys(a);for(u=0;u<m.length;u++)l=m[u],c.indexOf(l)>=0||(f[l]=a[l]);return f}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)o=s[i],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(n,o)&&(r[o]=n[o])}return r}function bn(n){return function(t){if(Array.isArray(t))return Er(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,o){if(t){if(typeof t=="string")return Er(t,o);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Er(t,o)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
26
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function
|
|
25
|
+
`)},Z=(h,g)=>{var w;return{conflict:Wr(h.item,g),dragging:((w=Rt.value)==null?void 0:w.perfom.id)===g.id,[en(h)]:!0}},ke=e.ref(null),be=(h,g)=>{const w=h.getBoundingClientRect(),M=Math.min(Math.max((g-w.top)/w.height,0),1);return le.value.start+wo(M*le.value.total,wn)},te=(h,g)=>{g.target.closest(".block-actions, .block-resize")||g.button!==0||j.value||(ke.value={gi:h,startX:g.clientX,startY:g.clientY,moved:!1},window.addEventListener("pointermove",H),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",tt),window.addEventListener("keydown",ko))},H=h=>{const g=ke.value;if(g){if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<za)return;g.moved=!0;const w=Hn(g.gi.item.startTime,g.gi.item.endTime);b.value={kind:g.gi.kind,id:g.gi.item.id,name:g.gi.item.name||(g.gi.kind==="session"?s.value.session:s.value.slot),duration:isFinite(w)&&w>0?w:30},document.body.style.userSelect="none",document.body.style.cursor="grabbing"}U(h.clientX,h.clientY),v(h.clientX,h.clientY)}},U=(h,g)=>{var Pe,Ie;const w=document.elementFromPoint(h,g),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id");if(!M||!F){y.value=void 0,N.value=null;return}const Y=Zn(F);if(!Y)return;y.value=Y.id;const fe=be(M,g);N.value={scheduleId:Y.id,minutes:fe,time:Ge(fe),hallName:W(Y),...((Pe=b.value)==null?void 0:Pe.kind)==="slot"&&o.value?{session:gi(Y.sessions,fe,fe+(((Ie=b.value)==null?void 0:Ie.duration)||30),ce)}:{}},I.value={x:h,y:g}},v=(h,g)=>{const w=ze.value;if(!w)return;const M=w.getBoundingClientRect();g<M.top+48?w.scrollTop-=14:g>M.bottom-48&&(w.scrollTop+=14),h<M.left+48?w.scrollLeft-=14:h>M.right-48&&(w.scrollLeft+=14)},q=h=>{oe(h)},oe=async h=>{const g=ke.value;if(me(),ke.value=null,!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Zn(F):void 0;if(M&&Y){const fe=be(M,h.clientY);await Rl(Y,fe)}xe()},me=()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",tt),window.removeEventListener("keydown",ko)},xe=()=>{ke.value=null,b.value=null,y.value=void 0,N.value=null,I.value=null,document.body.style.userSelect="",document.body.style.cursor="",se.value=Date.now()},tt=()=>{me(),xe()},ko=h=>{h.key==="Escape"&&tt()};e.onBeforeUnmount(()=>{me(),Zr(),Aw(),document.body.style.userSelect="",document.body.style.cursor=""});const Xn=h=>{if(!h)return null;for(const g of t.days||[])for(const w of g.schedules||[]){const M=(w.sessions||[]).find(Y=>Y.id===h);if(M)return{kind:"session",item:M,schedule:w};const F=c(w).find(Y=>Y.id===h);if(F)return{kind:"slot",item:F,schedule:w}}return null},Yr=()=>{var h;return Xn((h=b.value)==null?void 0:h.id)},Bw=(h,g)=>{g.preventDefault(),g.stopPropagation();const w=h.item,M=ce(w.startTime),F=ce(w.endTime);if(!isFinite(M)||!isFinite(F))return;const Y=g.clientY;j.value=!0;const fe=A=>{const G=(A.clientY-Y)/Ne.value*60,K=wo(F+G,wn);w.endTime=Ge(Math.max(K,M+wn))},Pe=async()=>{window.removeEventListener("pointermove",fe),window.removeEventListener("pointerup",Ie),j.value=!1,se.value=Date.now();const A=Xn(w.id);A&&(await tn(w,A.kind),await t.persist.refresh())},Ie=()=>{Pe()};window.addEventListener("pointermove",fe),window.addEventListener("pointerup",Ie)},Rt=e.ref(null),Vw=(h,g,w)=>{if(w.target.closest(".nested-edit, .nested-resize")||w.button!==0||j.value)return;const M=w.target.closest(".session-perfoms"),F=ce(h.startTime),Y=ce(h.endTime),fe=Hn(g.startTime,g.endTime);!M||!isFinite(F)||!isFinite(Y)||Y<=F||(Rt.value={perfom:g,session:h,startX:w.clientX,startY:w.clientY,moved:!1,savedStart:g.startTime,savedEnd:g.endTime,sessionStart:F,sessionDur:Y-F,durMin:isFinite(fe)&&fe>0?fe:30,container:M},window.addEventListener("pointermove",Pl),window.addEventListener("pointerup",Ml),window.addEventListener("pointercancel",Xr),window.addEventListener("keydown",Il))},Pl=h=>{const g=Rt.value;if(!g)return;if(!g.moved){if(Math.hypot(h.clientX-g.startX,h.clientY-g.startY)<za)return;g.moved=!0,document.body.style.userSelect="none",document.body.style.cursor="grabbing"}const w=g.container.getBoundingClientRect(),M=Math.min(Math.max((h.clientY-w.top)/w.height,0),1);let F=g.sessionStart+wo(M*g.sessionDur,wn);const Y=g.sessionStart+g.sessionDur-g.durMin;F=Math.min(Math.max(F,g.sessionStart),Math.max(Y,g.sessionStart)),g.perfom.startTime=Ge(F),g.perfom.endTime=Ge(F+g.durMin),I.value={x:h.clientX,y:h.clientY}},Ml=h=>{Nw(h)},Nw=async h=>{var fe;const g=Rt.value;if(Zr(),Rt.value=null,I.value=null,document.body.style.userSelect="",document.body.style.cursor="",!g||!g.moved)return;se.value=Date.now();const w=document.elementFromPoint(h.clientX,h.clientY),M=w==null?void 0:w.closest(".hall-col"),F=M==null?void 0:M.getAttribute("data-schedule-id"),Y=F?Zn(F):void 0;if(M&&Y){b.value={kind:"slot",id:g.perfom.id,name:g.perfom.name||s.value.slot,duration:g.durMin};const Pe=be(M,h.clientY),Ie=Ge(Pe),A=Hn(g.perfom.startTime,g.perfom.endTime),G=wt(Ie,A>0?A:30),K=((fe=Dl(g.perfom))==null?void 0:fe.id)===Y.id&&g.perfom.startTime===Ie&&g.perfom.endTime===G;await Rl(Y,Pe),K&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh()),b.value=null;return}g.perfom.startTime=yn(g.perfom.startTime),g.perfom.endTime=yn(g.perfom.endTime),g.perfom.startTime&&(await t.persist.updateSlot(g.perfom),await t.persist.refresh())},Xr=()=>{const h=Rt.value;Zr(),h&&(h.perfom.startTime=h.savedStart,h.perfom.endTime=h.savedEnd),Rt.value=null,I.value=null,document.body.style.userSelect="",document.body.style.cursor=""},Zr=()=>{window.removeEventListener("pointermove",Pl),window.removeEventListener("pointerup",Ml),window.removeEventListener("pointercancel",Xr),window.removeEventListener("keydown",Il)},Il=h=>{h.key==="Escape"&&Xr()},$w=(h,g,w)=>{w.preventDefault(),w.stopPropagation();const M=ce(h.startTime),F=ce(h.endTime),Y=ce(g.startTime),fe=w.target.closest(".nested-perfom"),Pe=fe==null?void 0:fe.closest(".session-perfoms");if(!fe||!Pe||!isFinite(M)||!isFinite(F)||F<=M||!isFinite(Y))return;const Ie=Pe.getBoundingClientRect(),A=F-M;j.value=!0;const G=vt=>{const Hw=Math.min(Math.max((vt.clientY-Ie.top)/Ie.height,0),1),Uw=Math.min(Math.max(Y+wn,M+wo(Hw*A,wn)),F);g.endTime=Ge(Uw)},K=async()=>{window.removeEventListener("pointermove",G),window.removeEventListener("pointerup",Q),j.value=!1,se.value=Date.now(),await t.persist.updateSlot(g),await t.persist.refresh()},Q=()=>{K()};window.addEventListener("pointermove",G),window.addEventListener("pointerup",Q)},Rl=async(h,g)=>{var G;y.value=void 0,N.value=null,I.value=null;const w=Yr();if(!w)return;const M=Ge(g),F=Hn(w.item.startTime,w.item.endTime),Y=wt(M,F>0?F:30);if(((G=w.schedule)==null?void 0:G.id)===h.id&&w.item.startTime===M&&w.item.endTime===Y)return;const fe=w.item.startTime;if(w.item.startTime=M,w.item.endTime=Y,w.kind==="slot"&&o.value){const K=gi(h.sessions,ce(M),ce(Y),ce);K?w.item.sessionId=K.id:delete w.item.sessionId}else w.kind==="slot"&&delete w.item.sessionId;if(w.kind==="session"){const K=ce(M)-ce(fe);for(const Q of at(w.item))Q.startTime&&(Q.startTime=wt(Q.startTime,K),Q.endTime&&(Q.endTime=wt(Q.endTime,K)),Q.scheduleId=h.id,await tn(Q,"slot"))}const Pe=w.schedule,Ie=w.kind==="session"?h.sessions:c(h),A=w.item;if(Pe&&Pe.id!==h.id){A.scheduleId=h.id;const K=w.kind==="session"?Pe.sessions:c(Pe);D.H.Classes.RemoveFromClassById(A.id,K,[]),Ie.push(A)}await tn(A,w.kind),await t.persist.refresh()},Tw=async(h,g)=>{if(g.target.closest(".timeline-block"))return;const w=be(g.currentTarget,g.clientY),M=a.value.createSlot(h);if(M.startTime=Ge(w),M.endTime=Ge(w+30),o.value){const Y=gi(h.sessions,w,w+30,ce);Y!=null&&Y.id&&(M.sessionId=Y.id)}await t.persist.createSlot(M),await t.persist.refresh();const F=Xn(M.id);F&&nn(F)},Al=async(h,g,w)=>{if(h.added){if(h.added.element.scheduleId=g.id,w==="slot"&&h.added.element.sessionId&&((g.sessions||[]).some(F=>F.id===h.added.element.sessionId)||delete h.added.element.sessionId),await tn(h.added.element,w),w==="session")for(const M of l(h.added.element))M.scheduleId=g.id,await t.persist.updateSlot(M);await t.persist.refresh()}},Zn=h=>{for(const g of t.days||[]){const w=(g.schedules||[]).find(M=>M.id===h);if(w)return w}},gi=(h,g,w,M)=>Ia(h,g,w,M),zl=h=>o.value?((h==null?void 0:h.sessions)||[]).map(g=>({id:g.id,label:f(g)})):[],Dl=h=>{for(const g of t.days||[])for(const w of g.schedules||[])if(c(w).some(M=>M.id===h.id)||h.sessionId&&(w.sessions||[]).some(M=>M.id===h.sessionId))return w},Fl=e.computed(()=>{const h=$.value;if(h)return h.kind==="session"?Zn(h.item.scheduleId)||Ol(h.item,"session"):Dl(h.item)}),Pw=e.computed(()=>{const h=$.value;return!h||h.kind!=="slot"?[]:zl(Fl.value)}),Ol=(h,g)=>{for(const w of t.days||[])for(const M of w.schedules||[])if(g==="session"){if((M.sessions||[]).some(F=>F.id===h.id))return M}else if(c(M).some(F=>F.id===h.id))return M},Ll=async(h,g)=>{g?h.sessionId=g:delete h.sessionId,await t.persist.updateSlot(h),await t.persist.refresh()},_l=async h=>{if(!o.value)return;const g=a.value.createSession(h);await t.persist.createSession(g),await t.persist.refresh()},Mw=async(h,g)=>{const w=a.value.createSlot(h);if(w.startTime=Ge(g),w.endTime=wt(w.startTime,30),o.value){const F=gi(h.sessions,g,g+30,ce);F!=null&&F.id&&(w.sessionId=F.id)}await t.persist.createSlot(w),await t.persist.refresh();const M=Xn(w.id);M&&nn(M)},Hl=async h=>{const g=a.value.createSlot(h),w=[...c(h)].sort(ur).slice(-1)[0];g.startTime=yn(w==null?void 0:w.endTime)||"9:00",g.endTime=wt(g.startTime,30),await t.persist.createSlot(g),await t.persist.refresh()},At=e.ref(null),Iw=h=>{At.value=null,h.action()},Jr=(h,g)=>{const w=g.length*34+12;At.value={x:Math.min(h.clientX,window.innerWidth-210),y:Math.min(h.clientY,window.innerHeight-w-8),items:g}},Ul=()=>{At.value=null},vl=()=>{At.value=null},ql=h=>{h.key==="Escape"&&(At.value=null)},yi=()=>{At.value=null},Kr=e.ref(!1),Rw=()=>{Kr.value||(window.addEventListener("click",Ul),window.addEventListener("contextmenu",vl),window.addEventListener("keydown",ql),window.addEventListener("scroll",yi,!0),window.addEventListener("resize",yi),Kr.value=!0)},Aw=()=>{window.removeEventListener("click",Ul),window.removeEventListener("contextmenu",vl),window.removeEventListener("keydown",ql),window.removeEventListener("scroll",yi,!0),window.removeEventListener("resize",yi),Kr.value=!1};Rw();const zw=(h,g)=>{const w=[{icon:"edit",label:s.value.edit,action:()=>nn(h)},{icon:"content_copy",label:s.value.duplicate,action:()=>void jl(h)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void xo(h.item,h.kind)}];Jr(g,w)},Dw=(h,g)=>{const w={kind:"slot",item:h},M=[{icon:"edit",label:s.value.edit,action:()=>nn(w)},{icon:"content_copy",label:s.value.duplicate,action:()=>void jl(w)},{icon:"delete",label:s.value.delete,danger:!0,action:()=>void xo(h,"slot")}];Jr(g,M)},Fw=(h,g)=>{const w=be(g.currentTarget,g.clientY),M=Ge(w),F=[{icon:"mic",label:`${s.value.addSlot} · ${M}`,action:()=>void Mw(h,w)}];o.value&&F.push({icon:"groups",label:`${s.value.addSession} · ${M}`,action:()=>void Ow(h,w)}),Jr(g,F)},Ow=async(h,g)=>{if(!o.value)return;const w=a.value.createSession(h);w.startTime=Ge(g),w.endTime=wt(w.startTime,30),await t.persist.createSession(w),await t.persist.refresh()},jl=async h=>{const g=Zn(h.item.scheduleId)||Ol(h.item,h.kind);if(!g)return;const w=Hn(h.item.startTime,h.item.endTime)||30,M=yn(h.item.endTime)||"9:00";if(h.kind==="slot"){const F=a.value.createSlot(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=wt(M,w),F.sessionId=h.item.sessionId,h.item.description&&(F.description=h.item.description),h.item.payload&&(F.payload={...h.item.payload}),await t.persist.createSlot(F)}else{const F=a.value.createSession(g);F.name=h.item.name?`${h.item.name} (копия)`:h.item.name,F.startTime=M,F.endTime=wt(M,w),F.scheduleId=g.id,await t.persist.createSession(F)}await t.persist.refresh()},xo=async(h,g)=>{if(g==="slot")await t.persist.removeSlot(h);else{for(const w of l(h))delete w.sessionId,await t.persist.updateSlot(w);await t.persist.removeSession(h)}await t.persist.refresh()},tn=async(h,g)=>{const w=yn(h.startTime),M=yn(h.endTime);if(!w){t.persist.notify("warning",s.value.correctStartTime);return}h.startTime=w,h.endTime=M||wt(w,30),g==="slot"?await t.persist.updateSlot(h):await t.persist.updateSession(h)},nn=h=>{j.value||Date.now()-se.value<400||($.value={kind:h.kind,item:h.item},x.value=!0)},Lw=async()=>{const h=$.value;h&&(await tn(h.item,h.kind),x.value=!1,$.value=null,await t.persist.refresh())},_w=async()=>{const h=$.value;h&&(await xo(h.item,h.kind),x.value=!1,$.value=null)},wi=(h,g,w,M)=>{h[g]=w,tn(h,M)};return t.persist.loadOptions&&t.persist.loadOptions(),(h,g)=>{var Pe,Ie;const w=e.resolveComponent("PButton"),M=e.resolveComponent("PTooltip"),F=e.resolveComponent("PInput"),Y=e.resolveComponent("PSelect"),fe=e.resolveComponent("PDialog");return e.openBlock(),e.createElementBlock("div",yh,[(Pe=n.days)!=null&&Pe.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",bh,[i.value?(e.openBlock(),e.createBlock(e.unref(C.QTabs),{key:0,modelValue:E.value,"onUpdate:modelValue":g[0]||(g[0]=A=>E.value=A),dense:"",class:"day-tabs","active-color":"primary"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,A=>(e.openBlock(),e.createBlock(e.unref(C.QTab),{key:A.id,name:A.id,label:Ct(A)},null,8,["name","label"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QSpace)),i.value&&Se.value?(e.openBlock(),e.createBlock(ph,{key:1,"model-value":Xt(Se.value.date),label:s.value.date,class:"date-input","onUpdate:modelValue":g[1]||(g[1]=A=>Yn(Se.value,A))},null,8,["model-value","label"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:2,size:"sm",color:"negative",outline:"",icon:"delete",label:s.value.deleteDay,disable:!Se.value,onClick:g[2]||(g[2]=A=>Cn(Se.value))},null,8,["label","disable"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createBlock(w,{key:3,size:"sm",color:"primary",outline:"",icon:"event",label:s.value.addDay,onClick:rt},null,8,["label"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:4,size:"sm",color:"primary",outline:"",icon:"add",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0),S.value==="grid"?(e.openBlock(),e.createElementBlock("div",Ch,[e.createVNode(e.unref(C.QIcon),{name:"zoom_in",size:"18px",class:"text-grey-6"}),e.createVNode(e.unref(C.QBtnToggle),{modelValue:Ne.value,"onUpdate:modelValue":g[3]||(g[3]=A=>Ne.value=A),"toggle-color":"primary",options:Te,size:"sm",class:"zoom-toggle"},null,8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QBtnToggle),{modelValue:S.value,"onUpdate:modelValue":g[4]||(g[4]=A=>S.value=A),"toggle-color":"primary",options:[{label:s.value.grid,value:"grid",icon:"calendar_view_week"},{label:s.value.list,value:"list",icon:"view_list"}],size:"sm",class:"view-toggle"},null,8,["modelValue","options"])]),S.value==="grid"?(e.openBlock(),e.createElementBlock("div",Sh,[he(Se.value).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"gridScrollRef",ref:ze,class:"grid-scroll"},[e.createElementVNode("div",{class:"grid-wrap",style:e.normalizeStyle({"--halls":he(Se.value).length,"--hours":Math.max(le.value.total/60,1),"--half-hours":Math.max(le.value.total/60*2,2)})},[e.createElementVNode("div",xh,[g[17]||(g[17]=e.createElementVNode("div",{class:"time-gutter"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-head",{"drag-over":y.value===A.id}])},[e.createElementVNode("div",Eh,[e.createVNode(e.unref(C.QIcon),{name:"meeting_room",size:"15px"}),e.createElementVNode("span",Bh,e.toDisplayString(W(A)),1),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"mic",onClick:G=>Hl(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addSlot),1)]),_:1})]),_:1},8,["onClick"]),o.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"primary",icon:"groups",onClick:G=>_l(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.addSession),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(w,{key:1,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:G=>Mt(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])],2))),128))]),e.createElementVNode("div",{class:"grid-body",style:e.normalizeStyle({height:pt.value})},[e.createElementVNode("div",Vh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ct.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"hour-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(gt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.min,class:"half-label",style:e.normalizeStyle({top:(A.min-le.value.start)/le.value.total*100+"%"})},e.toDisplayString(A.label),5))),128))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:e.normalizeClass(["hall-col",{"drag-over":y.value===A.id}]),"data-schedule-id":A.id,onDblclick:G=>Tw(A,G),onContextmenu:e.withModifiers(G=>Fw(A,G),["prevent","stop"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(De(A),G=>{var K;return e.openBlock(),e.createElementBlock("div",{key:G.item.id,class:e.normalizeClass(["timeline-block",[G.kind,{conflict:Kt(A,G),dragging:((K=b.value)==null?void 0:K.id)===G.item.id},en(G)]]),style:e.normalizeStyle(Jt(G)),title:R(G),onPointerdown:Q=>te(G,Q),onClick:Q=>nn(G),onContextmenu:e.withModifiers(Q=>zw(G,Q),["prevent","stop"])},[e.createVNode(e.unref(C.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createElementVNode("div",Th,[e.createElementVNode("div",Ph,e.toDisplayString(G.item.startTime)+"–"+e.toDisplayString(G.item.endTime),1),e.createElementVNode("div",Mh,e.toDisplayString(B(G)),1),G.kind==="slot"&&p(G.item)?(e.openBlock(),e.createElementBlock("div",Ih,e.toDisplayString(p(G.item)),1)):e.createCommentVNode("",!0)]),G.kind==="session"&&at(G.item).length?(e.openBlock(),e.createElementBlock("div",Rh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(at(G.item),Q=>(e.openBlock(),e.createElementBlock("div",{key:Q.id,class:e.normalizeClass(["nested-perfom",Z(G,Q)]),style:e.normalizeStyle(Gr(G.item,Q)),title:L(Q),onPointerdown:e.withModifiers(vt=>Vw(G.item,Q,vt),["stop"]),onClick:e.withModifiers(vt=>nn({kind:"slot",item:Q}),["stop"]),onContextmenu:e.withModifiers(vt=>Dw(Q,vt),["prevent","stop"])},[e.createElementVNode("div",zh,e.toDisplayString(Q.startTime)+"–"+e.toDisplayString(Q.endTime),1),e.createElementVNode("div",Dh,e.toDisplayString(T(Q,en(G))),1),p(Q)?(e.openBlock(),e.createElementBlock("div",Fh,e.toDisplayString(p(Q)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QIcon),{name:"edit",size:"11px",class:"nested-edit"}),e.createElementVNode("div",{class:"nested-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(vt=>$w(G.item,Q,vt),["stop","prevent"])},null,40,Oh)],46,Ah))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Lh,[Kt(A,G)?(e.openBlock(),e.createBlock(e.unref(C.QIcon),{key:0,name:"warning",size:"12px",class:"conflict-icon"},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.conflictTitle),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QIcon),{name:"edit",size:"13px",class:"edit-icon",onClick:e.withModifiers(Q=>nn(G),["stop"])},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.edit),1)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",{class:"block-resize",title:s.value.changeDurationTitle,onPointerdown:e.withModifiers(Q=>Bw(G,Q),["stop","prevent"])},null,40,_h)],46,$h)}),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee(A),G=>{var K;return e.openBlock(),e.createElementBlock("div",{key:"spine-"+G.item.id,class:e.normalizeClass(["session-spine",{dragging:((K=b.value)==null?void 0:K.id)===G.item.id}]),style:e.normalizeStyle(Jt(G)),title:f(G.item)},[e.createVNode(e.unref(C.QIcon),{name:"groups",size:"11px"}),e.createElementVNode("span",Uh,e.toDisplayString(f(G.item)),1)],14,Hh)}),128)),N.value&&N.value.scheduleId===A.id&&b.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["drop-zone",{conflict:pi.value}]),style:e.normalizeStyle(jr.value)},null,6)):e.createCommentVNode("",!0),N.value&&N.value.scheduleId===A.id&&b.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["drop-preview",[b.value.kind,{conflict:pi.value}]]),style:e.normalizeStyle(kn.value)},[e.createElementVNode("div",vh,[e.createTextVNode(e.toDisplayString(N.value.time)+"–"+e.toDisplayString(It.value)+" ",1),N.value.session?(e.openBlock(),e.createElementBlock("span",qh,e.toDisplayString(s.value.intoSession),1)):e.createCommentVNode("",!0),xn.value?(e.openBlock(),e.createElementBlock("span",jh," ⚠ "+e.toDisplayString(s.value.conflictCount)+": "+e.toDisplayString(xn.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Wh,e.toDisplayString(b.value.name),1)],6)):e.createCommentVNode("",!0)],42,Nh))),128))],4),e.createElementVNode("div",Gh,e.toDisplayString(s.value.gridHint),1)],4)],512)):(e.openBlock(),e.createElementBlock("div",kh,[e.createTextVNode(e.toDisplayString(s.value.noHalls)+" ",1),r.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"primary",size:"sm",label:s.value.addHall,onClick:Qe},null,8,["label"])):e.createCommentVNode("",!0)])),I.value&&N.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"drag-time-chip",style:e.normalizeStyle({left:I.value.x+"px",top:I.value.y+"px"})},[e.createVNode(e.unref(C.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(N.value.time)+" · "+e.toDisplayString(N.value.hallName)+" ",1),N.value.session?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g[18]||(g[18]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(C.QIcon),{name:"groups",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(s.value.intoSession)+" «"+e.toDisplayString(f(N.value.session))+"» ",1)],64)):e.createCommentVNode("",!0),xn.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[g[19]||(g[19]=e.createTextVNode(" · ",-1)),e.createVNode(e.unref(C.QIcon),{name:"warning",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(xn.value),1)],64)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(Ie=Rt.value)!=null&&Ie.moved&&I.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"drag-time-chip",style:e.normalizeStyle({left:I.value.x+"px",top:I.value.y+"px"})},[e.createVNode(e.unref(C.QIcon),{name:"schedule",size:"12px"}),e.createTextVNode(" "+e.toDisplayString(Rt.value.perfom.startTime)+"–"+e.toDisplayString(Rt.value.perfom.endTime)+" · "+e.toDisplayString(s.value.intoSession),1)],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",Qh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he(Se.value),A=>(e.openBlock(),e.createBlock(e.unref(C.QCard),{key:A.id,class:"hall-card q-mb-md"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),{class:"hall-card-head"},{default:e.withCtx(()=>[e.createElementVNode("div",Yh,[e.createVNode(e.unref(C.QIcon),{name:"meeting_room",size:"18px",color:"primary"}),e.createElementVNode("span",Xh,e.toDisplayString(W(A)),1),e.createVNode(e.unref(C.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.session,onClick:G=>_l(A)},null,8,["label","onClick"]),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"add",label:s.value.slot,onClick:G=>Hl(A)},null,8,["label","onClick"]),r.value?(e.openBlock(),e.createBlock(w,{key:0,size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:G=>Mt(A)},{default:e.withCtx(()=>[e.createVNode(M,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.deleteHall),1)]),_:1})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]),_:2},1024),e.createVNode(e.unref(C.QCardSection),{class:"q-pt-none"},{default:e.withCtx(()=>{var G;return[o.value&&((G=A.sessions)!=null&&G.length)?(e.openBlock(),e.createElementBlock("div",Zh,[e.createElementVNode("div",Jh,[e.createVNode(e.unref(C.QIcon),{name:"groups",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.sessionsTitle),1)]),e.createVNode(e.unref(Ci),{list:A.sessions,"item-key":"id",group:"sessions",handle:".drag-handle",class:"draggable-list",onChange:K=>Al(K,A,"session")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",Kh,[e.createVNode(e.unref(C.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(F,{"model-value":K.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":Q=>K.name=Q,onBlur:Q=>tn(K,"session")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(Un,{"model-value":K.startTime,label:s.value.startTime,class:"time-input","onUpdate:modelValue":Q=>wi(K,"startTime",Q,"session")},null,8,["model-value","label","onUpdate:modelValue"]),e.createVNode(Un,{"model-value":K.endTime,label:s.value.endTime,class:"time-input","onUpdate:modelValue":Q=>wi(K,"endTime",Q,"session")},null,8,["model-value","label","onUpdate:modelValue"]),e.renderSlot(h.$slots,"session-row-extra",{element:K,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>xo(K,"session")},null,8,["onClick"])]),at(K).length?(e.openBlock(),e.createElementBlock("div",ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(at(K),Q=>(e.openBlock(),e.createElementBlock("div",{key:Q.id,class:"list-row nested-row"},[e.createVNode(e.unref(C.QIcon),{name:"mic",size:"14px",class:"nested-icon"}),e.createElementVNode("div",tp,e.toDisplayString(m(Q)),1),e.createElementVNode("div",np,e.toDisplayString(Q.startTime)+"–"+e.toDisplayString(Q.endTime),1),e.createVNode(e.unref(C.QSpace)),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"primary",icon:"edit",onClick:vt=>nn({kind:"slot",item:Q})},null,8,["onClick"])]))),128))])):e.createCommentVNode("",!0)]),_:2},1032,["list","onChange"])])):e.createCommentVNode("",!0),e.createElementVNode("div",op,[e.createElementVNode("div",ip,[e.createVNode(e.unref(C.QIcon),{name:"mic",size:"15px"}),e.createTextVNode(" "+e.toDisplayString(s.value.slotsTitle),1)]),e.createVNode(e.unref(Ci),{list:Ut(A),"item-key":"id",group:"slots",handle:".drag-handle",class:"draggable-list",onChange:K=>Al(K,A,"slot")},{item:e.withCtx(({element:K})=>[e.createElementVNode("div",rp,[e.createVNode(e.unref(C.QIcon),{name:"drag_indicator",class:"drag-handle"}),e.createVNode(F,{"model-value":K.name,label:s.value.name,dense:"",outlined:"",class:"col-4","onUpdate:modelValue":Q=>K.name=Q,onBlur:Q=>tn(K,"slot")},null,8,["model-value","label","onUpdate:modelValue","onBlur"]),e.createVNode(Un,{"model-value":K.startTime,label:s.value.startTime,class:"time-input","onUpdate:modelValue":Q=>wi(K,"startTime",Q,"slot")},null,8,["model-value","label","onUpdate:modelValue"]),e.createVNode(Un,{"model-value":K.endTime,label:s.value.endTime,class:"time-input","onUpdate:modelValue":Q=>wi(K,"endTime",Q,"slot")},null,8,["model-value","label","onUpdate:modelValue"]),o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":K.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"session-select",options:zl(A),"option-value":"id","option-label":"label","onUpdate:modelValue":Q=>Ll(K,Q)},null,8,["model-value","label","options","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"slot-row-extra",{element:K,schedule:A},void 0,!0),e.createVNode(w,{size:"sm",flat:"",dense:"",color:"negative",icon:"delete",onClick:Q=>xo(K,"slot")},null,8,["onClick"])])]),_:2},1032,["list","onChange"]),!Ut(A).length&&!Ye(A)?(e.openBlock(),e.createElementBlock("div",sp,e.toDisplayString(s.value.noSlotsInDay),1)):e.createCommentVNode("",!0)])]}),_:2},1024)]),_:2},1024))),128)),e.createElementVNode("div",ap,e.toDisplayString(s.value.listHint),1)]))],64)):(e.openBlock(),e.createElementBlock("div",wh,[e.createVNode(e.unref(C.QIcon),{name:"event_busy",size:"48px",class:"q-mb-sm"}),e.createElementVNode("div",null,e.toDisplayString(s.value.noDays),1),e.createVNode(w,{color:"primary",outline:"",label:s.value.addDay,icon:"event",class:"q-mt-sm",onClick:rt},null,8,["label"])])),e.createVNode(fe,{modelValue:P.value,"onUpdate:modelValue":g[7]||(g[7]=A=>P.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{style:{width:"700px","max-width":"80vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",lp,e.toDisplayString(s.value.addHall),1)]),_:1}),e.createVNode(e.unref(C.QCardSection),null,{default:e.withCtx(()=>[e.createElementVNode("div",cp,[e.createVNode(F,{modelValue:V.value,"onUpdate:modelValue":g[5]||(g[5]=A=>V.value=A),label:s.value.newHallPlaceholder,dense:"",outlined:"",class:"col",onKeyup:e.withKeys(ve,["enter"])},null,8,["modelValue","label"]),e.createVNode(w,{color:"primary",label:s.value.create,icon:"add",dense:"",onClick:ve},null,8,["label"])]),e.renderSlot(h.$slots,"places-list",{day:Se.value,add:ae},()=>[Pt.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",dp,e.toDisplayString(s.value.noHalls),1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Pt.value,A=>(e.openBlock(),e.createElementBlock("div",{key:A.id,class:"place-row row items-center q-gutter-sm"},[e.createVNode(e.unref(C.QIcon),{name:"meeting_room",size:"16px",color:"primary"}),e.createElementVNode("span",up,e.toDisplayString(u(A)),1),e.createVNode(w,{size:"sm",color:"primary",outline:"",label:s.value.addHall,icon:"add",dense:"",onClick:G=>ae(A)},null,8,["label","onClick"])]))),128))],!0)]),_:3}),e.createVNode(e.unref(C.QCardActions),{align:"right"},{default:e.withCtx(()=>[e.createVNode(w,{label:s.value.close,color:"primary",onClick:g[6]||(g[6]=A=>P.value=!1)},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),e.createVNode(fe,{modelValue:x.value,"onUpdate:modelValue":g[14]||(g[14]=A=>x.value=A)},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{style:{width:"640px","max-width":"90vw"}},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),null,{default:e.withCtx(()=>{var A;return[e.createElementVNode("div",fp,e.toDisplayString(((A=$.value)==null?void 0:A.kind)==="session"?s.value.session:s.value.slot),1)]}),_:1}),$.value?(e.openBlock(),e.createBlock(e.unref(C.QCardSection),{key:0,class:"q-pt-none"},{default:e.withCtx(()=>[e.createVNode(F,{modelValue:$.value.item.name,"onUpdate:modelValue":g[8]||(g[8]=A=>$.value.item.name=A),label:s.value.name,dense:"",outlined:"",class:"q-mb-sm"},null,8,["modelValue","label"]),e.createElementVNode("div",mp,[e.createElementVNode("div",hp,[e.createVNode(Un,{modelValue:$.value.item.startTime,"onUpdate:modelValue":g[9]||(g[9]=A=>$.value.item.startTime=A),label:s.value.startTime,dense:"",outlined:""},null,8,["modelValue","label"])]),e.createElementVNode("div",pp,[e.createVNode(Un,{modelValue:$.value.item.endTime,"onUpdate:modelValue":g[10]||(g[10]=A=>$.value.item.endTime=A),label:s.value.endTime,dense:"",outlined:""},null,8,["modelValue","label"])])]),$.value.kind==="slot"&&o.value?(e.openBlock(),e.createBlock(Y,{key:0,"model-value":$.value.item.sessionId,label:s.value.sessionSelect,dense:"",outlined:"",clearable:"",class:"q-mb-sm",options:Pw.value,"option-value":"id","option-label":"label","onUpdate:modelValue":g[11]||(g[11]=A=>Ll($.value.item,A))},null,8,["model-value","label","options"])):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"edit-form",{kind:$.value.kind,item:$.value.item,schedule:Fl.value},void 0,!0),$.value.kind==="slot"?(e.openBlock(),e.createBlock(F,{key:1,modelValue:$.value.item.description,"onUpdate:modelValue":g[12]||(g[12]=A=>$.value.item.description=A),label:s.value.description,type:"textarea",rows:"2",dense:"",outlined:""},null,8,["modelValue","label"])):e.createCommentVNode("",!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QCardActions),{align:"right"},{default:e.withCtx(()=>[$.value?(e.openBlock(),e.createBlock(w,{key:0,flat:"",color:"negative",label:s.value.delete,onClick:_w},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QSpace)),e.createVNode(w,{flat:"",label:s.value.cancel,color:"primary",onClick:g[13]||(g[13]=A=>x.value=!1)},null,8,["label"]),e.createVNode(w,{label:s.value.save,color:"primary",onClick:Lw},null,8,["label"])]),_:1})]),_:3})]),_:3},8,["modelValue"]),At.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"ctx-menu",style:e.normalizeStyle({left:At.value.x+"px",top:At.value.y+"px"}),onClick:g[15]||(g[15]=e.withModifiers(()=>{},["stop"])),onContextmenu:g[16]||(g[16]=e.withModifiers(()=>{},["prevent","stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value.items,(A,G)=>(e.openBlock(),e.createElementBlock("div",{key:G,class:e.normalizeClass(["ctx-item",{"ctx-item--danger":A.danger}]),onClick:K=>Iw(A)},[e.createVNode(e.unref(C.QIcon),{name:A.icon,size:"15px"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(A.label),1)],10,gp))),128))],36)):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-35db9279"]]),yp={class:"schedule-timeline"},wp={key:0,class:"timeline-container"},bp={class:"day-header"},Cp={class:"day-title"},Sp={class:"timeline"},kp={key:0,class:"schedule-place"},xp={class:"events-column"},Ep={key:0,class:"event-item session-item"},Bp={class:"event-content"},Vp={class:"event-time"},Np={class:"event-main"},$p={class:"event-name"},Tp={key:0,class:"speakers-list"},Pp=["onClick"],Mp={class:"speaker-details"},Ip={class:"speaker-name"},Rp={class:"bio-text"},Ap=["onClick"],zp={key:0,class:"perfom-divider"},Dp={class:"event-content"},Fp={class:"event-time"},Op={class:"event-main"},Lp={class:"event-name"},_p={class:"event-badges"},Hp={key:0,class:"speakers-list"},Up=["onClick"],vp={class:"speaker-details"},qp={class:"speaker-name"},jp={class:"bio-text"},Wp={key:1,class:"no-program"},Fa=z(e.defineComponent({__name:"ScheduleTimeline",props:{days:{},dayTitle:{type:Function,default:void 0},placeName:{type:Function,default:void 0},slotName:{type:Function,default:void 0},slotParticipants:{type:Function,default:void 0},sessionParticipants:{type:Function,default:void 0},participantName:{type:Function,default:void 0},participantBio:{type:Function,default:void 0},sessionName:{type:Function,default:void 0},noProgramText:{default:"Программа пока не опубликована"},slotListOf:{type:Function,default:void 0},nestedSlotListOf:{type:Function,default:void 0},slotClickable:{type:Boolean,default:!1}},emits:["open-participant","slot-click"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>({noProgram:o.noProgramText||"Программа пока не опубликована"})),s=b=>{if(o.dayTitle)return o.dayTitle(b);const y=new Date(b.date);return isNaN(y.getTime())||y.getFullYear()<2e3?"":y.toLocaleDateString("ru-RU",{weekday:"long",day:"numeric",month:"long",year:"numeric"})},a=b=>{var y;return o.placeName?o.placeName(b):((y=b.place)==null?void 0:y.name)||b.placeName||""},c=b=>o.slotName?o.slotName(b):(b==null?void 0:b.name)||"",l=b=>o.sessionName?o.sessionName(b):(b==null?void 0:b.name)||"",u=b=>o.slotParticipants?o.slotParticipants(b):(b==null?void 0:b.participants)||[],f=b=>o.sessionParticipants?o.sessionParticipants(b):(b==null?void 0:b.participants)||[],m=b=>{var y,N;return o.participantName?o.participantName(b):(b==null?void 0:b.name)||(b==null?void 0:b.fullName)||((N=(y=b==null?void 0:b.human)==null?void 0:y.getFullName)==null?void 0:N.call(y))||""},p=b=>o.participantBio?o.participantBio(b):(b==null?void 0:b.bio)||(b==null?void 0:b.regalias)||"",S=b=>o.slotListOf?o.slotListOf(b):(b==null?void 0:b.slots)||[],E=b=>o.nestedSlotListOf?o.nestedSlotListOf(b):(b==null?void 0:b.slots)||[],P=b=>b.schedules.filter(y=>{var N;return S(y).length>0||(((N=y.sessions)==null?void 0:N.length)||0)>0}),V=b=>{const y=[],N=new Set((b.sessions||[]).map(j=>j.id));for(const j of b.sessions||[]){y.push({kind:"session",item:j,nested:!1,index:0});for(const se of E(j))y.push({kind:"slot",item:se,nested:!0,index:0})}let I=0;for(const j of S(b).filter(se=>!se.sessionId||!N.has(se.sessionId)))y.push({kind:"slot",item:j,nested:!1,index:I++});return y},x=e.computed(()=>{var b;return(b=o.days)==null?void 0:b.some(y=>{var N;return(N=y.schedules)==null?void 0:N.some(I=>{var j;return S(I).length>0||(((j=I.sessions)==null?void 0:j.length)||0)>0})})}),$=(b,y)=>`${b} - ${y}`;return(b,y)=>(e.openBlock(),e.createElementBlock("div",yp,[x.value?(e.openBlock(),e.createElementBlock("div",wp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.days,N=>(e.openBlock(),e.createElementBlock("div",{key:N.id,class:"day-section"},[e.createElementVNode("div",bp,[e.createElementVNode("div",Cp,[e.createVNode(e.unref(C.QIcon),{name:"calendar_month",size:"16px",class:"day-icon"}),e.createTextVNode(" "+e.toDisplayString(s(N)),1)])]),e.createElementVNode("div",Sp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P(N),I=>(e.openBlock(),e.createElementBlock("div",{key:I.id,class:"time-slot"},[a(I)?(e.openBlock(),e.createElementBlock("div",kp,[e.createVNode(e.unref(C.QIcon),{name:"meeting_room",size:"14px"}),e.createTextVNode(" "+e.toDisplayString(a(I)),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V(I),j=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:j.item.id},[j.kind==="session"?(e.openBlock(),e.createElementBlock("div",Ep,[e.createElementVNode("div",Bp,[e.createElementVNode("div",Vp,e.toDisplayString($(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",Np,[e.createElementVNode("div",$p,e.toDisplayString(l(j.item)),1),f(j.item).length?(e.openBlock(),e.createElementBlock("div",Tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",Mp,[e.createElementVNode("div",Ip,[e.createVNode(e.unref(C.QIcon),{name:"groups",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",Rp,e.toDisplayString(p(se)),1)])],8,Pp))),128))])):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["event-item",[{"event-active":j.item.active,"nested-item":j.nested},{clickable:o.slotClickable}]]),onClick:se=>o.slotClickable&&i("slot-click",j.item)},[!j.nested&&j.index>0?(e.openBlock(),e.createElementBlock("div",zp)):e.createCommentVNode("",!0),e.createElementVNode("div",Dp,[e.createElementVNode("div",Fp,e.toDisplayString($(j.item.startTime,j.item.endTime)),1),e.createElementVNode("div",Op,[e.createElementVNode("div",Lp,e.toDisplayString(c(j.item)),1),e.createElementVNode("div",_p,[e.renderSlot(b.$slots,"badges",{item:j.item},void 0,!0)]),u(j.item).length?(e.openBlock(),e.createElementBlock("div",Hp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u(j.item),se=>(e.openBlock(),e.createElementBlock("div",{key:se.id,class:"speaker-item",onClick:ze=>i("open-participant",se)},[e.createElementVNode("div",vp,[e.createElementVNode("div",qp,[e.createVNode(e.unref(C.QIcon),{name:"mic",size:"13px",class:"chair-icon"}),e.createTextVNode(" "+e.toDisplayString(m(se)),1)]),e.createElementVNode("div",jp,e.toDisplayString(p(se)),1)])],8,Up))),128))])):e.createCommentVNode("",!0)])])],10,Ap))],64))),128))])]))),128))])]))),128))])):(e.openBlock(),e.createElementBlock("div",Wp,[e.createVNode(e.unref(C.QIcon),{name:"event_note",size:"40px",class:"no-program-icon"}),e.createElementVNode("p",null,e.toDisplayString(r.value.noProgram),1)])),e.renderSlot(b.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-520f36ef"]]),Gp=Object.freeze(Object.defineProperty({__proto__:null,ScheduleGridEditor:Da,ScheduleTimeline:Fa},Symbol.toStringTag,{value:"Module"})),Qp=Object.freeze(Object.defineProperty({__proto__:null,addMtoHM:wt,blockSizeClass:Ra,blockStyle:$a,byStart:ur,diffM:Hn,findEnclosingSession:Ia,fromMin:Ge,gridBounds:Na,hasConflict:Pa,intersects:yo,nestedConflict:Ma,nestedSlotStyle:Ta,normTime:yn,snapMinutes:wo,toMin:ce},Symbol.toStringTag,{value:"Module"}));let Yp=class extends Ve{constructor(){super(ei,"schedule-days")}};const Xp=new Yp;let Zp=class extends Ve{constructor(){super(_n,"schedule-places")}};const Jp=new Zp;let Kp=class extends Ve{constructor(){super(Ln,"schedule-sessions")}};const eg=new Kp;let tg=class extends Ve{constructor(){super(Ft,"schedule-slots")}};const ng=new tg;let og=class extends Ve{constructor(){super(go,"schedule-timetables")}};const ig=new og,rg=Object.freeze(Object.defineProperty({__proto__:null,C:mh,Components:Gp,H:Qp,S:Object.freeze(Object.defineProperty({__proto__:null,ScheduleDaysStore:Xp,SchedulePlacesStore:Jp,ScheduleSessionsStore:eg,ScheduleSlotsStore:ng,SchedulesStore:ig},Symbol.toStringTag,{value:"Module"})),T:Object.freeze(Object.defineProperty({__proto__:null,defaultFactories:Aa,defaultScheduleLabels:fr},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),mr=e.defineComponent({inheritAttrs:!1,__name:"PChip",props:{label:{type:String,default:""},color:{type:String,default:""},textColor:{type:String,default:""},outline:{type:Boolean,default:!1},square:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["remove","update:model-value","update:selected"],setup(n,{emit:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>{const s={};for(const a of Object.keys(i))["label","color","text-color","outline","square","dense","removable"].includes(a)||(s[a]=i[a]);return s});return(s,a)=>(e.openBlock(),e.createBlock(e.unref(C.QChip),e.mergeProps(e.unref(r),{label:n.label||void 0,color:n.color||void 0,"text-color":n.textColor||void 0,outline:n.outline,square:n.square,dense:n.dense,removable:n.removable,onRemove:a[0]||(a[0]=c=>o("remove"))}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.avatar?{name:"avatar",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"avatar")]),key:"0"}:void 0,s.$slots.remove?{name:"remove",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"remove")]),key:"1"}:void 0]),1040,["label","color","text-color","outline","square","dense","removable"]))}}),sg={class:"tags-selector"},ag={key:0,class:"empty-state"},ti=z(e.defineComponent({__name:"POptionsListSingle",props:{store:{}},emits:["select"],setup(n,{emit:t}){const o=n,i=e.ref(""),r=o.store.Options,s=e.computed(()=>r.filter(l=>D.H.Strings.SearchIn(l.label,i.value))),a=t;e.onBeforeMount(async()=>{await o.store.GetOptions()});const c=async l=>{await o.store.Get(l.value),a("select",o.store.Item)};return(l,u)=>{const f=e.resolveDirective("ripple");return e.openBlock(),e.createElementBlock("div",sg,[e.createVNode(Je,{modelValue:e.unref(i),"onUpdate:modelValue":u[0]||(u[0]=m=>e.isRef(i)?i.value=m:null),placeholder:"Поиск...",dense:"",outlined:"",clearable:"",class:"search-input"},null,8,["modelValue"]),e.createVNode(e.unref(C.QScrollArea),{style:{height:"350px"},class:"q-mt-sm"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QList),{dense:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(C.QItem),{key:m.value,clickable:"",class:"tag-item",onClick:p=>c(m)},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QItemSection),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label),1)]),_:2},1024)]),_:2},1032,["onClick"])),[[f]])),128)),e.unref(s).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ag,"Ничего не найдено"))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-9d5bdf93"]]),lg={title:"Редактирование",confirmLabel:"Сохранить",cancelLabel:"Отмена",width:"720px",disabled:!1,showConfirm:!0},cg={class:"edit-dialog-header"},dg={class:"edit-dialog-title"},ug={class:"edit-dialog-content"},fg={key:0,class:"edit-dialog-actions"},vn=z(e.defineComponent({__name:"PEditDialog",props:e.mergeDefaults({modelValue:{type:Boolean},title:{},confirmLabel:{},cancelLabel:{},width:{},disabled:{type:Boolean},showConfirm:{type:Boolean}},lg),emits:["update:modelValue","confirm","close"],setup(n,{expose:t,emit:o}){const i=C.ClosePopup,r=n,s=o,a=e.ref(!1);e.watch(()=>r.modelValue,p=>{a.value=p},{immediate:!0});const c=async()=>{s("confirm"),l()},l=()=>{s("close"),a.value=!1,s("update:modelValue",!1)},u=()=>{a.value&&l()};t({opened:a,toggle:()=>{a.value=!a.value,s("update:modelValue",a.value)}});const m=async()=>{await e.nextTick();const p=document.querySelector('.edit-dialog-content input, .edit-dialog-content textarea, .edit-dialog-content [tabindex]:not([tabindex="-1"])');p&&"focus"in p&&p.focus()};return(p,S)=>(e.openBlock(),e.createBlock(un,{modelValue:e.unref(a),"onUpdate:modelValue":[S[0]||(S[0]=E=>e.isRef(a)?a.value=E:null),l],position:"top",onKeydown:[e.withKeys(c,["enter"]),e.withKeys(u,["escape"])],onShow:m},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"edit-dialog",style:e.normalizeStyle({width:r.width})},[e.createElementVNode("div",cg,[e.createElementVNode("div",dg,e.toDisplayString(r.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(i)]])]),e.createElementVNode("div",ug,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),r.showConfirm?(e.openBlock(),e.createElementBlock("div",fg,[e.withDirectives(e.createVNode(ne,{flat:"",label:r.cancelLabel,size:"sm"},null,8,["label"]),[[e.unref(i)]]),e.createVNode(ne,{flat:"",label:r.confirmLabel,color:"primary",disable:r.disabled,size:"sm",onClick:c},null,8,["label","disable"])])):e.createCommentVNode("",!0)],4)]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-4c8226ef"]]),hr=z(e.defineComponent({__name:"PTableBadge",props:{row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(),s=()=>{r.value.toggle(),i("click")},a=async c=>{o.row[o.prop]=c,await o.store.Update(o.row),r.value.toggle()};return(c,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(C.QTd),{key:n.prop,class:"tags-cell"},{default:e.withCtx(()=>{var u,f,m;return[e.createVNode(mr,{color:(u=n.row[n.prop])!=null&&u.id?"primary":"grey-3","text-color":(f=n.row[n.prop])!=null&&f.id?"white":"grey-6",outline:!((m=n.row[n.prop])!=null&&m.id),size:"sm",clickable:"",class:"tags-chip",onClick:s},{default:e.withCtx(()=>{var p;return[(p=n.row[n.prop])!=null&&p.id?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(n.row[n.prop][n.labelKey]),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(C.QIcon),{name:"add",size:"16px"}),l[0]||(l[0]=e.createTextVNode(" Добавить ",-1))],64))]}),_:1},8,["color","text-color","outline"])]}),_:1})),e.createVNode(vn,{ref_key:"edit",ref:r,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},()=>[e.createVNode(ti,{store:n.storeOpts,onSelect:a},null,8,["store"])],!0)]),_:3},512)],64))}}),[["__scopeId","data-v-29efd68b"]]),mg={class:"tag-name"},hg={key:0,class:"tag-extra"},pr=e.defineComponent({__name:"PTableBadges",props:{items:{},row:{},prop:{},store:{},storeOpts:{},labelKey:{default:"name"},cellKey:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.items!==void 0?t.items:t.row?t.row[t.prop??""]:[]),r=e.computed(()=>i.value?(Array.isArray(i.value)?i.value:[i.value]).filter(f=>f==null?void 0:f.id):[]),s=e.computed(()=>r.value.length),a=e.computed(()=>{var u;return((u=r.value[0])==null?void 0:u[t.labelKey])||""}),c=e.computed(()=>Math.max(0,s.value-1)),l=async u=>{t.row&&t.prop&&t.store&&(t.row[t.prop]=u,await t.store.Update(t.row)),o.value.toggle()};return(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(C.QTd),{key:n.cellKey,class:"tags-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["tags-badge",{empty:!e.unref(s),clickable:e.unref(s)}]),onClick:f[1]||(f[1]=e.withModifiers(m=>e.unref(s)?e.unref(o).toggle():void 0,["stop"]))},[e.unref(s)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",mg,e.toDisplayString(e.unref(a)),1),e.unref(c)?(e.openBlock(),e.createElementBlock("span",hg,"+"+e.toDisplayString(e.unref(c)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(e.unref(C.QIcon),{key:1,name:"add",size:"18px",color:"grey-5",onClick:f[0]||(f[0]=m=>e.unref(o).toggle())}))],2)]),_:1})),e.createVNode(vn,{ref_key:"edit",ref:o,"show-confirm":!1},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},()=>[n.storeOpts?(e.openBlock(),e.createBlock(ti,{key:0,store:n.storeOpts,onSelect:l},null,8,["store"])):e.createCommentVNode("",!0)])]),_:3},512)],64))}}),pg={key:0,class:"relation-label"},gg={class:"relation-count"},gr=z(e.defineComponent({__name:"PTableCount",props:{label:{},count:{},to:{},cellKey:{default:""}},emits:["click"],setup(n,{emit:t}){const o=n,i=t,r=()=>{o.count!==0&&(o.to&&D.H.Router.To(o.to),i("click"))};return(s,a)=>(e.openBlock(),e.createBlock(e.unref(C.QTd),{key:n.cellKey,class:"relation-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["relation-badge",{"has-items":n.count>0}]),onClick:r},[n.label?(e.openBlock(),e.createElementBlock("span",pg,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.createElementVNode("span",gg,e.toDisplayString(n.count),1)],2)]),_:1}))}}),[["__scopeId","data-v-20c0d0d2"]]),yr=e.defineComponent({__name:"PTableEdit",props:{domen:{},row:{}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(C.QTd),{"auto-width":""},{default:e.withCtx(()=>[e.createVNode(ne,{size:"sm",round:"",dense:"",icon:"edit",color:"primary",class:"q-mr-xs",onClick:o[0]||(o[0]=i=>e.unref(D).H.Router.To(`/admin/${n.domen}/${n.row.id}`))})]),_:1}))}}),yg={class:"cell-text"},wr=z(e.defineComponent({__name:"PTableNumber",props:{row:{},prop:{default:"name"},store:{},readonly:{type:Boolean,default:!1},label:{default:""},decimals:{default:void 0},min:{default:void 0},max:{default:void 0},step:{default:void 0},emptyPlaceholder:{default:"—"},tooltipThreshold:{default:10}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return l!=null&&String(l).length>t.tooltipThreshold}),a=e.computed(()=>{const l=i.value;return l==null||l===""?t.emptyPlaceholder:typeof l=="number"&&t.decimals!==void 0?l.toFixed(t.decimals):String(l)}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(C.QTd),{key:n.prop,class:"p-table-number-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",yg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(ot,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(vn,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Je,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),modelModifiers:{number:!0},type:"number",class:"q-mb-md",autofocus:"",label:n.label,min:n.min,max:n.max,step:n.step},null,8,["modelValue","label","min","max","step"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-4e17e527"]]),bo=e.defineComponent({inheritAttrs:!1,__name:"PSelect",props:e.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:""},options:{type:Array,required:!1,default:()=>[]},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","clear"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=e.useModel(n,"modelValue"),r=o,s=e.ref(null);function a(){var y;(y=s.value)==null||y.focus()}function c(){var y;(y=s.value)==null||y.blur()}function l(){var y;(y=s.value)==null||y.showPopup()}function u(){var y;(y=s.value)==null||y.hidePopup()}async function f(){var y;return await((y=s.value)==null?void 0:y.validate())??!0}function m(){var y;(y=s.value)==null||y.resetValidation()}t({focus:a,blur:c,showPopup:l,hidePopup:u,validate:f,resetValidation:m});const p=e.useAttrs(),S=e.computed(()=>typeof p.id=="string"?p.id:void 0),E=e.computed(()=>{const y={};for(const N of Object.keys(p))N!=="id"&&N!=="disable"&&(y[N]=p[N]);return y}),P=n,V=e.computed(()=>p.disable??P.disabled),x=y=>{r("change",y)},$=()=>{r("clear",void 0)},b=e.computed(()=>{const y={};return P.margin&&(y.margin=P.margin),P.padding&&(y.padding=P.padding),P.width&&(y.width=P.width),P.inPadding&&(y.padding=P.inPadding),y});return(y,N)=>(e.openBlock(),e.createBlock(e.unref(C.QSelect),e.mergeProps({ref_key:"selectRef",ref:s,modelValue:i.value,"onUpdate:modelValue":N[0]||(N[0]=I=>i.value=I)},e.unref(E),{for:e.unref(S),options:n.options,label:n.label||void 0,placeholder:n.placeholder,clearable:n.clearable,rules:n.rules,disable:e.unref(V),readonly:n.readonly,"input-style":{color:n.color||void 0},style:e.unref(b),class:"p-select",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":x,onClear:$}),e.createSlots({before:e.withCtx(()=>[e.renderSlot(y.$slots,"before",{},()=>[e.renderSlot(y.$slots,"left")])]),append:e.withCtx(()=>[e.renderSlot(y.$slots,"append",{},()=>[e.renderSlot(y.$slots,"right")])]),_:2},[y.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"prepend")]),key:"0"}:void 0,y.$slots.after?{name:"after",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after")]),key:"1"}:void 0,y.$slots.default?{name:"default",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"default")]),key:"2"}:void 0,y.$slots.label?{name:"label",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"label")]),key:"3"}:void 0,y.$slots.error?{name:"error",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"error")]),key:"4"}:void 0,y.$slots.hint?{name:"hint",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"hint")]),key:"5"}:void 0,y.$slots.counter?{name:"counter",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"counter")]),key:"6"}:void 0,y.$slots.loading?{name:"loading",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"loading")]),key:"7"}:void 0,y.$slots.selected?{name:"selected",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"selected")]),key:"8"}:void 0,y.$slots.option?{name:"option",fn:e.withCtx(I=>[e.renderSlot(y.$slots,"option",e.normalizeProps(e.guardReactiveProps(I)))]),key:"9"}:void 0,y.$slots["no-option"]?{name:"no-option",fn:e.withCtx(I=>[e.renderSlot(y.$slots,"no-option",e.normalizeProps(e.guardReactiveProps(I)))]),key:"10"}:void 0,y.$slots["before-options"]?{name:"before-options",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"before-options")]),key:"11"}:void 0,y.$slots["after-options"]?{name:"after-options",fn:e.withCtx(()=>[e.renderSlot(y.$slots,"after-options")]),key:"12"}:void 0,y.$slots["selected-item"]?{name:"selected-item",fn:e.withCtx(I=>[e.renderSlot(y.$slots,"selected-item",e.normalizeProps(e.guardReactiveProps(I)))]),key:"13"}:void 0]),1040,["modelValue","for","options","label","placeholder","clearable","rules","disable","readonly","input-style","style"]))}}),br=z(e.defineComponent({__name:"PTableSelect",props:{row:{},prop:{},storeOpts:{},store:{}},setup(n){const t=n,o=e.computed(()=>t.storeOpts.Options);return e.onBeforeMount(async()=>{await t.storeOpts.GetOptions()}),(i,r)=>(e.openBlock(),e.createBlock(e.unref(C.QTd),{key:n.prop,class:"relation-cell"},{default:e.withCtx(()=>[e.createVNode(bo,{modelValue:n.row[n.prop+"Id"],"onUpdate:modelValue":r[0]||(r[0]=s=>n.row[n.prop+"Id"]=s),clearable:!1,dense:"",filled:"","map-options":"",options:e.unref(o)},null,8,["modelValue","options"])]),_:1}))}}),[["__scopeId","data-v-a2c49ff8"]]),wg={class:"cell-text"},Cr=z(e.defineComponent({__name:"PTableString",props:{row:{},prop:{default:"name"},store:{},maxLength:{default:200},truncateLength:{default:40},readonly:{type:Boolean,default:!1},label:{default:""}},setup(n){const t=n,o=e.ref(),i=e.computed(()=>t.row[t.prop]||""),r=e.computed(()=>!!t.store&&!t.readonly),s=e.computed(()=>{const l=i.value;return typeof l=="string"&&l.length>t.truncateLength}),a=e.computed(()=>{const l=i.value;return typeof l!="string"?l:l.length>t.truncateLength?l.slice(0,t.truncateLength)+"...":l}),c=async()=>{t.store&&await t.store.Update(t.row)};return(l,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createBlock(e.unref(C.QTd),{key:n.prop,class:"p-table-string-cell"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["editable-cell",{clickable:e.unref(r)}]),onClick:u[0]||(u[0]=f=>e.unref(r)?e.unref(o).toggle():void 0)},[e.createElementVNode("span",wg,e.toDisplayString(e.unref(a)),1),e.unref(s)?(e.openBlock(),e.createBlock(ot,{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)),1)]),_:1})):e.createCommentVNode("",!0)],2)]),_:1})),e.unref(r)?(e.openBlock(),e.createBlock(vn,{key:0,ref_key:"edit",ref:o,onConfirm:c},{default:e.withCtx(()=>[e.createVNode(Je,{modelValue:n.row[n.prop],"onUpdate:modelValue":u[1]||(u[1]=f=>n.row[n.prop]=f),class:"q-mb-md",maxlength:n.maxLength,autofocus:"",label:n.label},null,8,["modelValue","maxlength","label"])]),_:1},512)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-8856da5a"]]),Sr=z(e.defineComponent({__name:"PTable",props:{cols:{},items:{},store:{},rowKey:{default:"name"},rowsPerPageOptions:{default:()=>[25,50,75,100]},paginationLabel:{type:Function,default:(n,t,o)=>`${n}-${t} из ${o}`}},emits:["request"],setup(n,{emit:t}){const o=n,i=t,r=e.ref({page:0,rowsNumber:o.store.Count,rowsPerPage:25,sortBy:"desc",descending:!1});e.watch(()=>o.store.Count,()=>{r.value.rowsNumber=o.store.Count});const s=c=>{D.F.FTSP.Get().p.page=c.pagination.page-1,D.F.FTSP.Get().p.rowsPerPage=c.pagination.rowsPerPage,r.value.page=c.pagination.page,r.value.rowsPerPage=c.pagination.rowsPerPage},a=async c=>{s(c),await o.store.FTSP(),i("request")};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(C.QTable),{pagination:e.unref(r),"onUpdate:pagination":l[0]||(l[0]=u=>e.isRef(r)?r.value=u:null),columns:n.cols,rows:n.items,"row-key":n.rowKey,flat:"",bordered:"","rows-per-page-label":"На странице","pagination-label":n.paginationLabel,"rows-per-page-options":n.rowsPerPageOptions,class:"p-table",onRequest:a},{header:e.withCtx(u=>[e.createVNode(e.unref(C.QTr),{props:u},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QTh),{"auto-width":""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.cols,f=>(e.openBlock(),e.createBlock(e.unref(C.QTh),{key:f.name,props:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),body:e.withCtx(u=>[e.createVNode(e.unref(C.QTr),{props:u},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{row:u.row},void 0,!0)]),_:2},1032,["props"])]),_:3},8,["pagination","columns","rows","row-key","pagination-label","rows-per-page-options"]))}}),[["__scopeId","data-v-025f97ac"]]);function Oa(n){n.component("PTable",Sr),n.component("PTableBadge",hr),n.component("PTableBadges",pr),n.component("PTableCount",gr),n.component("PTableEdit",yr),n.component("PTableNumber",wr),n.component("PTableSelect",br),n.component("PTableString",Cr)}const bg=Object.freeze(Object.defineProperty({__proto__:null,PTable:Sr,PTableBadge:hr,PTableBadges:pr,PTableCount:gr,PTableEdit:yr,PTableNumber:wr,PTableSelect:br,PTableString:Cr,default:Oa},Symbol.toStringTag,{value:"Module"})),Cg=["innerHTML"],kr=z(e.defineComponent({__name:"PTabs",props:{tabsStore:{type:Object,required:!0},vertical:{type:Boolean,default:!1},color:{type:String,default:"",required:!1},dark:{type:Boolean,default:!1},compact:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:t}){const o=n,i=t;e.onBeforeMount(()=>{o.tabsStore.Select()});const r=s=>{o.tabsStore.Select(s),i("select")};return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tabs-wrapper",{compact:n.compact,vertical:n.vertical}])},[e.createVNode(e.unref(C.QTabs),{"model-value":n.tabsStore.value,vertical:n.vertical,class:e.normalizeClass(["tabs-header",n.color?`bg-${n.color} text-white`:"",{"tabs-header--dark":n.dark}]),dense:"",align:"justify","narrow-indicator":"","active-class":"active-tab","onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(C.QTab),{key:c.value,name:c.value,label:c.htmlLabel?void 0:c.label,icon:c.icon,"no-caps":""},{default:e.withCtx(()=>[c.htmlLabel?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:c.htmlLabel},null,8,Cg)):e.createCommentVNode("",!0),c.alert?(e.openBlock(),e.createBlock(e.unref(C.QBadge),{key:1,color:"negative",floating:"",rounded:""},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode("!",-1)])]),_:1})):e.createCommentVNode("",!0)]),_:2},1032,["name","label","icon"]))),128))]),_:1},8,["model-value","vertical","class"]),e.createVNode(e.unref(C.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"tabs-panels","transition-prev":"slide-right","transition-next":"slide-left"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,c=>(e.openBlock(),e.createBlock(e.unref(C.QTabPanel),{key:c.value,name:c.value,class:"tab-panel"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{item:c,tab:c},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])],2))}}),[["__scopeId","data-v-80c4d829"]]),Sg={class:"q-pa-md"},xr=z(e.defineComponent({__name:"PTabsLeft",props:{buttons:{type:Array,default:()=>[]},tabsStore:{type:Object,required:!0}},emits:["select"],setup(n,{emit:t}){const o=n,i=t,r=a=>{o.tabsStore.Select(a),i("select")},s=e.ref(20);return(a,c)=>(e.openBlock(),e.createBlock(e.unref(C.QSplitter),{modelValue:e.unref(s),"onUpdate:modelValue":c[0]||(c[0]=l=>e.isRef(s)?s.value=l:null),class:"full-height"},{before:e.withCtx(()=>[e.createVNode(e.unref(C.QTabs),{vertical:"",class:"text-teal","model-value":n.tabsStore.value,"onUpdate:modelValue":r},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.items,l=>(e.openBlock(),e.createBlock(e.unref(C.QTab),{key:l.value,name:l.value,label:l.label,"no-caps":""},null,8,["name","label"]))),128))]),_:1},8,["model-value"]),e.createElementVNode("div",Sg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.buttons,(l,u)=>(e.openBlock(),e.createBlock(ne,{key:u,label:l.text,color:l.color,class:"q-mb-sm full-width",onClick:f=>l.action(l)},null,8,["label","color","onClick"]))),128))])]),after:e.withCtx(()=>[e.createVNode(e.unref(C.QTabPanels),{"model-value":n.tabsStore.value,animated:"",class:"shadow-2 rounded-borders"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabsStore.GetItems(),l=>(e.openBlock(),e.createBlock(e.unref(C.QTabPanel),{key:l.value,name:l.value},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{item:l},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component)))],!0)]),_:2},1032,["name"]))),128))]),_:3},8,["model-value"])]),_:3},8,["modelValue"]))}}),[["__scopeId","data-v-a7a16408"]]);class ni{constructor(){d(this,"items",[]);d(this,"idx",0);d(this,"key","");d(this,"value","")}preSelect(){var o;const t=D.H.Router.GetStringQueryParam(this.key);if(!t||t==="undefined"){this.Select((o=this.items[0])==null?void 0:o.value);return}this.Select(t)}static ToTab(t,o="",i=""){return{label:i,value:o,...t}}static Create(t,o){const i=new ni;return i.key=t,i.items=o,i.items.length&&i.preSelect(),i}Select(t){if(!this.items.length)return;if(t===void 0)return this.preSelect();this.idx=this.items.findIndex(i=>i.value===t),this.value=t;const o=this.GetValue();o&&D.H.Router.SetQueryParam(this.key,o)}GetMenu(){return this.items[this.idx]}GetComponent(){var t;return(t=this.items[this.idx])==null?void 0:t.component}GetValue(){var t;return(t=this.items[this.idx])==null?void 0:t.value}GetItems(){return this.items}}function La(n){n.component("PTabs",kr),n.component("PTabsLeft",xr)}const kg=Object.freeze(Object.defineProperty({__proto__:null,Contacts:$m,Forms:Km,Menus:ah,Schedule:rg,Table:bg,Tabs:Object.freeze(Object.defineProperty({__proto__:null,PTabs:kr,PTabsLeft:xr,TabsStore:ni,default:La},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),_a=e.defineComponent({inheritAttrs:!1,__name:"PCheckBox",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},value:{type:[String,Boolean],default:void 0},size:{type:String,default:"md"},borderRadius:{type:String,default:""},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-checkbox",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(C.QCheckbox),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),xg={class:"row items-center justify-end"},Ha="DD.MM.YYYY",Ua=e.defineComponent({__name:"PDateInput",props:e.mergeModels({label:{type:String,default:"",required:!1},placeholder:{type:String,default:"",required:!1},dense:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},margin:{type:String,default:"",required:!1},padding:{type:String,default:"",required:!1},width:{type:String,default:"",required:!1},modelType:{type:String,default:void 0,required:!1},invalidMessage:{type:String,default:"Некорректная дата",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["blur","input"],["update:modelValue"]),setup(n,{emit:t}){const o=C.ClosePopup,i=n,r=t,s=e.useModel(n,"modelValue"),a=Ha.replace(/[DMY]/g,"#"),c=e.ref(null),l=V=>{if(i.modelType){c.value=i.modelType;return}V instanceof Date?c.value="date":(typeof V=="string"&&V||c.value===null)&&(c.value="string")},u=V=>V?V instanceof Date?Ze.ToRu(V):Ze.IsoToRu(String(V)):"",f=V=>Ze.ParseRu(V),m=e.ref(u(s.value));l(s.value);const p=e.computed(()=>{const V=m.value;return!V||V.length<10||ia(i.invalidMessage,!0)(V)===!0?"":i.invalidMessage});e.watch(s,V=>{l(V);const x=u(V);x!==m.value&&(m.value=x)});const S=V=>{const x=typeof V=="number"?String(V):V;if(!x){const b=c.value==="date"?null:"";s.value=b,r("input",b);return}if(!/^\d{2}\.\d{2}\.\d{4}$/.test(x))return;const $=f(x);if($)if(c.value==="date")s.value=$,r("input",$);else{const b=Ze.RuToIso(x);if(!b)return;s.value=b,r("input",b)}},E=()=>{r("blur",s.value)},P={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(V,x)=>(e.openBlock(),e.createBlock(Je,{modelValue:e.unref(m),"onUpdate:modelValue":[x[1]||(x[1]=$=>e.isRef(m)?m.value=$:null),S],class:"fit",label:n.label,placeholder:n.placeholder,mask:e.unref(a),dense:n.dense,outlined:n.outlined,clearable:n.clearable,disable:n.disable,readonly:n.readonly,margin:n.margin,padding:n.padding,width:n.width,rules:n.rules,error:!!e.unref(p),"error-message":e.unref(p),inputmode:"numeric",onBlur:E},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{cover:"","transition-show":"scale","transition-hide":"scale"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QDate),{modelValue:e.unref(m),"onUpdate:modelValue":x[0]||(x[0]=$=>e.isRef(m)?m.value=$:null),mask:Ha,"today-btn":"",locale:P},{default:e.withCtx(()=>[e.createElementVNode("div",xg,[e.withDirectives(e.createVNode(ne,{label:"Готово",color:"primary",flat:""},null,512),[[e.unref(o)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),before:e.withCtx(()=>[e.renderSlot(V.$slots,"before")]),append:e.withCtx(()=>[e.renderSlot(V.$slots,"append")]),_:3},8,["modelValue","label","placeholder","mask","dense","outlined","clearable","disable","readonly","margin","padding","width","rules","error","error-message"]))}}),Eg={class:"row items-center justify-end"},Bg={class:"row items-center justify-end"},va=e.defineComponent({__name:"PDateTimeInput",props:e.mergeModels({label:{type:String,default:"Дата и время"},placeholder:{type:String,default:"ДД.ММ.ГГГГ ЧЧ:мм"},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=C.ClosePopup,o=e.useModel(n,"modelValue"),i=e.ref(""),r=e.ref(""),s=e.ref(""),a=E=>E?C.date.formatDate(E,"DD.MM.YYYY HH:mm"):"",c=E=>{if(!E||!/^\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}$/.test(E))return null;const P=C.date.extractDate(E,"DD.MM.YYYY HH:mm");return Number.isNaN(P.getTime())?null:P},l=E=>{o.value=E},u=E=>{const P=String(E??"");i.value=P.replace(/[_\s]/g,"")===""?"":P},f=()=>{const E=c(i.value);E?l(E):i.value===""?l(null):i.value=a(o.value)},m=()=>{if(r.value){const E=o.value?C.date.formatDate(o.value,"HH:mm"):"00:00",P=`${r.value} ${E}`,V=c(P);V&&(i.value=a(V),l(V))}r.value=""},p=()=>{if(s.value){const E=o.value?C.date.formatDate(o.value,"DD.MM.YYYY"):"",P=C.date.formatDate(new Date,"DD.MM.YYYY"),V=E?`${E} ${s.value}`:`${P} ${s.value}`,x=c(V);x&&(i.value=a(x),l(x))}s.value=""};e.watch(o,E=>{E!==c(i.value)&&(i.value=a(E??null))},{immediate:!0});const S={days:"Понедельник_Вторник_Среда_Четверг_Пятница_Суббота_Воскресенье".split("_"),daysShort:"Пн_Вт_Ср_Чт_Пт_Сб_Вс".split("_"),months:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_"),monthsShort:"Янв_Фев_Мар_Апр_Май_Июн_Июл_Авг_Сен_Окт_Ноя_Дек".split("_"),firstDayOfWeek:1,format24h:!0,pluralDay:"дни"};return(E,P)=>(e.openBlock(),e.createBlock(Je,{"model-value":e.unref(i),label:n.label,placeholder:n.placeholder,disable:n.disable,readonly:n.readonly,error:n.error,"error-message":n.errorMessage,rules:n.rules,mask:"##.##.#### ##:##","fill-mask":"","onUpdate:modelValue":u,onBlur:f},{prepend:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"event",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QDate),{modelValue:e.unref(r),"onUpdate:modelValue":P[0]||(P[0]=V=>e.isRef(r)?r.value=V:null),mask:"DD.MM.YYYY",locale:S},{default:e.withCtx(()=>[e.createElementVNode("div",Eg,[e.withDirectives(e.createVNode(ne,{label:"OK",color:"primary",flat:"",onClick:m},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(C.QIcon),{name:"access_time",class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QPopupProxy),{cover:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QTime),{modelValue:e.unref(s),"onUpdate:modelValue":P[1]||(P[1]=V=>e.isRef(s)?s.value=V:null),mask:"HH:mm",format24h:"",locale:S},{default:e.withCtx(()=>[e.createElementVNode("div",Bg,[e.withDirectives(e.createVNode(ne,{label:"OK",color:"primary",flat:"",onClick:p},null,512),[[e.unref(t)]])])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model-value","label","placeholder","disable","readonly","error","error-message","rules"]))}}),Vg=z(e.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(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"flex-line flex",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,height:n.height,justifyContent:n.justifyContent,background:n.background,alignItems:n.alignItems})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-71357bc9"]]),Ng={key:0,class:"p-form__actions row justify-end q-gutter-sm q-mt-md"},$g=z(e.defineComponent({name:"PForm",__name:"PForm",props:e.mergeModels({greedy:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},noErrorFocus:{type:Boolean,default:!1},noResetFocus:{type:Boolean,default:!1}},{valid:{type:Boolean,default:void 0},validModifiers:{}}),emits:e.mergeModels(["submit","reset","validation-success","validation-error"],["update:valid"]),setup(n,{expose:t,emit:o}){const i=o,r=e.useModel(n,"valid"),s=e.ref(!0),a=x=>{s.value=x,r.value!==void 0&&(r.value=x)},c=e.ref(),l=()=>{a(!0),i("validation-success")},u=()=>{a(!1),i("validation-error")},f=x=>{i("submit",x)},m=()=>{var x;(x=c.value)==null||x.resetValidation(),a(!0),i("reset")},p=async()=>{var $;const x=await(($=c.value)==null?void 0:$.validate())??!1;return a(x),x},S=()=>{var x;(x=c.value)==null||x.resetValidation(),a(!0)};return t({validate:p,resetValidation:S,focus:()=>{var x;return(x=c.value)==null?void 0:x.focus()},submit:x=>{var $;return($=c.value)==null?void 0:$.submit(x)},reset:x=>{var $;return($=c.value)==null?void 0:$.reset(x)}}),(x,$)=>(e.openBlock(),e.createBlock(e.unref(C.QForm),{ref_key:"qFormRef",ref:c,greedy:n.greedy,autofocus:n.autofocus,"no-error-focus":n.noErrorFocus,"no-reset-focus":n.noResetFocus,class:"p-form",onSubmit:f,onReset:m,onValidationSuccess:l,onValidationError:u},{default:e.withCtx(()=>[e.renderSlot(x.$slots,"default",{},void 0,!0),x.$slots.actions?(e.openBlock(),e.createElementBlock("div",Ng,[e.renderSlot(x.$slots,"actions",{valid:e.unref(s),validate:p,resetValidation:S},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["greedy","autofocus","no-error-focus","no-reset-focus"]))}}),[["__scopeId","data-v-a64ba3d2"]]),Tg={class:"p-hint-popup"},Er=z(e.defineComponent({__name:"PHint",props:{text:{}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.text?(e.openBlock(),e.createBlock(e.unref(C.QIcon),{key:0,name:"help_outline",size:"15px",class:"p-hint-icon",onClick:i[0]||(i[0]=e.withModifiers(r=>t.value=!0,["stop"]))},{default:e.withCtx(()=>[e.createVNode(ot,{anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"320px"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.text),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QMenu),{modelValue:e.unref(t),"onUpdate:modelValue":i[1]||(i[1]=r=>e.isRef(t)?t.value=r:null),anchor:"top middle",self:"bottom middle",offset:[0,6],"max-width":"340px"},{default:e.withCtx(()=>[e.createElementVNode("div",Tg,e.toDisplayString(n.text),1)]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-3443b70c"]]),Pg=z(e.defineComponent({__name:"IconMinus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#minus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"minus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.createElementVNode("path",{d:"M19.4995 13.8856H5.53125V11.8926H19.4995V13.8856Z",fill:"currentColor"})])],-1))],64))}}),[["__scopeId","data-v-582bd65a"]]),Mg=z(e.defineComponent({__name:"IconPlus",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#plus"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"plus",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},[e.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"]]),Ig=e.defineComponent({inheritAttrs:!1,__name:"PInputNumber",props:e.mergeModels({label:{type:String,default:"",required:!1},margin:{type:String,required:!1,default:""},padding:{type:String,default:"",required:!1},color:{type:String,default:"",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},rules:{type:Array,required:!1,default:void 0}},{modelValue:{default:0},modelModifiers:{}}),emits:e.mergeModels(["blur","input","change"],["update:modelValue"]),setup(n,{emit:t}){const o=t,i=e.useAttrs(),r=e.computed(()=>typeof i.id=="string"?i.id:void 0),s=e.computed(()=>{const N={};for(const I of Object.keys(i))I!=="id"&&(N[I]=i[I]);return N}),a=n,c=()=>{const N=a.step.toString();return N.includes(".")?N.split(".")[1].length:0},l=c(),u=e.useModel(n,"modelValue"),m=(N=>Math.min(Math.max(N,a.min),a.max))(u.value);m!==u.value&&(u.value=m);const p=e.ref(m.toFixed(c())),S=e.computed(()=>{const N={};return a.margin&&(N.margin=a.margin),a.padding&&(N.padding=a.padding),N}),E=N=>{const I=Math.pow(10,l);return Math.round(N*I)/I},P=(N,...I)=>{u.value=E(N),p.value=E(N).toFixed(c()),I.forEach(j=>o(j,u.value))},V=(N,...I)=>{a.disabled||N>a.max||N<a.min||P(N,...I)},x=()=>V(+p.value+a.step,"change"),$=()=>V(+p.value-a.step,"change"),b=N=>V(Number(N),"input"),y=()=>V(+p.value,"change","blur");return(N,I)=>(e.openBlock(),e.createBlock(e.unref(C.QInput),e.mergeProps(e.unref(s),{for:e.unref(r),"model-value":e.unref(p),label:n.label||void 0,rules:n.rules,class:"p-input-number",type:"number",disable:n.disabled,"input-style":{color:n.disabled?"#828587":n.color,textAlign:"center"},style:e.unref(S),outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":b,onBlur:y}),{before:e.withCtx(()=>[e.createVNode(e.unref(C.QBtn),{class:"number-minus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:$},{default:e.withCtx(()=>[e.createVNode(Pg)]),_:1})]),append:e.withCtx(()=>[e.createVNode(e.unref(C.QBtn),{class:"number-plus",flat:"",dense:"",round:"",style:{width:"32px",height:"32px"},onClick:x},{default:e.withCtx(()=>[e.createVNode(Mg)]),_:1})]),_:1},16,["for","model-value","label","rules","disable","input-style","style"]))}}),Rg=z(Ig,[["__scopeId","data-v-1aec76d0"]]),Ag=z(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.shift?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({minWidth:n.widthClosed,maxWidth:n.widthClosed,height:n.height})},null,4)),e.createElementVNode("div",{class:"LS-body",style:e.normalizeStyle({marginLeft:e.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute",background:n.background,height:n.height})},[e.createElementVNode("div",{class:"LS-content",style:e.normalizeStyle({width:`calc(100% - ${n.widthClosed})`,height:n.height,background:"#ffffff"})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4),e.createVNode(e.unref(C.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"])],4)],64)}}}),[["__scopeId","data-v-31292b0b"]]),zg=e.defineComponent({__name:"PList",props:{margin:{type:String,required:!1,default:""},padding:{type:String,required:!1,default:""},width:{type:String,required:!1,default:"300px"}},setup(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(C.QList),{tag:"ul",style:e.normalizeStyle({margin:n.margin,padding:n.padding,width:n.width})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),Dg=e.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(n){return(t,o)=>(e.openBlock(),e.createBlock(e.unref(C.QItem),{tag:"li",style:e.normalizeStyle({margin:n.margin,padding:n.padding,borderBottom:n.showDivider?"1px solid":"none",background:n.background})},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["style"]))}}),qa=e.defineComponent({__name:"POpts",props:{label:{},item:{},store:{},prop:{},storeOpts:{},optLabel:{},optValue:{},disabled:{type:Boolean},hint:{}},setup(n){var c;const t=n,o=((c=t.storeOpts)==null?void 0:c.Options)??[],i=e.ref(o);async function r(l,u,f,m){var P,V;const S="set"+(((P=u[0])==null?void 0:P.toUpperCase())+u.slice(1)),E=l[S];typeof E=="function"?E(f):(l[u]=f,l[u+"Id"]=f==null?void 0:f.id),await((V=m==null?void 0:m.Update)==null?void 0:V.call(m,l))}const s=(l,u)=>{if(l===""){u(()=>{i.value=o});return}u(()=>{i.value=o.filter(f=>D.H.Strings.SearchInFields(l,[f.label]))})},a=async l=>{l?(await t.storeOpts.Get(l.value),await r(t.item,t.prop,t.storeOpts.Item,t.store)):await r(t.item,t.prop,void 0,t.store)};return e.onBeforeMount(async()=>{o.length>0||await t.storeOpts.GetOptions(t.optLabel,t.optValue)}),(l,u)=>(e.openBlock(),e.createBlock(bo,{"use-input":"",options:e.unref(i),"model-value":n.item[n.prop+"Id"],label:n.label,disable:n.disabled,"map-options":"",clearable:"",dense:"",outlined:"","hide-bottom-space":"","onUpdate:modelValue":a,onFilter:s},{append:e.withCtx(()=>[e.createVNode(Er,{text:n.hint},null,8,["text"])]),_:1},8,["options","model-value","label","disable"]))}}),Fg=e.defineComponent({__name:"PRadio",props:e.mergeModels({label:{type:String,default:""},name:{type:String,default:"group"},fontSize:{type:String,default:""},size:{type:String,default:"md"},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:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=n,s=()=>{i("change",r.value)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:"p-radio",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(C.QRadio),{modelValue:o.value,"onUpdate:modelValue":[c[0]||(c[0]=l=>o.value=l),s],val:n.value,name:n.name,label:n.label||void 0,size:n.size,style:e.normalizeStyle({fontSize:n.fontSize})},null,8,["modelValue","val","name","label","size","style"])],4))}}),Og=z(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"wrapper",style:e.normalizeStyle({maxHeight:n.height,height:n.height})},[e.createElementVNode("div",{class:"content",style:e.normalizeStyle({paddingRight:n.shift?"0":`${n.widthClosed}`})},[e.renderSlot(a.$slots,"content",{},void 0,!0)],4),e.createElementVNode("div",{class:"RS-body",style:e.normalizeStyle({marginRight:e.unref(r)?"0":`calc(${n.widthClosed} - ${n.widthOpened})`,minWidth:n.widthOpened,maxWidth:n.widthOpened,boxShadow:n.shadow?"-5px 0 5px -3px rgba(0,0,0,0.3)":"none",position:n.shift?"relative":"absolute"})},[e.createVNode(e.unref(C.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({width:n.widthClosed,minWidth:n.widthClosed,height:n.height,borderRadius:"0"}),onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleOpen,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleClose,"font-size":"16px",padding:"0",color:"inherit"},null,8,["string"]))]),_:1},8,["style"]),e.createElementVNode("div",{class:"RS-content",style:e.normalizeStyle({width:`calc(${n.widthOpened} - ${n.widthClosed} - 2px)`,background:n.background,height:n.height})},[e.renderSlot(a.$slots,"default",{},void 0,!0)],4)],4)],4)}}}),[["__scopeId","data-v-8ab50ea6"]]),Lg=z(e.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:"rgba(0, 0, 0, 0.12)"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"sticky-block",style:e.normalizeStyle({zIndex:1+n.zIndex,top:n.top,background:n.background,padding:n.padding,boxShadow:n.shadow?"0 0 5px 2px rgba(0,0,0,0.3)":"none",borderBottom:n.divider?"1px solid":"none",borderColor:n.dividerColor})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-4748d546"]]),ja=z(e.defineComponent({__name:"PTableToggle",props:{row:{},prop:{},store:{},readonly:{type:Boolean,default:!1}},setup(n){const t=n,o=e.computed(()=>t.row[t.prop]),i=async()=>{t.row[t.prop]=!t.row[t.prop],await t.store.Update(t.row)};return(r,s)=>(e.openBlock(),e.createBlock(e.unref(C.QTd),{key:n.prop},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["toggle-cell",{clickable:!t.readonly}]),onClick:s[0]||(s[0]=a=>t.readonly?void 0:i())},[e.createVNode(e.unref(C.QIcon),{name:e.unref(o)?"check_circle":"radio_button_unchecked",color:e.unref(o)?"positive":"grey-5",size:"20px"},null,8,["name","color"]),e.createVNode(ot,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)?"Включено":"Выключено"),1)]),_:1})],2)]),_:1}))}}),[["__scopeId","data-v-96a76c56"]]),_g=z(e.defineComponent({inheritAttrs:!1,__name:"PTextarea",props:e.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:"",required:!1},color:{type:String,default:"",required:!1},resize:{type:String,default:"vertical",required:!1},rules:{type:Array,required:!1,default:void 0}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["blur","input","focus"],["update:modelValue"]),setup(n){const t=e.useModel(n,"modelValue"),o=e.useAttrs(),i=e.computed(()=>typeof o.id=="string"?o.id:void 0),r=e.computed(()=>{const l={};for(const u of Object.keys(o))u!=="id"&&(l[u]=o[u]);return l}),s=n,a=e.computed(()=>({color:s.color||void 0,resize:s.resize})),c=e.computed(()=>{const l={};return s.margin&&(l.margin=s.margin),s.padding&&(l.padding=s.padding),s.borderColor&&(l["--p-border-color"]=s.borderColor),l});return(l,u)=>(e.openBlock(),e.createBlock(e.unref(C.QInput),e.mergeProps({modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=f=>t.value=f)},e.unref(r),{for:e.unref(i),label:n.label||void 0,mask:n.mask,rules:n.rules,type:"textarea","input-style":e.unref(a),style:e.unref(c),class:"p-textarea",outlined:"",dense:"","hide-bottom-space":"","onUpdate:modelValue":u[1]||(u[1]=f=>l.$emit("input",t.value)),onBlur:u[2]||(u[2]=f=>l.$emit("blur",t.value)),onFocus:u[3]||(u[3]=f=>l.$emit("focus",t.value))}),{before:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},void 0,!0)]),append:e.withCtx(()=>[e.renderSlot(l.$slots,"right",{},void 0,!0)]),_:3},16,["modelValue","for","label","mask","rules","input-style","style"]))}}),[["__scopeId","data-v-4cbcc0ca"]]),Wa=e.defineComponent({inheritAttrs:!1,__name:"PToggle",props:e.mergeModels({label:{type:String,default:""},fontSize:{type:String,default:""},size:{type:String,default:"md"},padding:{type:String,default:""},margin:{type:String,default:""},width:{type:String,default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(n,{emit:t}){const o=e.useModel(n,"modelValue"),i=t,r=e.useAttrs(),s=e.computed(()=>{const c={};for(const l of Object.keys(r))c[l]=r[l];return c}),a=()=>{i("change",o.value)};return(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"p-toggle",style:e.normalizeStyle({padding:n.padding,margin:n.margin,maxWidth:n.width})},[e.createVNode(e.unref(C.QToggle),e.mergeProps({modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=u=>o.value=u)},e.unref(s),{label:n.label||void 0,size:n.size,style:{fontSize:n.fontSize},"onUpdate:modelValue":a}),null,16,["modelValue","label","size","style"])],4))}}),Hg={class:"top-slider-content"},Ug={class:"center"},vg=z(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(o.open);e.watch(()=>o.open,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("open",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?"0":`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`,height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Hg,[e.createElementVNode("div",Ug,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createVNode(e.unref(C.QBtn),{class:"click-line",flat:"","no-caps":"",style:e.normalizeStyle({height:n.sliderOffHeight,minHeight:n.sliderOffHeight,borderRadius:"0"}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"title",{},void 0,!0)]),_:3},8,["style"])],4)],64))}}),[["__scopeId","data-v-88b1978e"]]);function qg(n){n.component("PButton",ne),n.component("PBadge",fo),n.component("PCheckBox",_a),n.component("PChip",mr),n.component("PDateInput",Ua),n.component("PDateTimeInput",va),n.component("PDialog",un),n.component("PFlex",Vg),n.component("PForm",$g),n.component("PHint",Er),n.component("PInput",Je),n.component("PInputNumber",Rg),n.component("PLeftSlider",Ag),n.component("PList",zg),n.component("PListItem",Dg),n.component("POptionsListSingle",ti),n.component("POpts",qa),n.component("PRadio",Fg),n.component("PRightSlider",Og),n.component("PSelect",bo),n.component("PSticky",Lg),n.component("PString",er),n.component("PTextarea",_g),n.component("PTopSlider",vg),n.component("PTableToggle",ja),n.component("PToggle",Wa),n.component("PTooltip",ot)}const jg={key:0,class:"mainblock"},Wg={class:"mainblock-right"},Gg={class:"body"},Qg=z(e.defineComponent({__name:"AdaptiveContainer",props:{menuWidth:{type:String,required:!1,default:"0px"},mobileWidth:{type:String,required:!1,default:"1330px"}},setup(n){const t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",jg,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,maxWidth:e.unref(r)?"100%":n.menuWidth,marginLeft:e.unref(r)?"-110%":"0",position:e.unref(r)?"fixed":"relative",top:e.unref(r)?"140px":""})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"auto":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:!e.unref(i)&&e.unref(r)?"110%":"0",borderTopLeftRadius:e.unref(r)?"0":"",borderBottomLeftRadius:e.unref(r)?"0":""}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Wg,[a.$slots.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"title",style:e.normalizeStyle({display:a.$slots.title?"flex":"none"})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",Gg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])])):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-52b3d807"]]),Yg={class:"mainblock-right"},Xg={class:"body"},Zg=z(e.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(n){const t=n,o=e.ref(!1),i=e.ref(!0),r=e.ref(window.matchMedia("(max-width: 1330px)").matches),s=()=>{i.value=!i.value};return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(t.mobileWidth){case"1330px":return r.value=window.matchMedia("(max-width: 1330px)").matches;case"1024px":return r.value=window.matchMedia("(max-width: 1024px)").matches;case"768px":return r.value=window.matchMedia("(max-width: 768px)").matches}return r.value=window.matchMedia("(max-width: 1330px)").matches}),o.value=!0}),(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(a.$slots,"main",{},void 0,!0),e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mainblock",style:e.normalizeStyle({display:e.unref(r)?"block":"flex"})},[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,display:n.leftWidth!=="0px"?"flex":"none",top:e.unref(r)?"58px":"80px"})},[e.createElementVNode("div",{class:"left-menu",style:e.normalizeStyle({minWidth:e.unref(r)?"100%":n.menuWidth,boxShadow:e.unref(r)?"0 0px 10px 0px rgba(0 0 0 / 20%)":"",marginLeft:(!e.unref(i)&&e.unref(r),"0"),overflowX:e.unref(r)?"scroll":"hidden",display:e.unref(r)?"flex":"block",background:e.unref(r)?"#ffffff":"",overflowY:e.unref(r)?"hidden":"auto"}),onClick:c[0]||(c[0]=l=>s())},[e.renderSlot(a.$slots,"menu",{},void 0,!0)],4)],4),e.createElementVNode("div",Yg,[e.createElementVNode("div",{class:"title",style:e.normalizeStyle({position:n.titleSticky?"sticky":"relative",top:n.titleSticky?e.unref(r)?"108px":"58px":"0",zIndex:n.titleSticky?"10":""})},[e.createElementVNode("div",{class:"icon",style:e.normalizeStyle({display:e.unref(r)?"flex":"none"}),onClick:c[1]||(c[1]=l=>s())},[e.renderSlot(a.$slots,"icon",{},void 0,!0)],4),e.renderSlot(a.$slots,"title",{},void 0,!0)],4),e.createElementVNode("div",Xg,[e.renderSlot(a.$slots,"body",{},void 0,!0)])])],4)):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-a7d519dd"]]),Ga=z(e.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(n){return e.useCssVars(t=>({d143e9f0:n.maxWidth,b9d56180:n.width,v52bd0ff4:n.background,v1795aeac:n.gridGap,v0cfa7c52:n.gridTemplateColumns,v0c6d2a1f:n.gridTemplateRows,a3ccd918:n.margin})),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid-block",n.customClass])},[e.renderSlot(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-a3c4743c"]]),Jg={class:"container"},Kg={class:"slide-box"},e1={class:"image"},t1={class:"image-box"},n1=["id","src","alt"],o1={class:"link-number"},i1=["id","onClick"],r1=z(e.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(n){e.useCssVars(S=>({v582c9d05:o}));const t=n,o=`${t.animationTime}ms`,i=e.ref(t.startActiveGroupIndex),r=e.ref(Bt.None),s=e.ref(oa(t.events,t.quantity)),a=e.computed(()=>s.value[i.value]);e.onMounted(()=>{});const c=()=>i.value=i.value+1<s.value.length?i.value+1:0,l=()=>i.value=i.value-1<0?s.value.length-1:i.value-1,u=S=>{r.value=S,setTimeout(()=>r.value=Bt.None,t.animationTime)},f=S=>{S!=i.value&&(u(S<i.value?Bt.Prev:Bt.Next),setTimeout(()=>i.value=S,t.animationTime/2))},m=()=>{u(Bt.Next),setTimeout(c,t.animationTime/2)},p=()=>{u(Bt.Prev),setTimeout(l,t.animationTime/2)};return(S,E)=>(e.openBlock(),e.createElementBlock("div",{class:"field",style:e.normalizeStyle({height:n.height,maxHeight:n.maxHeight})},[e.createElementVNode("div",Jg,[(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:E[0]||(E[0]=e.withModifiers(P=>p(),["stop"]))},[...E[3]||(E[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-prev"},null,-1)])])),e.createElementVNode("div",Kg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(P,V)=>(e.openBlock(),e.createElementBlock("div",{key:V,class:e.normalizeClass({animationnext:e.unref(r)===e.unref(Bt).Next,animationprev:e.unref(r)===e.unref(Bt).Prev})},[e.createElementVNode("div",e1,[e.createElementVNode("div",t1,[e.createElementVNode("img",{id:P.fileInfo.getImageUrl(),style:e.normalizeStyle({height:`calc(${n.height} - 110px)`,maxHeight:`calc(${n.maxHeight} - 110px)`}),src:P.fileInfo.getImageUrl(),alt:P.fileInfo.originalName,onClick:E[1]||(E[1]=x=>S.showImageInFullScreen())},null,12,n1)])])],2))),128))]),(e.openBlock(),e.createElementBlock("svg",{class:"icon-arrow",onClick:E[2]||(E[2]=e.withModifiers(P=>m(),["stop"]))},[...E[4]||(E[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-next"},null,-1)])]))]),e.createElementVNode("div",o1,[e.createVNode(Ga,{"grid-template-columns":"repeat(auto-fit, minmax(26px, 1fr))","grid-gap":"5px",margin:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(P,V)=>(e.openBlock(),e.createElementBlock("div",{id:V.toString(),key:V,class:"number",style:e.normalizeStyle({background:V.toString()===e.unref(i).toString()?"#9D9D9D":""}),onClick:e.withModifiers(x=>f(V),["stop"])},e.toDisplayString(V+1),13,i1))),128))]),_:1})])],4))}}),[["__scopeId","data-v-c5b846b9"]]),s1=e.defineComponent({__name:"ContextWindow",props:{x:{type:Number,default:-1},y:{type:Number,default:-1}},emits:["close"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.x),s=e.ref(o.y),a=e.computed(()=>r.value+"px"),c=e.computed(()=>s.value+"px"),l=()=>{i("close")};return(u,f)=>{const m=e.resolveDirective("click-outside");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"context-window",style:e.normalizeStyle({left:e.unref(a),top:e.unref(c)})},[e.renderSlot(u.$slots,"default")],4)),[[m,l]])}}}),a1={class:"drop-item"},l1={key:0,class:"drop-item-list"},c1=z(e.defineComponent({__name:"DropList",props:{name:{type:String,default:"Name"},rolledUp:{type:Boolean,default:!0}},setup(n){const t=n,o=e.ref(t.rolledUp),i=async()=>{o.value=!o.value};return(r,s)=>{const a=e.resolveComponent("PString"),c=e.resolveComponent("IconArrowDrop");return e.openBlock(),e.createElementBlock("div",a1,[e.createElementVNode("div",{class:"drop-item-name",onClick:s[0]||(s[0]=l=>i())},[e.createVNode(a,{"font-size":"13px","font-weight":"600",string:n.name,"justify-content":"left",width:"auto",margin:"0 5px 0 0",padding:"6px 0",color:"inherit"},null,8,["string"]),e.createElementVNode("div",{style:e.normalizeStyle({transform:e.unref(o)?"":"rotate(-90deg)",display:"flex",alignItems:"center",margin:"0 0 2px 0"})},[e.createVNode(c,{size:"10px",margin:"0"})],4)]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",l1,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-97057f9c"]]),d1=e.defineComponent({__name:"FilterCheckbox",props:{model:{type:Object,default:()=>new Ti,required:!0}},emits:["load"],setup(n,{emit:t}){const o=n,i=e.ref(!1),r=t,s=()=>{o.model.setBoolean(i.value),i.value?D.F.FTSP.Get().setF(o.model):D.F.FTSP.Get().removeF(o.model),r("load")};return(a,c)=>{const l=e.resolveComponent("PCheckBox");return e.openBlock(),e.createBlock(l,{modelValue:e.unref(i),"onUpdate:modelValue":c[0]||(c[0]=u=>e.isRef(i)?i.value=u:null),label:n.model.label,size:"mini",onChange:s},null,8,["modelValue","label"])}}}),u1=z(e.defineComponent({__name:"FiltersButtonsSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1},ftsp:{type:Object,required:!1}},emits:["load"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>o.ftsp??xt.Get()),s=e.ref(void 0),a=async l=>{r.value.replaceF(l,s.value),s.value=l,r.value.p.drop()},c=async l=>{await a(l),i("load")};return(l,u)=>{const f=e.resolveComponent("PString"),m=e.resolveComponent("PButton"),p=e.resolveComponent("GridContainer"),S=e.resolveComponent("InfoItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(f,{string:n.defaultLabel,"font-size":"14px",padding:"0",margin:"20px 0 0 10px"},null,8,["string"]),e.createVNode(S,{margin:"5px 0 0 0px","with-open-window":!1,height:"auto",background:"#F5F5F5","border-color":"#C4C4C4",padding:"7px","with-hover":!1},{title:e.withCtx(()=>[...u[0]||(u[0]=[])]),default:e.withCtx(()=>[e.createVNode(p,{"max-width":"100%","grid-gap":"7px","grid-template-columns":"repeat(auto-fit, minmax(100%, 1fr))",margin:"0px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(E,P)=>(e.openBlock(),e.createBlock(m,{key:P,color:"blue",height:"auto",text:E.label,"is-toggle":E.valueEq(e.unref(s)),"toggle-mode":!0,inverse:n.inverse,onClick:V=>c(E.valueEq(e.unref(s))?void 0:E)},null,8,["text","is-toggle","inverse","onClick"]))),128))]),_:1})]),_:1})],64)}}}),[["__scopeId","data-v-22f3c81d"]]),f1=["value","label"],m1=z(e.defineComponent({__name:"FilterSelect",props:{models:{type:Array,default:()=>[]},defaultLabel:{type:String,default:"Все"},inverse:{type:Boolean,required:!1,default:!1}},emits:["load"],setup(n,{emit:t}){const o=t,i=xt.Get(),r=e.ref(void 0),s=async c=>{i.replaceF(c,r.value),r.value=c},a=async c=>{c?await s(r.value):await s(void 0),o("load")};return(c,l)=>{const u=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(u,{modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=f=>e.isRef(r)?r.value=f:null),clearable:e.unref(r),placeholder:n.defaultLabel,onChange:a},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.models,(f,m)=>(e.openBlock(),e.createElementBlock("option",{key:m,value:f,label:f.label},null,8,f1))),128))]),_:1},8,["modelValue","clearable","placeholder"])}}}),[["__scopeId","data-v-fec113c5"]]),h1=z(e.defineComponent({__name:"FTSPPanel",setup(n){return e.onBeforeMount(async()=>{}),(t,o)=>(e.openBlock(),e.createElementBlock("div"))}}),[["__scopeId","data-v-963d049b"]]),p1=z(e.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(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"general-block-item",style:e.normalizeStyle({background:n.background,height:n.height,width:n.width,borderColor:n.borderColor,padding:n.padding,margin:n.margin,transform:n.scale&&e.unref(t)?"scale(1.03, 1.03)":""}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[e.createElementVNode("div",{class:"green",style:e.normalizeStyle({width:`${n.ready}`})},null,4),e.createElementVNode("div",{class:"general-block-item-title",style:e.normalizeStyle({fontSize:n.fontSize})},[e.renderSlot(o.$slots,"general-item",{},void 0,!0)],4),e.createElementVNode("div",{class:"tools-icon",style:e.normalizeStyle({display:n.withIcon?"flex":"none"})},[...i[2]||(i[2]=[e.createElementVNode("svg",{class:"icon-del"},[e.createElementVNode("use",{"xlink:href":"#del"})],-1)])],4),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"del",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10"},[e.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"]]),g1={key:0,class:"blur"},y1={style:{display:"flex","justify-content":"center"}},w1=z(e.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(n,{emit:t}){const o=n,i=t,r=o.customClass!==""?o.customClass:"inside-class",s=e.ref(!1),a=e.ref(!1),c=e.ref(!1),l=e.ref(o.close);e.watch(()=>o.close,()=>{a.value=!1});const u=y=>{y.stopPropagation(),y.key==="Escape"&&(o.showSaveDialog?c.value=!0:a.value=!1)};e.watch(a,async()=>{var y,N;await e.nextTick(),a.value?((N=(y=document.getElementById("info-item-opened-content"))==null?void 0:y.querySelector("input"))==null||N.focus(),document.body.addEventListener("keydown",u)):document.body.removeEventListener("keydown",u,!1),a.value===!1&&i("after-close")});const f=()=>{i("click"),a.value=!!o.withOpenWindow,l.value!==o.close&&(a.value=!1,l.value=!l.value)},m=e.computed(()=>o.customClass===""?{width:o.width,minHeight:"40px",height:"auto",maxWidth:o.maxWidth,minWidth:o.minWidth,margin:o.baseBoxMargin}:void 0),p=e.computed(()=>a.value&&o.withOpenWindow),S=e.computed(()=>({background:o.background?o.background:void 0,zIndex:p.value?"2":"0",padding:p.value?"0":o.padding,margin:o.margin,width:p.value?o.openWidth:o.width,height:p.value?o.openHeight:o.height,minHeight:"40px",maxWidth:o.maxWidth,minWidth:o.minWidth,borderColor:s.value||a.value?o.colorSelected:o.borderColor,color:s.value?o.colorSelected:"#343E5C",boxShadow:s.value||a.value?`0px 0px 1px 1px ${o.colorSelected}`:"none",alignItems:p.value?"end":"center",cursor:(o.withHover,"pointer")})),E=e.computed(()=>({height:p.value?"0":"",overflow:o.closeWindowOverflow,width:o.width})),P=e.computed(()=>({height:p.value?"auto":"0"})),V=e.computed(()=>({color:s.value?o.colorSelected:"#343E5C",fill:s.value?o.colorSelected:"#343E5C",background:o.background})),x=()=>{o.showSaveDialog?c.value=!0:a.value=!1},$=async()=>{await i("keyup-enter"),o.close&&(a.value=!1),c.value=!1},b=()=>{a.value=!1,c.value=!1};return(y,N)=>{const I=e.resolveComponent("PString"),j=e.resolveComponent("PButton"),se=e.resolveComponent("PModal"),ze=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",g1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"base-box",style:e.normalizeStyle(e.unref(m)),onClick:N[2]||(N[2]=e.withModifiers(Te=>f(),["prevent","stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["body",e.unref(r)]),style:e.normalizeStyle(e.unref(S)),onMouseenter:N[0]||(N[0]=Te=>n.withHover?s.value=!0:s.value=!1),onMouseleave:N[1]||(N[1]=Te=>s.value=!1)},[e.unref(a)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["close-window",n.customClass]),style:e.normalizeStyle(e.unref(E))},[e.renderSlot(y.$slots,"default",{},void 0,!0)],6)),e.unref(a)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,id:"info-item-opened-content",class:"open-window",style:e.normalizeStyle(e.unref(P))},[e.renderSlot(y.$slots,"open-inside-content",{},void 0,!0)],4)),[[ze,x,void 0,{prevent:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"top-title",style:e.normalizeStyle(e.unref(V))},[e.renderSlot(y.$slots,"title",{},()=>[e.createVNode(I,{string:n.title,"font-size":"10px",padding:"0 0 0 3px",style:e.normalizeStyle({color:e.unref(s)?"#006BB4":"#c4c4c4",transition:"0.2s"})},null,8,["string","style"])],!0)],4)],38)],4),e.createVNode(se,{show:e.unref(c),title:"У вас остались несохраненные изменения, вы уверены что хотите закрыть окно?"},{default:e.withCtx(()=>[e.createElementVNode("div",y1,[e.createVNode(j,{text:"Не сохранять",onClick:b}),e.createVNode(j,{text:"Сохранять",onClick:$})])]),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-999853f7"]]),b1=z(e.defineComponent({__name:"InfoItemSelectButtons",props:{selected:{type:String,required:!0},title:{type:String,required:!0},list:{type:Array,required:!0}},emits:["select","reset"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=s=>{o.value=!o.value,i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(u,{close:e.unref(o),title:n.title,"close-window-overflow":"hidden","with-hover":!0,"with-open-window":!0},{"open-inside-content":e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,f=>(e.openBlock(),e.createBlock(l,{key:f,type:"admin",color:"blue",text:f,onClick:m=>r(f)},null,8,["text","onClick"]))),128)),e.createVNode(l,{type:"admin",color:"blue",text:"Сбросить",onClick:a[0]||(a[0]=f=>r(void 0))})]),default:e.withCtx(()=>[e.createVNode(c,{string:n.selected,"font-size":"14px",width:"100%"},null,8,["string"])]),_:1},8,["close","title"])}}}),[["__scopeId","data-v-973addd1"]]),C1={class:"mainblock"},S1={class:"mainline"},k1=z(e.defineComponent({__name:"LeftRightContainer",props:{leftWidth:{type:String,required:!1,default:"0px"},background:{type:String,required:!1,default:"inherit"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",C1,[e.createElementVNode("div",S1,[e.createElementVNode("div",{class:"mainblock-left",style:e.normalizeStyle({minWidth:n.leftWidth,maxWidth:n.leftWidth,background:n.background,display:n.leftWidth!=="0px"?"block":"none"})},[e.renderSlot(t.$slots,"left",{},void 0,!0)],4),e.createElementVNode("div",{class:"mainblock-right",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"right",{},void 0,!0)],4)])]))}}),[["__scopeId","data-v-42fa7104"]]),Qa=z(e.defineComponent({__name:"IconSearch",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#search"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"search",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),x1={class:"search-list"},E1=["onClick"],Ya=z(e.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(n,{emit:t}){const o=t,i=n,r=e.ref(i.modelValue),s=e.ref([]);async function a(){o("input",r.value),await c()}async function c(){i.searchFunc&&(s.value=await i.searchFunc(r.value))}async function l(u){r.value="",o("select",u)}return(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle({width:n.width})},[e.createVNode(Je,{modelValue:e.unref(r),"onUpdate:modelValue":f[0]||(f[0]=m=>e.isRef(r)?r.value=m:null),placeholder:"Найти",onInput:a},{right:e.withCtx(()=>[e.createVNode(Qa,{size:"24px"})]),_:1},8,["modelValue"]),e.unref(r)&&e.unref(r).length>=2?(e.openBlock(),e.createElementBlock("div",{key:0,class:"result",style:e.normalizeStyle({maxHeight:n.maxHeightResultList,zIndex:n.zIndexResultList,boxShadow:n.boxShadowResultList})},[e.createElementVNode("ul",x1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),m=>(e.openBlock(),e.createElementBlock("li",{key:m.value,onClick:p=>l(m)},e.toDisplayString(m.label),9,E1))),128))])],4)):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-d02c66ef"]]),B1=z(e.defineComponent({__name:"PhoneForm",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n){const t=e.useModel(n,"modelValue"),o=async()=>{};return(i,r)=>{const s=e.resolveComponent("PInput");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{modelValue:t.value.number,"onUpdate:modelValue":r[0]||(r[0]=a=>t.value.number=a),onBlur:o},null,8,["modelValue"]),e.createVNode(s,{modelValue:t.value.description,"onUpdate:modelValue":r[1]||(r[1]=a=>t.value.description=a),onBlur:o},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-8479448f"]]),V1={style:{display:"flex","justify-content":"center",width:"100%"}},N1={class:"pag-number"},$1={class:"pag-ul"},T1={key:2},P1=z(e.defineComponent({__name:"PPagination",props:{showConfirm:{type:Boolean,default:!1},justifyContent:{type:String,default:"center"},store:{type:Object,required:!0}},setup(n){const t=n,o=m=>m?"active":"neutral",i=m=>m?"not-active":"neutral",r=e.ref(ra),s=e.ref(!1),a=e.ref(!1);r.value.count=t.store.Count.value,e.watch(t.store.Count,()=>{r.value.count=t.store.Count.value});const c=async m=>{if(m!==r.value.curPage&&(m<1&&(m=1),m>r.value.pagesCount()&&(m=r.value.pagesCount()),!t.showConfirm))return await l(m)},l=async(m,p)=>{r.value.setCurPage(m),xt.Get().p.offset=(m-1)*r.value.limit,await t.store.FTSP(),f()},u=e.computed(()=>{const m=r.value.pagesCount();return m<8?Dt.GenerateNumsRange(2,m-1).filter(p=>p<m&&p>1):Dt.GenerateNumsRange(r.value.curPage-2,r.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 e.onBeforeUnmount(()=>{xt.Get().p.drop()}),(m,p)=>{const S=e.resolveComponent("ArrowLeft"),E=e.resolveComponent("PButton"),P=e.resolveComponent("DoubleArrowLeft"),V=e.resolveComponent("EllipsisSvg"),x=e.resolveComponent("DoubleArrowRight"),$=e.resolveComponent("ArrowRight");return e.openBlock(),e.createElementBlock("div",V1,[e.createElementVNode("div",{class:"pag-container",style:e.normalizeStyle({justifyContent:n.justifyContent})},[e.createElementVNode("div",N1,[e.createVNode(E,{skin:"pag",type:i(e.unref(r).curPage===1),onClick:p[0]||(p[0]=b=>c(e.unref(r).curPage-1))},{default:e.withCtx(()=>[e.createVNode(S)]),_:1},8,["type"]),e.createElementVNode("ul",$1,[e.createElementVNode("li",null,[e.createVNode(E,{skin:"pag",type:o(e.unref(r).curPage===1),text:"1",onClick:p[1]||(p[1]=b=>c(1))},null,8,["type"])]),e.unref(r).pagesCount()>8&&e.unref(r).curPage>4?(e.openBlock(),e.createElementBlock("li",{key:0,onMouseenter:p[3]||(p[3]=b=>s.value=!0),onMouseleave:p[4]||(p[4]=b=>s.value=!1)},[e.createVNode(E,{skin:"pag",type:"neutral",onClick:p[2]||(p[2]=b=>c(e.unref(r).curPage-5))},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(P,{key:0})):(e.openBlock(),e.createBlock(V,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),b=>(e.openBlock(),e.createElementBlock("li",{key:b},[e.createVNode(E,{skin:"pag",type:o(b===e.unref(r).curPage),text:b,onClick:y=>c(b)},null,8,["type","text","onClick"])]))),128)),e.unref(r).pagesCount()>=8&&e.unref(r).curPage<e.unref(r).pagesCount()-3?(e.openBlock(),e.createElementBlock("li",{key:1,onMouseenter:p[6]||(p[6]=b=>a.value=!0),onMouseleave:p[7]||(p[7]=b=>a.value=!1)},[e.createVNode(E,{skin:"pag",type:"neutral",onClick:p[5]||(p[5]=b=>c(e.unref(r).curPage+5))},{default:e.withCtx(()=>[e.unref(a)?(e.openBlock(),e.createBlock(x,{key:0})):(e.openBlock(),e.createBlock(V,{key:1}))]),_:1})],32)):e.createCommentVNode("",!0),e.unref(r).pagesCount()>1?(e.openBlock(),e.createElementBlock("li",T1,[e.createVNode(E,{skin:"pag",type:o(e.unref(r).pagesCount()===e.unref(r).curPage),text:e.unref(r).pagesCount(),onClick:p[8]||(p[8]=b=>c(e.unref(r).pagesCount()))},null,8,["type","text"])])):e.createCommentVNode("",!0)]),e.createVNode(E,{skin:"pag",type:i(e.unref(r).curPage===e.unref(r).pagesCount()),onClick:p[9]||(p[9]=b=>c(e.unref(r).curPage+1))},{default:e.withCtx(()=>[e.createVNode($)]),_:1},8,["type"])])],4)])}}}),[["__scopeId","data-v-57f15ca8"]]),M1=z(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(o.modelValue),s=e.ref();let a=Ki.SearchModel();e.watch(()=>o.focus,()=>{o.focus&&setTimeout(()=>{s.value.focus(),r.value=""},500)});const c=async f=>{if(f.length<2)return;s.value.activated=!0,a=Ki.SearchModel(),a.searchObjects=[],a.query=f,a.key=o.keyValue;const m=a.searchGroups.find(p=>p.key===o.keyValue);return m&&(a.searchGroup=m),await ma.Search.Search(a),a.searchObjects},l=async f=>{i("select",f),r.value=""},u=f=>{i("input",f),f.length===0&&i("input","")};return(f,m)=>(e.openBlock(),e.createBlock(Ya,{ref_key:"searchForm",ref:s,modelValue:e.unref(r),"onUpdate:modelValue":m[0]||(m[0]=p=>e.isRef(r)?r.value=p:null),"max-height-result-list":n.maxHeightResultList,"z-index-result-list":n.zIndexResultList,"box-shadow-result-list":n.boxShadowResultList,width:n.width,"value-key":"label",style:{width:"100%","margin-right":"10px"},placeholder:n.placeholder,"search-func":c,"trigger-on-focus":n.showSuggestions,suggestions:e.unref(a).searchObjects,onSelect:l,onInput:u},null,8,["modelValue","max-height-result-list","z-index-result-list","box-shadow-result-list","width","placeholder","trigger-on-focus","suggestions"]))}}),[["__scopeId","data-v-46a1d0c0"]]),I1={class:"mainblock-body"},R1={class:"mainblock-footer"},A1=z(e.defineComponent({__name:"ResearcheContainer",props:{background:{type:String,required:!1,default:"inherit"},padding:{type:String,required:!1,default:"0px 10px"}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({background:n.background,padding:n.padding})},[e.createElementVNode("div",{class:"mainblock-header",style:e.normalizeStyle({background:n.background})},[e.renderSlot(t.$slots,"header",{},void 0,!0)],4),e.createElementVNode("div",I1,[e.renderSlot(t.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",R1,[e.renderSlot(t.$slots,"footer",{},void 0,!0)])],4))}}),[["__scopeId","data-v-367c3367"]]),z1={class:"right-slider-content"},D1={class:"right-slider-content-header"},F1={class:"right-slider-content-box"},O1={class:"right-slider-button"},L1=z(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(!1);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>{const l=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",{class:"right-slider",style:e.normalizeStyle({marginRight:e.unref(r)?`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`:"0",width:n.sliderOnWidth})},[e.createElementVNode("div",{class:"click-line",onClick:c[0]||(c[0]=u=>s(!e.unref(r)))},[e.unref(r)?(e.openBlock(),e.createBlock(l,{key:0,string:n.titleClose,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"])):e.createCommentVNode("",!0),e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:1,string:n.titleOpen,"font-size":"16px",padding:"0",color:"#343E5C"},null,8,["string"]))]),e.createElementVNode("div",z1,[e.createElementVNode("div",D1,[e.renderSlot(a.$slots,"header",{},void 0,!0)]),e.createElementVNode("div",F1,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",O1,[e.renderSlot(a.$slots,"button",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-262b1c53"]]),_1={class:"mainblock"},H1={class:"body-block"},U1={class:"tab-block"},v1=z(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(!1),s=e.ref(window.matchMedia("(max-width: 768px)").matches),a=l=>{i("toggle",l)},c=e.ref(!1);return e.onBeforeMount(async()=>{window.addEventListener("resize",()=>{switch(o.mobileWidth){case"1330px":return s.value=window.matchMedia("(max-width: 1330px)").matches;case"1215px":return s.value=window.matchMedia("(max-width: 1215px)").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}),r.value=!0}),(l,u)=>(e.openBlock(),e.createElementBlock("div",_1,[e.createElementVNode("div",{class:"slider-block",style:e.normalizeStyle({marginRight:e.unref(s)?n.isToggle?"49px":`calc(49px - ${n.sliderOnWidth})`:n.isToggle?n.sliderOffWidth:`calc(${n.sliderOffWidth} - ${n.sliderOnWidth})`,width:n.sliderOnWidth,minHeight:n.sliderOffWidth,height:n.isToggle?"auto":"100px"})},[e.createElementVNode("div",{class:"slider-icon",style:e.normalizeStyle({border:n.isToggle?"1px solid #379FFF":"1px solid #00B5A4",background:n.isToggle?"#ffffff":"#C7ECEA"}),onClick:u[0]||(u[0]=f=>a(!n.isToggle)),onMouseenter:u[1]||(u[1]=f=>c.value=!0),onMouseleave:u[2]||(u[2]=f=>c.value=!1)},[e.createElementVNode("div",{class:"icon-block",style:e.normalizeStyle({transform:e.unref(c)?n.isToggle?"rotate(-225deg) scale(1.2, 1.2)":"rotate(0deg) scale(1.2, 1.2)":n.isToggle?"rotate(-225deg)":"rotate(0deg)",fill:n.isToggle?"#379FFF":"#00B5A4"})},[e.renderSlot(l.$slots,"icon",{},void 0,!0)],4)],36),e.createElementVNode("div",{class:"slider-info",style:e.normalizeStyle({width:`calc(${n.sliderOnWidth} - ${n.sliderOffWidth})`})},[e.renderSlot(l.$slots,"slider-body",{},void 0,!0)],4)],4),e.createElementVNode("div",H1,[e.renderSlot(l.$slots,"body",{},void 0,!0)]),e.createElementVNode("div",U1,[e.renderSlot(l.$slots,"tabs",{},void 0,!0)])]))}}),[["__scopeId","data-v-0cfd77ce"]]),q1=["label","value"],j1=z(e.defineComponent({__name:"SelectValueType",props:{selectedType:{type:String,required:!0}},emits:["select"],setup(n,{emit:t}){const o={[We.String]:"Текстовый ответ",[We.Text]:"Развёрнутый текстовый ответ",[We.Number]:"Числовой ответ",[We.Date]:"Ответ в виде даты",[We.Radio]:"Выбор одного из вариантов",[We.Set]:"Выбор нескольких вариантов",[We.File]:"Ответ в виде файла",[We.MatrixRadio]:"Матрица с одним выбором",[We.MatrixSet]:"Матрица с несколькими выборами"},i=t,r=s=>{i("select",s)};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PSelect");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(c,{string:"Выберите вид ответа:","font-size":"14px",padding:"0","justify-content":"left",margin:"10px 0"}),e.createVNode(l,{"model-value":n.selectedType,placeholder:"Вид ответа",onChange:r},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(u,f)=>e.createElementVNode("option",{key:u,label:u,value:f},null,8,q1)),64))]),_:1},8,["model-value"])],64)}}}),[["__scopeId","data-v-36a59e2b"]]),W1=["label","value"],G1=z(e.defineComponent({__name:"SortList",props:{maxWidth:{type:[Number,String],default:250}},emits:["load"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=e.ref();e.onBeforeMount(()=>{o.value=!0,r.value=dn.GetDefault()});const s=async c=>{r.value=c??dn.GetDefault(),i("load")},a=async c=>{await s(c)};return(c,l)=>{var f;const u=e.resolveComponent("PSelect");return e.unref(o)?(e.openBlock(),e.createBlock(u,{key:0,modelValue:e.unref(r),"onUpdate:modelValue":l[0]||(l[0]=m=>e.isRef(r)?r.value=m:null),"popper-append-to-body":!1,clearable:!((f=e.unref(r))!=null&&f.default),"value-key":"label",onChange:a,onClear:l[1]||(l[1]=m=>a())},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dn).Get(),(m,p)=>(e.openBlock(),e.createElementBlock("option",{key:p,label:m.label,value:m},null,8,W1))),128))]),_:1},8,["modelValue","clearable"])):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-dbb21f2f"]]),Q1=["label","value"],Y1=z(e.defineComponent({__name:"SortSelect",props:{maxWidth:{type:[Number,String],default:250},ftsp:{type:Object,required:!1}},emits:["load"],setup(n,{emit:t}){const o=n,i=t,r=e.computed(()=>o.ftsp??xt.Get()),s=e.ref();e.onBeforeMount(()=>{s.value=dn.GetDefault()});const a=async l=>{l||(s.value=dn.GetDefault()),r.value.setSortModel(s.value),r.value.p.drop(),i("load")},c=async l=>{await a(l)};return(l,u)=>{var m;const f=e.resolveComponent("PSelect");return e.openBlock(),e.createBlock(f,{modelValue:e.unref(s),"onUpdate:modelValue":u[0]||(u[0]=p=>e.isRef(s)?s.value=p:null),"popper-append-to-body":!1,clearable:!((m=e.unref(s))!=null&&m.default),"value-key":"label",onChange:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dn).Get(),(p,S)=>(e.openBlock(),e.createElementBlock("option",{key:S,label:p.label,value:p},null,8,Q1))),128))]),_:1},8,["modelValue","clearable"])}}}),[["__scopeId","data-v-1e73245e"]]),X1={class:"switch-container"},Z1={class:"line"},J1={class:"line"},K1=z(e.defineComponent({__name:"Switch3Pos",props:{firstModel:{type:Object,required:!0},secondModel:{type:Object,required:!0},defaultLabel:{type:String,default:"Все"}},emits:["load"],setup(n,{emit:t}){const o=n,i={background:"inherit",border:"1px solid #c4c4c4"},r=()=>o.firstModel.valueEq(u.value)?void 0:i,s=()=>u.value?i:void 0,a=()=>o.secondModel.valueEq(u.value)?void 0:i,c=m=>{var S;return{color:(S=u.value)!=null&&S.valueEq(m)?"#006bb4":"#B0A4C0"}},l=t,u=e.ref(void 0),f=async m=>{var p;(p=u.value)!=null&&p.valueEq(m)||(u.value=m,l("load"))};return(m,p)=>{const S=e.resolveComponent("PString");return e.openBlock(),e.createElementBlock("div",X1,[e.createElementVNode("div",Z1,[e.createVNode(S,{string:n.firstModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.firstModel)),onClick:p[0]||(p[0]=E=>f(n.firstModel))},null,8,["string","style"]),e.createVNode(S,{string:"Все","font-size":"12px",padding:"0",style:e.normalizeStyle(c()),onClick:p[1]||(p[1]=E=>f())},null,8,["style"]),e.createVNode(S,{string:n.secondModel.label,"font-size":"12px",padding:"0",style:e.normalizeStyle(c(n.secondModel)),onClick:p[2]||(p[2]=E=>f(n.secondModel))},null,8,["string","style"])]),e.createElementVNode("div",J1,[e.createElementVNode("div",{class:e.normalizeClass(["switch-knob1",{active:n.firstModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(r()),onClick:p[3]||(p[3]=E=>f(n.firstModel))},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob2",{active:!e.unref(u)}]),style:e.normalizeStyle(s()),onClick:p[4]||(p[4]=E=>f())},null,6),e.createElementVNode("div",{class:e.normalizeClass(["switch-knob3",{active:n.secondModel.valueEq(e.unref(u))}]),style:e.normalizeStyle(a()),onClick:p[5]||(p[5]=E=>f(n.secondModel))},null,6),p[6]||(p[6]=e.createElementVNode("div",{class:"switch-axis"},null,-1)),p[7]||(p[7]=e.createElementVNode("div",{class:"switch-axis-dash1"},null,-1)),p[8]||(p[8]=e.createElementVNode("div",{class:"switch-axis-dash2"},null,-1)),p[9]||(p[9]=e.createElementVNode("div",{class:"switch-axis-dash3"},null,-1))])])}}}),[["__scopeId","data-v-ecff678c"]]),ey={},ty={class:"flex"};function ny(n,t){return e.openBlock(),e.createElementBlock("div",ty,[e.renderSlot(n.$slots,"default",{},void 0,!0)])}const oy=z(ey,[["render",ny],["__scopeId","data-v-5023d414"]]),iy=z(e.defineComponent({__name:"ToggleInfoItem",props:{title:{type:String,required:!0},content:{type:String,required:!0}},emits:["submit"],setup(n,{emit:t}){const o=e.ref(!1),i=t,r=async()=>{i("submit"),o.value=!o.value};return(s,a)=>{const c=e.resolveComponent("PString"),l=e.resolveComponent("PButton"),u=e.resolveComponent("GridContainer"),f=e.resolveComponent("InfoItem");return e.openBlock(),e.createBlock(f,{title:n.title,icon:"edit-title","with-hover":!0,close:e.unref(o),width:"100%",onKeyupEnter:r},{"open-inside-content":e.withCtx(()=>[e.createVNode(u,{"custom-class":"grid"},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},void 0,!0),e.createVNode(l,{type:"admin",color:"blue",text:"Сохранить",onClick:r})]),_:3})]),default:e.withCtx(()=>[n.content.length>0?(e.openBlock(),e.createBlock(c,{key:0,string:n.content},null,8,["string"])):(e.openBlock(),e.createBlock(c,{key:1,string:"Введите данные",color:"#B0A4C0"}))]),_:3},8,["title","close"])}}}),[["__scopeId","data-v-65abc352"]]),ry={class:"top-slider-content"},sy={class:"center"},ay=z(e.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(n,{emit:t}){const o=n,i=t,r=e.ref(!0);e.watch(()=>o.toggle,()=>{r.value=!r.value});const s=a=>{r.value=!r.value,i("toggle",a)};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:[c[0]||(c[0]=e.withModifiers(l=>r.value=!0,["prevent"])),c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))]})),e.createElementVNode("div",{class:"top-slider",style:e.normalizeStyle({marginTop:e.unref(r)?`calc(${n.sliderOffHeight} - ${n.sliderOnHeight})`:"0",height:n.sliderOnHeight}),onClick:c[3]||(c[3]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",ry,[e.createElementVNode("div",sy,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]),e.createElementVNode("div",{class:"click-line",style:e.normalizeStyle({height:n.sliderOffHeight}),onClick:c[2]||(c[2]=l=>s(!e.unref(r)))},[e.renderSlot(a.$slots,"title",{},void 0,!0)],4)],4)],64))}}),[["__scopeId","data-v-683131f5"]]);function ly(n){n.component("PageNotFound",ea),n.component("AdaptiveContainer",Qg),n.component("AdaptiveContainerHorizontal",Zg),n.component("CarouselImages",r1),n.component("ContextWindow",s1),n.component("DropList",c1),n.component("FilterCheckbox",d1),n.component("FiltersButtonsSelect",u1),n.component("FilterSelect",m1),n.component("FTSPPanel",h1),n.component("GeneralItem",p1),n.component("GridContainer",Ga),n.component("InfoItem",w1),n.component("InfoItemSelectButtons",b1),n.component("LeftRightContainer",k1),n.component("PAutocomplete",Ya),n.component("PhoneForm",B1),n.component("PPagination",P1),n.component("RemoteSearch",M1),n.component("ResearcheContainer",A1),n.component("RightSliderContainer",L1),n.component("RightTabsContainer",v1),n.component("SelectValueType",j1),n.component("SortList",G1),n.component("SortSelect",Y1),n.component("Switch3Pos",K1),n.component("ThemeWrapper",oy),n.component("ToggleInfoItem",iy),n.component("TopSliderContainer",ay)}const cy=z(e.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(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#download"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"download",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),dy=z(e.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(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#filter"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"filter",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),uy=z(e.defineComponent({__name:"IconArrowLeft",props:{size:{type:String,default:""},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e.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"]]),fy=z(e.defineComponent({__name:"IconCheckDefault",props:{size:{type:String,default:"22px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#check_on"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"check_on",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"]]),Xa=z(e.defineComponent({__name:"IconClose",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#close"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"close",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},[e.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"]]),my=z(e.defineComponent({__name:"IconEdit",props:{size:{type:String,default:""},margin:{type:String,default:"0 15px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#edit"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"edit",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e.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"}),e.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"]]),hy=z(e.defineComponent({__name:"IconEmail",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#email"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"email",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),py=z(e.defineComponent({__name:"IconMove",props:{size:{type:String,default:"24px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#icon-move"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"icon-move",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},[e.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"]]),gy=z(e.defineComponent({__name:"IconPhone",props:{size:{type:String,default:""},margin:{type:String,default:"0 10px 0 0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#phone"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"phone",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.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"]]),yy=z(e.defineComponent({__name:"IconSelectArrow",props:{size:{type:String,default:"20px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size})},[...o[0]||(o[0]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])],6)),o[1]||(o[1]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-down",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},[e.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"}),e.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"]]),wy=z(e.defineComponent({__name:"ArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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-46c690c8"]]),by=z(e.defineComponent({__name:"ArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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-b688738b"]]),Cy=z(e.defineComponent({__name:"DoubleArrowLeft",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-left"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-left",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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-bd131770"]]),Sy=z(e.defineComponent({__name:"DoubleArrowRight",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#double-arrow-right"},null,-1)])],38)),i[3]||(i[3]=e.createElementVNode("svg",{width:"0",height:"0",class:"hidden"},[e.createElementVNode("symbol",{id:"double-arrow-right",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.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-db5832a2"]]),ky=z(e.defineComponent({__name:"EllipsisSvg",props:{color:{type:String,default:""},hoverColor:{type:String,default:""},size:{type:String,default:"16px"},margin:{type:String,default:"0"},iconClass:{type:String,required:!1,default:""}},setup(n){const t=e.ref(!1);return(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",n.iconClass]),style:e.normalizeStyle({margin:n.margin,width:n.size,height:n.size,fill:n.hoverColor?e.unref(t)?n.hoverColor:n.color:(e.unref(t),n.color)}),onMouseenter:i[0]||(i[0]=r=>t.value=!0),onMouseleave:i[1]||(i[1]=r=>t.value=!1)},[...i[2]||(i[2]=[e.createElementVNode("use",{"xlink:href":"#ellipsis"},null,-1)])],38)),i[3]||(i[3]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-5abed3e4><symbol id="ellipsis" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" data-v-5abed3e4><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-5abed3e4></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-5abed3e4></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-5abed3e4></path></symbol></svg>',1))],64))}}),[["__scopeId","data-v-5abed3e4"]]);function xy(n){n.component("IconDownload",cy),n.component("IconFilter",dy),n.component("ArrowLeft",wy),n.component("ArrowRight",by),n.component("DoubleArrowLeft",Cy),n.component("DoubleArrowRight",Sy),n.component("EllipsisSvg",ky),n.component("IconArrowLeft",uy),n.component("IconCheckDefault",fy),n.component("IconClose",Xa),n.component("IconEdit",my),n.component("IconEmail",hy),n.component("IconMove",py),n.component("IconPhone",gy),n.component("IconSearch",Qa),n.component("IconSelectArrow",yy)}const Ey=e.defineComponent({name:"CollapseContainer",props:{initActiveIdx:{type:Number,default:0}},setup(n){const t=e.ref(n.initActiveIdx),o=i=>{t.value=i};return e.watch(()=>n.initActiveIdx,()=>{o(n.initActiveIdx)}),{changeActiveId:o,activeIdx:t}}});function By(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(n.$slots,"default",{activeIdx:n.activeIdx,changeActiveId:n.changeActiveId})])}const Vy=z(Ey,[["render",By]]),Ny=e.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(n,{emit:t}){const o=e.ref(n.activeId==="0"),i=()=>{o.value=!o.value,t("changeActiveId",n.tabId)};return e.onUpdated(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!0)}),e.onBeforeMount(()=>{n.activeId&&n.activeId!==n.tabId&&(o.value=!1)}),{collapsed:o,handleItemClick:i}}}),$y=["for"],Ty={class:"inside-icon"};function Py(n,t,o,i,r,s){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"tab",style:e.normalizeStyle({margin:n.margin,height:n.isCollaps&&n.collapsed?"60px":"","box-shadow":n.selectable&&n.activeId===n.tabId?"0px 0px 1px 2px #1979cf":""})},[n.isCollaps&&n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"icon-arrow",onClick:t[0]||(t[0]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[3]||(t[3]=[e.createElementVNode("use",{"xlink:href":"#arrow-down"},null,-1)])])):n.isCollaps&&!n.collapsed?(e.openBlock(),e.createElementBlock("svg",{key:1,class:"icon-arrow",onClick:t[1]||(t[1]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[...t[4]||(t[4]=[e.createElementVNode("use",{"xlink:href":"#arrow-up"},null,-1)])])):e.createCommentVNode("",!0),e.createElementVNode("label",{for:n.tabId,onClick:t[2]||(t[2]=(...a)=>n.handleItemClick&&n.handleItemClick(...a))},[e.createElementVNode("div",{style:e.normalizeStyle({cursor:n.isCollaps?"pointer":"default",background:n.changeColor?n.background:n.backgroundAttention,padding:n.padding,borderRadius:"5px"}),class:"tab-name"},[e.createElementVNode("div",Ty,[e.renderSlot(n.$slots,"icon",{},void 0,!0)]),e.createElementVNode("div",{class:"title-in",style:e.normalizeStyle({marginRight:n.isCollaps?"50px":"0",width:n.isCollaps?"calc(100% - 50px)":"100%"})},[e.renderSlot(n.$slots,"inside-title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],4),e.createElementVNode("div",{class:e.normalizeClass(["tools-bar",{"hidden-part":n.showToolsOnHover}])},[e.renderSlot(n.$slots,"tools",{},void 0,!0)],2)],4)],8,$y),e.createElementVNode("div",{style:e.normalizeStyle({maxHeight:n.isCollaps?"":"1000000vh",background:n.changeColor?n.background:n.backgroundAttention}),class:e.normalizeClass(n.collapsed?"tab-content-down":"tab-content-up")},[e.renderSlot(n.$slots,"default",{},void 0,!0)],6)],4),t[5]||(t[5]=e.createStaticVNode('<svg width="0" height="0" class="hidden" data-v-37d79495><symbol id="arrow-down" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="currentColor" data-v-37d79495></path></symbol><symbol id="arrow-up" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" data-v-37d79495><path d="M15 14L10 9L5 14L3 13L10 6L17 13L15 14Z" fill="currentColor" data-v-37d79495></path></symbol></svg>',1))],64)}const My=z(Ny,[["render",Py],["__scopeId","data-v-37d79495"]]),Iy={class:"tab"},Ry={class:"rotate"},Ay=z(e.defineComponent({__name:"VerticalCollapseContainer",setup(n){const t=e.ref(!1),o=async()=>{t.value=!t.value};return(i,r)=>{const s=e.resolveComponent("ArrowRight"),a=e.resolveComponent("ArrowLeft");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Iy,[e.renderSlot(i.$slots,"main",{},void 0,!0),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"20px",transition:"0.3s"}),class:"left"},[e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"100%":"0",transition:"0.3s"}),class:"left-content"},[e.renderSlot(i.$slots,"inside-content-left",{},void 0,!0)],4),e.createElementVNode("div",{class:"arrow-bar",onClick:o},[e.createElementVNode("div",Ry,[e.renderSlot(i.$slots,"inside-title",{},void 0,!0)]),e.unref(t)?(e.openBlock(),e.createBlock(s,{key:0,"icon-class":"icon-arrow"})):(e.openBlock(),e.createBlock(a,{key:1,"icon-class":"icon-arrow"}))])],4),e.createElementVNode("div",{style:e.normalizeStyle({width:e.unref(t)?"50%":"100%",transition:"0.3s"}),class:"right"},[e.renderSlot(i.$slots,"inside-content-right",{},void 0,!0)],4)]),e.createVNode(a),e.createVNode(s)],64)}}}),[["__scopeId","data-v-4ccaade5"]]),zy={class:"add-block_body"},Dy=z(e.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(n){return(t,o)=>{const i=e.resolveComponent("PSticky");return e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",zy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4)}}}),[["__scopeId","data-v-338720bc"]]),Fy=z(e.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(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"add-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-b2b43a38"]]),Oy={class:"add-block_body"},Ly=z(e.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(n){return(t,o)=>{const i=e.resolveComponent("PSticky"),r=e.resolveComponent("PContainer");return e.openBlock(),e.createBlock(r,{background:n.background,margin:n.margin,padding:n.padding},{default:e.withCtx(()=>[e.createVNode(i,{top:n.top,"z-index":n.zIndex},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},void 0,!0)]),_:3},8,["top","z-index"]),e.createElementVNode("div",Oy,[e.renderSlot(t.$slots,"default",{},void 0,!0)])]),_:3},8,["background","margin","padding"])}}}),[["__scopeId","data-v-9464e4a8"]]),_y={class:"select-dialog"},Hy={class:"select-dialog-header"},Uy={class:"select-dialog-title"},vy={class:"select-dialog-content"},qy={class:"select-dialog-actions"},Za=z(e.defineComponent({__name:"PAddDialog",props:e.mergeModels({title:{type:String,default:""},store:{type:Object,required:!0}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["add","close"],["update:modelValue"]),setup(n,{expose:t,emit:o}){const i=n,r=o,s=e.useModel(n,"modelValue"),a=e.ref([]),c=C.Ripple,l=C.ClosePopup,u=async()=>{await i.store.GetOptions(),a.value=i.store.Options},f=async V=>{await i.store.Get(V.value);const x=i.store.Item,$=new x.constructor(x);r("add",$),m()},m=()=>{r("close"),s.value=!1},p=V=>{V||r("close")},S=()=>{s.value&&m()},E=()=>{s.value=!s.value},P=async()=>{await e.nextTick();const V=document.querySelector(".select-dialog-content .q-item");V&&"focus"in V&&V.focus()};return t({opened:s,toggle:E}),e.onBeforeMount(u),(V,x)=>(e.openBlock(),e.createBlock(un,{modelValue:s.value,"onUpdate:modelValue":[x[0]||(x[0]=$=>s.value=$),p],position:"top",onKeydown:e.withKeys(S,["escape"]),onShow:P},{default:e.withCtx(()=>[e.createElementVNode("div",_y,[e.createElementVNode("div",Hy,[e.createElementVNode("div",Uy,e.toDisplayString(n.title),1),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",dense:"",round:"",size:"sm"},null,512),[[e.unref(l)]])]),e.createElementVNode("div",vy,[e.createVNode(e.unref(C.QList),{bordered:"",separator:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),$=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(C.QItem),{key:$.value,clickable:"",class:"q-px-md q-py-sm",onClick:b=>f($)},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QItemSection),null,{default:e.withCtx(()=>[e.createVNode(e.unref(C.QItemLabel),{class:"text-body1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["onClick"])),[[e.unref(c)]])),128))]),_:1})]),e.createElementVNode("div",qy,[e.withDirectives(e.createVNode(ne,{flat:"",label:"Закрыть",size:"sm",color:"negative"},null,512),[[e.unref(l)]])])])]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-9f6a2f5b"]]),jy=["src"],Wy={key:0,class:"header-row"},Gy={class:"title-wrapper"},Qy={key:0,class:"title-icon"},Yy={class:"title-text"},Xy={class:"text-subtitle1 text-weight-medium"},Zy={key:0,class:"caption-row"},Jy={class:"text-caption text-grey-6"},Ky=["innerHTML"],e0={key:1,class:"card-footer"},Ja=z(e.defineComponent({__name:"PCard",props:{height:{type:String,default:"auto"},maxHeight:{type:String,default:"none"},img:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},caption:{type:String,default:""},icon:{type:String,default:""},isMain:{type:Boolean,default:!1},noPointer:{type:Boolean,default:!1},noHover:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:t}){const o=e.ref(null),i=n,r=t,s=e.computed(()=>i.img?i.isMain?"365px":"200px":"0"),a=c=>{i.noPointer||r("click",c)};return(c,l)=>(e.openBlock(),e.createBlock(e.unref(C.QCard),{class:e.normalizeClass(["card",{"no-hover":n.noHover,"cursor-pointer":!n.noPointer}]),flat:"",bordered:"",style:e.normalizeStyle({height:n.height}),onClick:a},{default:e.withCtx(()=>[n.img?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-container",style:e.normalizeStyle({height:s.value})},[e.createElementVNode("img",{class:"image-img",src:n.img,alt:"image",style:e.normalizeStyle({height:s.value})},null,12,jy)],4)):e.createCommentVNode("",!0),e.createVNode(e.unref(C.QCardSection),{class:"card-content",style:e.normalizeStyle({maxHeight:n.maxHeight})},{default:e.withCtx(()=>[n.title||c.$slots.title||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Wy,[e.createElementVNode("div",Gy,[n.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Qy,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(e.unref(C.QIcon),{name:n.icon,size:"20px",color:"primary"},null,8,["name"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Yy,[e.renderSlot(c.$slots,"title",{},()=>[e.createElementVNode("span",Xy,e.toDisplayString(n.title),1)],!0)])]),c.$slots.caption||n.caption?(e.openBlock(),e.createElementBlock("div",Zy,[e.renderSlot(c.$slots,"caption",{},()=>[e.createElementVNode("span",Jy,e.toDisplayString(n.caption),1)],!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.title||c.$slots.title?(e.openBlock(),e.createBlock(e.unref(C.QSeparator),{key:1,class:"header-separator"})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"content-wrapper"},[e.renderSlot(c.$slots,"default",{},()=>[n.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.isMain?"main-content":"preview-content"),innerHTML:n.content},null,10,Ky)):e.createCommentVNode("",!0)],!0)],512)]),_:3},8,["style"]),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",e0,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["style","class"]))}}),[["__scopeId","data-v-b586d556"]]),t0={key:0,class:"list-title"},n0={class:"draggable-item"},o0={class:"drag-handle"},i0={class:"item-content"},r0={key:0,class:"item-actions"},s0={class:"item-content"},a0={key:0,class:"item-actions"},l0={key:4,class:"add-button-container"},c0=e.defineComponent({__name:"PCrudList",props:{sortable:{type:Boolean,default:!0},showAdd:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},title:{type:String,required:!0,default:""},store:{type:D.H.BaseStore,default:void 0},addFunc:{type:Function,default:void 0},addToList:{type:Boolean,default:!0},removeFromList:{type:Boolean,default:!0},margin:{type:String,required:!0,default:"0"},background:{type:String,required:!0,default:"var(--background-color)"}},emits:["add","remove","update","sort"],setup(n,{emit:t}){e.useCssVars(l=>({v2a47a50e:n.background}));const o=n,i=t,r=async()=>{const l=o.addFunc?await o.addFunc():void 0;l&&(typeof l.order<"u"&&(l.order=o.list.length),o.addToList&&o.store&&o.store.AppendToAll(l),o.store&&await o.store.Create(l)),await c(),i("add",l)},s=async l=>{o.removeFromList&&D.H.Classes.RemoveFromClassById(l,o.list),o.store&&await o.store.Remove(l),await c(),i("remove",l)},a=async l=>{o.store&&await o.store.Update(l),i("update",l)},c=async()=>{!o.sortable||o.list.length===0||typeof o.list[0].order>"u"||(D.H.Sorter.Sort(o.list),o.store&&await o.store.UpdateMany(o.list),i("sort"))};return(l,u)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps(l.$attrs,{style:{margin:n.margin,boxSizing:"border-box"},class:"ordered-list"}),[n.title?(e.openBlock(),e.createElementBlock("div",t0,e.toDisplayString(n.title),1)):e.renderSlot(l.$slots,"title",{},void 0,!0,1),n.sortable?(e.openBlock(),e.createBlock(e.unref(Ci),{key:2,class:"draggable-list",list:n.list,"item-key":"id",handle:".drag-handle",onEnd:c},{item:e.withCtx(({element:f,index:m})=>[e.createElementVNode("div",n0,[e.createElementVNode("div",o0,[e.createVNode(e.unref(C.QIcon),{name:"drag_indicator",class:"drag-icon"})]),e.createElementVNode("div",i0,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Je,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",r0,[e.createVNode(ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)])]),_:3},8,["list"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(n.list,(f,m)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"static-item",style:e.normalizeStyle({background:n.background})},[e.createElementVNode("div",s0,[e.renderSlot(l.$slots,"default",{item:f,update:a,index:m},()=>[e.createVNode(Je,{modelValue:f.name,"onUpdate:modelValue":p=>f.name=p,outlined:"",dense:"",class:"content-input",onBlur:p=>a(f)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],!0)]),n.showDelete?(e.openBlock(),e.createElementBlock("div",a0,[e.createVNode(ne,{icon:"delete",flat:"",round:"",dense:"",color:"negative",class:"delete-btn",onClick:p=>s(f.id)},null,8,["onClick"])])):e.createCommentVNode("",!0)],4))),128)),n.showAdd?(e.openBlock(),e.createElementBlock("div",l0,[e.createVNode(ne,{color:"secondary",label:"Добавить",icon:"add",class:"add-btn",onClick:r})])):e.createCommentVNode("",!0)],16))}}),Ka=z(c0,[["__scopeId","data-v-c87ed91c"]]),d0={class:"del-block_title"},u0={class:"del-block_body"},f0=z(e.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(n){return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"del-block",style:e.normalizeStyle({margin:n.margin,background:n.background,padding:n.padding})},[e.createElementVNode("div",d0,[e.renderSlot(t.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",u0,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-58d048aa"]]),el=z(e.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(n,{emit:t}){const o=n,i=t,r=a=>{a.key==="Escape"&&s()};e.onMounted(()=>{document.body.addEventListener("keydown",r)}),e.onBeforeUnmount(()=>{document.body.removeEventListener("keydown",r)});const s=()=>{o.closable&&i("close")};return(a,c)=>{const l=e.resolveComponent("IconClose");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:"blur",onClick:s})):e.createCommentVNode("",!0),n.show?(e.openBlock(),e.createElementBlock("div",{key:1,class:"modal-w",style:e.normalizeStyle({maxWidth:n.width,width:n.width,margin:n.margin,padding:n.padding,top:n.top,maxHeight:n.maxHeight})},[n.closable?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-box",onClick:s},[e.createVNode(l,{size:"20px"})])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0)],4)):e.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-ece06e7d"]]);function m0(n){n.component("CollapseContainer",Vy),n.component("CollapseItem",My),n.component("VerticalCollapseContainer",Ay),n.component("PAdd",Dy),n.component("PAddDialog",Za),n.component("PCard",Ja),n.component("PCrudList",Ka),n.component("PEditDialog",vn),n.component("PModal",el),n.component("PContainer",Fy),n.component("PContainerStickyHead",Ly),n.component("PDel",f0)}const h0={class:"btn-group"},tl=z(e.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(n,{emit:t}){const o=t,i=e.computed(()=>Oe.Form.GetButtons()),r=e.useTemplateRef("fields"),s=async c=>{if(!c.isSubmit){Oe.Form.SetChunk(c.GetChunk()),a();return}const l=Oe.Form.Validate();if(l.length>0){Wt.Notify.Error(l.join("<br/>"));return}o("submit")},a=()=>{if(!r.value)return;const c=r.value[0];c&&c.$refs.input.focus()};return e.onMounted(async()=>{await a()}),e.onBeforeUnmount(()=>{Oe.Form.Reset()}),(c,l)=>(e.openBlock(),e.createElementBlock("div",{class:"auth-card",style:e.normalizeStyle({maxWidth:n.width,margin:n.margin,padding:n.padding,background:n.background})},[e.createVNode(er,{string:e.unref(Oe).Form.GetTitle(),"font-size":"18px"},null,8,["string"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Oe).Form.GetFields(),u=>(e.openBlock(),e.createBlock(Je,{id:u.id,key:u.id,ref_for:!0,ref_key:"fields",ref:r,modelValue:u.value,"onUpdate:modelValue":f=>u.value=f,autocomplete:"nope",type:u.IsPassword?"password":"text",placeholder:u.label,margin:"10px 0 0 0"},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder"]))),128)),e.createElementVNode("div",h0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),(u,f)=>(e.openBlock(),e.createBlock(ne,{id:u.id,key:u.GetChunk(),disabled:e.unref(Oe).Form.IsBlock,type:f===0?e.unref(pe).Success:e.unref(pe).Primary,skin:"base",text:u.text,margin:"10px 0 0 0",width:"100%",onClick:m=>s(u)},null,8,["id","disabled","type","text","onClick"]))),128))])],4))}}),[["__scopeId","data-v-b315f2c4"]]),p0=e.defineComponent({__name:"PAuthModal",props:{width:{type:String,default:"320px"},margin:{type:String,default:"0"},padding:{type:String,default:"2vw"}},emits:["submit"],setup(n){const t=()=>{Oe.Form.Reset(),Oe.Modal.Close()};return(o,i)=>(e.openBlock(),e.createBlock(el,{show:e.unref(Oe).Modal.Visible,closable:e.unref(Oe).Modal.Closable,width:n.width,padding:n.padding,onClose:t},{default:e.withCtx(()=>[e.createVNode(tl,{margin:n.margin,padding:"0",onSubmit:i[0]||(i[0]=r=>o.$emit("submit"))},null,8,["margin"])]),_:1},8,["show","closable","width","padding"]))}}),g0=["onClick"],y0=z(e.defineComponent({__name:"PMenuTabs",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(n,{emit:t}){const o=n,i=t,r=e.ref(window.innerWidth),s=e.ref(),a=e.ref(Number(o.tabHeight.replace(/[^+\d]/g,""))),c=()=>{r.value=window.innerWidth,a.value=s.value?s.value.clientHeight:Number(o.tabHeight.replace(/[^+\d]/g,""))};e.onMounted(()=>window.addEventListener("resize",c)),e.onUnmounted(()=>window.removeEventListener("resize",c));const l=e.computed(()=>`calc(100% - ${a.value}px + 1px)`);e.onBeforeMount(()=>{o.menus.Select()});const u=f=>{o.menus.Select(f),i("select")};return(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"mainblock",style:e.normalizeStyle({height:`calc(100% - ${n.outTopMargin} - ${n.tabHeight}`,margin:n.margin,borderRadius:n.borderRadius})},[e.createElementVNode("div",{ref_key:"menuRef",ref:s,class:"top-menu",style:e.normalizeStyle({gridTemplateColumns:`repeat(auto-fit, minmax(${n.minMenuItemWidth}, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menus.items,(p,S)=>(e.openBlock(),e.createElementBlock("div",{key:S},[e.createElementVNode("div",{class:e.normalizeClass({"selected-tab":S===n.menus.idx,tab:S!==n.menus.idx}),style:e.normalizeStyle({minHeight:n.tabHeight,maxHeight:n.tabHeight}),onClick:E=>u(S)},e.toDisplayString(p.name),15,g0)]))),128))],4),e.createElementVNode("div",{class:"body-container",style:e.normalizeStyle({background:n.background,height:e.unref(l)})},[e.renderSlot(f.$slots,"default",{},()=>[n.menus.idx>-1?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.menus.GetComponent()),{key:0})):e.createCommentVNode("",!0)],!0)],4)],4))}}),[["__scopeId","data-v-1046962d"]]),w0=["id"],b0=["for"],C0={class:"left-field"},S0=["href","download"],k0={key:1,class:"text-field__input"},x0={class:"right-field"},E0=e.defineComponent({__name:"PUploaderFile",props:{fileInfo:{type:Object,required:!1,default:new kt},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(n,{emit:t}){const o=n,i=t,r=Xe.GUID(),s=Xe.GUID(),a=()=>{const u=document.getElementById(r);if(!u.files)return;const f=u.files[0];if(!f)return;if(!l(f.name)){Nn.Error(`Загруженный файл должен быть в одном из форматов: ${o.formats.join(", ")}`);return}const m=new kt;m.setFile(f),m.url=URL.createObjectURL(f),i("upload",m)},c=()=>{i("remove")};e.onMounted(()=>{const u=document.getElementById(s);u&&(u.onclick=()=>{var f;return(f=document.getElementById(r))==null?void 0:f.click()})});const l=u=>{let f=na.Get(u);return!!o.formats.includes(f.toLowerCase())};return(u,f)=>{const m=e.resolveComponent("PString"),p=e.resolveComponent("PFlex"),S=e.resolveComponent("PButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{id:e.unref(r),type:"file",hidden:"",onChange:a},null,40,w0),e.createElementVNode("div",{class:"text-field",style:e.normalizeStyle({margin:n.margin,padding:n.padding})},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"text-field__label",for:n.label},e.toDisplayString(n.label),9,b0)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"field",style:e.normalizeStyle({borderColor:n.borderColor})},[e.createElementVNode("div",C0,[e.createVNode(p,null,{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default",{},void 0,!0),e.createVNode(m,{string:n.placeholder,"font-size":"var(--font-size-default:)",color:"var(--input-label-color)",margin:"0 10px 0 0"},null,8,["string"])]),_:3})]),n.fileInfo&&n.fileInfo.originalName?(e.openBlock(),e.createElementBlock("div",{key:0,class:"text-field__input",style:e.normalizeStyle({color:n.color})},[e.createElementVNode("a",{href:n.fileInfo.getFileUrl(),target:"_blank",download:n.fileInfo.originalName},[e.createElementVNode("div",null,e.toDisplayString(n.fileInfo.originalName),1)],8,S0),e.createVNode(S,{skin:"text",type:"del",onClick:c},{default:e.withCtx(()=>[e.createVNode(Xa,{size:"20px",margin:"0 5px"})]),_:1})],4)):(e.openBlock(),e.createElementBlock("div",k0,[e.createVNode(m,{string:"Файл не загружен","font-size":"var(--inpur-font-size-default)",color:"var(--palette-warning)",margin:"0 10px 0 0"})])),e.createElementVNode("div",x0,[e.createVNode(S,{id:e.unref(s),skin:"text",type:"success","data-test":"upload-btn",text:n.fileInfo&&n.fileInfo.originalName?"Обновить":"Загрузить",margin:"0"},null,8,["id","text"])])],4)],4)],64)}}}),B0=z(E0,[["__scopeId","data-v-8b73ee22"]]);function nl(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),o.push.apply(o,i)}return o}function de(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?nl(Object(o),!0).forEach(function(i){ft(n,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):nl(Object(o)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(o,i))})}return n}function ft(n,t,o){return t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function V0(n,t){if(n==null)return{};var o,i,r=function(a,c){if(a==null)return{};var l,u,f={},m=Object.keys(a);for(u=0;u<m.length;u++)l=m[u],c.indexOf(l)>=0||(f[l]=a[l]);return f}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)o=s[i],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(n,o)&&(r[o]=n[o])}return r}function bn(n){return function(t){if(Array.isArray(t))return Br(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,o){if(t){if(typeof t=="string")return Br(t,o);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Br(t,o)}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
26
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Br(n,t){(t==null||t>n.length)&&(t=n.length);for(var o=0,i=new Array(t);o<t;o++)i[o]=n[o];return i}var ol,N0,oi,Me=(ol=function(n){/*!
|
|
27
27
|
Copyright (c) 2018 Jed Watson.
|
|
28
28
|
Licensed under the MIT License (MIT), see
|
|
29
29
|
http://jedwatson.github.io/classnames
|
|
30
|
-
*/(function(){var t={}.hasOwnProperty;function o(){for(var i=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")i.push(s);else if(Array.isArray(s)){if(s.length){var c=o.apply(null,s);c&&i.push(c)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var l in s)t.call(s,l)&&s[l]&&i.push(l);else i.push(s.toString())}}return i.join(" ")}n.exports?(o.default=o,n.exports=o):window.classNames=o})()},
|
|
30
|
+
*/(function(){var t={}.hasOwnProperty;function o(){for(var i=[],r=0;r<arguments.length;r++){var s=arguments[r];if(s){var a=typeof s;if(a==="string"||a==="number")i.push(s);else if(Array.isArray(s)){if(s.length){var c=o.apply(null,s);c&&i.push(c)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var l in s)t.call(s,l)&&s[l]&&i.push(l);else i.push(s.toString())}}return i.join(" ")}n.exports?(o.default=o,n.exports=o):window.classNames=o})()},ol(oi={path:N0,exports:{},require:function(n,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(t==null&&oi.path)}},oi.exports),oi.exports),bt=function(n){return function(t,o){if(!t)return n;var i;typeof t=="string"?i=t:o=t;var r=n;return i&&(r+="__"+i),r+(o?Object.keys(o).reduce(function(s,a){var c=o[a];return c&&(s+=" "+(typeof c=="boolean"?r+"--"+a:r+"--"+a+"_"+c)),s},""):"")}};function Vr(n,t,o){var i,r,s,a,c;function l(){var f=Date.now()-a;f<t&&f>=0?i=setTimeout(l,t-f):(i=null,o||(c=n.apply(s,r),s=r=null))}t==null&&(t=100);var u=function(){s=this,r=arguments,a=Date.now();var f=o&&!i;return i||(i=setTimeout(l,t)),f&&(c=n.apply(s,r),s=r=null),c};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(c=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}Vr.debounce=Vr;var Nr=Vr,X=function(){return X=Object.assign||function(n){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},X.apply(this,arguments)};/*! *****************************************************************************
|
|
31
31
|
Copyright (c) Microsoft Corporation.
|
|
32
32
|
|
|
33
33
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -40,5 +40,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
40
40
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
41
41
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
42
42
|
PERFORMANCE OF THIS SOFTWARE.
|
|
43
|
-
***************************************************************************** */function tl(n,t){var o,i;return n&&t?(o=""+n+t[0].toUpperCase()+t.slice(1),i=n+"-"+t):(o=n||t,i=n||t),{name:o,classname:i}}function nl(n){return/^blob:/.test(n)}function ol(n){return nl(n)||function(t){return/^data:/.test(t)}(n)}function Un(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Ae(n){return n===void 0}function ii(n){return typeof n=="object"&&n!==null}function Vr(n,t,o){var i={};return ii(n)?(Object.keys(t).forEach(function(r){Ae(n[r])?i[r]=t[r]:ii(t[r])?ii(n[r])?i[r]=Vr(n[r],t[r],o[r]):i[r]=n[r]?t[r]:o[r]:t[r]===!0||t[r]===!1?i[r]=!!n[r]:i[r]=n[r]}),i):n?t:o}function ri(n){var t=Number(n);return Number.isNaN(t)?n:t}function il(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!rl(n)}function rl(n){return n!=n}function sl(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var bo=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},y0=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},$r=function(n){this.type="move",this.directions=n},w0=function(){function n(t,o,i,r,s){this.type="drag",this.nativeEvent=t,this.position=i,this.previousPosition=r,this.element=o,this.anchor=s}return n.prototype.shift=function(){var t=this,o=t.element,i=t.anchor,r=t.position;if(o){var s=o.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-i.left,top:r.top-c-i.top}}return{left:0,top:0}},n}(),Tr={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(n){n.cancelable&&!this.disabled&&n.touches.length===1&&(this.touches=bn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(t,o){return{clientX:t.clientX+o.clientX/n.touches.length,clientY:t.clientY+o.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.draggable.getBoundingClientRect(),o=t.left,i=t.right,r=t.bottom,s=t.top;this.anchor={left:n.clientX-o,top:n.clientY-s,bottom:r-n.clientY,right:i-n.clientX}},processMove:function(n,t){var o=bn(t);if(this.touches.length){if(this.touches.length===1&&o.length===1){var i=this.$refs.draggable;this.$emit("drag",new w0(n,i,{left:o[0].clientX,top:o[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=o}},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"]};Tr.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"draggable",class:o.classname,onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:t[3]||(t[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:t[4]||(t[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],34)};var Pr=wt("vue-handler-wrapper"),al={name:"HandlerWrapper",components:{DraggableElement:Tr},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var t,o=tl(this.horizontalPosition,this.verticalPosition);n=Pr((ut(t={},o.classname,!0),ut(t,"disabled",this.disabled),t))}else n=Pr({disabled:this.disabled});return{root:n,draggable:Pr("draggable")}}},emits:["leave","enter","drag","drag-end"]};al.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock("div",{class:s.classes.root},[e.createVNode(a,{class:s.classes.draggable,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var b0=wt("vue-line-wrapper"),ll={name:"LineWrapper",components:{DraggableElement:Tr},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return b0((ut(n={},this.position,!0),ut(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};ll.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock(a,{class:s.classname,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var Vt=["left","right","top","bottom"],C0=["left","right"],S0=["top","bottom"],k0=["left","top"],x0=["fill-area","fit-area","stencil","none"],cl={left:0,top:0,width:0,height:0};function dl(n,t,o){return!(o=o||["width","height","left","top"]).some(function(i){return n[i]!==t[i]})}function $t(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function vn(n,t){return{left:n.left-t.left,top:n.top-t.top}}function He(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function Co(n,t){var o={left:0,top:0,right:0,bottom:0};return Vt.forEach(function(i){var r=t[i],s=$t(n)[i];o[i]=r!==void 0&&s!==void 0?i==="left"||i==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),o}function Tt(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.left+t.right,height:n.height+t.top+t.bottom}}function si(n){return{left:-n.left,top:-n.top}}function ot(n,t){return X(X({},n),{left:n.left+t.left,top:n.top+t.top})}function ft(n,t,o,i){if(t!==1){if(o){var r=He(n);return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2+(o.left-r.left)*(1-t),top:n.top+n.height*(1-t)/2+(o.top-r.top)*(1-t)}}return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2,top:n.top+n.height*(1-t)/2}}return n}function ue(n){return n.width/n.height}function qn(n,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/n.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/n.height:1/0)}function jn(n,t){var o={left:0,top:0},i=Co(n,t);return i.left&&i.left>0?o.left=i.left:i.right&&i.right>0&&(o.left=-i.right),i.top&&i.top>0?o.top=i.top:i.bottom&&i.bottom>0&&(o.top=-i.bottom),o}function Mr(n,t){var o;return t.minimum&&n<t.minimum?o=t.minimum:t.maximum&&n>t.maximum&&(o=t.maximum),o}function ul(n,t){var o=ue(n),i=ue(t);return t.width<1/0&&t.height<1/0?o>i?{width:t.width,height:t.width/o}:{width:t.height*o,height:t.height}:t.width<1/0?{width:t.width,height:t.width/o}:t.height<1/0?{width:t.height*o,height:t.height}:n}function fl(n,t){var o=t*Math.PI/180;return{width:Math.abs(n.width*Math.cos(o))+Math.abs(n.height*Math.sin(o)),height:Math.abs(n.width*Math.sin(o))+Math.abs(n.height*Math.cos(o))}}function Qt(n,t){var o=t*Math.PI/180;return{left:n.left*Math.cos(o)-n.top*Math.sin(o),top:n.left*Math.sin(o)+n.top*Math.cos(o)}}function ai(n,t){var o=Co(Ue(n,t),t);return o.left+o.right+o.top+o.bottom?o.left+o.right>o.top+o.bottom?Math.min((n.width+o.left+o.right)/n.width,qn(n,t)):Math.min((n.height+o.top+o.bottom)/n.height,qn(n,t)):1}function Ue(n,t,o){o===void 0&&(o=!1);var i=jn(n,t);return ot(n,o?si(i):i)}function Ir(n){return{width:n.right!==void 0&&n.left!==void 0?n.right-n.left:1/0,height:n.bottom!==void 0&&n.top!==void 0?n.bottom-n.top:1/0}}function E0(n,t){return X(X({},n),{minWidth:Math.min(t.width,n.minWidth),minHeight:Math.min(t.height,n.minHeight),maxWidth:Math.min(t.width,n.maxWidth),maxHeight:Math.min(t.height,n.maxHeight)})}function ml(n,t,o){o===void 0&&(o=!0);var i={};return Vt.forEach(function(r){var s=n[r],a=t[r];s!==void 0&&a!==void 0?i[r]=r==="left"||r==="top"?o?Math.max(s,a):Math.min(s,a):o?Math.min(s,a):Math.max(s,a):a!==void 0?i[r]=a:s!==void 0&&(i[r]=s)}),i}function li(n,t){return ml(n,t,!0)}function hl(n){var t=n.size,o=n.aspectRatio,i=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||ue(t)>=o.minimum&&ue(t)<=o.maximum)&&t.height<=r.maxHeight&&t.width<=r.maxWidth&&t.width&&t.height&&(i||t.height>=r.minHeight&&t.width>=r.minWidth))}function pl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Ot(n){var t=n.width,o=n.height,i=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(i.minWidth,Math.min(i.maxWidth,t)),height:Math.max(i.minHeight,Math.min(i.maxHeight,o))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(m,p){return hl({size:p,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:f})&&(!m||pl(p,{width:t,height:o})<pl(m,{width:t,height:o}))?p:m},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),hl({size:s,aspectRatio:r,sizeRestrictions:i})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Rr(n){var t=n.event,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=ot(o,t.directions);return ot(s,jn(s,r))}function B0(n){var t=n.coordinates,o=n.transform,i=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,c=n.visibleArea,l=function(f,m){return Rr({coordinates:f,positionRestrictions:s,event:new $r({left:m.left-f.left,top:m.top-f.top})})},u=X({},t);return(Array.isArray(o)?o:[o]).forEach(function(f){var m={};Ae((m=typeof f=="function"?f({coordinates:u,imageSize:i,visibleArea:c}):f).width)&&Ae(m.height)||(u=function(p,S){var x=X(X(X({},p),Ot({width:S.width,height:S.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(x,{left:p.left,top:p.top})}(u,X(X({},u),m))),Ae(m.left)&&Ae(m.top)||(u=l(u,X(X({},u),m)))}),u}function N0(n){n.event;var t=n.getAreaRestrictions,o=n.boundaries,i=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,c=n.positionRestrictions;n.stencilReference;var l,u,f,m=X({},i),p=X({},r),S=X({},s);l=ue(S),u=ue(m),f===void 0&&(f=.001),(l===0||u===0?Math.abs(u-l)<f:Math.abs(u/l)<1+f&&Math.abs(u/l)>1-f)||(m=X(X({},m),Ot({sizeRestrictions:a,width:m.width,height:m.height,aspectRatio:{minimum:ue(S),maximum:ue(S)}})));var x=ai(p=ft(p,m.width*o.width/(p.width*S.width)),t({visibleArea:p,type:"resize"}));return x!==1&&(p=ft(p,x),m=ft(m,x)),p=Ue(p=ot(p,vn(He(m),He(p))),t({visibleArea:p,type:"move"})),{coordinates:m=Ue(m,li($t(p),c)),visibleArea:p}}function V0(n){var t=n.event,o=n.getAreaRestrictions,i=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var c=X({},r),l=X({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};l.width,i.width,ue(i)>ue(c)?(u.height=.8*i.height,u.width=u.height*ue(c)):(u.width=.8*i.width,u.height=u.width*ue(c));var f=ai(l=ft(l,c.width*i.width/(l.width*u.width)),o({visibleArea:l,type:"resize"}));l=ft(l,f),f!==1&&(u.height/=f,u.width/=f),l=Ue(l=ot(l,vn(He(c),He(l))),o({visibleArea:l,type:"move"})),c=Ue(c,li($t(l),a))}return{coordinates:c,visibleArea:l}}function $0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.getAreaRestrictions,s=X({},i),a=X({},o);if(t.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=ft(s,Math.min(a.width/s.width,qn(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=ft(s,Math.min(a.height/s.height,qn(s,r({visibleArea:s,type:"resize"}))))),s=Ue(s=ot(s,si(jn(a,$t(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function T0(n){var t=n.imageSize,o=n.visibleArea,i=n.coordinates,r=o||t;return{left:(o?o.left:0)+r.width/2-i.width/2,top:(o?o.top:0)+r.height/2-i.height/2}}function P0(n){var t=n.imageSize,o=n.visibleArea,i=n.aspectRatio,r=n.sizeRestrictions,s=o||t,a=Math.min(i.maximum||1/0,Math.max(i.minimum||0,ue(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Ot(X(X({},c),{aspectRatio:i,sizeRestrictions:r}))}function M0(n){var t,o,i=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,c=n.sizeRestrictions,l=n.stencilSize,u=r||i;return ue(u)>ue(s)?o=(t=l.height*u.height/s.height)*ue(l):t=(o=l.width*u.width/s.width)/ue(l),Ot({width:o,height:t,aspectRatio:a,sizeRestrictions:c})}function I0(n){var t=n.getAreaRestrictions,o=n.coordinates,i=n.imageSize,r=ue(n.boundaries);if(o){var s={height:Math.max(o.height,i.height),width:Math.max(o.width,i.width)},a=ul({width:ue(s)>r?s.width:s.height*r,height:ue(s)>r?s.width/r:s.height},Ir(t())),c={left:o.left+o.width/2-a.width/2,top:o.top+o.height/2-a.height/2,width:a.width,height:a.height},l=Co(o,$t(X({left:0,top:0},i))),u={};return!l.left&&!l.right&&c.width<=i.width&&(u.left=0,u.right=i.width),!l.top&&!l.bottom&&c.height<=i.height&&(u.top=0,u.bottom=i.height),Ue(c,u)}var f=ue(i);return a={height:f>r?i.height:i.width/r,width:f>r?i.height*r:i.width},{left:i.width/2-a.width/2,top:i.height/2-a.height/2,width:a.width,height:a.height}}function ci(n,t){return ml(n,$t(t))}function R0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,c=n.adjustStencil,l=t.scale,u=t.move,f=X({},i),m=X({},o),p=1,S=1,x=l.factor&&Math.abs(l.factor-1)>.001;f=ot(f,{left:u.left||0,top:u.top||0});var N={stencil:{minimum:Math.max(r.minWidth?r.minWidth/m.width:0,r.minHeight?r.minHeight/m.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/m.width:1/0,r.maxHeight?r.maxHeight/m.height:1/0,qn(m,a))},area:{maximum:qn(f,s({visibleArea:f,type:"resize"}))}};l.factor&&x&&(l.factor<1?(S=Math.max(l.factor,N.stencil.minimum))>1&&(S=1):l.factor>1&&(S=Math.min(l.factor,Math.min(N.area.maximum,N.stencil.maximum)))<1&&(S=1)),S&&(f=ft(f,S,l.center));var V=o.left-i.left,C=i.width+i.left-(o.width+o.left),T=o.top-i.top,y=i.height+i.top-(o.height+o.top);return f=Ue(f=ot(f,jn(f,{left:a.left!==void 0?a.left-V*S:void 0,top:a.top!==void 0?a.top-T*S:void 0,bottom:a.bottom!==void 0?a.bottom+y*S:void 0,right:a.right!==void 0?a.right+C*S:void 0})),s({visibleArea:f,type:"move"})),m.width=m.width*S,m.height=m.height*S,m.left=f.left+V*S,m.top=f.top+T*S,m=Ue(m,li($t(f),a)),l.factor&&x&&c&&(l.factor>1?p=Math.min(N.area.maximum,l.factor)/S:l.factor<1&&(p=Math.max(m.height/f.height,m.width/f.width,l.factor/S)),p!==1&&(f=ot(f=Ue(f=ft(f,p,l.factor>1?l.center:He(m)),s({visibleArea:f,type:"move"})),si(jn(m,$t(f)))))),{coordinates:m,visibleArea:f}}function A0(n){var t=n.aspectRatio,o=n.getAreaRestrictions,i=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,c=n.imageSize,l=n.previousImageSize,u=n.angle,f=X({},i),m=X({},r),p=Qt(He(X({left:0,top:0},l)),u);return(f=X(X({},Ot({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Qt(He(f),u))).left-=p.left-c.width/2+f.width/2,f.top-=p.top-c.height/2+f.height/2,m=ft(m,ai(m,o({visibleArea:m,type:"resize"}))),{coordinates:f=Ue(f,a),visibleArea:m=Ue(m=ot(m,vn(He(f),He(i))),o({visibleArea:m,type:"move"}))}}function z0(n){var t=n.flip,o=n.previousFlip,i=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,c=n.imageSize,l=X({},s),u=X({},a),f=o.horizontal!==t.horizontal,m=o.vertical!==t.vertical;if(f||m){var p=Qt({left:c.width/2,top:c.height/2},-i),S=Qt(He(l),-i),x=Qt({left:f?p.left-(S.left-p.left):S.left,top:m?p.top-(S.top-p.top):S.top},i);l=ot(l,vn(x,He(l))),S=Qt(He(u),-i),u=Ue(u=ot(u,vn(x=Qt({left:f?p.left-(S.left-p.left):S.left,top:m?p.top-(S.top-p.top):S.top},i),He(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function gl(n){var t=n.directions,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=n.sizeRestrictions,a=n.preserveRatio,c=n.compensate,l=X({},t),u=Tt(o,l).width,f=Tt(o,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(o.width-s.minWidth)/(l.left/l.right),l.right=-(o.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(o.width-s.minWidth):l.right<0&&(l.right=-(o.width-s.minWidth))),f<0&&(l.top<0&&l.bottom<0?(l.top=-(o.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(o.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(o.height-s.minHeight):l.bottom<0&&(l.bottom=-(o.height-s.minHeight)));var m=Co(Tt(o,l),r);c&&(m.left&&m.left>0&&m.right===0?(l.right+=m.left,l.left-=m.left):m.right&&m.right>0&&m.left===0&&(l.left+=m.right,l.right-=m.right),m.top&&m.top>0&&m.bottom===0?(l.bottom+=m.top,l.top-=m.top):m.bottom&&m.bottom>0&&m.top===0&&(l.top+=m.bottom,l.bottom-=m.bottom),m=Co(Tt(o,l),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Vt.forEach(function(N){var V=m[N];V&&l[N]&&(p[N]=Math.max(0,1-V/l[N]))}),a){var S=Math.min.apply(null,Vt.map(function(N){return p[N]}));S!==1/0&&Vt.forEach(function(N){l[N]*=S})}else Vt.forEach(function(N){p[N]!==1/0&&(l[N]*=p[N])});if(u=Tt(o,l).width,f=Tt(o,l).height,l.right+l.left&&(u>s.maxWidth?p.width=(s.maxWidth-o.width)/(l.right+l.left):u<s.minWidth&&(p.width=(s.minWidth-o.width)/(l.right+l.left))),l.bottom+l.top&&(f>s.maxHeight?p.height=(s.maxHeight-o.height)/(l.bottom+l.top):f<s.minHeight&&(p.height=(s.minHeight-o.height)/(l.bottom+l.top))),a){var x=Math.min(p.width,p.height);x!==1/0&&Vt.forEach(function(N){l[N]*=x})}else p.width!==1/0&&C0.forEach(function(N){l[N]*=p.width}),p.height!==1/0&&S0.forEach(function(N){l[N]*=p.height});return l}function di(n,t,o){return t==0&&o==0?n/2:t==0?0:o==0?n:n*Math.abs(t/(t+o))}var D0=wt("vue-simple-handler"),F0=wt("vue-simple-handler-wrapper"),Ar={name:"SimpleHandler",components:{HandlerWrapper:al},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 n,t=(ut(n={},this.horizontalPosition,!!this.horizontalPosition),ut(n,this.verticalPosition,!!this.verticalPosition),ut(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ut(n,"hover",this.hover),n);return{default:Me(D0(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(F0(t),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Ar.render=function(n,t,o,i,r,s){var a=e.resolveComponent("HandlerWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,"vertical-position":o.verticalPosition,"horizontal-position":o.horizontalPosition,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var O0=wt("vue-simple-line"),L0=wt("vue-simple-line-wrapper"),zr={name:"SimpleLine",components:{LineWrapper:ll},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:Me(O0(ut({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(L0(ut({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};zr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("LineWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,position:o.position,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Dr=wt("vue-bounding-box"),_0=["east","west",null],H0=["south","north",null],yl={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 Ar}},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 zr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return _0.forEach(function(t){H0.forEach(function(o){if(t!==o){var i=tl(t,o),r=i.name,s=i.classname;n.push({name:r,classname:s,verticalDirection:o,horizontalDirection:t})}})}),{points:n}},computed:{style:function(){var n={};return this.width&&this.height&&(n.width="".concat(this.width,"px"),n.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),n},classes:function(){var n=this.handlersClasses,t=this.handlersWrappersClasses,o=this.linesClasses,i=this.linesWrappersClasses;return{root:Dr(),handlers:n,handlersWrappers:t,lines:o,linesWrappers:i}},lineNodes:function(){var n=this,t=[];return this.points.forEach(function(o){o.horizontalDirection&&o.verticalDirection||!n.lines[o.name]||t.push({name:o.name,component:n.linesComponent,class:Me(n.classes.lines.default,n.classes.lines[o.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Me(n.classes.linesWrappers.default,n.classes.linesWrappers[o.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:o.verticalDirection,horizontalDirection:o.horizontalDirection,disabled:!n.resizable})}),t},handlerNodes:function(){var n=this,t=[],o=this.width,i=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Me(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Me(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(o&&i){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?o:a==="west"?0:o/2,u=c==="south"?i:c==="north"?0:i/2;s.wrapperClass=Dr("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=Dr("handler",ut({},r.classname,!0));t.push(s)}}),t}},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(n,t,o){var i,r=n.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};t==="west"?c.left-=s:t==="east"&&(c.right+=s),o==="north"?c.top-=a:o==="south"&&(c.bottom+=a),!o&&t?i="width":o&&!t&&(i="height"),this.resizable&&this.$emit("resize",new y0(c,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:o==="south"||!o,top:o==="north"||!o},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:i}))}},emits:["resize","resize-end"]};yl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[e.renderSlot(n.$slots,"default"),e.createVNode("div",null,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.lineNodes,function(a){return e.openBlock(),e.createBlock(e.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 s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.handlerNodes,function(a){return e.openBlock(),e.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(e.openBlock(),e.createBlock(e.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 s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var U0=wt("vue-draggable-area"),wl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:U0()}}},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(n){if(n.cancelable){var t=this.movable&&n.touches.length===1;t&&(this.touches=bn(n.touches)),(this.touchStarted||t)&&(n.preventDefault(),n.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(n){this.touches.length>=1&&(this.touchStarted?(this.processMove(n,n.touches),n.preventDefault(),n.stopPropagation()):sl({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:n.touches[0].clientX,y:n.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(n){if(this.movable&&n.button===0){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.cancelable&&n.preventDefault(),n.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top;this.anchor={x:n.clientX-o,y:n.clientY-i}},processMove:function(n,t){var o=bn(t);if(this.touches.length){var i=this.$refs.container.getBoundingClientRect(),r=i.left,s=i.top;this.touches.length===1&&o.length===1&&this.$emit("move",new $r({left:o[0].clientX-(r+this.anchor.x),top:o[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};wl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};function Fr(n){var t,o;return{rotate:n.rotate||0,flip:{horizontal:((t=n==null?void 0:n.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((o=n==null?void 0:n.flip)===null||o===void 0?void 0:o.vertical)||!1}}}function v0(n){return new Promise(function(t,o){try{if(n)if(/^data:/i.test(n))t(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),f=u.length,m=new ArrayBuffer(f),p=new Uint8Array(m),S=0;S<f;S++)p[S]=u.charCodeAt(S);return m}(n));else if(/^blob:/i.test(n)){var i=new FileReader;i.onload=function(l){t(l.target.result)},s=n,a=function(l){i.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?t(r.response):o("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else o("Error: the image is empty")}catch(l){o(l)}var s,a,c})}function bl(n){var t=n.rotate,o=n.flip,i=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+i*(o.horizontal?-1:1)+") ",s+=" scaleY("+r*(o.vertical?-1:1)+") "}function q0(n){try{var t,o=new DataView(n),i=void 0,r=void 0,s=void 0,a=void 0;if(o.getUint8(0)===255&&o.getUint8(1)===216)for(var c=o.byteLength,l=2;l+1<c;){if(o.getUint8(l)===255&&o.getUint8(l+1)===225){s=l;break}l++}if(s&&(i=s+10,function(S,x,N){var V,C="";for(V=x,N+=x;V<N;V++)C+=String.fromCharCode(S.getUint8(V));return C}(o,s+4,4)==="Exif")){var u=o.getUint16(i);if(((r=u===18761)||u===19789)&&o.getUint16(i+2,r)===42){var f=o.getUint32(i+4,r);f>=8&&(a=i+f)}}if(a){for(var m=o.getUint16(a,r),p=0;p<m;p++)if(l=a+12*p+2,o.getUint16(l,r)===274){l+=8,t=o.getUint16(l,r),o.setUint16(l,1,r);break}}return t}catch{return null}}function Cl(n,t){var o=t.getBoundingClientRect(),i=o.left,r=o.top,s={left:0,top:0},a=0;return n.forEach(function(c){s.left+=(c.clientX-i)/n.length,s.top+=(c.clientY-r)/n.length}),n.forEach(function(c){a+=sl({x:s.left,y:s.top},{x:c.clientX-i,y:c.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var Sl={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=Nr(this.processEnd),this.touches=[]},methods:{processMove:function(n,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new bo({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var o=Cl(t,this.$refs.container),i=this.oldGeometricProperties;i.count===o.count&&i.count>1&&this.$emit("resize",new bo({left:i.centerMass.left-o.centerMass.left,top:i.centerMass.top-o.centerMass.top},{factor:i.spread/o.spread,center:o.centerMass})),this.oldGeometricProperties=o}this.touches=t}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(n){return this.eventsFilter?this.eventsFilter(n,this.transforming)!==!1:(n.preventDefault(),n.stopPropagation(),!0)},onTouchStart:function(n){if(n.cancelable&&(this.touchMove||this.touchResize&&n.touches.length>1)&&this.processEvent(n)){var t=this.$refs.container,o=t.getBoundingClientRect(),i=o.left,r=o.top,s=o.bottom,a=o.right;this.touches=bn(n.touches).filter(function(c){return c.clientX>i&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=Cl(this.touches,t)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var t=this;if(this.touches.length){var o=bn(n.touches).filter(function(i){return!i.identifier||t.touches.find(function(r){return r.identifier===i.identifier})});this.processEvent(n)&&(this.processMove(n,o),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.processStart()}},onMouseMove:function(n){this.touches.length&&this.processEvent(n)&&this.processMove(n,[{clientX:n.clientX,clientY:n.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(n){if(this.wheelResize&&this.processEvent(n)){var t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(c=+a)==0||rl(c)?c:c>0?1:-1),s={left:n.clientX-o,top:n.clientY-i};this.$emit("resize",new bo({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};Sl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:t[3]||(t[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};var Or={components:{TransformableImage:Sl},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"]};Or.render=function(n,t,o,i,r,s){var a=e.resolveComponent("transformable-image");return e.openBlock(),e.createBlock(a,{"touch-move":o.touchMove,"touch-resize":o.touchResize,"mouse-move":o.mouseMove,"wheel-resize":o.wheelResize,onMove:t[1]||(t[1]=function(c){return n.$emit("move",c)}),onResize:t[2]||(t[2]=function(c){return n.$emit("resize",c)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var ui=wt("vue-preview"),kl={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:ui({fill:this.fill}),wrapper:ui("wrapper"),imageWrapper:ui("image-wrapper"),image:Me(ui("image"),this.imageClass)}},style:function(){if(this.fill)return{};var n={};return this.width&&(n.width="".concat(this.size.width,"px")),this.height&&(n.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},wrapperStyle:function(){var n={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&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},imageStyle:function(){if(this.coordinates&&this.image){var n=this.coordinates.width/this.size.width,t=de(de({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),o=this.imageSize.width,i=this.imageSize.height,r=fl({width:o,height:i},t.rotate),s={width:"".concat(o,"px"),height:"".concat(i,"px"),left:"0px",top:"0px"},a={rotate:{left:(o-r.width)*t.scaleX/2,top:(i-r.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*o/2,top:(1-t.scaleY)*i/2}};return s.transform=`translate(
|
|
44
|
-
`.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+bl(t),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}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(n){(n.width||n.height)&&this.onChangeImage()}},mounted:function(){var n=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){n.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 n=this.$refs.image;this.calculatedImageSize.height=n.naturalHeight,this.calculatedImageSize.width=n.naturalWidth},refresh:function(){var n=this.$refs.root;this.width||(this.calculatedSize.width=n.clientWidth),this.height||(this.calculatedSize.height=n.clientHeight)},onChangeImage:function(){var n=this.$refs.image;n&&n.complete&&this.refreshImage(),this.refresh()}}};kl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[e.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[e.withDirectives(e.createVNode("img",{ref:"image",src:o.image&&o.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[e.vShow,o.image&&o.image.src]])],6)],6)};var xl={components:{Preview:kl},inheritAttrs:!1};xl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("preview");return e.openBlock(),e.createBlock(a,e.mergeProps(n.$attrs,{fill:!0}),null,16)};var Lr=wt("vue-rectangle-stencil"),El={name:"RectangleStencil",components:{StencilPreview:xl,BoundingBox:yl,DraggableArea:wl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Ar}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return zr}},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:Me(Lr({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Me(Lr("preview"),this.previewClass),boundingBox:Me(Lr("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,t=n.height,o=n.width,i=n.left,r=n.top,s={width:"".concat(o,"px"),height:"".concat(t,"px"),transform:"translate(".concat(i,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),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(n,t,o,i,r,s){var a=e.resolveComponent("stencil-preview"),c=e.resolveComponent("draggable-area"),l=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(l,{width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,transitions:o.transitions,class:s.classes.boundingBox,handlers:o.handlers,"handlers-component":o.handlersComponent,"handlers-classes":o.handlersClasses,"handlers-wrappers-classes":o.handlersWrappersClasses,lines:o.lines,"lines-component":o.linesComponent,"lines-classes":o.linesClasses,"lines-wrappers-classes":o.linesWrappersClasses,resizable:o.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:e.withCtx(function(){return[e.createVNode(c,{movable:o.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:e.withCtx(function(){return[e.createVNode(a,{image:o.image,coordinates:o.coordinates,width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,class:s.classes.preview,transitions:o.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 j0=["transitions"],Lt=wt("vue-advanced-cropper"),Bl={name:"Cropper",components:{BackgroundWrapper:Or},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return El}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Or}},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(n){return x0.indexOf(n)!==-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(n){return!(typeof n=="string"&&n!=="fill"&&n!=="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(n){var t=n.event,o=n.coordinates,i=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=X(X({},o),{right:o.left+o.width,bottom:o.top+o.height}),c=t.params||{},l=X({},t.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),Vt.forEach(function(b){u[b]||(l[b]=0)});var f=Tt(a,l=gl({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,m=Tt(a,l).height,p=c.preserveRatio?ue(a):Mr(f/m,i);if(p){var S=c.respectDirection;if(S||(S=a.width>=a.height||p===1?"width":"height"),S==="width"){var x=f/p-a.height;if(u.top&&u.bottom){var N=l.top,V=l.bottom;l.bottom=di(x,V,N),l.top=di(x,N,V)}else u.bottom?l.bottom=x:u.top?l.top=x:u.right?l.right=0:u.left&&(l.left=0)}else if(S==="height"){var C=a.width-m*p;if(u.left&&u.right){var T=l.left,y=l.right;l.left=-di(C,T,y),l.right=-di(C,y,T)}else u.left?l.left=-C:u.right?l.right=-C:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=gl({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return f=Tt(a,l).width,m=Tt(a,l).height,(p=c.preserveRatio?ue(a):Mr(f/m,i))&&Math.abs(p-f/m)>.001&&Vt.forEach(function(b){u[b]||(l[b]=0)}),Rr({event:new $r({left:-l.left,top:-l.top}),coordinates:{width:o.width+l.right+l.left,height:o.height+l.top+l.bottom,left:o.left,top:o.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Rr},initStretcher:{type:Function,default:function(n){var t=n.stretcher,o=n.imageSize,i=ue(o);t.style.width=o.width+"px",t.style.height=t.clientWidth/i+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var t=n.visibleArea,o=n.coordinates,i=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=X(X({},o),Ot({width:o.width,height:o.height,aspectRatio:i,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,r.minHeight),minWidth:Math.min(t.width,r.minWidth)}}));return a=Ue(a=ot(a,vn(He(o),He(a))),li($t(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.getAreaRestrictions,r=n.coordinates,s=X({},t);s.height=s.width/ue(o),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=ft(s,Math.max(r.height/s.height,r.width/s.width)));var a=si(jn(r,$t(s=ft(s,ai(s,i({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=Ue(s=ot(s,a),i({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:i.width,bottom:i.height}:r==="fit-area"&&(ue(o)>ue(i)?(a={top:0,bottom:i.height},t&&s==="move"&&(t.width>i.width?(a.left=-(t.width-i.width)/2,a.right=i.width-a.left):(a.left=0,a.right=i.width))):(a={left:0,right:i.width},t&&s==="move"&&(t.height>i.height?(a.top=-(t.height-i.height)/2,a.bottom=i.height-a.top):(a.top=0,a.bottom=i.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.imageSize,o={};return n.imageRestriction!=="none"&&(o={left:0,top:0,right:t.width,bottom:t.height}),o}}},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:de({},cl)}},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 n=function(t){return t*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(n))+Math.abs(this.imageAttributes.height*Math.sin(n)),height:Math.abs(this.imageAttributes.width*Math.sin(n))+Math.abs(this.imageAttributes.height*Math.cos(n))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var n=Vr(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Vr(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:n}},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 n=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:Ae(this.minWidth)?0:ri(this.minWidth),minHeight:Ae(this.minHeight)?0:ri(this.minHeight),maxWidth:Ae(this.maxWidth)?1/0:ri(this.maxWidth),maxHeight:Ae(this.maxHeight)?1/0:ri(this.maxHeight)});if(n=function(i){var r=i.areaRestrictions,s=i.sizeRestrictions,a=i.boundaries,c=i.positionRestrictions,l=X(X({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=Ir(r),f=ul(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>f.width)&&(l.maxWidth=Math.min(l.maxWidth,f.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>f.height)&&(l.maxHeight=Math.min(l.maxHeight,f.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:n,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 t=this.getStencilSize(),o=Ir(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,o.width*t.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,o.height*t.height/this.boundaries.height),n.maxWidth<n.minWidth&&(n.minWidth=n.maxWidth),n.maxHeight<n.minHeight&&(n.minHeight=n.maxHeight)}return n}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Lt(),image:Me(Lt("image"),this.imageClass),stencil:Lt("stencil"),boundaries:Me(Lt("boundaries"),this.boundariesClass),stretcher:Me(Lt("stretcher")),background:Me(Lt("background"),this.backgroundClass),foreground:Me(Lt("foreground"),this.foregroundClass),imageWrapper:Me(Lt("image-wrapper")),cropperWrapper:Me(Lt("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,t=n.width,o=n.height,i=n.left,r=n.top;return{width:t/this.coefficient,height:o/this.coefficient,left:(i-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={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||(n.opacity="0"),n},imageStyle:function(){var n=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)},t={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},o={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},i=de(de({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/n.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/n.height)}),r={width:"".concat(n.width,"px"),height:"".concat(n.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-o.left-this.imageTransforms.translateX,"px, ").concat(-t.top-o.top-this.imageTransforms.translateY,"px)")+bl(i)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(o){return n[o]!==t[o]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Nr(this.update,this.debounce),this.debouncedDisableTransitions=Nr(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 n=this.initialized?this.prepareResult(de({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:de({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var o=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},this.visibleArea):null,imageTransforms:t,get canvas(){return o.canvas?o.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new bo({},{factor:1/n,center:t}),{normalize:!1,transitions:r})},move:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new bo({left:n||0,top:t||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var t=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.autoZoom,r=i===void 0||i,s=o.transitions,a=s===void 0||s;this.$nextTick(function(){t.imageLoaded?(t.transitionsActive||(a&&t.enableTransitions(),t.coordinates=t.applyTransform(n),r&&t.runAutoZoom("setCoordinates"),a&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=n})},refresh:function(){var n=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then(function(){n.onChange()}):this.resetVisibleArea().then(function(){n.onChange()})},reset:function(){var n=this;return this.resetVisibleArea().then(function(){n.onChange(!1)})},awaitRender:function(n){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),t.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(t){var o=t.coordinates,i=t.sizeRestrictions,r=t.positionRestrictions,s={width:Math.round(o.width),height:Math.round(o.height),left:Math.round(o.left),top:Math.round(o.top)};return s.width>i.maxWidth?s.width=Math.floor(o.width):s.width<i.minWidth&&(s.width=Math.ceil(o.width)),s.height>i.maxHeight?s.height=Math.floor(o.height):s.height<i.minHeight&&(s.height=Math.ceil(o.height)),Ue(s,r)}(de(de({},this.getPublicProperties()),{},{positionRestrictions:ci(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,o,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?N0:this.autoZoom?V0:$0);var s=r({event:{type:n,params:i},visibleArea:t,coordinates:o,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return de(de({},s),{},{changed:!dl(s.visibleArea,t)||!dl(s.coordinates,o)})},runAutoZoom:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o!==void 0&&o,r=p0(t,j0),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;i&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,i&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var o=t.event,i=t.visibleArea,r=t.coefficient;if(o.type==="manipulateImage")return X(X({},o),{move:{left:o.move&&o.move.left?r*o.move.left:0,top:o.move&&o.move.top?r*o.move.top:0},scale:{factor:o.scale&&o.scale.factor?o.scale.factor:1,center:o.scale&&o.scale.center?{left:o.scale.center.left*r+i.left,top:o.scale.center.top*r+i.top}:null}});if(o.type==="resize"){var s=X(X({},o),{directions:X({},o.directions)});return Vt.forEach(function(c){s.directions[c]*=r}),s}if(o.type==="move"){var a=X(X({},o),{directions:X({},o.directions)});return k0.forEach(function(c){a.directions[c]*=r}),a}return o}(de(de({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,t=this.$refs.image,o=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var f=u.rotate,m=u.flip,p={width:l.naturalWidth,height:l.naturalHeight},S=fl(p,f),x=c.getContext("2d");c.height=S.height,c.width=S.width,x.save();var N=Qt(He(X({left:0,top:0},p)),f);return x.translate(-(N.left-S.width/2),-(N.top-S.height/2)),x.rotate(f*Math.PI/180),x.translate(m.horizontal?p.width:0,m.vertical?p.height:0),x.scale(m.horizontal?-1:1,m.vertical?-1:1),x.drawImage(l,0,0,p.width,p.height),x.restore(),c}(this.$refs.sourceCanvas,t,this.imageTransforms):t,i=de({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Ot({sizeRestrictions:{minWidth:r([i.width,i.minWidth])||0,minHeight:r([i.height,i.minHeight])||0,maxWidth:r([i.width,i.maxWidth])||1/0,maxHeight:r([i.height,i.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(i.maxArea&&s.width*s.height>i.maxArea){var a=Math.sqrt(i.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,f,m){c.width=f?f.width:u.width,c.height=f?f.height:u.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),m&&(m.imageSmoothingEnabled&&(p.imageSmoothingEnabled=m.imageSmoothingEnabled),m.imageSmoothingQuality&&(p.imageSmoothingQuality=m.imageSmoothingQuality),m.fillColor&&(p.fillStyle=m.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var S=u.left<0?-u.left:0,x=u.top<0?-u.top:0;p.drawImage(l,u.left+S,u.top+x,u.width,u.height,S*(c.width/u.width),x*(c.height/u.height),c.width,c.height)}(n,o,this.coordinates,s,i),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],o=this.visibleArea&&t?E0(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&t?ci(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return B0({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:o,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?M0:P0);var o=this.sizeRestrictions;o.minWidth,o.minHeight,o.maxWidth,o.maxHeight;var i=Un(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||T0,s=[i,function(a){var c=a.coordinates;return de({},Un(r)?r({coordinates:c,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,bn(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var n=this;this.imageLoaded=!1,setTimeout(function(){var t=n.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),n.coordinates=n.defaultCoordinates(),n.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var n=this,t=this.$refs.stretcher,o=this.$refs.cropper;return this.initStretcher({cropper:o,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var i={cropper:o,imageSize:n.imageSize};if(Un(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(i):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,f=a.width*c/a.height;return f>l&&(f=l,u=a.height*l/a.width),{width:f,height:u}}(i):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(i),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=de(de({},this.defaultImageTransforms),{},{flip:de({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,o,i,r,s,a,c=n.defaultVisibleArea||I0;n.visibleArea=Un(c)?c({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},o=t.visibleArea,i=t.boundaries,r=t.getAreaRestrictions,s=X({},o),a=ue(i),s.width/s.height!==a&&(s.height=s.width/a),Ue(s,r({visibleArea:s,type:"move"}))),n.priority==="visible-area"?n.resetCoordinates():n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("resetVisibleArea")}).catch(function(){n.visibleArea=null})},updateVisibleArea:function(){var n=this;return this.updateBoundaries().then(function(){n.visibleArea=n.fitVisibleArea({imageSize:n.imageSize,boundaries:n.boundaries,visibleArea:n.visibleArea,coordinates:n.coordinates,getAreaRestrictions:n.getAreaRestrictions}),n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("updateVisibleArea")}).catch(function(){n.visibleArea=null})},onChange:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];n&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var n,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(ol(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var o=Ae(this.crossOrigin)?this.canvas:this.crossOrigin;o===!0&&(o="anonymous"),this.imageAttributes.crossOrigin=o||null}if(this.checkOrientation){var i=(n=this.src,new Promise(function(r){v0(n).then(function(s){var a=q0(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){i.then(t.onParseImage)},this.transitionTime)}else setTimeout(function(){t.onParseImage({source:t.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var t=this,o=n.source,i=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&r&&r>1?nl(o)||!ol(o)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(i):this.imageAttributes.src=o,Un(this.defaultTransforms)?this.appliedImageTransforms=Fr(this.defaultTransforms()):ii(this.defaultTransforms)?this.appliedImageTransforms=Fr(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Fr({});if(s)switch(s){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}(r),this.defaultImageTransforms=de(de({},this.appliedImageTransforms),{},{flip:de({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=t.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?t.onSuccessLoadImage():t.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var t=this;this.transitionsOptions.enabled||this.awaitRender(function(){t.coordinates=t.moveAlgorithm(de(de({},t.getPublicProperties()),{},{positionRestrictions:ci(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(n)})),t.onChange()})},onResize:function(n){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var o=t.sizeRestrictions,i=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(de(de({},t.getPublicProperties()),{},{positionRestrictions:ci(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(o.maxWidth,t.visibleArea.width),maxHeight:Math.min(o.maxHeight,t.visibleArea.height),minWidth:Math.max(o.minWidth,i),minHeight:Math.max(o.minHeight,i)},event:t.normalizeEvent(n)})),t.onChange(),t.ticking=!1})},onManipulateImage:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var o=t.transitions,i=o!==void 0&&o,r=t.normalize,s=r===void 0||r;i&&this.enableTransitions();var a=R0(de(de({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),i&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.visibleArea,o=n.type,i=o===void 0?"move":o;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:i})},getAspectRatio:function(n){var t,o,i=this.stencilProps,r=i.aspectRatio,s=i.minAspectRatio,a=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();t=c.minimum,o=c.maximum}if(Ae(t)&&(t=Ae(r)?s:r),Ae(o)&&(o=Ae(r)?a:r),!n&&(Ae(t)||Ae(o))){var l=this.getStencilSize(),u=l?ue(l):null;Ae(t)&&(t=il(u)?u:void 0),Ae(o)&&(o=il(u)?u:void 0)}return{minimum:t,maximum:o}},getStencilSize:function(){if(this.stencilSize)return n={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)},t=n.boundaries,o=n.stencilSize,i=n.aspectRatio,Mr(ue(r=Un(o)?o({boundaries:t,aspectRatio:i}):o),i)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(r.width>t.width||r.height>t.height)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:ue(r),maximum:ue(r)}})),r;var n,t,o,i,r},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 de({},cl)},flip:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;if(!this.transitionsActive){r&&this.enableTransitions();var s=de({},this.imageTransforms.flip),a=z0({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:t?!s.vertical:s.vertical},previousFlip:s,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,l=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o===void 0||o;if(!this.transitionsActive){i&&this.enableTransitions();var r=de({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=A0({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:n,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},W0={key:0,ref:"canvas",style:{display:"none"}},G0={key:1,ref:"sourceCanvas",style:{display:"none"}};Bl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"cropper",class:s.classes.cropper},[e.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),e.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),e.createVNode("div",{class:s.classes.imageWrapper},[e.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:t[1]||(t[1]=e.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),e.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.stencilComponent),e.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},o.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[e.vShow,r.imageLoaded]]),o.canvas?(e.openBlock(),e.createBlock("canvas",W0,null,512)):e.createCommentVNode("",!0),o.canvas?(e.openBlock(),e.createBlock("canvas",G0,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const Q0={width:0,height:0,left:0,top:0};class _r{constructor(){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"coordinates",Q0)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,o=0,i){const r=new _r;return r.src=t,r.ratio=o,r.id=i,r}setRatio(t){this.ratio=t}getRatio(){return this.ratio}setSrc(t){this.src=t}getSrc(){return this.src}}const Y0={class:"cropper-wrapper"},X0={class:"row justify-end q-mt-md"},Z0=D(e.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.ratio),s=e.ref(_r.Create(o.src,o.ratio));s.value.setRatio(r.value);const a=e.ref(),c=e.computed(()=>[{label:"2:3 (формат A4)",value:2/3},{label:"4:3 (для карточек новостей)",value:4/3},{label:"1:1 (для фото сотрудников)",value:1},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"3:4 (вертикальное изображение)",value:3/4},{label:"Задать пропорции вручную",value:0}]),l=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(m=>{var p;i("crop",{blob:m,src:(p=f.canvas)==null?void 0:p.toDataURL()}),i("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,m)=>(e.openBlock(),e.createElementBlock("div",Y0,[e.createVNode(wo,{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=p=>r.value=p),m[1]||(m[1]=p=>l(p))],clearable:!1,options:c.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref(Bl),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:m[2]||(m[2]=p=>s.value.setCoordinates(p.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",X0,[e.createVNode(ne,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),J0={class:"uploader-content"},K0={class:"uploader-icon"},ew={class:"tools-button absolute-full column items-center justify-center"},tw={class:"row q-gutter-sm"},nw=D(e.defineComponent({__name:"PUploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{},height:{default:150},emitCrop:{type:Boolean,default:!1},ratio:{default:1},acceptTypes:{default:"image/*"},maxFileSize:{default:10485760}},emits:["crop","removeFile","update:ratio"],setup(n,{emit:t}){const o=E.ClosePopup,i=n,r=t,s=e.ref(),a=e.ref(),c=e.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),l=e.ref(!1),u=e.ref();e.onMounted(()=>{e.nextTick(()=>{var y;const T=(y=a.value)==null?void 0:y.querySelector(".q-uploader__input");T&&!T.getAttribute("aria-label")&&T.setAttribute("aria-label","Добавить изображение")})});const f=e.ref(i.ratio),m=e.ref(""),p=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),S=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),x=()=>{s.value=void 0,f.value=1,r("update:ratio",1),r("removeFile")},N=T=>{T.blob.src=T.src,i.fileInfo.setFile&&i.fileInfo.setFile(T.blob),i.fileInfo.fileSystemPath&&(s.value=i.fileInfo),l.value=!1,r("crop")},V=T=>{m.value=T.url,l.value=!0},C=T=>{if(T.length===0)return;const y=T[0];y.url=URL.createObjectURL(y),s.value=y,i.fileInfo.setFile&&i.fileInfo.setFile(y),i.withCrop&&V(s.value)};return e.watch(f,T=>{r("update:ratio",T)}),e.watch(()=>[i.fileInfo.description,i.fileInfo.order,i.fileInfo.fileSystemPath],()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),e.onBeforeMount(()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),(T,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:a,class:"column items-center q-my-md"},[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(p))},[e.createVNode(e.unref(E.QImg),{src:e.unref(s).url,ratio:e.unref(f),class:"uploaded-image",alt:"Загруженное изображение","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",ew,[e.createElementVNode("div",tw,[e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md","aria-label":"Изменить обрезку",onClick:y[0]||(y[0]=b=>V(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...y[5]||(y[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md","aria-label":"Удалить изображение",onClick:x},{default:e.withCtx(()=>[e.createVNode(nt,null,{default:e.withCtx(()=>[...y[6]||(y[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(E.QUploader),{key:0,id:e.unref(c),ref_key:"uploader",ref:u,class:"img-uploader",style:e.normalizeStyle(e.unref(S)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:C,onRemoved:x},{header:e.withCtx(()=>[e.createElementVNode("div",J0,[e.createVNode(e.unref(E.QUploaderAddTrigger)),e.createElementVNode("div",K0,[e.createVNode(e.unref(E.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),y[4]||(y[4]=e.createElementVNode("div",{class:"uploader-text text-primary text-center"},[e.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),e.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),e.createVNode(un,{modelValue:e.unref(l),"onUpdate:modelValue":y[3]||(y[3]=b=>e.isRef(l)?l.value=b:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.QSpace)),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",round:"",dense:"","aria-label":"Закрыть"},null,512),[[e.unref(o)]])]),_:1}),e.createVNode(e.unref(E.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(Z0,{ratio:e.unref(f),"onUpdate:ratio":y[1]||(y[1]=b=>e.isRef(f)?f.value=b:null),src:e.unref(m),onCrop:N,onClose:y[2]||(y[2]=b=>l.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],512))}}),[["__scopeId","data-v-e10bfc0c"]]);function ow(n){n.component("PMenuTabs",s0),n.component("PUploaderFile",h0),n.component("PUploaderImage",nw),n.component("PAuthForm",Ja),n.component("PAuthModal",i0)}const iw={install:function(n){Rg(n),n0(n),fy(n),ow(n),Z1(n)}};function rw(n,t={}){const{quasarPlugins:o=!0}=t;o&&n.use(E.Quasar,{plugins:{Notify:E.Notify,Dialog:E.Dialog}}),iw.install(n),Fa(n),ha(n),Da(n)}class sw extends No{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new ns);d(this,"method",Bn.Login);d(this,"id","field-auth-login")}}function aw(n,t={}){const o=t.ftsp??xt.Get(),i=e.ref(!1),r=e.computed(()=>n.Items),s=e.computed(()=>n.Count.value),a=e.computed(()=>n.Item),c=e.computed({get:()=>n.searchStr.value,set:x=>{n.searchStr.value=x}});return{loading:i,items:r,count:s,item:a,searchStr:c,ftsp:o,load:async()=>{i.value=!0;try{await n.FTSP({ftsp:o})}finally{i.value=!1}},get:x=>n.Get(x),create:x=>n.Create(x),update:x=>n.Update(x),remove:x=>n.Remove(x),reset:()=>{o.reset(),n.ResetState()}}}function lw(n=xt.Get()){const t=e.reactive(n),o=e.computed(()=>t.f),i=e.computed(()=>t.f.length);return{filters:o,count:i,add:f=>{t.setF(f)},addV2:f=>{t.setF2(f)},replace:(f,m)=>{t.replaceF(f,m)},remove:f=>{t.removeF(f)},has:f=>!!t.findFilterModel(f),clear:()=>{t.resetF()}}}function cw(n=xt.Get()){const t=e.reactive(n),o=e.computed({get:()=>t.p.getPageNum(),set:x=>{t.p.page=(Math.max(1,Math.round(x))-1)*t.p.rowsPerPage}}),i=e.computed({get:()=>t.p.rowsPerPage,set:x=>{t.p.rowsPerPage=x,t.p.page=0}}),r=e.computed(()=>t.p.rowsNumber),s=e.computed(()=>({page:o.value,rowsPerPage:i.value,rowsNumber:r.value}));return{page:o,rowsPerPage:i,rowsNumber:r,goTo:x=>{o.value=x},next:()=>{t.p.page+=t.p.rowsPerPage},prev:()=>{t.p.page=Math.max(0,t.p.page-t.p.rowsPerPage)},reset:()=>{t.p.page=0},drop:()=>{t.p.drop()},setLoadMore:(x,N,V)=>{t.p.setLoadMore(x,N,V)},setLoadMoreV2:(x,N,V)=>{t.p.setLoadMoreV2(x,N,V)},setAllLoaded:x=>{t.p.setAllLoaded(x)},pagination:s}}const dw=5*60*1e3,uw=5*1e3;let Nl=!1,Hr=0,fi=!1,Ur=!1;function mi(n,t,o="",i=!1){const r=n.UserInfo(),s={operation:t,reason:o,userName:(r==null?void 0:r.username)||(r==null?void 0:r.email)||"",userId:(r==null?void 0:r.id)||"",roleCode:((r==null?void 0:r.roles)||[])[0]||"",accessToken:n.getToken()||""};try{const a=JSON.stringify(s);if(!Ce.baseUrl){fetch("/api/auth/log",{method:"POST",headers:{"Content-Type":"application/json",...n.getToken()?{token:n.getToken()}:{}},body:a,keepalive:!0}).catch(c=>console.warn("[AuthLog] Ранний запрос не отправлен",t,c));return}if(i&&typeof navigator.sendBeacon=="function"){navigator.sendBeacon("/api/auth/log",new Blob([a],{type:"application/json"}));return}Ce.Post({query:"auth/log",payload:s})}catch(a){console.warn("[AuthLog] Не удалось отправить событие",t,a)}}function vr(n,t,o=!1){fi||(fi=!0,mi(n,"logout",t,o))}function fw(n){if(Nl)return;Nl=!0,n.on("login",()=>{const o=Date.now();o-Hr<uw||(Hr=o,fi=!1,Ur=!1,mi(n,"login"))}),n.on("logout",()=>{Ur=!0,vr(n,"user")}),n.on("session-expired",()=>vr(n,"token-expired")),n.isAuth()&&(Hr=Date.now(),fi=!1,mi(n,"login"));const t=()=>{n.isAuth()&&vr(n,Ur?"user":"tab-close",!0)};window.addEventListener("pagehide",t),window.addEventListener("beforeunload",t),window.setInterval(()=>{n.isAuth()&&mi(n,"heartbeat")},dw)}const mw=["PF","PFM"];O.AuthButtonLogin=Ci,O.AuthButtonRefresh=es,O.AuthButtonRegister=Si,O.AuthButtonRestore=Bo,O.AuthChunks=Fe,O.AuthFieldsIds=zt,O.AuthFormSettings=is,O.AuthMethods=Bn,O.EmailField=Vo,O.LoginField=sw,O.PAddDialog=Qa,O.PBadge=uo,O.PButton=ne,O.PCard=Ya,O.PCheckBox=Oa,O.PChip=fr,O.PContactForm=er,O.PContactFormDeleteDialog=fo,O.PContactFormEdit=tr,O.PContactFormEditDialog=mo,O.PContactFormEditEmails=nr,O.PContactFormEditPhones=or,O.PContactFormView=ir,O.PContactFormViewEmails=fn,O.PContactFormViewPhones=mn,O.PCrudList=Xa,O.PDateInput=La,O.PDateTimeInput=_a,O.PDialog=un,O.PEditDialog=Hn,O.PF=z,O.PFM=ug,O.PHint=xr,O.PInput=Ze,O.POptionsListSingle=ei,O.POpts=Ha,O.PSelect=wo,O.PTable=Cr,O.PTableBadge=mr,O.PTableBadges=hr,O.PTableCount=pr,O.PTableEdit=gr,O.PTableNumber=yr,O.PTableSelect=wr,O.PTableString=br,O.PTableToggle=Ua,O.PTabs=Sr,O.PTabsLeft=kr,O.PToggle=va,O.PasswordField=$o,O.PasswordRepeatField=os,O.Schedule=po,O.ScheduleDay=Ko,O.ScheduleDefaultLabels=ur,O.ScheduleGridEditor=Aa,O.SchedulePlace=Ln,O.ScheduleSession=On,O.ScheduleSlot=Ft,O.ScheduleTimeline=za,O.TabsStore=ti,O.defaultContactsLabels=Nt,O.initAuthLog=fw,O.installSprof=rw,O.pfName=mw,O.useCrud=aw,O.useFilters=lw,O.usePagination=cw,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
|
43
|
+
***************************************************************************** */function il(n,t){var o,i;return n&&t?(o=""+n+t[0].toUpperCase()+t.slice(1),i=n+"-"+t):(o=n||t,i=n||t),{name:o,classname:i}}function rl(n){return/^blob:/.test(n)}function sl(n){return rl(n)||function(t){return/^data:/.test(t)}(n)}function qn(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Ae(n){return n===void 0}function ii(n){return typeof n=="object"&&n!==null}function $r(n,t,o){var i={};return ii(n)?(Object.keys(t).forEach(function(r){Ae(n[r])?i[r]=t[r]:ii(t[r])?ii(n[r])?i[r]=$r(n[r],t[r],o[r]):i[r]=n[r]?t[r]:o[r]:t[r]===!0||t[r]===!1?i[r]=!!n[r]:i[r]=n[r]}),i):n?t:o}function ri(n){var t=Number(n);return Number.isNaN(t)?n:t}function al(n){return typeof(n=="number"||function(t){return typeof t=="object"&&t!==null}(n)&&toString.call(n)=="[object Number]")&&!ll(n)}function ll(n){return n!=n}function cl(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}var Co=function(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.type="manipulateImage",this.move=n,this.scale=t},$0=function(n,t){t===void 0&&(t={}),this.type="resize",this.directions=n,this.params=t},Tr=function(n){this.type="move",this.directions=n},T0=function(){function n(t,o,i,r,s){this.type="drag",this.nativeEvent=t,this.position=i,this.previousPosition=r,this.element=o,this.anchor=s}return n.prototype.shift=function(){var t=this,o=t.element,i=t.anchor,r=t.position;if(o){var s=o.getBoundingClientRect(),a=s.left,c=s.top;return{left:r.left-a-i.left,top:r.top-c-i.top}}return{left:0,top:0}},n}(),Pr={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(n){n.cancelable&&!this.disabled&&n.touches.length===1&&(this.touches=bn(n.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),n.touches.length&&this.initAnchor(this.touches.reduce(function(t,o){return{clientX:t.clientX+o.clientX/n.touches.length,clientY:t.clientY+o.clientY/n.touches.length}},{clientX:0,clientY:0})),n.preventDefault&&n.preventDefault(),n.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(n){this.touches.length&&(this.processMove(n,n.touches),n.preventDefault&&n.preventDefault(),n.stopPropagation&&n.stopPropagation())},onMouseDown:function(n){if(!this.disabled){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.draggable.getBoundingClientRect(),o=t.left,i=t.right,r=t.bottom,s=t.top;this.anchor={left:n.clientX-o,top:n.clientY-s,bottom:r-n.clientY,right:i-n.clientX}},processMove:function(n,t){var o=bn(t);if(this.touches.length){if(this.touches.length===1&&o.length===1){var i=this.$refs.draggable;this.$emit("drag",new T0(n,i,{left:o[0].clientX,top:o[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=o}},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"]};Pr.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"draggable",class:o.classname,onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onMouseover:t[3]||(t[3]=function(){return s.onMouseOver&&s.onMouseOver.apply(s,arguments)}),onMouseleave:t[4]||(t[4]=function(){return s.onMouseLeave&&s.onMouseLeave.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],34)};var Mr=bt("vue-handler-wrapper"),dl={name:"HandlerWrapper",components:{DraggableElement:Pr},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var n;if(this.horizontalPosition||this.verticalPosition){var t,o=il(this.horizontalPosition,this.verticalPosition);n=Mr((ft(t={},o.classname,!0),ft(t,"disabled",this.disabled),t))}else n=Mr({disabled:this.disabled});return{root:n,draggable:Mr("draggable")}}},emits:["leave","enter","drag","drag-end"]};dl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock("div",{class:s.classes.root},[e.createVNode(a,{class:s.classes.draggable,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])],2)};var P0=bt("vue-line-wrapper"),ul={name:"LineWrapper",components:{DraggableElement:Pr},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var n;return P0((ft(n={},this.position,!0),ft(n,"disabled",this.disabled),n))}},emits:["leave","enter","drag","drag-end"]};ul.render=function(n,t,o,i,r,s){var a=e.resolveComponent("DraggableElement");return e.openBlock(),e.createBlock(a,{class:s.classname,onDrag:t[1]||(t[1]=function(c){return n.$emit("drag",c)}),onDragEnd:t[2]||(t[2]=function(c){return n.$emit("drag-end")}),onLeave:t[3]||(t[3]=function(c){return n.$emit("leave")}),onEnter:t[4]||(t[4]=function(c){return n.$emit("enter")})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["class"])};var Nt=["left","right","top","bottom"],M0=["left","right"],I0=["top","bottom"],R0=["left","top"],A0=["fill-area","fit-area","stencil","none"],fl={left:0,top:0,width:0,height:0};function ml(n,t,o){return!(o=o||["width","height","left","top"]).some(function(i){return n[i]!==t[i]})}function $t(n){return{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}function jn(n,t){return{left:n.left-t.left,top:n.top-t.top}}function He(n){return{left:n.left+n.width/2,top:n.top+n.height/2}}function So(n,t){var o={left:0,top:0,right:0,bottom:0};return Nt.forEach(function(i){var r=t[i],s=$t(n)[i];o[i]=r!==void 0&&s!==void 0?i==="left"||i==="top"?Math.max(0,r-s):Math.max(0,s-r):0}),o}function Tt(n,t){return{left:n.left-t.left,top:n.top-t.top,width:n.width+t.left+t.right,height:n.height+t.top+t.bottom}}function si(n){return{left:-n.left,top:-n.top}}function it(n,t){return X(X({},n),{left:n.left+t.left,top:n.top+t.top})}function mt(n,t,o,i){if(t!==1){if(o){var r=He(n);return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2+(o.left-r.left)*(1-t),top:n.top+n.height*(1-t)/2+(o.top-r.top)*(1-t)}}return{width:n.width*t,height:n.height*t,left:n.left+n.width*(1-t)/2,top:n.top+n.height*(1-t)/2}}return n}function ue(n){return n.width/n.height}function Wn(n,t){return Math.min(t.right!==void 0&&t.left!==void 0?(t.right-t.left)/n.width:1/0,t.bottom!==void 0&&t.top!==void 0?(t.bottom-t.top)/n.height:1/0)}function Gn(n,t){var o={left:0,top:0},i=So(n,t);return i.left&&i.left>0?o.left=i.left:i.right&&i.right>0&&(o.left=-i.right),i.top&&i.top>0?o.top=i.top:i.bottom&&i.bottom>0&&(o.top=-i.bottom),o}function Ir(n,t){var o;return t.minimum&&n<t.minimum?o=t.minimum:t.maximum&&n>t.maximum&&(o=t.maximum),o}function hl(n,t){var o=ue(n),i=ue(t);return t.width<1/0&&t.height<1/0?o>i?{width:t.width,height:t.width/o}:{width:t.height*o,height:t.height}:t.width<1/0?{width:t.width,height:t.width/o}:t.height<1/0?{width:t.height*o,height:t.height}:n}function pl(n,t){var o=t*Math.PI/180;return{width:Math.abs(n.width*Math.cos(o))+Math.abs(n.height*Math.sin(o)),height:Math.abs(n.width*Math.sin(o))+Math.abs(n.height*Math.cos(o))}}function Gt(n,t){var o=t*Math.PI/180;return{left:n.left*Math.cos(o)-n.top*Math.sin(o),top:n.left*Math.sin(o)+n.top*Math.cos(o)}}function ai(n,t){var o=So(Ue(n,t),t);return o.left+o.right+o.top+o.bottom?o.left+o.right>o.top+o.bottom?Math.min((n.width+o.left+o.right)/n.width,Wn(n,t)):Math.min((n.height+o.top+o.bottom)/n.height,Wn(n,t)):1}function Ue(n,t,o){o===void 0&&(o=!1);var i=Gn(n,t);return it(n,o?si(i):i)}function Rr(n){return{width:n.right!==void 0&&n.left!==void 0?n.right-n.left:1/0,height:n.bottom!==void 0&&n.top!==void 0?n.bottom-n.top:1/0}}function z0(n,t){return X(X({},n),{minWidth:Math.min(t.width,n.minWidth),minHeight:Math.min(t.height,n.minHeight),maxWidth:Math.min(t.width,n.maxWidth),maxHeight:Math.min(t.height,n.maxHeight)})}function gl(n,t,o){o===void 0&&(o=!0);var i={};return Nt.forEach(function(r){var s=n[r],a=t[r];s!==void 0&&a!==void 0?i[r]=r==="left"||r==="top"?o?Math.max(s,a):Math.min(s,a):o?Math.min(s,a):Math.max(s,a):a!==void 0?i[r]=a:s!==void 0&&(i[r]=s)}),i}function li(n,t){return gl(n,t,!0)}function yl(n){var t=n.size,o=n.aspectRatio,i=n.ignoreMinimum,r=n.sizeRestrictions;return!!((t.correctRatio||ue(t)>=o.minimum&&ue(t)<=o.maximum)&&t.height<=r.maxHeight&&t.width<=r.maxWidth&&t.width&&t.height&&(i||t.height>=r.minHeight&&t.width>=r.minWidth))}function wl(n,t){return Math.pow(n.width-t.width,2)+Math.pow(n.height-t.height,2)}function Ot(n){var t=n.width,o=n.height,i=n.sizeRestrictions,r={minimum:n.aspectRatio&&n.aspectRatio.minimum||0,maximum:n.aspectRatio&&n.aspectRatio.maximum||1/0},s={width:Math.max(i.minWidth,Math.min(i.maxWidth,t)),height:Math.max(i.minHeight,Math.min(i.maxHeight,o))};function a(u,f){return f===void 0&&(f=!1),u.reduce(function(m,p){return yl({size:p,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:f})&&(!m||wl(p,{width:t,height:o})<wl(m,{width:t,height:o}))?p:m},null)}var c=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&c.push({width:s.width,height:s.width/u,correctRatio:!0},{width:s.height*u,height:s.height,correctRatio:!0})}),yl({size:s,aspectRatio:r,sizeRestrictions:i})&&c.push(s);var l=a(c)||a(c,!0);return l&&{width:l.width,height:l.height}}function Ar(n){var t=n.event,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=it(o,t.directions);return it(s,Gn(s,r))}function D0(n){var t=n.coordinates,o=n.transform,i=n.imageSize,r=n.sizeRestrictions,s=n.positionRestrictions,a=n.aspectRatio,c=n.visibleArea,l=function(f,m){return Ar({coordinates:f,positionRestrictions:s,event:new Tr({left:m.left-f.left,top:m.top-f.top})})},u=X({},t);return(Array.isArray(o)?o:[o]).forEach(function(f){var m={};Ae((m=typeof f=="function"?f({coordinates:u,imageSize:i,visibleArea:c}):f).width)&&Ae(m.height)||(u=function(p,S){var E=X(X(X({},p),Ot({width:S.width,height:S.height,sizeRestrictions:r,aspectRatio:a})),{left:0,top:0});return l(E,{left:p.left,top:p.top})}(u,X(X({},u),m))),Ae(m.left)&&Ae(m.top)||(u=l(u,X(X({},u),m)))}),u}function F0(n){n.event;var t=n.getAreaRestrictions,o=n.boundaries,i=n.coordinates,r=n.visibleArea;n.aspectRatio;var s=n.stencilSize,a=n.sizeRestrictions,c=n.positionRestrictions;n.stencilReference;var l,u,f,m=X({},i),p=X({},r),S=X({},s);l=ue(S),u=ue(m),f===void 0&&(f=.001),(l===0||u===0?Math.abs(u-l)<f:Math.abs(u/l)<1+f&&Math.abs(u/l)>1-f)||(m=X(X({},m),Ot({sizeRestrictions:a,width:m.width,height:m.height,aspectRatio:{minimum:ue(S),maximum:ue(S)}})));var E=ai(p=mt(p,m.width*o.width/(p.width*S.width)),t({visibleArea:p,type:"resize"}));return E!==1&&(p=mt(p,E),m=mt(m,E)),p=Ue(p=it(p,jn(He(m),He(p))),t({visibleArea:p,type:"move"})),{coordinates:m=Ue(m,li($t(p),c)),visibleArea:p}}function O0(n){var t=n.event,o=n.getAreaRestrictions,i=n.boundaries,r=n.coordinates,s=n.visibleArea;n.aspectRatio,n.stencilSize,n.sizeRestrictions;var a=n.positionRestrictions;n.stencilReference;var c=X({},r),l=X({},s);if(r&&s&&t.type!=="manipulateImage"){var u={width:0,height:0};l.width,i.width,ue(i)>ue(c)?(u.height=.8*i.height,u.width=u.height*ue(c)):(u.width=.8*i.width,u.height=u.width*ue(c));var f=ai(l=mt(l,c.width*i.width/(l.width*u.width)),o({visibleArea:l,type:"resize"}));l=mt(l,f),f!==1&&(u.height/=f,u.width/=f),l=Ue(l=it(l,jn(He(c),He(l))),o({visibleArea:l,type:"move"})),c=Ue(c,li($t(l),a))}return{coordinates:c,visibleArea:l}}function L0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.getAreaRestrictions,s=X({},i),a=X({},o);if(t.type==="setCoordinates"){var c=Math.max(0,a.width-s.width),l=Math.max(0,a.height-s.height);c>l?s=mt(s,Math.min(a.width/s.width,Wn(s,r({visibleArea:s,type:"resize"})))):l>c&&(s=mt(s,Math.min(a.height/s.height,Wn(s,r({visibleArea:s,type:"resize"}))))),s=Ue(s=it(s,si(Gn(a,$t(s)))),r({visibleArea:s,type:"move"}))}return{visibleArea:s,coordinates:a}}function _0(n){var t=n.imageSize,o=n.visibleArea,i=n.coordinates,r=o||t;return{left:(o?o.left:0)+r.width/2-i.width/2,top:(o?o.top:0)+r.height/2-i.height/2}}function H0(n){var t=n.imageSize,o=n.visibleArea,i=n.aspectRatio,r=n.sizeRestrictions,s=o||t,a=Math.min(i.maximum||1/0,Math.max(i.minimum||0,ue(s))),c=s.width<s.height?{width:.8*s.width,height:.8*s.width/a}:{height:.8*s.height,width:.8*s.height*a};return Ot(X(X({},c),{aspectRatio:i,sizeRestrictions:r}))}function U0(n){var t,o,i=n.imageSize,r=n.visibleArea,s=n.boundaries,a=n.aspectRatio,c=n.sizeRestrictions,l=n.stencilSize,u=r||i;return ue(u)>ue(s)?o=(t=l.height*u.height/s.height)*ue(l):t=(o=l.width*u.width/s.width)/ue(l),Ot({width:o,height:t,aspectRatio:a,sizeRestrictions:c})}function v0(n){var t=n.getAreaRestrictions,o=n.coordinates,i=n.imageSize,r=ue(n.boundaries);if(o){var s={height:Math.max(o.height,i.height),width:Math.max(o.width,i.width)},a=hl({width:ue(s)>r?s.width:s.height*r,height:ue(s)>r?s.width/r:s.height},Rr(t())),c={left:o.left+o.width/2-a.width/2,top:o.top+o.height/2-a.height/2,width:a.width,height:a.height},l=So(o,$t(X({left:0,top:0},i))),u={};return!l.left&&!l.right&&c.width<=i.width&&(u.left=0,u.right=i.width),!l.top&&!l.bottom&&c.height<=i.height&&(u.top=0,u.bottom=i.height),Ue(c,u)}var f=ue(i);return a={height:f>r?i.height:i.width/r,width:f>r?i.height*r:i.width},{left:i.width/2-a.width/2,top:i.height/2-a.height/2,width:a.width,height:a.height}}function ci(n,t){return gl(n,$t(t))}function q0(n){var t=n.event,o=n.coordinates,i=n.visibleArea,r=n.sizeRestrictions,s=n.getAreaRestrictions,a=n.positionRestrictions,c=n.adjustStencil,l=t.scale,u=t.move,f=X({},i),m=X({},o),p=1,S=1,E=l.factor&&Math.abs(l.factor-1)>.001;f=it(f,{left:u.left||0,top:u.top||0});var P={stencil:{minimum:Math.max(r.minWidth?r.minWidth/m.width:0,r.minHeight?r.minHeight/m.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/m.width:1/0,r.maxHeight?r.maxHeight/m.height:1/0,Wn(m,a))},area:{maximum:Wn(f,s({visibleArea:f,type:"resize"}))}};l.factor&&E&&(l.factor<1?(S=Math.max(l.factor,P.stencil.minimum))>1&&(S=1):l.factor>1&&(S=Math.min(l.factor,Math.min(P.area.maximum,P.stencil.maximum)))<1&&(S=1)),S&&(f=mt(f,S,l.center));var V=o.left-i.left,x=i.width+i.left-(o.width+o.left),$=o.top-i.top,b=i.height+i.top-(o.height+o.top);return f=Ue(f=it(f,Gn(f,{left:a.left!==void 0?a.left-V*S:void 0,top:a.top!==void 0?a.top-$*S:void 0,bottom:a.bottom!==void 0?a.bottom+b*S:void 0,right:a.right!==void 0?a.right+x*S:void 0})),s({visibleArea:f,type:"move"})),m.width=m.width*S,m.height=m.height*S,m.left=f.left+V*S,m.top=f.top+$*S,m=Ue(m,li($t(f),a)),l.factor&&E&&c&&(l.factor>1?p=Math.min(P.area.maximum,l.factor)/S:l.factor<1&&(p=Math.max(m.height/f.height,m.width/f.width,l.factor/S)),p!==1&&(f=it(f=Ue(f=mt(f,p,l.factor>1?l.center:He(m)),s({visibleArea:f,type:"move"})),si(Gn(m,$t(f)))))),{coordinates:m,visibleArea:f}}function j0(n){var t=n.aspectRatio,o=n.getAreaRestrictions,i=n.coordinates,r=n.visibleArea,s=n.sizeRestrictions,a=n.positionRestrictions,c=n.imageSize,l=n.previousImageSize,u=n.angle,f=X({},i),m=X({},r),p=Gt(He(X({left:0,top:0},l)),u);return(f=X(X({},Ot({sizeRestrictions:s,aspectRatio:t,width:f.width,height:f.height})),Gt(He(f),u))).left-=p.left-c.width/2+f.width/2,f.top-=p.top-c.height/2+f.height/2,m=mt(m,ai(m,o({visibleArea:m,type:"resize"}))),{coordinates:f=Ue(f,a),visibleArea:m=Ue(m=it(m,jn(He(f),He(i))),o({visibleArea:m,type:"move"}))}}function W0(n){var t=n.flip,o=n.previousFlip,i=n.rotate,r=n.getAreaRestrictions,s=n.coordinates,a=n.visibleArea,c=n.imageSize,l=X({},s),u=X({},a),f=o.horizontal!==t.horizontal,m=o.vertical!==t.vertical;if(f||m){var p=Gt({left:c.width/2,top:c.height/2},-i),S=Gt(He(l),-i),E=Gt({left:f?p.left-(S.left-p.left):S.left,top:m?p.top-(S.top-p.top):S.top},i);l=it(l,jn(E,He(l))),S=Gt(He(u),-i),u=Ue(u=it(u,jn(E=Gt({left:f?p.left-(S.left-p.left):S.left,top:m?p.top-(S.top-p.top):S.top},i),He(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function bl(n){var t=n.directions,o=n.coordinates,i=n.positionRestrictions,r=i===void 0?{}:i,s=n.sizeRestrictions,a=n.preserveRatio,c=n.compensate,l=X({},t),u=Tt(o,l).width,f=Tt(o,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(o.width-s.minWidth)/(l.left/l.right),l.right=-(o.width-s.minWidth)/(l.right/l.left)):l.left<0?l.left=-(o.width-s.minWidth):l.right<0&&(l.right=-(o.width-s.minWidth))),f<0&&(l.top<0&&l.bottom<0?(l.top=-(o.height-s.minHeight)/(l.top/l.bottom),l.bottom=-(o.height-s.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(o.height-s.minHeight):l.bottom<0&&(l.bottom=-(o.height-s.minHeight)));var m=So(Tt(o,l),r);c&&(m.left&&m.left>0&&m.right===0?(l.right+=m.left,l.left-=m.left):m.right&&m.right>0&&m.left===0&&(l.left+=m.right,l.right-=m.right),m.top&&m.top>0&&m.bottom===0?(l.bottom+=m.top,l.top-=m.top):m.bottom&&m.bottom>0&&m.top===0&&(l.top+=m.bottom,l.bottom-=m.bottom),m=So(Tt(o,l),r));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(Nt.forEach(function(P){var V=m[P];V&&l[P]&&(p[P]=Math.max(0,1-V/l[P]))}),a){var S=Math.min.apply(null,Nt.map(function(P){return p[P]}));S!==1/0&&Nt.forEach(function(P){l[P]*=S})}else Nt.forEach(function(P){p[P]!==1/0&&(l[P]*=p[P])});if(u=Tt(o,l).width,f=Tt(o,l).height,l.right+l.left&&(u>s.maxWidth?p.width=(s.maxWidth-o.width)/(l.right+l.left):u<s.minWidth&&(p.width=(s.minWidth-o.width)/(l.right+l.left))),l.bottom+l.top&&(f>s.maxHeight?p.height=(s.maxHeight-o.height)/(l.bottom+l.top):f<s.minHeight&&(p.height=(s.minHeight-o.height)/(l.bottom+l.top))),a){var E=Math.min(p.width,p.height);E!==1/0&&Nt.forEach(function(P){l[P]*=E})}else p.width!==1/0&&M0.forEach(function(P){l[P]*=p.width}),p.height!==1/0&&I0.forEach(function(P){l[P]*=p.height});return l}function di(n,t,o){return t==0&&o==0?n/2:t==0?0:o==0?n:n*Math.abs(t/(t+o))}var G0=bt("vue-simple-handler"),Q0=bt("vue-simple-handler-wrapper"),zr={name:"SimpleHandler",components:{HandlerWrapper:dl},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 n,t=(ft(n={},this.horizontalPosition,!!this.horizontalPosition),ft(n,this.verticalPosition,!!this.verticalPosition),ft(n,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),ft(n,"hover",this.hover),n);return{default:Me(G0(t),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(Q0(t),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};zr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("HandlerWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,"vertical-position":o.verticalPosition,"horizontal-position":o.horizontalPosition,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Y0=bt("vue-simple-line"),X0=bt("vue-simple-line-wrapper"),Dr={name:"SimpleLine",components:{LineWrapper:ul},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:Me(Y0(ft({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Me(X0(ft({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(n){this.$emit("drag",n)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Dr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("LineWrapper");return e.openBlock(),e.createBlock(a,{class:s.classes.wrapper,position:o.position,disabled:o.disabled,onDrag:s.onDrag,onDragEnd:s.onDragEnd,onEnter:s.onEnter,onLeave:s.onLeave},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Fr=bt("vue-bounding-box"),Z0=["east","west",null],J0=["south","north",null],Cl={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 zr}},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 Dr}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var n=[];return Z0.forEach(function(t){J0.forEach(function(o){if(t!==o){var i=il(t,o),r=i.name,s=i.classname;n.push({name:r,classname:s,verticalDirection:o,horizontalDirection:t})}})}),{points:n}},computed:{style:function(){var n={};return this.width&&this.height&&(n.width="".concat(this.width,"px"),n.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),n},classes:function(){var n=this.handlersClasses,t=this.handlersWrappersClasses,o=this.linesClasses,i=this.linesWrappersClasses;return{root:Fr(),handlers:n,handlersWrappers:t,lines:o,linesWrappers:i}},lineNodes:function(){var n=this,t=[];return this.points.forEach(function(o){o.horizontalDirection&&o.verticalDirection||!n.lines[o.name]||t.push({name:o.name,component:n.linesComponent,class:Me(n.classes.lines.default,n.classes.lines[o.name],!n.resizable&&n.classes.lines.disabled),wrapperClass:Me(n.classes.linesWrappers.default,n.classes.linesWrappers[o.name],!n.resizable&&n.classes.linesWrappers.disabled),hoverClass:n.classes.lines.hover,verticalDirection:o.verticalDirection,horizontalDirection:o.horizontalDirection,disabled:!n.resizable})}),t},handlerNodes:function(){var n=this,t=[],o=this.width,i=this.height;return this.points.forEach(function(r){if(n.handlers[r.name]){var s={name:r.name,component:n.handlersComponent,class:Me(n.classes.handlers.default,n.classes.handlers[r.name]),wrapperClass:Me(n.classes.handlersWrappers.default,n.classes.handlersWrappers[r.name]),hoverClass:n.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!n.resizable};if(o&&i){var a=r.horizontalDirection,c=r.verticalDirection,l=a==="east"?o:a==="west"?0:o/2,u=c==="south"?i:c==="north"?0:i/2;s.wrapperClass=Fr("handler"),s.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},n.transitions&&n.transitions.enabled&&(s.wrapperStyle.transition="".concat(n.transitions.time,"ms ").concat(n.transitions.timingFunction))}else s.wrapperClass=Fr("handler",ft({},r.classname,!0));t.push(s)}}),t}},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(n,t,o){var i,r=n.shift(),s=r.left,a=r.top,c={left:0,right:0,top:0,bottom:0};t==="west"?c.left-=s:t==="east"&&(c.right+=s),o==="north"?c.top-=a:o==="south"&&(c.bottom+=a),!o&&t?i="width":o&&!t&&(i="height"),this.resizable&&this.$emit("resize",new $0(c,{allowedDirections:{left:t==="west"||!t,right:t==="east"||!t,bottom:o==="south"||!o,top:o==="north"||!o},preserveAspectRatio:n.nativeEvent&&n.nativeEvent.shiftKey,respectDirection:i}))}},emits:["resize","resize-end"]};Cl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"box",class:s.classes.root,style:s.style},[e.renderSlot(n.$slots,"default"),e.createVNode("div",null,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.lineNodes,function(a){return e.openBlock(),e.createBlock(e.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 s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[1]||(t[1]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(s.handlerNodes,function(a){return e.openBlock(),e.createBlock("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(e.openBlock(),e.createBlock(e.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 s.onHandlerDrag(c,a.horizontalDirection,a.verticalDirection)},onDragEnd:t[2]||(t[2]=function(c){return s.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var K0=bt("vue-draggable-area"),Sl={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:K0()}}},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(n){if(n.cancelable){var t=this.movable&&n.touches.length===1;t&&(this.touches=bn(n.touches)),(this.touchStarted||t)&&(n.preventDefault(),n.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(n){this.touches.length>=1&&(this.touchStarted?(this.processMove(n,n.touches),n.preventDefault(),n.stopPropagation()):cl({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:n.touches[0].clientX,y:n.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(n){if(this.movable&&n.button===0){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.initAnchor(t),n.stopPropagation()}},onMouseMove:function(n){this.touches.length&&(this.processMove(n,[{fake:!0,clientX:n.clientX,clientY:n.clientY}]),n.preventDefault&&n.cancelable&&n.preventDefault(),n.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(n){var t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top;this.anchor={x:n.clientX-o,y:n.clientY-i}},processMove:function(n,t){var o=bn(t);if(this.touches.length){var i=this.$refs.container.getBoundingClientRect(),r=i.left,s=i.top;this.touches.length===1&&o.length===1&&this.$emit("move",new Tr({left:o[0].clientX-(r+this.anchor.x),top:o[0].clientY-(s+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};Sl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};function Or(n){var t,o;return{rotate:n.rotate||0,flip:{horizontal:((t=n==null?void 0:n.flip)===null||t===void 0?void 0:t.horizontal)||!1,vertical:((o=n==null?void 0:n.flip)===null||o===void 0?void 0:o.vertical)||!1}}}function ew(n){return new Promise(function(t,o){try{if(n)if(/^data:/i.test(n))t(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),f=u.length,m=new ArrayBuffer(f),p=new Uint8Array(m),S=0;S<f;S++)p[S]=u.charCodeAt(S);return m}(n));else if(/^blob:/i.test(n)){var i=new FileReader;i.onload=function(l){t(l.target.result)},s=n,a=function(l){i.readAsArrayBuffer(l)},(c=new XMLHttpRequest).open("GET",s,!0),c.responseType="blob",c.onload=function(){this.status!=200&&this.status!==0||a(this.response)},c.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?t(r.response):o("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",n,!0),r.responseType="arraybuffer",r.send(null)}else o("Error: the image is empty")}catch(l){o(l)}var s,a,c})}function kl(n){var t=n.rotate,o=n.flip,i=n.scaleX,r=n.scaleY,s="";return s+=" rotate("+t+"deg) ",s+=" scaleX("+i*(o.horizontal?-1:1)+") ",s+=" scaleY("+r*(o.vertical?-1:1)+") "}function tw(n){try{var t,o=new DataView(n),i=void 0,r=void 0,s=void 0,a=void 0;if(o.getUint8(0)===255&&o.getUint8(1)===216)for(var c=o.byteLength,l=2;l+1<c;){if(o.getUint8(l)===255&&o.getUint8(l+1)===225){s=l;break}l++}if(s&&(i=s+10,function(S,E,P){var V,x="";for(V=E,P+=E;V<P;V++)x+=String.fromCharCode(S.getUint8(V));return x}(o,s+4,4)==="Exif")){var u=o.getUint16(i);if(((r=u===18761)||u===19789)&&o.getUint16(i+2,r)===42){var f=o.getUint32(i+4,r);f>=8&&(a=i+f)}}if(a){for(var m=o.getUint16(a,r),p=0;p<m;p++)if(l=a+12*p+2,o.getUint16(l,r)===274){l+=8,t=o.getUint16(l,r),o.setUint16(l,1,r);break}}return t}catch{return null}}function xl(n,t){var o=t.getBoundingClientRect(),i=o.left,r=o.top,s={left:0,top:0},a=0;return n.forEach(function(c){s.left+=(c.clientX-i)/n.length,s.top+=(c.clientY-r)/n.length}),n.forEach(function(c){a+=cl({x:s.left,y:s.top},{x:c.clientX-i,y:c.clientY-r})}),{centerMass:s,spread:a,count:n.length}}var El={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=Nr(this.processEnd),this.touches=[]},methods:{processMove:function(n,t){if(this.touches.length){if(this.touches.length===1&&t.length===1)this.$emit("move",new Co({left:this.touches[0].clientX-t[0].clientX,top:this.touches[0].clientY-t[0].clientY}));else if(this.touches.length>1&&this.touchResize){var o=xl(t,this.$refs.container),i=this.oldGeometricProperties;i.count===o.count&&i.count>1&&this.$emit("resize",new Co({left:i.centerMass.left-o.centerMass.left,top:i.centerMass.top-o.centerMass.top},{factor:i.spread/o.spread,center:o.centerMass})),this.oldGeometricProperties=o}this.touches=t}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(n){return this.eventsFilter?this.eventsFilter(n,this.transforming)!==!1:(n.preventDefault(),n.stopPropagation(),!0)},onTouchStart:function(n){if(n.cancelable&&(this.touchMove||this.touchResize&&n.touches.length>1)&&this.processEvent(n)){var t=this.$refs.container,o=t.getBoundingClientRect(),i=o.left,r=o.top,s=o.bottom,a=o.right;this.touches=bn(n.touches).filter(function(c){return c.clientX>i&&c.clientX<a&&c.clientY>r&&c.clientY<s}),this.oldGeometricProperties=xl(this.touches,t)}},onTouchEnd:function(n){n.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(n){var t=this;if(this.touches.length){var o=bn(n.touches).filter(function(i){return!i.identifier||t.touches.find(function(r){return r.identifier===i.identifier})});this.processEvent(n)&&(this.processMove(n,o),this.processStart())}},onMouseDown:function(n){if(this.mouseMove&&"buttons"in n&&n.buttons===1&&this.processEvent(n)){var t={fake:!0,clientX:n.clientX,clientY:n.clientY};this.touches=[t],this.processStart()}},onMouseMove:function(n){this.touches.length&&this.processEvent(n)&&this.processMove(n,[{clientX:n.clientX,clientY:n.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(n){if(this.wheelResize&&this.processEvent(n)){var t=this.$refs.container.getBoundingClientRect(),o=t.left,i=t.top,r=1+this.wheelResize.ratio*(a=n.deltaY||n.detail||n.wheelDelta,(c=+a)==0||ll(c)?c:c>0?1:-1),s={left:n.clientX-o,top:n.clientY-i};this.$emit("resize",new Co({},{factor:r,center:s})),this.touches.length||this.debouncedProcessEnd()}var a,c}},emits:["resize","move","transform-end"]};El.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"container",onTouchstart:t[1]||(t[1]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onMousedown:t[2]||(t[2]=function(){return s.onMouseDown&&s.onMouseDown.apply(s,arguments)}),onWheel:t[3]||(t[3]=function(){return s.onWheel&&s.onWheel.apply(s,arguments)})},[e.renderSlot(n.$slots,"default")],544)};var Lr={components:{TransformableImage:El},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"]};Lr.render=function(n,t,o,i,r,s){var a=e.resolveComponent("transformable-image");return e.openBlock(),e.createBlock(a,{"touch-move":o.touchMove,"touch-resize":o.touchResize,"mouse-move":o.mouseMove,"wheel-resize":o.wheelResize,onMove:t[1]||(t[1]=function(c){return n.$emit("move",c)}),onResize:t[2]||(t[2]=function(c){return n.$emit("resize",c)})},{default:e.withCtx(function(){return[e.renderSlot(n.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var ui=bt("vue-preview"),Bl={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:ui({fill:this.fill}),wrapper:ui("wrapper"),imageWrapper:ui("image-wrapper"),image:Me(ui("image"),this.imageClass)}},style:function(){if(this.fill)return{};var n={};return this.width&&(n.width="".concat(this.size.width,"px")),this.height&&(n.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},wrapperStyle:function(){var n={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&&(n.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),n},imageStyle:function(){if(this.coordinates&&this.image){var n=this.coordinates.width/this.size.width,t=de(de({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/n,scaleY:1/n}),o=this.imageSize.width,i=this.imageSize.height,r=pl({width:o,height:i},t.rotate),s={width:"".concat(o,"px"),height:"".concat(i,"px"),left:"0px",top:"0px"},a={rotate:{left:(o-r.width)*t.scaleX/2,top:(i-r.height)*t.scaleY/2},scale:{left:(1-t.scaleX)*o/2,top:(1-t.scaleY)*i/2}};return s.transform=`translate(
|
|
44
|
+
`.concat(-this.coordinates.left/n-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/n-a.rotate.top-a.scale.top,"px) ")+kl(t),this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}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(n){(n.width||n.height)&&this.onChangeImage()}},mounted:function(){var n=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){n.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 n=this.$refs.image;this.calculatedImageSize.height=n.naturalHeight,this.calculatedImageSize.width=n.naturalWidth},refresh:function(){var n=this.$refs.root;this.width||(this.calculatedSize.width=n.clientWidth),this.height||(this.calculatedSize.height=n.clientHeight)},onChangeImage:function(){var n=this.$refs.image;n&&n.complete&&this.refreshImage(),this.refresh()}}};Bl.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"root",class:s.classes.root,style:s.style},[e.createVNode("div",{ref:"wrapper",class:s.classes.wrapper,style:s.wrapperStyle},[e.withDirectives(e.createVNode("img",{ref:"image",src:o.image&&o.image.src,class:s.classes.image,style:s.imageStyle},null,14,["src"]),[[e.vShow,o.image&&o.image.src]])],6)],6)};var Vl={components:{Preview:Bl},inheritAttrs:!1};Vl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("preview");return e.openBlock(),e.createBlock(a,e.mergeProps(n.$attrs,{fill:!0}),null,16)};var _r=bt("vue-rectangle-stencil"),Nl={name:"RectangleStencil",components:{StencilPreview:Vl,BoundingBox:Cl,DraggableArea:Sl},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return zr}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Dr}},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:Me(_r({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Me(_r("preview"),this.previewClass),boundingBox:Me(_r("bounding-box"),this.boundingBoxClass)}},style:function(){var n=this.stencilCoordinates,t=n.height,o=n.width,i=n.left,r=n.top,s={width:"".concat(o,"px"),height:"".concat(t,"px"),transform:"translate(".concat(i,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(s.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),s}},methods:{onMove:function(n){this.$emit("move",n),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(n){this.$emit("resize",n),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"]};Nl.render=function(n,t,o,i,r,s){var a=e.resolveComponent("stencil-preview"),c=e.resolveComponent("draggable-area"),l=e.resolveComponent("bounding-box");return e.openBlock(),e.createBlock("div",{class:s.classes.stencil,style:s.style},[e.createVNode(l,{width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,transitions:o.transitions,class:s.classes.boundingBox,handlers:o.handlers,"handlers-component":o.handlersComponent,"handlers-classes":o.handlersClasses,"handlers-wrappers-classes":o.handlersWrappersClasses,lines:o.lines,"lines-component":o.linesComponent,"lines-classes":o.linesClasses,"lines-wrappers-classes":o.linesWrappersClasses,resizable:o.resizable,onResize:s.onResize,onResizeEnd:s.onResizeEnd},{default:e.withCtx(function(){return[e.createVNode(c,{movable:o.movable,onMove:s.onMove,onMoveEnd:s.onMoveEnd},{default:e.withCtx(function(){return[e.createVNode(a,{image:o.image,coordinates:o.coordinates,width:o.stencilCoordinates.width,height:o.stencilCoordinates.height,class:s.classes.preview,transitions:o.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 nw=["transitions"],Lt=bt("vue-advanced-cropper"),$l={name:"Cropper",components:{BackgroundWrapper:Lr},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Nl}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Lr}},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(n){return A0.indexOf(n)!==-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(n){return!(typeof n=="string"&&n!=="fill"&&n!=="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(n){var t=n.event,o=n.coordinates,i=n.aspectRatio,r=n.positionRestrictions,s=n.sizeRestrictions,a=X(X({},o),{right:o.left+o.width,bottom:o.top+o.height}),c=t.params||{},l=X({},t.directions),u=c.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};s.widthFrozen&&(l.left=0,l.right=0),s.heightFrozen&&(l.top=0,l.bottom=0),Nt.forEach(function(y){u[y]||(l[y]=0)});var f=Tt(a,l=bl({coordinates:a,directions:l,sizeRestrictions:s,positionRestrictions:r})).width,m=Tt(a,l).height,p=c.preserveRatio?ue(a):Ir(f/m,i);if(p){var S=c.respectDirection;if(S||(S=a.width>=a.height||p===1?"width":"height"),S==="width"){var E=f/p-a.height;if(u.top&&u.bottom){var P=l.top,V=l.bottom;l.bottom=di(E,V,P),l.top=di(E,P,V)}else u.bottom?l.bottom=E:u.top?l.top=E:u.right?l.right=0:u.left&&(l.left=0)}else if(S==="height"){var x=a.width-m*p;if(u.left&&u.right){var $=l.left,b=l.right;l.left=-di(x,$,b),l.right=-di(x,b,$)}else u.left?l.left=-x:u.right?l.right=-x:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=bl({directions:l,coordinates:a,sizeRestrictions:s,positionRestrictions:r,preserveRatio:!0,compensate:c.compensate})}return f=Tt(a,l).width,m=Tt(a,l).height,(p=c.preserveRatio?ue(a):Ir(f/m,i))&&Math.abs(p-f/m)>.001&&Nt.forEach(function(y){u[y]||(l[y]=0)}),Ar({event:new Tr({left:-l.left,top:-l.top}),coordinates:{width:o.width+l.right+l.left,height:o.height+l.top+l.bottom,left:o.left,top:o.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:Ar},initStretcher:{type:Function,default:function(n){var t=n.stretcher,o=n.imageSize,i=ue(o);t.style.width=o.width+"px",t.style.height=t.clientWidth/i+"px",t.style.width=t.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(n){var t=n.visibleArea,o=n.coordinates,i=n.aspectRatio,r=n.sizeRestrictions,s=n.positionRestrictions,a=X(X({},o),Ot({width:o.width,height:o.height,aspectRatio:i,sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minHeight:Math.min(t.height,r.minHeight),minWidth:Math.min(t.width,r.minWidth)}}));return a=Ue(a=it(a,jn(He(o),He(a))),li($t(t),s))}},fitVisibleArea:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.getAreaRestrictions,r=n.coordinates,s=X({},t);s.height=s.width/ue(o),s.top+=(t.height-s.height)/2,(r.height-s.height>0||r.width-s.width>0)&&(s=mt(s,Math.max(r.height/s.height,r.width/s.width)));var a=si(Gn(r,$t(s=mt(s,ai(s,i({visibleArea:s,type:"resize"}))))));return s.width<r.width&&(a.left=0),s.height<r.height&&(a.top=0),s=Ue(s=it(s,a),i({visibleArea:s,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.visibleArea,o=n.boundaries,i=n.imageSize,r=n.imageRestriction,s=n.type,a={};return r==="fill-area"?a={left:0,top:0,right:i.width,bottom:i.height}:r==="fit-area"&&(ue(o)>ue(i)?(a={top:0,bottom:i.height},t&&s==="move"&&(t.width>i.width?(a.left=-(t.width-i.width)/2,a.right=i.width-a.left):(a.left=0,a.right=i.width))):(a={left:0,right:i.width},t&&s==="move"&&(t.height>i.height?(a.top=-(t.height-i.height)/2,a.bottom=i.height-a.top):(a.top=0,a.bottom=i.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(n){return{minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(n){var t=n.imageSize,o={};return n.imageRestriction!=="none"&&(o={left:0,top:0,right:t.width,bottom:t.height}),o}}},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:de({},fl)}},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 n=function(t){return t*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(n))+Math.abs(this.imageAttributes.height*Math.sin(n)),height:Math.abs(this.imageAttributes.width*Math.sin(n))+Math.abs(this.imageAttributes.height*Math.cos(n))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var n=$r(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:$r(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:n}},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 n=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:Ae(this.minWidth)?0:ri(this.minWidth),minHeight:Ae(this.minHeight)?0:ri(this.minHeight),maxWidth:Ae(this.maxWidth)?1/0:ri(this.maxWidth),maxHeight:Ae(this.maxHeight)?1/0:ri(this.maxHeight)});if(n=function(i){var r=i.areaRestrictions,s=i.sizeRestrictions,a=i.boundaries,c=i.positionRestrictions,l=X(X({},s),{minWidth:s.minWidth!==void 0?s.minWidth:0,minHeight:s.minHeight!==void 0?s.minHeight:0,maxWidth:s.maxWidth!==void 0?s.maxWidth:1/0,maxHeight:s.maxHeight!==void 0?s.maxHeight:1/0});c.left!==void 0&&c.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,c.right-c.left)),c.bottom!==void 0&&c.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,c.bottom-c.top));var u=Rr(r),f=hl(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>f.width)&&(l.maxWidth=Math.min(l.maxWidth,f.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>f.height)&&(l.maxHeight=Math.min(l.maxHeight,f.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:n,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 t=this.getStencilSize(),o=Rr(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));n.maxWidth=Math.min(n.maxWidth,o.width*t.width/this.boundaries.width),n.maxHeight=Math.min(n.maxHeight,o.height*t.height/this.boundaries.height),n.maxWidth<n.minWidth&&(n.minWidth=n.maxWidth),n.maxHeight<n.minHeight&&(n.minHeight=n.maxHeight)}return n}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Lt(),image:Me(Lt("image"),this.imageClass),stencil:Lt("stencil"),boundaries:Me(Lt("boundaries"),this.boundariesClass),stretcher:Me(Lt("stretcher")),background:Me(Lt("background"),this.backgroundClass),foreground:Me(Lt("foreground"),this.foregroundClass),imageWrapper:Me(Lt("image-wrapper")),cropperWrapper:Me(Lt("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var n=this.coordinates,t=n.width,o=n.height,i=n.left,r=n.top;return{width:t/this.coefficient,height:o/this.coefficient,left:(i-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var n={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||(n.opacity="0"),n},imageStyle:function(){var n=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)},t={left:(n.width-this.imageSize.width)/(2*this.coefficient),top:(n.height-this.imageSize.height)/(2*this.coefficient)},o={left:(1-1/this.coefficient)*n.width/2,top:(1-1/this.coefficient)*n.height/2},i=de(de({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/n.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/n.height)}),r={width:"".concat(n.width,"px"),height:"".concat(n.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-t.left-o.left-this.imageTransforms.translateX,"px, ").concat(-t.top-o.top-this.imageTransforms.translateY,"px)")+kl(i)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var n=this;this.$nextTick(function(){n.resetCoordinates(),n.runAutoZoom("setCoordinates"),n.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(n,t){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(o){return n[o]!==t[o]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Nr(this.update,this.debounce),this.debouncedDisableTransitions=Nr(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 n=this.initialized?this.prepareResult(de({},this.coordinates)):this.defaultCoordinates(),t={rotate:this.imageTransforms.rotate%360,flip:de({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var o=this;return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},this.visibleArea):null,imageTransforms:t,get canvas(){return o.canvas?o.getCanvas():void 0}}}return{image:this.image,coordinates:n,visibleArea:this.visibleArea?de({},this.visibleArea):null,canvas:void 0,imageTransforms:t}},zoom:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new Co({},{factor:1/n,center:t}),{normalize:!1,transitions:r})},move:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;this.onManipulateImage(new Co({left:n||0,top:t||0}),{normalize:!1,transitions:r})},setCoordinates:function(n){var t=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.autoZoom,r=i===void 0||i,s=o.transitions,a=s===void 0||s;this.$nextTick(function(){t.imageLoaded?(t.transitionsActive||(a&&t.enableTransitions(),t.coordinates=t.applyTransform(n),r&&t.runAutoZoom("setCoordinates"),a&&t.debouncedDisableTransitions()),t.onChange()):t.delayedTransforms=n})},refresh:function(){var n=this,t=this.$refs.image;if(this.src&&t)return this.initialized?this.updateVisibleArea().then(function(){n.onChange()}):this.resetVisibleArea().then(function(){n.onChange()})},reset:function(){var n=this;return this.resetVisibleArea().then(function(){n.onChange(!1)})},awaitRender:function(n){var t=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){n(),t.awaiting=!1}))},prepareResult:function(n){return this.roundResult?function(t){var o=t.coordinates,i=t.sizeRestrictions,r=t.positionRestrictions,s={width:Math.round(o.width),height:Math.round(o.height),left:Math.round(o.left),top:Math.round(o.top)};return s.width>i.maxWidth?s.width=Math.floor(o.width):s.width<i.minWidth&&(s.width=Math.ceil(o.width)),s.height>i.maxHeight?s.height=Math.floor(o.height):s.height<i.minHeight&&(s.height=Math.ceil(o.height)),Ue(s,r)}(de(de({},this.getPublicProperties()),{},{positionRestrictions:ci(this.positionRestrictions,this.visibleArea),coordinates:n})):n},processAutoZoom:function(n,t,o,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?F0:this.autoZoom?O0:L0);var s=r({event:{type:n,params:i},visibleArea:t,coordinates:o,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return de(de({},s),{},{changed:!ml(s.visibleArea,t)||!ml(s.coordinates,o)})},runAutoZoom:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o!==void 0&&o,r=V0(t,nw),s=this.processAutoZoom(n,this.visibleArea,this.coordinates,r),a=s.visibleArea,c=s.coordinates,l=s.changed;i&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=c,i&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(n){return function(t){var o=t.event,i=t.visibleArea,r=t.coefficient;if(o.type==="manipulateImage")return X(X({},o),{move:{left:o.move&&o.move.left?r*o.move.left:0,top:o.move&&o.move.top?r*o.move.top:0},scale:{factor:o.scale&&o.scale.factor?o.scale.factor:1,center:o.scale&&o.scale.center?{left:o.scale.center.left*r+i.left,top:o.scale.center.top*r+i.top}:null}});if(o.type==="resize"){var s=X(X({},o),{directions:X({},o.directions)});return Nt.forEach(function(c){s.directions[c]*=r}),s}if(o.type==="move"){var a=X(X({},o),{directions:X({},o.directions)});return R0.forEach(function(c){a.directions[c]*=r}),a}return o}(de(de({},this.getPublicProperties()),{},{event:n}))},getCanvas:function(){if(this.$refs.canvas){var n=this.$refs.canvas,t=this.$refs.image,o=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(c,l,u){var f=u.rotate,m=u.flip,p={width:l.naturalWidth,height:l.naturalHeight},S=pl(p,f),E=c.getContext("2d");c.height=S.height,c.width=S.width,E.save();var P=Gt(He(X({left:0,top:0},p)),f);return E.translate(-(P.left-S.width/2),-(P.top-S.height/2)),E.rotate(f*Math.PI/180),E.translate(m.horizontal?p.width:0,m.vertical?p.height:0),E.scale(m.horizontal?-1:1,m.vertical?-1:1),E.drawImage(l,0,0,p.width,p.height),E.restore(),c}(this.$refs.sourceCanvas,t,this.imageTransforms):t,i=de({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(c){return c.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},s=Ot({sizeRestrictions:{minWidth:r([i.width,i.minWidth])||0,minHeight:r([i.height,i.minHeight])||0,maxWidth:r([i.width,i.maxWidth])||1/0,maxHeight:r([i.height,i.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(i.maxArea&&s.width*s.height>i.maxArea){var a=Math.sqrt(i.maxArea/(s.width*s.height));s={width:Math.round(a*s.width),height:Math.round(a*s.height)}}return function(c,l,u,f,m){c.width=f?f.width:u.width,c.height=f?f.height:u.height;var p=c.getContext("2d");p.clearRect(0,0,c.width,c.height),m&&(m.imageSmoothingEnabled&&(p.imageSmoothingEnabled=m.imageSmoothingEnabled),m.imageSmoothingQuality&&(p.imageSmoothingQuality=m.imageSmoothingQuality),m.fillColor&&(p.fillStyle=m.fillColor,p.fillRect(0,0,c.width,c.height),p.save()));var S=u.left<0?-u.left:0,E=u.top<0?-u.top:0;p.drawImage(l,u.left+S,u.top+E,u.width,u.height,S*(c.width/u.width),E*(c.height/u.height),c.width,c.height)}(n,o,this.coordinates,s,i),n}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(n){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],o=this.visibleArea&&t?z0(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&t?ci(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return D0({transform:n,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:o,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var n=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var t=this.defaultSize;t||(t=this.stencilSize?U0:H0);var o=this.sizeRestrictions;o.minWidth,o.minHeight,o.maxWidth,o.maxHeight;var i=qn(t)?t({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):t,r=this.defaultPosition||_0,s=[i,function(a){var c=a.coordinates;return de({},qn(r)?r({coordinates:c,imageSize:n.imageSize,visibleArea:n.visibleArea}):n.defaultPosition)}];this.delayedTransforms&&s.push.apply(s,bn(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(s,!0),this.delayedTransforms=null}},clearImage:function(){var n=this;this.imageLoaded=!1,setTimeout(function(){var t=n.$refs.stretcher;t&&(t.style.height="auto",t.style.width="auto"),n.coordinates=n.defaultCoordinates(),n.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var n=this,t=this.$refs.stretcher,o=this.$refs.cropper;return this.initStretcher({cropper:o,stretcher:t,imageSize:this.imageSize}),this.$nextTick().then(function(){var i={cropper:o,imageSize:n.imageSize};if(qn(n.defaultBoundaries)?n.boundaries=n.defaultBoundaries(i):n.defaultBoundaries==="fit"?n.boundaries=function(r){var s=r.cropper,a=r.imageSize,c=s.clientHeight,l=s.clientWidth,u=c,f=a.width*c/a.height;return f>l&&(f=l,u=a.height*l/a.width),{width:f,height:u}}(i):n.boundaries=function(r){var s=r.cropper;return{width:s.clientWidth,height:s.clientHeight}}(i),!n.boundaries.width||!n.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var n=this;return this.appliedImageTransforms=de(de({},this.defaultImageTransforms),{},{flip:de({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){n.priority!=="visible-area"&&(n.visibleArea=null,n.resetCoordinates());var t,o,i,r,s,a,c=n.defaultVisibleArea||v0;n.visibleArea=qn(c)?c({imageSize:n.imageSize,boundaries:n.boundaries,coordinates:n.priority!=="visible-area"?n.coordinates:null,getAreaRestrictions:n.getAreaRestrictions,stencilSize:n.getStencilSize()}):n.defaultVisibleArea,n.visibleArea=(t={visibleArea:n.visibleArea,boundaries:n.boundaries,getAreaRestrictions:n.getAreaRestrictions},o=t.visibleArea,i=t.boundaries,r=t.getAreaRestrictions,s=X({},o),a=ue(i),s.width/s.height!==a&&(s.height=s.width/a),Ue(s,r({visibleArea:s,type:"move"}))),n.priority==="visible-area"?n.resetCoordinates():n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("resetVisibleArea")}).catch(function(){n.visibleArea=null})},updateVisibleArea:function(){var n=this;return this.updateBoundaries().then(function(){n.visibleArea=n.fitVisibleArea({imageSize:n.imageSize,boundaries:n.boundaries,visibleArea:n.visibleArea,coordinates:n.coordinates,getAreaRestrictions:n.getAreaRestrictions}),n.coordinates=n.fitCoordinates({visibleArea:n.visibleArea,coordinates:n.coordinates,aspectRatio:n.getAspectRatio(),positionRestrictions:n.positionRestrictions,sizeRestrictions:n.sizeRestrictions}),n.runAutoZoom("updateVisibleArea")}).catch(function(){n.visibleArea=null})},onChange:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];n&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var n,t=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(sl(r))return!1;var s=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],c={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||s.protocol)==="http"?80:433)};return!(!c.protocol&&!c.host&&!c.port||c.protocol&&c.protocol==s.protocol&&c.host&&c.host==s.host&&c.host&&l(c)==l(s))}(this.src)){var o=Ae(this.crossOrigin)?this.canvas:this.crossOrigin;o===!0&&(o="anonymous"),this.imageAttributes.crossOrigin=o||null}if(this.checkOrientation){var i=(n=this.src,new Promise(function(r){ew(n).then(function(s){var a=tw(s);r(s?{source:n,arrayBuffer:s,orientation:a}:{source:n,arrayBuffer:null,orientation:null})}).catch(function(s){console.warn(s),r({source:n,arrayBuffer:null,orientation:null})})}));setTimeout(function(){i.then(t.onParseImage)},this.transitionTime)}else setTimeout(function(){t.onParseImage({source:t.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var n=this,t=this.$refs.image;t&&!this.imageLoaded&&(this.imageAttributes.height=t.naturalHeight,this.imageAttributes.width=t.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){n.$emit("ready"),n.onChange(!1)}))},onParseImage:function(n){var t=this,o=n.source,i=n.arrayBuffer,r=n.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&r&&r>1?rl(o)||!sl(o)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(s){for(var a=[],c=new Uint8Array(s);c.length>0;){var l=c.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),c=c.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))}(i):this.imageAttributes.src=o,qn(this.defaultTransforms)?this.appliedImageTransforms=Or(this.defaultTransforms()):ii(this.defaultTransforms)?this.appliedImageTransforms=Or(this.defaultTransforms):this.appliedImageTransforms=function(s){var a=Or({});if(s)switch(s){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}(r),this.defaultImageTransforms=de(de({},this.appliedImageTransforms),{},{flip:de({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var s=t.$refs.image;s&&s.complete&&(function(a){return!!a.naturalWidth}(s)?t.onSuccessLoadImage():t.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(n){var t=this;this.transitionsOptions.enabled||this.awaitRender(function(){t.coordinates=t.moveAlgorithm(de(de({},t.getPublicProperties()),{},{positionRestrictions:ci(t.positionRestrictions,t.visibleArea),coordinates:t.coordinates,event:t.normalizeEvent(n)})),t.onChange()})},onResize:function(n){var t=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var o=t.sizeRestrictions,i=Math.min(t.coordinates.width,t.coordinates.height,20*t.coefficient);t.coordinates=t.resizeAlgorithm(de(de({},t.getPublicProperties()),{},{positionRestrictions:ci(t.positionRestrictions,t.visibleArea),sizeRestrictions:{maxWidth:Math.min(o.maxWidth,t.visibleArea.width),maxHeight:Math.min(o.maxHeight,t.visibleArea.height),minWidth:Math.max(o.minWidth,i),minHeight:Math.max(o.minHeight,i)},event:t.normalizeEvent(n)})),t.onChange(),t.ticking=!1})},onManipulateImage:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var o=t.transitions,i=o!==void 0&&o,r=t.normalize,s=r===void 0||r;i&&this.enableTransitions();var a=q0(de(de({},this.getPublicProperties()),{},{event:s?this.normalizeEvent(n):n,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),c=a.visibleArea,l=a.coordinates;this.visibleArea=c,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),i&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.visibleArea,o=n.type,i=o===void 0?"move":o;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:t,type:i})},getAspectRatio:function(n){var t,o,i=this.stencilProps,r=i.aspectRatio,s=i.minAspectRatio,a=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var c=this.$refs.stencil.aspectRatios();t=c.minimum,o=c.maximum}if(Ae(t)&&(t=Ae(r)?s:r),Ae(o)&&(o=Ae(r)?a:r),!n&&(Ae(t)||Ae(o))){var l=this.getStencilSize(),u=l?ue(l):null;Ae(t)&&(t=al(u)?u:void 0),Ae(o)&&(o=al(u)?u:void 0)}return{minimum:t,maximum:o}},getStencilSize:function(){if(this.stencilSize)return n={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)},t=n.boundaries,o=n.stencilSize,i=n.aspectRatio,Ir(ue(r=qn(o)?o({boundaries:t,aspectRatio:i}):o),i)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(r.width>t.width||r.height>t.height)&&(r=Ot({sizeRestrictions:{maxWidth:t.width,maxHeight:t.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:ue(r),maximum:ue(r)}})),r;var n,t,o,i,r},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 de({},fl)},flip:function(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.transitions,r=i===void 0||i;if(!this.transitionsActive){r&&this.enableTransitions();var s=de({},this.imageTransforms.flip),a=W0({flip:{horizontal:n?!s.horizontal:s.horizontal,vertical:t?!s.vertical:s.vertical},previousFlip:s,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,l=a.coordinates;n&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),t&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=c,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t.transitions,i=o===void 0||o;if(!this.transitionsActive){i&&this.enableTransitions();var r=de({},this.imageSize);this.appliedImageTransforms.rotate+=n;var s=j0({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:n,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,c=s.coordinates,l=this.processAutoZoom("rotateImage",a,c);a=l.visibleArea,c=l.coordinates,this.visibleArea=a,this.coordinates=c,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},ow={key:0,ref:"canvas",style:{display:"none"}},iw={key:1,ref:"sourceCanvas",style:{display:"none"}};$l.render=function(n,t,o,i,r,s){return e.openBlock(),e.createBlock("div",{ref:"cropper",class:s.classes.cropper},[e.createVNode("div",{ref:"stretcher",class:s.classes.stretcher},null,2),e.createVNode("div",{class:s.classes.boundaries,style:s.boundariesStyle},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.backgroundWrapperComponent),{class:s.classes.cropperWrapper,"wheel-resize":s.settings.resizeImage.wheel,"touch-resize":s.settings.resizeImage.touch,"touch-move":s.settings.moveImage.touch,"mouse-move":s.settings.moveImage.mouse,onMove:s.onManipulateImage,onResize:s.onManipulateImage},{default:e.withCtx(function(){return[e.createVNode("div",{class:s.classes.background,style:s.boundariesStyle},null,6),e.createVNode("div",{class:s.classes.imageWrapper},[e.createVNode("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:s.classes.image,style:s.imageStyle,onMousedown:t[1]||(t[1]=e.withModifiers(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),e.createVNode("div",{class:s.classes.foreground,style:s.boundariesStyle},null,6),e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.stencilComponent),e.mergeProps({ref:"stencil",image:s.image,coordinates:r.coordinates,"stencil-coordinates":s.stencilCoordinates,transitions:s.transitionsOptions},o.stencilProps,{onResize:s.onResize,onResizeEnd:s.onResizeEnd,onMove:s.onMove,onMoveEnd:s.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[e.vShow,r.imageLoaded]]),o.canvas?(e.openBlock(),e.createBlock("canvas",ow,null,512)):e.createCommentVNode("",!0),o.canvas?(e.openBlock(),e.createBlock("canvas",iw,null,512)):e.createCommentVNode("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const rw={width:0,height:0,left:0,top:0};class Hr{constructor(){d(this,"id");d(this,"ratio",0);d(this,"src","");d(this,"coordinates",rw)}setCoordinates(t){this.coordinates=t}getCoordinates(){return this.coordinates}static Create(t,o=0,i){const r=new Hr;return r.src=t,r.ratio=o,r.id=i,r}setRatio(t){this.ratio=t}getRatio(){return this.ratio}setSrc(t){this.src=t}getSrc(){return this.src}}const sw={class:"cropper-wrapper"},aw={class:"row justify-end q-mt-md"},lw=z(e.defineComponent({__name:"ImageCropper",props:{src:{type:String,required:!0},ratio:{type:Number,required:!1,default:1}},emits:["crop","update:ratio"],setup(n,{emit:t}){const o=n,i=t,r=e.ref(o.ratio),s=e.ref(Hr.Create(o.src,o.ratio));s.value.setRatio(r.value);const a=e.ref(),c=e.computed(()=>[{label:"2:3 (формат A4)",value:2/3},{label:"4:3 (для карточек новостей)",value:4/3},{label:"1:1 (для фото сотрудников)",value:1},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"3:4 (вертикальное изображение)",value:3/4},{label:"Задать пропорции вручную",value:0}]),l=f=>{s.value.setRatio(f)},u=async()=>{const f=a.value.getResult();f&&f.canvas.toBlob(m=>{var p;i("crop",{blob:m,src:(p=f.canvas)==null?void 0:p.toDataURL()}),i("update:ratio",s.value.coordinates.width/s.value.coordinates.height)})};return(f,m)=>(e.openBlock(),e.createElementBlock("div",sw,[e.createVNode(bo,{modelValue:r.value,"onUpdate:modelValue":[m[0]||(m[0]=p=>r.value=p),m[1]||(m[1]=p=>l(p))],clearable:!1,options:c.value,label:"Задайте пропорции фото","emit-value":"","map-options":"",class:"q-mb-md"},null,8,["modelValue","options"]),e.createVNode(e.unref($l),{ref_key:"cropperRef",ref:a,src:s.value.src,"stencil-props":{aspectRatio:s.value.ratio},class:"cropper-container",onChange:m[2]||(m[2]=p=>s.value.setCoordinates(p.coordinates))},null,8,["src","stencil-props"]),e.createElementVNode("div",aw,[e.createVNode(ne,{flat:"",label:"Сохранить",color:"primary",onClick:u})])]))}}),[["__scopeId","data-v-be2e2071"]]),cw={class:"uploader-content"},dw={class:"uploader-icon"},uw={class:"tools-button absolute-full column items-center justify-center"},fw={class:"row q-gutter-sm"},mw=z(e.defineComponent({__name:"PUploaderImage",props:{withCrop:{type:Boolean,default:!0},fileInfo:{},height:{default:150},emitCrop:{type:Boolean,default:!1},ratio:{default:1},acceptTypes:{default:"image/*"},maxFileSize:{default:10485760}},emits:["crop","removeFile","update:ratio"],setup(n,{emit:t}){const o=C.ClosePopup,i=n,r=t,s=e.ref(),a=e.ref(),c=e.ref(`file-uploader-${Math.random().toString(36).substring(2,9)}`),l=e.ref(!1),u=e.ref();e.onMounted(()=>{e.nextTick(()=>{var b;const $=(b=a.value)==null?void 0:b.querySelector(".q-uploader__input");$&&!$.getAttribute("aria-label")&&$.setAttribute("aria-label","Добавить изображение")})});const f=e.ref(i.ratio),m=e.ref(""),p=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),S=e.computed(()=>({width:`${i.height*f.value}px`,height:`${i.height}px`,maxWidth:"100%"})),E=()=>{s.value=void 0,f.value=1,r("update:ratio",1),r("removeFile")},P=$=>{$.blob.src=$.src,i.fileInfo.setFile&&i.fileInfo.setFile($.blob),i.fileInfo.fileSystemPath&&(s.value=i.fileInfo),l.value=!1,r("crop")},V=$=>{m.value=$.url,l.value=!0},x=$=>{if($.length===0)return;const b=$[0];b.url=URL.createObjectURL(b),s.value=b,i.fileInfo.setFile&&i.fileInfo.setFile(b),i.withCrop&&V(s.value)};return e.watch(f,$=>{r("update:ratio",$)}),e.watch(()=>[i.fileInfo.description,i.fileInfo.order,i.fileInfo.fileSystemPath],()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),e.onBeforeMount(()=>{i.fileInfo.fileSystemPath&&(s.value=i.fileInfo,i.fileInfo.getFileUrl&&(s.value.url=i.fileInfo.getFileUrl()))}),($,b)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:a,class:"column items-center q-my-md"},[e.unref(s)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-container relative-position",style:e.normalizeStyle(e.unref(p))},[e.createVNode(e.unref(C.QImg),{src:e.unref(s).url,ratio:e.unref(f),class:"uploaded-image",alt:"Загруженное изображение","spinner-color":"primary"},null,8,["src","ratio"]),e.createElementVNode("div",uw,[e.createElementVNode("div",fw,[e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"primary",icon:"crop",size:"md","aria-label":"Изменить обрезку",onClick:b[0]||(b[0]=y=>V(e.unref(s)))},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...b[5]||(b[5]=[e.createTextVNode("Изменить обрезку",-1)])]),_:1})]),_:1}),e.createVNode(ne,{round:"",dense:"",color:"white","text-color":"negative",icon:"delete",size:"md","aria-label":"Удалить изображение",onClick:E},{default:e.withCtx(()=>[e.createVNode(ot,null,{default:e.withCtx(()=>[...b[6]||(b[6]=[e.createTextVNode("Удалить изображение",-1)])]),_:1})]),_:1})])])],4)):(e.openBlock(),e.createBlock(e.unref(C.QUploader),{key:0,id:e.unref(c),ref_key:"uploader",ref:u,class:"img-uploader",style:e.normalizeStyle(e.unref(S)),flat:"",bordered:"",accept:n.acceptTypes,"max-file-size":n.maxFileSize,"hide-upload-btn":"",onAdded:x,onRemoved:E},{header:e.withCtx(()=>[e.createElementVNode("div",cw,[e.createVNode(e.unref(C.QUploaderAddTrigger)),e.createElementVNode("div",dw,[e.createVNode(e.unref(C.QIcon),{name:"add_photo_alternate",size:"48px",color:"primary"})]),b[4]||(b[4]=e.createElementVNode("div",{class:"uploader-text text-primary text-center"},[e.createElementVNode("div",{class:"text-weight-medium"},"Добавить изображение"),e.createElementVNode("div",{class:"text-caption text-grey-6 q-mt-xs"}," Перетащите файл или нажмите для загрузки ")],-1))])]),_:1},8,["id","style","accept","max-file-size"])),e.createVNode(un,{modelValue:e.unref(l),"onUpdate:modelValue":b[3]||(b[3]=y=>e.isRef(l)?l.value=y:null),persistent:""},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCard),{class:"full-height"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QCardSection),{class:"row items-center q-pb-none"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.QSpace)),e.withDirectives(e.createVNode(ne,{icon:"close",flat:"",round:"",dense:"","aria-label":"Закрыть"},null,512),[[e.unref(o)]])]),_:1}),e.createVNode(e.unref(C.QCardSection),{class:"cropper-section"},{default:e.withCtx(()=>[e.createVNode(lw,{ratio:e.unref(f),"onUpdate:ratio":b[1]||(b[1]=y=>e.isRef(f)?f.value=y:null),src:e.unref(m),onCrop:P,onClose:b[2]||(b[2]=y=>l.value=!1)},null,8,["ratio","src"])]),_:1})]),_:1})]),_:1},8,["modelValue"])],512))}}),[["__scopeId","data-v-e10bfc0c"]]);function hw(n){n.component("PMenuTabs",y0),n.component("PUploaderFile",B0),n.component("PUploaderImage",mw),n.component("PAuthForm",tl),n.component("PAuthModal",p0)}const pw={install:function(n){qg(n),m0(n),xy(n),hw(n),ly(n)}};function gw(n,t={}){const{quasarPlugins:o=!0}=t;o&&n.use(C.Quasar,{plugins:{Notify:C.Notify,Dialog:C.Dialog}}),pw.install(n),La(n),ga(n),Oa(n)}class yw extends No{constructor(){super(...arguments);d(this,"label","Логин");d(this,"name","login");d(this,"validator",new os);d(this,"method",Bn.Login);d(this,"id","field-auth-login")}}function ww(n,t={}){const o=t.ftsp??xt.Get(),i=e.ref(!1),r=e.computed(()=>n.Items),s=e.computed(()=>n.Count.value),a=e.computed(()=>n.Item),c=e.computed({get:()=>n.searchStr.value,set:E=>{n.searchStr.value=E}});return{loading:i,items:r,count:s,item:a,searchStr:c,ftsp:o,load:async()=>{i.value=!0;try{await n.FTSP({ftsp:o})}finally{i.value=!1}},get:E=>n.Get(E),create:E=>n.Create(E),update:E=>n.Update(E),remove:E=>n.Remove(E),reset:()=>{o.reset(),n.ResetState()}}}function bw(n=xt.Get()){const t=e.reactive(n),o=e.computed(()=>t.f),i=e.computed(()=>t.f.length);return{filters:o,count:i,add:f=>{t.setF(f)},addV2:f=>{t.setF2(f)},replace:(f,m)=>{t.replaceF(f,m)},remove:f=>{t.removeF(f)},has:f=>!!t.findFilterModel(f),clear:()=>{t.resetF()}}}function Cw(n=xt.Get()){const t=e.reactive(n),o=e.computed({get:()=>t.p.getPageNum(),set:E=>{t.p.page=(Math.max(1,Math.round(E))-1)*t.p.rowsPerPage}}),i=e.computed({get:()=>t.p.rowsPerPage,set:E=>{t.p.rowsPerPage=E,t.p.page=0}}),r=e.computed(()=>t.p.rowsNumber),s=e.computed(()=>({page:o.value,rowsPerPage:i.value,rowsNumber:r.value}));return{page:o,rowsPerPage:i,rowsNumber:r,goTo:E=>{o.value=E},next:()=>{t.p.page+=t.p.rowsPerPage},prev:()=>{t.p.page=Math.max(0,t.p.page-t.p.rowsPerPage)},reset:()=>{t.p.page=0},drop:()=>{t.p.drop()},setLoadMore:(E,P,V)=>{t.p.setLoadMore(E,P,V)},setLoadMoreV2:(E,P,V)=>{t.p.setLoadMoreV2(E,P,V)},setAllLoaded:E=>{t.p.setAllLoaded(E)},pagination:s}}const Sw=5*60*1e3,kw=5*1e3;let Tl=!1,Ur=0,fi=!1,vr=!1;function mi(n,t,o="",i=!1){const r=n.UserInfo(),s={operation:t,reason:o,userName:(r==null?void 0:r.username)||(r==null?void 0:r.email)||"",userId:(r==null?void 0:r.id)||"",roleCode:((r==null?void 0:r.roles)||[])[0]||"",accessToken:n.getToken()||""};try{const a=JSON.stringify(s);if(!Ce.baseUrl){fetch("/api/auth/log",{method:"POST",headers:{"Content-Type":"application/json",...n.getToken()?{token:n.getToken()}:{}},body:a,keepalive:!0}).catch(c=>console.warn("[AuthLog] Ранний запрос не отправлен",t,c));return}if(i&&typeof navigator.sendBeacon=="function"){navigator.sendBeacon("/api/auth/log",new Blob([a],{type:"application/json"}));return}Ce.Post({query:"auth/log",payload:s})}catch(a){console.warn("[AuthLog] Не удалось отправить событие",t,a)}}function qr(n,t,o=!1){fi||(fi=!0,mi(n,"logout",t,o))}function xw(n){if(Tl)return;Tl=!0,n.on("login",()=>{const o=Date.now();o-Ur<kw||(Ur=o,fi=!1,vr=!1,mi(n,"login"))}),n.on("logout",()=>{vr=!0,qr(n,"user")}),n.on("session-expired",()=>qr(n,"token-expired")),n.isAuth()&&(Ur=Date.now(),fi=!1,mi(n,"login"));const t=()=>{n.isAuth()&&qr(n,vr?"user":"tab-close",!0)};window.addEventListener("pagehide",t),window.addEventListener("beforeunload",t),window.setInterval(()=>{n.isAuth()&&mi(n,"heartbeat")},Sw)}const Ew=["PF","PFM"];O.AuthButtonLogin=Si,O.AuthButtonRefresh=ts,O.AuthButtonRegister=ki,O.AuthButtonRestore=Vo,O.AuthChunks=Fe,O.AuthFieldsIds=zt,O.AuthFormSettings=rs,O.AuthMethods=Bn,O.EmailField=$o,O.LoginField=yw,O.PAddDialog=Za,O.PBadge=fo,O.PButton=ne,O.PCard=Ja,O.PCheckBox=_a,O.PChip=mr,O.PContactForm=tr,O.PContactFormDeleteDialog=mo,O.PContactFormEdit=nr,O.PContactFormEditDialog=ho,O.PContactFormEditEmails=or,O.PContactFormEditPhones=ir,O.PContactFormView=rr,O.PContactFormViewEmails=fn,O.PContactFormViewPhones=mn,O.PCrudList=Ka,O.PDateInput=Ua,O.PDateTimeInput=va,O.PDialog=un,O.PEditDialog=vn,O.PF=D,O.PFM=kg,O.PHint=Er,O.PInput=Je,O.POptionsListSingle=ti,O.POpts=qa,O.PSelect=bo,O.PTable=Sr,O.PTableBadge=hr,O.PTableBadges=pr,O.PTableCount=gr,O.PTableEdit=yr,O.PTableNumber=wr,O.PTableSelect=br,O.PTableString=Cr,O.PTableToggle=ja,O.PTabs=kr,O.PTabsLeft=xr,O.PToggle=Wa,O.PasswordField=To,O.PasswordRepeatField=is,O.Schedule=go,O.ScheduleDay=ei,O.ScheduleDefaultLabels=fr,O.ScheduleGridEditor=Da,O.SchedulePlace=_n,O.ScheduleSession=Ln,O.ScheduleSlot=Ft,O.ScheduleTimeline=Fa,O.TabsStore=ni,O.defaultContactsLabels=Vt,O.initAuthLog=xw,O.installSprof=gw,O.pfName=Ew,O.useCrud=ww,O.useFilters=bw,O.usePagination=Cw,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|