eservices-core 1.3.14 → 1.3.16

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,11 +1,11 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('*{--extra-fast:.1s;--fast:.2s;--medium:.3s;box-sizing:border-box;--primary: #3949ab }html,body,#app{height:100%}body{margin:0}ul{text-align:left}.flex{display:flex}.flex_column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.flex_grow{flex-grow:1}.flex-align_center{align-items:center}.grid{display:grid}.grid-center{display:grid;place-content:center}.link{text-decoration:var(--link-decoration);color:var(--link-color)}.link_hover-underline:hover,.link_hover_underline:hover{text-decoration:underline}.link_full{position:absolute;height:100%;width:100%;left:0;top:0}.text_sm{font-weight:400;font-size:12px;line-height:16px}.text_md{font-size:14px;line-height:20px}.text_lg{font-size:16px;line-height:24px}.text_size_xxl{font-size:18px;line-height:25px}.text_bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_center{text-align:center}.text_size_sm{font-size:12px;line-height:130%}.text_size_md{font-size:14px;line-height:140%}.text_error{color:red}.text_overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.title_sm{font-weight:600;font-size:16px;line-height:24px}.title_md{font-weight:600;font-size:24px;line-height:32px}.title_lg{font-weight:700;font-size:32px;line-height:48px}.title_xxl,.title_xl{font-weight:700;font-size:48px;line-height:64px}.cursor_pointer{cursor:pointer}.cursor_default{cursor:default}button{outline:none;-webkit-user-select:none;user-select:none;transition:background-color .2s}.button{display:flex;align-items:center;justify-content:center;outline:none}.button_main{background-color:var(--button-background);color:var(--button-color)}.button_main:focus{background-color:var(--button-background-active)}.button_main:active{background-color:var(--button-background-active)}.button_white{background-color:var(--white);color:var(--main)}.button_sm{height:30px;width:130px}.button_shadow{box-shadow:0 2px 4px #00000040}.button_lg{font-weight:600;font-size:16px;line-height:24px;padding:12px 0;height:50px;width:200px}.button_disabled{background-color:var(--gray-1)}.button_resolve{background-color:var(--main);color:var(--white);border-radius:2px}.button_reject{border:1px solid var(--color-dark);border-radius:2px}.button_md{height:30px;padding:0 10px;min-width:80px}.button_disabled{background-color:var(--button-disabled-background-color);cursor:pointer!important}.color_main,.color__text_main{color:var(--main)}.color__text_black{color:var(--black-1)}.color__text_gray{color:var(--text-gray)}.color__text_red,.color_red{color:var(--red)}.color__text_white{color:var(--white)}.background_orange{background-color:var(--orange)}.background_red{background-color:var(--red)}.color_dark{color:var(--dark)}.color_light{color:var(--light)}.move-vertical-enter-active,.move-vertical-leave-active{transition:transform .5s ease}.move-vertical-enter-from,.move-vertical-leave-to{transform:translateY(-10px)}.move-horizontal-enter-active,.move-horizontal-leave-active{transition:transform .5s}.move-horizontal-enter-from,.move-horizontal-leave-to{transform:translate(-40px)}.modal-vertical-enter-active,.modal-vertical-leave-active,.modal-default{transition:transform var(--medium)}.modal-vertical-enter-active .modal-default,.modal-vertical-leave-active .modal-default{transform:translateY(-100px)}.move-vertical-fast-enter-active,.move-vertical-fast-leave-active{transition:transform var(--fast) ease}.move-vertical-fast-enter-from,.move-vertical-fast-leave-to{transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:transform var(--fast) ease,opacity var(--fast)}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(20px);opacity:0}.opacity-enter-active,.opacity-leave-active{transition:opacity var(--fast) ease}.opacity-enter-from,.opacity-leave-to{opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute}.modal-default{background-color:var(--white);position:relative;z-index:1;width:auto;background:var(--white);border-radius:var(--border-radius)}.modal-default__head{background-color:var(--black-1);text-align:center;padding:5px 0;border-radius:6px 6px 0 0}.modal-default__body{gap:20px;padding:0 15px}.modal-default__foot{padding:30px 0;display:flex;justify-content:center}.hint-tooltip{display:block;z-index:222;margin:auto;pointer-events:none;box-shadow:0 0 0 9999px #00000080}.tooltip-help-circle-in,.tooltip-help-circle-out{border-radius:50%}.tooltip-help-undefined{border-radius:50px}.tooltip-card{position:fixed;z-index:315;display:flex;flex-direction:column;width:480px;height:fit-content;margin:auto;border-radius:10px;background-color:var(--hint-background);cursor:default}.tooltip-card__foot{display:flex;justify-content:space-between;align-items:center;background-color:var(--hint-background-navigation);border-radius:10px;padding:20px}.tooltip-card__foot-current{font-weight:600;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px 20px 10px}.tooltip-card__body-title{font-weight:700;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body-text{font-size:16px;line-height:24px;color:var(--white)}.tooltip-card__foot-button_back{background-color:var(--main-1)}.tooltip-card__foot-button_next{background-color:var(--hint)}.tooltip-card__body-close{position:absolute;right:22px;top:12px;width:20px;height:16px;opacity:.3;cursor:pointer}.tooltip-card__body-close:hover{opacity:1}.tooltip-card__body-close:before,.tooltip-card__body-close:after{position:absolute;left:15px;content:" ";height:21px;width:2px;background-color:#fff}.tooltip-card__body-close:before{transform:rotate(45deg)}.tooltip-card__body-close:after{transform:rotate(-45deg)}.tooltip-card-container-wrap{pointer-events:none;position:absolute;left:0;top:0;z-index:123132;height:100%;width:100%}.tooltip-card-container-wrap>div{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.tester-box-tooltip{pointer-events:all}.position_relative{position:relative}.position_absolute{position:absolute}.gap_5{gap:5px}.gap_10{gap:10px}.gap_15{gap:15px}.gap_20{gap:20px}.margin-0,.margin_0{margin:0}.widget-input{background-color:var(--input-background);border:var(--input-border);border-radius:var(--input-border-radius);color:var(--input-color)}.widget-input:disabled{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.widget-input[error=true]{border:var(--input-border-error)}.widget-input::placeholder{color:var(--input-placeholder-color)}.widget-input:disabled::placeholder{color:var(--input-placeholder-color-disabled)}.input_error{border:1px solid red!important}.input_size_md{height:var(--input-height)}.input-title{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.widget-table{border-collapse:collapse}.widget-table_mini p{margin:0}.list-cell-link>a{position:absolute;left:0;top:0;z-index:1;height:100%;width:100%;cursor:pointer}.list-cell-link>p{font-weight:500}.widget-table__cell{padding:0 20px;font-weight:400;font-size:14px;line-height:19px;color:#4f4f4f}.widget-table-cell_use{cursor:pointer}.widget-table-cell_select{width:min-content}.table-cell-toggle{--border-color: black;position:relative;display:grid;place-content:center;border:1px solid var(--border-color);height:15px;aspect-ratio:1 / 1;border-radius:50%}.table-cell-toggle_active:after{content:"";border-radius:50%;background-color:var(--border-color);height:9px;aspect-ratio:1/1}.widget-table-cell_number{text-align:right}.overflow_auto{overflow:auto}.overflow_hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.padding_0{padding:0}.padding_15{padding:15px}.padding_20{padding:20px}.es-list-container{overflow:auto}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.widget-table__head-cell[data-v-25198f4a]{padding:18px;text-align:start}.widget-table__head-label[data-v-25198f4a]{font-weight:600;font-size:14px;line-height:19px}[dir=rtl] .icon[data-v-e287c8d9]{transform:scaleX(-1)}.widget-spinner[data-v-0ef9ae88],.widget-spinner[data-v-0ef9ae88]:after{border-radius:50%;width:14px;height:14px}.widget-spinner[data-v-0ef9ae88]{font-size:2px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;transform:translateZ(0);animation:spinnerAnimation-0ef9ae88 1.1s infinite linear}@keyframes spinnerAnimation-0ef9ae88{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.widget-button[data-v-450dc564]{position:relative}.widget-button-spinner[data-v-450dc564]{position:absolute;top:0;bottom:0;left:5px;margin:auto}.widget-multi-button-wrap[data-v-a8d711d1]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-a8d711d1]{grid-template-columns:1fr var(--button-size);background-color:var(--primary);grid-template-rows:var(--button-size);transition:var(--fast)}.widget-multi-button_active[data-v-a8d711d1]{grid-template-rows:calc(var(--button-size) * var(--7025434e))}.widget-multi-button-body[data-v-a8d711d1]{min-width:80px}.widget-multi-button-body-label[data-v-a8d711d1]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-a8d711d1]:hover{background-color:#223296}.widget-multi-button-side[data-v-a8d711d1]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-a8d711d1]{transform:rotate(180deg)}.widget-multi-button-side[data-v-a8d711d1]:hover{background-color:#223296}tr[data-v-344a8cc1]{border:1px solid #F3F4FC;height:30px}th[data-v-344a8cc1],td[data-v-344a8cc1]{position:relative;padding:0 11px}th[data-v-344a8cc1]{text-align:left}p[data-v-344a8cc1]{margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.head-cell[data-v-4e1d87c8]{padding:0 15px 0 10px;display:flex}.head-cell[data-v-4e1d87c8]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-4e1d87c8]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-4e1d87c8]{position:absolute;inset-inline-end:4px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-4e1d87c8]{transform:rotate(180deg)}.head-cell-resize[data-v-4e1d87c8]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-4e1d87c8]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-4e1d87c8]:after{content:"";margin:auto;width:1px;height:100%;display:block;background-color:#d2d2d2}.widget-list-head[data-v-ccffc6bd]{position:sticky;top:-1px;z-index:1}.test-block[data-v-ccffc6bd]{position:absolute;z-index:2;display:none;height:calc(100% + 1px);place-content:center;inset-block-start:-1px;padding-inline:10px;background-color:#e7f2ff;-webkit-user-select:none;user-select:none;white-space:nowrap}.widget-list-head th[data-v-ccffc6bd]{position:sticky;top:0;z-index:2;-webkit-user-select:none;user-select:none}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  "use strict";/*!
3
- * eservices-core v1.3.14
3
+ * eservices-core v1.3.16
4
4
  * (c) 2023 ESERVICES
5
- */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),_=require("jenesius-vue-form"),Zt=require("object-hash"),Qt=require("jenesius-vue-modal"),yt=require("vue-router"),en=require("date-and-time");function tn(n,e){return!!n&&n===e||"password is not equal"}function wt(n){return Number(n.replace(/[^0-9.]/g,""))}function nn(n,e=null){let r=String(wt(n)).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length>1&&e!==null&&r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}const rn=Object.freeze(Object.defineProperty({__proto__:null,numeric:wt,prettyNumeric:nn,validPassword:tn},Symbol.toStringTag,{value:"Module"})),sn={inputs:rn};function de(n,e){if(typeof n!="object"||n===null)return;if(e in n)return n[e];let t=e.indexOf(".");if(t>-1){const r=e.substring(0,t);return r in n?de(n[r],e.substr(t+1)):void 0}return n[e]}function Fe(n,e){if(!n)return console.warn("Element is not provided.");function t(i,o){return i==o.target||i.contains(o.target)}const r=i=>{t(n,i)||(e(),window.removeEventListener("click",r))};window.addEventListener("click",r)}function Ge(n){return n.reduce((e,t)=>e.then(r=>t==null?void 0:t(r)),Promise.resolve())}const vt=class C extends Error{constructor(e,t=null){super(),this.message=e,this.details=t,this.id=C.ID++}static ParentFormNotFound(){return new C("Can't found parent form.")}static UndefinedNameOfCompositeFormController(e){return new C("Composite object name is undefined",e)}static EntityWithoutName(e){return new C("'Entity doesn't have a name",e)}static NotResolvedNameEventEmitter(e){return new C(`'${e}' is not a valid Event emitter name`)}static FormIsNotValidated(e){return new C("Form is not validated",e)}static ListWorkerIsRunningOrEnd(e){return new C("List data request is running or already done",e)}static ObjectIdNotNumber(e){return new C(`${e} (id) is not a number`)}static UndefinedErrorId(e,t){return C.ApiNotAvailable()}static ApiError(e){return new C("Request error",e)}static ApiNotAvailable(){return new C(`Sorry, we experience difficulties here.
6
- Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(e,t){return!e&&!t?C.ApiNotAvailable():new C(e||"Authorization Error",t)}static ApiResponseParseFailed(){return C.ApiNotAvailable()}static MissingIdInValuesEntity(e){return new C("Object doesn't have id",e)}static ObjectWithIdNotFound(e,t){return new C(`Can't find object with id: ${e}`,t)}static ObjectWithoutConnectToPresentArray(e,t){return new C("Object is not found.",{object:e,array:t})}static EntityWithoutId(e){return new C("Entity doesn't have id.",e)}static NotFoundedTableIndex(e,t){return new C(`Can't find the element with tableIndex ${e}`,t)}static UndefinedError(e,t=[]){return new C(e,t)}static TableArrayAlreadyIncludeProvidedIndexValue(e,t,r){return new C(`Array already includes the element with value ${e}`,{array:t,table:r})}static MetadataEntityIsNotAvailable(e){return new C(`Metadata for the ${e} is not currently available.`)}};vt.ID=0;let L=vt;const Et="Please try again later or submit a feedback if problem doesn't go.";function it(n){return typeof n=="string"?Ve(n):on(n)?Ve(n.message):Ve(Et)}function on(n){return!!(typeof n=="object"&&Object.hasOwnProperty.call(n,"message")&&n!==null)}function Ve(n,e=[]){return{message:n,details:e}}class Ct{static getClientData(){return m("/close-api/client-content")}static getNavigation(){return m("/close-api/client/navigation")}}const X=new class{constructor(){this.store=s.reactive([])}add(e,t,{children:r,timeout:i=10,click:o=()=>{}}={}){const u=new an(e,t,i,r||[],o);return this.store.push(u),i&&setTimeout(this.remove.bind(this,u.id),i*1e3),u}remove(e){const t=this.store.findIndex(r=>r.id===e);if(t===-1)return!1;this.store.splice(t,1)}removeChild(e,t){throw new Error("Removing children error.")}},_t=class St{constructor(e,t,r,i,o){this.type=e,this.msg=t,this.timeout=r,this.children=i,this.click=o,this.id=St.cardId++}};_t.cardId=1;let an=_t;/*!
5
+ */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),S=require("jenesius-vue-form"),Lt=require("jenesius-vue-modal"),st=require("vue-router"),Bt=require("date-and-time");function xt(n,e){return!!n&&n===e||"password is not equal"}function at(n){return Number(n.replace(/[^0-9.]/g,""))}function Dt(n,e=null){let r=String(at(n)).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length>1&&e!==null&&r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}const jt=Object.freeze(Object.defineProperty({__proto__:null,numeric:at,prettyNumeric:Dt,validPassword:xt},Symbol.toStringTag,{value:"Module"})),Vt={inputs:jt};function _e(n,e){if(typeof n!="object"||n===null)return;if(e in n)return n[e];let t=e.indexOf(".");if(t>-1){const r=e.substring(0,t);return r in n?_e(n[r],e.substr(t+1)):void 0}return n[e]}function Se(n,e){if(!n)return console.warn("Element is not provided.");function t(o,s){return o==s.target||o.contains(s.target)}const r=o=>{t(n,o)||(e(),window.removeEventListener("click",r))};window.addEventListener("click",r)}function ct(n){return n.reduce((e,t)=>e.then(r=>t==null?void 0:t(r)),Promise.resolve())}const lt=class E extends Error{constructor(e,t=null){super(),this.message=e,this.details=t,this.id=E.ID++}static ParentFormNotFound(){return new E("Can't found parent form.")}static UndefinedNameOfCompositeFormController(e){return new E("Composite object name is undefined",e)}static EntityWithoutName(e){return new E("'Entity doesn't have a name",e)}static NotResolvedNameEventEmitter(e){return new E(`'${e}' is not a valid Event emitter name`)}static FormIsNotValidated(e){return new E("Form is not validated",e)}static ListWorkerIsRunningOrEnd(e){return new E("List data request is running or already done",e)}static ObjectIdNotNumber(e){return new E(`${e} (id) is not a number`)}static UndefinedErrorId(e,t){return E.ApiNotAvailable()}static ApiError(e){return new E("Request error",e)}static ApiNotAvailable(){return new E(`Sorry, we experience difficulties here.
6
+ Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(e,t){return!e&&!t?E.ApiNotAvailable():new E(e||"Authorization Error",t)}static ApiResponseParseFailed(){return E.ApiNotAvailable()}static MissingIdInValuesEntity(e){return new E("Object doesn't have id",e)}static ObjectWithIdNotFound(e,t){return new E(`Can't find object with id: ${e}`,t)}static ObjectWithoutConnectToPresentArray(e,t){return new E("Object is not found.",{object:e,array:t})}static EntityWithoutId(e){return new E("Entity doesn't have id.",e)}static NotFoundedTableIndex(e,t){return new E(`Can't find the element with tableIndex ${e}`,t)}static UndefinedError(e,t=[]){return new E(e,t)}static TableArrayAlreadyIncludeProvidedIndexValue(e,t,r){return new E(`Array already includes the element with value ${e}`,{array:t,table:r})}static MetadataEntityIsNotAvailable(e){return new E(`Metadata for the ${e} is not currently available.`)}};lt.ID=0;let I=lt;const ut="Please try again later or submit a feedback if problem doesn't go.";function He(n){return typeof n=="string"?$e(n):Mt(n)?$e(n.message):$e(ut)}function Mt(n){return!!(typeof n=="object"&&Object.hasOwnProperty.call(n,"message")&&n!==null)}function $e(n,e=[]){return{message:n,details:e}}class dt{static getClientData(){return m("/close-api/client-content")}static getNavigation(){return m("/close-api/client/navigation")}}const K=new class{constructor(){this.store=i.reactive([])}add(e,t,{children:r,timeout:o=10,click:s=()=>{}}={}){const d=new Ut(e,t,o,r||[],s);return this.store.push(d),o&&setTimeout(this.remove.bind(this,d.id),o*1e3),d}remove(e){const t=this.store.findIndex(r=>r.id===e);if(t===-1)return!1;this.store.splice(t,1)}removeChild(e,t){throw new Error("Removing children error.")}},ft=class pt{constructor(e,t,r,o,s){this.type=e,this.msg=t,this.timeout=r,this.children=o,this.click=s,this.id=pt.cardId++}};ft.cardId=1;let Ut=ft;/*!
7
7
  * jenesius-event-emitter v1.0.2
8
8
  * (c) 2022 Jenesius
9
9
  * @license MIT
10
- */const st=function(n,e){return n in this.events||(this.events[n]=[]),this.events[n].push(e),this.off.bind(this,n,e)},ot=function(n,e){n in this.events&&this.events[n].forEach(t=>t(e))},at=function(n,e){const t=this.events[n];if(!t)return;const r=t.indexOf(e);r!==-1&&t.splice(r,1)},ct=function(){this.events={}};class I{constructor(){this.events={}}on(e,t){return st.call(this,e,t)}emit(e,t){return ot.call(this,e,t)}off(e,t){return at.call(this,e,t)}cleanEvents(){ct.call(this)}static on(e,t){return st.call(I,e,t)}static emit(e,t){return ot.call(I,e,t)}static off(e,t){return at.call(I,e,t)}static cleanEvents(){ct.call(I)}}I.events={};var bt=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},me=(n,e,t)=>(bt(n,e,"read from private field"),t?t.call(n):e.get(n)),Be=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},xe=(n,e,t,r)=>(bt(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),ne,ye,we;const J=class F extends I{constructor(){super(...arguments),Be(this,ne,void 0),Be(this,ye,"front"),this.organizations=[],Be(this,we,!1)}set language(e){localStorage.setItem(F.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(F.LOCALSTORAGE_LANGUAGE_KEY)||F.DEFAULT_LANGUAGE}checkLanguageInStorage(){return!!localStorage.getItem(F.LOCALSTORAGE_LANGUAGE_KEY)}get contextType(){var e;if(this.contextId)return((e=this.person)==null?void 0:e.id)===this.contextId?"person":"organization"}set router(e){xe(this,ne,e)}get router(){if(!me(this,ne))throw new Error("Router was not founded. Please set router: Manager.router = router: VueRouter");return me(this,ne)}set type(e){xe(this,ye,e)}get type(){return me(this,ye)}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){xe(this,we,e),this.emit(F.EVENT_READY_UPDATE,e)}get ready(){return me(this,we)}onReady(e){return this.on(F.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(F.EVENT_CONTEXT_UPDATE,e)}onupdateData(e){return this.on(F.EVENT_DATA_UPDATE,e)}setCurrentContext(e){if(this.contextId===e)return console.log("[application-manager] The current context has already been installed.");this.contextId=Number(e),localStorage.setItem(F.CURRENT_CONTEXT_KEY,String(e)),this.emit(F.EVENT_CONTEXT_UPDATE,e),console.log(`Current context id %c${e}`,"color: purple")}get context(){var e;return this.contextId?this.contextId===((e=this.person)==null?void 0:e.id)?this.person:this.organizations.find(t=>t.id===this.contextId)||null:null}async init(){try{const e=await this.loadCustomerData();this.person=e,this.organizations=e.organizations,this.user=e.user,this.ready=!0;const t=Number.parseInt(localStorage.getItem(F.CURRENT_CONTEXT_KEY)||"");!Number.isNaN(t)&&this.validateContextId(Number(t))?this.setCurrentContext(t):this.setCurrentContext(Number(e.id))}catch{X.add("error",L.ApiNotAvailable().message)}}loadCustomerData(){return Ct.getClientData()}async updateFullClientData(){return this.init()}validateContextId(e){var t;return((t=this.person)==null?void 0:t.id)==e?!0:!!this.organizations.find(r=>r.id===e)}getListKeyById(e){return console.log("DEPRECATED"),`list-information-${e}`}getListInformationFromLocalStorage(e){console.log("DEPRECATED");const t=localStorage.getItem(this.getListKeyById(e));return t&&JSON.parse(t)}setListInformationToLocalStorage(e,t){console.log("DEPRECATED"),localStorage.setItem(this.getListKeyById(e),JSON.stringify(t))}};ne=new WeakMap;ye=new WeakMap;we=new WeakMap;J.DEFAULT_LANGUAGE="en";J.LOCALSTORAGE_LANGUAGE_KEY="CurrentLanguage";J.EVENT_CONTEXT_UPDATE="event:context-update";J.EVENT_READY_UPDATE="event:ready-update";J.EVENT_DATA_UPDATE="event:data-update";J.CURRENT_CONTEXT_KEY="CurrentContext";let Tt=J;const v=new Tt;function cn(){const n=s.reactive({contextType:v.contextType,contextId:v.contextId,context:v.context});return v.onupdateContext(()=>{n.contextType=v.contextType,n.contextId=v.contextId,n.context=v.context}),n}function ln(n){return n.text().then(e=>{try{return JSON.parse(e)}catch{return Et}})}function m(n,e={}){return v.isFront&&(e.headers||(e.headers={}),e.headers["Context-Id"]=v.contextId),e.redirect="manual",fetch(n,e).then(t=>t.type==="opaqueredirect"?void window.location.replace("/auth"):t).catch(()=>{throw L.ApiNotAvailable()}).then(t=>ln(t).then(r=>{if(!t.ok)throw r;return r}))}class Ie{constructor(){}static parseNamesFromListConfig(e){let t=Ie.parseFieldsToGraphQL(e.reduce((i,o)=>(o.name&&i.push(o.name),i),[]));function r(i){let o="";for(let u in i)typeof i[u]=="boolean"?o+=` ${u} `:o+=` ${u} { ${r(i[u])} }`;return o}return r(t)}static parseSortFromListConfig(e){let t={};for(let r in e)t[r]=e[r]?"ASC":"DESC";return t}static parseFieldsToGraphQL(e){function t(r,i){if(i.includes(".")){const o=i.indexOf("."),u=i.substring(o+1),a=i.substring(0,o);a in r||(r[a]={}),t(r[a],u)}else r[i]=!0;return r}return e.reduce(t,{})}}class un{constructor(){this.public=!1,this.errors=new Proxy([],{set:(e,t,r)=>(t!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),e[t]=r,!0)}),window._journal=this}get error(){return{add:(...e)=>{this.errors.push(e)},clean:()=>{this.errors.splice(0,this.errors.length)},console:()=>{console.log(this.errors)}}}welcome(){console.log("The journal has been initialized. To get access check %c_journal in console.","background: blue; color: white")}}const Nt=new un;function At(n){return n&&n[0].toLowerCase()+n.slice(1)}function $e(n){return Object.keys(n).reduce((e,t)=>{let r=n[t];const i=t.charAt(0).toUpperCase()+t.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=$e(r)),e[i]=r,e},{})}function dn(n,e=2){if(!(typeof n=="string"||typeof n=="number"))return"";let r=String(n).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(e,"0"),r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}const le={Request:m,clickOutside:Fe,getPropFromObject:de,runPromiseQueue:Ge,GraphQL:Ie,firstChapterToLowerCase:At,valuesToUpperCase:$e,prettyMoney:dn},fn=Object.freeze(Object.defineProperty({__proto__:null,GraphQL:Ie,Journal:Nt,Request:m,clickOutside:Fe,default:le,firstChapterToLowerCase:At,getPropFromObject:de,runPromiseQueue:Ge,valuesToUpperCase:$e},Symbol.toStringTag,{value:"Module"}));function kt(n,e=""){for(let t in n){if(typeof n[t]=="object"){kt(n[t],(e.length?`${e}-`:"")+t);continue}let r="--"+((e.length?`${e}-`:"")+t).replace(/([A-Z])/g,i=>`-${i}`.toLowerCase());document.documentElement.style.setProperty(r,n[t])}}const x={};function hn(n){for(let e in n)x[e]=n[e];n.styles&&kt(n.styles),Nt.welcome(),console.log("The config has been initialized. To get access check %c_config in console.","background: purple; color: white"),window._config=x}const pn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function gn(n){return Array.isArray(n)&&n.length===2&&typeof n[0]=="string"&&typeof n[1]=="number"}const mn="masterId",yn="masterEntity";function Ne(n,e){if(!Array.isArray(e))return;if(gn(e))return t(e);e.forEach(t);function t(r){n.append(yn,r[0]),n.append(mn,r[1].toString())}}class T{static async anonymousGetList(e){return await m(`/open-api/data/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getSearchParamsForEntityListRead(e){const t=(i,o)=>r.append(i,o),r=new URLSearchParams;if(e.fields){const i=e.fields;typeof i=="string"?t("fields",i):Array.isArray(i)?t("fields",i.join(" ")):typeof i=="object"&&t("fields",Object.keys(i).join(" "))}if(e.order){let i=e.order;const u=(Array.isArray(i)?[i]:Object.entries(i)).map(([a,c="desc"])=>`@${a} ${c}`).join(",");t("order",u)}return e.limit&&t("limit",e.limit.toString()),e.offset&&t("offset",e.offset.toString()),e.filter&&t("filter",e.filter.toString()),e.useUsageContext&&r.append("useUsageContext",e.useUsageContext.toString()),r}static async getList(e,t){const r=T.getSearchParamsForEntityListRead(t||{});return await m(`/close-api/data/${e}?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getCount(e,t){const r=T.getSearchParamsForEntityListRead(t||{});return m(`/close-api/data/entities/${e}/count?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static create(e,t,r){const i=new URLSearchParams;return Ne(i,r==null?void 0:r.masterEntities),m(`/close-api/data/${e}?${i.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:t})})}static update(e,t,r,i={}){return m(`/close-api/data/entities/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r})})}static readById(e,t,r={}){const i=new URLSearchParams;if(r.fields){let o=r.fields;typeof o=="string"&&(o=[o]),i.append("fields",o.join(" "))}return m(`/close-api/data/entities/${e}/id/${t}?${i.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static updateById(e,t,r,i){const o=new URLSearchParams;return Ne(o,i==null?void 0:i.masterEntities),m(`/close-api/data/entities/${e}/id/${t}?${o.toString()}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r,version:i==null?void 0:i.version})})}static removeById(e,t,r){const i=typeof t=="number"?{Id:t}:t;return T.removeByKeys(e,i,r)}static removeByKeys(e,t,r){return m(`/close-api/data/entities/${e}`,{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:t,version:r})})}}var Ot=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},je=(n,e,t)=>(Ot(n,e,"read from private field"),t?t.call(n):e.get(n)),lt=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},ut=(n,e,t,r)=>(Ot(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),re,ve;const Je=class K extends I{constructor(e){super(),lt(this,re,[]),lt(this,ve,!1),this.hashParams="",this.offset=0,this.name=e.name}set wait(e){ut(this,ve,e),this.emit(K.EVENT_CHANGE_WAIT,e)}get wait(){return je(this,ve)}read(e){var i,o;this.wait=!0;const t={};e.order&&(t.order={[(i=e.order)==null?void 0:i.name]:(o=e.order)==null?void 0:o.duration}),e.fields&&(t.fields=e.fields),e.filter&&(t.filter=e.filter);const r=JSON.stringify(t.order)+JSON.stringify(t.filter);return r!==this.hashParams&&(this.offset=0,this.hashParams=r),e.limit&&(t.limit=e.limit),e.offset&&(t.offset=e.offset||this.offset),T.getList(this.name,t).then(u=>(this.offset===0&&(this.array=[]),this.offset+=t.limit,u)).then(u=>{this.array.push(...u)}).then(()=>this.emit(K.EVENT_DATA,this.array)).finally(()=>{this.wait=!1})}set array(e){ut(this,re,e),this.emit(K.EVENT_DATA,this.array)}add(e){je(this,re).push(...e),this.emit(K.EVENT_DATA,this.array)}get array(){return je(this,re)}static GetFieldNames(e){return e.reduce((t,r)=>(r.name&&(typeof r.name=="string"?t.push(r.name):t.push(...r.name)),t),[])}static getCellInfo(e,t){const r=K.getCellName(e),i=(()=>{let o=r?de(t,r):null;return o===void 0&&(o=null),e.value?e.value(o,t):o})();return{name:r,value:i}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}};re=new WeakMap;ve=new WeakMap;Je.EVENT_DATA="LIST:DATA";Je.EVENT_CHANGE_WAIT="LIST:UPDATE-WAIT";let Ft=Je;const z=Symbol("__ROW_INDEX__");let He=class extends Ft{constructor(e){super(e),this.rowIndex=1,this.changes={new:{},edit:{},remove:[]},this.save=()=>{}}get changed(){return Object.keys(this.changes.new).length||Object.keys(this.changes.edit).length||this.changes.remove.length}create(e){const t=this.wrapData(e);this.changes.new[t[z]]=t,this.emitChanges()}cleanChanges(){this.changes.new={},this.changes.edit={},this.changes.remove=[],this.emitChanges()}edit(e,t){const r=this.wrapData(t,e);if(this.changes.new[e])return this.changes.new[e]=r,this.emitChanges();this.array.find(i=>i[z]===e)&&(this.changes.edit[e]={...this.changes.edit[e],...r},this.emitChanges())}remove(e){if(this.changes.new[e])return delete this.changes.new[e],this.emitChanges();this.array.find(t=>t[z]===e)&&(delete this.changes.edit[e],this.changes.remove.includes(e)||this.changes.remove.push(e),this.emitChanges())}wrapData(e,t){return t===void 0&&!Object.prototype.hasOwnProperty.call(e,z.toString())&&(t=++this.rowIndex),{...e,[z]:t}}emitChanges(){this.emit(_.Form.EVENT_CHANGED,!0)}set array(e){super.array=e.map(t=>this.wrapData(t))}get array(){return super.array}log(e){console.log(`[table] ${e}`)}};He.PROVIDE_NAME="table-controller";function wn(n){const e=s.reactive(n.array);s.provide(He.PROVIDE_NAME,n);const t=s.reactive(n.changes);n.on(Ft.EVENT_DATA,u=>e.splice(0,e.length,...u)),n.on(_.Form.EVENT_CHANGED,()=>{t.new=Object.keys(n.changes.new).reduce((u,a)=>{const c=Number(a);return u[c]=n.changes.new[c],u},{})});const r=s.computed(()=>[...e.reduce((u,a)=>{const c=a[z];return n.changes.remove.includes(c)||u.push({...a,...n.changes.edit[c]}),u},[]),...Object.values(t.new)]),i=_.Form.getParentForm();return i==null||i.subscribe(n),{activeRow:s.ref(null),array:r}}function vn(n,e){n.read=()=>T.getList(n.name,{fields:e==null?void 0:e.fields}).then(t=>n.array=t).then(()=>n.emit(_.Form.EVENT_READ,n.array)),n.save=()=>{const t=n.name;Object.values(n.changes.new).forEach(async i=>{await T.create(t,i)}),Object.entries(n.changes.edit).forEach(async([i,o])=>{await T.updateById(n.name,r(Number(i)),o)});function r(i){const o=n.array.find(u=>u[z]===i);return o.id|o.Id}n.changes.remove.forEach(async i=>{await T.removeById(t,r(i),0)}),n.emit(_.Form.EVENT_SAVE)}}const En=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class Cn{static readHistoryById(e,t){return m(`/close-api/audits/history/${e}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}}).then(r=>{const i=r.history.map(o=>{if(!o.changes)return o;const u=o.changes.map(a=>({...a,oldValue:a.originalValue,name:a.fieldName}));return{...o,changes:u}});return{...r,history:i}})}}var It=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},D=(n,e,t)=>(It(n,e,"read from private field"),t?t.call(n):e.get(n)),W=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},U=(n,e,t,r)=>(It(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Ee,ie,Ce,_e,se,oe,Ue;const q="_______LIST_______ROW_______INDEX________NAME_______",fe=class V extends I{constructor(e){super(),this.LIST_ROW_KEY=1,W(this,Ee,void 0),this.array=[],W(this,ie,[]),W(this,Ce,[]),W(this,_e,new Proxy({},{set:(t,r,i,o)=>(t[r]=i,this.emit(V.EVENT_FILTERS_UPDATE,t),!0),deleteProperty:(t,r)=>(delete t[r],this.emit(V.EVENT_FILTERS_UPDATE,t),!0)})),W(this,se,!1),W(this,oe,(...t)=>Promise),W(this,Ue,()=>{}),U(this,Ee,e.primaryKeys||[]),this.name=e.name||void 0,e.config&&U(this,ie,e.config)}set config(e){U(this,ie,e.map(_.utils.copyObject)),this.emitUpdateConfig()}get config(){return D(this,ie)}emitUpdateConfig(){this.emit(V.EVENT_CONFIG_UPDATE,this.config)}get order(){return D(this,Ce)}set order(e){U(this,Ce,e),this.emit(V.EVENT_ORDER_UPDATE,this.order)}get filters(){return D(this,_e)}set filters(e){Dt(D(this,_e),e)}set wait(e){U(this,se,e),this.emit(_.Form.EVENT_WAIT,D(this,se))}get wait(){return D(this,se)}get primaryKeys(){return D(this,Ee)}at(e){return this.array[e%this.array.length]}atByKey(e){return this.array.find(t=>t[q]===e)}indexByKey(e){return this.array.findIndex(t=>t[q]===e)}static getKey(e){return e[q]}static hasKey(e){return typeof e!="object"||e===null?!1:Object.prototype.hasOwnProperty.call(e,q)}add(...e){const t=this.wrapArray(e);this.array.push(...t),this.emit(V.EVENT_DATA,this.array)}set(e){this.array=[],this.add(...e)}removeByKey(e){const t=this.indexByKey(e);t!==-1&&(this.array.splice(t,1),this.emit(V.EVENT_DATA,this.array))}updateByKey(e,t){const r=this.atByKey(e);r&&(Object.assign(r,t),this.emit(V.EVENT_DATA,this.array))}wrapArray(e){return e.map(this.wrapItem.bind(this))}wrapItem(e){return this.isWrapped(e)?e:{...e,[q]:this.LIST_ROW_KEY++}}isWrapped(e){return Object.prototype.hasOwnProperty.call(e,q)}set read(e){U(this,oe,e)}get read(){return(...e)=>Promise.resolve().then(()=>{const t=D(this,oe).call(this,...e);return this.wait=!0,t}).finally(()=>this.wait=!1)}set save(e){U(this,oe,e)}get save(){return()=>Promise.resolve().then(()=>this.wait=!0).then(()=>D(this,Ue).call(this)).finally(()=>this.wait=!1)}static GetFieldNames(e){return e.reduce((t,r)=>(r.name&&(typeof r.name=="string"?t.push(r.name):t.push(...r.name)),t),[])}static mergeWithKey(e,t){return{...e,[q]:t}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}static getCellInfo(e,t){const r=V.getCellName(e),i=(()=>{let o=r?de(t,r):null;return o===void 0&&(o=null),e.value?e.value(o,t):o})();return{name:r,value:i}}};Ee=new WeakMap;ie=new WeakMap;Ce=new WeakMap;_e=new WeakMap;se=new WeakMap;oe=new WeakMap;Ue=new WeakMap;fe.EVENT_DATA="list-data: update";fe.EVENT_CONFIG_UPDATE="list-config:update";fe.EVENT_ORDER_UPDATE="list-order:update";fe.EVENT_FILTERS_UPDATE="list-filters:update";let j=fe;function $t(n,e){let t="",r=0,i=!1,o;n.read=(u={})=>{if(n.wait)return o;if(u.clean&&(t="",r=0,i=!1),i)return Promise.resolve([]);let a=e;typeof a=="function"&&(a=a());const c={};if(!n.name)throw new Error("Reading list`s data without name is not available.");a.order&&Array.isArray(a.order)&&a.order.length&&(c.order={[a.order[0]]:a.order[1]||"asc"}),a.fields&&(c.fields=a.fields),a.filter&&(c.filter=a.filter);const f=JSON.stringify(c.order)+JSON.stringify(c.filter)+JSON.stringify(c.fields);return f!==t&&!Number.isNaN(f)&&(r=0,t=f),"limit"in a&&(c.limit=a.limit),c.offset=r||a.offset||0,o=T.getList(n.name,c).then(l=>((r===0||u.clean)&&n.set([]),r+=c.limit,l)).then(l=>(n.add(...l),l.length===0&&(i=!0),l)),o}}function Lt(n){const e=s.reactive({wait:n.wait,array:[]});return n.on(j.EVENT_DATA,t=>{e.array.splice(0,e.array.length,...t.map(r=>Object.freeze(JSON.parse(JSON.stringify(r)))))}),n.on(_.Form.EVENT_WAIT,()=>{e.wait=n.wait}),e}function Pt(n,e){const t="list-flex-config",r=s.inject(t,void 0);if(r)return r;if(!n||!e)throw new Error("Hook useProvideList has two required params: list and defaultSettings");n.on(j.EVENT_CONFIG_UPDATE,()=>{n.read()});const i={list:n,defaultSettings:e};return s.provide(t,i),i}function _n(n){const e=s.reactive([...n.config]);return n.on(j.EVENT_CONFIG_UPDATE,t=>{e.splice(0,e.length,...t)}),e}function Rt(n){const e=n.order||[],t=s.reactive(e);return n.on(j.EVENT_ORDER_UPDATE,r=>{t.splice(0,t.length,...r),n.read()}),t}function Sn(n){const e=s.ref(""),t=s.computed(()=>{const r=e.value.toLowerCase();return s.unref(n).filter(i=>e.value.length?Object.values(i).join().toLowerCase().includes(r):!0)});return{search:e,searchArray:t}}function Dt(n,e){Object.keys(n).forEach(t=>delete n[t]),Object.entries(e).forEach(([t,r])=>{n[t]=r})}function bn(n){const e=s.reactive(_.utils.copyObject(n.filters));return n.on(j.EVENT_FILTERS_UPDATE,t=>{Dt(e,t),n.read()}),e}function Tn(n){const e=s.reactive([]);function t(a){return e.includes(a)}function r(a){t(a)||e.push(a)}function i(a){const c=e.findIndex(f=>f===a);c!==-1&&e.splice(c,1)}function o(a){const c=s.unref(n);if(a===void 0){e.length===0?c.forEach(r):c.forEach(i);return}t(a)?i(a):r(a)}const u=s.computed(()=>{const a=s.unref(n);return e.length===a.length&&a.length!==0});return[e,o,u,r,i]}class Nn extends j{constructor(e){super(e),this.changes=[],this.save=An.bind(this)}get changed(){return!!this.changes.find(e=>e.status==="active")}addChange(e,t){this.changes.push({type:e,status:"active",data:this.wrapItem(t)})}}function An(){const n=this.changes.filter(e=>e.status==="active");return Ge(n.map(e=>{console.log("++")}))}function kn(){const n=s.ref(null);function e(t){n.value=t&&Zt(t)}return{activeRow:n,activateRow:e}}const On=Object.freeze(Object.defineProperty({__proto__:null,List:j,Table:Nn,useListOrder:Rt,useListProvide:Pt,useListRead:$t,useListState:Lt,useTableActiveRow:kn},Symbol.toStringTag,{value:"Module"}));class Fn extends I{constructor(){super(),this.EVENT_NEW="event:new-metadata",this.store={}}get(e){return this.store[e]}async load(e){return this.store[e]||this.set(e,await this.loadEntityInformation(e)),this.store[e]}set(e,t){this.store[e]=t,this.emit(this.EVENT_NEW,{entityName:e})}async loadEntityInformation(e){return await Ke.get(e)}}const ae=new Fn;function In(n){const e=s.ref(ae.get(n));return ae.on(ae.EVENT_NEW,t=>{n===t.entityName&&(e.value=ae.get(n))}),e}function $n(n,e){try{return e.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(t){Vt().error("prettify value by metadata",n,t)}}class Ln{static getDictionary(e){if(!e)throw new Error(`Can't get dictionary for ${e}.`);return m(`/open-api/internationalization/language/${e}`)}}let G={};function Z(n,...e){if(typeof n!="string")return console.trace(`Label is not provided for translation: ${n}`),"undefined";let t=_.utils.getPropFromObject((this==null?void 0:this.vocabulary)||G,n);if(typeof t=="string")return dt(t,e);const r=_.utils.getPropFromObject(G==null?void 0:G.root,n);return typeof r=="string"?dt(r,e):(typeof t===void 0&&console.warn(`Translation for label "${n}" is not founded.`),n)}function dt(n,e){return e.forEach((t,r)=>{n=n.replaceAll(new RegExp(`\\{${r}}`,"g"),t)}),n}Z.setGlobalVocabulary=function(n){G=n};Z.getScope=function(n){const e=typeof n=="string"?n:"root";return typeof n!="string"&&console.warn(`SCOPE ${n} for translate is not string.`),Z.bind({vocabulary:_.utils.getPropFromObject(G,e.toLowerCase())})};Z.setVocabulary=function(n){return typeof n=="string"&&(n=_.utils.getPropFromObject(G,n)),Z.bind({vocabulary:n})};const Pn=function(){let n=!1;const e=[];function t(){return n}function r(c,f){t()&&console[c](...f),e.push(f)}function i(...c){r("log",c)}function o(...c){r("warn",c)}function u(...c){r("error",c)}function a(c=!0){n=c}return{info:i,warn:o,history:e,display:a,error:u}}();function Vt(){return Pn}class A{static parseError(e){let t=e.errors?Object.values(e.errors).map(r=>r[0]):null;throw L.AuthServiceError(e.title,t)}static login(e){return m(x.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...e,AppName:x.applicationName})}).catch(A.parseError)}static registration(e){return e.AppName=x.applicationName,m(x.identityServerURL+"/api/Authenticate/Registration",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)}).catch(A.parseError)}static parseProcessAnswer(e){if(e.statusCode>4)throw L.UndefinedError(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}static startRegistrationProcess(e){return A.requestStepRegistrationProcess("StartRegistration",e)}static confirmPhoneRegistrationProcess(e){return A.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",e)}static confirmEmailRegistrationProcess(e){return A.requestStepRegistrationProcess("ConfirmEmailByRegistration",e)}static finishEmailRegistrationProcess(e){return A.requestStepRegistrationProcess("FinishRegistration",e)}static requestStepRegistrationProcess(e,t){return m(`${x.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).catch(A.parseError)}static startLoginProcess(e){return A.requestStepLoginProcess("StartLogin",e)}static loginWithPassword(e){return A.requestStepLoginProcess("LoginWithPassword",e)}static loginWithOtpCode(e){return A.requestStepLoginProcess("LoginWithOtpCode",e)}static requestStepLoginProcess(e,t){return m(`${x.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).catch(A.parseError).then(A.parseLoginProcessAnswer)}static parseLoginProcessAnswer(e){if(e.statusCode>3)throw L.UndefinedError(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}}const Bt=class ce{static async create(e){return m(ce.url,{method:"post",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}static async read(e){const t=new URLSearchParams({targetCode:String(e.targetCode),entityName:e.entity.name,entityCatalogId:e.entity.catalogId});return m(ce.url+"?"+t.toString(),{method:"get"})}static async readMessages(e){return m(`${ce.url}/${e}/messages`,{method:"get"})}static async createMessage(e){return m(`${ce.url}/${e.talkId}/messages`,{method:"post",body:JSON.stringify({text:e.text}),headers:{"Content-Type":"application/json"}})}};Bt.url="/close-api/communications";let ue=Bt;class Rn{static async getDefaultView(e){return m("/close-api/views/"+e,{method:"GET",headers:{"Content-Type":"application/json"}})}}function ft(n){return{...n,createdEntities:n.createdEntites}}const xt=class Se{static async getStartConfig(e,t){return m([Se.url,e,t].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(e,t){return m([Se.url,e,t].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(ft)}static async runStep(e,t,r,i,o){return m([Se.url,e,t].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:i,values:o})}).then(ft)}};xt.url="/close-api/views/process-wizard";let be=xt;class Ke{static get url(){return"/close-api/metadata"}static async get(e,t,r){console.warn("GETTING METADATA BY DEPRECATED METHOD."),console.trace();const i=new URLSearchParams;return t&&i.append("criteria",t),r&&i.append("id",String(r)),await fetch(this.url+`/${e}?${i.toString()}`,{method:"GET"}).then(o=>o.json())}static getById(e,t,r=[]){const i=new URLSearchParams;return Ne(i,r),t&&i.append("id",t),m([this.url,e].join("/")+`?${i.toString()}`)}static getFieldInformation(e,t){return m(`/open-api/metadata/${e}/fields/${t}`)}static getTreatmentListField(e,t){return m(`/open-api/metadata/${e}/list-fields/${t}`)}}class Dn{static async upload(e,t){const r=new FormData;r.append("file",e);const i=`/close-api/files?entityName=${t}`;return await fetch(i,{method:"POST",body:r}).then(o=>o.json()).then(o=>(o.filename=e.name,o))}}class Vn{static invite(e,t,r){return m("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:e,personKey:t,relatedRoleCode:r})})}static accept(e,t){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:t,mark:!0})})}static decline(e,t){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:t,mark:!1})})}}class Ye{static get url(){return"/close-api/rules-validation/"}static validate(e,t){return m(Ye.url+e,{method:"POST",body:JSON.stringify(t)})}}class Bn{static getConfiguration(){return m("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}}class jt{static url(){return"/close-api/actions"}static async get({criterion:e}){const t=new URLSearchParams;return e&&t.append("criterion",e),await fetch(this.url()+`?${t.toString()}`,{method:"GET"}).then(r=>r.json())}static getById(e,t,r=[]){const i=new URLSearchParams;return Ne(i,r),m([this.url(),e,t].join("/")+`?${i.toString()}`,{method:"GET"})}}const Mt=class Wt extends I{constructor(e=[]){super(),this.array=s.reactive([]),this.defaultArray=[],this.setDefault(e)}emitUpdate(){this.emit(Wt.EVENT_DATA,this.array)}setDefault(e){const t=JSON.parse(JSON.stringify(e));this.defaultArray=t,this.set(t)}revert(){this.set(this.defaultArray)}set(e){this.array.splice(0,this.array.length,...e),this.emitUpdate()}append(e){this.array.push(e),this.emitUpdate()}moveTo(e,t){if(this.isOutOfRange(e)||this.isOutOfRange(t))throw new Error(`Provided position is out of range: ${e}, ${t}`);const r=this.array[e];this.array.splice(e,1),this.array.splice(t,0,r),this.emitUpdate()}remove(e){this.array.splice(e,1),this.emitUpdate()}isOutOfRange(e){return!(e>=0&&e<this.array.length)}};Mt.EVENT_DATA="list-config:update";let xn=Mt;class jn extends I{constructor(e){super(),this.name="Communication",this.read=()=>{},this.id=e}sendMessage(e){return ue.createMessage({talkId:this.id,text:e})}static checkAndGenerate(e){return ue.read(e).then(t=>t.length===0?ue.create(e):t[0])}}function Mn(n){const e=_.Form.getParentForm();e?e.subscribe(n):console.warn(L.ParentFormNotFound());const t=s.reactive([]);return n.read=()=>ue.readMessages(n.id).then(r=>(t.splice(0,t.length,...r),r)),{array:t}}function Wn(n){return typeof n!="object"||n===null?!1:!!(n.hasOwnProperty("start")||n.hasOwnProperty("end"))}function $(n){return Object.keys(n).reduce((e,t)=>{const r=n[t];if(Array.isArray(r)){const i=r.map(o=>typeof o=="string"?`'${o}'`:o).join(", ");return r.length&&e.push(`@${t} in (${i})`),e}if(Wn(r)){let i=function(o){var u;return((u=o.match(/([^Z]*)/))==null?void 0:u[0])+"0000Z"};return r.start&&e.push(`@${t} ge ${i(r.start)}`),r.end&&e.push(`@${t} le ${i(r.end)}`),e}return typeof r=="number"?(e.push(`@${t} eq ${r}`),e):typeof r=="string"?(r.length!==0&&e.push(`@${t} eq '${r}'`),e):(r===null&&e.push($.is(t,r)),e)},[]).join(" and ")}function he(n){return typeof n=="string"?`'${n}'`:`${n}`}$.includes=function(e,t){return`@${e} Contains ${he(t)}`};$.beginWith=function(e,t){return`@${e} BeginWith ${he(t)}`};$.notEq=function(e,t){return`@${e} nq ${he(t)}`};$.eq=function(e,t){return Array.isArray(t)?$.in(e,t):`@${e} eq ${he(t)}`};$.in=function(e,t){const r=t.map(he).join(", ");return`@${e} in (${r})`};$.and=function(...e){return e.join(" and ")};$.is=function(e,t){return`@${e} is ${t}`};$.or=function(...e){return e.join(" or ")};function Un(n,e="images"){return`/static-folder/${e}/${n}`}function qn(n,e,t){return n.reduce((r,i)=>{var a;let o=typeof e=="function"?e(i):i[e];const u=(a=r[r.length-1])==null?void 0:a.value;return u&&t(u,o)?r[r.length-1].array.push(i):r.push({value:o,array:[i]}),r},[])}function zn(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,n=>(n^crypto.getRandomValues(new Uint8Array(1))[0]&15>>n/4).toString(16))}function Gn(n,e=1e3){let t=0;return(...r)=>{clearTimeout(t),t=setTimeout(()=>n(...r),e)}}function Jn(n,e){const t=s.ref(null);function r(){return n.name?Ke.getById(n.name,e,[]).then(i=>{t.value=i,i.fields.forEach(o=>{o.canSet?n.enable(o.name):n.disable(o.name)})}).catch(()=>{t.value=null;const i=L.MetadataEntityIsNotAvailable(n.name||"FORM_WITHOUT_NAME");X.add("error",i.message)}):Promise.reject()}return n.on(_.Form.EVENT_READ,r),{metadata:t,update:r}}class Xe extends Error{static UndefinedStatus(){return new Xe("Status is undefined.")}}class Hn extends Xe{}function Kn(n,e){const t=s.reactive([]);async function r(o,u){if(!o)throw Hn.UndefinedStatus();const a=await jt.get({criterion:o});t.splice(0,t.length),t.push(...a.map(c=>i(c,u)))}return{actions:t,update:r};function i(o,u){return{title:o.title,callback:()=>(()=>Promise.resolve().then(()=>{if(n.changed)return n.save()}).then(()=>fetch(o.url,{method:"POST",body:JSON.stringify({keys:{Id:u},contextId:v.contextId}),headers:{"Content-Type":"application/json"}})).then(c=>c.json()).then(c=>{if(!c.success)throw e!=null&&e.ModalValidationResult&&c.validationEffect?Qt.openModal(e.ModalValidationResult,{rules:c.validationEffect.results}):X.add("error",c.message),new Error;return c}).then(c=>{c.message&&X.add("info",c.message),e!=null&&e.handleAffectedEntities&&e.handleAffectedEntities(c.affectedEntities)}).then(()=>n.read()))()}}}class Ae{static url(){return"/close-api/presentation"}static getStatuses(e,t){return fetch(`${Ae.url()}/status/${e}/${t}`).then(r=>r.json())}}function Yn(n){const e=s.reactive({title:"Loading",type:"wait"});function t(r){if(n.name&&Number.isInteger(r))return Ae.getStatuses(n.name,r).then(i=>{e.type=i.type,e.title=i.name})}return n.on(_.Form.EVENT_READ,r=>{var u,a;const{code:i,name:o}={code:(u=r.Status)==null?void 0:u.Code,name:(a=r.Status)==null?void 0:a.Name};return n.name?!Number.isInteger(i)&&!o?void console.log("Undefined code or name is Status prop."):Ae.getStatuses(n.name,i).then(c=>{e.type=c.type,e.title=o}):void console.log("Form without name.")}),{label:e,update:t}}function Xn(n,e){const t=yt.useRoute(),r=s.computed(()=>Number(t.params.id)),i=s.reactive({ready:!1,show:!1});return s.watch(()=>r.value,()=>{i.ready=!1}),s.watch(()=>r.value,()=>{Number.isInteger(r.value)&&n.read()},{immediate:!0}),n.read=le.requestHandler.bind(null,()=>Promise.resolve().then(()=>{if(!n.name)throw new Error("Form without entity name. Please set form.name");return T.readById(n.name,r.value,{fields:e.fields})}).then(le.valuesToUpperCase).then(o=>(Number.isInteger(o.Version)&&(n.version=o.Version),n.setValues(o),i.show=!0,o)).catch(o=>{throw Object.prototype.hasOwnProperty.call(o,"status")&&[403,404].includes(o.status)&&(i.show=!1),o}).finally(()=>{i.ready=!0})),n.save=le.requestHandler.bind(null,()=>Promise.resolve().then(()=>{if(!n.name)throw new Error("Form without entity name. Please set form.name");return T.updateById(n.name,r.value,n.changes,{version:n.version})}).then(o=>{n.version=o.version})),n.on(_.Form.EVENT_SAVE,n.read.bind(n)),{formShadowState:i}}function Zn(){const n=s.reactive({contextId:v.contextId,person:v.person,organizations:v.organizations,ready:v.ready,user:v.user}),e=s.computed(()=>{if(!v.ready||!v.person)return null;const r=n.contextId;return v.person.id===r?v.person:v.organizations.find(i=>i.id===r)||null}),t=s.computed(()=>{var r;return n.contextId===((r=n.person)==null?void 0:r.id)});return v.onupdateContext(r=>{n.contextId=r}),v.onupdateData(()=>{n.person=v.person,n.organizations=v.organizations,n.user=v.user}),v.onReady(r=>{n.ready=r}),{state:s.readonly(n),currentContext:e,isPerson:t}}function Qn(n,e){const t=s.reactive({ready:!1,show:!1});function r(){t.ready=!1,t.show=!1}return n.read=()=>{let i=e();return Promise.resolve().then(()=>{if(!n.name)throw L.EntityWithoutName("Use Form Request");return T.readById(n.name,i.id,{fields:i.fields})}).then(le.valuesToUpperCase).then(o=>(o.hasOwnProperty("Version")&&(n.version=Number(o.Version)),n.setValues(o),t.show=!0,o)).catch(o=>{const u=it(o);throw X.add("error",u.message),u}).finally(()=>{t.ready=!0})},n.save=()=>{let i=e();return Promise.resolve().then(()=>{if(!n.name)throw L.EntityWithoutName("Use Form Request");return T.updateById(n.name,i.id,n.changes,{version:n.version})}).then(o=>{n.version=o.version||o.Version}).catch(o=>{const u=it(o);throw X.add("error",u.message),u})},n.on(_.Form.EVENT_SAVE,n.read.bind(n)),{shadowFormState:t,initShadow:r}}class er{static getRequiredDocuments(e,t,r){const i=new URLSearchParams({entity:e,primaryKey:t,statusCode:r});return fetch(`/close-api/views/required-documents?${i.toString()}`).then(o=>o.json())}}class Y{static url(){return"close-api/billing"}static getBillingMetadata(e){return fetch(`/${Y.url()}/calculator/${e}`)}static calculate(e,t){return m(`/${Y.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:e,values:t})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):L.ApiNotAvailable()})}static parseMetadataField(e){function t(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:e.name,label:e.title,required:e.required,type:t(e)}}static createOnlinePayment(e,t){return m(`/${Y.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:e,returnURL:t})})}static applyOnlinePayment(e){return m(`/${Y.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:e})})}}class tr{static getListSettings(e,t){const r=new URLSearchParams;r.set("entity",e),t&&r.set("mark",t);const i=`/close-api/views/list/configs?${r.toString()}`;return m(i)}}function nr(n){return n.statusName==="Completed"}function rr(n){return n.statusName==="FinalStepWithConfirmation"}function ir(n){return n.statusName==="ValidationError"}function sr(n,e,t){let r=null;const i=s.reactive({wait:null});let o=[],u=null;const a=s.ref(null);function c(){a.value=o.find(y=>y.name===u)||null}function f(){var y;return u?((y=o.find(S=>S.name===u))==null?void 0:y.fields)||[]:[]}function l(y){if(c(),ir(y))return void t.onValidation(y.validationResults);if((y.statusName==="FinalStep"||y.statusName==="NextStep")&&(!f().length||or(f(),t.presets)))return E(t.presets||{});nr(y)&&t.onCompleted(y),rr(y)&&t.onConfirmation(y)}async function d(){try{await h(),await w()}catch(y){const{message:S}=ke(y);Oe.add("error",S)}}function h(){return i.wait="Loading process information.",be.getStartConfig(e,n).then(y=>{o=y.steps.map(S=>({label:S.title,name:S.stepName,number:S.number,fields:S.frontendEntity.objectTypes.reduce((N,k)=>(k.properties.forEach(P=>{N.push({name:P.name,label:P.title,type:P.refEntityName||P.dataType})}),N),[])}))}).then(y=>(i.wait=!1,y))}function p(y){return u=y.nextStepName,r=y.token,y}function g(y){const S=ke(y);Oe.add("error",S.message)}function w(){return i.wait="Starting process",be.startProcess(e,n).then(p).then(l).catch(g).finally(()=>{i.wait=null})}function E(y={}){return!r||!u?Promise.reject("Not step or token."):(i.wait="Expect the result",be.runStep(e,n,u,r,y).then(p).then(l).catch(g).finally(()=>{i.wait=!1}))}return{initialize:d,state:i,currentStepConfig:s.readonly(a),next:E}}function or(n,e){for(let t=0;t<n.length;t++){const r=n[t];if(!_.utils.getPropFromObject(e,r.name))return!1}return!0}const ar="close-api/proxy/Equipment/Search";class cr{static search(e,t,r,i,o){const u=new URLSearchParams;u.append("pattern",e||""),t&&u.append("categoryId",t),r&&u.append("useType",String(r)),i&&u.append("statusCode",i),o&&(u.append("limit",String(o.limit)),u.append("offset",String(o.offset)));const a=`/${ar}?${u.toString()}`;return m(a,{method:"GET",headers:{"Content-Type":"application/json"}})}}const lr={class:"widget-table__head"},ur={class:"widget-table__head-label margin_0 text_overflow"},dr=s.defineComponent({__name:"widget-table-head",props:{config:{}},setup(n){return(e,t)=>(s.openBlock(),s.createElementBlock("tr",lr,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.config,(r,i)=>(s.openBlock(),s.createElementBlock("th",{class:"widget-table__head-cell",key:i},[s.createElementVNode("p",ur,s.toDisplayString(r.label),1)]))),128))]))}});const M=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},fr=M(dr,[["__scopeId","data-v-25198f4a"]]);function hr(n){return typeof n.name=="string"?n.name:Array.isArray(n.name)?n.name[0]:null}function Ut(n,e){const t=hr(n);let r=t?_.utils.getPropFromObject(e,t):null;return r===void 0&&(r=null),n.value?n.value(r,e):r}function pr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var qe={exports:{}},Me,ht;function gr(){if(ht)return Me;ht=1;var n=1e3,e=n*60,t=e*60,r=t*24,i=r*7,o=r*365.25;Me=function(l,d){d=d||{};var h=typeof l;if(h==="string"&&l.length>0)return u(l);if(h==="number"&&isFinite(l))return d.long?c(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function u(l){if(l=String(l),!(l.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(d){var h=parseFloat(d[1]),p=(d[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return h*o;case"weeks":case"week":case"w":return h*i;case"days":case"day":case"d":return h*r;case"hours":case"hour":case"hrs":case"hr":case"h":return h*t;case"minutes":case"minute":case"mins":case"min":case"m":return h*e;case"seconds":case"second":case"secs":case"sec":case"s":return h*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(l){var d=Math.abs(l);return d>=r?Math.round(l/r)+"d":d>=t?Math.round(l/t)+"h":d>=e?Math.round(l/e)+"m":d>=n?Math.round(l/n)+"s":l+"ms"}function c(l){var d=Math.abs(l);return d>=r?f(l,d,r,"day"):d>=t?f(l,d,t,"hour"):d>=e?f(l,d,e,"minute"):d>=n?f(l,d,n,"second"):l+" ms"}function f(l,d,h,p){var g=d>=h*1.5;return Math.round(l/h)+" "+p+(g?"s":"")}return Me}function mr(n){t.debug=t,t.default=t,t.coerce=c,t.disable=o,t.enable=i,t.enabled=u,t.humanize=gr(),t.destroy=f,Object.keys(n).forEach(l=>{t[l]=n[l]}),t.names=[],t.skips=[],t.formatters={};function e(l){let d=0;for(let h=0;h<l.length;h++)d=(d<<5)-d+l.charCodeAt(h),d|=0;return t.colors[Math.abs(d)%t.colors.length]}t.selectColor=e;function t(l){let d,h=null,p,g;function w(...E){if(!w.enabled)return;const y=w,S=Number(new Date),N=S-(d||S);y.diff=N,y.prev=d,y.curr=S,d=S,E[0]=t.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let k=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(B,b)=>{if(B==="%%")return"%";k++;const Q=t.formatters[b];if(typeof Q=="function"){const pe=E[k];B=Q.call(y,pe),E.splice(k,1),k--}return B}),t.formatArgs.call(y,E),(y.log||t.log).apply(y,E)}return w.namespace=l,w.useColors=t.useColors(),w.color=t.selectColor(l),w.extend=r,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(p!==t.namespaces&&(p=t.namespaces,g=t.enabled(l)),g),set:E=>{h=E}}),typeof t.init=="function"&&t.init(w),w}function r(l,d){const h=t(this.namespace+(typeof d>"u"?":":d)+l);return h.log=this.log,h}function i(l){t.save(l),t.namespaces=l,t.names=[],t.skips=[];let d;const h=(typeof l=="string"?l:"").split(/[\s,]+/),p=h.length;for(d=0;d<p;d++)h[d]&&(l=h[d].replace(/\*/g,".*?"),l[0]==="-"?t.skips.push(new RegExp("^"+l.slice(1)+"$")):t.names.push(new RegExp("^"+l+"$")))}function o(){const l=[...t.names.map(a),...t.skips.map(a).map(d=>"-"+d)].join(",");return t.enable(""),l}function u(l){if(l[l.length-1]==="*")return!0;let d,h;for(d=0,h=t.skips.length;d<h;d++)if(t.skips[d].test(l))return!1;for(d=0,h=t.names.length;d<h;d++)if(t.names[d].test(l))return!0;return!1}function a(l){return l.toString().substring(2,l.toString().length-2).replace(/\.\*\?$/,"*")}function c(l){return l instanceof Error?l.stack||l.message:l}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}var yr=mr;(function(n,e){e.formatArgs=r,e.save=i,e.load=o,e.useColors=t,e.storage=u(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;c.splice(1,0,f,"color: inherit");let l=0,d=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(l++,h==="%c"&&(d=l))}),c.splice(d,0,f)}e.log=console.debug||console.log||(()=>{});function i(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function o(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function u(){try{return localStorage}catch{}}n.exports=yr(e);const{formatters:a}=n.exports;a.j=function(c){try{return JSON.stringify(c)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}})(qe,qe.exports);var wr=qe.exports;const qt=pr(wr);function zt(n){return["eservices-core",n].join(":")}function Gt(n){return Ze(n,"YYYY/MM/DD HH:mm:ss")}function Ze(n,e="YYYY/MM/DD"){if(!n)return"";try{const t=new Date(n);return en.format(t,e)}catch(t){return console.log(t),"Invalid date"}}const vr={props:{name:String},setup(n,e){let t="unknown";try{t=e.slots.default()[0].children}catch{t=n.name}typeof t!="string"&&console.warn(`Name for Icon.vue is not string. ${t}`);try{t=t.replace(/\s+/g,"")}catch{}return()=>s.h("i",{class:`icon icon-${t}`})}},Le=M(vr,[["__scopeId","data-v-e287c8d9"]]),Er=qt(zt("setup-list-row"));function Cr(n,e){const t=n.config.map(r=>_r(r,n,e));return s.h("tr",{class:"widget-table__row widget-table-row"},t)}function _r(n,e,t){const r=e.values;let i=Ut(n,r);const o={onClick:[],class:["widget-table__cell widget-table-cell"]};function u(l){o.onClick.push(()=>l(r))}function a(l){Array.isArray(l)?o.class.push(...l):o.class.push(l)}const c=[],f=[];if(n.hide&&n.hide(r))return[s.h("td")];if(n.type)switch(a(`widget-table-cell_${n.type}`),n.type){case"number":{typeof i=="number"&&(i=new Intl.NumberFormat().format(i));break}case"date":{i=Ze(typeof i=="string"?i:null);break}case"dateTime":case"dateWithTime":{i=Gt(typeof i=="string"?i:null);break}case"multi-select":{f.push(s.h(_.FormField,{type:"single-checkbox",modelValue:e.selected})),u(pt.bind(null,t,!0));break}case"select":{f.push(s.h(_.FormField,{type:"single-radio",modelValue:e.selected})),u(pt.bind(null,t,!1));break}}if(n.onClick&&u(n.onClick),n.link)try{const l=n.link(r);if(l){const d=s.h(yt.RouterLink,{to:l});f.push(d),a("widget-table-cell_link")}}catch(l){Er("Can't add router link",l)}return n.href&&(f.push(s.h("a",{href:n.href(r),target:"_blank"})),a("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&f.push(s.h("p",{class:"widget-list-cell-text"},i)),n.icon&&f.push(s.h(Le,{name:n.icon})),n.class&&(typeof n.class=="function"?a(n.class(r)):a(n.class)),c.push(s.h("td",o,f)),c}function pt(n,e){n.emit("select",e)}function Jt(n,e){return()=>{try{return Cr(n,e)}catch(t){return console.warn(t),null}}}const Sr={props:{values:Object,config:Object,selected:Boolean},setup:Jt},br=["colspan"],gt=s.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(n,{emit:e}){const t=s.ref();return s.onMounted(()=>{setTimeout(()=>{t.value&&t.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,i)=>(s.openBlock(),s.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:t},[s.createElementVNode("td",{colspan:r.rowLength},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(r.component),s.mergeProps(r.$attrs,{values:r.values,new:r.isNew,onClose:i[0]||(i[0]=o=>e("close")),onSave:i[1]||(i[1]=o=>e("save",o))}),null,16,["values","new"]))],8,br)],512))}}),Qe={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go."},Tr={class:"widget-table"},mt="update:selectedRows",Nr=s.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{}},emits:["update:activeRow","save"],setup(n,{emit:e}){const t=n,r=s.useSlots(),i=s.computed(()=>{var a;return(a=r==null?void 0:r.default)==null?void 0:a.call(r)[0]});function o(a,c=!0){if(!t.selectedRows)return;if(!c)return e(mt,t.selectedRows.includes(a)?[]:[a]);const f=[...t.selectedRows],l=f.indexOf(a);return l===-1?f.push(a):f.splice(l,1),e(mt,f)}function u(a){e("save",a),e("update:activeRow",null)}return(a,c)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("table",Tr,[s.createVNode(fr,{config:a.config},null,8,["config"]),s.createElementVNode("tbody",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.array,(f,l)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:l},[s.createVNode(Sr,{config:a.config,values:f,selected:a.selectedRows.includes(f),onSelect:d=>o(f,d),class:s.normalizeClass(a.classCallback?a.classCallback(f):"")},null,8,["config","values","selected","onSelect","class"]),i.value&&a.activeRow===f?(s.openBlock(),s.createBlock(gt,{key:0,component:i.value,"row-length":a.config.length,values:f,onClose:c[0]||(c[0]=d=>e("update:activeRow",null)),onSave:u,"is-new":!1},null,8,["component","row-length","values"])):s.createCommentVNode("",!0)],64))),128)),a.activeRow===s.unref(Qe).LIST_ACTIVE_NEW?(s.openBlock(),s.createBlock(gt,{key:0,component:i.value,"row-length":a.config.length,onClose:c[1]||(c[1]=f=>e("update:activeRow",null)),onSave:u,"is-new":!0},null,8,["component","row-length"])):s.createCommentVNode("",!0)])])]))}}),Ar=s.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(n){return(e,t)=>(s.openBlock(),s.createElementBlock("div",{class:"widget-spinner",style:s.normalizeStyle({"border-left":`1.1em solid ${e.color}`})},null,4))}});const Pe=M(Ar,[["__scopeId","data-v-0ef9ae88"]]),kr={class:"widget-button"},Or=s.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(n){return(e,t)=>(s.openBlock(),s.createElementBlock("button",kr,[e.wait?(s.openBlock(),s.createBlock(Pe,{key:0,class:"widget-button-spinner"})):s.createCommentVNode("",!0),s.renderSlot(e.$slots,"default",{},void 0,!0)]))}});const Fr=M(Or,[["__scopeId","data-v-450dc564"]]),Ir={class:"widget-multi-button-wrap position_relative cursor_pointer"},$r={class:"widget-multi-button-body grid"},Lr=["onClick"],Pr={class:"widget-multi-button-side-wrap"},Rr=s.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(n){const e=n;s.useCssVars(u=>({"7025434e":r.value}));const t=s.reactive({active:!1,wait:!1}),r=s.computed(()=>e.array.length+(e.label?1:0));function i(u){if(!(typeof u!="function"||t.wait))return t.wait=!0,Promise.resolve().then(u).finally(()=>{t.wait=!1})}function o(u=!t.active){t.active=u}return(u,a)=>(s.openBlock(),s.createElementBlock("div",Ir,[s.createElementVNode("div",{class:s.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",t.active?"widget-multi-button_active":null])},[s.createElementVNode("div",$r,[u.label?(s.openBlock(),s.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:a[0]||(a[0]=c=>o())},s.toDisplayString(u.label),1)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.array,(c,f)=>(s.openBlock(),s.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:f,onClick:l=>{i(c.callback),o(!1)}},s.toDisplayString(c.label),9,Lr))),128))]),s.createElementVNode("div",Pr,[s.createElementVNode("div",{class:s.normalizeClass(["grid-center widget-multi-button-side",t.active?"widget-multi-button-side_active":null]),onClick:a[1]||(a[1]=c=>o())},[t.wait?(s.openBlock(),s.createBlock(s.unref(Pe),{key:0,class:"widget-multi-button-side-spinner"})):u.array.length>1?(s.openBlock(),s.createBlock(s.unref(Le),{key:1,class:"widget-multi-button-side-icon"},{default:s.withCtx(()=>[s.createTextVNode("angle-small-down")]),_:1})):s.createCommentVNode("",!0)],2)])],2)]))}});const Dr=M(Rr,[["__scopeId","data-v-a8d711d1"]]),Vr={class:"widget-loader flex flex-align_center gap_10 padding_15"},Br={class:"text_md"},xr=s.defineComponent({__name:"widget-loader",props:{label:{}},setup(n){return(e,t)=>(s.openBlock(),s.createElementBlock("div",Vr,[s.createVNode(Pe,{color:"var(--primary)",class:"padding_10"}),s.createElementVNode("span",Br,s.toDisplayString(e.label),1)]))}}),jr=["alt","src"],Mr=s.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(n){const e=n,t=s.ref();return s.onMounted(()=>{t.value&&(t.value.src=e.src),t.value.onerror=function(){e.default&&(t.value.src=e.default)}}),(r,i)=>(s.openBlock(),s.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:t,src:r.src||r.$props.default},null,8,jr))}}),Wr={props:{config:Array,values:Object,selected:Boolean},setup:Jt};const Ur=M(Wr,[["__scopeId","data-v-344a8cc1"]]),qr=n=>(s.pushScopeId("data-v-4e1d87c8"),n=n(),s.popScopeId(),n),zr={class:"head-cell"},Gr=qr(()=>s.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Jr=s.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(n,{emit:e}){const t=n;return t.title&&console.warn(`For cell ${t.name} using title,it should be replaced with label.`),(r,i)=>(s.openBlock(),s.createElementBlock("th",null,[s.createElementVNode("div",zr,[s.createElementVNode("div",{class:"head-cell-content flex_grow",style:s.normalizeStyle({"min-width":r.minWidth,"max-width":r.maxWidth,width:r.width})},[r.type==="multi-select"?(s.openBlock(),s.createBlock(s.unref(_.FormField),{key:0,type:"single-checkbox",onClick:i[0]||(i[0]=s.withModifiers(o=>e("select"),["stop","prevent"]))})):(s.openBlock(),s.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:i[1]||(i[1]=o=>e("order"))},s.toDisplayString(r.title||r.label),1))],4),r.name&&r.order.length&&r.order[0]===r.name?(s.openBlock(),s.createBlock(s.unref(Le),{key:0,class:s.normalizeClass(["head-cell-order",{"head-cell-order_down":r.order.length>1&&r.order[1]==="desc"}])},{default:s.withCtx(()=>[s.createTextVNode("core-arrow-up")]),_:1},8,["class"])):s.createCommentVNode("",!0),Gr])]))}});const Hr=M(Jr,[["__scopeId","data-v-4e1d87c8"]]),Kr=s.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(n,{emit:e}){const t=n,r=s.ref(),i=s.ref();s.onMounted(()=>{function c(p,g){let w=-1;do w++,g-=p[w];while(g>0&&w<p.length);return w}function f(p,g){let w=0;for(;g>0&&g>p[w]&&w<p.length;)g-=p[w],w++;return console.log(g,w),w>0?w:0}function l(p){try{i.value.style.insetInlineStart=p+"px"}catch(g){console.log(g)}}function d(p){try{i.value.style.width=p+"px",i.value.style.minWidth=p+"px",i.value.style.maxWidth=p+"px"}catch(g){console.log(g)}}function h(p){return p===null?!1:p.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(g){var rt;function w(O){return O.screenX+S-P}const E=r.value,y=[...E.children].filter(O=>O.localName==="th"),S=((rt=E.offsetParent)==null?void 0:rt.scrollLeft)||0,N=y.map(O=>O.clientWidth),k=h(g.target),P=E.getBoundingClientRect().left,B=w(g),b=c(N,B),Q=N.slice(0,b).reduce((O,R)=>O+R,0),pe=B-Q,Re=E.offsetWidth,ee=y[b].clientWidth;if(t.config[b].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",g.screenX),console.log("Widths",N),console.log("max width",Re),console.log("Start Position",B),console.log("Position From",b),console.log("Start Position",b),console.log("Global offset (Отступ самой таблицы от края экрана)",P),console.log("Del",pe),console.groupEnd(),i.value.innerText=y[b].textContent||"",i.value.style.display="grid",i.value.style.width=ee+"px",i.value.style.cursor="grabbing",l(Q),d(ee),document.addEventListener("pointermove",nt,{passive:!0}),document.addEventListener("pointerup",tt);function tt(O){if(console.group("END"),document.removeEventListener("pointermove",nt),document.removeEventListener("pointerup",tt),k&&(t.config[b].width=i.value.style.width,t.config[b].minWidth=i.value.style.width,t.config[b].maxWidth=i.value.style.width,o(t.config)),!k){const R=O.screenX+S-P;console.log("ENP Position",R);const ge=f(N,R);if(console.log(b,"->",ge),ge!==b){const te=t.config[b],De=t.config;De.splice(b,1),De.splice(ge,0,te),o(De)}else{const te=t.config[b].name;u(te)}}i.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function nt(O){if(k){const te=w(O)-B+ee;d(te);return}let R=O.screenX+S-P-pe;R<0&&(R=0),R+ee>Re&&(R=Re-ee),l(R)}})});function o(c){e("update:config",c)}function u(c){if(!c)return;if(Array.isArray(c)){if(c.length<1)return;c=c[0]}if(t.order.length===0||t.order[0]!==c)return void a([c]);const f=t.order.length===1||t.order[1]==="asc"?"asc":"desc";a([c,f==="asc"?"desc":"asc"])}function a(c){e("update:order",c)}return(c,f)=>(s.openBlock(),s.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:r},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(c.config,(l,d)=>(s.openBlock(),s.createBlock(Hr,s.mergeProps({key:l},l,{onOrder:h=>u(l.name),onSelect:f[0]||(f[0]=h=>e("select")),order:c.order}),null,16,["onOrder","order"]))),128)),s.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:i},"test",512)],512))}});const Yr=M(Kr,[["__scopeId","data-v-ccffc6bd"]]),Xr={class:"widget-list"},Zr={class:"widget-list-body position_relative"},Qr=50,ei=s.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(n,{emit:e}){const t=n;function r(a,c=!0){if(t.selectedRows)if(!c)o(t.selectedRows.includes(a)?[]:[a]);else{const f=[...t.selectedRows],l=f.indexOf(a);l===-1?f.push(a):f==null||f.splice(l,1),o(f)}}function i(){var a;if(((a=t.selectedRows)==null?void 0:a.length)!==t.array.length)return o([...t.array]);o([])}function o(a){e("update:selectedRows",a)}function u(a){if(!a)return;const c=a.target;c.scrollTop+c.clientHeight+Qr>c.scrollHeight&&e("scrollEnd")}return(a,c)=>(s.openBlock(),s.createElementBlock("div",{class:"es-list-container",onScrollPassive:u},[s.createElementVNode("table",Xr,[s.createElementVNode("thead",null,[s.createVNode(Yr,{onSelect:c[0]||(c[0]=f=>i()),"onUpdate:order":c[1]||(c[1]=f=>e("update:order",f)),"onUpdate:config":c[2]||(c[2]=f=>e("update:config",f)),config:a.config,order:a.order},null,8,["config","order"])]),s.createElementVNode("tbody",Zr,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.array,(f,l)=>{var d;return s.openBlock(),s.createBlock(Ur,{key:l,class:"widget-list-row",values:f,config:a.config,selected:(d=a.selectedRows)==null?void 0:d.includes(f),onSelect:h=>r(f,h)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function ti(n){function e(...r){return t.wait?Promise.reject("The process has already started."):(t.wait=!0,Promise.resolve().then(()=>n(...r)).finally(()=>{t.wait=!1}))}const t=s.reactive({wait:!1,call:e});return t}function ke(n){return typeof n=="string"?We(n):ni(n)?We(n.message):We(Qe.DEFAULT_ERROR_MESSAGE)}function ni(n){return!!(typeof n=="object"&&n!==null&&Object.hasOwnProperty.call(n,"message"))}function We(n){return{message:n}}function Te(n="error"){return function(e){const{message:t}=ke(e);Oe.add(n,t)}}function ze(n,e){return et().emit("entity:read",{...e,entity:n})}function Ht(n,e){return et().emit("entity:update",{...e,entity:n})}function ri(n){return n.reduce((e,t)=>(t.name&&(typeof t.name=="string"?e.push(t.name):e.push(...t.name)),e),[])}function ii(n,e=2){if(!(typeof n=="string"||typeof n=="number"))return"";let r=String(n).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(e,"0"),r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}function si(){const n=s.ref(null);function e(t){n.value=t}return{activeRow:n,activateRow:e}}const H=qt(zt("use-socket"));function et(){return oi}const oi=function(){let n=1,e;const t=new Set,r=new Set;function i(){return{safeQueue:r,requestId:n,handlers:t}}function o(h){const p=[...t.values()];H("Handlers array length is %d. Response event: %s. Request id: %d",t.size,h.event,h.requestId),p.forEach(g=>{const w=h.requestId;(g.requestId&&g.requestId===w||!g.requestId&&g.event===h.event)&&(H("Find appropriated handler: %d, event: %s",n,g.event),g.callback(h.data,h),g.once&&(t.delete(g),H("Handler was removed by *once* params was passed. %o",g)))})}function u(h){console.log(`%cInitializing sockets: %c${h}`,"color: purple","color: black"),e=new WebSocket(h),e.onclose=function(p){H("Connection to server was stopped: %d %s",p.code,p.reason),setTimeout(()=>u(h))},e.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...r.values()].forEach(p=>{a(p),r.delete(p)})},e.onerror=function(p){console.warn(p)},e.onmessage=p=>{try{const g=JSON.parse(p.data);if(!Kt(g)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(g);return}o(g)}catch(g){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(g)}}}function a(h){e.send(h)}function c(h,p){t.add({event:h,callback:p})}function f(h,p){t.add({event:h,callback:p,once:!0})}function l(){return e&&(e==null?void 0:e.readyState)===1}function d(h,p,g){const w=++n,E=JSON.stringify({requestId:w,event:h,data:p,contextId:v.contextId,url:window.location.href});return l()?a(E):(r.add(E),H("Socket is not connected. Message was send to save-queue. %s")),new Promise((y,S)=>{t.add({event:h,requestId:w,once:!0,callback:(N,k)=>{if(H("Promise was resolve with next data:",N),ai(k))return void S(N);g&&g(N,k),y(N)}})})}return{get socket(){return e},on:c,once:f,emit:d,initialization:u,getDevInfo:i}}(),ai=n=>!!Kt(n)&&n.event==="request-error",Kt=n=>!!n&&typeof n=="object"&&n!==null&&"event"in n&&typeof n.event=="string"&&"requestId"in n&&typeof n.requestId=="number"&&"data"in n;function ci(n,e){const t=s.reactive([]);let r=0;const i=s.ref(!1);function o(){return i.value?Promise.reject("The process has already started."):(i.value=!0,typeof e.limit!="number"&&(e.limit=100),e.offset=r,ze(n,e).then(d=>(r+=d.length,d)).finally(()=>{i.value=!1}))}function u(d,h){var g;const p=d.Version||((g=t.find(w=>w.Id===h))==null?void 0:g.Version);if(p===void 0)throw new Error("Object without version.");return p}function a(d,h){const p=t.findIndex(g=>g.Id===d);if(p===-1)throw new Error(`Can't found item with Id ${d}`);t.splice(p,1,h)}async function c(d,h){try{const p=u(h,d);delete h.Version,await Ht(n,{id:d,values:h,version:p});const g=await ze(n,{fields:e.fields||"",id:d});a(d,g)}catch(p){Te()(p)}}async function f(){try{const d=await o();t.push(...d)}catch(d){Te()(d)}}async function l(){try{r=0;const d=await o();t.splice(0,t.length,...d)}catch(d){Te()(d)}}return{array:t,updateById:c,next:f,reload:l,wait:i}}const Oe=new class{constructor(){this.store=s.reactive([])}add(e,t,r={}){const i=li(r),o=new ui(e,t,i.timeout,i.children,i.click);return this.store.push(o),r.timeout&&setTimeout(this.remove.bind(this,o.id),r.timeout*1e3),o}remove(e){const t=this.store.findIndex(r=>r.id===e);if(t===-1)return!1;this.store.splice(t,1)}};function li(n){function e(r){return!!r&&typeof r=="object"}const t={timeout:10,click:()=>null,children:[]};return e(n)?{timeout:n.timeout||t.timeout,click:n.click||t.click,children:n.children||t.children}:t}const Yt=class Xt{constructor(e,t,r,i,o){this.type=e,this.message=t,this.timeout=r,this.children=i,this.click=o,this.id=Xt.cardId++}};Yt.cardId=1;let ui=Yt;const di={clickOutside:Fe,valuesToUpperCase:$e,Filter:$,staticLink:Un,groupArrayByField:qn,uuidv4:zn,Request:m},fi={usage:sn,utils:fn,config:hn,types:pn};exports.ApplicationManager=Tt;exports.Communication=jn;exports.ComputedMetadata=In;exports.CoreError=L;exports.Filter=$;exports.List=j;exports.ListConfig=xn;exports.Manager=v;exports.MetadataStore=ae;exports.NotificationSystem=Oe;exports.Request=m;exports.Table=He;exports.WidgetButton=Fr;exports.WidgetIcon=Le;exports.WidgetImage=Mr;exports.WidgetList=ei;exports.WidgetLoader=xr;exports.WidgetMultiButton=Dr;exports.WidgetSpinner=Pe;exports.WidgetTable=Nr;exports.actionService=jt;exports.asyncProcess=ti;exports.authService=A;exports.billingService=Y;exports.catchUniversal=Te;exports.clickOutside=Fe;exports.clientService=Ct;exports.communicationService=ue;exports.configurationService=tr;exports.constants=Qe;exports.dataService=T;exports.debounce=Gn;exports.default=fi;exports.documentsService=er;exports.equipmentService=cr;exports.fileService=Dn;exports.getCellValue=Ut;exports.getNamesFromListConfig=ri;exports.historyService=Cn;exports.internationalizationService=Ln;exports.invitationService=Vn;exports.metadataService=Ke;exports.newImport=On;exports.openService=Bn;exports.parseError=ke;exports.prettifyValueByMetadata=$n;exports.prettyDate=Ze;exports.prettyDateWithTime=Gt;exports.prettyMoney=ii;exports.processWizardService=be;exports.ruleValidationService=Ye;exports.t=Z;exports.testTypes=En;exports.universalEntityRead=ze;exports.universalEntityUpdate=Ht;exports.useCommunication=Mn;exports.useCustomerState=Zn;exports.useFormAction=Kn;exports.useFormLabel=Yn;exports.useFormMetadata=Jn;exports.useFormRequest=Qn;exports.useFormRequestData=Xn;exports.useListActiveRow=si;exports.useListConfig=_n;exports.useListEntity=ci;exports.useListFilter=bn;exports.useListOrder=Rt;exports.useListProvide=Pt;exports.useListRead=$t;exports.useListSearch=Sn;exports.useListSelect=Tn;exports.useListState=Lt;exports.useLogger=Vt;exports.useManagerState=cn;exports.useSocket=et;exports.useTableRequest=vn;exports.useTableState=wn;exports.useWizard=sr;exports.utils=di;exports.viewService=Rn;
10
+ */const Ye=function(n,e){return n in this.events||(this.events[n]=[]),this.events[n].push(e),this.off.bind(this,n,e)},Xe=function(n,e){n in this.events&&this.events[n].forEach(t=>t(e))},Ze=function(n,e){const t=this.events[n];if(!t)return;const r=t.indexOf(e);r!==-1&&t.splice(r,1)},Qe=function(){this.events={}};class R{constructor(){this.events={}}on(e,t){return Ye.call(this,e,t)}emit(e,t){return Xe.call(this,e,t)}off(e,t){return Ze.call(this,e,t)}cleanEvents(){Qe.call(this)}static on(e,t){return Ye.call(R,e,t)}static emit(e,t){return Xe.call(R,e,t)}static off(e,t){return Ze.call(R,e,t)}static cleanEvents(){Qe.call(R)}}R.events={};var ht=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},ue=(n,e,t)=>(ht(n,e,"read from private field"),t?t.call(n):e.get(n)),Oe=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Pe=(n,e,t,r)=>(ht(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Q,de,fe;const z=class F extends R{constructor(){super(...arguments),Oe(this,Q,void 0),Oe(this,de,"front"),this.organizations=[],Oe(this,fe,!1)}set language(e){localStorage.setItem(F.LOCALSTORAGE_LANGUAGE_KEY,e)}get language(){return localStorage.getItem(F.LOCALSTORAGE_LANGUAGE_KEY)||F.DEFAULT_LANGUAGE}checkLanguageInStorage(){return!!localStorage.getItem(F.LOCALSTORAGE_LANGUAGE_KEY)}get contextType(){var e;if(this.contextId)return((e=this.person)==null?void 0:e.id)===this.contextId?"person":"organization"}set router(e){Pe(this,Q,e)}get router(){if(!ue(this,Q))throw new Error("Router was not founded. Please set router: Manager.router = router: VueRouter");return ue(this,Q)}set type(e){Pe(this,de,e)}get type(){return ue(this,de)}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(e){Pe(this,fe,e),this.emit(F.EVENT_READY_UPDATE,e)}get ready(){return ue(this,fe)}onReady(e){return this.on(F.EVENT_READY_UPDATE,e)}onupdateContext(e){return this.on(F.EVENT_CONTEXT_UPDATE,e)}onupdateData(e){return this.on(F.EVENT_DATA_UPDATE,e)}setCurrentContext(e){if(this.contextId===e)return console.log("[application-manager] The current context has already been installed.");this.contextId=Number(e),localStorage.setItem(F.CURRENT_CONTEXT_KEY,String(e)),this.emit(F.EVENT_CONTEXT_UPDATE,e),console.log(`Current context id %c${e}`,"color: purple")}get context(){var e;return this.contextId?this.contextId===((e=this.person)==null?void 0:e.id)?this.person:this.organizations.find(t=>t.id===this.contextId)||null:null}async init(){try{const e=await this.loadCustomerData();this.person=e,this.organizations=e.organizations,this.user=e.user,this.ready=!0;const t=Number.parseInt(localStorage.getItem(F.CURRENT_CONTEXT_KEY)||"");!Number.isNaN(t)&&this.validateContextId(Number(t))?this.setCurrentContext(t):this.setCurrentContext(Number(e.id))}catch{K.add("error",I.ApiNotAvailable().message)}}loadCustomerData(){return dt.getClientData()}async updateFullClientData(){return this.init()}validateContextId(e){var t;return((t=this.person)==null?void 0:t.id)==e?!0:!!this.organizations.find(r=>r.id===e)}getListKeyById(e){return console.log("DEPRECATED"),`list-information-${e}`}getListInformationFromLocalStorage(e){console.log("DEPRECATED");const t=localStorage.getItem(this.getListKeyById(e));return t&&JSON.parse(t)}setListInformationToLocalStorage(e,t){console.log("DEPRECATED"),localStorage.setItem(this.getListKeyById(e),JSON.stringify(t))}};Q=new WeakMap;de=new WeakMap;fe=new WeakMap;z.DEFAULT_LANGUAGE="en";z.LOCALSTORAGE_LANGUAGE_KEY="CurrentLanguage";z.EVENT_CONTEXT_UPDATE="event:context-update";z.EVENT_READY_UPDATE="event:ready-update";z.EVENT_DATA_UPDATE="event:data-update";z.CURRENT_CONTEXT_KEY="CurrentContext";let gt=z;const v=new gt;function Wt(){const n=i.reactive({contextType:v.contextType,contextId:v.contextId,context:v.context});return v.onupdateContext(()=>{n.contextType=v.contextType,n.contextId=v.contextId,n.context=v.context}),n}function qt(n){return n.text().then(e=>{try{return JSON.parse(e)}catch{return ut}})}function m(n,e={}){return v.isFront&&(e.headers||(e.headers={}),e.headers["Context-Id"]=v.contextId),e.redirect="manual",fetch(n,e).then(t=>t.type==="opaqueredirect"?void window.location.replace("/auth"):t).catch(()=>{throw I.ApiNotAvailable()}).then(t=>qt(t).then(r=>{if(!t.ok)throw r;return r}))}class Te{constructor(){}static parseNamesFromListConfig(e){let t=Te.parseFieldsToGraphQL(e.reduce((o,s)=>(s.name&&o.push(s.name),o),[]));function r(o){let s="";for(let d in o)typeof o[d]=="boolean"?s+=` ${d} `:s+=` ${d} { ${r(o[d])} }`;return s}return r(t)}static parseSortFromListConfig(e){let t={};for(let r in e)t[r]=e[r]?"ASC":"DESC";return t}static parseFieldsToGraphQL(e){function t(r,o){if(o.includes(".")){const s=o.indexOf("."),d=o.substring(s+1),l=o.substring(0,s);l in r||(r[l]={}),t(r[l],d)}else r[o]=!0;return r}return e.reduce(t,{})}}class zt{constructor(){this.public=!1,this.errors=new Proxy([],{set:(e,t,r)=>(t!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),e[t]=r,!0)}),window._journal=this}get error(){return{add:(...e)=>{this.errors.push(e)},clean:()=>{this.errors.splice(0,this.errors.length)},console:()=>{console.log(this.errors)}}}welcome(){console.log("The journal has been initialized. To get access check %c_journal in console.","background: blue; color: white")}}const mt=new zt;function yt(n){return n&&n[0].toLowerCase()+n.slice(1)}function je(n){return Object.keys(n).reduce((e,t)=>{let r=n[t];const o=t.charAt(0).toUpperCase()+t.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=je(r)),e[o]=r,e},{})}function Gt(n,e=2){if(!(typeof n=="string"||typeof n=="number"))return"";let r=String(n).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(e,"0"),r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}const ie={Request:m,clickOutside:Se,getPropFromObject:_e,runPromiseQueue:ct,GraphQL:Te,firstChapterToLowerCase:yt,valuesToUpperCase:je,prettyMoney:Gt},Jt=Object.freeze(Object.defineProperty({__proto__:null,GraphQL:Te,Journal:mt,Request:m,clickOutside:Se,default:ie,firstChapterToLowerCase:yt,getPropFromObject:_e,runPromiseQueue:ct,valuesToUpperCase:je},Symbol.toStringTag,{value:"Module"}));function wt(n,e=""){for(let t in n){if(typeof n[t]=="object"){wt(n[t],(e.length?`${e}-`:"")+t);continue}let r="--"+((e.length?`${e}-`:"")+t).replace(/([A-Z])/g,o=>`-${o}`.toLowerCase());document.documentElement.style.setProperty(r,n[t])}}const j={};function Kt(n){for(let e in n)j[e]=n[e];n.styles&&wt(n.styles),mt.welcome(),console.log("The config has been initialized. To get access check %c_config in console.","background: purple; color: white"),window._config=j}const Ht=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));const Yt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class Xt{static readHistoryById(e,t){return m(`/close-api/audits/history/${e}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}}).then(r=>{const o=r.history.map(s=>{if(!s.changes)return s;const d=s.changes.map(l=>({...l,oldValue:l.originalValue,name:l.fieldName}));return{...s,changes:d}});return{...r,history:o}})}}class Zt extends R{constructor(){super(),this.EVENT_NEW="event:new-metadata",this.store={}}get(e){return this.store[e]}async load(e){return this.store[e]||this.set(e,await this.loadEntityInformation(e)),this.store[e]}set(e,t){this.store[e]=t,this.emit(this.EVENT_NEW,{entityName:e})}async loadEntityInformation(e){return await Ve.get(e)}}const ee=new Zt;function Qt(n){const e=i.ref(ee.get(n));return ee.on(ee.EVENT_NEW,t=>{n===t.entityName&&(e.value=ee.get(n))}),e}function en(n,e){try{return e.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(t){vt().error("prettify value by metadata",n,t)}}class tn{static getDictionary(e){if(!e)throw new Error(`Can't get dictionary for ${e}.`);return m(`/open-api/internationalization/language/${e}`)}}let q={};function H(n,...e){if(typeof n!="string")return console.trace(`Label is not provided for translation: ${n}`),"undefined";let t=S.utils.getPropFromObject((this==null?void 0:this.vocabulary)||q,n);if(typeof t=="string")return et(t,e);const r=S.utils.getPropFromObject(q==null?void 0:q.root,n);return typeof r=="string"?et(r,e):(typeof t===void 0&&console.warn(`Translation for label "${n}" is not founded.`),n)}function et(n,e){return e.forEach((t,r)=>{n=n.replaceAll(new RegExp(`\\{${r}}`,"g"),t)}),n}H.setGlobalVocabulary=function(n){q=n};H.getScope=function(n){const e=typeof n=="string"?n:"root";return typeof n!="string"&&console.warn(`SCOPE ${n} for translate is not string.`),H.bind({vocabulary:S.utils.getPropFromObject(q,e.toLowerCase())})};H.setVocabulary=function(n){return typeof n=="string"&&(n=S.utils.getPropFromObject(q,n)),H.bind({vocabulary:n})};const nn=function(){let n=!1;const e=[];function t(){return n}function r(a,p){t()&&console[a](...p),e.push(p)}function o(...a){r("log",a)}function s(...a){r("warn",a)}function d(...a){r("error",a)}function l(a=!0){n=a}return{info:o,warn:s,history:e,display:l,error:d}}();function vt(){return nn}class k{static parseError(e){let t=e.errors?Object.values(e.errors).map(r=>r[0]):null;throw I.AuthServiceError(e.title,t)}static login(e){return m(j.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...e,AppName:j.applicationName})}).catch(k.parseError)}static registration(e){return e.AppName=j.applicationName,m(j.identityServerURL+"/api/Authenticate/Registration",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)}).catch(k.parseError)}static parseProcessAnswer(e){if(e.statusCode>4)throw I.UndefinedError(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}static startRegistrationProcess(e){return k.requestStepRegistrationProcess("StartRegistration",e)}static confirmPhoneRegistrationProcess(e){return k.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",e)}static confirmEmailRegistrationProcess(e){return k.requestStepRegistrationProcess("ConfirmEmailByRegistration",e)}static finishEmailRegistrationProcess(e){return k.requestStepRegistrationProcess("FinishRegistration",e)}static requestStepRegistrationProcess(e,t){return m(`${j.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).catch(k.parseError)}static startLoginProcess(e){return k.requestStepLoginProcess("StartLogin",e)}static loginWithPassword(e){return k.requestStepLoginProcess("LoginWithPassword",e)}static loginWithOtpCode(e){return k.requestStepLoginProcess("LoginWithOtpCode",e)}static requestStepLoginProcess(e,t){return m(`${j.identityServerURL}/api/Authenticate/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).catch(k.parseError).then(k.parseLoginProcessAnswer)}static parseLoginProcessAnswer(e){if(e.statusCode>3)throw I.UndefinedError(e.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return e}}function rn(n){return Array.isArray(n)&&n.length===2&&typeof n[0]=="string"&&typeof n[1]=="number"}const on="masterId",sn="masterEntity";function ve(n,e){if(!Array.isArray(e))return;if(rn(e))return t(e);e.forEach(t);function t(r){n.append(sn,r[0]),n.append(on,r[1].toString())}}class x{static async anonymousGetList(e){return await m(`/open-api/data/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getSearchParamsForEntityListRead(e){const t=(o,s)=>r.append(o,s),r=new URLSearchParams;if(e.fields){const o=e.fields;typeof o=="string"?t("fields",o):Array.isArray(o)?t("fields",o.join(" ")):typeof o=="object"&&t("fields",Object.keys(o).join(" "))}if(e.order){let o=e.order;const d=(Array.isArray(o)?[o]:Object.entries(o)).map(([l,a="desc"])=>`@${l} ${a}`).join(",");t("order",d)}return e.limit&&t("limit",e.limit.toString()),e.offset&&t("offset",e.offset.toString()),e.filter&&t("filter",e.filter.toString()),e.useUsageContext&&r.append("useUsageContext",e.useUsageContext.toString()),r}static async getList(e,t){const r=x.getSearchParamsForEntityListRead(t||{});return await m(`/close-api/data/${e}?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static getCount(e,t){const r=x.getSearchParamsForEntityListRead(t||{});return m(`/close-api/data/entities/${e}/count?${r.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static create(e,t,r){const o=new URLSearchParams;return ve(o,r==null?void 0:r.masterEntities),m(`/close-api/data/${e}?${o.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:t})})}static update(e,t,r,o={}){return m(`/close-api/data/entities/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r})})}static readById(e,t,r={}){const o=new URLSearchParams;if(r.fields){let s=r.fields;typeof s=="string"&&(s=[s]),o.append("fields",s.join(" "))}return m(`/close-api/data/entities/${e}/id/${t}?${o.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}})}static updateById(e,t,r,o){const s=new URLSearchParams;return ve(s,o==null?void 0:o.masterEntities),m(`/close-api/data/entities/${e}/id/${t}?${s.toString()}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({values:r,version:o==null?void 0:o.version})})}static removeById(e,t,r){const o=typeof t=="number"?{Id:t}:t;return x.removeByKeys(e,o,r)}static removeByKeys(e,t,r){return m(`/close-api/data/entities/${e}`,{method:"delete",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:t,version:r})})}}const Ct=class te{static async create(e){return m(te.url,{method:"post",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}static async read(e){const t=new URLSearchParams({targetCode:String(e.targetCode),entityName:e.entity.name,entityCatalogId:e.entity.catalogId});return m(te.url+"?"+t.toString(),{method:"get"})}static async readMessages(e){return m(`${te.url}/${e}/messages`,{method:"get"})}static async createMessage(e){return m(`${te.url}/${e.talkId}/messages`,{method:"post",body:JSON.stringify({text:e.text}),headers:{"Content-Type":"application/json"}})}};Ct.url="/close-api/communications";let se=Ct;class an{static async getDefaultView(e){return m("/close-api/views/"+e,{method:"GET",headers:{"Content-Type":"application/json"}})}}function tt(n){return{...n,createdEntities:n.createdEntites}}const Et=class pe{static async getStartConfig(e,t){return m([pe.url,e,t].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(e,t){return m([pe.url,e,t].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(tt)}static async runStep(e,t,r,o,s){return m([pe.url,e,t].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:o,values:s})}).then(tt)}};Et.url="/close-api/views/process-wizard";let he=Et;class Ve{static get url(){return"/close-api/metadata"}static async get(e,t,r){console.warn("GETTING METADATA BY DEPRECATED METHOD."),console.trace();const o=new URLSearchParams;return t&&o.append("criteria",t),r&&o.append("id",String(r)),await fetch(this.url+`/${e}?${o.toString()}`,{method:"GET"}).then(s=>s.json())}static getById(e,t,r=[]){const o=new URLSearchParams;return ve(o,r),t&&o.append("id",t),m([this.url,e].join("/")+`?${o.toString()}`)}static getFieldInformation(e,t){return m(`/open-api/metadata/${e}/fields/${t}`)}static getTreatmentListField(e,t){return m(`/open-api/metadata/${e}/list-fields/${t}`)}}class cn{static async upload(e,t){const r=new FormData;r.append("file",e);const o=`/close-api/files?entityName=${t}`;return await fetch(o,{method:"POST",body:r}).then(s=>s.json()).then(s=>(s.filename=e.name,s))}}class ln{static invite(e,t,r){return m("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:e,personKey:t,relatedRoleCode:r})})}static accept(e,t){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:t,mark:!0})})}static decline(e,t){return m("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:e,version:t,mark:!1})})}}class Me{static get url(){return"/close-api/rules-validation/"}static validate(e,t){return m(Me.url+e,{method:"POST",body:JSON.stringify(t)})}}class un{static getConfiguration(){return m("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}}class bt{static url(){return"/close-api/actions"}static async get({criterion:e}){const t=new URLSearchParams;return e&&t.append("criterion",e),await fetch(this.url()+`?${t.toString()}`,{method:"GET"}).then(r=>r.json())}static getById(e,t,r=[]){const o=new URLSearchParams;return ve(o,r),m([this.url(),e,t].join("/")+`?${o.toString()}`,{method:"GET"})}}class dn extends R{constructor(e){super(),this.name="Communication",this.read=()=>{},this.id=e}sendMessage(e){return se.createMessage({talkId:this.id,text:e})}static checkAndGenerate(e){return se.read(e).then(t=>t.length===0?se.create(e):t[0])}}function fn(n){const e=S.Form.getParentForm();e?e.subscribe(n):console.warn(I.ParentFormNotFound());const t=i.reactive([]);return n.read=()=>se.readMessages(n.id).then(r=>(t.splice(0,t.length,...r),r)),{array:t}}function pn(n,e="images"){return`/static-folder/${e}/${n}`}function hn(n,e=1e3){let t=0;return(...r)=>{clearTimeout(t),t=setTimeout(()=>n(...r),e)}}function gn(n,e){const t=i.ref(null);function r(){return n.name?Ve.getById(n.name,e,[]).then(o=>{t.value=o,o.fields.forEach(s=>{s.canSet?n.enable(s.name):n.disable(s.name)})}).catch(()=>{t.value=null;const o=I.MetadataEntityIsNotAvailable(n.name||"FORM_WITHOUT_NAME");K.add("error",o.message)}):Promise.reject()}return n.on(S.Form.EVENT_READ,r),{metadata:t,update:r}}class Ue extends Error{static UndefinedStatus(){return new Ue("Status is undefined.")}}class mn extends Ue{}function yn(n,e){const t=i.reactive([]);async function r(s,d){if(!s)throw mn.UndefinedStatus();const l=await bt.get({criterion:s});t.splice(0,t.length),t.push(...l.map(a=>o(a,d)))}return{actions:t,update:r};function o(s,d){return{title:s.title,callback:()=>(()=>Promise.resolve().then(()=>{if(n.changed)return n.save()}).then(()=>fetch(s.url,{method:"POST",body:JSON.stringify({keys:{Id:d},contextId:v.contextId}),headers:{"Content-Type":"application/json"}})).then(a=>a.json()).then(a=>{if(!a.success)throw e!=null&&e.ModalValidationResult&&a.validationEffect?Lt.openModal(e.ModalValidationResult,{rules:a.validationEffect.results}):K.add("error",a.message),new Error;return a}).then(a=>{a.message&&K.add("info",a.message),e!=null&&e.handleAffectedEntities&&e.handleAffectedEntities(a.affectedEntities)}).then(()=>n.read()))()}}}class Ce{static url(){return"/close-api/presentation"}static getStatuses(e,t){return fetch(`${Ce.url()}/status/${e}/${t}`).then(r=>r.json())}}function wn(n){const e=i.reactive({title:"Loading",type:"wait"});function t(r){if(n.name&&Number.isInteger(r))return Ce.getStatuses(n.name,r).then(o=>{e.type=o.type,e.title=o.name})}return n.on(S.Form.EVENT_READ,r=>{var d,l;const{code:o,name:s}={code:(d=r.Status)==null?void 0:d.Code,name:(l=r.Status)==null?void 0:l.Name};return n.name?!Number.isInteger(o)&&!s?void console.log("Undefined code or name is Status prop."):Ce.getStatuses(n.name,o).then(a=>{e.type=a.type,e.title=s}):void console.log("Form without name.")}),{label:e,update:t}}function vn(n,e){const t=st.useRoute(),r=i.computed(()=>Number(t.params.id)),o=i.reactive({ready:!1,show:!1});return i.watch(()=>r.value,()=>{o.ready=!1}),i.watch(()=>r.value,()=>{Number.isInteger(r.value)&&n.read()},{immediate:!0}),n.read=ie.requestHandler.bind(null,()=>Promise.resolve().then(()=>{if(!n.name)throw new Error("Form without entity name. Please set form.name");return x.readById(n.name,r.value,{fields:e.fields})}).then(ie.valuesToUpperCase).then(s=>(Number.isInteger(s.Version)&&(n.version=s.Version),n.setValues(s),o.show=!0,s)).catch(s=>{throw Object.prototype.hasOwnProperty.call(s,"status")&&[403,404].includes(s.status)&&(o.show=!1),s}).finally(()=>{o.ready=!0})),n.save=ie.requestHandler.bind(null,()=>Promise.resolve().then(()=>{if(!n.name)throw new Error("Form without entity name. Please set form.name");return x.updateById(n.name,r.value,n.changes,{version:n.version})}).then(s=>{n.version=s.version})),n.on(S.Form.EVENT_SAVE,n.read.bind(n)),{formShadowState:o}}function Cn(){const n=i.reactive({contextId:v.contextId,person:v.person,organizations:v.organizations,ready:v.ready,user:v.user}),e=i.computed(()=>{if(!v.ready||!v.person)return null;const r=n.contextId;return v.person.id===r?v.person:v.organizations.find(o=>o.id===r)||null}),t=i.computed(()=>{var r;return n.contextId===((r=n.person)==null?void 0:r.id)});return v.onupdateContext(r=>{n.contextId=r}),v.onupdateData(()=>{n.person=v.person,n.organizations=v.organizations,n.user=v.user}),v.onReady(r=>{n.ready=r}),{state:i.readonly(n),currentContext:e,isPerson:t}}function En(n,e){const t=i.reactive({ready:!1,show:!1});function r(){t.ready=!1,t.show=!1}return n.read=()=>{let o=e();return Promise.resolve().then(()=>{if(!n.name)throw I.EntityWithoutName("Use Form Request");return x.readById(n.name,o.id,{fields:o.fields})}).then(ie.valuesToUpperCase).then(s=>(s.hasOwnProperty("Version")&&(n.version=Number(s.Version)),n.setValues(s),t.show=!0,s)).catch(s=>{const d=He(s);throw K.add("error",d.message),d}).finally(()=>{t.ready=!0})},n.save=()=>{let o=e();return Promise.resolve().then(()=>{if(!n.name)throw I.EntityWithoutName("Use Form Request");return x.updateById(n.name,o.id,n.changes,{version:n.version})}).then(s=>{n.version=s.version||s.Version}).catch(s=>{const d=He(s);throw K.add("error",d.message),d})},n.on(S.Form.EVENT_SAVE,n.read.bind(n)),{shadowFormState:t,initShadow:r}}class bn{static getRequiredDocuments(e,t,r){const o=new URLSearchParams({entity:e,primaryKey:t,statusCode:r});return fetch(`/close-api/views/required-documents?${o.toString()}`).then(s=>s.json())}}class J{static url(){return"close-api/billing"}static getBillingMetadata(e){return fetch(`/${J.url()}/calculator/${e}`)}static calculate(e,t){return m(`/${J.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:e,values:t})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):I.ApiNotAvailable()})}static parseMetadataField(e){function t(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:e.name,label:e.title,required:e.required,type:t(e)}}static createOnlinePayment(e,t){return m(`/${J.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:e,returnURL:t})})}static applyOnlinePayment(e){return m(`/${J.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:e})})}}class _n{static getListSettings(e,t){const r=new URLSearchParams;r.set("entity",e),t&&r.set("mark",t);const o=`/close-api/views/list/configs?${r.toString()}`;return m(o)}}var _t=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},L=(n,e,t)=>(_t(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},U=(n,e,t,r)=>(_t(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),ge,ne,me,ye,re,oe,Be;const W="_______LIST_______ROW_______INDEX________NAME_______",ke=class B extends R{constructor(e){super(),this.LIST_ROW_KEY=1,M(this,ge,void 0),this.array=[],M(this,ne,[]),M(this,me,[]),M(this,ye,new Proxy({},{set:(t,r,o,s)=>(t[r]=o,this.emit(B.EVENT_FILTERS_UPDATE,t),!0),deleteProperty:(t,r)=>(delete t[r],this.emit(B.EVENT_FILTERS_UPDATE,t),!0)})),M(this,re,!1),M(this,oe,(...t)=>Promise),M(this,Be,()=>{}),U(this,ge,e.primaryKeys||[]),this.name=e.name||void 0,e.config&&U(this,ne,e.config)}set config(e){U(this,ne,e.map(S.utils.copyObject)),this.emitUpdateConfig()}get config(){return L(this,ne)}emitUpdateConfig(){this.emit(B.EVENT_CONFIG_UPDATE,this.config)}get order(){return L(this,me)}set order(e){U(this,me,e),this.emit(B.EVENT_ORDER_UPDATE,this.order)}get filters(){return L(this,ye)}set filters(e){Tn(L(this,ye),e)}set wait(e){U(this,re,e),this.emit(S.Form.EVENT_WAIT,L(this,re))}get wait(){return L(this,re)}get primaryKeys(){return L(this,ge)}at(e){return this.array[e%this.array.length]}atByKey(e){return this.array.find(t=>t[W]===e)}indexByKey(e){return this.array.findIndex(t=>t[W]===e)}static getKey(e){return e[W]}static hasKey(e){return typeof e!="object"||e===null?!1:Object.prototype.hasOwnProperty.call(e,W)}add(...e){const t=this.wrapArray(e);this.array.push(...t),this.emit(B.EVENT_DATA,this.array)}set(e){this.array=[],this.add(...e)}removeByKey(e){const t=this.indexByKey(e);t!==-1&&(this.array.splice(t,1),this.emit(B.EVENT_DATA,this.array))}updateByKey(e,t){const r=this.atByKey(e);r&&(Object.assign(r,t),this.emit(B.EVENT_DATA,this.array))}wrapArray(e){return e.map(this.wrapItem.bind(this))}wrapItem(e){return this.isWrapped(e)?e:{...e,[W]:this.LIST_ROW_KEY++}}isWrapped(e){return Object.prototype.hasOwnProperty.call(e,W)}set read(e){U(this,oe,e)}get read(){return(...e)=>Promise.resolve().then(()=>{const t=L(this,oe).call(this,...e);return this.wait=!0,t}).finally(()=>this.wait=!1)}set save(e){U(this,oe,e)}get save(){return()=>Promise.resolve().then(()=>this.wait=!0).then(()=>L(this,Be).call(this)).finally(()=>this.wait=!1)}static GetFieldNames(e){return e.reduce((t,r)=>(r.name&&(typeof r.name=="string"?t.push(r.name):t.push(...r.name)),t),[])}static mergeWithKey(e,t){return{...e,[W]:t}}static getCellName(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}static getCellInfo(e,t){const r=B.getCellName(e),o=(()=>{let s=r?_e(t,r):null;return s===void 0&&(s=null),e.value?e.value(s,t):s})();return{name:r,value:o}}};ge=new WeakMap;ne=new WeakMap;me=new WeakMap;ye=new WeakMap;re=new WeakMap;oe=new WeakMap;Be=new WeakMap;ke.EVENT_DATA="list-data: update";ke.EVENT_CONFIG_UPDATE="list-config:update";ke.EVENT_ORDER_UPDATE="list-order:update";ke.EVENT_FILTERS_UPDATE="list-filters:update";function Sn(n){const e=i.ref(""),t=i.computed(()=>{const r=e.value.toLowerCase();return i.unref(n).filter(o=>e.value.length?Object.values(o).join().toLowerCase().includes(r):!0)});return{search:e,searchArray:t}}function Tn(n,e){Object.keys(n).forEach(t=>delete n[t]),Object.entries(e).forEach(([t,r])=>{n[t]=r})}function kn(n){const e=i.reactive([]);function t(l){return e.includes(l)}function r(l){t(l)||e.push(l)}function o(l){const a=e.findIndex(p=>p===l);a!==-1&&e.splice(a,1)}function s(l){const a=i.unref(n);if(l===void 0){e.length===0?a.forEach(r):a.forEach(o);return}t(l)?o(l):r(l)}const d=i.computed(()=>{const l=i.unref(n);return e.length===l.length&&l.length!==0});return[e,s,d,r,o]}function Nn(n){return n.statusName==="Completed"}function An(n){return n.statusName==="FinalStepWithConfirmation"}function Fn(n){return n.statusName==="ValidationError"}function In(n,e,t){let r=null;const o=i.reactive({wait:null});let s=[],d=null;const l=i.ref(null);function a(){l.value=s.find(y=>y.name===d)||null}function p(){var y;return d?((y=s.find(b=>b.name===d))==null?void 0:y.fields)||[]:[]}function c(y){if(a(),Fn(y))return void t.onValidation(y.validationResults);if((y.statusName==="FinalStep"||y.statusName==="NextStep")&&(!p().length||$n(p(),t.presets)))return C(t.presets||{});Nn(y)&&t.onCompleted(y),An(y)&&t.onConfirmation(y)}async function f(){try{await u(),await w()}catch(y){const{message:b}=Ee(y);be.add("error",b)}}function u(){return o.wait="Loading process information.",he.getStartConfig(e,n).then(y=>{s=y.steps.map(b=>({label:b.title,name:b.stepName,number:b.number,fields:b.frontendEntity.objectTypes.reduce((T,N)=>(N.properties.forEach(O=>{T.push({name:O.name,label:O.title,type:O.refEntityName||O.dataType})}),T),[])}))}).then(y=>(o.wait=!1,y))}function h(y){return d=y.nextStepName,r=y.token,y}function g(y){const b=Ee(y);be.add("error",b.message)}function w(){return o.wait="Starting process",he.startProcess(e,n).then(h).then(c).catch(g).finally(()=>{o.wait=null})}function C(y={}){return!r||!d?Promise.reject("Not step or token."):(o.wait="Expect the result",he.runStep(e,n,d,r,y).then(h).then(c).catch(g).finally(()=>{o.wait=!1}))}return{initialize:f,state:o,currentStepConfig:i.readonly(l),next:C}}function $n(n,e){for(let t=0;t<n.length;t++){const r=n[t];if(!S.utils.getPropFromObject(e,r.name))return!1}return!0}const On="close-api/proxy/Equipment/Search";class Pn{static search(e,t,r,o,s){const d=new URLSearchParams;d.append("pattern",e||""),t&&d.append("categoryId",t),r&&d.append("useType",String(r)),o&&d.append("statusCode",o),s&&(d.append("limit",String(s.limit)),d.append("offset",String(s.offset)));const l=`/${On}?${d.toString()}`;return m(l,{method:"GET",headers:{"Content-Type":"application/json"}})}}const Rn={class:"widget-table__head"},Ln={class:"widget-table__head-label margin_0 text_overflow"},Bn=i.defineComponent({__name:"widget-table-head",props:{config:{}},setup(n){return(e,t)=>(i.openBlock(),i.createElementBlock("tr",Rn,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.config,(r,o)=>(i.openBlock(),i.createElementBlock("th",{class:"widget-table__head-cell",key:o},[i.createElementVNode("p",Ln,i.toDisplayString(r.label),1)]))),128))]))}});const V=(n,e)=>{const t=n.__vccOpts||n;for(const[r,o]of e)t[r]=o;return t},xn=V(Bn,[["__scopeId","data-v-25198f4a"]]);function Dn(n){return typeof n.name=="string"?n.name:Array.isArray(n.name)?n.name[0]:null}function St(n,e){const t=Dn(n);let r=t?S.utils.getPropFromObject(e,t):null;return r===void 0&&(r=null),n.value?n.value(r,e):r}function jn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xe={exports:{}},Re,nt;function Vn(){if(nt)return Re;nt=1;var n=1e3,e=n*60,t=e*60,r=t*24,o=r*7,s=r*365.25;Re=function(c,f){f=f||{};var u=typeof c;if(u==="string"&&c.length>0)return d(c);if(u==="number"&&isFinite(c))return f.long?a(c):l(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function d(c){if(c=String(c),!(c.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(f){var u=parseFloat(f[1]),h=(f[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*r;case"hours":case"hour":case"hrs":case"hr":case"h":return u*t;case"minutes":case"minute":case"mins":case"min":case"m":return u*e;case"seconds":case"second":case"secs":case"sec":case"s":return u*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}function l(c){var f=Math.abs(c);return f>=r?Math.round(c/r)+"d":f>=t?Math.round(c/t)+"h":f>=e?Math.round(c/e)+"m":f>=n?Math.round(c/n)+"s":c+"ms"}function a(c){var f=Math.abs(c);return f>=r?p(c,f,r,"day"):f>=t?p(c,f,t,"hour"):f>=e?p(c,f,e,"minute"):f>=n?p(c,f,n,"second"):c+" ms"}function p(c,f,u,h){var g=f>=u*1.5;return Math.round(c/u)+" "+h+(g?"s":"")}return Re}function Mn(n){t.debug=t,t.default=t,t.coerce=a,t.disable=s,t.enable=o,t.enabled=d,t.humanize=Vn(),t.destroy=p,Object.keys(n).forEach(c=>{t[c]=n[c]}),t.names=[],t.skips=[],t.formatters={};function e(c){let f=0;for(let u=0;u<c.length;u++)f=(f<<5)-f+c.charCodeAt(u),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(c){let f,u=null,h,g;function w(...C){if(!w.enabled)return;const y=w,b=Number(new Date),T=b-(f||b);y.diff=T,y.prev=f,y.curr=b,f=b,C[0]=t.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let N=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(D,_)=>{if(D==="%%")return"%";N++;const Y=t.formatters[_];if(typeof Y=="function"){const ce=C[N];D=Y.call(y,ce),C.splice(N,1),N--}return D}),t.formatArgs.call(y,C),(y.log||t.log).apply(y,C)}return w.namespace=c,w.useColors=t.useColors(),w.color=t.selectColor(c),w.extend=r,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>u!==null?u:(h!==t.namespaces&&(h=t.namespaces,g=t.enabled(c)),g),set:C=>{u=C}}),typeof t.init=="function"&&t.init(w),w}function r(c,f){const u=t(this.namespace+(typeof f>"u"?":":f)+c);return u.log=this.log,u}function o(c){t.save(c),t.namespaces=c,t.names=[],t.skips=[];let f;const u=(typeof c=="string"?c:"").split(/[\s,]+/),h=u.length;for(f=0;f<h;f++)u[f]&&(c=u[f].replace(/\*/g,".*?"),c[0]==="-"?t.skips.push(new RegExp("^"+c.slice(1)+"$")):t.names.push(new RegExp("^"+c+"$")))}function s(){const c=[...t.names.map(l),...t.skips.map(l).map(f=>"-"+f)].join(",");return t.enable(""),c}function d(c){if(c[c.length-1]==="*")return!0;let f,u;for(f=0,u=t.skips.length;f<u;f++)if(t.skips[f].test(c))return!1;for(f=0,u=t.names.length;f<u;f++)if(t.names[f].test(c))return!0;return!1}function l(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function a(c){return c instanceof Error?c.stack||c.message:c}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}var Un=Mn;(function(n,e){e.formatArgs=r,e.save=o,e.load=s,e.useColors=t,e.storage=d(),e.destroy=(()=>{let a=!1;return()=>{a||(a=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;a.splice(1,0,p,"color: inherit");let c=0,f=0;a[0].replace(/%[a-zA-Z%]/g,u=>{u!=="%%"&&(c++,u==="%c"&&(f=c))}),a.splice(f,0,p)}e.log=console.debug||console.log||(()=>{});function o(a){try{a?e.storage.setItem("debug",a):e.storage.removeItem("debug")}catch{}}function s(){let a;try{a=e.storage.getItem("debug")}catch{}return!a&&typeof process<"u"&&"env"in process&&(a=process.env.DEBUG),a}function d(){try{return localStorage}catch{}}n.exports=Un(e);const{formatters:l}=n.exports;l.j=function(a){try{return JSON.stringify(a)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(xe,xe.exports);var Wn=xe.exports;const Tt=jn(Wn);function kt(n){return["eservices-core",n].join(":")}function Nt(n){return We(n,"YYYY/MM/DD HH:mm:ss")}function We(n,e="YYYY/MM/DD"){if(!n)return"";try{const t=new Date(n);return Bt.format(t,e)}catch(t){return console.log(t),"Invalid date"}}const qn={props:{name:String},setup(n,e){let t="unknown";try{t=e.slots.default()[0].children}catch{t=n.name}typeof t!="string"&&console.warn(`Name for Icon.vue is not string. ${t}`);try{t=t.replace(/\s+/g,"")}catch{}return()=>i.h("i",{class:`icon icon-${t}`})}},Ne=V(qn,[["__scopeId","data-v-e287c8d9"]]),zn=Tt(kt("setup-list-row"));function Gn(n,e){const t=n.config.map(r=>Jn(r,n,e));return i.h("tr",{class:"widget-table__row widget-table-row"},t)}function Jn(n,e,t){const r=e.values;let o=St(n,r);const s={onClick:[],class:["widget-table__cell widget-table-cell"]};function d(c){s.onClick.push(()=>c(r))}function l(c){Array.isArray(c)?s.class.push(...c):s.class.push(c)}const a=[],p=[];if(n.hide&&n.hide(r))return[i.h("td")];if(n.type)switch(l(`widget-table-cell_${n.type}`),n.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=We(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=Nt(typeof o=="string"?o:null);break}case"money":{o=It(o);break}case"multi-select":{p.push(i.h(S.FormField,{type:"single-checkbox",modelValue:e.selected})),d(rt.bind(null,t,!0));break}case"select":{p.push(i.h(S.FormField,{type:"single-radio",modelValue:e.selected})),d(rt.bind(null,t,!1));break}}if(n.onClick&&d(n.onClick),n.link)try{const c=n.link(r);if(c){const f=i.h(st.RouterLink,{to:c});p.push(f),l("widget-table-cell_link")}}catch(c){zn("Can't add router link",c)}return n.href&&(p.push(i.h("a",{href:n.href(r),target:"_blank"})),l("widget-table-cell_link")),(typeof o=="string"||typeof o=="number")&&p.push(i.h("p",{class:"widget-list-cell-text"},o)),n.icon&&p.push(i.h(Ne,{name:n.icon})),n.class&&(typeof n.class=="function"?l(n.class(r)):l(n.class)),a.push(i.h("td",s,p)),a}function rt(n,e){n.emit("select",e)}function At(n,e){return()=>{try{return Gn(n,e)}catch(t){return console.warn(t),null}}}const Kn={props:{values:Object,config:Object,selected:Boolean},setup:At},Hn=["colspan"],ot=i.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(n,{emit:e}){const t=i.ref();return i.onMounted(()=>{setTimeout(()=>{t.value&&t.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,o)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:t},[i.createElementVNode("td",{colspan:r.rowLength},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.component),i.mergeProps(r.$attrs,{values:r.values,new:r.isNew,onClose:o[0]||(o[0]=s=>e("close")),onSave:o[1]||(o[1]=s=>e("save",s))}),null,16,["values","new"]))],8,Hn)],512))}}),qe={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go."},Yn={class:"widget-table"},it="update:selectedRows",Xn=i.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{}},emits:["update:activeRow","save"],setup(n,{emit:e}){const t=n,r=i.useSlots(),o=i.computed(()=>{var l;return(l=r==null?void 0:r.default)==null?void 0:l.call(r)[0]});function s(l,a=!0){if(!t.selectedRows)return;if(!a)return e(it,t.selectedRows.includes(l)?[]:[l]);const p=[...t.selectedRows],c=p.indexOf(l);return c===-1?p.push(l):p.splice(c,1),e(it,p)}function d(l){e("save",l),e("update:activeRow",null)}return(l,a)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("table",Yn,[i.createVNode(xn,{config:l.config},null,8,["config"]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.array,(p,c)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:c},[i.createVNode(Kn,{config:l.config,values:p,selected:l.selectedRows.includes(p),onSelect:f=>s(p,f),class:i.normalizeClass(l.classCallback?l.classCallback(p):"")},null,8,["config","values","selected","onSelect","class"]),o.value&&l.activeRow===p?(i.openBlock(),i.createBlock(ot,{key:0,component:o.value,"row-length":l.config.length,values:p,onClose:a[0]||(a[0]=f=>e("update:activeRow",null)),onSave:d,"is-new":!1},null,8,["component","row-length","values"])):i.createCommentVNode("",!0)],64))),128)),l.activeRow===i.unref(qe).LIST_ACTIVE_NEW?(i.openBlock(),i.createBlock(ot,{key:0,component:o.value,"row-length":l.config.length,onClose:a[1]||(a[1]=p=>e("update:activeRow",null)),onSave:d,"is-new":!0},null,8,["component","row-length"])):i.createCommentVNode("",!0)])])]))}}),Zn=i.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(n){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{class:"widget-spinner",style:i.normalizeStyle({"border-left":`1.1em solid ${e.color}`})},null,4))}});const Ae=V(Zn,[["__scopeId","data-v-0ef9ae88"]]),Qn={class:"widget-button"},er=i.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(n){return(e,t)=>(i.openBlock(),i.createElementBlock("button",Qn,[e.wait?(i.openBlock(),i.createBlock(Ae,{key:0,class:"widget-button-spinner"})):i.createCommentVNode("",!0),i.renderSlot(e.$slots,"default",{},void 0,!0)]))}});const tr=V(er,[["__scopeId","data-v-450dc564"]]),nr={class:"widget-multi-button-wrap position_relative cursor_pointer"},rr={class:"widget-multi-button-body grid"},or=["onClick"],ir={class:"widget-multi-button-side-wrap"},sr=i.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(n){const e=n;i.useCssVars(d=>({"7025434e":r.value}));const t=i.reactive({active:!1,wait:!1}),r=i.computed(()=>e.array.length+(e.label?1:0));function o(d){if(!(typeof d!="function"||t.wait))return t.wait=!0,Promise.resolve().then(d).finally(()=>{t.wait=!1})}function s(d=!t.active){t.active=d}return(d,l)=>(i.openBlock(),i.createElementBlock("div",nr,[i.createElementVNode("div",{class:i.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",t.active?"widget-multi-button_active":null])},[i.createElementVNode("div",rr,[d.label?(i.openBlock(),i.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:l[0]||(l[0]=a=>s())},i.toDisplayString(d.label),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.array,(a,p)=>(i.openBlock(),i.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:p,onClick:c=>{o(a.callback),s(!1)}},i.toDisplayString(a.label),9,or))),128))]),i.createElementVNode("div",ir,[i.createElementVNode("div",{class:i.normalizeClass(["grid-center widget-multi-button-side",t.active?"widget-multi-button-side_active":null]),onClick:l[1]||(l[1]=a=>s())},[t.wait?(i.openBlock(),i.createBlock(i.unref(Ae),{key:0,class:"widget-multi-button-side-spinner"})):d.array.length>1?(i.openBlock(),i.createBlock(i.unref(Ne),{key:1,class:"widget-multi-button-side-icon"},{default:i.withCtx(()=>[i.createTextVNode("angle-small-down")]),_:1})):i.createCommentVNode("",!0)],2)])],2)]))}});const ar=V(sr,[["__scopeId","data-v-a8d711d1"]]),cr={class:"widget-loader flex flex-align_center gap_10 padding_15"},lr={class:"text_md"},ur=i.defineComponent({__name:"widget-loader",props:{label:{}},setup(n){return(e,t)=>(i.openBlock(),i.createElementBlock("div",cr,[i.createVNode(Ae,{color:"var(--primary)",class:"padding_10"}),i.createElementVNode("span",lr,i.toDisplayString(e.label),1)]))}}),dr=["alt","src"],fr=i.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(n){const e=n,t=i.ref();return i.onMounted(()=>{t.value&&(t.value.src=e.src),t.value.onerror=function(){e.default&&(t.value.src=e.default)}}),(r,o)=>(i.openBlock(),i.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:t,src:r.src||r.$props.default},null,8,dr))}}),pr={props:{config:Array,values:Object,selected:Boolean},setup:At};const hr=V(pr,[["__scopeId","data-v-344a8cc1"]]),gr=n=>(i.pushScopeId("data-v-4e1d87c8"),n=n(),i.popScopeId(),n),mr={class:"head-cell"},yr=gr(()=>i.createElementVNode("div",{class:"head-cell-resize"},null,-1)),wr=i.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(n,{emit:e}){const t=n;return t.title&&console.warn(`For cell ${t.name} using title,it should be replaced with label.`),(r,o)=>(i.openBlock(),i.createElementBlock("th",null,[i.createElementVNode("div",mr,[i.createElementVNode("div",{class:"head-cell-content flex_grow",style:i.normalizeStyle({"min-width":r.minWidth,"max-width":r.maxWidth,width:r.width})},[r.type==="multi-select"?(i.openBlock(),i.createBlock(i.unref(S.FormField),{key:0,type:"single-checkbox",onClick:o[0]||(o[0]=i.withModifiers(s=>e("select"),["stop","prevent"]))})):(i.openBlock(),i.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:o[1]||(o[1]=s=>e("order"))},i.toDisplayString(r.title||r.label),1))],4),r.name&&r.order.length&&r.order[0]===r.name?(i.openBlock(),i.createBlock(i.unref(Ne),{key:0,class:i.normalizeClass(["head-cell-order",{"head-cell-order_down":r.order.length>1&&r.order[1]==="desc"}])},{default:i.withCtx(()=>[i.createTextVNode("core-arrow-up")]),_:1},8,["class"])):i.createCommentVNode("",!0),yr])]))}});const vr=V(wr,[["__scopeId","data-v-4e1d87c8"]]),Cr=i.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(n,{emit:e}){const t=n,r=i.ref(),o=i.ref();i.onMounted(()=>{function a(h,g){let w=-1;do w++,g-=h[w];while(g>0&&w<h.length);return w}function p(h,g){let w=0;for(;g>0&&g>h[w]&&w<h.length;)g-=h[w],w++;return console.log(g,w),w>0?w:0}function c(h){try{o.value.style.insetInlineStart=h+"px"}catch(g){console.log(g)}}function f(h){try{o.value.style.width=h+"px",o.value.style.minWidth=h+"px",o.value.style.maxWidth=h+"px"}catch(g){console.log(g)}}function u(h){return h===null?!1:h.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(g){var Ke;function w(A){return A.screenX+b-O}const C=r.value,y=[...C.children].filter(A=>A.localName==="th"),b=((Ke=C.offsetParent)==null?void 0:Ke.scrollLeft)||0,T=y.map(A=>A.clientWidth),N=u(g.target),O=C.getBoundingClientRect().left,D=w(g),_=a(T,D),Y=T.slice(0,_).reduce((A,P)=>A+P,0),ce=D-Y,Fe=C.offsetWidth,X=y[_].clientWidth;if(t.config[_].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",g.screenX),console.log("Widths",T),console.log("max width",Fe),console.log("Start Position",D),console.log("Position From",_),console.log("Start Position",_),console.log("Global offset (Отступ самой таблицы от края экрана)",O),console.log("Del",ce),console.groupEnd(),o.value.innerText=y[_].textContent||"",o.value.style.display="grid",o.value.style.width=X+"px",o.value.style.cursor="grabbing",c(Y),f(X),document.addEventListener("pointermove",Je,{passive:!0}),document.addEventListener("pointerup",Ge);function Ge(A){if(console.group("END"),document.removeEventListener("pointermove",Je),document.removeEventListener("pointerup",Ge),N&&(t.config[_].width=o.value.style.width,t.config[_].minWidth=o.value.style.width,t.config[_].maxWidth=o.value.style.width,s(t.config)),!N){const P=A.screenX+b-O;console.log("ENP Position",P);const le=p(T,P);if(console.log(_,"->",le),le!==_){const Z=t.config[_],Ie=t.config;Ie.splice(_,1),Ie.splice(le,0,Z),s(Ie)}else{const Z=t.config[_].name;d(Z)}}o.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function Je(A){if(N){const Z=w(A)-D+X;f(Z);return}let P=A.screenX+b-O-ce;P<0&&(P=0),P+X>Fe&&(P=Fe-X),c(P)}})});function s(a){e("update:config",a)}function d(a){if(!a)return;if(Array.isArray(a)){if(a.length<1)return;a=a[0]}if(t.order.length===0||t.order[0]!==a)return void l([a]);const p=t.order.length===1||t.order[1]==="asc"?"asc":"desc";l([a,p==="asc"?"desc":"asc"])}function l(a){e("update:order",a)}return(a,p)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:r},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.config,(c,f)=>(i.openBlock(),i.createBlock(vr,i.mergeProps({key:c},c,{onOrder:u=>d(c.name),onSelect:p[0]||(p[0]=u=>e("select")),order:a.order}),null,16,["onOrder","order"]))),128)),i.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:o},"test",512)],512))}});const Er=V(Cr,[["__scopeId","data-v-ccffc6bd"]]),br={class:"widget-list"},_r={class:"widget-list-body position_relative"},Sr=50,Tr=i.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(n,{emit:e}){const t=n;function r(l,a=!0){if(t.selectedRows)if(!a)s(t.selectedRows.includes(l)?[]:[l]);else{const p=[...t.selectedRows],c=p.indexOf(l);c===-1?p.push(l):p==null||p.splice(c,1),s(p)}}function o(){var l;if(((l=t.selectedRows)==null?void 0:l.length)!==t.array.length)return s([...t.array]);s([])}function s(l){e("update:selectedRows",l)}function d(l){if(!l)return;const a=l.target;a.scrollTop+a.clientHeight+Sr>a.scrollHeight&&e("scrollEnd")}return(l,a)=>(i.openBlock(),i.createElementBlock("div",{class:"es-list-container",onScrollPassive:d},[i.createElementVNode("table",br,[i.createElementVNode("thead",null,[i.createVNode(Er,{onSelect:a[0]||(a[0]=p=>o()),"onUpdate:order":a[1]||(a[1]=p=>e("update:order",p)),"onUpdate:config":a[2]||(a[2]=p=>e("update:config",p)),config:l.config,order:l.order},null,8,["config","order"])]),i.createElementVNode("tbody",_r,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.array,(p,c)=>{var f;return i.openBlock(),i.createBlock(hr,{key:c,class:"widget-list-row",values:p,config:l.config,selected:(f=l.selectedRows)==null?void 0:f.includes(p),onSelect:u=>r(p,u)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function kr(n){function e(...r){return t.wait?Promise.reject("The process has already started."):(t.wait=!0,Promise.resolve().then(()=>n(...r)).finally(()=>{t.wait=!1}))}const t=i.reactive({wait:!1,call:e});return t}function Ee(n){return typeof n=="string"?Le(n):Nr(n)?Le(n.message):Le(qe.DEFAULT_ERROR_MESSAGE)}function Nr(n){return!!(typeof n=="object"&&n!==null&&Object.hasOwnProperty.call(n,"message"))}function Le(n){return{message:n}}function we(n="error"){return function(e){const{message:t}=Ee(e);be.add(n,t)}}function De(n,e){return ze().emit("entity:read",{...e,entity:n})}function Ft(n,e){return ze().emit("entity:update",{...e,entity:n})}function Ar(n){return n.reduce((e,t)=>(t.name&&(typeof t.name=="string"?e.push(t.name):e.push(...t.name)),e),[])}function It(n,e=2){if(!(typeof n=="string"||typeof n=="number"))return"";let r=String(n).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(e,"0"),r[1].length>e&&(r[1]=r[1].substring(0,e)),r.join(".")}function $t(n){return Object.keys(n).reduce((e,t)=>{let r=n[t];const o=t.charAt(0).toUpperCase()+t.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=$t(r)),e[o]=r,e},{})}function Fr(n,e){const t=new Map;return n.forEach(r=>{var o;t.has(r[e])||t.set(r[e],[]),(o=t.get(r[e]))==null||o.push(r)}),t}function Ir(){const n=i.ref(null);function e(t){n.value=t}return{activeRow:n,activateRow:e}}const G=Tt(kt("use-socket"));function ze(){return $r}const $r=function(){let n=1,e;const t=new Set,r=new Set;function o(){return{safeQueue:r,requestId:n,handlers:t}}function s(u){const h=[...t.values()];G("Handlers array length is %d. Response event: %s. Request id: %d",t.size,u.event,u.requestId),h.forEach(g=>{const w=u.requestId;(g.requestId&&g.requestId===w||!g.requestId&&g.event===u.event)&&(G("Find appropriated handler: %d, event: %s",n,g.event),g.callback(u.data,u),g.once&&(t.delete(g),G("Handler was removed by *once* params was passed. %o",g)))})}function d(u){console.log(`%cInitializing sockets: %c${u}`,"color: purple","color: black"),e=new WebSocket(u),e.onclose=function(h){G("Connection to server was stopped: %d %s",h.code,h.reason),setTimeout(()=>d(u))},e.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...r.values()].forEach(h=>{l(h),r.delete(h)})},e.onerror=function(h){console.warn(h)},e.onmessage=h=>{try{const g=JSON.parse(h.data);if(!Ot(g)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(g);return}s(g)}catch(g){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(g)}}}function l(u){e.send(u)}function a(u,h){t.add({event:u,callback:h})}function p(u,h){t.add({event:u,callback:h,once:!0})}function c(){return e&&(e==null?void 0:e.readyState)===1}function f(u,h,g){const w=++n,C=JSON.stringify({requestId:w,event:u,data:h,contextId:v.contextId,url:window.location.href});return c()?l(C):(r.add(C),G("Socket is not connected. Message was send to save-queue. %s")),new Promise((y,b)=>{t.add({event:u,requestId:w,once:!0,callback:(T,N)=>{if(G("Promise was resolve with next data:",T),Or(N))return void b(T);g&&g(T,N),y(T)}})})}return{get socket(){return e},on:a,once:p,emit:f,initialization:d,getDevInfo:o}}(),Or=n=>!!Ot(n)&&n.event==="request-error",Ot=n=>!!n&&typeof n=="object"&&n!==null&&"event"in n&&typeof n.event=="string"&&"requestId"in n&&typeof n.requestId=="number"&&"data"in n;function Pr(n,e){const t=i.reactive([]);let r=0;const o=i.ref(!1);function s(){if(o.value)return Promise.reject("The process has already started.");const u=c();return o.value=!0,typeof u.limit!="number"&&(u.limit=100),u.offset=r,De(n,u).then(h=>(r+=h.length,h)).finally(()=>{o.value=!1})}function d(u,h){var w;const g=u.Version||((w=t.find(C=>C.Id===h))==null?void 0:w.Version);if(g===void 0)throw new Error("Object without version.");return g}function l(u,h){const g=t.findIndex(w=>w.Id===u);if(g===-1)throw new Error(`Can't found item with Id ${u}`);t.splice(g,1,h)}async function a(u,h){try{const g=c(),w=d(h,u);delete h.Version,await Ft(n,{id:u,values:h,version:w});const C=await De(n,{fields:g.fields||"",id:u});l(u,C)}catch(g){we()(g)}}async function p(){try{const u=await s();t.push(...u)}catch(u){we()(u)}}function c(){return typeof e=="function"?e():e}async function f(){try{r=0;const u=await s();t.splice(0,t.length,...u)}catch(u){we()(u)}}return{array:t,updateById:a,next:p,reload:f,wait:o}}const be=new class{constructor(){this.store=i.reactive([])}add(e,t,r={}){const o=Rr(r),s=new Lr(e,t,o.timeout,o.children,o.click);return this.store.push(s),r.timeout&&setTimeout(this.remove.bind(this,s.id),r.timeout*1e3),s}remove(e){const t=this.store.findIndex(r=>r.id===e);if(t===-1)return!1;this.store.splice(t,1)}};function Rr(n){function e(r){return!!r&&typeof r=="object"}const t={timeout:10,click:()=>null,children:[]};return e(n)?{timeout:n.timeout||t.timeout,click:n.click||t.click,children:n.children||t.children}:t}const Pt=class Rt{constructor(e,t,r,o,s){this.type=e,this.message=t,this.timeout=r,this.children=o,this.click=s,this.id=Rt.cardId++}};Pt.cardId=1;let Lr=Pt;function Br(n){return typeof n!="object"||n===null?!1:!!(n.hasOwnProperty("start")||n.hasOwnProperty("end"))}function $(n){return Object.keys(n).reduce((e,t)=>{const r=n[t];if(Array.isArray(r)){const o=r.map(s=>typeof s=="string"?`'${s}'`:s).join(", ");return r.length&&e.push(`@${t} in (${o})`),e}if(Br(r)){let o=function(s){var d;return((d=s.match(/([^Z]*)/))==null?void 0:d[0])+"0000Z"};return r.start&&e.push(`@${t} ge ${o(r.start)}`),r.end&&e.push(`@${t} le ${o(r.end)}`),e}return typeof r=="number"?(e.push(`@${t} eq ${r}`),e):typeof r=="string"?(r.length!==0&&e.push(`@${t} eq '${r}'`),e):(r===null&&e.push($.is(t,r)),e)},[]).join(" and ")}function ae(n){return typeof n=="string"?`'${n}'`:`${n}`}$.includes=function(e,t){return`@${e} Contains ${ae(t)}`};$.beginWith=function(e,t){return`@${e} BeginWith ${ae(t)}`};$.notEq=function(e,t){return`@${e} nq ${ae(t)}`};$.eq=function(e,t){return Array.isArray(t)?$.in(e,t):`@${e} eq ${ae(t)}`};$.in=function(e,t){const r=t.map(ae).join(", ");return`@${e} in (${r})`};$.and=function(...e){return e.join(" and ")};$.is=function(e,t){return`@${e} is ${t}`};$.or=function(...e){return e.join(" or ")};const xr={clickOutside:Se,staticLink:pn,Request:m},Dr={usage:Vt,utils:Jt,config:Kt,types:Ht};exports.ApplicationManager=gt;exports.Communication=dn;exports.ComputedMetadata=Qt;exports.CoreError=I;exports.Filter=$;exports.Manager=v;exports.MetadataStore=ee;exports.NotificationSystem=be;exports.Request=m;exports.WidgetButton=tr;exports.WidgetIcon=Ne;exports.WidgetImage=fr;exports.WidgetList=Tr;exports.WidgetLoader=ur;exports.WidgetMultiButton=ar;exports.WidgetSpinner=Ae;exports.WidgetTable=Xn;exports.actionService=bt;exports.asyncProcess=kr;exports.authService=k;exports.billingService=J;exports.catchUniversal=we;exports.clickOutside=Se;exports.clientService=dt;exports.communicationService=se;exports.configurationService=_n;exports.constants=qe;exports.dataService=x;exports.debounce=hn;exports.default=Dr;exports.documentsService=bn;exports.equipmentService=Pn;exports.fileService=cn;exports.getCellValue=St;exports.getNamesFromListConfig=Ar;exports.groupArrayByField=Fr;exports.historyService=Xt;exports.internationalizationService=tn;exports.invitationService=ln;exports.metadataService=Ve;exports.openService=un;exports.parseError=Ee;exports.prettifyValueByMetadata=en;exports.prettyDate=We;exports.prettyDateWithTime=Nt;exports.prettyMoney=It;exports.processWizardService=he;exports.ruleValidationService=Me;exports.t=H;exports.testTypes=Yt;exports.universalEntityRead=De;exports.universalEntityUpdate=Ft;exports.useCommunication=fn;exports.useCustomerState=Cn;exports.useFormAction=yn;exports.useFormLabel=wn;exports.useFormMetadata=gn;exports.useFormRequest=En;exports.useFormRequestData=vn;exports.useListActiveRow=Ir;exports.useListEntity=Pr;exports.useListSearch=Sn;exports.useListSelect=kn;exports.useLogger=vt;exports.useManagerState=Wt;exports.useSocket=ze;exports.useWizard=In;exports.utils=xr;exports.valuesToUpperCase=$t;exports.viewService=an;
11
11
  //# sourceMappingURL=eservices-core.cjs.js.map