sprof 0.0.92 → 0.0.94

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/sprof.js CHANGED
@@ -10908,9 +10908,11 @@ class Xn {
10908
10908
  return n.key = e, n.tabs = i, n.tabs.length && n.preSelect(), n;
10909
10909
  }
10910
10910
  Select(e) {
10911
- if (!e)
10912
- return this.preSelect();
10913
- this.idx = e, mt.SetQueryParam(this.key, this.GetSlug());
10911
+ if (this.tabs.length) {
10912
+ if (e === void 0)
10913
+ return this.preSelect();
10914
+ this.idx = e, mt.SetQueryParam(this.key, this.GetSlug());
10915
+ }
10914
10916
  }
10915
10917
  GetMenu() {
10916
10918
  return this.tabs[this.idx];
@@ -39,4 +39,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
39
39
  * vue-router v4.4.5
40
40
  * (c) 2024 Eduardo San Martin Morote
41
41
  * @license MIT
42
- */function Ds(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var Os;(function(t){t.pop="pop",t.push="push"})(Os||(Os={}));var Ls;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Ls||(Ls={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var Hs;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(Hs||(Hs={}));const Lh=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Hh(t,e,n){const r=()=>{t[e].delete(n)};i.onUnmounted(r),i.onDeactivated(r),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function qh(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){Ds("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(Lh,{}).value;if(!e){process.env.NODE_ENV!=="production"&&Ds("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}Hh(e,"leaveGuards",t)}function Uh(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:s=>{t.value&&s.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(s,a)=>{t.value&&!e.value?s():a()}}}const _h=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;S.H.FTSP.Get().reset(),Ve.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Ve.GetDefault()),Ve.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Ve.GetDefault()),S.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=Uh(),r=s=>qh((a,c,l)=>{n((s||o)(),l)}),o=s=>async()=>{e.value=!0;try{s&&await s(),S.UI.Notify.Success("Сохранено")}catch(a){S.UI.Notify.Success("Что-то пошло не так. "+a);return}};return{onBeforeMount:t,onBeforeRouteLeave:r,submit:o}})();class pi{constructor(){d(this,"tabs",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const e=_e.GetStringQueryParam(this.key);if(!e||e==="undefined"){this.Select(0);return}const n=this.tabs.findIndex(r=>r.slug===e);n>-1&&this.Select(n)}static Create(e,n){const r=new pi;return r.key=e,r.tabs=n,r.tabs.length&&r.preSelect(),r}Select(e){if(!e)return this.preSelect();this.idx=e,_e.SetQueryParam(this.key,this.GetSlug())}GetMenu(){return this.tabs[this.idx]}GetComponent(){return this.tabs[this.idx].component}GetSlug(){return this.tabs[this.idx].slug}}const Cn=class Cn{static Format(e){let n=e;if(!n)e=n;else{(n[0]==="7"||n[0]==="8")&&n.length!==1&&(n=n.slice(1));const r=n.replace(/\+7|[^\d]/g,""),o=r.length;switch(!0){case o===0:e="";break;case(o===1&&n.length===1&&r==="7"):case(o===1&&n.length===1&&r==="8"):e="+7 (";break;case o<4:e=`+7 (${r}`;break;case o<7:e=`+7 (${r.slice(0,3)}) ${r.slice(3)}`;break;case o<9:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}`;break;default:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}-${r.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(Cn,"validatePhone",(e,n,r)=>{Cn.getPhoneRegExp().test(n)||!n?r():r(new Error("Пожалуйста, введите корректный номер телефона"))});let gi=Cn;class Wh{static Count(e){const n=e.filter(s=>s.rating!==0);let r=0;n.forEach(s=>r=r+s.rating);const o=r/n.length;return isNaN(o)?0:Number((r/n.length).toFixed(2))}}class jh{static async Auth(e){e&&e()}static Dev(){}}class Gh{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",Ct.FiveMinutes);d(this,"timelines",Kt[Ct.FiveMinutes])}periodIsCorrect(e,n){return q.GtOrEq(e,this.startHM)&&q.GtOrEq(this.endHM,n)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Kt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return He.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,n,r,o){return o.filter(s=>s.id!==r).every(s=>!q.PeriodsIntersects(e,n,s.startTime,s.endTime))}sortByStartTime(e){e.sort((n,r)=>q.HMtoM(n.startTime)-q.HMtoM(r.startTime))}}const Zh=-68;function Xh(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),r=e??Zh;let o=0;n&&(o=n.getBoundingClientRect().top+r+document.body.scrollTop),o&&document.body.scrollTo({top:o,behavior:"smooth"})}class Jh{static Sort(e){e.forEach((n,r)=>n.order=r)}}function Yh(t,e){let n=!0;return t.value.validate(r=>(r||(n=!1),n)),n}const Qh=t=>new Promise(e=>{if(document.querySelector(t))return e(document.querySelector(t));const n=new MutationObserver(()=>{document.querySelector(t)&&(n.disconnect(),e(document.querySelector(t)))});n.observe(document.body,{childList:!0,subtree:!0})});class pn{constructor(e){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");T.BuildClass(this,e)}static Create(e,n,r,o){const s=new pn;return s.id=De(),s.chatId=e,s.message=r,s.userName=o,s}static CreatePingMessage(){const e=new pn;return e.type="ping",e.id=De(),e}isMessage(){return this.type==="message"||this.type===""}}const Kh="";class ef{constructor(e="",n="",r="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);T.BuildClass(this,{endpoint:e,query:n,mutation:r}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(pn.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,Kh.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}class H{}d(H,"Arrays",He),d(H,"Axios",$t),d(H,"BaseStore",X),d(H,"Phone",Je),d(H,"Cache",mn),d(H,"Classes",T),d(H,"CarouselSwipe",Mh),d(H,"Color",Rh),d(H,"CreateSortModels",Vo),d(H,"Cursor",$h),d(H,"DateMask",Th),d(H,"Dates",Te),d(H,"Dragger",Fh),d(H,"Extension",Dh),d(H,"Favourite",Oh),d(H,"FTSP",Qo),d(H,"Hooks",_h),d(H,"HttpClient",le),d(H,"Id",ve),d(H,"MakeCarousel",nr),d(H,"Period",Zn),d(H,"PhoneService",gi),d(H,"Rating",Wh),d(H,"Router",_e),d(H,"RouterGuard",jh),d(H,"Scheduler",Gh),d(H,"Scroll",Xh),d(H,"Sizes",vn),d(H,"Sorter",Jh),d(H,"Static",Un),d(H,"Statuses",ce),d(H,"Strings",ne),d(H,"Time",q),d(H,"Timer",St),d(H,"Token",Rt),d(H,"Menus",pi),d(H,"validate",Yh),d(H,"WaitElement",Qh),d(H,"WebSocketClient",ef);class tf{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const nf=new tf;class rf{constructor(){d(this,"title","");d(this,"buttons",[])}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const of=new rf;class sf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return ne.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(r=>ne.SearchIn(r.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var n;return this.filterString?(n=e.children)==null?void 0:n.filter(r=>ne.SearchIn(r.name,this.filterString)):e.children}}const af=new sf;class lf{constructor(){d(this,"Menu",i.reactive(af));d(this,"Head",i.reactive(of))}}const cf=new lf;class df extends Go{constructor(){super(...arguments);d(this,"confirmButtonText","Да");d(this,"cancelButtonText","Нет");d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((r,o)=>{this.resolve=r,this.reject=o})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const uf=new df;class hf extends jo{Show(){super.show()}Hide(){super.hide()}}const ff=new hf,mf=Object.freeze(Object.defineProperty({__proto__:null,Admin:cf,Btn:Ze,Dialog:uf,Loading:ff,Notify:kt},Symbol.toStringTag,{value:"Module"}));let pf=class{async Login(e){const n=e??S.Auth.Form.GetValues(),r=await le.Post({query:"auth/login",payload:n});if(!r)throw S.UI.Notify.Error("Ошибка авторизации"),"Ошибка авторизации";S.Auth.Status.SetState(r)}async LoginAs(e){if(!await le.Post({query:"auth/login-as",payload:{email:e}})){S.UI.Notify.Error("Ошибка авторизации");return}}async Register(){}async RestorePassword(){}async passwordChange(){await le.Put({query:"auth/password-change"})}async RefreshToken(){await le.Post({query:"auth/refresh-token",payload:{refreshToken:Rt.getRefreshToken()}})}async CheckUuid(e){await le.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}};const gf=new pf;class yi{constructor(e){d(this,"id");d(this,"address");d(this,"description");T.BuildClass(this,e)}}class qs{constructor(e){d(this,"id");d(this,"address");d(this,"description");T.BuildClass(this,e)}}var yf=Object.defineProperty,gn=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&yf(e,n,o),o};const At=class ba{constructor(e){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new yi]);d(this,"phones",[]);d(this,"websites",[]);T.BuildClass(this,e)}addEmail(){const e=Xe.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Je.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new ba;return e.id=ve.UUID(),e}removeEmail(e){T.RemoveFromClassById(e,this.emails)}removePhone(e){T.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new yi)}addWebsite(){this.websites.push(new qs)}pushFirst(){this.emails.length||this.emails.push(new Xe),this.phones.length||this.phones.push(new Je)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};gn([T.GetClassConstructor(Xe)],At.prototype,"emails"),gn([T.GetClassConstructor(yi)],At.prototype,"postAddresses"),gn([T.GetClassConstructor(Je)],At.prototype,"phones"),gn([T.GetClassConstructor(qs)],At.prototype,"websites");let wf=At,bf=class extends X{constructor(){super(wf,"contacts")}};const Cf=new bf;let Sf=class{constructor(){d(this,"cropper",new Xt)}Open(e){this.cropper=e}Cropper(){return this.cropper}Ratio(){return this.cropper.ratio}};const kf=new Sf;let Ef=class extends X{constructor(){super(Xe,"emails")}};const vf=new Ef;let xf=class extends X{constructor(){super(Be,"file-infos")}};const Bf=new xf;class wi{constructor(e){d(this,"id");d(this,"ftsp");d(this,"name","");T.BuildClass(this,e)}static Create(e){const n=new wi;return n.id=ve.UUID(),n.ftsp=JSON.stringify(e),n}}let Mf=class extends X{constructor(){super(wi,"ftsp-presets")}};const If=new Mf;let Rf=class extends X{constructor(){super(Yo,"humans")}};const $f=new Rf;let Af=class extends X{constructor(){super(Je,"phones")}};const Nf=new Af;class Pf{constructor(e){d(this,"id");d(this,"nameRus","");T.BuildClass(this,e)}}var Vf=Object.defineProperty,zf=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Vf(e,n,o),o};class Us{constructor(e){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);T.BuildClass(this,e)}}zf([T.GetClassConstructor(Pf)],Us.prototype,"fields");let Tf=class extends X{constructor(){super(Us,"schemas")}};const Ff=new Tf;class _s{constructor(e){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);T.BuildClass(this,e)}}class Df{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");T.BuildClass(this,e)}}var Of=Object.defineProperty,Ws=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Of(e,n,o),o};class ut{constructor(e){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",[]);T.BuildClass(this,e)}}Ws([T.GetClassConstructor(_s)],ut.prototype,"options"),Ws([T.GetClassConstructor(Df)],ut.prototype,"searchGroupMetaColumns");class bi{constructor(e){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 ut);d(this,"searchObjects",[]);d(this,"pagination",new tn);d(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(n=>new ut(n))),e.searchGroup&&(this.searchGroup=new ut(e.searchGroup)),e.options&&(this.options=e.options.map(n=>new _s(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(r=>r.id===e);n?this.searchGroup=n:this.searchGroup=new ut}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(_e.Route().query.groupId)}setQuery(){const e=_e.Route().query.query;e&&(this.query=e)}}let Lf=class{constructor(){d(this,"isSearchDrawerOpen",i.ref(!1));d(this,"searchModel",i.reactive(new bi));d(this,"searchGroups",i.reactive([]));d(this,"count",0)}async Search(e){const n=await le.Get({query:`?key=${e.key}&query=${e.query}`});n&&n.searchGroup&&n.searchGroup.options.forEach(r=>{e.searchObjects.push({id:r.id,value:r.value,label:r.label,description:r.description})})}async mainSearch(e){this.SetSearchModel(await le.Get({query:`/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(r=>{r.options=[]});const n=await le.Get({query:`main?searchModel=${e.toUrl()}`});this.SetSearchModel(n)}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new bi}SetSearchModel(e){e&&(this.searchModel=new bi(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Hf=new Lf;class Ci{constructor(e){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");T.BuildClass(this,e)}static Create(){const e=new Ci;return e.id=ve.UUID(),e}}let qf=class extends X{constructor(){super(Ci,"users-accounts")}};const Uf=new qf;var js=(t=>(t.simple="simple",t.oneToMany="oneToMany",t.manyToMany="manyToMany",t))(js||{});class Gs{constructor(e){d(this,"id");d(this,"name",ue.String);d(this,"valueRelation",js.simple);T.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===ue.Radio)return"RadioProp";if(this.name===ue.Set)return"SetProp";if(this.name===ue.Number)return"NumberProp";if(this.name===ue.String)return"StringProp"}}let _f=class extends X{constructor(){super(Gs,"value-types")}};const Wf=new _f,jf=Object.freeze(Object.defineProperty({__proto__:null,Auth:gf,Contacts:Cf,Cropper:kf,Emails:vf,FTSPPresets:If,FileInfos:Bf,Humans:$f,Phones:Nf,Schemas:Ff,Search:Hf,UserAccounts:Uf,ValueTypes:Wf},Symbol.toStringTag,{value:"Module"}));class S{}d(S,"Auth",i.reactive(Jo)),d(S,"UI",i.reactive(mf)),d(S,"Paginator",i.reactive(nf)),d(S,"S",jf),d(S,"H",H),d(S,"C",eu);class Zs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}class Nt{constructor(e){d(this,"id");d(this,"passportId");d(this,"fileInfoId");d(this,"fileInfo",new Be);d(this,"order",0);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new Nt;return n.id=S.H.Id.UUID(),n.passportId=e,n}}var Gf=Object.defineProperty,Zf=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Gf(e,n,o),o};class Si{constructor(e){d(this,"id");d(this,"num","");d(this,"seria","");d(this,"division","");d(this,"divisionCode","");d(this,"citzenship","");d(this,"date",new Date);d(this,"address","");d(this,"passportScans",[]);S.H.Classes.BuildClass(this,e)}}Zf([S.H.Classes.GetClassConstructor(Nt)],Si.prototype,"passportScans");class Xs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}const Xf=Object.freeze(Object.defineProperty({__proto__:null,Inn:Zs,Passport:Si,PassportScan:Nt,Snils:Xs},Symbol.toStringTag,{value:"Module"}));let Jf=class extends X{constructor(){super(Zs,"inns")}};const Yf=new Jf;let Qf=class extends X{constructor(){super(Nt,"passport-scans")}};const Kf=new Qf;let em=class extends X{constructor(){super(Si,"passports")}};const tm=new em;let nm=class extends X{constructor(){super(Xs,"snilss")}};const im=new nm,rm=Object.freeze(Object.defineProperty({__proto__:null,C:Xf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Yf,PassportScans:Kf,Passports:tm,Snilss:im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class et{constructor(e){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);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new et;return n.id=S.H.Id.UUID(),n.fieldId=e,n}}class Js{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");S.H.Classes.BuildClass(this,e)}}class ki{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);S.H.Classes.BuildClass(this,e)}}class ht{constructor(e){d(this,"id");d(this,"name","");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ht;return n.id=S.H.Id.UUID(),n.fieldId=e,n}}var om=Object.defineProperty,Pt=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&om(e,n,o),o};const tt=class En{constructor(e){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 Gs);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);S.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new En;return n.id=S.H.Id.UUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(r=>r.id===e);return n?n.name:""}addRadioItem(e){const n=new et(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(r=>r.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new ki(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new ht)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=et.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=En.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=ht.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new En(this);return e.id=S.H.Id.UUID(),e.answerVariants.forEach(n=>{n.id=S.H.Id.UUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const r=n.copy();return r.parentId=e.id,r}),e}};Pt([S.H.Classes.GetClassConstructor(et)],tt.prototype,"answerVariants"),Pt([S.H.Classes.GetClassConstructor(Js)],tt.prototype,"fieldExamples"),Pt([S.H.Classes.GetClassConstructor(ht)],tt.prototype,"fieldVariants"),Pt([S.H.Classes.GetClassConstructor(ki)],tt.prototype,"fieldMeasures"),Pt([S.H.Classes.GetClassConstructor(tt)],tt.prototype,"children");let yn=tt;class Ei{constructor(e){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}class nt{constructor(e){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");S.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new nt;return r.id=De(),r.fieldFillId=e,r.answerVariantId=n,r}static GetClassName(){return"selectedAnswerVariant"}}var sm=Object.defineProperty,Ys=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&sm(e,n,o),o};const vi=class Ri{constructor(e){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new Be);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",[]);S.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,n){const r=new Ri;return r.id=De(),r.fieldId=e.id,r.formFillId=n,r.order=e.order,r.valueNumber=0,r.valueString="",r.valueDate=new Date,r}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(r=>Ri.Create(r,n))}addFile(){const e=new Ei;return e.id=De(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const r=nt.Create(this.id,e);return r.answerVariantIdY=n,this.selectedAnswerVariants.push(r),this.filled=!0,r}getMatrixValue(e,n){return this.selectedAnswerVariants.find(r=>r.answerVariantId===e&&r.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=nt.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(r=>r.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(r=>r.answerVariantId===n.id):!1}};Ys([S.H.Classes.GetClassConstructor(nt)],vi.prototype,"selectedAnswerVariants"),Ys([S.H.Classes.GetClassConstructor(Ei)],vi.prototype,"answerFiles");let ft=vi;class am{constructor(e){d(this,"id");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var lm=Object.defineProperty,cm=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&lm(e,n,o),o};const Qs=class Ca{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new Ca;return n.id=S.H.Id.UUID(),n.formId=e,n}addField(){const e=yn.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};cm([S.H.Classes.GetClassConstructor(yn)],Qs.prototype,"fields");let wn=Qs;var dm=Object.defineProperty,um=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&dm(e,n,o),o};const Ks=class Sa{constructor(e){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);S.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Sa;return e.id=S.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=wn.Create(this.id);return this.formSections.push(e),S.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(r=>r.fields).flat(),n=e.map(r=>r.children).flat();return e.concat(n).filter(r=>r.children.length===0)}};um([S.H.Classes.GetClassConstructor(wn)],Ks.prototype,"formSections");let ea=Ks;var hm=Object.defineProperty,fm=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&hm(e,n,o),o};const ta=class ka{constructor(e){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");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ka;return n.id=S.H.Id.UUID(),n.formId=e.id,n.fieldFills.push(...ft.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(r=>r.fieldId===e)}pushRegisterProperty(e){const n=new ft;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=ft.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(r=>r.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.answerVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(r=>{var o;if(r.code){const s=(o=this.getFieldFillByFieldId(r.id))==null?void 0:o.valueNumber;n[r.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};fm([S.H.Classes.GetClassConstructor(ft)],ta.prototype,"fieldFills");let na=ta;const mm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:et,Field:yn,FieldExample:Js,FieldFill:ft,FieldFillFile:Ei,FieldFilter:am,FieldMeasure:ki,FieldVariant:ht,Form:ea,FormFill:na,FormSection:wn,SelectedAnswerVariant:nt},Symbol.toStringTag,{value:"Module"}));let pm=class extends X{constructor(){super(et,"answer-variants")}};const gm=new pm;let ym=class extends X{constructor(){super(ft,"field-fills")}};const wm=new ym;let bm=class extends X{constructor(){super(yn,"fields")}};const Cm=new bm;let Sm=class extends X{constructor(){super(na,"form-fills")}};const km=new Sm;let Em=class extends X{constructor(){super(wn,"form-sections")}};const vm=new Em;let xm=class extends X{constructor(){super(ea,"forms")}};const Bm=new xm;let Mm=class extends X{constructor(){super(nt,"selected-answer-variants")}};const Im=new Mm,Rm=Object.freeze(Object.defineProperty({__proto__:null,C:mm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:gm,FieldFills:wm,Fields:Cm,FormFills:km,FormSections:vm,Forms:Bm,SelectedAnswerVariants:Im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class bn{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");S.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new bn;return r.id=S.H.Id.UUID(),r.name=e,r.label=n,r}}const $m=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:bn},Symbol.toStringTag,{value:"Module"}));class Am extends X{constructor(){super(bn,"color-themes")}}const Nm=new Am,Pm=Object.freeze(Object.defineProperty({__proto__:null,Docs:rm,Forms:Rm,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:$m,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Nm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Vm={install:function(t){t.component("PButton",Pi),t.component("PCheckBox",Vi),t.component("PDatePicker",zi),t.component("PFlex",Ti),t.component("PInput",qi),t.component("PInputDate",Ui),t.component("PInputNumber",_i),t.component("PLeftSlider",Wi),t.component("PList",ji),t.component("PListItem",Gi),t.component("PRadio",Zi),t.component("PRightSlider",Xi),t.component("PSelect",Ji),t.component("PSticky",Yi),t.component("PString",Qi),t.component("PTextarea",Ki),t.component("PTopSlider",er),t.component("IconDownload",wr),t.component("IconFilter",br),t.component("ArrowLeft",Ir),t.component("ArrowRight",Rr),t.component("DoubleArrowLeft",$r),t.component("DoubleArrowRight",Ar),t.component("EllipsisSvg",Nr),t.component("IconArrowLeft",Cr),t.component("IconCheckDefault",Sr),t.component("IconClose",Ft),t.component("IconEdit",kr),t.component("IconEmail",Er),t.component("IconMove",vr),t.component("IconPhone",xr),t.component("IconSearch",Br),t.component("IconSelectArrow",Mr),t.component("CollapseContainer",uo),t.component("CollapseItem",ho),t.component("VerticalCollapseContainer",fo),t.component("PAdd",mo),t.component("PContainer",po),t.component("PContainerStickyHead",go),t.component("PDel",yo),t.component("PTabs",Co),t.component("UploaderFile",So),t.component("AuthForm",wo),t.component("PModal",bo),t.component("AuthPage",_n),t.component("PageNotFound",Wn),t.component("AdaptiveContainer",$i),t.component("AdaptiveContainerHorizontal",Ai),t.component("AdminGallery",Ni),t.component("AuthModal",tr),t.component("CarouselImages",ir),t.component("ContextWindow",rr),t.component("DateInputRangeV2",sr),t.component("DateInputRange",or),t.component("DropList",ar),t.component("FilterCheckbox",fr),t.component("FiltersButtonsSelect",mr),t.component("FilterSelect",pr),t.component("FTSPPanel",gr),t.component("GeneralItem",yr),t.component("GridContainer",Bn),t.component("ImageCropper",so),t.component("InfoItem",Zt),t.component("InfoItemSelectButtons",ao),t.component("LeftRightContainer",lo),t.component("MessageBody",co),t.component("PAutocomplete",ko),t.component("PDialog",Eo),t.component("PhoneForm",vo),t.component("PLoader",xo),t.component("PNotification",Bo),t.component("PPagination",Mo),t.component("RemoteSearch",Io),t.component("ResearcheContainer",Ro),t.component("RightSliderContainer",$o),t.component("RightTabsContainer",Ao),t.component("SelectValueType",No),t.component("SingleNameToggleForm",Po),t.component("SortList",zo),t.component("SortSelect",To),t.component("Switch3Pos",Fo),t.component("ThemeWrapper",Do),t.component("ToggleInfoItem",Oo),t.component("TopSliderContainer",Lo),t.component("UploaderImage",Ho)}},zm=["PF","PFM"];v.AdaptiveContainer=$i,v.AdaptiveContainerHorizontal=Ai,v.AdminGallery=Ni,v.ArrowLeft=Ir,v.ArrowRight=Rr,v.AuthForm=wo,v.AuthModal=tr,v.AuthPage=_n,v.CarouselImages=ir,v.CollapseContainer=uo,v.CollapseItem=ho,v.ContextWindow=rr,v.DateInputRange=or,v.DateInputRange_v2=sr,v.DoubleArrowLeft=$r,v.DoubleArrowRight=Ar,v.DropList=ar,v.EllipsisSvg=Nr,v.FTSPPanel=gr,v.FilterCheckbox=fr,v.FilterSelect=pr,v.FiltersButtonsSelect=mr,v.GeneralItem=yr,v.GridContainer=Bn,v.IconArrowLeft=Cr,v.IconCheckDefault=Sr,v.IconClose=Ft,v.IconDownload=wr,v.IconEdit=kr,v.IconEmail=Er,v.IconFilter=br,v.IconMove=vr,v.IconPhone=xr,v.IconSearch=Br,v.IconSelectArrow=Mr,v.ImageCropper=so,v.InfoItem=Zt,v.InfoItemSelectButtons=ao,v.LeftRightContainer=lo,v.MessageBody=co,v.PAdd=mo,v.PAutocomplete=ko,v.PButton=Pi,v.PCheckBox=Vi,v.PContainer=po,v.PContainerStickyHead=go,v.PDatePicker=zi,v.PDel=yo,v.PDialog=Eo,v.PF=S,v.PFM=Pm,v.PFlex=Ti,v.PInput=qi,v.PInputDate=Ui,v.PInputNumber=_i,v.PLeftSlider=Wi,v.PList=ji,v.PListItem=Gi,v.PLoader=xo,v.PModal=bo,v.PNotification=Bo,v.PPagination=Mo,v.PRadio=Zi,v.PRightSlider=Xi,v.PSelect=Ji,v.PSticky=Yi,v.PString=Qi,v.PTabs=Co,v.PTextarea=Ki,v.PTopSlider=er,v.PageNotFound=Wn,v.PhoneForm=vo,v.RemoteSearch=Io,v.ResearcheContainer=Ro,v.RightSliderContainer=$o,v.RightTabsContainer=Ao,v.SelectValueType=No,v.SingleNameToggleForm=Po,v.SortList=zo,v.SortSelect=To,v.Switch3Pos=Fo,v.ThemeWrapper=Do,v.ToggleInfoItem=Oo,v.TopSliderContainer=Lo,v.UploaderFile=So,v.UploaderImage=Ho,v.VerticalCollapseContainer=fo,v.pfName=zm,v.servicesComponents=Vm,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
42
+ */function Ds(t){const e=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+t].concat(e))}var Os;(function(t){t.pop="pop",t.push="push"})(Os||(Os={}));var Ls;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Ls||(Ls={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var Hs;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(Hs||(Hs={}));const Lh=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":"");Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":""),Symbol(process.env.NODE_ENV!=="production"?"route location":""),Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Hh(t,e,n){const r=()=>{t[e].delete(n)};i.onUnmounted(r),i.onDeactivated(r),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function qh(t){if(process.env.NODE_ENV!=="production"&&!i.getCurrentInstance()){Ds("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");return}const e=i.inject(Lh,{}).value;if(!e){process.env.NODE_ENV!=="production"&&Ds("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");return}Hh(e,"leaveGuards",t)}function Uh(){const t=i.ref(!1),e=i.ref(!1);return{confirmLeave:t,saveButtonClick:e,beforeWindowUnload:s=>{t.value&&s.preventDefault()},formUpdated:()=>{t.value=!0},showConfirmModal:(s,a)=>{t.value&&!e.value?s():a()}}}const _h=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;S.H.FTSP.Get().reset(),Ve.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Ve.GetDefault()),Ve.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Ve.GetDefault()),S.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=Uh(),r=s=>qh((a,c,l)=>{n((s||o)(),l)}),o=s=>async()=>{e.value=!0;try{s&&await s(),S.UI.Notify.Success("Сохранено")}catch(a){S.UI.Notify.Success("Что-то пошло не так. "+a);return}};return{onBeforeMount:t,onBeforeRouteLeave:r,submit:o}})();class pi{constructor(){d(this,"tabs",[]);d(this,"idx",0);d(this,"key","")}preSelect(){const e=_e.GetStringQueryParam(this.key);if(!e||e==="undefined"){this.Select(0);return}const n=this.tabs.findIndex(r=>r.slug===e);n>-1&&this.Select(n)}static Create(e,n){const r=new pi;return r.key=e,r.tabs=n,r.tabs.length&&r.preSelect(),r}Select(e){if(this.tabs.length){if(e===void 0)return this.preSelect();this.idx=e,_e.SetQueryParam(this.key,this.GetSlug())}}GetMenu(){return this.tabs[this.idx]}GetComponent(){return this.tabs[this.idx].component}GetSlug(){return this.tabs[this.idx].slug}}const Cn=class Cn{static Format(e){let n=e;if(!n)e=n;else{(n[0]==="7"||n[0]==="8")&&n.length!==1&&(n=n.slice(1));const r=n.replace(/\+7|[^\d]/g,""),o=r.length;switch(!0){case o===0:e="";break;case(o===1&&n.length===1&&r==="7"):case(o===1&&n.length===1&&r==="8"):e="+7 (";break;case o<4:e=`+7 (${r}`;break;case o<7:e=`+7 (${r.slice(0,3)}) ${r.slice(3)}`;break;case o<9:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}`;break;default:e=`+7 (${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,8)}-${r.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(Cn,"validatePhone",(e,n,r)=>{Cn.getPhoneRegExp().test(n)||!n?r():r(new Error("Пожалуйста, введите корректный номер телефона"))});let gi=Cn;class Wh{static Count(e){const n=e.filter(s=>s.rating!==0);let r=0;n.forEach(s=>r=r+s.rating);const o=r/n.length;return isNaN(o)?0:Number((r/n.length).toFixed(2))}}class jh{static async Auth(e){e&&e()}static Dev(){}}class Gh{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",Ct.FiveMinutes);d(this,"timelines",Kt[Ct.FiveMinutes])}periodIsCorrect(e,n){return q.GtOrEq(e,this.startHM)&&q.GtOrEq(this.endHM,n)}setTimelineStep(e){this.timelineStep=e,this.setTimelines()}setTimelines(){this.timelines=Kt[this.timelineStep]}getScheduleHeight(){return this.getHourHeight()*this.getHoursArr().length}getHourHeight(){return this.timelinePxHeight*this.timelines.length}getHoursArr(){return He.GenerateNumsRange(this.startHour,this.endHour)}timeIsFree(e,n,r,o){return o.filter(s=>s.id!==r).every(s=>!q.PeriodsIntersects(e,n,s.startTime,s.endTime))}sortByStartTime(e){e.sort((n,r)=>q.HMtoM(n.startTime)-q.HMtoM(r.startTime))}}const Zh=-68;function Xh(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),r=e??Zh;let o=0;n&&(o=n.getBoundingClientRect().top+r+document.body.scrollTop),o&&document.body.scrollTo({top:o,behavior:"smooth"})}class Jh{static Sort(e){e.forEach((n,r)=>n.order=r)}}function Yh(t,e){let n=!0;return t.value.validate(r=>(r||(n=!1),n)),n}const Qh=t=>new Promise(e=>{if(document.querySelector(t))return e(document.querySelector(t));const n=new MutationObserver(()=>{document.querySelector(t)&&(n.disconnect(),e(document.querySelector(t)))});n.observe(document.body,{childList:!0,subtree:!0})});class pn{constructor(e){d(this,"id");d(this,"message","");d(this,"userName");d(this,"createdOn",new Date);d(this,"chatId");d(this,"type","message");T.BuildClass(this,e)}static Create(e,n,r,o){const s=new pn;return s.id=De(),s.chatId=e,s.message=r,s.userName=o,s}static CreatePingMessage(){const e=new pn;return e.type="ping",e.id=De(),e}isMessage(){return this.type==="message"||this.type===""}}const Kh="";class ef{constructor(e="",n="",r="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);T.BuildClass(this,{endpoint:e,query:n,mutation:r}),this.connect(),this.ping()}send(e){!this.client||this.client.readyState!==1||this.client.send(e)}ping(){setInterval(this.sendPing.bind(this),this.period)}sendPing(){!this.client||this.client.readyState!==1||this.send(JSON.stringify(pn.CreatePingMessage()))}setOnMessage(){this.client&&(this.client.onmessage=e=>{e.data})}buildUrl(){const e=`ws/${this.endpoint}/${this.query}`;return new URL(e,Kh.replace("http","ws")).toString()}connect(){this.client=new WebSocket(this.buildUrl()),this.client.onclose=this.reconnect,this.client.onerror=this.reconnect}reconnect(){setTimeout(this.connect,3e3)}}class H{}d(H,"Arrays",He),d(H,"Axios",$t),d(H,"BaseStore",X),d(H,"Phone",Je),d(H,"Cache",mn),d(H,"Classes",T),d(H,"CarouselSwipe",Mh),d(H,"Color",Rh),d(H,"CreateSortModels",Vo),d(H,"Cursor",$h),d(H,"DateMask",Th),d(H,"Dates",Te),d(H,"Dragger",Fh),d(H,"Extension",Dh),d(H,"Favourite",Oh),d(H,"FTSP",Qo),d(H,"Hooks",_h),d(H,"HttpClient",le),d(H,"Id",ve),d(H,"MakeCarousel",nr),d(H,"Period",Zn),d(H,"PhoneService",gi),d(H,"Rating",Wh),d(H,"Router",_e),d(H,"RouterGuard",jh),d(H,"Scheduler",Gh),d(H,"Scroll",Xh),d(H,"Sizes",vn),d(H,"Sorter",Jh),d(H,"Static",Un),d(H,"Statuses",ce),d(H,"Strings",ne),d(H,"Time",q),d(H,"Timer",St),d(H,"Token",Rt),d(H,"Menus",pi),d(H,"validate",Yh),d(H,"WaitElement",Qh),d(H,"WebSocketClient",ef);class tf{constructor(){d(this,"limit",25);d(this,"count",0);d(this,"curPage",1);d(this,"storeModule","")}setCurPage(e){this.curPage=e}pagesCount(){return Math.ceil(this.count/this.limit)??1}reset(){this.count=0,this.curPage=1}}const nf=new tf;class rf{constructor(){d(this,"title","");d(this,"buttons",[])}Set(e="",n){typeof e=="function"?this.title=e():typeof e=="string"?this.title=e:this.title=e.value,this.buttons=n}}const of=new rf;class sf{constructor(){d(this,"menu",[]);d(this,"path","");d(this,"isOpen",!0);d(this,"filterString","")}Set(e){this.menu=e}Get(){return this.filterString?this.filterMenu():this.menu}filterMenu(){return this.menu.filter(e=>{var n;return ne.SearchIn(e.name,this.filterString)||((n=e.children)==null?void 0:n.some(r=>ne.SearchIn(r.name,this.filterString)))})}IsOpen(){return this.isOpen}Toggle(){this.isOpen=!this.isOpen}SetPath(e){this.path=e}GetPath(){return this.path}SetFilter(e){this.filterString=e}GetChildren(e){var n;return this.filterString?(n=e.children)==null?void 0:n.filter(r=>ne.SearchIn(r.name,this.filterString)):e.children}}const af=new sf;class lf{constructor(){d(this,"Menu",i.reactive(af));d(this,"Head",i.reactive(of))}}const cf=new lf;class df extends Go{constructor(){super(...arguments);d(this,"confirmButtonText","Да");d(this,"cancelButtonText","Нет");d(this,"resolve");d(this,"reject")}GetConfirmButtonText(){return this.confirmButtonText}GetCancelButtonText(){return this.cancelButtonText}Show(n){return super.show(),typeof n!="string"&&(this.confirmButtonText=n.confirmButtonText,this.cancelButtonText=n.cancelButtonText),new Promise((r,o)=>{this.resolve=r,this.reject=o})}Save(){return this.Show({text:"У вас есть несохранённые изменения",confirmButtonText:"Сохранить",cancelButtonText:"Не сохранять"})}Submit(){this.resolve(!0),this.hide()}Cancel(){this.reject(),this.hide()}hide(){this.resolve=void 0,this.reject=void 0,super.hide()}}const uf=new df;class hf extends jo{Show(){super.show()}Hide(){super.hide()}}const ff=new hf,mf=Object.freeze(Object.defineProperty({__proto__:null,Admin:cf,Btn:Ze,Dialog:uf,Loading:ff,Notify:kt},Symbol.toStringTag,{value:"Module"}));let pf=class{async Login(e){const n=e??S.Auth.Form.GetValues(),r=await le.Post({query:"auth/login",payload:n});if(!r)throw S.UI.Notify.Error("Ошибка авторизации"),"Ошибка авторизации";S.Auth.Status.SetState(r)}async LoginAs(e){if(!await le.Post({query:"auth/login-as",payload:{email:e}})){S.UI.Notify.Error("Ошибка авторизации");return}}async Register(){}async RestorePassword(){}async passwordChange(){await le.Put({query:"auth/password-change"})}async RefreshToken(){await le.Post({query:"auth/refresh-token",payload:{refreshToken:Rt.getRefreshToken()}})}async CheckUuid(e){await le.Get({query:`auth/check-uuid/${e.userId}/${e.uniqueId}`})}};const gf=new pf;class yi{constructor(e){d(this,"id");d(this,"address");d(this,"description");T.BuildClass(this,e)}}class qs{constructor(e){d(this,"id");d(this,"address");d(this,"description");T.BuildClass(this,e)}}var yf=Object.defineProperty,gn=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&yf(e,n,o),o};const At=class ba{constructor(e){d(this,"id");d(this,"description","");d(this,"time","");d(this,"latitude","");d(this,"longitude","");d(this,"emails",[]);d(this,"postAddresses",[new yi]);d(this,"phones",[]);d(this,"websites",[]);T.BuildClass(this,e)}addEmail(){const e=Xe.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Je.Create();return e.contactId=this.id,this.phones.push(e),e}static Create(){const e=new ba;return e.id=ve.UUID(),e}removeEmail(e){T.RemoveFromClassById(e,this.emails)}removePhone(e){T.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new yi)}addWebsite(){this.websites.push(new qs)}pushFirst(){this.emails.length||this.emails.push(new Xe),this.phones.length||this.phones.push(new Je)}getCoords(){return[Number(this.latitude),Number(this.longitude)]}updateDescription(e){this.description=e}updateTime(e){this.time=e}updateLatitude(e){this.latitude=e}updateLongitutde(e){this.longitude=e}};gn([T.GetClassConstructor(Xe)],At.prototype,"emails"),gn([T.GetClassConstructor(yi)],At.prototype,"postAddresses"),gn([T.GetClassConstructor(Je)],At.prototype,"phones"),gn([T.GetClassConstructor(qs)],At.prototype,"websites");let wf=At,bf=class extends X{constructor(){super(wf,"contacts")}};const Cf=new bf;let Sf=class{constructor(){d(this,"cropper",new Xt)}Open(e){this.cropper=e}Cropper(){return this.cropper}Ratio(){return this.cropper.ratio}};const kf=new Sf;let Ef=class extends X{constructor(){super(Xe,"emails")}};const vf=new Ef;let xf=class extends X{constructor(){super(Be,"file-infos")}};const Bf=new xf;class wi{constructor(e){d(this,"id");d(this,"ftsp");d(this,"name","");T.BuildClass(this,e)}static Create(e){const n=new wi;return n.id=ve.UUID(),n.ftsp=JSON.stringify(e),n}}let Mf=class extends X{constructor(){super(wi,"ftsp-presets")}};const If=new Mf;let Rf=class extends X{constructor(){super(Yo,"humans")}};const $f=new Rf;let Af=class extends X{constructor(){super(Je,"phones")}};const Nf=new Af;class Pf{constructor(e){d(this,"id");d(this,"nameRus","");T.BuildClass(this,e)}}var Vf=Object.defineProperty,zf=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Vf(e,n,o),o};class Us{constructor(e){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);T.BuildClass(this,e)}}zf([T.GetClassConstructor(Pf)],Us.prototype,"fields");let Tf=class extends X{constructor(){super(Us,"schemas")}};const Ff=new Tf;class _s{constructor(e){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);T.BuildClass(this,e)}}class Df{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");T.BuildClass(this,e)}}var Of=Object.defineProperty,Ws=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Of(e,n,o),o};class ut{constructor(e){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",[]);T.BuildClass(this,e)}}Ws([T.GetClassConstructor(_s)],ut.prototype,"options"),Ws([T.GetClassConstructor(Df)],ut.prototype,"searchGroupMetaColumns");class bi{constructor(e){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 ut);d(this,"searchObjects",[]);d(this,"pagination",new tn);d(this,"count",0);e&&(this.query=e.query,e.searchGroups&&(this.searchGroups=e.searchGroups.map(n=>new ut(n))),e.searchGroup&&(this.searchGroup=new ut(e.searchGroup)),e.options&&(this.options=e.options.map(n=>new _s(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(r=>r.id===e);n?this.searchGroup=n:this.searchGroup=new ut}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(_e.Route().query.groupId)}setQuery(){const e=_e.Route().query.query;e&&(this.query=e)}}let Lf=class{constructor(){d(this,"isSearchDrawerOpen",i.ref(!1));d(this,"searchModel",i.reactive(new bi));d(this,"searchGroups",i.reactive([]));d(this,"count",0)}async Search(e){const n=await le.Get({query:`?key=${e.key}&query=${e.query}`});n&&n.searchGroup&&n.searchGroup.options.forEach(r=>{e.searchObjects.push({id:r.id,value:r.value,label:r.label,description:r.description})})}async mainSearch(e){this.SetSearchModel(await le.Get({query:`/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(r=>{r.options=[]});const n=await le.Get({query:`main?searchModel=${e.toUrl()}`});this.SetSearchModel(n)}ToggleDrawer(e){this.isSearchDrawerOpen.value=e,this.searchModel=new bi}SetSearchModel(e){e&&(this.searchModel=new bi(e))}SetSearchGroups(){}IsSearchDrawerOpen(){return this.isSearchDrawerOpen}SearchModel(){return this.searchModel}SearchGroups(){return this.searchGroups}Count(){return this.count}};const Hf=new Lf;class Ci{constructor(e){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");T.BuildClass(this,e)}static Create(){const e=new Ci;return e.id=ve.UUID(),e}}let qf=class extends X{constructor(){super(Ci,"users-accounts")}};const Uf=new qf;var js=(t=>(t.simple="simple",t.oneToMany="oneToMany",t.manyToMany="manyToMany",t))(js||{});class Gs{constructor(e){d(this,"id");d(this,"name",ue.String);d(this,"valueRelation",js.simple);T.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===ue.Radio)return"RadioProp";if(this.name===ue.Set)return"SetProp";if(this.name===ue.Number)return"NumberProp";if(this.name===ue.String)return"StringProp"}}let _f=class extends X{constructor(){super(Gs,"value-types")}};const Wf=new _f,jf=Object.freeze(Object.defineProperty({__proto__:null,Auth:gf,Contacts:Cf,Cropper:kf,Emails:vf,FTSPPresets:If,FileInfos:Bf,Humans:$f,Phones:Nf,Schemas:Ff,Search:Hf,UserAccounts:Uf,ValueTypes:Wf},Symbol.toStringTag,{value:"Module"}));class S{}d(S,"Auth",i.reactive(Jo)),d(S,"UI",i.reactive(mf)),d(S,"Paginator",i.reactive(nf)),d(S,"S",jf),d(S,"H",H),d(S,"C",eu);class Zs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}class Nt{constructor(e){d(this,"id");d(this,"passportId");d(this,"fileInfoId");d(this,"fileInfo",new Be);d(this,"order",0);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new Nt;return n.id=S.H.Id.UUID(),n.passportId=e,n}}var Gf=Object.defineProperty,Zf=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&Gf(e,n,o),o};class Si{constructor(e){d(this,"id");d(this,"num","");d(this,"seria","");d(this,"division","");d(this,"divisionCode","");d(this,"citzenship","");d(this,"date",new Date);d(this,"address","");d(this,"passportScans",[]);S.H.Classes.BuildClass(this,e)}}Zf([S.H.Classes.GetClassConstructor(Nt)],Si.prototype,"passportScans");class Xs{constructor(e){d(this,"id");d(this,"num","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}const Xf=Object.freeze(Object.defineProperty({__proto__:null,Inn:Zs,Passport:Si,PassportScan:Nt,Snils:Xs},Symbol.toStringTag,{value:"Module"}));let Jf=class extends X{constructor(){super(Zs,"inns")}};const Yf=new Jf;let Qf=class extends X{constructor(){super(Nt,"passport-scans")}};const Kf=new Qf;let em=class extends X{constructor(){super(Si,"passports")}};const tm=new em;let nm=class extends X{constructor(){super(Xs,"snilss")}};const im=new nm,rm=Object.freeze(Object.defineProperty({__proto__:null,C:Xf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Yf,PassportScans:Kf,Passports:tm,Snilss:im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class et{constructor(e){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);S.H.Classes.BuildClass(this,e)}static Create(e){const n=new et;return n.id=S.H.Id.UUID(),n.fieldId=e,n}}class Js{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fieldId");S.H.Classes.BuildClass(this,e)}}class ki{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);S.H.Classes.BuildClass(this,e)}}class ht{constructor(e){d(this,"id");d(this,"name","");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ht;return n.id=S.H.Id.UUID(),n.fieldId=e,n}}var om=Object.defineProperty,Pt=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&om(e,n,o),o};const tt=class En{constructor(e){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 Gs);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);S.H.Classes.BuildClass(this,e),this.changeRelation([this.valueType])}getMatrixX(){return this.answerVariants.filter(e=>!e.isMatrixY)}getMatrixY(){return this.answerVariants.filter(e=>e.isMatrixY)}static Create(e){const n=new En;return n.id=S.H.Id.UUID(),n.formSectionId=e,n}getRegisterPropertyRadioOriginalValue(e){const n=this.answerVariants.find(r=>r.id===e);return n?n.name:""}addRadioItem(e){const n=new et(e);n.order=this.answerVariants.length,this.answerVariants.push(n)}removeRadioItem(e){const n=this.answerVariants[e].id;n&&this.answerVariantsForDelete.push(n),this.answerVariants.splice(e,1)}changeRelation(e){const n=e.find(r=>r.id===this.valueTypeId);if(n){if(n.isRadio()){this.showRadio=!0,this.showSet=!1;return}if(n.isSet()){this.showSet=!0,this.showRadio=!1;return}this.showSet=!1,this.showRadio=!1,this.valueType=n}}editRegisterProperty(e){this.isEdit=e??!this.isEdit}sortExamples(){this.fieldExamples.forEach((e,n)=>e.order=n)}addRegisterPropertyMeasure(e){this.fieldMeasures.push(new ki(e))}addRegisterPropertyVariant(){this.fieldVariants.push(new ht)}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}static GetClassName(){return"Field"}setType(e){this.valueType=e,this.valueTypeId=e.id}setName(e){this.name=e}addAnswerVariant(){const e=et.Create(this.id);return e.name="Вариант",e.order=this.answerVariants.length,this.answerVariants.push(e),e}addChild(){const e=En.Create();return e.parentId=this.id,e.name="Вопрос",e.order=this.children.length,this.children.push(e),e}addFieldVariant(){const e=ht.Create(this.id);return this.fieldVariants.push(e),e}copy(){const e=new En(this);return e.id=S.H.Id.UUID(),e.answerVariants.forEach(n=>{n.id=S.H.Id.UUID(),n.fieldId=e.id}),e.children=e.children.map(n=>{const r=n.copy();return r.parentId=e.id,r}),e}};Pt([S.H.Classes.GetClassConstructor(et)],tt.prototype,"answerVariants"),Pt([S.H.Classes.GetClassConstructor(Js)],tt.prototype,"fieldExamples"),Pt([S.H.Classes.GetClassConstructor(ht)],tt.prototype,"fieldVariants"),Pt([S.H.Classes.GetClassConstructor(ki)],tt.prototype,"fieldMeasures"),Pt([S.H.Classes.GetClassConstructor(tt)],tt.prototype,"children");let yn=tt;class Ei{constructor(e){d(this,"id");d(this,"answerId");d(this,"comment","");d(this,"fileInfoId");d(this,"fileInfo",new Be);S.H.Classes.BuildClass(this,e)}}class nt{constructor(e){d(this,"id");d(this,"answerVariantId");d(this,"answerVariantIdY");d(this,"fieldFillId");S.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new nt;return r.id=De(),r.fieldFillId=e,r.answerVariantId=n,r}static GetClassName(){return"selectedAnswerVariant"}}var sm=Object.defineProperty,Ys=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&sm(e,n,o),o};const vi=class Ri{constructor(e){d(this,"id");d(this,"valueString");d(this,"valueOther");d(this,"valueNumber");d(this,"valueDate");d(this,"fileInfo",new Be);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",[]);S.H.Classes.BuildClass(this,e)}setFilled(e){this.filled=e}static Create(e,n){const r=new Ri;return r.id=De(),r.fieldId=e.id,r.formFillId=n,r.order=e.order,r.valueNumber=0,r.valueString="",r.valueDate=new Date,r}setString(e){this.valueString=e,this.valueString&&(this.filled=this.valueString.length>0)}setNumber(e){this.valueNumber=e,this.valueNumber&&(this.filled=!0)}setOther(e){this.valueOther=e,this.valueOther&&(this.filled=this.valueOther.length>0)}setDate(e){this.valueDate=e,this.filled=!0}setRadio(e){this.answerVariantId=e,this.filled=!!this.answerVariantId}static CreateMany(e,n){return e.map(r=>Ri.Create(r,n))}addFile(){const e=new Ei;return e.id=De(),e.answerId=this.id,this.answerFiles.push(e),e}getFileInfos(){const e=[];return this.answerFiles.forEach(n=>e.push(n.fileInfo)),e}getSelectedAnswerVariant(){return!0}setMatrixRadioValue(e,n){const r=nt.Create(this.id,e);return r.answerVariantIdY=n,this.selectedAnswerVariants.push(r),this.filled=!0,r}getMatrixValue(e,n){return this.selectedAnswerVariants.find(r=>r.answerVariantId===e&&r.answerVariantIdY===n)}addSelectedAnswerVariant(e){const n=nt.Create(this.id,e);return this.selectedAnswerVariants.push(n),this.filled=!0,n}static GetClassName(){return"answer"}showOther(e){const n=e.find(r=>r.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(r=>r.answerVariantId===n.id):!1}};Ys([S.H.Classes.GetClassConstructor(nt)],vi.prototype,"selectedAnswerVariants"),Ys([S.H.Classes.GetClassConstructor(Ei)],vi.prototype,"answerFiles");let ft=vi;class am{constructor(e){d(this,"id");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var lm=Object.defineProperty,cm=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&lm(e,n,o),o};const Qs=class Ca{constructor(e){d(this,"id");d(this,"name","");d(this,"order",0);d(this,"fields",[]);d(this,"formId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"formSection"}getN(){return`${this.order+1}`}getFieldN(e){return`${this.getN()}.${e+1}`}getSubFieldN(e,n){return`${this.getFieldN(e)}.${n+1}`}static Create(e){const n=new Ca;return n.id=S.H.Id.UUID(),n.formId=e,n}addField(){const e=yn.Create(this.id);return this.fields.push(e),this.sortFields(),e}sortFields(){this.fields.forEach((e,n)=>e.order=n)}getAnswerVariants(){const e=[];return this.fields.forEach(n=>e.push(...n.answerVariants)),e}};cm([S.H.Classes.GetClassConstructor(yn)],Qs.prototype,"fields");let wn=Qs;var dm=Object.defineProperty,um=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&dm(e,n,o),o};const Ks=class Sa{constructor(e){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);S.H.Classes.BuildClass(this,e)}static GetClassName(){return"Form"}static Create(){const e=new Sa;return e.id=S.H.Id.UUID(),e}editRegisterGroup(e){this.isEdit=e??!this.isEdit}addFormSection(){const e=wn.Create(this.id);return this.formSections.push(e),S.H.Sorter.Sort(this.formSections),e}getFields(){const e=this.formSections.map(r=>r.fields).flat(),n=e.map(r=>r.children).flat();return e.concat(n).filter(r=>r.children.length===0)}};um([S.H.Classes.GetClassConstructor(wn)],Ks.prototype,"formSections");let ea=Ks;var hm=Object.defineProperty,fm=(t,e,n,r)=>{for(var o=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(o=a(e,n,o)||o);return o&&hm(e,n,o),o};const ta=class ka{constructor(e){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");S.H.Classes.BuildClass(this,e)}static Create(e){const n=new ka;return n.id=S.H.Id.UUID(),n.formId=e.id,n.fieldFills.push(...ft.CreateMany(e.getFields(),n.id)),n}addFieldFill(e){this.fieldFills.push(e)}getFieldFill(e){var n;return(n=this.fieldFills)==null?void 0:n.find(r=>r.fieldId===e)}pushRegisterProperty(e){const n=new ft;n.researchResultId=e,this.fieldFills.push(n)}getRegisterPropertyToPatient(e){return this.fieldFills.filter(n=>n.researchResultId===e)}getOrCreateFieldFill(e){let n=this.getFieldFill(e.id);return n||(n=ft.Create(e),this.addFieldFill(n)),n}getFileInfos(){const e=[];return this.fieldFills.forEach(n=>e.push(...n.getFileInfos())),e}calculateFilling(){const e=this.fieldFills.filter(r=>r.filled).length,n=this.fieldFills.length;this.fillingPercentage=Math.round(e/n*100)}getFieldFillByFieldId(e){return this.fieldFills.find(n=>n.fieldId===e)}getFieldVariantFieldFill(e){return this.fieldFills.find(n=>n.answerVariantId===e)}getFieldsFieldFillsMap(e){const n={};return e.forEach(r=>{var o;if(r.code){const s=(o=this.getFieldFillByFieldId(r.id))==null?void 0:o.valueNumber;n[r.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};fm([S.H.Classes.GetClassConstructor(ft)],ta.prototype,"fieldFills");let na=ta;const mm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:et,Field:yn,FieldExample:Js,FieldFill:ft,FieldFillFile:Ei,FieldFilter:am,FieldMeasure:ki,FieldVariant:ht,Form:ea,FormFill:na,FormSection:wn,SelectedAnswerVariant:nt},Symbol.toStringTag,{value:"Module"}));let pm=class extends X{constructor(){super(et,"answer-variants")}};const gm=new pm;let ym=class extends X{constructor(){super(ft,"field-fills")}};const wm=new ym;let bm=class extends X{constructor(){super(yn,"fields")}};const Cm=new bm;let Sm=class extends X{constructor(){super(na,"form-fills")}};const km=new Sm;let Em=class extends X{constructor(){super(wn,"form-sections")}};const vm=new Em;let xm=class extends X{constructor(){super(ea,"forms")}};const Bm=new xm;let Mm=class extends X{constructor(){super(nt,"selected-answer-variants")}};const Im=new Mm,Rm=Object.freeze(Object.defineProperty({__proto__:null,C:mm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:gm,FieldFills:wm,Fields:Cm,FormFills:km,FormSections:vm,Forms:Bm,SelectedAnswerVariants:Im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));class bn{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");S.H.Classes.BuildClass(this,e)}static Create(e,n){const r=new bn;return r.id=S.H.Id.UUID(),r.name=e,r.label=n,r}}const $m=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:bn},Symbol.toStringTag,{value:"Module"}));class Am extends X{constructor(){super(bn,"color-themes")}}const Nm=new Am,Pm=Object.freeze(Object.defineProperty({__proto__:null,Docs:rm,Forms:Rm,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:$m,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Nm},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),Vm={install:function(t){t.component("PButton",Pi),t.component("PCheckBox",Vi),t.component("PDatePicker",zi),t.component("PFlex",Ti),t.component("PInput",qi),t.component("PInputDate",Ui),t.component("PInputNumber",_i),t.component("PLeftSlider",Wi),t.component("PList",ji),t.component("PListItem",Gi),t.component("PRadio",Zi),t.component("PRightSlider",Xi),t.component("PSelect",Ji),t.component("PSticky",Yi),t.component("PString",Qi),t.component("PTextarea",Ki),t.component("PTopSlider",er),t.component("IconDownload",wr),t.component("IconFilter",br),t.component("ArrowLeft",Ir),t.component("ArrowRight",Rr),t.component("DoubleArrowLeft",$r),t.component("DoubleArrowRight",Ar),t.component("EllipsisSvg",Nr),t.component("IconArrowLeft",Cr),t.component("IconCheckDefault",Sr),t.component("IconClose",Ft),t.component("IconEdit",kr),t.component("IconEmail",Er),t.component("IconMove",vr),t.component("IconPhone",xr),t.component("IconSearch",Br),t.component("IconSelectArrow",Mr),t.component("CollapseContainer",uo),t.component("CollapseItem",ho),t.component("VerticalCollapseContainer",fo),t.component("PAdd",mo),t.component("PContainer",po),t.component("PContainerStickyHead",go),t.component("PDel",yo),t.component("PTabs",Co),t.component("UploaderFile",So),t.component("AuthForm",wo),t.component("PModal",bo),t.component("AuthPage",_n),t.component("PageNotFound",Wn),t.component("AdaptiveContainer",$i),t.component("AdaptiveContainerHorizontal",Ai),t.component("AdminGallery",Ni),t.component("AuthModal",tr),t.component("CarouselImages",ir),t.component("ContextWindow",rr),t.component("DateInputRangeV2",sr),t.component("DateInputRange",or),t.component("DropList",ar),t.component("FilterCheckbox",fr),t.component("FiltersButtonsSelect",mr),t.component("FilterSelect",pr),t.component("FTSPPanel",gr),t.component("GeneralItem",yr),t.component("GridContainer",Bn),t.component("ImageCropper",so),t.component("InfoItem",Zt),t.component("InfoItemSelectButtons",ao),t.component("LeftRightContainer",lo),t.component("MessageBody",co),t.component("PAutocomplete",ko),t.component("PDialog",Eo),t.component("PhoneForm",vo),t.component("PLoader",xo),t.component("PNotification",Bo),t.component("PPagination",Mo),t.component("RemoteSearch",Io),t.component("ResearcheContainer",Ro),t.component("RightSliderContainer",$o),t.component("RightTabsContainer",Ao),t.component("SelectValueType",No),t.component("SingleNameToggleForm",Po),t.component("SortList",zo),t.component("SortSelect",To),t.component("Switch3Pos",Fo),t.component("ThemeWrapper",Do),t.component("ToggleInfoItem",Oo),t.component("TopSliderContainer",Lo),t.component("UploaderImage",Ho)}},zm=["PF","PFM"];v.AdaptiveContainer=$i,v.AdaptiveContainerHorizontal=Ai,v.AdminGallery=Ni,v.ArrowLeft=Ir,v.ArrowRight=Rr,v.AuthForm=wo,v.AuthModal=tr,v.AuthPage=_n,v.CarouselImages=ir,v.CollapseContainer=uo,v.CollapseItem=ho,v.ContextWindow=rr,v.DateInputRange=or,v.DateInputRange_v2=sr,v.DoubleArrowLeft=$r,v.DoubleArrowRight=Ar,v.DropList=ar,v.EllipsisSvg=Nr,v.FTSPPanel=gr,v.FilterCheckbox=fr,v.FilterSelect=pr,v.FiltersButtonsSelect=mr,v.GeneralItem=yr,v.GridContainer=Bn,v.IconArrowLeft=Cr,v.IconCheckDefault=Sr,v.IconClose=Ft,v.IconDownload=wr,v.IconEdit=kr,v.IconEmail=Er,v.IconFilter=br,v.IconMove=vr,v.IconPhone=xr,v.IconSearch=Br,v.IconSelectArrow=Mr,v.ImageCropper=so,v.InfoItem=Zt,v.InfoItemSelectButtons=ao,v.LeftRightContainer=lo,v.MessageBody=co,v.PAdd=mo,v.PAutocomplete=ko,v.PButton=Pi,v.PCheckBox=Vi,v.PContainer=po,v.PContainerStickyHead=go,v.PDatePicker=zi,v.PDel=yo,v.PDialog=Eo,v.PF=S,v.PFM=Pm,v.PFlex=Ti,v.PInput=qi,v.PInputDate=Ui,v.PInputNumber=_i,v.PLeftSlider=Wi,v.PList=ji,v.PListItem=Gi,v.PLoader=xo,v.PModal=bo,v.PNotification=Bo,v.PPagination=Mo,v.PRadio=Zi,v.PRightSlider=Xi,v.PSelect=Ji,v.PSticky=Yi,v.PString=Qi,v.PTabs=Co,v.PTextarea=Ki,v.PTopSlider=er,v.PageNotFound=Wn,v.PhoneForm=vo,v.RemoteSearch=Io,v.ResearcheContainer=Ro,v.RightSliderContainer=$o,v.RightTabsContainer=Ao,v.SelectValueType=No,v.SingleNameToggleForm=Po,v.SortList=zo,v.SortSelect=To,v.Switch3Pos=Fo,v.ThemeWrapper=Do,v.ToggleInfoItem=Oo,v.TopSliderContainer=Lo,v.UploaderFile=So,v.UploaderImage=Ho,v.VerticalCollapseContainer=fo,v.pfName=zm,v.servicesComponents=Vm,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "sprof",
3
3
  "description": "components for the designer and uikit",
4
4
  "author": "Stanislav Lushnikov, Daniil Gaivoronskiy",
5
- "version": "0.0.92",
5
+ "version": "0.0.94",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "./dist/sprof.umd.cjs",