sprof 0.0.78 → 0.0.80

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.
@@ -1,7 +1,7 @@
1
1
  import { default as ITab } from '../components/organisms/PTabs/ITab';
2
2
  export default class TabsStore {
3
3
  tabs: ITab[];
4
- activeTab?: ITab;
4
+ activeTab: ITab;
5
5
  activeIdx: number;
6
6
  key: string;
7
7
  preSelectTab(): void;
package/dist/sprof.js CHANGED
@@ -10885,14 +10885,14 @@ class Pg {
10885
10885
  class Xn {
10886
10886
  constructor() {
10887
10887
  u(this, "tabs", []);
10888
- u(this, "activeTab");
10888
+ u(this, "activeTab", this.tabs[0]);
10889
10889
  u(this, "activeIdx", 0);
10890
10890
  u(this, "key", "");
10891
10891
  }
10892
10892
  preSelectTab() {
10893
10893
  const e = Ct.GetStringQueryParam(this.key);
10894
- if (console.log(e), !e) {
10895
- this.select(this.tabs[0], 0);
10894
+ if (!e) {
10895
+ console.log(this.tabs), this.select(this.tabs[0], 0);
10896
10896
  return;
10897
10897
  }
10898
10898
  const i = this.tabs.findIndex((n) => n.slug === e);
@@ -10900,10 +10900,10 @@ class Xn {
10900
10900
  }
10901
10901
  static Create(e, i) {
10902
10902
  const n = new Xn();
10903
- return n.key = e, n.tabs = i, n;
10903
+ return n.key = e, n.tabs = i, n.preSelectTab(), n;
10904
10904
  }
10905
10905
  select(e, i) {
10906
- this.activeTab = e, this.activeIdx = i;
10906
+ console.log("select", e, i), this.activeTab = e, this.activeIdx = i;
10907
10907
  const n = new URL(window.location);
10908
10908
  n.searchParams.set(this.key, e.slug), history.pushState(null, "", n);
10909
10909
  }
@@ -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 _s;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_s||(_s={}));const Vh=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 Fh(t,e,n){const o=()=>{t[e].delete(n)};i.onUnmounted(o),i.onDeactivated(o),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function Dh(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(Vh,{}).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}Fh(e,"leaveGuards",t)}function Oh(){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 Lh=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;S.H.FTSP.Get().reset(),Te.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Te.GetDefault()),Te.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Te.GetDefault()),S.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=Oh(),o=s=>Dh((a,c,l)=>{n((s||r)(),l)}),r=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:o,submit:r}})(),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 o=n.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:e="";break;case(r===1&&n.length===1&&o==="7"):case(r===1&&n.length===1&&o==="8"):e="+7 (";break;case r<4:e=`+7 (${o}`;break;case r<7:e=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(Cn,"validatePhone",(e,n,o)=>{Cn.getPhoneRegExp().test(n)||!n?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let pi=Cn;class _h{static Count(e){const n=e.filter(s=>s.rating!==0);let o=0;n.forEach(s=>o=o+s.rating);const r=o/n.length;return isNaN(r)?0:Number((o/n.length).toFixed(2))}}class Hh{static async Auth(e){e&&e()}static Dev(){}}class qh{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 H.GtOrEq(e,this.startHM)&&H.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,o,r){return r.filter(s=>s.id!==o).every(s=>!H.PeriodsIntersects(e,n,s.startTime,s.endTime))}sortByStartTime(e){e.sort((n,o)=>H.HMtoM(n.startTime)-H.HMtoM(o.startTime))}}const Uh=-68;function Wh(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),o=e??Uh;let r=0;n&&(r=n.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class jh{static Sort(e){e.forEach((n,o)=>n.order=o)}}class gi{constructor(){d(this,"tabs",[]);d(this,"activeTab");d(this,"activeIdx",0);d(this,"key","")}preSelectTab(){const e=Ke.GetStringQueryParam(this.key);if(console.log(e),!e){this.select(this.tabs[0],0);return}const n=this.tabs.findIndex(o=>o.slug===e);n>-1&&this.select(this.tabs[n],n)}static Create(e,n){const o=new gi;return o.key=e,o.tabs=n,o}select(e,n){this.activeTab=e,this.activeIdx=n;const o=new URL(window.location);o.searchParams.set(this.key,e.slug),history.pushState(null,"",o)}}function Gh(t,e){let n=!0;return t.value.validate(o=>(o||(n=!1),n)),n}const Zh=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");V.BuildClass(this,e)}static Create(e,n,o,r){const s=new pn;return s.id=De(),s.chatId=e,s.message=o,s.userName=r,s}static CreatePingMessage(){const e=new pn;return e.type="ping",e.id=De(),e}isMessage(){return this.type==="message"||this.type===""}}const Xh="";class Jh{constructor(e="",n="",o="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);V.BuildClass(this,{endpoint:e,query:n,mutation:o}),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,Xh.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 _{}d(_,"Arrays",He),d(_,"Axios",$t),d(_,"BaseStore",X),d(_,"Phone",Xe),d(_,"Cache",mn),d(_,"Classes",V),d(_,"CarouselSwipe",Eh),d(_,"Color",xh),d(_,"CreateSortModels",Tr),d(_,"Cursor",Bh),d(_,"DateMask",Nh),d(_,"Dates",Ve),d(_,"Dragger",Ph),d(_,"Extension",Th),d(_,"Favourite",zh),d(_,"FTSP",Qr),d(_,"Hooks",Lh),d(_,"HttpClient",le),d(_,"Id",ve),d(_,"MakeCarousel",no),d(_,"Period",Zn),d(_,"PhoneService",pi),d(_,"Rating",_h),d(_,"Router",Ke),d(_,"RouterGuard",Hh),d(_,"Scheduler",qh),d(_,"Scroll",Wh),d(_,"Sizes",vn),d(_,"Sorter",jh),d(_,"Static",qn),d(_,"Statuses",ce),d(_,"Strings",ne),d(_,"Time",H),d(_,"Timer",St),d(_,"Token",Rt),d(_,"TabsStore",gi),d(_,"validate",Gh),d(_,"WaitElement",Zh),d(_,"WebSocketClient",Jh);class Yh{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 Qh=new Yh;class Kh{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 ef=new Kh;class tf{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(o=>ne.SearchIn(o.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(o=>ne.SearchIn(o.name,this.filterString)):e.children}}const nf=new tf;class of{constructor(){d(this,"Menu",i.reactive(nf));d(this,"Head",i.reactive(ef))}}const rf=new of;class sf extends Gr{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((o,r)=>{this.resolve=o,this.reject=r})}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 af=new sf;class lf extends jr{Show(){super.show()}Hide(){super.hide()}}const cf=new lf,df=Object.freeze(Object.defineProperty({__proto__:null,Admin:rf,Btn:Ge,Dialog:af,Loading:cf,Notify:kt},Symbol.toStringTag,{value:"Module"}));let uf=class{async Login(e){const n=e??S.Auth.Form.GetValues(),o=await le.Post({query:"auth/login",payload:n});if(!o)throw S.UI.Notify.Error("Ошибка авторизации"),"Ошибка авторизации";S.Auth.Status.SetState(o)}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 hf=new uf;class yi{constructor(e){d(this,"id");d(this,"address");d(this,"description");V.BuildClass(this,e)}}class Hs{constructor(e){d(this,"id");d(this,"address");d(this,"description");V.BuildClass(this,e)}}var ff=Object.defineProperty,gn=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&ff(e,n,r),r};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",[]);V.BuildClass(this,e)}addEmail(){const e=Ze.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Xe.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){V.RemoveFromClassById(e,this.emails)}removePhone(e){V.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new yi)}addWebsite(){this.websites.push(new Hs)}pushFirst(){this.emails.length||this.emails.push(new Ze),this.phones.length||this.phones.push(new Xe)}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([V.GetClassConstructor(Ze)],At.prototype,"emails"),gn([V.GetClassConstructor(yi)],At.prototype,"postAddresses"),gn([V.GetClassConstructor(Xe)],At.prototype,"phones"),gn([V.GetClassConstructor(Hs)],At.prototype,"websites");let mf=At,pf=class extends X{constructor(){super(mf,"contacts")}};const gf=new pf;let yf=class{constructor(){d(this,"cropper",new Xt)}Open(e){this.cropper=e}Cropper(){return this.cropper}Ratio(){return this.cropper.ratio}};const wf=new yf;let bf=class extends X{constructor(){super(Ze,"emails")}};const Cf=new bf;let Sf=class extends X{constructor(){super(Be,"file-infos")}};const kf=new Sf;class wi{constructor(e){d(this,"id");d(this,"ftsp");d(this,"name","");V.BuildClass(this,e)}static Create(e){const n=new wi;return n.id=ve.UUID(),n.ftsp=JSON.stringify(e),n}}let Ef=class extends X{constructor(){super(wi,"ftsp-presets")}};const vf=new Ef;let xf=class extends X{constructor(){super(Yr,"humans")}};const Bf=new xf;let Mf=class extends X{constructor(){super(Xe,"phones")}};const If=new Mf;class Rf{constructor(e){d(this,"id");d(this,"nameRus","");V.BuildClass(this,e)}}var $f=Object.defineProperty,Af=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&$f(e,n,r),r};class qs{constructor(e){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);V.BuildClass(this,e)}}Af([V.GetClassConstructor(Rf)],qs.prototype,"fields");let Nf=class extends X{constructor(){super(qs,"schemas")}};const Pf=new Nf;class Us{constructor(e){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);V.BuildClass(this,e)}}class Tf{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");V.BuildClass(this,e)}}var zf=Object.defineProperty,Ws=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&zf(e,n,r),r};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",[]);V.BuildClass(this,e)}}Ws([V.GetClassConstructor(Us)],ut.prototype,"options"),Ws([V.GetClassConstructor(Tf)],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 Us(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(o=>o.id===e);n?this.searchGroup=n:this.searchGroup=new ut}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Ke.Route().query.groupId)}setQuery(){const e=Ke.Route().query.query;e&&(this.query=e)}}let Vf=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(o=>{e.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(e){this.SetSearchModel(await le.Get({query:`/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(o=>{o.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 Ff=new Vf;class Ci{constructor(e){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");V.BuildClass(this,e)}static Create(){const e=new Ci;return e.id=ve.UUID(),e}}let Df=class extends X{constructor(){super(Ci,"users-accounts")}};const Of=new Df;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);V.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===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 Lf=class extends X{constructor(){super(Gs,"value-types")}};const _f=new Lf,Hf=Object.freeze(Object.defineProperty({__proto__:null,Auth:hf,Contacts:gf,Cropper:wf,Emails:Cf,FTSPPresets:vf,FileInfos:kf,Humans:Bf,Phones:If,Schemas:Pf,Search:Ff,UserAccounts:Of,ValueTypes:_f},Symbol.toStringTag,{value:"Module"}));class S{}d(S,"Auth",i.reactive(Jr)),d(S,"UI",i.reactive(df)),d(S,"Paginator",i.reactive(Qh)),d(S,"S",Hf),d(S,"H",_),d(S,"C",Jd);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 qf=Object.defineProperty,Uf=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&qf(e,n,r),r};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)}}Uf([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 Wf=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 Gf=new jf;let Zf=class extends X{constructor(){super(Nt,"passport-scans")}};const Xf=new Zf;let Jf=class extends X{constructor(){super(Si,"passports")}};const Yf=new Jf;let Qf=class extends X{constructor(){super(Xs,"snilss")}};const Kf=new Qf,em=Object.freeze(Object.defineProperty({__proto__:null,C:Wf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Gf,PassportScans:Xf,Passports:Yf,Snilss:Kf},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 tm=Object.defineProperty,Pt=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&tm(e,n,r),r};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(o=>o.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(o=>o.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 o=n.copy();return o.parentId=e.id,o}),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 o=new nt;return o.id=De(),o.fieldFillId=e,o.answerVariantId=n,o}static GetClassName(){return"selectedAnswerVariant"}}var nm=Object.defineProperty,Ys=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&nm(e,n,r),r};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 o=new Ri;return o.id=De(),o.fieldId=e.id,o.formFillId=n,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}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(o=>Ri.Create(o,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 o=nt.Create(this.id,e);return o.answerVariantIdY=n,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,n){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.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(o=>o.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(o=>o.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 im{constructor(e){d(this,"id");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var om=Object.defineProperty,rm=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&om(e,n,r),r};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}};rm([S.H.Classes.GetClassConstructor(yn)],Qs.prototype,"fields");let wn=Qs;var sm=Object.defineProperty,am=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&sm(e,n,r),r};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(o=>o.fields).flat(),n=e.map(o=>o.children).flat();return e.concat(n).filter(o=>o.children.length===0)}};am([S.H.Classes.GetClassConstructor(wn)],Ks.prototype,"formSections");let ea=Ks;var lm=Object.defineProperty,cm=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&lm(e,n,r),r};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(o=>o.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(o=>o.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(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;n[o.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};cm([S.H.Classes.GetClassConstructor(ft)],ta.prototype,"fieldFills");let na=ta;const dm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:et,Field:yn,FieldExample:Js,FieldFill:ft,FieldFillFile:Ei,FieldFilter:im,FieldMeasure:ki,FieldVariant:ht,Form:ea,FormFill:na,FormSection:wn,SelectedAnswerVariant:nt},Symbol.toStringTag,{value:"Module"}));let um=class extends X{constructor(){super(et,"answer-variants")}};const hm=new um;let fm=class extends X{constructor(){super(ft,"field-fills")}};const mm=new fm;let pm=class extends X{constructor(){super(yn,"fields")}};const gm=new pm;let ym=class extends X{constructor(){super(na,"form-fills")}};const wm=new ym;let bm=class extends X{constructor(){super(wn,"form-sections")}};const Cm=new bm;let Sm=class extends X{constructor(){super(ea,"forms")}};const km=new Sm;let Em=class extends X{constructor(){super(nt,"selected-answer-variants")}};const vm=new Em,xm=Object.freeze(Object.defineProperty({__proto__:null,C:dm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:hm,FieldFills:mm,Fields:gm,FormFills:wm,FormSections:Cm,Forms:km,SelectedAnswerVariants:vm},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 o=new bn;return o.id=S.H.Id.UUID(),o.name=e,o.label=n,o}}const Bm=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:bn},Symbol.toStringTag,{value:"Module"}));class Mm extends X{constructor(){super(bn,"color-themes")}}const Im=new Mm,Rm=Object.freeze(Object.defineProperty({__proto__:null,Docs:em,Forms:xm,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:Bm,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),$m={install:function(t){t.component("PButton",Pi),t.component("PCheckBox",Ti),t.component("PDatePicker",zi),t.component("PFlex",Vi),t.component("PInput",Hi),t.component("PInputDate",qi),t.component("PInputNumber",Ui),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",eo),t.component("IconDownload",bo),t.component("IconFilter",Co),t.component("ArrowLeft",Ro),t.component("ArrowRight",$o),t.component("DoubleArrowLeft",Ao),t.component("DoubleArrowRight",No),t.component("EllipsisSvg",Po),t.component("IconArrowLeft",So),t.component("IconCheckDefault",ko),t.component("IconClose",Ft),t.component("IconEdit",Eo),t.component("IconEmail",vo),t.component("IconMove",xo),t.component("IconPhone",Bo),t.component("IconSearch",Mo),t.component("IconSelectArrow",Io),t.component("CollapseContainer",ur),t.component("CollapseItem",hr),t.component("VerticalCollapseContainer",fr),t.component("PAdd",mr),t.component("PContainer",pr),t.component("PContainerStickyHead",gr),t.component("PDel",yr),t.component("PTabs",Cr),t.component("UploaderFile",Sr),t.component("AuthForm",wr),t.component("PModal",br),t.component("AuthPage",Un),t.component("PageNotFound",Wn),t.component("AdaptiveContainer",$i),t.component("AdaptiveContainerHorizontal",Ai),t.component("AdminGallery",Ni),t.component("AuthModal",to),t.component("CarouselImages",io),t.component("ContextWindow",oo),t.component("DateInputRangeV2",so),t.component("DateInputRange",ro),t.component("DropList",ao),t.component("FilterCheckbox",mo),t.component("FiltersButtonsSelect",po),t.component("FilterSelect",go),t.component("FTSPPanel",yo),t.component("GeneralItem",wo),t.component("GridContainer",Bn),t.component("ImageCropper",ar),t.component("InfoItem",Zt),t.component("InfoItemSelectButtons",lr),t.component("LeftRightContainer",cr),t.component("MessageBody",dr),t.component("PAutocomplete",kr),t.component("PDialog",Er),t.component("PhoneForm",vr),t.component("PLoader",xr),t.component("PNotification",Br),t.component("PPagination",Mr),t.component("RemoteSearch",Ir),t.component("ResearcheContainer",Rr),t.component("RightSliderContainer",$r),t.component("RightTabsContainer",Ar),t.component("SelectValueType",Nr),t.component("SingleNameToggleForm",Pr),t.component("SortList",zr),t.component("SortSelect",Vr),t.component("Switch3Pos",Fr),t.component("ThemeWrapper",Dr),t.component("ToggleInfoItem",Or),t.component("TopSliderContainer",Lr),t.component("UploaderImage",_r)}},Am=["PF","PFM"];v.AdaptiveContainer=$i,v.AdaptiveContainerHorizontal=Ai,v.AdminGallery=Ni,v.ArrowLeft=Ro,v.ArrowRight=$o,v.AuthForm=wr,v.AuthModal=to,v.AuthPage=Un,v.CarouselImages=io,v.CollapseContainer=ur,v.CollapseItem=hr,v.ContextWindow=oo,v.DateInputRange=ro,v.DateInputRange_v2=so,v.DoubleArrowLeft=Ao,v.DoubleArrowRight=No,v.DropList=ao,v.EllipsisSvg=Po,v.FTSPPanel=yo,v.FilterCheckbox=mo,v.FilterSelect=go,v.FiltersButtonsSelect=po,v.GeneralItem=wo,v.GridContainer=Bn,v.IconArrowLeft=So,v.IconCheckDefault=ko,v.IconClose=Ft,v.IconDownload=bo,v.IconEdit=Eo,v.IconEmail=vo,v.IconFilter=Co,v.IconMove=xo,v.IconPhone=Bo,v.IconSearch=Mo,v.IconSelectArrow=Io,v.ImageCropper=ar,v.InfoItem=Zt,v.InfoItemSelectButtons=lr,v.LeftRightContainer=cr,v.MessageBody=dr,v.PAdd=mr,v.PAutocomplete=kr,v.PButton=Pi,v.PCheckBox=Ti,v.PContainer=pr,v.PContainerStickyHead=gr,v.PDatePicker=zi,v.PDel=yr,v.PDialog=Er,v.PF=S,v.PFM=Rm,v.PFlex=Vi,v.PInput=Hi,v.PInputDate=qi,v.PInputNumber=Ui,v.PLeftSlider=Wi,v.PList=ji,v.PListItem=Gi,v.PLoader=xr,v.PModal=br,v.PNotification=Br,v.PPagination=Mr,v.PRadio=Zi,v.PRightSlider=Xi,v.PSelect=Ji,v.PSticky=Yi,v.PString=Qi,v.PTabs=Cr,v.PTextarea=Ki,v.PTopSlider=eo,v.PageNotFound=Wn,v.PhoneForm=vr,v.RemoteSearch=Ir,v.ResearcheContainer=Rr,v.RightSliderContainer=$r,v.RightTabsContainer=Ar,v.SelectValueType=Nr,v.SingleNameToggleForm=Pr,v.SortList=zr,v.SortSelect=Vr,v.Switch3Pos=Fr,v.ThemeWrapper=Dr,v.ToggleInfoItem=Or,v.TopSliderContainer=Lr,v.UploaderFile=Sr,v.UploaderImage=_r,v.VerticalCollapseContainer=fr,v.pfName=Am,v.servicesComponents=$m,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 _s;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(_s||(_s={}));const Vh=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 Fh(t,e,n){const o=()=>{t[e].delete(n)};i.onUnmounted(o),i.onDeactivated(o),i.onActivated(()=>{t[e].add(n)}),t[e].add(n)}function Dh(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(Vh,{}).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}Fh(e,"leaveGuards",t)}function Oh(){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 Lh=(()=>{const t=(s,a)=>i.onBeforeMount(async()=>{var c;S.H.FTSP.Get().reset(),Te.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Te.GetDefault()),Te.Set(a==null?void 0:a.sortsLib),S.H.FTSP.Get().setSortModel(Te.GetDefault()),S.Paginator.storeModule=(c=a==null?void 0:a.pagination)==null?void 0:c.storeModule,await s()}),{saveButtonClick:e,showConfirmModal:n}=Oh(),o=s=>Dh((a,c,l)=>{n((s||r)(),l)}),r=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:o,submit:r}})(),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 o=n.replace(/\+7|[^\d]/g,""),r=o.length;switch(!0){case r===0:e="";break;case(r===1&&n.length===1&&o==="7"):case(r===1&&n.length===1&&o==="8"):e="+7 (";break;case r<4:e=`+7 (${o}`;break;case r<7:e=`+7 (${o.slice(0,3)}) ${o.slice(3)}`;break;case r<9:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}`;break;default:e=`+7 (${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,8)}-${o.slice(8,10)}`;break}}return e}static getPhoneRegExp(){return/^(\s*)?(\+)?([- _():=+]?\d[- _():=+]?){10,14}(\s*)?$/}};d(Cn,"validatePhone",(e,n,o)=>{Cn.getPhoneRegExp().test(n)||!n?o():o(new Error("Пожалуйста, введите корректный номер телефона"))});let pi=Cn;class _h{static Count(e){const n=e.filter(s=>s.rating!==0);let o=0;n.forEach(s=>o=o+s.rating);const r=o/n.length;return isNaN(r)?0:Number((o/n.length).toFixed(2))}}class Hh{static async Auth(e){e&&e()}static Dev(){}}class qh{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 H.GtOrEq(e,this.startHM)&&H.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,o,r){return r.filter(s=>s.id!==o).every(s=>!H.PeriodsIntersects(e,n,s.startTime,s.endTime))}sortByStartTime(e){e.sort((n,o)=>H.HMtoM(n.startTime)-H.HMtoM(o.startTime))}}const Uh=-68;function Wh(t,e){if(!t){document.body.scrollTo({top:0,behavior:"smooth"});return}const n=document.querySelector(t),o=e??Uh;let r=0;n&&(r=n.getBoundingClientRect().top+o+document.body.scrollTop),r&&document.body.scrollTo({top:r,behavior:"smooth"})}class jh{static Sort(e){e.forEach((n,o)=>n.order=o)}}class gi{constructor(){d(this,"tabs",[]);d(this,"activeTab",this.tabs[0]);d(this,"activeIdx",0);d(this,"key","")}preSelectTab(){const e=Ke.GetStringQueryParam(this.key);if(!e){console.log(this.tabs),this.select(this.tabs[0],0);return}const n=this.tabs.findIndex(o=>o.slug===e);n>-1&&this.select(this.tabs[n],n)}static Create(e,n){const o=new gi;return o.key=e,o.tabs=n,o.preSelectTab(),o}select(e,n){console.log("select",e,n),this.activeTab=e,this.activeIdx=n;const o=new URL(window.location);o.searchParams.set(this.key,e.slug),history.pushState(null,"",o)}}function Gh(t,e){let n=!0;return t.value.validate(o=>(o||(n=!1),n)),n}const Zh=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");V.BuildClass(this,e)}static Create(e,n,o,r){const s=new pn;return s.id=De(),s.chatId=e,s.message=o,s.userName=r,s}static CreatePingMessage(){const e=new pn;return e.type="ping",e.id=De(),e}isMessage(){return this.type==="message"||this.type===""}}const Xh="";class Jh{constructor(e="",n="",o="set"){d(this,"client");d(this,"endpoint","");d(this,"query","");d(this,"period",2e4);V.BuildClass(this,{endpoint:e,query:n,mutation:o}),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,Xh.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 _{}d(_,"Arrays",He),d(_,"Axios",$t),d(_,"BaseStore",X),d(_,"Phone",Xe),d(_,"Cache",mn),d(_,"Classes",V),d(_,"CarouselSwipe",Eh),d(_,"Color",xh),d(_,"CreateSortModels",Tr),d(_,"Cursor",Bh),d(_,"DateMask",Nh),d(_,"Dates",Ve),d(_,"Dragger",Ph),d(_,"Extension",Th),d(_,"Favourite",zh),d(_,"FTSP",Qr),d(_,"Hooks",Lh),d(_,"HttpClient",le),d(_,"Id",ve),d(_,"MakeCarousel",no),d(_,"Period",Zn),d(_,"PhoneService",pi),d(_,"Rating",_h),d(_,"Router",Ke),d(_,"RouterGuard",Hh),d(_,"Scheduler",qh),d(_,"Scroll",Wh),d(_,"Sizes",vn),d(_,"Sorter",jh),d(_,"Static",qn),d(_,"Statuses",ce),d(_,"Strings",ne),d(_,"Time",H),d(_,"Timer",St),d(_,"Token",Rt),d(_,"TabsStore",gi),d(_,"validate",Gh),d(_,"WaitElement",Zh),d(_,"WebSocketClient",Jh);class Yh{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 Qh=new Yh;class Kh{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 ef=new Kh;class tf{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(o=>ne.SearchIn(o.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(o=>ne.SearchIn(o.name,this.filterString)):e.children}}const nf=new tf;class of{constructor(){d(this,"Menu",i.reactive(nf));d(this,"Head",i.reactive(ef))}}const rf=new of;class sf extends Gr{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((o,r)=>{this.resolve=o,this.reject=r})}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 af=new sf;class lf extends jr{Show(){super.show()}Hide(){super.hide()}}const cf=new lf,df=Object.freeze(Object.defineProperty({__proto__:null,Admin:rf,Btn:Ge,Dialog:af,Loading:cf,Notify:kt},Symbol.toStringTag,{value:"Module"}));let uf=class{async Login(e){const n=e??S.Auth.Form.GetValues(),o=await le.Post({query:"auth/login",payload:n});if(!o)throw S.UI.Notify.Error("Ошибка авторизации"),"Ошибка авторизации";S.Auth.Status.SetState(o)}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 hf=new uf;class yi{constructor(e){d(this,"id");d(this,"address");d(this,"description");V.BuildClass(this,e)}}class Hs{constructor(e){d(this,"id");d(this,"address");d(this,"description");V.BuildClass(this,e)}}var ff=Object.defineProperty,gn=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&ff(e,n,r),r};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",[]);V.BuildClass(this,e)}addEmail(){const e=Ze.Create();return e.contactId=this.id,this.emails.push(e),e}addPhone(){const e=Xe.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){V.RemoveFromClassById(e,this.emails)}removePhone(e){V.RemoveFromClassById(e,this.phones)}addPostAddress(){this.postAddresses.push(new yi)}addWebsite(){this.websites.push(new Hs)}pushFirst(){this.emails.length||this.emails.push(new Ze),this.phones.length||this.phones.push(new Xe)}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([V.GetClassConstructor(Ze)],At.prototype,"emails"),gn([V.GetClassConstructor(yi)],At.prototype,"postAddresses"),gn([V.GetClassConstructor(Xe)],At.prototype,"phones"),gn([V.GetClassConstructor(Hs)],At.prototype,"websites");let mf=At,pf=class extends X{constructor(){super(mf,"contacts")}};const gf=new pf;let yf=class{constructor(){d(this,"cropper",new Xt)}Open(e){this.cropper=e}Cropper(){return this.cropper}Ratio(){return this.cropper.ratio}};const wf=new yf;let bf=class extends X{constructor(){super(Ze,"emails")}};const Cf=new bf;let Sf=class extends X{constructor(){super(Be,"file-infos")}};const kf=new Sf;class wi{constructor(e){d(this,"id");d(this,"ftsp");d(this,"name","");V.BuildClass(this,e)}static Create(e){const n=new wi;return n.id=ve.UUID(),n.ftsp=JSON.stringify(e),n}}let Ef=class extends X{constructor(){super(wi,"ftsp-presets")}};const vf=new Ef;let xf=class extends X{constructor(){super(Yr,"humans")}};const Bf=new xf;let Mf=class extends X{constructor(){super(Xe,"phones")}};const If=new Mf;class Rf{constructor(e){d(this,"id");d(this,"nameRus","");V.BuildClass(this,e)}}var $f=Object.defineProperty,Af=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&$f(e,n,r),r};class qs{constructor(e){d(this,"id");d(this,"nameRus","");d(this,"fields",[]);V.BuildClass(this,e)}}Af([V.GetClassConstructor(Rf)],qs.prototype,"fields");let Nf=class extends X{constructor(){super(qs,"schemas")}};const Pf=new Nf;class Us{constructor(e){d(this,"id","");d(this,"value","");d(this,"label","");d(this,"key","");d(this,"description","");d(this,"route","");d(this,"searchElementMetas",[]);V.BuildClass(this,e)}}class Tf{constructor(e){d(this,"id");d(this,"name","");d(this,"label","");V.BuildClass(this,e)}}var zf=Object.defineProperty,Ws=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&zf(e,n,r),r};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",[]);V.BuildClass(this,e)}}Ws([V.GetClassConstructor(Us)],ut.prototype,"options"),Ws([V.GetClassConstructor(Tf)],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 Us(n))),this.count=e.count)}toUrl(){return JSON.stringify(this)}async setSearchGroup(e){const n=this.searchGroups.find(o=>o.id===e);n?this.searchGroup=n:this.searchGroup=new ut}async reproduceFromRoute(){this.setQuery(),await this.setSearchGroup(Ke.Route().query.groupId)}setQuery(){const e=Ke.Route().query.query;e&&(this.query=e)}}let Vf=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(o=>{e.searchObjects.push({id:o.id,value:o.value,label:o.label,description:o.description})})}async mainSearch(e){this.SetSearchModel(await le.Get({query:`/main?searchModel=${e.toUrl()}`}))}async Full(e){e.options=[],e.searchGroups.forEach(o=>{o.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 Ff=new Vf;class Ci{constructor(e){d(this,"id");d(this,"login","");d(this,"email","");d(this,"password","");V.BuildClass(this,e)}static Create(){const e=new Ci;return e.id=ve.UUID(),e}}let Df=class extends X{constructor(){super(Ci,"users-accounts")}};const Of=new Df;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);V.BuildClass(this,e)}isString(){return this.name==="string"}isNumber(){return this.name==="number"}isDate(){return this.name==="date"}isDateTime(){return this.name==="dateTime"}isRadio(){return this.name==="radio"}isSet(){return this.name==="set"}isText(){return this.name==="text"}isBoolean(){return this.name==="boolean"}isFile(){return this.name==="file"}isFiles(){return this.name==="files"}getComponentType(){if(this.name===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 Lf=class extends X{constructor(){super(Gs,"value-types")}};const _f=new Lf,Hf=Object.freeze(Object.defineProperty({__proto__:null,Auth:hf,Contacts:gf,Cropper:wf,Emails:Cf,FTSPPresets:vf,FileInfos:kf,Humans:Bf,Phones:If,Schemas:Pf,Search:Ff,UserAccounts:Of,ValueTypes:_f},Symbol.toStringTag,{value:"Module"}));class S{}d(S,"Auth",i.reactive(Jr)),d(S,"UI",i.reactive(df)),d(S,"Paginator",i.reactive(Qh)),d(S,"S",Hf),d(S,"H",_),d(S,"C",Jd);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 qf=Object.defineProperty,Uf=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&qf(e,n,r),r};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)}}Uf([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 Wf=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 Gf=new jf;let Zf=class extends X{constructor(){super(Nt,"passport-scans")}};const Xf=new Zf;let Jf=class extends X{constructor(){super(Si,"passports")}};const Yf=new Jf;let Qf=class extends X{constructor(){super(Xs,"snilss")}};const Kf=new Qf,em=Object.freeze(Object.defineProperty({__proto__:null,C:Wf,S:Object.freeze(Object.defineProperty({__proto__:null,Inns:Gf,PassportScans:Xf,Passports:Yf,Snilss:Kf},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 tm=Object.defineProperty,Pt=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&tm(e,n,r),r};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(o=>o.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(o=>o.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 o=n.copy();return o.parentId=e.id,o}),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 o=new nt;return o.id=De(),o.fieldFillId=e,o.answerVariantId=n,o}static GetClassName(){return"selectedAnswerVariant"}}var nm=Object.defineProperty,Ys=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&nm(e,n,r),r};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 o=new Ri;return o.id=De(),o.fieldId=e.id,o.formFillId=n,o.order=e.order,o.valueNumber=0,o.valueString="",o.valueDate=new Date,o}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(o=>Ri.Create(o,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 o=nt.Create(this.id,e);return o.answerVariantIdY=n,this.selectedAnswerVariants.push(o),this.filled=!0,o}getMatrixValue(e,n){return this.selectedAnswerVariants.find(o=>o.answerVariantId===e&&o.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(o=>o.showOther);return n?this.answerVariantId===n.id||this.selectedAnswerVariants.some(o=>o.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 im{constructor(e){d(this,"id");d(this,"fieldId");S.H.Classes.BuildClass(this,e)}static GetClassName(){return"fieldFilter"}}var om=Object.defineProperty,rm=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&om(e,n,r),r};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}};rm([S.H.Classes.GetClassConstructor(yn)],Qs.prototype,"fields");let wn=Qs;var sm=Object.defineProperty,am=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&sm(e,n,r),r};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(o=>o.fields).flat(),n=e.map(o=>o.children).flat();return e.concat(n).filter(o=>o.children.length===0)}};am([S.H.Classes.GetClassConstructor(wn)],Ks.prototype,"formSections");let ea=Ks;var lm=Object.defineProperty,cm=(t,e,n,o)=>{for(var r=void 0,s=t.length-1,a;s>=0;s--)(a=t[s])&&(r=a(e,n,r)||r);return r&&lm(e,n,r),r};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(o=>o.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(o=>o.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(o=>{var r;if(o.code){const s=(r=this.getFieldFillByFieldId(o.id))==null?void 0:r.valueNumber;n[o.code]=s}}),n}getIdWithoutDashes(){return this.id?this.id.replaceAll(/[^a-zA-Z]+/g,""):""}};cm([S.H.Classes.GetClassConstructor(ft)],ta.prototype,"fieldFills");let na=ta;const dm=Object.freeze(Object.defineProperty({__proto__:null,AnswerVariant:et,Field:yn,FieldExample:Js,FieldFill:ft,FieldFillFile:Ei,FieldFilter:im,FieldMeasure:ki,FieldVariant:ht,Form:ea,FormFill:na,FormSection:wn,SelectedAnswerVariant:nt},Symbol.toStringTag,{value:"Module"}));let um=class extends X{constructor(){super(et,"answer-variants")}};const hm=new um;let fm=class extends X{constructor(){super(ft,"field-fills")}};const mm=new fm;let pm=class extends X{constructor(){super(yn,"fields")}};const gm=new pm;let ym=class extends X{constructor(){super(na,"form-fills")}};const wm=new ym;let bm=class extends X{constructor(){super(wn,"form-sections")}};const Cm=new bm;let Sm=class extends X{constructor(){super(ea,"forms")}};const km=new Sm;let Em=class extends X{constructor(){super(nt,"selected-answer-variants")}};const vm=new Em,xm=Object.freeze(Object.defineProperty({__proto__:null,C:dm,S:Object.freeze(Object.defineProperty({__proto__:null,AnswerVariants:hm,FieldFills:mm,Fields:gm,FormFills:wm,FormSections:Cm,Forms:km,SelectedAnswerVariants:vm},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 o=new bn;return o.id=S.H.Id.UUID(),o.name=e,o.label=n,o}}const Bm=Object.freeze(Object.defineProperty({__proto__:null,ColorTheme:bn},Symbol.toStringTag,{value:"Module"}));class Mm extends X{constructor(){super(bn,"color-themes")}}const Im=new Mm,Rm=Object.freeze(Object.defineProperty({__proto__:null,Docs:em,Forms:xm,Settings:Object.freeze(Object.defineProperty({__proto__:null,C:Bm,S:Object.freeze(Object.defineProperty({__proto__:null,ColorThemes:Im},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"})),$m={install:function(t){t.component("PButton",Pi),t.component("PCheckBox",Ti),t.component("PDatePicker",zi),t.component("PFlex",Vi),t.component("PInput",Hi),t.component("PInputDate",qi),t.component("PInputNumber",Ui),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",eo),t.component("IconDownload",bo),t.component("IconFilter",Co),t.component("ArrowLeft",Ro),t.component("ArrowRight",$o),t.component("DoubleArrowLeft",Ao),t.component("DoubleArrowRight",No),t.component("EllipsisSvg",Po),t.component("IconArrowLeft",So),t.component("IconCheckDefault",ko),t.component("IconClose",Ft),t.component("IconEdit",Eo),t.component("IconEmail",vo),t.component("IconMove",xo),t.component("IconPhone",Bo),t.component("IconSearch",Mo),t.component("IconSelectArrow",Io),t.component("CollapseContainer",ur),t.component("CollapseItem",hr),t.component("VerticalCollapseContainer",fr),t.component("PAdd",mr),t.component("PContainer",pr),t.component("PContainerStickyHead",gr),t.component("PDel",yr),t.component("PTabs",Cr),t.component("UploaderFile",Sr),t.component("AuthForm",wr),t.component("PModal",br),t.component("AuthPage",Un),t.component("PageNotFound",Wn),t.component("AdaptiveContainer",$i),t.component("AdaptiveContainerHorizontal",Ai),t.component("AdminGallery",Ni),t.component("AuthModal",to),t.component("CarouselImages",io),t.component("ContextWindow",oo),t.component("DateInputRangeV2",so),t.component("DateInputRange",ro),t.component("DropList",ao),t.component("FilterCheckbox",mo),t.component("FiltersButtonsSelect",po),t.component("FilterSelect",go),t.component("FTSPPanel",yo),t.component("GeneralItem",wo),t.component("GridContainer",Bn),t.component("ImageCropper",ar),t.component("InfoItem",Zt),t.component("InfoItemSelectButtons",lr),t.component("LeftRightContainer",cr),t.component("MessageBody",dr),t.component("PAutocomplete",kr),t.component("PDialog",Er),t.component("PhoneForm",vr),t.component("PLoader",xr),t.component("PNotification",Br),t.component("PPagination",Mr),t.component("RemoteSearch",Ir),t.component("ResearcheContainer",Rr),t.component("RightSliderContainer",$r),t.component("RightTabsContainer",Ar),t.component("SelectValueType",Nr),t.component("SingleNameToggleForm",Pr),t.component("SortList",zr),t.component("SortSelect",Vr),t.component("Switch3Pos",Fr),t.component("ThemeWrapper",Dr),t.component("ToggleInfoItem",Or),t.component("TopSliderContainer",Lr),t.component("UploaderImage",_r)}},Am=["PF","PFM"];v.AdaptiveContainer=$i,v.AdaptiveContainerHorizontal=Ai,v.AdminGallery=Ni,v.ArrowLeft=Ro,v.ArrowRight=$o,v.AuthForm=wr,v.AuthModal=to,v.AuthPage=Un,v.CarouselImages=io,v.CollapseContainer=ur,v.CollapseItem=hr,v.ContextWindow=oo,v.DateInputRange=ro,v.DateInputRange_v2=so,v.DoubleArrowLeft=Ao,v.DoubleArrowRight=No,v.DropList=ao,v.EllipsisSvg=Po,v.FTSPPanel=yo,v.FilterCheckbox=mo,v.FilterSelect=go,v.FiltersButtonsSelect=po,v.GeneralItem=wo,v.GridContainer=Bn,v.IconArrowLeft=So,v.IconCheckDefault=ko,v.IconClose=Ft,v.IconDownload=bo,v.IconEdit=Eo,v.IconEmail=vo,v.IconFilter=Co,v.IconMove=xo,v.IconPhone=Bo,v.IconSearch=Mo,v.IconSelectArrow=Io,v.ImageCropper=ar,v.InfoItem=Zt,v.InfoItemSelectButtons=lr,v.LeftRightContainer=cr,v.MessageBody=dr,v.PAdd=mr,v.PAutocomplete=kr,v.PButton=Pi,v.PCheckBox=Ti,v.PContainer=pr,v.PContainerStickyHead=gr,v.PDatePicker=zi,v.PDel=yr,v.PDialog=Er,v.PF=S,v.PFM=Rm,v.PFlex=Vi,v.PInput=Hi,v.PInputDate=qi,v.PInputNumber=Ui,v.PLeftSlider=Wi,v.PList=ji,v.PListItem=Gi,v.PLoader=xr,v.PModal=br,v.PNotification=Br,v.PPagination=Mr,v.PRadio=Zi,v.PRightSlider=Xi,v.PSelect=Ji,v.PSticky=Yi,v.PString=Qi,v.PTabs=Cr,v.PTextarea=Ki,v.PTopSlider=eo,v.PageNotFound=Wn,v.PhoneForm=vr,v.RemoteSearch=Ir,v.ResearcheContainer=Rr,v.RightSliderContainer=$r,v.RightTabsContainer=Ar,v.SelectValueType=Nr,v.SingleNameToggleForm=Pr,v.SortList=zr,v.SortSelect=Vr,v.Switch3Pos=Fr,v.ThemeWrapper=Dr,v.ToggleInfoItem=Or,v.TopSliderContainer=Lr,v.UploaderFile=Sr,v.UploaderImage=_r,v.VerticalCollapseContainer=fr,v.pfName=Am,v.servicesComponents=$m,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.78",
5
+ "version": "0.0.80",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "./dist/sprof.umd.cjs",