eservices-core 1.3.153 → 1.3.154

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,9 +1,9 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.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}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-primary{color:var(--primary)}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.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-90f57c16]{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}.widget-list-head-cell[data-v-bf495d6a]{padding:0 0 0 10px;display:flex}.widget-list-head-cell[data-v-bf495d6a]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-bf495d6a]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-bf495d6a]{position:absolute;inset-inline-end:22px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-bf495d6a]{transform:rotate(180deg)}.head-cell-resize[data-v-bf495d6a]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-bf495d6a]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-bf495d6a]: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(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  "use strict";/*!
3
- * eservices-core v1.3.153
3
+ * eservices-core v1.3.154
4
4
  * (c) 2024 ESERVICES
5
5
  */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),F=require("jenesius-vue-form"),Qe=require("vue-router"),Lt=require("date-and-time"),Re=require("debug"),me=require("jenesius-vue-modal");const Ze=class A extends Error{constructor(t,n=null){super(),this.message=t,this.details=n,this.id=A.ID++}static ParentFormNotFound(){return new A("Can't found parent form.")}static UndefinedNameOfCompositeFormController(t){return new A("Composite object name is undefined",t)}static EntityWithoutName(t){return new A("'Entity doesn't have a name",t)}static NotResolvedNameEventEmitter(t){return new A(`'${t}' is not a valid Event emitter name`)}static FormIsNotValidated(t){return new A("Form is not validated",t)}static ListWorkerIsRunningOrEnd(t){return new A("List data request is running or already done",t)}static ObjectIdNotNumber(t){return new A(`${t} (id) is not a number`)}static UndefinedErrorId(t,n){return A.ApiNotAvailable()}static ApiError(t){return new A("Request error",t)}static ApiNotAvailable(){return new A(`Sorry, we experience difficulties here.
6
- Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?A.ApiNotAvailable():new A(t||"Authorization Error",n)}static ApiResponseParseFailed(){return A.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new A("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new A(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new A("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new A("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new A(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new A(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,r){return new A(`Array already includes the element with value ${t}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(t){return new A(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new A("The request took too long to complete. Try again later.")}};Ze.ID=0;let Q=Ze;const xt="Please try again later or submit a feedback if problem doesn't go.";function $t(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return xt}})}function j(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw Q.ApiNotAvailable()}).then(n=>$t(n).then(r=>{if(!n.ok)throw r;return r}))}class Pt{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,r)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),t[n]=r,!0)}),window._journal=this}get error(){return{add:(...t)=>{this.errors.push(t)},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")}}new Pt;function Ve(e){return{...e,createdEntities:e.createdEntites}}const et=class de{static async getStartConfig(t,n){return j([de.url,t,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(t,n){return j([de.url,t,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(Ve)}static async runStep(t,n,r,o,s){return j([de.url,t,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:o,values:s})}).then(Ve)}};et.url="/close-api/views/process-wizard";let pe=et;class Dt{static invite(t,n,r){return j("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:r})})}static accept(t,n){return j("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!0})})}static decline(t,n){return j("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class Ft{static getRequiredDocuments(t,n,r){const o=new URLSearchParams({entity:t,primaryKey:n,statusCode:r});return fetch(`/close-api/views/required-documents?${o.toString()}`).then(s=>s.json())}}class K{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${K.url()}/calculator/${t}`)}static calculate(t,n){return j(`/${K.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):Q.ApiNotAvailable()})}static parseMetadataField(t){function n(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return j(`/${K.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return j(`/${K.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}function Bt(e){return e.statusName==="Completed"}function Vt(e){return e.statusName==="FinalStepWithConfirmation"}function Mt(e){return e.statusName==="ValidationError"}function Wt(e,t,n){let r=null;const o=i.reactive({wait:null});let s=[],d=null;const l=i.ref(null);function a(){l.value=s.find(f=>f.name===d)||null}function u(){var f;return d?((f=s.find(m=>m.name===d))==null?void 0:f.fields)||[]:[]}function c(f){if(a(),Mt(f))return void n.onValidation(f.validationResults);if((f.statusName==="FinalStep"||f.statusName==="NextStep")&&(!u().length||Ut(u(),n.presets)))return T(n.presets||{});Bt(f)&&n.onCompleted(f),Vt(f)&&n.onConfirmation(f)}async function p(){try{await y(),await _()}catch(f){const{message:m}=ye(f);ie.add("error",m)}}function y(){return o.wait="Loading process information.",pe.getStartConfig(t,e).then(f=>{s=f.steps.map(m=>({label:m.title,name:m.stepName,number:m.number,fields:m.frontendEntity.objectTypes.reduce((w,R)=>(R.properties.forEach(I=>{w.push({name:I.name,label:I.title,type:I.refEntityName||I.dataType})}),w),[])}))}).then(f=>(o.wait=!1,f))}function h(f){return["FinalStepWithConfirmation","NextStep","Completed","FinalStep"].includes(f.statusName)&&(r=f.token,d=f.nextStepName),f}function v(f){const m=ye(f);ie.add("error",m.message)}function _(){return o.wait="Starting process",pe.startProcess(t,e).then(h).then(c).catch(v).finally(()=>{o.wait=null})}function T(f={}){return!r||!d?Promise.reject("Not step or token."):(o.wait="Waiting for result...",pe.runStep(t,e,d,r,f).then(h).then(c).catch(v).finally(()=>{o.wait=!1}))}return{initialize:p,state:o,currentStepConfig:i.readonly(l),next:T}}function Ut(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(!F.utils.getPropFromObject(t,r.name))return!1}return!0}const jt={class:"widget-table__head"},qt={class:"widget-table__head-label margin_0 text_overflow"},zt=i.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("tr",jt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.config,(r,o)=>(i.openBlock(),i.createElementBlock("th",{class:"widget-table__head-cell",key:o},[i.createElementVNode("p",qt,i.toDisplayString(r.label),1)]))),128))]))}});const G=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Gt=G(zt,[["__scopeId","data-v-25198f4a"]]);function tt(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}function Ht(e){const t=new RegExp(/\$\{([a-zA-Z0-9.]+)}/,"g"),n=[];let r;for(;(r=t.exec(e))!==null;)n.push(r[1]);return n}function Xt(e,t){return Ht(e).forEach(r=>{e=e.replace(new RegExp("\\$\\{"+r+"}","g"),F.utils.getPropFromObject(t,r))}),e}function Ce(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function Ie(e,t){const n=tt(e);if(typeof e.value=="string")return Xt(e.value,t);let r=n?F.utils.getPropFromObject(t,n):null;if(r===void 0&&(r=null),typeof e.value=="function")return e.value(r,t);if(e.value===null)return null;if(e.unitValue&&(r=Ce(e.unitValue)(r)),e.unit&&(r=Ce(e.unit)(r)),e.type)switch(e.type){case"number":{typeof r=="number"&&(r=new Intl.NumberFormat().format(r));break}case"date":{r=Le(typeof r=="string"?r:null);break}case"dateTime":case"dateWithTime":{r=nt(typeof r=="string"?r:null);break}case"money":{r=rt(r);break}}return e.formatter&&(r=Z(e.formatter).exec(r,t)),typeof r=="boolean"&&(r=r?"✓":"—"),r}const S={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",TIME_TO_LIVE_SOCKET_REQUEST:3e4,CORE_DEBUG_LABEL:"eservices-core"};function Ne(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const O={};function Jt(e){for(let t in e)O[t]=e[t]}const Yt={props:{name:String},setup(e,t){let n="unknown";try{n=t.slots.default()[0].children}catch{n=e.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>i.h("i",{class:O.iconHandler?O.iconHandler(n):`icon icon-${n}`})}},re=G(Yt,[["__scopeId","data-v-90f57c16"]]),Kt=Re(Ne("setup-list-row"));function Qt(e,t){const n=e.config.map(r=>Zt(r,e,t));return i.h("tr",{class:"widget-table__row widget-table-row"},n)}function Zt(e,t,n){const r=t.values;let o=Ie(e,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=[],u=[];if(e.hide&&e.hide(r))return[i.h("td")];if(e.type)switch(l(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(i.h(F.FormField,{type:"single-checkbox",modelValue:t.selected})),d(Me.bind(null,n,!0));break}case"select":{u.push(i.h(F.FormField,{type:"single-radio",modelValue:t.selected})),d(Me.bind(null,n,!1));break}}if(e.onClick&&d(e.onClick),e.link)try{const c=e.link(r);if(c){const p=i.h(Qe.RouterLink,{to:c});u.push(p),l("widget-table-cell_link")}}catch(c){Kt("Can't add router link",c)}if(e.href&&(u.push(i.h("a",{href:e.href(r),target:"_blank"})),l("widget-table-cell_link")),(typeof o=="string"||typeof o=="number")&&u.push(i.h("p",{class:"widget-list-cell-text"},o)),e.icon&&(typeof e.icon=="string"&&u.push(i.h(re,{name:e.icon})),typeof e.icon=="function")){const c=e.icon(r);c!==null&&u.push(i.h(re,{name:c}))}return e.class&&(typeof e.class=="function"?l(e.class(r)):l(e.class)),O.listCellHandler&&O.listCellHandler(e,r,{cellNodeChildren:u,addClass:l,addHandleClick:d,context:n}),a.push(i.h("td",s,u)),a}function Me(e,t){e.emit("select",t)}function Oe(e,t){return()=>{try{return Qt(e,t)}catch(n){return console.warn(n),null}}}const en={props:{values:Object,config:Object,selected:Boolean},setup:Oe},tn=["colspan"],We=i.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=i.ref();return i.onMounted(()=>{setTimeout(()=>{n.value&&n.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,o)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:n},[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=>t("close")),onSave:o[1]||(o[1]=s=>t("save",s))}),null,16,["values","new"]))],8,tn)],512))}}),nn={class:"widget-table"},Ue="update:selectedRows",rn=i.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1}},emits:["update:activeRow","save"],setup(e,{emit:t}){const n=e,r=i.useSlots(),o=i.computed(()=>{var u;return(u=r==null?void 0:r.default)==null?void 0:u.call(r)[0]});function s(u,c=!0){if(!n.selectedRows)return;if(!c)return t(Ue,n.selectedRows.includes(u)?[]:[u]);const p=[...n.selectedRows],y=p.indexOf(u);return y===-1?p.push(u):p.splice(y,1),t(Ue,p)}function d(u){console.log("core: handle activate",u),t("update:activeRow",u)}function l(u){t("save",u),t("update:activeRow",null)}const a=i.computed(()=>n.shortcut?n.config.filter(u=>u.name?!!n.array.find(p=>![null,""].includes(Ie(u,p))):!0):n.config);return(u,c)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("table",nn,[i.createElementVNode("thead",null,[i.createVNode(Gt,{config:a.value},null,8,["config"])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.array,(p,y)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:y},[i.createVNode(en,{config:a.value,values:p,selected:u.selectedRows.includes(p),onSelect:h=>s(p,h),onActivate:h=>d(p),class:i.normalizeClass(u.classCallback?u.classCallback(p):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),o.value&&u.activeRow===p?(i.openBlock(),i.createBlock(We,{key:0,component:o.value,"row-length":u.config.length,values:p,onClose:c[0]||(c[0]=h=>t("update:activeRow",null)),onSave:l,"is-new":!1},null,8,["component","row-length","values"])):i.createCommentVNode("",!0)],64))),128)),u.activeRow===i.unref(S).LIST_ACTIVE_NEW?(i.openBlock(),i.createBlock(We,{key:0,component:o.value,"row-length":a.value.length,onClose:c[1]||(c[1]=p=>t("update:activeRow",null)),onSave:l,"is-new":!0},null,8,["component","row-length"])):i.createCommentVNode("",!0)])])]))}}),on=i.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:"widget-spinner",style:i.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}});const be=G(on,[["__scopeId","data-v-0ef9ae88"]]),an={class:"widget-button"},sn=i.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("button",an,[t.wait?(i.openBlock(),i.createBlock(be,{key:0,class:"widget-button-spinner"})):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0)]))}});const ln=G(sn,[["__scopeId","data-v-450dc564"]]),cn={class:"widget-multi-button-wrap position_relative cursor_pointer"},un={class:"widget-multi-button-body grid"},fn=["onClick"],dn={class:"widget-multi-button-side-wrap"},pn=i.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){const t=e;i.useCssVars(d=>({"7025434e":r.value}));const n=i.reactive({active:!1,wait:!1}),r=i.computed(()=>t.array.length+(t.label?1:0));function o(d){if(!(typeof d!="function"||n.wait))return n.wait=!0,Promise.resolve().then(d).finally(()=>{n.wait=!1})}function s(d=!n.active){n.active=d}return(d,l)=>(i.openBlock(),i.createElementBlock("div",cn,[i.createElementVNode("div",{class:i.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[i.createElementVNode("div",un,[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,u)=>(i.openBlock(),i.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:c=>{o(a.callback),s(!1)}},i.toDisplayString(a.label),9,fn))),128))]),i.createElementVNode("div",dn,[i.createElementVNode("div",{class:i.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:l[1]||(l[1]=a=>s())},[n.wait?(i.openBlock(),i.createBlock(i.unref(be),{key:0,class:"widget-multi-button-side-spinner"})):d.array.length>1?(i.openBlock(),i.createBlock(i.unref(re),{key:1,class:"widget-multi-button-side-icon"},{default:i.withCtx(()=>[i.createTextVNode("angle-small-down")]),_:1})):i.createCommentVNode("",!0)],2)])],2)]))}});const gn=G(pn,[["__scopeId","data-v-a8d711d1"]]),hn={class:"widget-loader flex flex-align_center gap_10 padding_15"},mn={class:"text_md"},yn=i.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",hn,[i.createVNode(be,{color:"var(--primary)",class:"padding_10"}),i.createElementVNode("span",mn,i.toDisplayString(t.label),1)]))}}),vn=["alt","src"],wn=i.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=i.ref();return i.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(r,o)=>(i.openBlock(),i.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:n,src:r.src||r.$props.default},null,8,vn))}}),En={props:{config:Array,values:Object,selected:Boolean},setup:Oe};const bn=G(En,[["__scopeId","data-v-344a8cc1"]]),_n=e=>(i.pushScopeId("data-v-bf495d6a"),e=e(),i.popScopeId(),e),Tn={class:"widget-list-head-cell"},An=_n(()=>i.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Cn=i.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:t}){const n=e;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(r,o)=>(i.openBlock(),i.createElementBlock("th",null,[i.createElementVNode("div",Tn,[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(F.FormField),{key:0,type:"single-checkbox",onClick:o[0]||(o[0]=i.withModifiers(s=>t("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=>t("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(re),{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),An])]))}});const kn=G(Cn,[["__scopeId","data-v-bf495d6a"]]),Sn=i.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,r=i.ref(),o=i.ref();i.onMounted(()=>{function a(h,v){let _=-1;do _++,v-=h[_];while(v>0&&_<h.length);return _}function u(h,v){let _=0;for(;v>0&&v>h[_]&&_<h.length;)v-=h[_],_++;return console.log(v,_),_>0?_:0}function c(h){try{o.value.style.insetInlineStart=h+"px"}catch(v){console.log(v)}}function p(h){try{o.value.style.width=h+"px",o.value.style.minWidth=h+"px",o.value.style.maxWidth=h+"px"}catch(v){console.log(v)}}function y(h){return h===null?!1:h.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(v){var Be;function _(P){return P.screenX+m-I}const T=r.value,f=[...T.children].filter(P=>P.localName==="th"),m=((Be=T.offsetParent)==null?void 0:Be.scrollLeft)||0,w=f.map(P=>P.clientWidth),R=y(v.target),I=T.getBoundingClientRect().left,M=_(v),g=a(w,M),E=w.slice(0,g).reduce((P,W)=>P+W,0),b=M-E,k=T.offsetWidth,N=f[g].clientWidth;if(n.config[g].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",v.screenX),console.log("Widths",w),console.log("max width",k),console.log("Start Position",M),console.log("Position From",g),console.log("Start Position",g),console.log("Global offset (Отступ самой таблицы от края экрана)",I),console.log("Del",b),console.groupEnd(),o.value.innerText=f[g].textContent||"",o.value.style.display="grid",o.value.style.width=N+"px",o.value.style.cursor="grabbing",c(E),p(N),document.addEventListener("pointermove",Fe,{passive:!0}),document.addEventListener("pointerup",ae);function ae(P){if(console.group("END"),document.removeEventListener("pointermove",Fe),document.removeEventListener("pointerup",ae),R&&(n.config[g].width=o.value.style.width,n.config[g].minWidth=o.value.style.width,n.config[g].maxWidth=o.value.style.width,s(n.config)),!R){const W=P.screenX+m-I;console.log("ENP Position",W);const se=u(w,W);if(console.log(g,"->",se),se!==g){const te=n.config[g],Ae=n.config;Ae.splice(g,1),Ae.splice(se,0,te),s(Ae)}else{const te=n.config[g].name;d(te)}}o.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function Fe(P){if(R){const te=_(P)-M+N;p(te);return}let W=P.screenX+m-I-b;W<0&&(W=0),W+N>k&&(W=k-N),c(W)}})});function s(a){t("update:config",a)}function d(a){if(!a)return;if(Array.isArray(a)){if(a.length<1)return;a=a[0]}if(n.order.length===0||n.order[0]!==a)return void l([a]);const u=n.order.length===1||n.order[1]==="asc"?"asc":"desc";l([a,u==="asc"?"desc":"asc"])}function l(a){t("update:order",a)}return(a,u)=>(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,p)=>(i.openBlock(),i.createBlock(kn,i.mergeProps({key:c},c,{onOrder:y=>d(c.name),onSelect:u[0]||(u[0]=y=>t("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 Rn=G(Sn,[["__scopeId","data-v-ccffc6bd"]]),In={class:"widget-list"},Nn={class:"widget-list-body position_relative"},On=50,Ln=i.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:t}){const n=e;function r(l,a=!0){if(n.selectedRows)if(!a)s(n.selectedRows.includes(l)?[]:[l]);else{const u=[...n.selectedRows],c=u.indexOf(l);c===-1?u.push(l):u==null||u.splice(c,1),s(u)}}function o(){var l;if(((l=n.selectedRows)==null?void 0:l.length)!==n.array.length)return s([...n.array]);s([])}function s(l){t("update:selectedRows",l)}function d(l){if(!l)return;const a=l.target;a.scrollTop+a.clientHeight+On>a.scrollHeight&&t("scrollEnd")}return(l,a)=>(i.openBlock(),i.createElementBlock("div",{class:"es-list-container",onScrollPassive:d},[i.createElementVNode("table",In,[i.createElementVNode("thead",null,[i.createVNode(Rn,{onSelect:a[0]||(a[0]=u=>o()),"onUpdate:order":a[1]||(a[1]=u=>t("update:order",u)),"onUpdate:config":a[2]||(a[2]=u=>t("update:config",u)),config:l.config,order:l.order},null,8,["config","order"])]),i.createElementVNode("tbody",Nn,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.array,(u,c)=>{var p;return i.openBlock(),i.createBlock(bn,{key:c,class:"widget-list-row",values:u,config:l.config,selected:(p=l.selectedRows)==null?void 0:p.includes(u),onSelect:y=>r(u,y)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),xn=i.defineComponent({__name:"widget-field",props:{name:{},type:{}},setup(e){const t=e,n=Ct(),r=kt(),o=i.computed(()=>{var y,h;if(!a.value)return{};const c=a.value,p=u(c);return{type:p,suffix:p==="number"?c.valueUnit:void 0,required:d.includes(p||"")?!1:c.required,disabled:!((y=l.value)!=null&&y.canSet),label:c.displayName,...((h=O.fieldParamsHandler)==null?void 0:h.call(O,c,p))||{}}}),s=["MultiText","MultiWideText"],d=["switch","single-checkbox","single-radio"],l=i.computed(()=>{var c;return(c=r==null?void 0:r.value)==null?void 0:c.fields[t.name]}),a=i.computed(()=>{if(!n.value)return null;const c=n.value.fieldsByName[t.name];return c?c.releatedLocalField?n.value.fieldsByName[c.releatedLocalField]:c:null});function u(c){return typeof t.type=="string"&&t.type.length!==0?t.type:c.type==="Reference"||c.type==="Owned"?c.referencedEntity:c.dataType==="Boolean"?"single-checkbox":c.dataType==="DateTime"?"date":c.dataType==="Integer"||c.dataType==="Decimal"?"number":c.dataType==="List"?c.aggregatedEntity:s.includes(c.presentationType)?"textarea":c.presentationType==="PhoneNumber"?"tel":"text"}return(c,p)=>(i.openBlock(),i.createBlock(i.unref(F.FormField),i.mergeProps({...c.$attrs,...o.value},{name:c.name}),null,16,["name"]))}});function nt(e){return Le(e,"YYYY/MM/DD HH:mm:ss")}function Le(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return Lt.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function $n(e){function t(...r){return n.wait?Promise.reject("The process has already started."):(n.wait=!0,Promise.resolve().then(()=>e(...r)).finally(()=>{n.wait=!1}))}const n=i.reactive({wait:!1,call:t});return n}function ye(e){return typeof e=="string"?le(e):Pn(e)?le(e.message,e.children||e.details||[]):Dn(e)?le(e.title,[e.detail||""]):le(S.DEFAULT_ERROR_MESSAGE)}function Pn(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function Dn(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function le(e,t=[]){return{message:e,children:t}}function V(e="error"){return function(t){const{message:n,children:r}=ye(t);ie.add(e,n,{children:r})}}function ve(e,t={}){return L().emit("entity:read",{...t,entity:e})}function xe(e,t){return L().emit("entity:update",{...t,entity:e})}function Fn(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function rt(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let r=String(e).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(t,"0"),r[1].length>t&&(r[1]=r[1].substring(0,t)),r.join(".")}function Bn(e,t){const n=new Map;return e.forEach(r=>{var s;const o=t(r);n.has(o)||n.set(o,[]),(s=n.get(o))==null||s.push(r)}),n}function Vn(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function Mn(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return S.DEFAULT_ERROR_MESSAGE}})}function $(e,t={}){return B.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=B.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(n=>Mn(n).then(r=>{if(!n.ok)throw r;return r}))}function Wn(e,t=1e3){let n=0;return(...r)=>{clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Un(e,t){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...r)}}const jn=Re(Ne("pretty-value-field-by-entity"));function qn(e,t,n){try{const r=Ee.get(e);if(!r)throw new Error("For entity metadata is not loaded");const o=r.fieldsByName[t];if(!o)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return o.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(r){return jn('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',r,e,t,n),n}}const zn=1,Gn=5e3,Hn="static-folder",it="request-error",Xn="Distinguisher",H=Re(Ne("use-socket"));function L(){return Yn}function Jn(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Yn=function(){let e=1,t,n;const r=new Set;let o=0;const s=new Set;function d(){if(t)o&&(clearTimeout(o),o=0);else return;o=setTimeout(()=>{t.close()},Gn*2);const f=new Uint8Array(1);f[0]=zn,t.send(f)}setInterval(()=>{Array.from(r).forEach(f=>{T(f)&&(H("Handler for event %s requestId %d was expired",f.event,f.requestId),f.requestId?a({requestId:f.requestId,event:it,data:{message:Q.RequestTookToLong().message}}):r.delete(f))})},1e3),setInterval(()=>{(!t||t.readyState===3)&&u()},S.DELAY_SOCKET_RECONNECT);function l(){return{safeQueue:s,requestId:e,handlers:r,socketInstance:t}}function a(f){const m=[...r.values()];H("Handlers array length is %d. Response event: %s. Request id: %d",r.size,f.event,f.requestId),m.forEach(w=>{const R=f.requestId;(w.requestId&&w.requestId===R||!w.requestId&&w.event===f.event)&&(H("Find appropriated handler: %d, event: %s",e,w.event),w.callback(f.data,f),w.once&&(r.delete(w),H("Handler was removed by *once* params was passed. %o",w)))})}function u(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),t=new WebSocket(n),t.onclose=function(f){H("Connection to server was stopped: %d %s",f.code,f.reason),Array.from(r).forEach(m=>{m.guaranteedAnswer&&m.serializeString&&s.add(m.serializeString)})},t.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...s.values()].forEach(f=>{c(f),s.delete(f)})},t.onerror=function(f){console.warn(f)},t.onmessage=f=>{var m;try{if(Jn(f.data)){d();return}const w=JSON.parse(f.data);if(!ot(w)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(w);return}(m=w==null?void 0:w.data)!=null&&m.refresh&&location.reload(),a(w)}catch(w){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(w)}}}function c(f){t.send(f)}function p(f,m){_({event:f,callback:m})}function y(f,m){_({event:f,callback:m,once:!0})}function h(){return t&&(t==null?void 0:t.readyState)===1}function v(f,m,w){const R=++e,I=JSON.stringify({requestId:R,event:f,data:m,contextId:B.contextId,url:O.socketURLHandler?O.socketURLHandler():window.location.href});return h()?c(I):(s.add(I),H("Socket is not connected. Message was send to save-queue")),new Promise((M,g)=>{_({event:f,requestId:R,once:!0,guaranteedAnswer:!0,serializeString:I,callback:(E,b)=>{if(H("Promise was resolve with next data:",E),Kn(b))return void g(E);w&&w(E,b),M(E)},timeToLive:S.TIME_TO_LIVE_SOCKET_REQUEST})})}function _(f){const m={timeToLive:0,...f,created:new Date().getTime()};r.add(m)}function T(f){return f.timeToLive===0||typeof f.timeToLive!="number"?!1:new Date().getTime()-f.created>f.timeToLive}return{get socket(){return t},on:p,once:y,emit:v,initialization(f){n=f},getDevInfo:l}}(),Kn=e=>!!ot(e)&&e.event===it,ot=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function Qn(e,t){return L().emit("list-setting:read",{entity:e,mark:t})}function Zn(e,t){return L().emit("metadata-field:treat",{entity:e,fieldName:t})}function at(e,t){return L().emit("entity:create",{...t,entity:e})}function st(e,t){return L().emit("entity:delete",{...t,entity:e})}function er(e,t){return L().emit("usage-context:read",{...t,entity:e})}function lt(e={}){return L().emit("tool:read",e)}function tr(){return L().emit("metadata-list:read",{})}function nr(e,t={},n={}){const r=i.inject(S.PROVIDE_NAME_ACTIONS,null),o=typeof e=="string"?e:t,s=typeof t=="string"?n:t;return i.computed(()=>{var a;const l=((typeof e=="string"?(a=r==null?void 0:r.actions)==null?void 0:a.value:i.unref(e))||[]).find(u=>u.name===o);return l?{...l,...s}:null})}function rr(e){return L().emit("history:read",e)}function ir(e,t){return L().emit("entity:count",{...t,entity:e})}function or(e){return`/${Hn}/${e}`}function Z(e){return{exec(t,n){switch(e.name){case"replace-boolean":return Z.replaceBoolean(t,e.values);case"replace-record-operation":return Z.replaceRecordOperation(t)}}}}Z.replaceBoolean=ar;Z.replaceRecordOperation=sr;function ar(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function sr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function lr(e={}){return L().emit("tool:execute",e)}function ct(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=fr),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=pr),e.handleCloseForm===void 0&&(e.handleCloseForm=gr),e.handleValidationResult===void 0&&(e.handleValidationResult=dr),{...t,label:t.title,callback(){var o;const n=typeof e.values=="function"?e.values(t,e):e.values,r=()=>lr({name:t.name,values:n,usageContext:t.usageContext}).then(async s=>{var d,l;if(!cr(s))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const a of e.handlers)await a(t,s,e);if(!s.success)throw e.handleValidationResult&&s.validationEffect&&((l=(d=s.validationEffect)==null?void 0:d.results)!=null&&l.length)&&e.handleValidationResult(t,s.validationEffect,e),new Error(s.message);return s.message&&ie.add("info",s.message),Array.isArray(s.affectedEntities)&&e.handleAffectedEntity&&s.affectedEntities.forEach(a=>{var u;return(u=e.handleAffectedEntity)==null?void 0:u.call(e,t,a,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),s}).catch(V("error"));return(o=e.overrides)!=null&&o[t.name]?e.overrides[t.name](t,e):t.requireSave&&e.form&&e.form.changed?e.form.save().then(r):!t.confirmation||!e.handleConfirmation?r():e.handleConfirmation(t,r)}}}function cr(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function ur(e){const t="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?t:typeof e=="string"?e:t}async function fr(e,t){const n=ur(e.confirmation);if(!me.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await me.promptModal(S.MODAL_CONFIRM,{message:n}))return t()}function dr(e,t){const n=S.MODAL_VALIDATION_EFFECT;if(!me.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{me.pushModal(n,t)})}function pr(e,t,n){var d;const{router:r,form:o}=n,s=(d=t.primaryKey)==null?void 0:d.Id;if(r&&t&&t.name===e.redirectEntity)return r.push({name:t.name,params:{id:s}});o&&t.name===o.name&&t.updated&&s===o.id&&o.read()}function gr(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}let X={};function ee(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=F.utils.getPropFromObject((this==null?void 0:this.vocabulary)||X,e);if(typeof n=="string")return je(n,t);const r=F.utils.getPropFromObject(X==null?void 0:X.root,e);return typeof r=="string"?je(r,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function je(e,t){return t.forEach((n,r)=>{e=e.replaceAll(new RegExp(`\\{${r}}`,"g"),n)}),e}ee.setGlobalVocabulary=function(e){X=e};ee.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),ee.bind({vocabulary:F.utils.getPropFromObject(X,t.toLowerCase())})};ee.setVocabulary=function(e){return typeof e=="string"&&(e=F.utils.getPropFromObject(X,e)),ee.bind({vocabulary:e})};function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ke={exports:{}},C={},Se={exports:{}},J={};function ut(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function mr(e,t,n){}function yr(e,t,n){}var vr=/javascript\s*\:/img;function wr(e,t){return vr.test(t)?"":t}J.whiteList=ut();J.getDefaultWhiteList=ut;J.onAttr=mr;J.onIgnoreAttr=yr;J.safeAttrValue=wr;var Er={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,o;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},ne=Er;function br(e,t){e=ne.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,r=!1,o=0,s=0,d="";function l(){if(!r){var c=ne.trim(e.slice(o,s)),p=c.indexOf(":");if(p!==-1){var y=ne.trim(c.slice(0,p)),h=ne.trim(c.slice(p+1));if(y){var v=t(o,d.length,y,h,c);v&&(d+=v+"; ")}}}o=s+1}for(;s<n;s++){var a=e[s];if(a==="/"&&e[s+1]==="*"){var u=e.indexOf("*/",s+2);if(u===-1)break;s=u+1,o=s+1,r=!1}else a==="("?r=!0:a===")"?r=!1:a===";"?r||l():a===`
6
+ Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?A.ApiNotAvailable():new A(t||"Authorization Error",n)}static ApiResponseParseFailed(){return A.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new A("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new A(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new A("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new A("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new A(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new A(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,r){return new A(`Array already includes the element with value ${t}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(t){return new A(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new A("The request took too long to complete. Try again later.")}};Ze.ID=0;let Q=Ze;const xt="Please try again later or submit a feedback if problem doesn't go.";function $t(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return xt}})}function j(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw Q.ApiNotAvailable()}).then(n=>$t(n).then(r=>{if(!n.ok)throw r;return r}))}class Pt{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,r)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),t[n]=r,!0)}),window._journal=this}get error(){return{add:(...t)=>{this.errors.push(t)},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")}}new Pt;function Ve(e){return{...e,createdEntities:e.createdEntites}}const et=class de{static async getStartConfig(t,n){return j([de.url,t,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(t,n){return j([de.url,t,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(Ve)}static async runStep(t,n,r,o,s){return j([de.url,t,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:o,values:s})}).then(Ve)}};et.url="/close-api/views/process-wizard";let pe=et;class Dt{static invite(t,n,r){return j("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:r})})}static accept(t,n){return j("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!0})})}static decline(t,n){return j("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class Ft{static getRequiredDocuments(t,n,r){const o=new URLSearchParams({entity:t,primaryKey:n,statusCode:r});return fetch(`/close-api/views/required-documents?${o.toString()}`).then(s=>s.json())}}class K{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${K.url()}/calculator/${t}`)}static calculate(t,n){return j(`/${K.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):Q.ApiNotAvailable()})}static parseMetadataField(t){function n(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return j(`/${K.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return j(`/${K.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}function Bt(e){return e.statusName==="Completed"}function Vt(e){return e.statusName==="FinalStepWithConfirmation"}function Mt(e){return e.statusName==="ValidationError"}function Wt(e,t,n){let r=null;const o=i.reactive({wait:null});let s=[],d=null;const l=i.ref(null);function a(){l.value=s.find(f=>f.name===d)||null}function u(){var f;return d?((f=s.find(m=>m.name===d))==null?void 0:f.fields)||[]:[]}function c(f){if(a(),Mt(f))return void n.onValidation(f.validationResults);if((f.statusName==="FinalStep"||f.statusName==="NextStep")&&(!u().length||Ut(u(),n.presets)))return T(n.presets||{});Bt(f)&&n.onCompleted(f),Vt(f)&&n.onConfirmation(f)}async function p(){try{await y(),await _()}catch(f){const{message:m}=ye(f);ie.add("error",m)}}function y(){return o.wait="Loading process information.",pe.getStartConfig(t,e).then(f=>{s=f.steps.map(m=>({label:m.title,name:m.stepName,number:m.number,fields:m.frontendEntity.objectTypes.reduce((w,R)=>(R.properties.forEach(I=>{w.push({name:I.name,label:I.title,type:I.refEntityName||I.dataType})}),w),[])}))}).then(f=>(o.wait=!1,f))}function h(f){return["FinalStepWithConfirmation","NextStep","Completed","FinalStep"].includes(f.statusName)&&(r=f.token,d=f.nextStepName),f}function v(f){const m=ye(f);ie.add("error",m.message)}function _(){return o.wait="Starting process",pe.startProcess(t,e).then(h).then(c).catch(v).finally(()=>{o.wait=null})}function T(f={}){return!r||!d?Promise.reject("Not step or token."):(o.wait="Waiting for result...",pe.runStep(t,e,d,r,f).then(h).then(c).catch(v).finally(()=>{o.wait=!1}))}return{initialize:p,state:o,currentStepConfig:i.readonly(l),next:T}}function Ut(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(!F.utils.getPropFromObject(t,r.name))return!1}return!0}const jt={class:"widget-table__head"},qt={class:"widget-table__head-label margin_0 text_overflow"},zt=i.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("tr",jt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.config,(r,o)=>(i.openBlock(),i.createElementBlock("th",{class:"widget-table__head-cell",key:o},[i.createElementVNode("p",qt,i.toDisplayString(r.label),1)]))),128))]))}});const G=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Gt=G(zt,[["__scopeId","data-v-25198f4a"]]);function tt(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}function Ht(e){const t=new RegExp(/\$\{([a-zA-Z0-9.]+)}/,"g"),n=[];let r;for(;(r=t.exec(e))!==null;)n.push(r[1]);return n}function Xt(e,t){return Ht(e).forEach(r=>{e=e.replace(new RegExp("\\$\\{"+r+"}","g"),F.utils.getPropFromObject(t,r))}),e}function Ce(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function Ie(e,t){const n=tt(e);if(typeof e.value=="string")return Xt(e.value,t);let r=n?F.utils.getPropFromObject(t,n):null;if(r===void 0&&(r=null),typeof e.value=="function")return e.value(r,t);if(e.value===null)return null;if(e.unitValue&&(r=Ce(e.unitValue)(r)),e.unit&&(r=Ce(e.unit)(r)),e.type)switch(e.type){case"number":{typeof r=="number"&&(r=new Intl.NumberFormat().format(r));break}case"date":{r=Le(typeof r=="string"?r:null);break}case"dateTime":case"dateWithTime":{r=nt(typeof r=="string"?r:null);break}case"money":{r=rt(r);break}}return e.formatter&&(r=Z(e.formatter).exec(r,t)),typeof r=="boolean"&&(r=r?"✓":"—"),r}const S={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",TIME_TO_LIVE_SOCKET_REQUEST:3e4,CORE_DEBUG_LABEL:"eservices-core"};function Ne(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const O={};function Jt(e){for(let t in e)O[t]=e[t]}const Yt={props:{name:String},setup(e,t){let n="unknown";try{n=t.slots.default()[0].children}catch{n=e.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>i.h("i",{class:O.iconHandler?O.iconHandler(n):`icon icon-${n}`})}},re=G(Yt,[["__scopeId","data-v-90f57c16"]]),Kt=Re(Ne("setup-list-row"));function Qt(e,t){const n=e.config.map(r=>Zt(r,e,t));return i.h("tr",{class:"widget-table__row widget-table-row"},n)}function Zt(e,t,n){const r=t.values;let o=Ie(e,r);const s={onClick:[],class:["widget-table__cell widget-table-cell"]};function d(c){s.onClick.push(()=>c(r,e,n))}function l(c){Array.isArray(c)?s.class.push(...c):s.class.push(c)}const a=[],u=[];if(e.hide&&e.hide(r))return[i.h("td")];if(e.type)switch(l(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(i.h(F.FormField,{type:"single-checkbox",modelValue:t.selected})),d(Me.bind(null,n,!0));break}case"select":{u.push(i.h(F.FormField,{type:"single-radio",modelValue:t.selected})),d(Me.bind(null,n,!1));break}}if(e.onClick&&d(e.onClick),e.link)try{const c=e.link(r);if(c){const p=i.h(Qe.RouterLink,{to:c});u.push(p),l("widget-table-cell_link")}}catch(c){Kt("Can't add router link",c)}if(e.href&&(u.push(i.h("a",{href:e.href(r),target:"_blank"})),l("widget-table-cell_link")),(typeof o=="string"||typeof o=="number")&&u.push(i.h("p",{class:"widget-list-cell-text"},o)),e.icon&&(typeof e.icon=="string"&&u.push(i.h(re,{name:e.icon})),typeof e.icon=="function")){const c=e.icon(r);c!==null&&u.push(i.h(re,{name:c}))}return e.class&&(typeof e.class=="function"?l(e.class(r)):l(e.class)),O.listCellHandler&&O.listCellHandler(e,r,{cellNodeChildren:u,addClass:l,addHandleClick:d,context:n}),a.push(i.h("td",s,u)),a}function Me(e,t){e.emit("select",t)}function Oe(e,t){return()=>{try{return Qt(e,t)}catch(n){return console.warn(n),null}}}const en={props:{values:Object,config:Object,selected:Boolean},setup:Oe},tn=["colspan"],We=i.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=i.ref();return i.onMounted(()=>{setTimeout(()=>{n.value&&n.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,o)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:n},[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=>t("close")),onSave:o[1]||(o[1]=s=>t("save",s))}),null,16,["values","new"]))],8,tn)],512))}}),nn={class:"widget-table"},Ue="update:selectedRows",rn=i.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1}},emits:["update:activeRow","save"],setup(e,{emit:t}){const n=e,r=i.useSlots(),o=i.computed(()=>{var u;return(u=r==null?void 0:r.default)==null?void 0:u.call(r)[0]});function s(u,c=!0){if(!n.selectedRows)return;if(!c)return t(Ue,n.selectedRows.includes(u)?[]:[u]);const p=[...n.selectedRows],y=p.indexOf(u);return y===-1?p.push(u):p.splice(y,1),t(Ue,p)}function d(u){console.log("core: handle activate",u),t("update:activeRow",u)}function l(u){t("save",u),t("update:activeRow",null)}const a=i.computed(()=>n.shortcut?n.config.filter(u=>u.name?!!n.array.find(p=>![null,""].includes(Ie(u,p))):!0):n.config);return(u,c)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("table",nn,[i.createElementVNode("thead",null,[i.createVNode(Gt,{config:a.value},null,8,["config"])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.array,(p,y)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:y},[i.createVNode(en,{config:a.value,values:p,selected:u.selectedRows.includes(p),onSelect:h=>s(p,h),onActivate:h=>d(p),class:i.normalizeClass(u.classCallback?u.classCallback(p):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),o.value&&u.activeRow===p?(i.openBlock(),i.createBlock(We,{key:0,component:o.value,"row-length":u.config.length,values:p,onClose:c[0]||(c[0]=h=>t("update:activeRow",null)),onSave:l,"is-new":!1},null,8,["component","row-length","values"])):i.createCommentVNode("",!0)],64))),128)),u.activeRow===i.unref(S).LIST_ACTIVE_NEW?(i.openBlock(),i.createBlock(We,{key:0,component:o.value,"row-length":a.value.length,onClose:c[1]||(c[1]=p=>t("update:activeRow",null)),onSave:l,"is-new":!0},null,8,["component","row-length"])):i.createCommentVNode("",!0)])])]))}}),on=i.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:"widget-spinner",style:i.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}});const be=G(on,[["__scopeId","data-v-0ef9ae88"]]),an={class:"widget-button"},sn=i.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("button",an,[t.wait?(i.openBlock(),i.createBlock(be,{key:0,class:"widget-button-spinner"})):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0)]))}});const ln=G(sn,[["__scopeId","data-v-450dc564"]]),cn={class:"widget-multi-button-wrap position_relative cursor_pointer"},un={class:"widget-multi-button-body grid"},fn=["onClick"],dn={class:"widget-multi-button-side-wrap"},pn=i.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){const t=e;i.useCssVars(d=>({"7025434e":r.value}));const n=i.reactive({active:!1,wait:!1}),r=i.computed(()=>t.array.length+(t.label?1:0));function o(d){if(!(typeof d!="function"||n.wait))return n.wait=!0,Promise.resolve().then(d).finally(()=>{n.wait=!1})}function s(d=!n.active){n.active=d}return(d,l)=>(i.openBlock(),i.createElementBlock("div",cn,[i.createElementVNode("div",{class:i.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[i.createElementVNode("div",un,[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,u)=>(i.openBlock(),i.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:c=>{o(a.callback),s(!1)}},i.toDisplayString(a.label),9,fn))),128))]),i.createElementVNode("div",dn,[i.createElementVNode("div",{class:i.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:l[1]||(l[1]=a=>s())},[n.wait?(i.openBlock(),i.createBlock(i.unref(be),{key:0,class:"widget-multi-button-side-spinner"})):d.array.length>1?(i.openBlock(),i.createBlock(i.unref(re),{key:1,class:"widget-multi-button-side-icon"},{default:i.withCtx(()=>[i.createTextVNode("angle-small-down")]),_:1})):i.createCommentVNode("",!0)],2)])],2)]))}});const gn=G(pn,[["__scopeId","data-v-a8d711d1"]]),hn={class:"widget-loader flex flex-align_center gap_10 padding_15"},mn={class:"text_md"},yn=i.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",hn,[i.createVNode(be,{color:"var(--primary)",class:"padding_10"}),i.createElementVNode("span",mn,i.toDisplayString(t.label),1)]))}}),vn=["alt","src"],wn=i.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=i.ref();return i.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(r,o)=>(i.openBlock(),i.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:n,src:r.src||r.$props.default},null,8,vn))}}),En={props:{config:Array,values:Object,selected:Boolean},setup:Oe};const bn=G(En,[["__scopeId","data-v-344a8cc1"]]),_n=e=>(i.pushScopeId("data-v-bf495d6a"),e=e(),i.popScopeId(),e),Tn={class:"widget-list-head-cell"},An=_n(()=>i.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Cn=i.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:t}){const n=e;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(r,o)=>(i.openBlock(),i.createElementBlock("th",null,[i.createElementVNode("div",Tn,[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(F.FormField),{key:0,type:"single-checkbox",onClick:o[0]||(o[0]=i.withModifiers(s=>t("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=>t("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(re),{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),An])]))}});const kn=G(Cn,[["__scopeId","data-v-bf495d6a"]]),Sn=i.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,r=i.ref(),o=i.ref();i.onMounted(()=>{function a(h,v){let _=-1;do _++,v-=h[_];while(v>0&&_<h.length);return _}function u(h,v){let _=0;for(;v>0&&v>h[_]&&_<h.length;)v-=h[_],_++;return console.log(v,_),_>0?_:0}function c(h){try{o.value.style.insetInlineStart=h+"px"}catch(v){console.log(v)}}function p(h){try{o.value.style.width=h+"px",o.value.style.minWidth=h+"px",o.value.style.maxWidth=h+"px"}catch(v){console.log(v)}}function y(h){return h===null?!1:h.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(v){var Be;function _(P){return P.screenX+m-I}const T=r.value,f=[...T.children].filter(P=>P.localName==="th"),m=((Be=T.offsetParent)==null?void 0:Be.scrollLeft)||0,w=f.map(P=>P.clientWidth),R=y(v.target),I=T.getBoundingClientRect().left,M=_(v),g=a(w,M),E=w.slice(0,g).reduce((P,W)=>P+W,0),b=M-E,k=T.offsetWidth,N=f[g].clientWidth;if(n.config[g].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",v.screenX),console.log("Widths",w),console.log("max width",k),console.log("Start Position",M),console.log("Position From",g),console.log("Start Position",g),console.log("Global offset (Отступ самой таблицы от края экрана)",I),console.log("Del",b),console.groupEnd(),o.value.innerText=f[g].textContent||"",o.value.style.display="grid",o.value.style.width=N+"px",o.value.style.cursor="grabbing",c(E),p(N),document.addEventListener("pointermove",Fe,{passive:!0}),document.addEventListener("pointerup",ae);function ae(P){if(console.group("END"),document.removeEventListener("pointermove",Fe),document.removeEventListener("pointerup",ae),R&&(n.config[g].width=o.value.style.width,n.config[g].minWidth=o.value.style.width,n.config[g].maxWidth=o.value.style.width,s(n.config)),!R){const W=P.screenX+m-I;console.log("ENP Position",W);const se=u(w,W);if(console.log(g,"->",se),se!==g){const te=n.config[g],Ae=n.config;Ae.splice(g,1),Ae.splice(se,0,te),s(Ae)}else{const te=n.config[g].name;d(te)}}o.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function Fe(P){if(R){const te=_(P)-M+N;p(te);return}let W=P.screenX+m-I-b;W<0&&(W=0),W+N>k&&(W=k-N),c(W)}})});function s(a){t("update:config",a)}function d(a){if(!a)return;if(Array.isArray(a)){if(a.length<1)return;a=a[0]}if(n.order.length===0||n.order[0]!==a)return void l([a]);const u=n.order.length===1||n.order[1]==="asc"?"asc":"desc";l([a,u==="asc"?"desc":"asc"])}function l(a){t("update:order",a)}return(a,u)=>(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,p)=>(i.openBlock(),i.createBlock(kn,i.mergeProps({key:c},c,{onOrder:y=>d(c.name),onSelect:u[0]||(u[0]=y=>t("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 Rn=G(Sn,[["__scopeId","data-v-ccffc6bd"]]),In={class:"widget-list"},Nn={class:"widget-list-body position_relative"},On=50,Ln=i.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:t}){const n=e;function r(l,a=!0){if(n.selectedRows)if(!a)s(n.selectedRows.includes(l)?[]:[l]);else{const u=[...n.selectedRows],c=u.indexOf(l);c===-1?u.push(l):u==null||u.splice(c,1),s(u)}}function o(){var l;if(((l=n.selectedRows)==null?void 0:l.length)!==n.array.length)return s([...n.array]);s([])}function s(l){t("update:selectedRows",l)}function d(l){if(!l)return;const a=l.target;a.scrollTop+a.clientHeight+On>a.scrollHeight&&t("scrollEnd")}return(l,a)=>(i.openBlock(),i.createElementBlock("div",{class:"es-list-container",onScrollPassive:d},[i.createElementVNode("table",In,[i.createElementVNode("thead",null,[i.createVNode(Rn,{onSelect:a[0]||(a[0]=u=>o()),"onUpdate:order":a[1]||(a[1]=u=>t("update:order",u)),"onUpdate:config":a[2]||(a[2]=u=>t("update:config",u)),config:l.config,order:l.order},null,8,["config","order"])]),i.createElementVNode("tbody",Nn,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.array,(u,c)=>{var p;return i.openBlock(),i.createBlock(bn,{key:c,class:"widget-list-row",values:u,config:l.config,selected:(p=l.selectedRows)==null?void 0:p.includes(u),onSelect:y=>r(u,y)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),xn=i.defineComponent({__name:"widget-field",props:{name:{},type:{}},setup(e){const t=e,n=Ct(),r=kt(),o=i.computed(()=>{var y,h;if(!a.value)return{};const c=a.value,p=u(c);return{type:p,suffix:p==="number"?c.valueUnit:void 0,required:d.includes(p||"")?!1:c.required,disabled:!((y=l.value)!=null&&y.canSet),label:c.displayName,...((h=O.fieldParamsHandler)==null?void 0:h.call(O,c,p))||{}}}),s=["MultiText","MultiWideText"],d=["switch","single-checkbox","single-radio"],l=i.computed(()=>{var c;return(c=r==null?void 0:r.value)==null?void 0:c.fields[t.name]}),a=i.computed(()=>{if(!n.value)return null;const c=n.value.fieldsByName[t.name];return c?c.releatedLocalField?n.value.fieldsByName[c.releatedLocalField]:c:null});function u(c){return typeof t.type=="string"&&t.type.length!==0?t.type:c.type==="Reference"||c.type==="Owned"?c.referencedEntity:c.dataType==="Boolean"?"single-checkbox":c.dataType==="DateTime"?"date":c.dataType==="Integer"||c.dataType==="Decimal"?"number":c.dataType==="List"?c.aggregatedEntity:s.includes(c.presentationType)?"textarea":c.presentationType==="PhoneNumber"?"tel":"text"}return(c,p)=>(i.openBlock(),i.createBlock(i.unref(F.FormField),i.mergeProps({...c.$attrs,...o.value},{name:c.name}),null,16,["name"]))}});function nt(e){return Le(e,"YYYY/MM/DD HH:mm:ss")}function Le(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return Lt.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function $n(e){function t(...r){return n.wait?Promise.reject("The process has already started."):(n.wait=!0,Promise.resolve().then(()=>e(...r)).finally(()=>{n.wait=!1}))}const n=i.reactive({wait:!1,call:t});return n}function ye(e){return typeof e=="string"?le(e):Pn(e)?le(e.message,e.children||e.details||[]):Dn(e)?le(e.title,[e.detail||""]):le(S.DEFAULT_ERROR_MESSAGE)}function Pn(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function Dn(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function le(e,t=[]){return{message:e,children:t}}function V(e="error"){return function(t){const{message:n,children:r}=ye(t);ie.add(e,n,{children:r})}}function ve(e,t={}){return L().emit("entity:read",{...t,entity:e})}function xe(e,t){return L().emit("entity:update",{...t,entity:e})}function Fn(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function rt(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let r=String(e).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(t,"0"),r[1].length>t&&(r[1]=r[1].substring(0,t)),r.join(".")}function Bn(e,t){const n=new Map;return e.forEach(r=>{var s;const o=t(r);n.has(o)||n.set(o,[]),(s=n.get(o))==null||s.push(r)}),n}function Vn(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function Mn(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return S.DEFAULT_ERROR_MESSAGE}})}function $(e,t={}){return B.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=B.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(n=>Mn(n).then(r=>{if(!n.ok)throw r;return r}))}function Wn(e,t=1e3){let n=0;return(...r)=>{clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Un(e,t){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...r)}}const jn=Re(Ne("pretty-value-field-by-entity"));function qn(e,t,n){try{const r=Ee.get(e);if(!r)throw new Error("For entity metadata is not loaded");const o=r.fieldsByName[t];if(!o)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return o.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(r){return jn('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',r,e,t,n),n}}const zn=1,Gn=5e3,Hn="static-folder",it="request-error",Xn="Distinguisher",H=Re(Ne("use-socket"));function L(){return Yn}function Jn(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Yn=function(){let e=1,t,n;const r=new Set;let o=0;const s=new Set;function d(){if(t)o&&(clearTimeout(o),o=0);else return;o=setTimeout(()=>{t.close()},Gn*2);const f=new Uint8Array(1);f[0]=zn,t.send(f)}setInterval(()=>{Array.from(r).forEach(f=>{T(f)&&(H("Handler for event %s requestId %d was expired",f.event,f.requestId),f.requestId?a({requestId:f.requestId,event:it,data:{message:Q.RequestTookToLong().message}}):r.delete(f))})},1e3),setInterval(()=>{(!t||t.readyState===3)&&u()},S.DELAY_SOCKET_RECONNECT);function l(){return{safeQueue:s,requestId:e,handlers:r,socketInstance:t}}function a(f){const m=[...r.values()];H("Handlers array length is %d. Response event: %s. Request id: %d",r.size,f.event,f.requestId),m.forEach(w=>{const R=f.requestId;(w.requestId&&w.requestId===R||!w.requestId&&w.event===f.event)&&(H("Find appropriated handler: %d, event: %s",e,w.event),w.callback(f.data,f),w.once&&(r.delete(w),H("Handler was removed by *once* params was passed. %o",w)))})}function u(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),t=new WebSocket(n),t.onclose=function(f){H("Connection to server was stopped: %d %s",f.code,f.reason),Array.from(r).forEach(m=>{m.guaranteedAnswer&&m.serializeString&&s.add(m.serializeString)})},t.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...s.values()].forEach(f=>{c(f),s.delete(f)})},t.onerror=function(f){console.warn(f)},t.onmessage=f=>{var m;try{if(Jn(f.data)){d();return}const w=JSON.parse(f.data);if(!ot(w)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(w);return}(m=w==null?void 0:w.data)!=null&&m.refresh&&location.reload(),a(w)}catch(w){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(w)}}}function c(f){t.send(f)}function p(f,m){_({event:f,callback:m})}function y(f,m){_({event:f,callback:m,once:!0})}function h(){return t&&(t==null?void 0:t.readyState)===1}function v(f,m,w){const R=++e,I=JSON.stringify({requestId:R,event:f,data:m,contextId:B.contextId,url:O.socketURLHandler?O.socketURLHandler():window.location.href});return h()?c(I):(s.add(I),H("Socket is not connected. Message was send to save-queue")),new Promise((M,g)=>{_({event:f,requestId:R,once:!0,guaranteedAnswer:!0,serializeString:I,callback:(E,b)=>{if(H("Promise was resolve with next data:",E),Kn(b))return void g(E);w&&w(E,b),M(E)},timeToLive:S.TIME_TO_LIVE_SOCKET_REQUEST})})}function _(f){const m={timeToLive:0,...f,created:new Date().getTime()};r.add(m)}function T(f){return f.timeToLive===0||typeof f.timeToLive!="number"?!1:new Date().getTime()-f.created>f.timeToLive}return{get socket(){return t},on:p,once:y,emit:v,initialization(f){n=f},getDevInfo:l}}(),Kn=e=>!!ot(e)&&e.event===it,ot=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function Qn(e,t){return L().emit("list-setting:read",{entity:e,mark:t})}function Zn(e,t){return L().emit("metadata-field:treat",{entity:e,fieldName:t})}function at(e,t){return L().emit("entity:create",{...t,entity:e})}function st(e,t){return L().emit("entity:delete",{...t,entity:e})}function er(e,t){return L().emit("usage-context:read",{...t,entity:e})}function lt(e={}){return L().emit("tool:read",e)}function tr(){return L().emit("metadata-list:read",{})}function nr(e,t={},n={}){const r=i.inject(S.PROVIDE_NAME_ACTIONS,null),o=typeof e=="string"?e:t,s=typeof t=="string"?n:t;return i.computed(()=>{var a;const l=((typeof e=="string"?(a=r==null?void 0:r.actions)==null?void 0:a.value:i.unref(e))||[]).find(u=>u.name===o);return l?{...l,...s}:null})}function rr(e){return L().emit("history:read",e)}function ir(e,t){return L().emit("entity:count",{...t,entity:e})}function or(e){return`/${Hn}/${e}`}function Z(e){return{exec(t,n){switch(e.name){case"replace-boolean":return Z.replaceBoolean(t,e.values);case"replace-record-operation":return Z.replaceRecordOperation(t)}}}}Z.replaceBoolean=ar;Z.replaceRecordOperation=sr;function ar(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function sr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function lr(e={}){return L().emit("tool:execute",e)}function ct(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=fr),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=pr),e.handleCloseForm===void 0&&(e.handleCloseForm=gr),e.handleValidationResult===void 0&&(e.handleValidationResult=dr),{...t,label:t.title,callback(){var o;const n=typeof e.values=="function"?e.values(t,e):e.values,r=()=>lr({name:t.name,values:n,usageContext:t.usageContext}).then(async s=>{var d,l;if(!cr(s))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const a of e.handlers)await a(t,s,e);if(!s.success)throw e.handleValidationResult&&s.validationEffect&&((l=(d=s.validationEffect)==null?void 0:d.results)!=null&&l.length)&&e.handleValidationResult(t,s.validationEffect,e),new Error(s.message);return s.message&&ie.add("info",s.message),Array.isArray(s.affectedEntities)&&e.handleAffectedEntity&&s.affectedEntities.forEach(a=>{var u;return(u=e.handleAffectedEntity)==null?void 0:u.call(e,t,a,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),s}).catch(V("error"));return(o=e.overrides)!=null&&o[t.name]?e.overrides[t.name](t,e):t.requireSave&&e.form&&e.form.changed?e.form.save().then(r):!t.confirmation||!e.handleConfirmation?r():e.handleConfirmation(t,r)}}}function cr(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function ur(e){const t="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?t:typeof e=="string"?e:t}async function fr(e,t){const n=ur(e.confirmation);if(!me.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await me.promptModal(S.MODAL_CONFIRM,{message:n}))return t()}function dr(e,t){const n=S.MODAL_VALIDATION_EFFECT;if(!me.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{me.pushModal(n,t)})}function pr(e,t,n){var d;const{router:r,form:o}=n,s=(d=t.primaryKey)==null?void 0:d.Id;if(r&&t&&t.name===e.redirectEntity)return r.push({name:t.name,params:{id:s}});o&&t.name===o.name&&t.updated&&s===o.id&&o.read()}function gr(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}let X={};function ee(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=F.utils.getPropFromObject((this==null?void 0:this.vocabulary)||X,e);if(typeof n=="string")return je(n,t);const r=F.utils.getPropFromObject(X==null?void 0:X.root,e);return typeof r=="string"?je(r,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function je(e,t){return t.forEach((n,r)=>{e=e.replaceAll(new RegExp(`\\{${r}}`,"g"),n)}),e}ee.setGlobalVocabulary=function(e){X=e};ee.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),ee.bind({vocabulary:F.utils.getPropFromObject(X,t.toLowerCase())})};ee.setVocabulary=function(e){return typeof e=="string"&&(e=F.utils.getPropFromObject(X,e)),ee.bind({vocabulary:e})};function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ke={exports:{}},C={},Se={exports:{}},J={};function ut(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function mr(e,t,n){}function yr(e,t,n){}var vr=/javascript\s*\:/img;function wr(e,t){return vr.test(t)?"":t}J.whiteList=ut();J.getDefaultWhiteList=ut;J.onAttr=mr;J.onIgnoreAttr=yr;J.safeAttrValue=wr;var Er={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,o;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},ne=Er;function br(e,t){e=ne.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,r=!1,o=0,s=0,d="";function l(){if(!r){var c=ne.trim(e.slice(o,s)),p=c.indexOf(":");if(p!==-1){var y=ne.trim(c.slice(0,p)),h=ne.trim(c.slice(p+1));if(y){var v=t(o,d.length,y,h,c);v&&(d+=v+"; ")}}}o=s+1}for(;s<n;s++){var a=e[s];if(a==="/"&&e[s+1]==="*"){var u=e.indexOf("*/",s+2);if(u===-1)break;s=u+1,o=s+1,r=!1}else a==="("?r=!0:a===")"?r=!1:a===";"?r||l():a===`
7
7
  `&&l()}return ne.trim(d)}var _r=br,ce=J,Tr=_r;function qe(e){return e==null}function Ar(e){var t={};for(var n in e)t[n]=e[n];return t}function ft(e){e=Ar(e||{}),e.whiteList=e.whiteList||ce.whiteList,e.onAttr=e.onAttr||ce.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||ce.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||ce.safeAttrValue,this.options=e}ft.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,o=n.onAttr,s=n.onIgnoreAttr,d=n.safeAttrValue,l=Tr(e,function(a,u,c,p,y){var h=r[c],v=!1;if(h===!0?v=h:typeof h=="function"?v=h(p):h instanceof RegExp&&(v=h.test(p)),v!==!0&&(v=!1),p=d(c,p),!!p){var _={position:u,sourcePosition:a,source:y,isWhite:v};if(v){var T=o(c,p,_);return qe(T)?c+":"+p:T}else{var T=s(c,p,_);if(!qe(T))return T}}});return l};var Cr=ft;(function(e,t){var n=J,r=Cr;function o(d,l){var a=new r(l);return a.process(d)}t=e.exports=o,t.FilterCSS=r;for(var s in n)t[s]=n[s];typeof window<"u"&&(window.filterCSS=e.exports)})(Se,Se.exports);var $e=Se.exports,Pe={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,o;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}},kr=$e.FilterCSS,Sr=$e.getDefaultWhiteList,we=Pe;function dt(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var pt=new kr;function Rr(e,t,n){}function Ir(e,t,n){}function Nr(e,t,n){}function Or(e,t,n){}function gt(e){return e.replace(xr,"&lt;").replace($r,"&gt;")}function Lr(e,t,n,r){if(n=Et(n),t==="href"||t==="src"){if(n=we.trim(n),n==="#")return"#";if(!(n.substr(0,7)==="http://"||n.substr(0,8)==="https://"||n.substr(0,7)==="mailto:"||n.substr(0,4)==="tel:"||n.substr(0,11)==="data:image/"||n.substr(0,6)==="ftp://"||n.substr(0,2)==="./"||n.substr(0,3)==="../"||n[0]==="#"||n[0]==="/"))return""}else if(t==="background"){if(ue.lastIndex=0,ue.test(n))return""}else if(t==="style"){if(ze.lastIndex=0,ze.test(n)||(Ge.lastIndex=0,Ge.test(n)&&(ue.lastIndex=0,ue.test(n))))return"";r!==!1&&(r=r||pt,n=r.process(n))}return n=bt(n),n}var xr=/</g,$r=/>/g,Pr=/"/g,Dr=/&quot;/g,Fr=/&#([a-zA-Z0-9]*);?/gim,Br=/&colon;?/gim,Vr=/&newline;?/gim,ue=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,ze=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Ge=/u\s*r\s*l\s*\(.*/gi;function ht(e){return e.replace(Pr,"&quot;")}function mt(e){return e.replace(Dr,'"')}function yt(e){return e.replace(Fr,function(n,r){return r[0]==="x"||r[0]==="X"?String.fromCharCode(parseInt(r.substr(1),16)):String.fromCharCode(parseInt(r,10))})}function vt(e){return e.replace(Br,":").replace(Vr," ")}function wt(e){for(var t="",n=0,r=e.length;n<r;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return we.trim(t)}function Et(e){return e=mt(e),e=yt(e),e=vt(e),e=wt(e),e}function bt(e){return e=ht(e),e=gt(e),e}function Mr(){return""}function Wr(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function r(d){return n?!0:we.indexOf(e,d)!==-1}var o=[],s=!1;return{onIgnoreTag:function(d,l,a){if(r(d))if(a.isClosing){var u="[/removed]",c=a.position+u.length;return o.push([s!==!1?s:a.position,c]),s=!1,u}else return s||(s=a.position),"[removed]";else return t(d,l,a)},remove:function(d){var l="",a=0;return we.forEach(o,function(u){l+=d.slice(a,u[0]),a=u[1]}),l+=d.slice(a),l}}}function Ur(e){for(var t="",n=0;n<e.length;){var r=e.indexOf("<!--",n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);var o=e.indexOf("-->",r);if(o===-1)break;n=o+3}return t}function jr(e){var t=e.split("");return t=t.filter(function(n){var r=n.charCodeAt(0);return r===127?!1:r<=31?r===10||r===13:!0}),t.join("")}C.whiteList=dt();C.getDefaultWhiteList=dt;C.onTag=Rr;C.onIgnoreTag=Ir;C.onTagAttr=Nr;C.onIgnoreTagAttr=Or;C.safeAttrValue=Lr;C.escapeHtml=gt;C.escapeQuote=ht;C.unescapeQuote=mt;C.escapeHtmlEntities=yt;C.escapeDangerHtml5Entities=vt;C.clearNonPrintableCharacter=wt;C.friendlyAttrValue=Et;C.escapeAttrValue=bt;C.onIgnoreTagStripAll=Mr;C.StripTagBody=Wr;C.stripCommentTag=Ur;C.stripBlankChar=jr;C.attributeWrapSign='"';C.cssFilter=pt;C.getDefaultCSSWhiteList=Sr;var _e={},q=Pe;function qr(e){var t=q.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=q.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function zr(e){return e.slice(0,2)==="</"}function Gr(e,t,n){var r="",o=0,s=!1,d=!1,l=0,a=e.length,u="",c="";e:for(l=0;l<a;l++){var p=e.charAt(l);if(s===!1){if(p==="<"){s=l;continue}}else if(d===!1){if(p==="<"){r+=n(e.slice(o,l)),s=l,o=l;continue}if(p===">"||l===a-1){r+=n(e.slice(o,s)),c=e.slice(s,l+1),u=qr(c),r+=t(s,r.length,u,c,zr(c)),o=l+1,s=!1;continue}if(p==='"'||p==="'")for(var y=1,h=e.charAt(l-y);h.trim()===""||h==="=";){if(h==="="){d=p;continue e}h=e.charAt(l-++y)}}else if(p===d){d=!1;continue}}return o<a&&(r+=n(e.substr(o))),r}var Hr=/[^a-zA-Z0-9\\_:.-]/gim;function Xr(e,t){var n=0,r=0,o=[],s=!1,d=e.length;function l(y,h){if(y=q.trim(y),y=y.replace(Hr,"").toLowerCase(),!(y.length<1)){var v=t(y,h||"");v&&o.push(v)}}for(var a=0;a<d;a++){var u=e.charAt(a),c,p;if(s===!1&&u==="="){s=e.slice(n,a),n=a+1,r=e.charAt(n)==='"'||e.charAt(n)==="'"?n:Yr(e,a+1);continue}if(s!==!1&&a===r){if(p=e.indexOf(u,a+1),p===-1)break;c=q.trim(e.slice(r+1,p)),l(s,c),s=!1,a=p,n=a+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),s===!1)if(p=Jr(e,a),p===-1){c=q.trim(e.slice(n,a)),l(c),s=!1,n=a+1;continue}else{a=p-1;continue}else if(p=Kr(e,a-1),p===-1){c=q.trim(e.slice(n,a)),c=He(c),l(s,c),s=!1,n=a+1;continue}else continue}return n<e.length&&(s===!1?l(e.slice(n)):l(s,He(q.trim(e.slice(n))))),q.trim(o.join(" "))}function Jr(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function Yr(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function Kr(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function Qr(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function He(e){return Qr(e)?e.substr(1,e.length-2):e}_e.parseTag=Gr;_e.parseAttr=Xr;var Zr=$e.FilterCSS,D=C,_t=_e,ei=_t.parseTag,ti=_t.parseAttr,ge=Pe;function fe(e){return e==null}function ni(e){var t=ge.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=ge.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=ge.trim(e.slice(0,-1))),{html:e,closing:n}}function ri(e){var t={};for(var n in e)t[n]=e[n];return t}function ii(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(r){return r.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function Tt(e){e=ri(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=D.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=ii(e.whiteList||e.allowList):e.whiteList=D.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":D.attributeWrapSign,e.onTag=e.onTag||D.onTag,e.onTagAttr=e.onTagAttr||D.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||D.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||D.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||D.safeAttrValue,e.escapeHtml=e.escapeHtml||D.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Zr(e.css))}Tt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,o=n.onTag,s=n.onIgnoreTag,d=n.onTagAttr,l=n.onIgnoreTagAttr,a=n.safeAttrValue,u=n.escapeHtml,c=t.attributeWrapSign,p=t.cssFilter;n.stripBlankChar&&(e=D.stripBlankChar(e)),n.allowCommentTag||(e=D.stripCommentTag(e));var y=!1;n.stripIgnoreTagBody&&(y=D.StripTagBody(n.stripIgnoreTagBody,s),s=y.onIgnoreTag);var h=ei(e,function(v,_,T,f,m){var w={sourcePosition:v,position:_,isClosing:m,isWhite:Object.prototype.hasOwnProperty.call(r,T)},R=o(T,f,w);if(!fe(R))return R;if(w.isWhite){if(w.isClosing)return"</"+T+">";var I=ni(f),M=r[T],g=ti(I.html,function(E,b){var k=ge.indexOf(M,E)!==-1,N=d(T,E,b,k);return fe(N)?k?(b=a(T,E,b,p),b?E+"="+c+b+c:E):(N=l(T,E,b,k),fe(N)?void 0:N):N});return f="<"+T,g&&(f+=" "+g),I.closing&&(f+=" /"),f+=">",f}else return R=s(T,f,w),fe(R)?u(f):R},u);return y&&(h=y.remove(h)),h};var oi=Tt;(function(e,t){var n=C,r=_e,o=oi;function s(l,a){var u=new o(a);return u.process(l)}t=e.exports=s,t.filterXSS=s,t.FilterXSS=o,function(){for(var l in n)t[l]=n[l];for(var a in r)t[a]=r[a]}(),typeof window<"u"&&(window.filterXSS=e.exports);function d(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}d()&&(self.filterXSS=e.exports)})(ke,ke.exports);var ai=ke.exports;const si=hr(ai);function li(e){return e=e.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>"),e=e.replace(/\[icon:([^\]]+)]/g,"<widget-icon>$1</widget-icon>"),e=e.replace(/\[(.*)]\((.*)\)/g,'<router-link to = "$2">$1</router-link>'),si(e)}function ci(e,t,n,r){let o=e+t/60+n/3600;return(r=="S"||r=="W")&&(o=o*-1),o}function ui(e,t){const n={dir:e<0?t==="long"?"W":"S":t==="long"?"E":"N",deg:0|(e<0?e=-e:e),min:0|(e+=1e-9)%1*60,sec:(0|e*60%1*6e3)/100};return`${n.deg}° ${n.min}' ${n.sec}" ${n.dir}`}function fi(){const e=i.ref(null);function t(n){e.value=n}return{activeRow:e,activateRow:t}}function di(e,t){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(t)}async function At(e,t){e()&&(await t(),await At(e,t))}function pi(e,t,n={}){let r=!1;const o=i.ref(""),s=i.computed(()=>d.filter(g=>u(g,o.value))),d=i.reactive([]);let l=0;const a=i.ref(!1);let u=(n==null?void 0:n.filterSearchFn)||((g,E)=>di(g,E));function c(){return n.masterEntities?typeof n.masterEntities=="function"?n.masterEntities():n.masterEntities:[]}function p(){const g=R();return typeof g.limit!="number"&&(g.limit=100),g.offset=l,(n.request||ve)(e,g).then(b=>(l+=b.length,b))}function y(g,E){var k;return typeof g.Version=="number"?g.Version:(k=d.find(N=>N.Id===E))==null?void 0:k.Version}function h(g,E){const b=d.findIndex(k=>k.Id===g);if(b===-1)throw new Error(`Can't found item with Id ${g}`);d.splice(b,1,E)}function v(g){const E=d.findIndex(b=>b.Id===g);if(E===-1)throw new Error(`Can't found item with Id ${g}`);d.splice(E,1)}async function _(g,E){try{const b=R(),k=y(E,g);delete E.Version,await xe(e,{id:g,values:E,version:k,masterEntities:c()});const N=await ve(e,{fields:b.fields||"",id:g});h(g,N)}catch(b){V()(b)}}async function T(g,E={}){try{const b=R(),k=y(E,g);delete E.Version,await st(e,{id:g,version:k,masterEntities:c()}),v(g)}catch(b){V()(b)}}async function f(g){try{await at(e,{values:g,masterEntities:c()}),await I()}catch(E){V()(E)}}let m;async function w(){a.value=!0;try{m!=null&&m.signal&&!m.signal.aborted&&m.abort();let g=m=new AbortController,E=0;const k=R().limit||0;if(o.value&&!k){console.warn("Using textSearch assumes the use of limit.");return}await At(()=>(k>0?E<k:!0)&&!r&&!g.signal.aborted,async()=>{const N=await p();g.signal.aborted||(d.push(...N),E+=N.filter(ae=>u(ae,o.value)).length,(N.length<k||k===0)&&(r=!0))})}catch(g){V()(g)}a.value=!1}function R(){return typeof t=="function"?t():t}async function I(){try{l=0,r=!1,d.splice(0,d.length),await w()}catch(g){V()(g)}}function M(){if(m)return m.abort();a.value=!1}return{array:d,updateById:_,next:w,reload:I,wait:a,create:f,deleteById:T,textSearch:o,filteredArray:s,abort:M}}function gi(){function e(){return{organizations:B.organizations,currentContextId:B.contextId,person:B.person,context:B.context,contextType:B.contextType,userId:B.userId}}const t=i.reactive(e());return B.onupdateContext(()=>{Object.assign(t,e())}),t}function hi(e,t,n){return L().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function mi(e,t,n){return L().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function yi(e,t){return L().emit("communication-message:create",{communicationId:e,text:t})}function vi(e){return L().emit("communication-message:read",{communicationId:e})}function wi(e){const t=F.Form.getParentForm(),n=i.reactive([]);return t&&t.subscribe(e),e.read=()=>vi(e.id).then(r=>(n.splice(0,n.length,...r),r)),{array:n}}function Ei(e,t){e.read=()=>{const r=n();return Promise.resolve().then(()=>{if(!e.name)throw Q.EntityWithoutName(e);return ve(e.name,r)}).then(De).then(o=>(o.hasOwnProperty("Version")&&(e.version=o.Version),e.setValues(o),o)).catch(V())},e.save=()=>{const r=n();return Promise.resolve().then(()=>{if(!e.name)throw Q.EntityWithoutName(e);return xe(e.name,{id:r.id,values:e.changes,version:e.version})}).then(o=>{e.version=o.version}).catch(o=>{throw V()(o),o})};function n(){return typeof t=="function"?t():t}}function Ct(e){if(!e)return i.inject(S.PROVIDE_NAME_METADATA);Ee.initEntity(e);const t=i.computed(()=>Ee.state[e]);return i.provide(S.PROVIDE_NAME_METADATA,t),t}function kt(e,t={}){if(!e)return i.inject(S.PROVIDE_NAME_USAGE_CONTEXT);const n=i.ref(null);return i.provide(S.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await er(e,bi(t||{}))}}}function bi(e){return typeof e=="function"?e():e}function _i(e){if(!e)return i.inject(S.PROVIDE_NAME_ACTIONS);const t=i.reactive([]),n=i.computed(()=>t.map(s=>ct(e,s))),r={actions:n,update:o};i.provide(S.PROVIDE_NAME_ACTIONS,r),e.router=Qe.useRouter();function o(s={}){return t.splice(0,t.length),lt(s).then(d=>t.splice(0,0,...d)).catch(V("error"))}return{actions:n,update:o}}function Ti(e){function t(n){n.key==="Enter"&&e()}i.onMounted(()=>{document.addEventListener("keypress",t)}),i.onUnmounted(()=>{document.removeEventListener("keypress",t)})}function Ai(e,t={}){const n=i.reactive([]),r=a=>{const u=i.unref(e);if(a===void 0){n.length===0?u.forEach(s):u.forEach(d);return}o(a)?d(a):s(a)},o=a=>n.includes(a),s=a=>{t.handleSelect&&!t.handleSelect(a)||o(a)||n.push(a)},d=a=>{const u=n.findIndex(c=>c===a);u!==-1&&n.splice(u,1)},l=i.computed(()=>{const a=i.unref(e);return n.length===a.length&&a.length!==0});return[n,r,l,s,d]}function Ci(e){const t=i.ref(""),n=i.computed(()=>{const r=t.value.toLowerCase();return i.unref(e).filter(o=>t.value.length?Object.values(o).join().toLowerCase().includes(r):!0)});return{search:t,searchArray:n}}const ie=new class{constructor(){this.store=i.reactive([])}add(t,n,r={}){const o=ki(r),s=new Si(t,n,o.timeout,o.children,o.click);return this.store.push(s),o.timeout&&setTimeout(this.remove.bind(this,s.id),o.timeout*1e3),s}remove(t){const n=this.store.findIndex(r=>r.id===t);if(n===-1)return!1;this.store.splice(n,1)}};function ki(e){function t(r){return!!r&&typeof r=="object"}const n={timeout:10,click:()=>null,children:[]};return t(e)?{timeout:e.timeout||n.timeout,click:e.click||n.click,children:e.children||n.children}:n}const St=class Rt{constructor(t,n,r,o,s){this.type=t,this.message=n,this.timeout=r,this.children=o,this.click=s,this.id=Rt.cardId++}};St.cardId=1;let Si=St;/*!
8
8
  * jenesius-event-emitter v1.0.2
9
9
  * (c) 2022 Jenesius
@@ -1,12 +1,12 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.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}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-primary{color:var(--primary)}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.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-90f57c16]{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}.widget-list-head-cell[data-v-bf495d6a]{padding:0 0 0 10px;display:flex}.widget-list-head-cell[data-v-bf495d6a]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-bf495d6a]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-bf495d6a]{position:absolute;inset-inline-end:22px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-bf495d6a]{transform:rotate(180deg)}.head-cell-resize[data-v-bf495d6a]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-bf495d6a]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-bf495d6a]: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(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { reactive as J, ref as H, readonly as qt, defineComponent as M, openBlock as b, createElementBlock as I, Fragment as ae, renderList as he, createElementVNode as $, toDisplayString as fe, h as U, onMounted as xe, createBlock as j, resolveDynamicComponent as Bt, mergeProps as qe, useSlots as Gt, computed as W, createVNode as Se, normalizeClass as ke, createCommentVNode as se, unref as X, normalizeStyle as dt, renderSlot as zt, useCssVars as Ht, withCtx as gt, createTextVNode as pt, withModifiers as Xt, pushScopeId as Jt, popScopeId as Yt, inject as Ne, provide as Be, onUnmounted as Kt } from "vue";
2
+ import { reactive as J, ref as H, readonly as qt, defineComponent as M, openBlock as b, createElementBlock as I, Fragment as ae, renderList as he, createElementVNode as $, toDisplayString as fe, h as U, onMounted as Ne, createBlock as j, resolveDynamicComponent as Bt, mergeProps as qe, useSlots as Gt, computed as W, createVNode as Se, normalizeClass as ke, createCommentVNode as se, unref as X, normalizeStyle as dt, renderSlot as zt, useCssVars as Ht, withCtx as gt, createTextVNode as pt, withModifiers as Xt, pushScopeId as Jt, popScopeId as Yt, inject as xe, provide as Be, onUnmounted as Kt } from "vue";
3
3
  import { utils as re, FormField as Ie, Form as Qt } from "jenesius-vue-form";
4
4
  import { RouterLink as Zt, useRouter as en } from "vue-router";
5
5
  import tn from "date-and-time";
6
6
  import Ge from "debug";
7
7
  import { getComponentFromStore as ht, promptModal as nn, pushModal as rn } from "jenesius-vue-modal";
8
8
  /*!
9
- * eservices-core v1.3.153
9
+ * eservices-core v1.3.154
10
10
  * (c) 2024 ESERVICES
11
11
  */
12
12
  const mt = class A extends Error {
@@ -498,10 +498,10 @@ const R = {
498
498
  function ze(e) {
499
499
  return [R.CORE_DEBUG_LABEL, e].join(":");
500
500
  }
501
- const x = {};
501
+ const N = {};
502
502
  function ji(e) {
503
503
  for (let t in e)
504
- x[t] = e[t];
504
+ N[t] = e[t];
505
505
  }
506
506
  const wn = {
507
507
  props: {
@@ -520,7 +520,7 @@ const wn = {
520
520
  } catch {
521
521
  }
522
522
  return () => U("i", {
523
- class: x.iconHandler ? x.iconHandler(n) : `icon icon-${n}`
523
+ class: N.iconHandler ? N.iconHandler(n) : `icon icon-${n}`
524
524
  });
525
525
  }
526
526
  }, Re = /* @__PURE__ */ ee(wn, [["__scopeId", "data-v-90f57c16"]]), bn = Ge(ze("setup-list-row"));
@@ -536,7 +536,7 @@ function _n(e, t, n) {
536
536
  class: ["widget-table__cell widget-table-cell"]
537
537
  };
538
538
  function f(l) {
539
- a.onClick.push(() => l(r));
539
+ a.onClick.push(() => l(r, e, n));
540
540
  }
541
541
  function s(l) {
542
542
  Array.isArray(l) ? a.class.push(...l) : a.class.push(l);
@@ -578,7 +578,7 @@ function _n(e, t, n) {
578
578
  const l = e.icon(r);
579
579
  l !== null && c.push(U(Re, { name: l }));
580
580
  }
581
- return e.class && (typeof e.class == "function" ? s(e.class(r)) : s(e.class)), x.listCellHandler && x.listCellHandler(e, r, {
581
+ return e.class && (typeof e.class == "function" ? s(e.class(r)) : s(e.class)), N.listCellHandler && N.listCellHandler(e, r, {
582
582
  cellNodeChildren: c,
583
583
  addClass: s,
584
584
  addHandleClick: f,
@@ -615,7 +615,7 @@ const Tn = {
615
615
  emits: ["save", "close"],
616
616
  setup(e, { emit: t }) {
617
617
  const n = H();
618
- return xe(() => {
618
+ return Ne(() => {
619
619
  setTimeout(() => {
620
620
  n.value && n.value.scrollIntoView({ block: "nearest", inline: "nearest", behavior: "smooth" });
621
621
  }, 250);
@@ -733,7 +733,7 @@ const He = /* @__PURE__ */ ee(Sn, [["__scopeId", "data-v-0ef9ae88"]]), kn = { cl
733
733
  ]));
734
734
  }
735
735
  });
736
- const Bi = /* @__PURE__ */ ee(In, [["__scopeId", "data-v-450dc564"]]), Rn = { class: "widget-multi-button-wrap position_relative cursor_pointer" }, On = { class: "widget-multi-button-body grid" }, Ln = ["onClick"], xn = { class: "widget-multi-button-side-wrap" }, Nn = /* @__PURE__ */ M({
736
+ const Bi = /* @__PURE__ */ ee(In, [["__scopeId", "data-v-450dc564"]]), Rn = { class: "widget-multi-button-wrap position_relative cursor_pointer" }, On = { class: "widget-multi-button-body grid" }, Ln = ["onClick"], Nn = { class: "widget-multi-button-side-wrap" }, xn = /* @__PURE__ */ M({
737
737
  __name: "widget-multi-button",
738
738
  props: {
739
739
  label: {},
@@ -775,7 +775,7 @@ const Bi = /* @__PURE__ */ ee(In, [["__scopeId", "data-v-450dc564"]]), Rn = { cl
775
775
  }
776
776
  }, fe(o.label), 9, Ln))), 128))
777
777
  ]),
778
- $("div", xn, [
778
+ $("div", Nn, [
779
779
  $("div", {
780
780
  class: ke(["grid-center widget-multi-button-side", n.active ? "widget-multi-button-side_active" : null]),
781
781
  onClick: s[1] || (s[1] = (o) => a())
@@ -798,7 +798,7 @@ const Bi = /* @__PURE__ */ ee(In, [["__scopeId", "data-v-450dc564"]]), Rn = { cl
798
798
  ]));
799
799
  }
800
800
  });
801
- const Gi = /* @__PURE__ */ ee(Nn, [["__scopeId", "data-v-a8d711d1"]]), $n = { class: "widget-loader flex flex-align_center gap_10 padding_15" }, Pn = { class: "text_md" }, zi = /* @__PURE__ */ M({
801
+ const Gi = /* @__PURE__ */ ee(xn, [["__scopeId", "data-v-a8d711d1"]]), $n = { class: "widget-loader flex flex-align_center gap_10 padding_15" }, Pn = { class: "text_md" }, zi = /* @__PURE__ */ M({
802
802
  __name: "widget-loader",
803
803
  props: {
804
804
  label: {}
@@ -821,7 +821,7 @@ const Gi = /* @__PURE__ */ ee(Nn, [["__scopeId", "data-v-a8d711d1"]]), $n = { cl
821
821
  },
822
822
  setup(e) {
823
823
  const t = e, n = H();
824
- return xe(() => {
824
+ return Ne(() => {
825
825
  n.value && (n.value.src = t.src), n.value.onerror = function() {
826
826
  t.default && (n.value.src = t.default);
827
827
  };
@@ -894,7 +894,7 @@ const qn = /* @__PURE__ */ ee(jn, [["__scopeId", "data-v-bf495d6a"]]), Bn = /* @
894
894
  emits: ["update:config", "update:order", "select"],
895
895
  setup(e, { emit: t }) {
896
896
  const n = e, r = H(), i = H();
897
- xe(() => {
897
+ Ne(() => {
898
898
  function o(p, y) {
899
899
  let _ = -1;
900
900
  do
@@ -1080,7 +1080,7 @@ const Gn = /* @__PURE__ */ ee(Bn, [["__scopeId", "data-v-ccffc6bd"]]), zn = { cl
1080
1080
  required: f.includes(d || "") ? !1 : l.required,
1081
1081
  disabled: !((m = s.value) != null && m.canSet),
1082
1082
  label: l.displayName,
1083
- ...((p = x.fieldParamsHandler) == null ? void 0 : p.call(x, l, d)) || {}
1083
+ ...((p = N.fieldParamsHandler) == null ? void 0 : p.call(N, l, d)) || {}
1084
1084
  };
1085
1085
  }), a = ["MultiText", "MultiWideText"], f = ["switch", "single-checkbox", "single-radio"], s = W(() => {
1086
1086
  var l;
@@ -1146,13 +1146,13 @@ function z(e = "error") {
1146
1146
  };
1147
1147
  }
1148
1148
  function We(e, t = {}) {
1149
- return N().emit("entity:read", {
1149
+ return x().emit("entity:read", {
1150
1150
  ...t,
1151
1151
  entity: e
1152
1152
  });
1153
1153
  }
1154
1154
  function Et(e, t) {
1155
- return N().emit("entity:update", {
1155
+ return x().emit("entity:update", {
1156
1156
  ...t,
1157
1157
  entity: e
1158
1158
  });
@@ -1226,7 +1226,7 @@ function no(e, t, n) {
1226
1226
  }
1227
1227
  }
1228
1228
  const tr = 1, nr = 5e3, rr = "static-folder", _t = "request-error", ro = "Distinguisher", te = Ge(ze("use-socket"));
1229
- function N() {
1229
+ function x() {
1230
1230
  return or;
1231
1231
  }
1232
1232
  function ir(e) {
@@ -1327,7 +1327,7 @@ const or = function() {
1327
1327
  event: u,
1328
1328
  data: h,
1329
1329
  contextId: G.contextId,
1330
- url: x.socketURLHandler ? x.socketURLHandler() : window.location.href
1330
+ url: N.socketURLHandler ? N.socketURLHandler() : window.location.href
1331
1331
  });
1332
1332
  return p() ? l(O) : (a.add(O), te("Socket is not connected. Message was send to save-queue")), new Promise((q, g) => {
1333
1333
  _({
@@ -1370,43 +1370,43 @@ const or = function() {
1370
1370
  };
1371
1371
  }(), ar = (e) => !!Tt(e) && e.event === _t, Tt = (e) => typeof e == "object" && e !== null && "event" in e && typeof e.event == "string" && "requestId" in e && typeof e.requestId == "number" && "data" in e;
1372
1372
  function io(e, t) {
1373
- return N().emit("list-setting:read", {
1373
+ return x().emit("list-setting:read", {
1374
1374
  entity: e,
1375
1375
  mark: t
1376
1376
  });
1377
1377
  }
1378
1378
  function oo(e, t) {
1379
- return N().emit("metadata-field:treat", {
1379
+ return x().emit("metadata-field:treat", {
1380
1380
  entity: e,
1381
1381
  fieldName: t
1382
1382
  });
1383
1383
  }
1384
1384
  function sr(e, t) {
1385
- return N().emit("entity:create", {
1385
+ return x().emit("entity:create", {
1386
1386
  ...t,
1387
1387
  entity: e
1388
1388
  });
1389
1389
  }
1390
1390
  function lr(e, t) {
1391
- return N().emit("entity:delete", {
1391
+ return x().emit("entity:delete", {
1392
1392
  ...t,
1393
1393
  entity: e
1394
1394
  });
1395
1395
  }
1396
1396
  function cr(e, t) {
1397
- return N().emit("usage-context:read", {
1397
+ return x().emit("usage-context:read", {
1398
1398
  ...t,
1399
1399
  entity: e
1400
1400
  });
1401
1401
  }
1402
1402
  function ur(e = {}) {
1403
- return N().emit("tool:read", e);
1403
+ return x().emit("tool:read", e);
1404
1404
  }
1405
1405
  function ao() {
1406
- return N().emit("metadata-list:read", {});
1406
+ return x().emit("metadata-list:read", {});
1407
1407
  }
1408
1408
  function so(e, t = {}, n = {}) {
1409
- const r = Ne(R.PROVIDE_NAME_ACTIONS, null), i = typeof e == "string" ? e : t, a = typeof t == "string" ? n : t;
1409
+ const r = xe(R.PROVIDE_NAME_ACTIONS, null), i = typeof e == "string" ? e : t, a = typeof t == "string" ? n : t;
1410
1410
  return W(() => {
1411
1411
  var o;
1412
1412
  const s = ((typeof e == "string" ? (o = r == null ? void 0 : r.actions) == null ? void 0 : o.value : X(e)) || []).find((c) => c.name === i);
@@ -1417,10 +1417,10 @@ function so(e, t = {}, n = {}) {
1417
1417
  });
1418
1418
  }
1419
1419
  function lo(e) {
1420
- return N().emit("history:read", e);
1420
+ return x().emit("history:read", e);
1421
1421
  }
1422
1422
  function co(e, t) {
1423
- return N().emit("entity:count", {
1423
+ return x().emit("entity:count", {
1424
1424
  ...t,
1425
1425
  entity: e
1426
1426
  });
@@ -1461,7 +1461,7 @@ function dr(e) {
1461
1461
  }
1462
1462
  }
1463
1463
  function gr(e = {}) {
1464
- return N().emit("tool:execute", e);
1464
+ return x().emit("tool:execute", e);
1465
1465
  }
1466
1466
  function pr(e, t) {
1467
1467
  return e.handleConfirmation === void 0 && (e.handleConfirmation = yr), e.handleAffectedEntity === void 0 && (e.handleAffectedEntity = wr), e.handleCloseForm === void 0 && (e.handleCloseForm = br), e.handleValidationResult === void 0 && (e.handleValidationResult = vr), {
@@ -1707,7 +1707,7 @@ var Xe = Ue.exports, Je = {
1707
1707
  var t = /\s|\n|\t/, n = t.exec(e);
1708
1708
  return n ? n.index : -1;
1709
1709
  }
1710
- }, xr = Xe.FilterCSS, Nr = Xe.getDefaultWhiteList, Oe = Je;
1710
+ }, Nr = Xe.FilterCSS, xr = Xe.getDefaultWhiteList, Oe = Je;
1711
1711
  function St() {
1712
1712
  return {
1713
1713
  a: ["target", "href", "title"],
@@ -1800,7 +1800,7 @@ function St() {
1800
1800
  ]
1801
1801
  };
1802
1802
  }
1803
- var kt = new xr();
1803
+ var kt = new Nr();
1804
1804
  function $r(e, t, n) {
1805
1805
  }
1806
1806
  function Pr(e, t, n) {
@@ -1840,16 +1840,16 @@ function Lt(e) {
1840
1840
  return r[0] === "x" || r[0] === "X" ? String.fromCharCode(parseInt(r.substr(1), 16)) : String.fromCharCode(parseInt(r, 10));
1841
1841
  });
1842
1842
  }
1843
- function xt(e) {
1843
+ function Nt(e) {
1844
1844
  return e.replace(Br, ":").replace(Gr, " ");
1845
1845
  }
1846
- function Nt(e) {
1846
+ function xt(e) {
1847
1847
  for (var t = "", n = 0, r = e.length; n < r; n++)
1848
1848
  t += e.charCodeAt(n) < 32 ? " " : e.charAt(n);
1849
1849
  return Oe.trim(t);
1850
1850
  }
1851
1851
  function $t(e) {
1852
- return e = Ot(e), e = Lt(e), e = xt(e), e = Nt(e), e;
1852
+ return e = Ot(e), e = Lt(e), e = Nt(e), e = xt(e), e;
1853
1853
  }
1854
1854
  function Pt(e) {
1855
1855
  return e = Rt(e), e = It(e), e;
@@ -1920,8 +1920,8 @@ C.escapeHtml = It;
1920
1920
  C.escapeQuote = Rt;
1921
1921
  C.unescapeQuote = Ot;
1922
1922
  C.escapeHtmlEntities = Lt;
1923
- C.escapeDangerHtml5Entities = xt;
1924
- C.clearNonPrintableCharacter = Nt;
1923
+ C.escapeDangerHtml5Entities = Nt;
1924
+ C.clearNonPrintableCharacter = xt;
1925
1925
  C.friendlyAttrValue = $t;
1926
1926
  C.escapeAttrValue = Pt;
1927
1927
  C.onIgnoreTagStripAll = zr;
@@ -1930,7 +1930,7 @@ C.stripCommentTag = Xr;
1930
1930
  C.stripBlankChar = Jr;
1931
1931
  C.attributeWrapSign = '"';
1932
1932
  C.cssFilter = kt;
1933
- C.getDefaultCSSWhiteList = Nr;
1933
+ C.getDefaultCSSWhiteList = xr;
1934
1934
  var $e = {}, Q = Je;
1935
1935
  function Yr(e) {
1936
1936
  var t = Q.spaceIndex(e), n;
@@ -2293,16 +2293,16 @@ function yo() {
2293
2293
  }), t;
2294
2294
  }
2295
2295
  function hi(e, t, n) {
2296
- return N().emit("communication:create", { entityName: e, entityCatalogId: t, targetCode: n });
2296
+ return x().emit("communication:create", { entityName: e, entityCatalogId: t, targetCode: n });
2297
2297
  }
2298
2298
  function mi(e, t, n) {
2299
- return N().emit("communication:read", { entityName: e, entityCatalogId: t, targetCode: n });
2299
+ return x().emit("communication:read", { entityName: e, entityCatalogId: t, targetCode: n });
2300
2300
  }
2301
2301
  function yi(e, t) {
2302
- return N().emit("communication-message:create", { communicationId: e, text: t });
2302
+ return x().emit("communication-message:create", { communicationId: e, text: t });
2303
2303
  }
2304
2304
  function vi(e) {
2305
- return N().emit("communication-message:read", { communicationId: e });
2305
+ return x().emit("communication-message:read", { communicationId: e });
2306
2306
  }
2307
2307
  function vo(e) {
2308
2308
  const t = Qt.getParentForm(), n = J([]);
@@ -2340,14 +2340,14 @@ function wo(e, t) {
2340
2340
  }
2341
2341
  function wi(e) {
2342
2342
  if (!e)
2343
- return Ne(R.PROVIDE_NAME_METADATA);
2343
+ return xe(R.PROVIDE_NAME_METADATA);
2344
2344
  je.initEntity(e);
2345
2345
  const t = W(() => je.state[e]);
2346
2346
  return Be(R.PROVIDE_NAME_METADATA, t), t;
2347
2347
  }
2348
2348
  function bi(e, t = {}) {
2349
2349
  if (!e)
2350
- return Ne(R.PROVIDE_NAME_USAGE_CONTEXT);
2350
+ return xe(R.PROVIDE_NAME_USAGE_CONTEXT);
2351
2351
  const n = H(null);
2352
2352
  return Be(R.PROVIDE_NAME_USAGE_CONTEXT, n), { state: n, update: async function() {
2353
2353
  n.value = await cr(e, Ei(t || {}));
@@ -2358,7 +2358,7 @@ function Ei(e) {
2358
2358
  }
2359
2359
  function bo(e) {
2360
2360
  if (!e)
2361
- return Ne(R.PROVIDE_NAME_ACTIONS);
2361
+ return xe(R.PROVIDE_NAME_ACTIONS);
2362
2362
  const t = J([]), n = W(() => t.map((a) => pr(e, a))), r = { actions: n, update: i };
2363
2363
  Be(R.PROVIDE_NAME_ACTIONS, r), e.router = en();
2364
2364
  function i(a = {}) {
@@ -2370,7 +2370,7 @@ function Eo(e) {
2370
2370
  function t(n) {
2371
2371
  n.key === "Enter" && e();
2372
2372
  }
2373
- xe(() => {
2373
+ Ne(() => {
2374
2374
  document.addEventListener("keypress", t);
2375
2375
  }), Kt(() => {
2376
2376
  document.removeEventListener("keypress", t);
@@ -2513,7 +2513,7 @@ class Co extends Z {
2513
2513
  }
2514
2514
  }
2515
2515
  function Ai() {
2516
- return N().emit("client:read", {});
2516
+ return x().emit("client:read", {});
2517
2517
  }
2518
2518
  var Ut = (e, t, n) => {
2519
2519
  if (!t.has(e))
@@ -2626,7 +2626,7 @@ Pe.EVENT_CONTEXT_UPDATE = "event:context-update";
2626
2626
  Pe.EVENT_READY_UPDATE = "event:ready-update";
2627
2627
  let Ii = Pe;
2628
2628
  function Ri(e) {
2629
- return N().emit("metadata:read", {
2629
+ return x().emit("metadata:read", {
2630
2630
  entity: e
2631
2631
  });
2632
2632
  }
@@ -2662,7 +2662,7 @@ class Y {
2662
2662
  * @param values
2663
2663
  */
2664
2664
  static login(t) {
2665
- return V(x.identityServerURL + "/api/Authenticate/Login", {
2665
+ return V(N.identityServerURL + "/api/Authenticate/Login", {
2666
2666
  method: "POST",
2667
2667
  headers: {
2668
2668
  "Content-Type": "application/json"
@@ -2670,7 +2670,7 @@ class Y {
2670
2670
  credentials: "include",
2671
2671
  body: JSON.stringify({
2672
2672
  ...t,
2673
- AppName: x.applicationName
2673
+ AppName: N.applicationName
2674
2674
  })
2675
2675
  });
2676
2676
  }
@@ -2696,7 +2696,7 @@ class Y {
2696
2696
  * steps.
2697
2697
  * */
2698
2698
  static requestStepRegistrationProcess(t, n) {
2699
- return V(`${x.identityServerURL}/api/Authenticate/${t}`, {
2699
+ return V(`${N.identityServerURL}/api/Authenticate/${t}`, {
2700
2700
  method: "POST",
2701
2701
  headers: {
2702
2702
  "Content-Type": "application/json"
@@ -2719,7 +2719,7 @@ class Y {
2719
2719
  * @return {ILoginAnswer} answer
2720
2720
  * */
2721
2721
  static requestStepLoginProcess(t, n) {
2722
- return V(`${x.identityServerURL}/api/Authenticate/${t}`, {
2722
+ return V(`${N.identityServerURL}/api/Authenticate/${t}`, {
2723
2723
  method: "POST",
2724
2724
  headers: {
2725
2725
  "Content-Type": "application/json"
@@ -2739,7 +2739,7 @@ class Y {
2739
2739
  * @param UserId
2740
2740
  */
2741
2741
  static startPasswordReset(t, n) {
2742
- return V(`${x.identityServerURL}/api/Authenticate/StartAccessRecovery`, {
2742
+ return V(`${N.identityServerURL}/api/Authenticate/StartAccessRecovery`, {
2743
2743
  method: "POST",
2744
2744
  headers: {
2745
2745
  "Content-Type": "application/json"
@@ -2752,7 +2752,7 @@ class Y {
2752
2752
  });
2753
2753
  }
2754
2754
  static confirmPhoneNumberByAccessRecovery(t, n, r, i) {
2755
- return V(`${x.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`, {
2755
+ return V(`${N.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`, {
2756
2756
  method: "POST",
2757
2757
  headers: {
2758
2758
  "Content-Type": "application/json"
@@ -2767,7 +2767,7 @@ class Y {
2767
2767
  });
2768
2768
  }
2769
2769
  static confirmEmailByAccessRecovery(t, n, r, i) {
2770
- return V(`${x.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`, {
2770
+ return V(`${N.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`, {
2771
2771
  method: "POST",
2772
2772
  headers: {
2773
2773
  "Content-Type": "application/json"
@@ -2782,7 +2782,7 @@ class Y {
2782
2782
  });
2783
2783
  }
2784
2784
  static finishAccessRecovery(t, n, r) {
2785
- return V(`${x.identityServerURL}/api/Authenticate/FinishAccessRecovery`, {
2785
+ return V(`${N.identityServerURL}/api/Authenticate/FinishAccessRecovery`, {
2786
2786
  method: "POST",
2787
2787
  headers: {
2788
2788
  "Content-Type": "application/json"
@@ -2852,7 +2852,7 @@ class Ro {
2852
2852
  }
2853
2853
  }
2854
2854
  var Oi = /* @__PURE__ */ ((e) => (e.Add = "A", e.Delete = "D", e.Modify = "M", e.None = "N", e))(Oi || {}), Li = /* @__PURE__ */ ((e) => (e.Approved = "A", e.AwaitingFeedback = "AF", e.AssignedForExam = "AFE", e.Cancelled = "C", e.Closed = "CLS", e.Completed = "CT", e.Draft = "D", e.NotSatisfied = "NSF", e.OnClarification = "OC", e.Processing = "P", e.Rejected = "R", e.ReadyForExam = "RFE", e.Submitted = "S", e.SecurityCheck = "SCK", e.Satisfied = "SF", e.Withdrawn = "W", e))(Li || {});
2855
- function xi(e) {
2855
+ function Ni(e) {
2856
2856
  return typeof e != "object" || e === null ? !1 : !!(e.hasOwnProperty("start") || e.hasOwnProperty("end"));
2857
2857
  }
2858
2858
  function P(e) {
@@ -2862,7 +2862,7 @@ function P(e) {
2862
2862
  const i = r.map((a) => typeof a == "string" ? `'${a}'` : a).join(", ");
2863
2863
  return r.length && t.push(`@${n} in (${i})`), t;
2864
2864
  }
2865
- if (xi(r)) {
2865
+ if (Ni(r)) {
2866
2866
  let i = function(a) {
2867
2867
  var f;
2868
2868
  return ((f = a.match(/([^Z]*)/)) == null ? void 0 : f[0]) + "0000Z";
@@ -2938,7 +2938,7 @@ export {
2938
2938
  ue as billingService,
2939
2939
  z as catchUniversal,
2940
2940
  ji as config,
2941
- x as configuration,
2941
+ N as configuration,
2942
2942
  R as constants,
2943
2943
  po as convertDDToDMS,
2944
2944
  go as convertDMSToDD,
@@ -2988,7 +2988,7 @@ export {
2988
2988
  _o as useListSelect,
2989
2989
  yo as useManagerState,
2990
2990
  wi as useMetadata,
2991
- N as useSocket,
2991
+ x as useSocket,
2992
2992
  bi as useUsageContext,
2993
2993
  Ui as useWizard,
2994
2994
  Zi as uuidv4,
@@ -1,9 +1,9 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.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}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-primary{color:var(--primary)}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.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-90f57c16]{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}.widget-list-head-cell[data-v-bf495d6a]{padding:0 0 0 10px;display:flex}.widget-list-head-cell[data-v-bf495d6a]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-bf495d6a]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-bf495d6a]{position:absolute;inset-inline-end:22px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-bf495d6a]{transform:rotate(180deg)}.head-cell-resize[data-v-bf495d6a]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-bf495d6a]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-bf495d6a]: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(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  (function(f,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("jenesius-vue-form"),require("vue-router"),require("date-and-time"),require("debug"),require("jenesius-vue-modal")):typeof define=="function"&&define.amd?define(["exports","vue","jenesius-vue-form","vue-router","date-and-time","debug","jenesius-vue-modal"],i):(f=typeof globalThis<"u"?globalThis:f||self,i(f["eservices-core"]={},f.Vue,f.JenesiusVueForm,f.VueRouter,f.DateAndTime,f.Debug,f.JenesiusVueModal))})(this,function(f,i,B,Ve,$t,Ce,se){"use strict";/*!
3
- * eservices-core v1.3.153
3
+ * eservices-core v1.3.154
4
4
  * (c) 2024 ESERVICES
5
5
  */const xi="",Me=class k extends Error{constructor(t,n=null){super(),this.message=t,this.details=n,this.id=k.ID++}static ParentFormNotFound(){return new k("Can't found parent form.")}static UndefinedNameOfCompositeFormController(t){return new k("Composite object name is undefined",t)}static EntityWithoutName(t){return new k("'Entity doesn't have a name",t)}static NotResolvedNameEventEmitter(t){return new k(`'${t}' is not a valid Event emitter name`)}static FormIsNotValidated(t){return new k("Form is not validated",t)}static ListWorkerIsRunningOrEnd(t){return new k("List data request is running or already done",t)}static ObjectIdNotNumber(t){return new k(`${t} (id) is not a number`)}static UndefinedErrorId(t,n){return k.ApiNotAvailable()}static ApiError(t){return new k("Request error",t)}static ApiNotAvailable(){return new k(`Sorry, we experience difficulties here.
6
- Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?k.ApiNotAvailable():new k(t||"Authorization Error",n)}static ApiResponseParseFailed(){return k.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new k("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new k(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new k("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new k("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new k(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new k(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,r){return new k(`Array already includes the element with value ${t}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(t){return new k(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new k("The request took too long to complete. Try again later.")}};Me.ID=0;let K=Me;const Pt="Please try again later or submit a feedback if problem doesn't go.";function Dt(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return Pt}})}function j(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw K.ApiNotAvailable()}).then(n=>Dt(n).then(r=>{if(!n.ok)throw r;return r}))}class Bt{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,r)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),t[n]=r,!0)}),window._journal=this}get error(){return{add:(...t)=>{this.errors.push(t)},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")}}new Bt;function xe(e){return{...e,createdEntities:e.createdEntites}}const We=class Ae{static async getStartConfig(t,n){return j([Ae.url,t,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(t,n){return j([Ae.url,t,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(xe)}static async runStep(t,n,r,o,s){return j([Ae.url,t,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:o,values:s})}).then(xe)}};We.url="/close-api/views/process-wizard";let le=We;class Ft{static invite(t,n,r){return j("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:r})})}static accept(t,n){return j("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!0})})}static decline(t,n){return j("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class Vt{static getRequiredDocuments(t,n,r){const o=new URLSearchParams({entity:t,primaryKey:n,statusCode:r});return fetch(`/close-api/views/required-documents?${o.toString()}`).then(s=>s.json())}}class Q{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${Q.url()}/calculator/${t}`)}static calculate(t,n){return j(`/${Q.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):K.ApiNotAvailable()})}static parseMetadataField(t){function n(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return j(`/${Q.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return j(`/${Q.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}function Mt(e){return e.statusName==="Completed"}function xt(e){return e.statusName==="FinalStepWithConfirmation"}function Wt(e){return e.statusName==="ValidationError"}function Ut(e,t,n){let r=null;const o=i.reactive({wait:null});let s=[],g=null;const l=i.ref(null);function a(){l.value=s.find(d=>d.name===g)||null}function u(){var d;return g?((d=s.find(y=>y.name===g))==null?void 0:d.fields)||[]:[]}function c(d){if(a(),Wt(d))return void n.onValidation(d.validationResults);if((d.statusName==="FinalStep"||d.statusName==="NextStep")&&(!u().length||qt(u(),n.presets)))return A(n.presets||{});Mt(d)&&n.onCompleted(d),xt(d)&&n.onConfirmation(d)}async function p(){try{await w(),await T()}catch(d){const{message:y}=ue(d);ie.add("error",y)}}function w(){return o.wait="Loading process information.",le.getStartConfig(t,e).then(d=>{s=d.steps.map(y=>({label:y.title,name:y.stepName,number:y.number,fields:y.frontendEntity.objectTypes.reduce((b,R)=>(R.properties.forEach(L=>{b.push({name:L.name,label:L.title,type:L.refEntityName||L.dataType})}),b),[])}))}).then(d=>(o.wait=!1,d))}function m(d){return["FinalStepWithConfirmation","NextStep","Completed","FinalStep"].includes(d.statusName)&&(r=d.token,g=d.nextStepName),d}function E(d){const y=ue(d);ie.add("error",y.message)}function T(){return o.wait="Starting process",le.startProcess(t,e).then(m).then(c).catch(E).finally(()=>{o.wait=null})}function A(d={}){return!r||!g?Promise.reject("Not step or token."):(o.wait="Waiting for result...",le.runStep(t,e,g,r,d).then(m).then(c).catch(E).finally(()=>{o.wait=!1}))}return{initialize:p,state:o,currentStepConfig:i.readonly(l),next:A}}function qt(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(!B.utils.getPropFromObject(t,r.name))return!1}return!0}const jt={class:"widget-table__head"},zt={class:"widget-table__head-label margin_0 text_overflow"},Gt=i.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("tr",jt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.config,(r,o)=>(i.openBlock(),i.createElementBlock("th",{class:"widget-table__head-cell",key:o},[i.createElementVNode("p",zt,i.toDisplayString(r.label),1)]))),128))]))}}),Wi="",z=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Ht=z(Gt,[["__scopeId","data-v-25198f4a"]]);function Ue(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}function Xt(e){const t=new RegExp(/\$\{([a-zA-Z0-9.]+)}/,"g"),n=[];let r;for(;(r=t.exec(e))!==null;)n.push(r[1]);return n}function Jt(e,t){return Xt(e).forEach(r=>{e=e.replace(new RegExp("\\$\\{"+r+"}","g"),B.utils.getPropFromObject(t,r))}),e}function ke(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function Se(e,t){const n=Ue(e);if(typeof e.value=="string")return Jt(e.value,t);let r=n?B.utils.getPropFromObject(t,n):null;if(r===void 0&&(r=null),typeof e.value=="function")return e.value(r,t);if(e.value===null)return null;if(e.unitValue&&(r=ke(e.unitValue)(r)),e.unit&&(r=ke(e.unit)(r)),e.type)switch(e.type){case"number":{typeof r=="number"&&(r=new Intl.NumberFormat().format(r));break}case"date":{r=Ne(typeof r=="string"?r:null);break}case"dateTime":case"dateWithTime":{r=Ge(typeof r=="string"?r:null);break}case"money":{r=He(r);break}}return e.formatter&&(r=Z(e.formatter).exec(r,t)),typeof r=="boolean"&&(r=r?"✓":"—"),r}const S={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",TIME_TO_LIVE_SOCKET_REQUEST:3e4,CORE_DEBUG_LABEL:"eservices-core"};function Ie(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const N={};function Yt(e){for(let t in e)N[t]=e[t]}const Ui="",ne=z({props:{name:String},setup(e,t){let n="unknown";try{n=t.slots.default()[0].children}catch{n=e.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>i.h("i",{class:N.iconHandler?N.iconHandler(n):`icon icon-${n}`})}},[["__scopeId","data-v-90f57c16"]]),Kt=Ce(Ie("setup-list-row"));function Qt(e,t){const n=e.config.map(r=>Zt(r,e,t));return i.h("tr",{class:"widget-table__row widget-table-row"},n)}function Zt(e,t,n){const r=t.values;let o=Se(e,r);const s={onClick:[],class:["widget-table__cell widget-table-cell"]};function g(c){s.onClick.push(()=>c(r))}function l(c){Array.isArray(c)?s.class.push(...c):s.class.push(c)}const a=[],u=[];if(e.hide&&e.hide(r))return[i.h("td")];if(e.type)switch(l(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(i.h(B.FormField,{type:"single-checkbox",modelValue:t.selected})),g(qe.bind(null,n,!0));break}case"select":{u.push(i.h(B.FormField,{type:"single-radio",modelValue:t.selected})),g(qe.bind(null,n,!1));break}}if(e.onClick&&g(e.onClick),e.link)try{const c=e.link(r);if(c){const p=i.h(Ve.RouterLink,{to:c});u.push(p),l("widget-table-cell_link")}}catch(c){Kt("Can't add router link",c)}if(e.href&&(u.push(i.h("a",{href:e.href(r),target:"_blank"})),l("widget-table-cell_link")),(typeof o=="string"||typeof o=="number")&&u.push(i.h("p",{class:"widget-list-cell-text"},o)),e.icon&&(typeof e.icon=="string"&&u.push(i.h(ne,{name:e.icon})),typeof e.icon=="function")){const c=e.icon(r);c!==null&&u.push(i.h(ne,{name:c}))}return e.class&&(typeof e.class=="function"?l(e.class(r)):l(e.class)),N.listCellHandler&&N.listCellHandler(e,r,{cellNodeChildren:u,addClass:l,addHandleClick:g,context:n}),a.push(i.h("td",s,u)),a}function qe(e,t){e.emit("select",t)}function Re(e,t){return()=>{try{return Qt(e,t)}catch(n){return console.warn(n),null}}}const en={props:{values:Object,config:Object,selected:Boolean},setup:Re},tn=["colspan"],je=i.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=i.ref();return i.onMounted(()=>{setTimeout(()=>{n.value&&n.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,o)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:n},[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=>t("close")),onSave:o[1]||(o[1]=s=>t("save",s))}),null,16,["values","new"]))],8,tn)],512))}}),nn={class:"widget-table"},ze="update:selectedRows",rn=i.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1}},emits:["update:activeRow","save"],setup(e,{emit:t}){const n=e,r=i.useSlots(),o=i.computed(()=>{var u;return(u=r==null?void 0:r.default)==null?void 0:u.call(r)[0]});function s(u,c=!0){if(!n.selectedRows)return;if(!c)return t(ze,n.selectedRows.includes(u)?[]:[u]);const p=[...n.selectedRows],w=p.indexOf(u);return w===-1?p.push(u):p.splice(w,1),t(ze,p)}function g(u){console.log("core: handle activate",u),t("update:activeRow",u)}function l(u){t("save",u),t("update:activeRow",null)}const a=i.computed(()=>n.shortcut?n.config.filter(u=>u.name?!!n.array.find(p=>![null,""].includes(Se(u,p))):!0):n.config);return(u,c)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("table",nn,[i.createElementVNode("thead",null,[i.createVNode(Ht,{config:a.value},null,8,["config"])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.array,(p,w)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:w},[i.createVNode(en,{config:a.value,values:p,selected:u.selectedRows.includes(p),onSelect:m=>s(p,m),onActivate:m=>g(p),class:i.normalizeClass(u.classCallback?u.classCallback(p):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),o.value&&u.activeRow===p?(i.openBlock(),i.createBlock(je,{key:0,component:o.value,"row-length":u.config.length,values:p,onClose:c[0]||(c[0]=m=>t("update:activeRow",null)),onSave:l,"is-new":!1},null,8,["component","row-length","values"])):i.createCommentVNode("",!0)],64))),128)),u.activeRow===i.unref(S).LIST_ACTIVE_NEW?(i.openBlock(),i.createBlock(je,{key:0,component:o.value,"row-length":a.value.length,onClose:c[1]||(c[1]=p=>t("update:activeRow",null)),onSave:l,"is-new":!0},null,8,["component","row-length"])):i.createCommentVNode("",!0)])])]))}}),on=i.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:"widget-spinner",style:i.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}}),ji="",ce=z(on,[["__scopeId","data-v-0ef9ae88"]]),an={class:"widget-button"},sn=i.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("button",an,[t.wait?(i.openBlock(),i.createBlock(ce,{key:0,class:"widget-button-spinner"})):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0)]))}}),zi="",ln=z(sn,[["__scopeId","data-v-450dc564"]]),cn={class:"widget-multi-button-wrap position_relative cursor_pointer"},un={class:"widget-multi-button-body grid"},fn=["onClick"],dn={class:"widget-multi-button-side-wrap"},gn=i.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){const t=e;i.useCssVars(g=>({"7025434e":r.value}));const n=i.reactive({active:!1,wait:!1}),r=i.computed(()=>t.array.length+(t.label?1:0));function o(g){if(!(typeof g!="function"||n.wait))return n.wait=!0,Promise.resolve().then(g).finally(()=>{n.wait=!1})}function s(g=!n.active){n.active=g}return(g,l)=>(i.openBlock(),i.createElementBlock("div",cn,[i.createElementVNode("div",{class:i.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[i.createElementVNode("div",un,[g.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(g.label),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.array,(a,u)=>(i.openBlock(),i.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:c=>{o(a.callback),s(!1)}},i.toDisplayString(a.label),9,fn))),128))]),i.createElementVNode("div",dn,[i.createElementVNode("div",{class:i.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:l[1]||(l[1]=a=>s())},[n.wait?(i.openBlock(),i.createBlock(i.unref(ce),{key:0,class:"widget-multi-button-side-spinner"})):g.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)]))}}),Gi="",pn=z(gn,[["__scopeId","data-v-a8d711d1"]]),hn={class:"widget-loader flex flex-align_center gap_10 padding_15"},mn={class:"text_md"},yn=i.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",hn,[i.createVNode(ce,{color:"var(--primary)",class:"padding_10"}),i.createElementVNode("span",mn,i.toDisplayString(t.label),1)]))}}),wn=["alt","src"],En=i.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=i.ref();return i.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(r,o)=>(i.openBlock(),i.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:n,src:r.src||r.$props.default},null,8,wn))}}),bn={props:{config:Array,values:Object,selected:Boolean},setup:Re},Hi="",vn=z(bn,[["__scopeId","data-v-344a8cc1"]]),_n=e=>(i.pushScopeId("data-v-bf495d6a"),e=e(),i.popScopeId(),e),Tn={class:"widget-list-head-cell"},An=_n(()=>i.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Cn=i.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:t}){const n=e;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(r,o)=>(i.openBlock(),i.createElementBlock("th",null,[i.createElementVNode("div",Tn,[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(B.FormField),{key:0,type:"single-checkbox",onClick:o[0]||(o[0]=i.withModifiers(s=>t("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=>t("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),An])]))}}),Xi="",kn=z(Cn,[["__scopeId","data-v-bf495d6a"]]),Sn=i.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,r=i.ref(),o=i.ref();i.onMounted(()=>{function a(m,E){let T=-1;do T++,E-=m[T];while(E>0&&T<m.length);return T}function u(m,E){let T=0;for(;E>0&&E>m[T]&&T<m.length;)E-=m[T],T++;return console.log(E,T),T>0?T:0}function c(m){try{o.value.style.insetInlineStart=m+"px"}catch(E){console.log(E)}}function p(m){try{o.value.style.width=m+"px",o.value.style.minWidth=m+"px",o.value.style.maxWidth=m+"px"}catch(E){console.log(E)}}function w(m){return m===null?!1:m.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(E){var Ot;function T(V){return V.screenX+y-L}const A=r.value,d=[...A.children].filter(V=>V.localName==="th"),y=((Ot=A.offsetParent)==null?void 0:Ot.scrollLeft)||0,b=d.map(V=>V.clientWidth),R=w(E.target),L=A.getBoundingClientRect().left,U=T(E),h=a(b,U),v=b.slice(0,h).reduce((V,q)=>V+q,0),_=U-v,I=A.offsetWidth,$=d[h].clientWidth;if(n.config[h].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",E.screenX),console.log("Widths",b),console.log("max width",I),console.log("Start Position",U),console.log("Position From",h),console.log("Start Position",h),console.log("Global offset (Отступ самой таблицы от края экрана)",L),console.log("Del",_),console.groupEnd(),o.value.innerText=d[h].textContent||"",o.value.style.display="grid",o.value.style.width=$+"px",o.value.style.cursor="grabbing",c(v),p($),document.addEventListener("pointermove",Nt,{passive:!0}),document.addEventListener("pointerup",_e);function _e(V){if(console.group("END"),document.removeEventListener("pointermove",Nt),document.removeEventListener("pointerup",_e),R&&(n.config[h].width=o.value.style.width,n.config[h].minWidth=o.value.style.width,n.config[h].maxWidth=o.value.style.width,s(n.config)),!R){const q=V.screenX+y-L;console.log("ENP Position",q);const Te=u(b,q);if(console.log(h,"->",Te),Te!==h){const ae=n.config[h],Fe=n.config;Fe.splice(h,1),Fe.splice(Te,0,ae),s(Fe)}else{const ae=n.config[h].name;g(ae)}}o.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function Nt(V){if(R){const ae=T(V)-U+$;p(ae);return}let q=V.screenX+y-L-_;q<0&&(q=0),q+$>I&&(q=I-$),c(q)}})});function s(a){t("update:config",a)}function g(a){if(!a)return;if(Array.isArray(a)){if(a.length<1)return;a=a[0]}if(n.order.length===0||n.order[0]!==a)return void l([a]);const u=n.order.length===1||n.order[1]==="asc"?"asc":"desc";l([a,u==="asc"?"desc":"asc"])}function l(a){t("update:order",a)}return(a,u)=>(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,p)=>(i.openBlock(),i.createBlock(kn,i.mergeProps({key:c},c,{onOrder:w=>g(c.name),onSelect:u[0]||(u[0]=w=>t("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))}}),Ji="",In=z(Sn,[["__scopeId","data-v-ccffc6bd"]]),Rn={class:"widget-list"},Nn={class:"widget-list-body position_relative"},On=50,Ln=i.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:t}){const n=e;function r(l,a=!0){if(n.selectedRows)if(!a)s(n.selectedRows.includes(l)?[]:[l]);else{const u=[...n.selectedRows],c=u.indexOf(l);c===-1?u.push(l):u==null||u.splice(c,1),s(u)}}function o(){var l;if(((l=n.selectedRows)==null?void 0:l.length)!==n.array.length)return s([...n.array]);s([])}function s(l){t("update:selectedRows",l)}function g(l){if(!l)return;const a=l.target;a.scrollTop+a.clientHeight+On>a.scrollHeight&&t("scrollEnd")}return(l,a)=>(i.openBlock(),i.createElementBlock("div",{class:"es-list-container",onScrollPassive:g},[i.createElementVNode("table",Rn,[i.createElementVNode("thead",null,[i.createVNode(In,{onSelect:a[0]||(a[0]=u=>o()),"onUpdate:order":a[1]||(a[1]=u=>t("update:order",u)),"onUpdate:config":a[2]||(a[2]=u=>t("update:config",u)),config:l.config,order:l.order},null,8,["config","order"])]),i.createElementVNode("tbody",Nn,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.array,(u,c)=>{var p;return i.openBlock(),i.createBlock(vn,{key:c,class:"widget-list-row",values:u,config:l.config,selected:(p=l.selectedRows)==null?void 0:p.includes(u),onSelect:w=>r(u,w)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),$n=i.defineComponent({__name:"widget-field",props:{name:{},type:{}},setup(e){const t=e,n=bt(),r=vt(),o=i.computed(()=>{var w,m;if(!a.value)return{};const c=a.value,p=u(c);return{type:p,suffix:p==="number"?c.valueUnit:void 0,required:g.includes(p||"")?!1:c.required,disabled:!((w=l.value)!=null&&w.canSet),label:c.displayName,...((m=N.fieldParamsHandler)==null?void 0:m.call(N,c,p))||{}}}),s=["MultiText","MultiWideText"],g=["switch","single-checkbox","single-radio"],l=i.computed(()=>{var c;return(c=r==null?void 0:r.value)==null?void 0:c.fields[t.name]}),a=i.computed(()=>{if(!n.value)return null;const c=n.value.fieldsByName[t.name];return c?c.releatedLocalField?n.value.fieldsByName[c.releatedLocalField]:c:null});function u(c){return typeof t.type=="string"&&t.type.length!==0?t.type:c.type==="Reference"||c.type==="Owned"?c.referencedEntity:c.dataType==="Boolean"?"single-checkbox":c.dataType==="DateTime"?"date":c.dataType==="Integer"||c.dataType==="Decimal"?"number":c.dataType==="List"?c.aggregatedEntity:s.includes(c.presentationType)?"textarea":c.presentationType==="PhoneNumber"?"tel":"text"}return(c,p)=>(i.openBlock(),i.createBlock(i.unref(B.FormField),i.mergeProps({...c.$attrs,...o.value},{name:c.name}),null,16,["name"]))}});function Ge(e){return Ne(e,"YYYY/MM/DD HH:mm:ss")}function Ne(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return $t.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function Pn(e){function t(...r){return n.wait?Promise.reject("The process has already started."):(n.wait=!0,Promise.resolve().then(()=>e(...r)).finally(()=>{n.wait=!1}))}const n=i.reactive({wait:!1,call:t});return n}function ue(e){return typeof e=="string"?fe(e):Dn(e)?fe(e.message,e.children||e.details||[]):Bn(e)?fe(e.title,[e.detail||""]):fe(S.DEFAULT_ERROR_MESSAGE)}function Dn(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function Bn(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function fe(e,t=[]){return{message:e,children:t}}function M(e="error"){return function(t){const{message:n,children:r}=ue(t);ie.add(e,n,{children:r})}}function de(e,t={}){return O().emit("entity:read",{...t,entity:e})}function Oe(e,t){return O().emit("entity:update",{...t,entity:e})}function Fn(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function He(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let r=String(e).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(t,"0"),r[1].length>t&&(r[1]=r[1].substring(0,t)),r.join(".")}function Vn(e,t){const n=new Map;return e.forEach(r=>{var s;const o=t(r);n.has(o)||n.set(o,[]),(s=n.get(o))==null||s.push(r)}),n}function Mn(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function xn(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return S.DEFAULT_ERROR_MESSAGE}})}function D(e,t={}){return x.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=x.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(n=>xn(n).then(r=>{if(!n.ok)throw r;return r}))}function Wn(e,t=1e3){let n=0;return(...r)=>{clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Un(e,t){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...r)}}const qn=Ce(Ie("pretty-value-field-by-entity"));function jn(e,t,n){try{const r=ve.get(e);if(!r)throw new Error("For entity metadata is not loaded");const o=r.fieldsByName[t];if(!o)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return o.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(r){return qn('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',r,e,t,n),n}}const zn=1,Gn=5e3,Hn="static-folder",Xe="request-error",Xn="Distinguisher",X=Ce(Ie("use-socket"));function O(){return Yn}function Jn(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Yn=function(){let e=1,t,n;const r=new Set;let o=0;const s=new Set;function g(){if(t)o&&(clearTimeout(o),o=0);else return;o=setTimeout(()=>{t.close()},Gn*2);const d=new Uint8Array(1);d[0]=zn,t.send(d)}setInterval(()=>{Array.from(r).forEach(d=>{A(d)&&(X("Handler for event %s requestId %d was expired",d.event,d.requestId),d.requestId?a({requestId:d.requestId,event:Xe,data:{message:K.RequestTookToLong().message}}):r.delete(d))})},1e3),setInterval(()=>{(!t||t.readyState===3)&&u()},S.DELAY_SOCKET_RECONNECT);function l(){return{safeQueue:s,requestId:e,handlers:r,socketInstance:t}}function a(d){const y=[...r.values()];X("Handlers array length is %d. Response event: %s. Request id: %d",r.size,d.event,d.requestId),y.forEach(b=>{const R=d.requestId;(b.requestId&&b.requestId===R||!b.requestId&&b.event===d.event)&&(X("Find appropriated handler: %d, event: %s",e,b.event),b.callback(d.data,d),b.once&&(r.delete(b),X("Handler was removed by *once* params was passed. %o",b)))})}function u(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),t=new WebSocket(n),t.onclose=function(d){X("Connection to server was stopped: %d %s",d.code,d.reason),Array.from(r).forEach(y=>{y.guaranteedAnswer&&y.serializeString&&s.add(y.serializeString)})},t.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...s.values()].forEach(d=>{c(d),s.delete(d)})},t.onerror=function(d){console.warn(d)},t.onmessage=d=>{var y;try{if(Jn(d.data)){g();return}const b=JSON.parse(d.data);if(!Je(b)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(b);return}(y=b==null?void 0:b.data)!=null&&y.refresh&&location.reload(),a(b)}catch(b){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(b)}}}function c(d){t.send(d)}function p(d,y){T({event:d,callback:y})}function w(d,y){T({event:d,callback:y,once:!0})}function m(){return t&&(t==null?void 0:t.readyState)===1}function E(d,y,b){const R=++e,L=JSON.stringify({requestId:R,event:d,data:y,contextId:x.contextId,url:N.socketURLHandler?N.socketURLHandler():window.location.href});return m()?c(L):(s.add(L),X("Socket is not connected. Message was send to save-queue")),new Promise((U,h)=>{T({event:d,requestId:R,once:!0,guaranteedAnswer:!0,serializeString:L,callback:(v,_)=>{if(X("Promise was resolve with next data:",v),Kn(_))return void h(v);b&&b(v,_),U(v)},timeToLive:S.TIME_TO_LIVE_SOCKET_REQUEST})})}function T(d){const y={timeToLive:0,...d,created:new Date().getTime()};r.add(y)}function A(d){return d.timeToLive===0||typeof d.timeToLive!="number"?!1:new Date().getTime()-d.created>d.timeToLive}return{get socket(){return t},on:p,once:w,emit:E,initialization(d){n=d},getDevInfo:l}}(),Kn=e=>!!Je(e)&&e.event===Xe,Je=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function Qn(e,t){return O().emit("list-setting:read",{entity:e,mark:t})}function Zn(e,t){return O().emit("metadata-field:treat",{entity:e,fieldName:t})}function Ye(e,t){return O().emit("entity:create",{...t,entity:e})}function Ke(e,t){return O().emit("entity:delete",{...t,entity:e})}function er(e,t){return O().emit("usage-context:read",{...t,entity:e})}function Qe(e={}){return O().emit("tool:read",e)}function tr(){return O().emit("metadata-list:read",{})}function nr(e,t={},n={}){const r=i.inject(S.PROVIDE_NAME_ACTIONS,null),o=typeof e=="string"?e:t,s=typeof t=="string"?n:t;return i.computed(()=>{var a;const l=((typeof e=="string"?(a=r==null?void 0:r.actions)==null?void 0:a.value:i.unref(e))||[]).find(u=>u.name===o);return l?{...l,...s}:null})}function rr(e){return O().emit("history:read",e)}function ir(e,t){return O().emit("entity:count",{...t,entity:e})}function or(e){return`/${Hn}/${e}`}function Z(e){return{exec(t,n){switch(e.name){case"replace-boolean":return Z.replaceBoolean(t,e.values);case"replace-record-operation":return Z.replaceRecordOperation(t)}}}}Z.replaceBoolean=ar,Z.replaceRecordOperation=sr;function ar(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function sr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function lr(e={}){return O().emit("tool:execute",e)}function Ze(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=fr),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=gr),e.handleCloseForm===void 0&&(e.handleCloseForm=pr),e.handleValidationResult===void 0&&(e.handleValidationResult=dr),{...t,label:t.title,callback(){var o;const n=typeof e.values=="function"?e.values(t,e):e.values,r=()=>lr({name:t.name,values:n,usageContext:t.usageContext}).then(async s=>{var g,l;if(!cr(s))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const a of e.handlers)await a(t,s,e);if(!s.success)throw e.handleValidationResult&&s.validationEffect&&((l=(g=s.validationEffect)==null?void 0:g.results)!=null&&l.length)&&e.handleValidationResult(t,s.validationEffect,e),new Error(s.message);return s.message&&ie.add("info",s.message),Array.isArray(s.affectedEntities)&&e.handleAffectedEntity&&s.affectedEntities.forEach(a=>{var u;return(u=e.handleAffectedEntity)==null?void 0:u.call(e,t,a,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),s}).catch(M("error"));return(o=e.overrides)!=null&&o[t.name]?e.overrides[t.name](t,e):t.requireSave&&e.form&&e.form.changed?e.form.save().then(r):!t.confirmation||!e.handleConfirmation?r():e.handleConfirmation(t,r)}}}function cr(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function ur(e){const t="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?t:typeof e=="string"?e:t}async function fr(e,t){const n=ur(e.confirmation);if(!se.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await se.promptModal(S.MODAL_CONFIRM,{message:n}))return t()}function dr(e,t){const n=S.MODAL_VALIDATION_EFFECT;if(!se.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{se.pushModal(n,t)})}function gr(e,t,n){var g;const{router:r,form:o}=n,s=(g=t.primaryKey)==null?void 0:g.Id;if(r&&t&&t.name===e.redirectEntity)return r.push({name:t.name,params:{id:s}});o&&t.name===o.name&&t.updated&&s===o.id&&o.read()}function pr(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}let J={};function ee(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=B.utils.getPropFromObject((this==null?void 0:this.vocabulary)||J,e);if(typeof n=="string")return et(n,t);const r=B.utils.getPropFromObject(J==null?void 0:J.root,e);return typeof r=="string"?et(r,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function et(e,t){return t.forEach((n,r)=>{e=e.replaceAll(new RegExp(`\\{${r}}`,"g"),n)}),e}ee.setGlobalVocabulary=function(e){J=e},ee.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),ee.bind({vocabulary:B.utils.getPropFromObject(J,t.toLowerCase())})},ee.setVocabulary=function(e){return typeof e=="string"&&(e=B.utils.getPropFromObject(J,e)),ee.bind({vocabulary:e})};function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Le={exports:{}},C={},$e={exports:{}},Y={};function tt(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function mr(e,t,n){}function yr(e,t,n){}var wr=/javascript\s*\:/img;function Er(e,t){return wr.test(t)?"":t}Y.whiteList=tt(),Y.getDefaultWhiteList=tt,Y.onAttr=mr,Y.onIgnoreAttr=yr,Y.safeAttrValue=Er;var br={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,o;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},re=br;function vr(e,t){e=re.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,r=!1,o=0,s=0,g="";function l(){if(!r){var c=re.trim(e.slice(o,s)),p=c.indexOf(":");if(p!==-1){var w=re.trim(c.slice(0,p)),m=re.trim(c.slice(p+1));if(w){var E=t(o,g.length,w,m,c);E&&(g+=E+"; ")}}}o=s+1}for(;s<n;s++){var a=e[s];if(a==="/"&&e[s+1]==="*"){var u=e.indexOf("*/",s+2);if(u===-1)break;s=u+1,o=s+1,r=!1}else a==="("?r=!0:a===")"?r=!1:a===";"?r||l():a===`
6
+ Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?k.ApiNotAvailable():new k(t||"Authorization Error",n)}static ApiResponseParseFailed(){return k.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new k("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new k(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new k("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new k("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new k(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new k(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,r){return new k(`Array already includes the element with value ${t}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(t){return new k(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new k("The request took too long to complete. Try again later.")}};Me.ID=0;let K=Me;const Pt="Please try again later or submit a feedback if problem doesn't go.";function Dt(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return Pt}})}function j(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw K.ApiNotAvailable()}).then(n=>Dt(n).then(r=>{if(!n.ok)throw r;return r}))}class Bt{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,r)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(r)}`),t[n]=r,!0)}),window._journal=this}get error(){return{add:(...t)=>{this.errors.push(t)},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")}}new Bt;function xe(e){return{...e,createdEntities:e.createdEntites}}const We=class Ae{static async getStartConfig(t,n){return j([Ae.url,t,n].join("/"),{method:"GET",headers:{"Content-Type":"application/json"}})}static async startProcess(t,n){return j([Ae.url,t,n].join("/"),{method:"POST",headers:{"Content-Type":"application/json"}}).then(xe)}static async runStep(t,n,r,o,s){return j([Ae.url,t,n].join("/"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({stepName:r,token:o,values:s})}).then(xe)}};We.url="/close-api/views/process-wizard";let le=We;class Ft{static invite(t,n,r){return j("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:r})})}static accept(t,n){return j("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!0})})}static decline(t,n){return j("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class Vt{static getRequiredDocuments(t,n,r){const o=new URLSearchParams({entity:t,primaryKey:n,statusCode:r});return fetch(`/close-api/views/required-documents?${o.toString()}`).then(s=>s.json())}}class Q{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${Q.url()}/calculator/${t}`)}static calculate(t,n){return j(`/${Q.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(r=>{if(r&&r.status===1)return r;throw Array.isArray(r.notes)?new Error(r.notes[0]):K.ApiNotAvailable()})}static parseMetadataField(t){function n(r){switch(r.type){case"ValueType":switch(r.dataType){case"Integer":return"number";default:return r.dataType}case"EntityReference":return r.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return j(`/${Q.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return j(`/${Q.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}function Mt(e){return e.statusName==="Completed"}function xt(e){return e.statusName==="FinalStepWithConfirmation"}function Wt(e){return e.statusName==="ValidationError"}function Ut(e,t,n){let r=null;const o=i.reactive({wait:null});let s=[],g=null;const l=i.ref(null);function a(){l.value=s.find(d=>d.name===g)||null}function u(){var d;return g?((d=s.find(y=>y.name===g))==null?void 0:d.fields)||[]:[]}function c(d){if(a(),Wt(d))return void n.onValidation(d.validationResults);if((d.statusName==="FinalStep"||d.statusName==="NextStep")&&(!u().length||qt(u(),n.presets)))return A(n.presets||{});Mt(d)&&n.onCompleted(d),xt(d)&&n.onConfirmation(d)}async function p(){try{await w(),await T()}catch(d){const{message:y}=ue(d);ie.add("error",y)}}function w(){return o.wait="Loading process information.",le.getStartConfig(t,e).then(d=>{s=d.steps.map(y=>({label:y.title,name:y.stepName,number:y.number,fields:y.frontendEntity.objectTypes.reduce((b,R)=>(R.properties.forEach(L=>{b.push({name:L.name,label:L.title,type:L.refEntityName||L.dataType})}),b),[])}))}).then(d=>(o.wait=!1,d))}function m(d){return["FinalStepWithConfirmation","NextStep","Completed","FinalStep"].includes(d.statusName)&&(r=d.token,g=d.nextStepName),d}function E(d){const y=ue(d);ie.add("error",y.message)}function T(){return o.wait="Starting process",le.startProcess(t,e).then(m).then(c).catch(E).finally(()=>{o.wait=null})}function A(d={}){return!r||!g?Promise.reject("Not step or token."):(o.wait="Waiting for result...",le.runStep(t,e,g,r,d).then(m).then(c).catch(E).finally(()=>{o.wait=!1}))}return{initialize:p,state:o,currentStepConfig:i.readonly(l),next:A}}function qt(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(!B.utils.getPropFromObject(t,r.name))return!1}return!0}const jt={class:"widget-table__head"},zt={class:"widget-table__head-label margin_0 text_overflow"},Gt=i.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("tr",jt,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.config,(r,o)=>(i.openBlock(),i.createElementBlock("th",{class:"widget-table__head-cell",key:o},[i.createElementVNode("p",zt,i.toDisplayString(r.label),1)]))),128))]))}}),Wi="",z=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Ht=z(Gt,[["__scopeId","data-v-25198f4a"]]);function Ue(e){return typeof e.name=="string"?e.name:Array.isArray(e.name)?e.name[0]:null}function Xt(e){const t=new RegExp(/\$\{([a-zA-Z0-9.]+)}/,"g"),n=[];let r;for(;(r=t.exec(e))!==null;)n.push(r[1]);return n}function Jt(e,t){return Xt(e).forEach(r=>{e=e.replace(new RegExp("\\$\\{"+r+"}","g"),B.utils.getPropFromObject(t,r))}),e}function ke(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function Se(e,t){const n=Ue(e);if(typeof e.value=="string")return Jt(e.value,t);let r=n?B.utils.getPropFromObject(t,n):null;if(r===void 0&&(r=null),typeof e.value=="function")return e.value(r,t);if(e.value===null)return null;if(e.unitValue&&(r=ke(e.unitValue)(r)),e.unit&&(r=ke(e.unit)(r)),e.type)switch(e.type){case"number":{typeof r=="number"&&(r=new Intl.NumberFormat().format(r));break}case"date":{r=Ne(typeof r=="string"?r:null);break}case"dateTime":case"dateWithTime":{r=Ge(typeof r=="string"?r:null);break}case"money":{r=He(r);break}}return e.formatter&&(r=Z(e.formatter).exec(r,t)),typeof r=="boolean"&&(r=r?"✓":"—"),r}const S={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",TIME_TO_LIVE_SOCKET_REQUEST:3e4,CORE_DEBUG_LABEL:"eservices-core"};function Ie(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const N={};function Yt(e){for(let t in e)N[t]=e[t]}const Ui="",ne=z({props:{name:String},setup(e,t){let n="unknown";try{n=t.slots.default()[0].children}catch{n=e.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>i.h("i",{class:N.iconHandler?N.iconHandler(n):`icon icon-${n}`})}},[["__scopeId","data-v-90f57c16"]]),Kt=Ce(Ie("setup-list-row"));function Qt(e,t){const n=e.config.map(r=>Zt(r,e,t));return i.h("tr",{class:"widget-table__row widget-table-row"},n)}function Zt(e,t,n){const r=t.values;let o=Se(e,r);const s={onClick:[],class:["widget-table__cell widget-table-cell"]};function g(c){s.onClick.push(()=>c(r,e,n))}function l(c){Array.isArray(c)?s.class.push(...c):s.class.push(c)}const a=[],u=[];if(e.hide&&e.hide(r))return[i.h("td")];if(e.type)switch(l(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(i.h(B.FormField,{type:"single-checkbox",modelValue:t.selected})),g(qe.bind(null,n,!0));break}case"select":{u.push(i.h(B.FormField,{type:"single-radio",modelValue:t.selected})),g(qe.bind(null,n,!1));break}}if(e.onClick&&g(e.onClick),e.link)try{const c=e.link(r);if(c){const p=i.h(Ve.RouterLink,{to:c});u.push(p),l("widget-table-cell_link")}}catch(c){Kt("Can't add router link",c)}if(e.href&&(u.push(i.h("a",{href:e.href(r),target:"_blank"})),l("widget-table-cell_link")),(typeof o=="string"||typeof o=="number")&&u.push(i.h("p",{class:"widget-list-cell-text"},o)),e.icon&&(typeof e.icon=="string"&&u.push(i.h(ne,{name:e.icon})),typeof e.icon=="function")){const c=e.icon(r);c!==null&&u.push(i.h(ne,{name:c}))}return e.class&&(typeof e.class=="function"?l(e.class(r)):l(e.class)),N.listCellHandler&&N.listCellHandler(e,r,{cellNodeChildren:u,addClass:l,addHandleClick:g,context:n}),a.push(i.h("td",s,u)),a}function qe(e,t){e.emit("select",t)}function Re(e,t){return()=>{try{return Qt(e,t)}catch(n){return console.warn(n),null}}}const en={props:{values:Object,config:Object,selected:Boolean},setup:Re},tn=["colspan"],je=i.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=i.ref();return i.onMounted(()=>{setTimeout(()=>{n.value&&n.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(r,o)=>(i.openBlock(),i.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:n},[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=>t("close")),onSave:o[1]||(o[1]=s=>t("save",s))}),null,16,["values","new"]))],8,tn)],512))}}),nn={class:"widget-table"},ze="update:selectedRows",rn=i.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1}},emits:["update:activeRow","save"],setup(e,{emit:t}){const n=e,r=i.useSlots(),o=i.computed(()=>{var u;return(u=r==null?void 0:r.default)==null?void 0:u.call(r)[0]});function s(u,c=!0){if(!n.selectedRows)return;if(!c)return t(ze,n.selectedRows.includes(u)?[]:[u]);const p=[...n.selectedRows],w=p.indexOf(u);return w===-1?p.push(u):p.splice(w,1),t(ze,p)}function g(u){console.log("core: handle activate",u),t("update:activeRow",u)}function l(u){t("save",u),t("update:activeRow",null)}const a=i.computed(()=>n.shortcut?n.config.filter(u=>u.name?!!n.array.find(p=>![null,""].includes(Se(u,p))):!0):n.config);return(u,c)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("table",nn,[i.createElementVNode("thead",null,[i.createVNode(Ht,{config:a.value},null,8,["config"])]),i.createElementVNode("tbody",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.array,(p,w)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:w},[i.createVNode(en,{config:a.value,values:p,selected:u.selectedRows.includes(p),onSelect:m=>s(p,m),onActivate:m=>g(p),class:i.normalizeClass(u.classCallback?u.classCallback(p):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),o.value&&u.activeRow===p?(i.openBlock(),i.createBlock(je,{key:0,component:o.value,"row-length":u.config.length,values:p,onClose:c[0]||(c[0]=m=>t("update:activeRow",null)),onSave:l,"is-new":!1},null,8,["component","row-length","values"])):i.createCommentVNode("",!0)],64))),128)),u.activeRow===i.unref(S).LIST_ACTIVE_NEW?(i.openBlock(),i.createBlock(je,{key:0,component:o.value,"row-length":a.value.length,onClose:c[1]||(c[1]=p=>t("update:activeRow",null)),onSave:l,"is-new":!0},null,8,["component","row-length"])):i.createCommentVNode("",!0)])])]))}}),on=i.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:"widget-spinner",style:i.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}}),ji="",ce=z(on,[["__scopeId","data-v-0ef9ae88"]]),an={class:"widget-button"},sn=i.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("button",an,[t.wait?(i.openBlock(),i.createBlock(ce,{key:0,class:"widget-button-spinner"})):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0)]))}}),zi="",ln=z(sn,[["__scopeId","data-v-450dc564"]]),cn={class:"widget-multi-button-wrap position_relative cursor_pointer"},un={class:"widget-multi-button-body grid"},fn=["onClick"],dn={class:"widget-multi-button-side-wrap"},gn=i.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){const t=e;i.useCssVars(g=>({"7025434e":r.value}));const n=i.reactive({active:!1,wait:!1}),r=i.computed(()=>t.array.length+(t.label?1:0));function o(g){if(!(typeof g!="function"||n.wait))return n.wait=!0,Promise.resolve().then(g).finally(()=>{n.wait=!1})}function s(g=!n.active){n.active=g}return(g,l)=>(i.openBlock(),i.createElementBlock("div",cn,[i.createElementVNode("div",{class:i.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[i.createElementVNode("div",un,[g.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(g.label),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.array,(a,u)=>(i.openBlock(),i.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:c=>{o(a.callback),s(!1)}},i.toDisplayString(a.label),9,fn))),128))]),i.createElementVNode("div",dn,[i.createElementVNode("div",{class:i.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:l[1]||(l[1]=a=>s())},[n.wait?(i.openBlock(),i.createBlock(i.unref(ce),{key:0,class:"widget-multi-button-side-spinner"})):g.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)]))}}),Gi="",pn=z(gn,[["__scopeId","data-v-a8d711d1"]]),hn={class:"widget-loader flex flex-align_center gap_10 padding_15"},mn={class:"text_md"},yn=i.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",hn,[i.createVNode(ce,{color:"var(--primary)",class:"padding_10"}),i.createElementVNode("span",mn,i.toDisplayString(t.label),1)]))}}),wn=["alt","src"],En=i.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=i.ref();return i.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(r,o)=>(i.openBlock(),i.createElementBlock("img",{alt:r.alt,ref_key:"refImage",ref:n,src:r.src||r.$props.default},null,8,wn))}}),bn={props:{config:Array,values:Object,selected:Boolean},setup:Re},Hi="",vn=z(bn,[["__scopeId","data-v-344a8cc1"]]),_n=e=>(i.pushScopeId("data-v-bf495d6a"),e=e(),i.popScopeId(),e),Tn={class:"widget-list-head-cell"},An=_n(()=>i.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Cn=i.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:t}){const n=e;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(r,o)=>(i.openBlock(),i.createElementBlock("th",null,[i.createElementVNode("div",Tn,[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(B.FormField),{key:0,type:"single-checkbox",onClick:o[0]||(o[0]=i.withModifiers(s=>t("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=>t("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),An])]))}}),Xi="",kn=z(Cn,[["__scopeId","data-v-bf495d6a"]]),Sn=i.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,r=i.ref(),o=i.ref();i.onMounted(()=>{function a(m,E){let T=-1;do T++,E-=m[T];while(E>0&&T<m.length);return T}function u(m,E){let T=0;for(;E>0&&E>m[T]&&T<m.length;)E-=m[T],T++;return console.log(E,T),T>0?T:0}function c(m){try{o.value.style.insetInlineStart=m+"px"}catch(E){console.log(E)}}function p(m){try{o.value.style.width=m+"px",o.value.style.minWidth=m+"px",o.value.style.maxWidth=m+"px"}catch(E){console.log(E)}}function w(m){return m===null?!1:m.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(E){var Ot;function T(V){return V.screenX+y-L}const A=r.value,d=[...A.children].filter(V=>V.localName==="th"),y=((Ot=A.offsetParent)==null?void 0:Ot.scrollLeft)||0,b=d.map(V=>V.clientWidth),R=w(E.target),L=A.getBoundingClientRect().left,U=T(E),h=a(b,U),v=b.slice(0,h).reduce((V,q)=>V+q,0),_=U-v,I=A.offsetWidth,$=d[h].clientWidth;if(n.config[h].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",E.screenX),console.log("Widths",b),console.log("max width",I),console.log("Start Position",U),console.log("Position From",h),console.log("Start Position",h),console.log("Global offset (Отступ самой таблицы от края экрана)",L),console.log("Del",_),console.groupEnd(),o.value.innerText=d[h].textContent||"",o.value.style.display="grid",o.value.style.width=$+"px",o.value.style.cursor="grabbing",c(v),p($),document.addEventListener("pointermove",Nt,{passive:!0}),document.addEventListener("pointerup",_e);function _e(V){if(console.group("END"),document.removeEventListener("pointermove",Nt),document.removeEventListener("pointerup",_e),R&&(n.config[h].width=o.value.style.width,n.config[h].minWidth=o.value.style.width,n.config[h].maxWidth=o.value.style.width,s(n.config)),!R){const q=V.screenX+y-L;console.log("ENP Position",q);const Te=u(b,q);if(console.log(h,"->",Te),Te!==h){const ae=n.config[h],Fe=n.config;Fe.splice(h,1),Fe.splice(Te,0,ae),s(Fe)}else{const ae=n.config[h].name;g(ae)}}o.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function Nt(V){if(R){const ae=T(V)-U+$;p(ae);return}let q=V.screenX+y-L-_;q<0&&(q=0),q+$>I&&(q=I-$),c(q)}})});function s(a){t("update:config",a)}function g(a){if(!a)return;if(Array.isArray(a)){if(a.length<1)return;a=a[0]}if(n.order.length===0||n.order[0]!==a)return void l([a]);const u=n.order.length===1||n.order[1]==="asc"?"asc":"desc";l([a,u==="asc"?"desc":"asc"])}function l(a){t("update:order",a)}return(a,u)=>(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,p)=>(i.openBlock(),i.createBlock(kn,i.mergeProps({key:c},c,{onOrder:w=>g(c.name),onSelect:u[0]||(u[0]=w=>t("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))}}),Ji="",In=z(Sn,[["__scopeId","data-v-ccffc6bd"]]),Rn={class:"widget-list"},Nn={class:"widget-list-body position_relative"},On=50,Ln=i.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:t}){const n=e;function r(l,a=!0){if(n.selectedRows)if(!a)s(n.selectedRows.includes(l)?[]:[l]);else{const u=[...n.selectedRows],c=u.indexOf(l);c===-1?u.push(l):u==null||u.splice(c,1),s(u)}}function o(){var l;if(((l=n.selectedRows)==null?void 0:l.length)!==n.array.length)return s([...n.array]);s([])}function s(l){t("update:selectedRows",l)}function g(l){if(!l)return;const a=l.target;a.scrollTop+a.clientHeight+On>a.scrollHeight&&t("scrollEnd")}return(l,a)=>(i.openBlock(),i.createElementBlock("div",{class:"es-list-container",onScrollPassive:g},[i.createElementVNode("table",Rn,[i.createElementVNode("thead",null,[i.createVNode(In,{onSelect:a[0]||(a[0]=u=>o()),"onUpdate:order":a[1]||(a[1]=u=>t("update:order",u)),"onUpdate:config":a[2]||(a[2]=u=>t("update:config",u)),config:l.config,order:l.order},null,8,["config","order"])]),i.createElementVNode("tbody",Nn,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.array,(u,c)=>{var p;return i.openBlock(),i.createBlock(vn,{key:c,class:"widget-list-row",values:u,config:l.config,selected:(p=l.selectedRows)==null?void 0:p.includes(u),onSelect:w=>r(u,w)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),$n=i.defineComponent({__name:"widget-field",props:{name:{},type:{}},setup(e){const t=e,n=bt(),r=vt(),o=i.computed(()=>{var w,m;if(!a.value)return{};const c=a.value,p=u(c);return{type:p,suffix:p==="number"?c.valueUnit:void 0,required:g.includes(p||"")?!1:c.required,disabled:!((w=l.value)!=null&&w.canSet),label:c.displayName,...((m=N.fieldParamsHandler)==null?void 0:m.call(N,c,p))||{}}}),s=["MultiText","MultiWideText"],g=["switch","single-checkbox","single-radio"],l=i.computed(()=>{var c;return(c=r==null?void 0:r.value)==null?void 0:c.fields[t.name]}),a=i.computed(()=>{if(!n.value)return null;const c=n.value.fieldsByName[t.name];return c?c.releatedLocalField?n.value.fieldsByName[c.releatedLocalField]:c:null});function u(c){return typeof t.type=="string"&&t.type.length!==0?t.type:c.type==="Reference"||c.type==="Owned"?c.referencedEntity:c.dataType==="Boolean"?"single-checkbox":c.dataType==="DateTime"?"date":c.dataType==="Integer"||c.dataType==="Decimal"?"number":c.dataType==="List"?c.aggregatedEntity:s.includes(c.presentationType)?"textarea":c.presentationType==="PhoneNumber"?"tel":"text"}return(c,p)=>(i.openBlock(),i.createBlock(i.unref(B.FormField),i.mergeProps({...c.$attrs,...o.value},{name:c.name}),null,16,["name"]))}});function Ge(e){return Ne(e,"YYYY/MM/DD HH:mm:ss")}function Ne(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return $t.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function Pn(e){function t(...r){return n.wait?Promise.reject("The process has already started."):(n.wait=!0,Promise.resolve().then(()=>e(...r)).finally(()=>{n.wait=!1}))}const n=i.reactive({wait:!1,call:t});return n}function ue(e){return typeof e=="string"?fe(e):Dn(e)?fe(e.message,e.children||e.details||[]):Bn(e)?fe(e.title,[e.detail||""]):fe(S.DEFAULT_ERROR_MESSAGE)}function Dn(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function Bn(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function fe(e,t=[]){return{message:e,children:t}}function M(e="error"){return function(t){const{message:n,children:r}=ue(t);ie.add(e,n,{children:r})}}function de(e,t={}){return O().emit("entity:read",{...t,entity:e})}function Oe(e,t){return O().emit("entity:update",{...t,entity:e})}function Fn(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function He(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let r=String(e).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),r.length<2&&(r[1]=""),r[1]=r[1].padEnd(t,"0"),r[1].length>t&&(r[1]=r[1].substring(0,t)),r.join(".")}function Vn(e,t){const n=new Map;return e.forEach(r=>{var s;const o=t(r);n.has(o)||n.set(o,[]),(s=n.get(o))==null||s.push(r)}),n}function Mn(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function xn(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return S.DEFAULT_ERROR_MESSAGE}})}function D(e,t={}){return x.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=x.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(n=>xn(n).then(r=>{if(!n.ok)throw r;return r}))}function Wn(e,t=1e3){let n=0;return(...r)=>{clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Un(e,t){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...r)}}const qn=Ce(Ie("pretty-value-field-by-entity"));function jn(e,t,n){try{const r=ve.get(e);if(!r)throw new Error("For entity metadata is not loaded");const o=r.fieldsByName[t];if(!o)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return o.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(r){return qn('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',r,e,t,n),n}}const zn=1,Gn=5e3,Hn="static-folder",Xe="request-error",Xn="Distinguisher",X=Ce(Ie("use-socket"));function O(){return Yn}function Jn(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Yn=function(){let e=1,t,n;const r=new Set;let o=0;const s=new Set;function g(){if(t)o&&(clearTimeout(o),o=0);else return;o=setTimeout(()=>{t.close()},Gn*2);const d=new Uint8Array(1);d[0]=zn,t.send(d)}setInterval(()=>{Array.from(r).forEach(d=>{A(d)&&(X("Handler for event %s requestId %d was expired",d.event,d.requestId),d.requestId?a({requestId:d.requestId,event:Xe,data:{message:K.RequestTookToLong().message}}):r.delete(d))})},1e3),setInterval(()=>{(!t||t.readyState===3)&&u()},S.DELAY_SOCKET_RECONNECT);function l(){return{safeQueue:s,requestId:e,handlers:r,socketInstance:t}}function a(d){const y=[...r.values()];X("Handlers array length is %d. Response event: %s. Request id: %d",r.size,d.event,d.requestId),y.forEach(b=>{const R=d.requestId;(b.requestId&&b.requestId===R||!b.requestId&&b.event===d.event)&&(X("Find appropriated handler: %d, event: %s",e,b.event),b.callback(d.data,d),b.once&&(r.delete(b),X("Handler was removed by *once* params was passed. %o",b)))})}function u(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),t=new WebSocket(n),t.onclose=function(d){X("Connection to server was stopped: %d %s",d.code,d.reason),Array.from(r).forEach(y=>{y.guaranteedAnswer&&y.serializeString&&s.add(y.serializeString)})},t.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...s.values()].forEach(d=>{c(d),s.delete(d)})},t.onerror=function(d){console.warn(d)},t.onmessage=d=>{var y;try{if(Jn(d.data)){g();return}const b=JSON.parse(d.data);if(!Je(b)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(b);return}(y=b==null?void 0:b.data)!=null&&y.refresh&&location.reload(),a(b)}catch(b){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(b)}}}function c(d){t.send(d)}function p(d,y){T({event:d,callback:y})}function w(d,y){T({event:d,callback:y,once:!0})}function m(){return t&&(t==null?void 0:t.readyState)===1}function E(d,y,b){const R=++e,L=JSON.stringify({requestId:R,event:d,data:y,contextId:x.contextId,url:N.socketURLHandler?N.socketURLHandler():window.location.href});return m()?c(L):(s.add(L),X("Socket is not connected. Message was send to save-queue")),new Promise((U,h)=>{T({event:d,requestId:R,once:!0,guaranteedAnswer:!0,serializeString:L,callback:(v,_)=>{if(X("Promise was resolve with next data:",v),Kn(_))return void h(v);b&&b(v,_),U(v)},timeToLive:S.TIME_TO_LIVE_SOCKET_REQUEST})})}function T(d){const y={timeToLive:0,...d,created:new Date().getTime()};r.add(y)}function A(d){return d.timeToLive===0||typeof d.timeToLive!="number"?!1:new Date().getTime()-d.created>d.timeToLive}return{get socket(){return t},on:p,once:w,emit:E,initialization(d){n=d},getDevInfo:l}}(),Kn=e=>!!Je(e)&&e.event===Xe,Je=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function Qn(e,t){return O().emit("list-setting:read",{entity:e,mark:t})}function Zn(e,t){return O().emit("metadata-field:treat",{entity:e,fieldName:t})}function Ye(e,t){return O().emit("entity:create",{...t,entity:e})}function Ke(e,t){return O().emit("entity:delete",{...t,entity:e})}function er(e,t){return O().emit("usage-context:read",{...t,entity:e})}function Qe(e={}){return O().emit("tool:read",e)}function tr(){return O().emit("metadata-list:read",{})}function nr(e,t={},n={}){const r=i.inject(S.PROVIDE_NAME_ACTIONS,null),o=typeof e=="string"?e:t,s=typeof t=="string"?n:t;return i.computed(()=>{var a;const l=((typeof e=="string"?(a=r==null?void 0:r.actions)==null?void 0:a.value:i.unref(e))||[]).find(u=>u.name===o);return l?{...l,...s}:null})}function rr(e){return O().emit("history:read",e)}function ir(e,t){return O().emit("entity:count",{...t,entity:e})}function or(e){return`/${Hn}/${e}`}function Z(e){return{exec(t,n){switch(e.name){case"replace-boolean":return Z.replaceBoolean(t,e.values);case"replace-record-operation":return Z.replaceRecordOperation(t)}}}}Z.replaceBoolean=ar,Z.replaceRecordOperation=sr;function ar(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function sr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function lr(e={}){return O().emit("tool:execute",e)}function Ze(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=fr),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=gr),e.handleCloseForm===void 0&&(e.handleCloseForm=pr),e.handleValidationResult===void 0&&(e.handleValidationResult=dr),{...t,label:t.title,callback(){var o;const n=typeof e.values=="function"?e.values(t,e):e.values,r=()=>lr({name:t.name,values:n,usageContext:t.usageContext}).then(async s=>{var g,l;if(!cr(s))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const a of e.handlers)await a(t,s,e);if(!s.success)throw e.handleValidationResult&&s.validationEffect&&((l=(g=s.validationEffect)==null?void 0:g.results)!=null&&l.length)&&e.handleValidationResult(t,s.validationEffect,e),new Error(s.message);return s.message&&ie.add("info",s.message),Array.isArray(s.affectedEntities)&&e.handleAffectedEntity&&s.affectedEntities.forEach(a=>{var u;return(u=e.handleAffectedEntity)==null?void 0:u.call(e,t,a,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),s}).catch(M("error"));return(o=e.overrides)!=null&&o[t.name]?e.overrides[t.name](t,e):t.requireSave&&e.form&&e.form.changed?e.form.save().then(r):!t.confirmation||!e.handleConfirmation?r():e.handleConfirmation(t,r)}}}function cr(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function ur(e){const t="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?t:typeof e=="string"?e:t}async function fr(e,t){const n=ur(e.confirmation);if(!se.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await se.promptModal(S.MODAL_CONFIRM,{message:n}))return t()}function dr(e,t){const n=S.MODAL_VALIDATION_EFFECT;if(!se.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{se.pushModal(n,t)})}function gr(e,t,n){var g;const{router:r,form:o}=n,s=(g=t.primaryKey)==null?void 0:g.Id;if(r&&t&&t.name===e.redirectEntity)return r.push({name:t.name,params:{id:s}});o&&t.name===o.name&&t.updated&&s===o.id&&o.read()}function pr(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}let J={};function ee(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=B.utils.getPropFromObject((this==null?void 0:this.vocabulary)||J,e);if(typeof n=="string")return et(n,t);const r=B.utils.getPropFromObject(J==null?void 0:J.root,e);return typeof r=="string"?et(r,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function et(e,t){return t.forEach((n,r)=>{e=e.replaceAll(new RegExp(`\\{${r}}`,"g"),n)}),e}ee.setGlobalVocabulary=function(e){J=e},ee.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),ee.bind({vocabulary:B.utils.getPropFromObject(J,t.toLowerCase())})},ee.setVocabulary=function(e){return typeof e=="string"&&(e=B.utils.getPropFromObject(J,e)),ee.bind({vocabulary:e})};function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Le={exports:{}},C={},$e={exports:{}},Y={};function tt(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function mr(e,t,n){}function yr(e,t,n){}var wr=/javascript\s*\:/img;function Er(e,t){return wr.test(t)?"":t}Y.whiteList=tt(),Y.getDefaultWhiteList=tt,Y.onAttr=mr,Y.onIgnoreAttr=yr,Y.safeAttrValue=Er;var br={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,o;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},re=br;function vr(e,t){e=re.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,r=!1,o=0,s=0,g="";function l(){if(!r){var c=re.trim(e.slice(o,s)),p=c.indexOf(":");if(p!==-1){var w=re.trim(c.slice(0,p)),m=re.trim(c.slice(p+1));if(w){var E=t(o,g.length,w,m,c);E&&(g+=E+"; ")}}}o=s+1}for(;s<n;s++){var a=e[s];if(a==="/"&&e[s+1]==="*"){var u=e.indexOf("*/",s+2);if(u===-1)break;s=u+1,o=s+1,r=!1}else a==="("?r=!0:a===")"?r=!1:a===";"?r||l():a===`
7
7
  `&&l()}return re.trim(g)}var _r=vr,ge=Y,Tr=_r;function nt(e){return e==null}function Ar(e){var t={};for(var n in e)t[n]=e[n];return t}function rt(e){e=Ar(e||{}),e.whiteList=e.whiteList||ge.whiteList,e.onAttr=e.onAttr||ge.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||ge.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||ge.safeAttrValue,this.options=e}rt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,o=n.onAttr,s=n.onIgnoreAttr,g=n.safeAttrValue,l=Tr(e,function(a,u,c,p,w){var m=r[c],E=!1;if(m===!0?E=m:typeof m=="function"?E=m(p):m instanceof RegExp&&(E=m.test(p)),E!==!0&&(E=!1),p=g(c,p),!!p){var T={position:u,sourcePosition:a,source:w,isWhite:E};if(E){var A=o(c,p,T);return nt(A)?c+":"+p:A}else{var A=s(c,p,T);if(!nt(A))return A}}});return l};var Cr=rt;(function(e,t){var n=Y,r=Cr;function o(g,l){var a=new r(l);return a.process(g)}t=e.exports=o,t.FilterCSS=r;for(var s in n)t[s]=n[s];typeof window<"u"&&(window.filterCSS=e.exports)})($e,$e.exports);var Pe=$e.exports,De={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,o;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}},kr=Pe.FilterCSS,Sr=Pe.getDefaultWhiteList,pe=De;function it(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var ot=new kr;function Ir(e,t,n){}function Rr(e,t,n){}function Nr(e,t,n){}function Or(e,t,n){}function at(e){return e.replace($r,"&lt;").replace(Pr,"&gt;")}function Lr(e,t,n,r){if(n=pt(n),t==="href"||t==="src"){if(n=pe.trim(n),n==="#")return"#";if(!(n.substr(0,7)==="http://"||n.substr(0,8)==="https://"||n.substr(0,7)==="mailto:"||n.substr(0,4)==="tel:"||n.substr(0,11)==="data:image/"||n.substr(0,6)==="ftp://"||n.substr(0,2)==="./"||n.substr(0,3)==="../"||n[0]==="#"||n[0]==="/"))return""}else if(t==="background"){if(he.lastIndex=0,he.test(n))return""}else if(t==="style"){if(st.lastIndex=0,st.test(n)||(lt.lastIndex=0,lt.test(n)&&(he.lastIndex=0,he.test(n))))return"";r!==!1&&(r=r||ot,n=r.process(n))}return n=ht(n),n}var $r=/</g,Pr=/>/g,Dr=/"/g,Br=/&quot;/g,Fr=/&#([a-zA-Z0-9]*);?/gim,Vr=/&colon;?/gim,Mr=/&newline;?/gim,he=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,st=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,lt=/u\s*r\s*l\s*\(.*/gi;function ct(e){return e.replace(Dr,"&quot;")}function ut(e){return e.replace(Br,'"')}function ft(e){return e.replace(Fr,function(n,r){return r[0]==="x"||r[0]==="X"?String.fromCharCode(parseInt(r.substr(1),16)):String.fromCharCode(parseInt(r,10))})}function dt(e){return e.replace(Vr,":").replace(Mr," ")}function gt(e){for(var t="",n=0,r=e.length;n<r;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return pe.trim(t)}function pt(e){return e=ut(e),e=ft(e),e=dt(e),e=gt(e),e}function ht(e){return e=ct(e),e=at(e),e}function xr(){return""}function Wr(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function r(g){return n?!0:pe.indexOf(e,g)!==-1}var o=[],s=!1;return{onIgnoreTag:function(g,l,a){if(r(g))if(a.isClosing){var u="[/removed]",c=a.position+u.length;return o.push([s!==!1?s:a.position,c]),s=!1,u}else return s||(s=a.position),"[removed]";else return t(g,l,a)},remove:function(g){var l="",a=0;return pe.forEach(o,function(u){l+=g.slice(a,u[0]),a=u[1]}),l+=g.slice(a),l}}}function Ur(e){for(var t="",n=0;n<e.length;){var r=e.indexOf("<!--",n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);var o=e.indexOf("-->",r);if(o===-1)break;n=o+3}return t}function qr(e){var t=e.split("");return t=t.filter(function(n){var r=n.charCodeAt(0);return r===127?!1:r<=31?r===10||r===13:!0}),t.join("")}C.whiteList=it(),C.getDefaultWhiteList=it,C.onTag=Ir,C.onIgnoreTag=Rr,C.onTagAttr=Nr,C.onIgnoreTagAttr=Or,C.safeAttrValue=Lr,C.escapeHtml=at,C.escapeQuote=ct,C.unescapeQuote=ut,C.escapeHtmlEntities=ft,C.escapeDangerHtml5Entities=dt,C.clearNonPrintableCharacter=gt,C.friendlyAttrValue=pt,C.escapeAttrValue=ht,C.onIgnoreTagStripAll=xr,C.StripTagBody=Wr,C.stripCommentTag=Ur,C.stripBlankChar=qr,C.attributeWrapSign='"',C.cssFilter=ot,C.getDefaultCSSWhiteList=Sr;var me={},G=De;function jr(e){var t=G.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=G.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function zr(e){return e.slice(0,2)==="</"}function Gr(e,t,n){var r="",o=0,s=!1,g=!1,l=0,a=e.length,u="",c="";e:for(l=0;l<a;l++){var p=e.charAt(l);if(s===!1){if(p==="<"){s=l;continue}}else if(g===!1){if(p==="<"){r+=n(e.slice(o,l)),s=l,o=l;continue}if(p===">"||l===a-1){r+=n(e.slice(o,s)),c=e.slice(s,l+1),u=jr(c),r+=t(s,r.length,u,c,zr(c)),o=l+1,s=!1;continue}if(p==='"'||p==="'")for(var w=1,m=e.charAt(l-w);m.trim()===""||m==="=";){if(m==="="){g=p;continue e}m=e.charAt(l-++w)}}else if(p===g){g=!1;continue}}return o<a&&(r+=n(e.substr(o))),r}var Hr=/[^a-zA-Z0-9\\_:.-]/gim;function Xr(e,t){var n=0,r=0,o=[],s=!1,g=e.length;function l(w,m){if(w=G.trim(w),w=w.replace(Hr,"").toLowerCase(),!(w.length<1)){var E=t(w,m||"");E&&o.push(E)}}for(var a=0;a<g;a++){var u=e.charAt(a),c,p;if(s===!1&&u==="="){s=e.slice(n,a),n=a+1,r=e.charAt(n)==='"'||e.charAt(n)==="'"?n:Yr(e,a+1);continue}if(s!==!1&&a===r){if(p=e.indexOf(u,a+1),p===-1)break;c=G.trim(e.slice(r+1,p)),l(s,c),s=!1,a=p,n=a+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),s===!1)if(p=Jr(e,a),p===-1){c=G.trim(e.slice(n,a)),l(c),s=!1,n=a+1;continue}else{a=p-1;continue}else if(p=Kr(e,a-1),p===-1){c=G.trim(e.slice(n,a)),c=mt(c),l(s,c),s=!1,n=a+1;continue}else continue}return n<e.length&&(s===!1?l(e.slice(n)):l(s,mt(G.trim(e.slice(n))))),G.trim(o.join(" "))}function Jr(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function Yr(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function Kr(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function Qr(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function mt(e){return Qr(e)?e.substr(1,e.length-2):e}me.parseTag=Gr,me.parseAttr=Xr;var Zr=Pe.FilterCSS,F=C,yt=me,ei=yt.parseTag,ti=yt.parseAttr,ye=De;function we(e){return e==null}function ni(e){var t=ye.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=ye.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=ye.trim(e.slice(0,-1))),{html:e,closing:n}}function ri(e){var t={};for(var n in e)t[n]=e[n];return t}function ii(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(r){return r.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function wt(e){e=ri(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=F.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=ii(e.whiteList||e.allowList):e.whiteList=F.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":F.attributeWrapSign,e.onTag=e.onTag||F.onTag,e.onTagAttr=e.onTagAttr||F.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||F.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||F.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||F.safeAttrValue,e.escapeHtml=e.escapeHtml||F.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Zr(e.css))}wt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,o=n.onTag,s=n.onIgnoreTag,g=n.onTagAttr,l=n.onIgnoreTagAttr,a=n.safeAttrValue,u=n.escapeHtml,c=t.attributeWrapSign,p=t.cssFilter;n.stripBlankChar&&(e=F.stripBlankChar(e)),n.allowCommentTag||(e=F.stripCommentTag(e));var w=!1;n.stripIgnoreTagBody&&(w=F.StripTagBody(n.stripIgnoreTagBody,s),s=w.onIgnoreTag);var m=ei(e,function(E,T,A,d,y){var b={sourcePosition:E,position:T,isClosing:y,isWhite:Object.prototype.hasOwnProperty.call(r,A)},R=o(A,d,b);if(!we(R))return R;if(b.isWhite){if(b.isClosing)return"</"+A+">";var L=ni(d),U=r[A],h=ti(L.html,function(v,_){var I=ye.indexOf(U,v)!==-1,$=g(A,v,_,I);return we($)?I?(_=a(A,v,_,p),_?v+"="+c+_+c:v):($=l(A,v,_,I),we($)?void 0:$):$});return d="<"+A,h&&(d+=" "+h),L.closing&&(d+=" /"),d+=">",d}else return R=s(A,d,b),we(R)?u(d):R},u);return w&&(m=w.remove(m)),m};var oi=wt;(function(e,t){var n=C,r=me,o=oi;function s(l,a){var u=new o(a);return u.process(l)}t=e.exports=s,t.filterXSS=s,t.FilterXSS=o,function(){for(var l in n)t[l]=n[l];for(var a in r)t[a]=r[a]}(),typeof window<"u"&&(window.filterXSS=e.exports);function g(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}g()&&(self.filterXSS=e.exports)})(Le,Le.exports);var ai=Le.exports;const si=hr(ai);function li(e){return e=e.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>"),e=e.replace(/\[icon:([^\]]+)]/g,"<widget-icon>$1</widget-icon>"),e=e.replace(/\[(.*)]\((.*)\)/g,'<router-link to = "$2">$1</router-link>'),si(e)}function ci(e,t,n,r){let o=e+t/60+n/3600;return(r=="S"||r=="W")&&(o=o*-1),o}function ui(e,t){const n={dir:e<0?t==="long"?"W":"S":t==="long"?"E":"N",deg:0|(e<0?e=-e:e),min:0|(e+=1e-9)%1*60,sec:(0|e*60%1*6e3)/100};return`${n.deg}° ${n.min}' ${n.sec}" ${n.dir}`}function fi(){const e=i.ref(null);function t(n){e.value=n}return{activeRow:e,activateRow:t}}function di(e,t){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(t)}async function Et(e,t){e()&&(await t(),await Et(e,t))}function gi(e,t,n={}){let r=!1;const o=i.ref(""),s=i.computed(()=>g.filter(h=>u(h,o.value))),g=i.reactive([]);let l=0;const a=i.ref(!1);let u=(n==null?void 0:n.filterSearchFn)||((h,v)=>di(h,v));function c(){return n.masterEntities?typeof n.masterEntities=="function"?n.masterEntities():n.masterEntities:[]}function p(){const h=R();return typeof h.limit!="number"&&(h.limit=100),h.offset=l,(n.request||de)(e,h).then(_=>(l+=_.length,_))}function w(h,v){var I;return typeof h.Version=="number"?h.Version:(I=g.find($=>$.Id===v))==null?void 0:I.Version}function m(h,v){const _=g.findIndex(I=>I.Id===h);if(_===-1)throw new Error(`Can't found item with Id ${h}`);g.splice(_,1,v)}function E(h){const v=g.findIndex(_=>_.Id===h);if(v===-1)throw new Error(`Can't found item with Id ${h}`);g.splice(v,1)}async function T(h,v){try{const _=R(),I=w(v,h);delete v.Version,await Oe(e,{id:h,values:v,version:I,masterEntities:c()});const $=await de(e,{fields:_.fields||"",id:h});m(h,$)}catch(_){M()(_)}}async function A(h,v={}){try{const _=R(),I=w(v,h);delete v.Version,await Ke(e,{id:h,version:I,masterEntities:c()}),E(h)}catch(_){M()(_)}}async function d(h){try{await Ye(e,{values:h,masterEntities:c()}),await L()}catch(v){M()(v)}}let y;async function b(){a.value=!0;try{y!=null&&y.signal&&!y.signal.aborted&&y.abort();let h=y=new AbortController,v=0;const I=R().limit||0;if(o.value&&!I){console.warn("Using textSearch assumes the use of limit.");return}await Et(()=>(I>0?v<I:!0)&&!r&&!h.signal.aborted,async()=>{const $=await p();h.signal.aborted||(g.push(...$),v+=$.filter(_e=>u(_e,o.value)).length,($.length<I||I===0)&&(r=!0))})}catch(h){M()(h)}a.value=!1}function R(){return typeof t=="function"?t():t}async function L(){try{l=0,r=!1,g.splice(0,g.length),await b()}catch(h){M()(h)}}function U(){if(y)return y.abort();a.value=!1}return{array:g,updateById:T,next:b,reload:L,wait:a,create:d,deleteById:A,textSearch:o,filteredArray:s,abort:U}}function pi(){function e(){return{organizations:x.organizations,currentContextId:x.contextId,person:x.person,context:x.context,contextType:x.contextType,userId:x.userId}}const t=i.reactive(e());return x.onupdateContext(()=>{Object.assign(t,e())}),t}function hi(e,t,n){return O().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function mi(e,t,n){return O().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function yi(e,t){return O().emit("communication-message:create",{communicationId:e,text:t})}function wi(e){return O().emit("communication-message:read",{communicationId:e})}function Ei(e){const t=B.Form.getParentForm(),n=i.reactive([]);return t&&t.subscribe(e),e.read=()=>wi(e.id).then(r=>(n.splice(0,n.length,...r),r)),{array:n}}function bi(e,t){e.read=()=>{const r=n();return Promise.resolve().then(()=>{if(!e.name)throw K.EntityWithoutName(e);return de(e.name,r)}).then(Be).then(o=>(o.hasOwnProperty("Version")&&(e.version=o.Version),e.setValues(o),o)).catch(M())},e.save=()=>{const r=n();return Promise.resolve().then(()=>{if(!e.name)throw K.EntityWithoutName(e);return Oe(e.name,{id:r.id,values:e.changes,version:e.version})}).then(o=>{e.version=o.version}).catch(o=>{throw M()(o),o})};function n(){return typeof t=="function"?t():t}}function bt(e){if(!e)return i.inject(S.PROVIDE_NAME_METADATA);ve.initEntity(e);const t=i.computed(()=>ve.state[e]);return i.provide(S.PROVIDE_NAME_METADATA,t),t}function vt(e,t={}){if(!e)return i.inject(S.PROVIDE_NAME_USAGE_CONTEXT);const n=i.ref(null);return i.provide(S.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await er(e,vi(t||{}))}}}function vi(e){return typeof e=="function"?e():e}function _i(e){if(!e)return i.inject(S.PROVIDE_NAME_ACTIONS);const t=i.reactive([]),n=i.computed(()=>t.map(s=>Ze(e,s))),r={actions:n,update:o};i.provide(S.PROVIDE_NAME_ACTIONS,r),e.router=Ve.useRouter();function o(s={}){return t.splice(0,t.length),Qe(s).then(g=>t.splice(0,0,...g)).catch(M("error"))}return{actions:n,update:o}}function Ti(e){function t(n){n.key==="Enter"&&e()}i.onMounted(()=>{document.addEventListener("keypress",t)}),i.onUnmounted(()=>{document.removeEventListener("keypress",t)})}function Ai(e,t={}){const n=i.reactive([]),r=a=>{const u=i.unref(e);if(a===void 0){n.length===0?u.forEach(s):u.forEach(g);return}o(a)?g(a):s(a)},o=a=>n.includes(a),s=a=>{t.handleSelect&&!t.handleSelect(a)||o(a)||n.push(a)},g=a=>{const u=n.findIndex(c=>c===a);u!==-1&&n.splice(u,1)},l=i.computed(()=>{const a=i.unref(e);return n.length===a.length&&a.length!==0});return[n,r,l,s,g]}function Ci(e){const t=i.ref(""),n=i.computed(()=>{const r=t.value.toLowerCase();return i.unref(e).filter(o=>t.value.length?Object.values(o).join().toLowerCase().includes(r):!0)});return{search:t,searchArray:n}}const ie=new class{constructor(){this.store=i.reactive([])}add(t,n,r={}){const o=ki(r),s=new Si(t,n,o.timeout,o.children,o.click);return this.store.push(s),o.timeout&&setTimeout(this.remove.bind(this,s.id),o.timeout*1e3),s}remove(t){const n=this.store.findIndex(r=>r.id===t);if(n===-1)return!1;this.store.splice(n,1)}};function ki(e){function t(r){return!!r&&typeof r=="object"}const n={timeout:10,click:()=>null,children:[]};return t(e)?{timeout:e.timeout||n.timeout,click:e.click||n.click,children:e.children||n.children}:n}const _t=class Lt{constructor(t,n,r,o,s){this.type=t,this.message=n,this.timeout=r,this.children=o,this.click=s,this.id=Lt.cardId++}};_t.cardId=1;let Si=_t;/*!
8
8
  * jenesius-event-emitter v1.0.2
9
9
  * (c) 2022 Jenesius
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eservices-core",
3
- "version": "1.3.153",
3
+ "version": "1.3.154",
4
4
  "description": "Core library",
5
5
  "author": "",
6
6
  "scripts": {