eservices-core 1.3.160 → 1.3.161
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.
|
@@ -49,6 +49,13 @@ export interface IServerParams {
|
|
|
49
49
|
* @description Параметры, для работы с сессией. Полностью передаются в express-session.
|
|
50
50
|
*/
|
|
51
51
|
session: IServerSession;
|
|
52
|
+
/**
|
|
53
|
+
* @description Функция предназначена для определения usage-context, в СЛУЧАЕ если его не получилось определить
|
|
54
|
+
* из файла конфигурации usage-context.json
|
|
55
|
+
* @param path {string} путь, с которого запрашивается usage-context. Он также уже прошёл через начальную обработку
|
|
56
|
+
* в ядре (удаление начального / и решение frontendBase)
|
|
57
|
+
*/
|
|
58
|
+
handleResolveUsageContext?: (path: string) => string | null;
|
|
52
59
|
}
|
|
53
60
|
export declare type ServerType = 'back' | 'front';
|
|
54
61
|
export interface IServerSession {
|
|
@@ -1,12 +1,12 @@
|
|
|
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-flex-align-center{align-items:center}.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)}})();
|
|
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-flex-align-center{align-items:center}.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-d43a76ce]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-d43a76ce]{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-d43a76ce]{grid-template-rows:calc(var(--button-size) * var(--04895bf1))}.widget-multi-button-body[data-v-d43a76ce]{min-width:80px}.widget-multi-button-body-label[data-v-d43a76ce]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-d43a76ce]:hover{background-color:#223296}.widget-multi-button-side[data-v-d43a76ce]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-d43a76ce]{transform:rotate(180deg)}.widget-multi-button-side[data-v-d43a76ce]: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.
|
|
3
|
+
* eservices-core v1.3.161
|
|
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"),Nt=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(y=>y.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 m(),await _()}catch(f){const{message:y}=ye(f);ie.add("error",y)}}function m(){return o.wait="Loading process information.",pe.getStartConfig(t,e).then(f=>{s=f.steps.map(y=>({label:y.title,name:y.stepName,number:y.number,fields:y.frontendEntity.objectTypes.reduce((w,R)=>(R.properties.forEach(O=>{w.push({name:O.name,label:O.title,type:O.refEntityName||O.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 y=ye(f);ie.add("error",y.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 ke(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=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=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 Oe(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const I={getEntityLink(e,t){return`/forms/${e}/${t}`}};function Jt(e){for(let t in e)I[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:I.iconHandler?I.iconHandler(n):`icon icon-${n}`})}},re=G(Yt,[["__scopeId","data-v-90f57c16"]]),Kt=Re(Oe("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)),I.listCellHandler&&I.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 Le(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:Le},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],m=p.indexOf(u);return m===-1?p.push(u):p.splice(m,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,m)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:m},[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:Le};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)),kn=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 Cn=G(kn,[["__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 m(h){return h===null?!1:h.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(v){var Be;function _(P){return P.screenX+y-O}const T=r.value,f=[...T.children].filter(P=>P.localName==="th"),y=((Be=T.offsetParent)==null?void 0:Be.scrollLeft)||0,w=f.map(P=>P.clientWidth),R=m(v.target),O=T.getBoundingClientRect().left,M=_(v),g=a(w,M),E=w.slice(0,g).reduce((P,W)=>P+W,0),b=M-E,C=T.offsetWidth,L=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",C),console.log("Start Position",M),console.log("Position From",g),console.log("Start Position",g),console.log("Global offset (Отступ самой таблицы от края экрана)",O),console.log("Del",b),console.groupEnd(),o.value.innerText=f[g].textContent||"",o.value.style.display="grid",o.value.style.width=L+"px",o.value.style.cursor="grabbing",c(E),p(L),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+y-O;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+L;p(te);return}let W=P.screenX+y-O-b;W<0&&(W=0),W+L>C&&(W=C-L),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(Cn,i.mergeProps({key:c},c,{onOrder:m=>d(c.name),onSelect:u[0]||(u[0]=m=>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"},On={class:"widget-list-body position_relative"},Ln=50,Nn=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+Ln>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",On,[(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:m=>r(u,m)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),xn=i.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{}},setup(e){const t=e,n=kt(),r=Ct(),o=i.computed(()=>{var h,v;const c=a.value,p=u(c),m={type:p,disabled:!((h=l.value)!=null&&h.canSet),label:t.label};return c&&Object.assign(m,{suffix:p==="number"?c.valueUnit:void 0,required:d.includes(p||"")?!1:c.required,label:t.label||c.displayName}),Object.assign(m,((v=I.fieldParamsHandler)==null?void 0:v.call(I,c,l.value,m))||{}),m}),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;const c=n.value.fieldsByName[t.name];if(c)return c});function u(c){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(c){if(c.type==="Reference"||c.type==="Owned")return c.referencedEntity;if(c.dataType==="Boolean")return"single-checkbox";if(c.dataType==="DateTime")return"date";if(c.dataType==="Integer"||c.dataType==="Decimal")return"number";if(c.dataType==="List")return c.aggregatedEntity;if(s.includes(c.presentationType))return"textarea";if(c.presentationType==="PhoneNumber")return"tel"}return"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 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 Nt.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 N().emit("entity:read",{...t,entity:e})}function xe(e,t){return N().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(Oe("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(Oe("use-socket"));function N(){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 y=[...r.values()];H("Handlers array length is %d. Response event: %s. Request id: %d",r.size,f.event,f.requestId),y.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(y=>{y.guaranteedAnswer&&y.serializeString&&s.add(y.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 y;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}(y=w==null?void 0:w.data)!=null&&y.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,y){_({event:f,callback:y})}function m(f,y){_({event:f,callback:y,once:!0})}function h(){return t&&(t==null?void 0:t.readyState)===1}function v(f,y,w){const R=++e,O=JSON.stringify({requestId:R,event:f,data:y,contextId:B.contextId,url:I.socketURLHandler?I.socketURLHandler():window.location.href});return h()?c(O):(s.add(O),H("Socket is not connected. Message was send to save-queue")),new Promise((M,g)=>{_({event:f,requestId:R,once:!0,guaranteedAnswer:!0,serializeString:O,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 y={timeToLive:0,...f,created:new Date().getTime()};r.add(y)}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:m,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 N().emit("list-setting:read",{entity:e,mark:t})}function Zn(e,t){return N().emit("metadata-field:treat",{entity:e,fieldName:t})}function at(e,t){return N().emit("entity:create",{...t,entity:e})}function st(e,t){return N().emit("entity:delete",{...t,entity:e})}function er(e,t){return N().emit("usage-context:read",{...t,entity:e})}function lt(e={}){return N().emit("tool:read",e)}function tr(){return N().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 N().emit("history:read",e)}function ir(e,t){return N().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 N().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){I.getEntityLink&&r.push(I.getEntityLink(t.name,s));return}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 Ce={exports:{}},k={},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 m=ne.trim(c.slice(0,p)),h=ne.trim(c.slice(p+1));if(m){var v=t(o,d.length,m,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(y=>y.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 m(),await _()}catch(f){const{message:y}=ye(f);ie.add("error",y)}}function m(){return o.wait="Loading process information.",pe.getStartConfig(t,e).then(f=>{s=f.steps.map(y=>({label:y.title,name:y.stepName,number:y.number,fields:y.frontendEntity.objectTypes.reduce((w,R)=>(R.properties.forEach(O=>{w.push({name:O.name,label:O.title,type:O.refEntityName||O.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 y=ye(f);ie.add("error",y.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 ke(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=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=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 Oe(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const I={getEntityLink(e,t){return`/forms/${e}/${t}`}};function Jt(e){for(let t in e)I[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:I.iconHandler?I.iconHandler(n):`icon icon-${n}`})}},re=G(Yt,[["__scopeId","data-v-90f57c16"]]),Kt=Re(Oe("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)),I.listCellHandler&&I.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 Le(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:Le},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],m=p.indexOf(u);return m===-1?p.push(u):p.splice(m,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,m)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:m},[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=>({"04895bf1":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-d43a76ce"]]),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:Le};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)),kn=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 Cn=G(kn,[["__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 m(h){return h===null?!1:h.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(v){var Be;function _(P){return P.screenX+y-O}const T=r.value,f=[...T.children].filter(P=>P.localName==="th"),y=((Be=T.offsetParent)==null?void 0:Be.scrollLeft)||0,w=f.map(P=>P.clientWidth),R=m(v.target),O=T.getBoundingClientRect().left,M=_(v),g=a(w,M),E=w.slice(0,g).reduce((P,W)=>P+W,0),b=M-E,C=T.offsetWidth,L=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",C),console.log("Start Position",M),console.log("Position From",g),console.log("Start Position",g),console.log("Global offset (Отступ самой таблицы от края экрана)",O),console.log("Del",b),console.groupEnd(),o.value.innerText=f[g].textContent||"",o.value.style.display="grid",o.value.style.width=L+"px",o.value.style.cursor="grabbing",c(E),p(L),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+y-O;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+L;p(te);return}let W=P.screenX+y-O-b;W<0&&(W=0),W+L>C&&(W=C-L),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(Cn,i.mergeProps({key:c},c,{onOrder:m=>d(c.name),onSelect:u[0]||(u[0]=m=>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"},On={class:"widget-list-body position_relative"},Ln=50,Nn=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+Ln>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",On,[(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:m=>r(u,m)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),xn=i.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{}},setup(e){const t=e,n=kt(),r=Ct(),o=i.computed(()=>{var h,v;const c=a.value,p=u(c),m={type:p,disabled:!((h=l.value)!=null&&h.canSet),label:t.label};return c&&Object.assign(m,{suffix:p==="number"?c.valueUnit:void 0,required:d.includes(p||"")?!1:c.required,label:t.label||c.displayName}),Object.assign(m,((v=I.fieldParamsHandler)==null?void 0:v.call(I,c,l.value,m))||{}),m}),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;const c=n.value.fieldsByName[t.name];if(c)return c});function u(c){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(c){if(c.type==="Reference"||c.type==="Owned")return c.referencedEntity;if(c.dataType==="Boolean")return"single-checkbox";if(c.dataType==="DateTime")return"date";if(c.dataType==="Integer"||c.dataType==="Decimal")return"number";if(c.dataType==="List")return c.aggregatedEntity;if(s.includes(c.presentationType))return"textarea";if(c.presentationType==="PhoneNumber")return"tel"}return"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 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 Nt.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 N().emit("entity:read",{...t,entity:e})}function xe(e,t){return N().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(Oe("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(Oe("use-socket"));function N(){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 y=[...r.values()];H("Handlers array length is %d. Response event: %s. Request id: %d",r.size,f.event,f.requestId),y.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(y=>{y.guaranteedAnswer&&y.serializeString&&s.add(y.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 y;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}(y=w==null?void 0:w.data)!=null&&y.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,y){_({event:f,callback:y})}function m(f,y){_({event:f,callback:y,once:!0})}function h(){return t&&(t==null?void 0:t.readyState)===1}function v(f,y,w){const R=++e,O=JSON.stringify({requestId:R,event:f,data:y,contextId:B.contextId,url:I.socketURLHandler?I.socketURLHandler():window.location.href});return h()?c(O):(s.add(O),H("Socket is not connected. Message was send to save-queue")),new Promise((M,g)=>{_({event:f,requestId:R,once:!0,guaranteedAnswer:!0,serializeString:O,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 y={timeToLive:0,...f,created:new Date().getTime()};r.add(y)}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:m,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 N().emit("list-setting:read",{entity:e,mark:t})}function Zn(e,t){return N().emit("metadata-field:treat",{entity:e,fieldName:t})}function at(e,t){return N().emit("entity:create",{...t,entity:e})}function st(e,t){return N().emit("entity:delete",{...t,entity:e})}function er(e,t){return N().emit("usage-context:read",{...t,entity:e})}function lt(e={}){return N().emit("tool:read",e)}function tr(){return N().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 N().emit("history:read",e)}function ir(e,t){return N().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 N().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){I.getEntityLink&&r.push(I.getEntityLink(t.name,s));return}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 Ce={exports:{}},k={},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 m=ne.trim(c.slice(0,p)),h=ne.trim(c.slice(p+1));if(m){var v=t(o,d.length,m,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,m){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:m,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 kr=ft;(function(e,t){var n=J,r=kr;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}},Cr=$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 Cr;function Rr(e,t,n){}function Ir(e,t,n){}function Or(e,t,n){}function Lr(e,t,n){}function gt(e){return e.replace(xr,"<").replace($r,">")}function Nr(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=/"/g,Fr=/&#([a-zA-Z0-9]*);?/gim,Br=/:?/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,""")}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("")}k.whiteList=dt();k.getDefaultWhiteList=dt;k.onTag=Rr;k.onIgnoreTag=Ir;k.onTagAttr=Or;k.onIgnoreTagAttr=Lr;k.safeAttrValue=Nr;k.escapeHtml=gt;k.escapeQuote=ht;k.unescapeQuote=mt;k.escapeHtmlEntities=yt;k.escapeDangerHtml5Entities=vt;k.clearNonPrintableCharacter=wt;k.friendlyAttrValue=Et;k.escapeAttrValue=bt;k.onIgnoreTagStripAll=Mr;k.StripTagBody=Wr;k.stripCommentTag=Ur;k.stripBlankChar=jr;k.attributeWrapSign='"';k.cssFilter=pt;k.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 m=1,h=e.charAt(l-m);h.trim()===""||h==="=";){if(h==="="){d=p;continue e}h=e.charAt(l-++m)}}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(m,h){if(m=q.trim(m),m=m.replace(Hr,"").toLowerCase(),!(m.length<1)){var v=t(m,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=k,_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 m=!1;n.stripIgnoreTagBody&&(m=D.StripTagBody(n.stripIgnoreTagBody,s),s=m.onIgnoreTag);var h=ei(e,function(v,_,T,f,y){var w={sourcePosition:v,position:_,isClosing:y,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 O=ni(f),M=r[T],g=ti(O.html,function(E,b){var C=ge.indexOf(M,E)!==-1,L=d(T,E,b,C);return fe(L)?C?(b=a(T,E,b,p),b?E+"="+c+b+c:E):(L=l(T,E,b,C),fe(L)?void 0:L):L});return f="<"+T,g&&(f+=" "+g),O.closing&&(f+=" /"),f+=">",f}else return R=s(T,f,w),fe(R)?u(f):R},u);return m&&(h=m.remove(h)),h};var oi=Tt;(function(e,t){var n=k,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)})(Ce,Ce.exports);var ai=Ce.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 m(g,E){var C;return typeof g.Version=="number"?g.Version:(C=d.find(L=>L.Id===E))==null?void 0:C.Version}function h(g,E){const b=d.findIndex(C=>C.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(),C=m(E,g);delete E.Version,await xe(e,{id:g,values:E,version:C,masterEntities:c()});const L=await ve(e,{fields:b.fields||"",id:g});h(g,L)}catch(b){V()(b)}}async function T(g,E={}){try{const b=R(),C=m(E,g);delete E.Version,await st(e,{id:g,version:C,masterEntities:c()}),v(g)}catch(b){V()(b)}}async function f(g){try{await at(e,{values:g,masterEntities:c()}),await O()}catch(E){V()(E)}}let y;async function w(){a.value=!0;try{y!=null&&y.signal&&!y.signal.aborted&&y.abort();let g=y=new AbortController,E=0;const C=R().limit||0;if(o.value&&!C){console.warn("Using textSearch assumes the use of limit.");return}await At(()=>(C>0?E<C:!0)&&!r&&!g.signal.aborted,async()=>{const L=await p();g.signal.aborted||(d.push(...L),E+=L.filter(ae=>u(ae,o.value)).length,(L.length<C||C===0)&&(r=!0))})}catch(g){V()(g)}a.value=!1}function R(){return typeof t=="function"?t():t}async function O(){try{l=0,r=!1,d.splice(0,d.length),await w()}catch(g){V()(g)}}function M(){if(y)return y.abort();a.value=!1}return{array:d,updateById:_,next:w,reload:O,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 N().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function mi(e,t,n){return N().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function yi(e,t){return N().emit("communication-message:create",{communicationId:e,text:t})}function vi(e){return N().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 kt(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 Ct(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 ki(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=Ci(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 Ci(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
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/const Xe=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},Je=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},Ye=function(e,t){const n=this.events[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)},Ke=function(){this.events={}};class z{constructor(){this.events={}}on(t,n){return Xe.call(this,t,n)}emit(t,n){return Je.call(this,t,n)}off(t,n){return Ye.call(this,t,n)}cleanEvents(){Ke.call(this)}static on(t,n){return Xe.call(z,t,n)}static emit(t,n){return Je.call(z,t,n)}static off(t,n){return Ye.call(z,t,n)}static cleanEvents(){Ke.call(z)}}z.events={};class Ri extends z{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return yi(this.id,t)}static checkAndGenerate(t,n,r){return mi(t,n,r).then(o=>o.length===0?hi(t,n,r):o[0])}}function Ii(){return N().emit("client:read",{})}var It=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Oi=(e,t,n)=>(It(e,t,"read from private field"),n?n.call(e):t.get(e)),Li=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ni=(e,t,n,r)=>(It(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),he;const Te=class Y extends z{constructor(){super(...arguments),this.type="front",this.organizations=[],Li(this,he,!1)}set language(t){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||Y.DEFAULT_LANGUAGE}get contextType(){var t;if(this.contextId)return((t=this.person)==null?void 0:t.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(t){Ni(this,he,t),this.emit(Y.EVENT_READY_UPDATE,t)}get ready(){return Oi(this,he)}onReady(t){return this.on(Y.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(Y.EVENT_CONTEXT_UPDATE,t)}setCurrentContext(t){if(this.contextId===t)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(t),localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(t)),this.emit(Y.EVENT_CONTEXT_UPDATE,t),console.log(`Current context id %c${t}`,"color: purple")}get context(){var t;return this.contextId?this.contextId===((t=this.person)==null?void 0:t.id)?this.person:this.organizations.find(n=>n.id===this.contextId)||null:null}async init(){try{const t=await this.loadCustomerData();this.person=t,this.organizations=t.organizations,this.userId=t.userId,this.restoreCurrentContext(),this.ready=!0}catch(t){V()(t)}}restoreCurrentContext(){const t=Number.parseInt(localStorage.getItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(t)&&this.validateContextId(Number(t)))this.setCurrentContext(t);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return Ii()}validateContextId(t){var n;try{return((n=this.person)==null?void 0:n.id)==t?!0:!!this.organizations.find(r=>r.id===t)}catch{return!1}}};he=new WeakMap;Te.DEFAULT_LANGUAGE="en";Te.EVENT_CONTEXT_UPDATE="event:context-update";Te.EVENT_READY_UPDATE="event:ready-update";let xi=Te;function $i(e){return N().emit("metadata:read",{entity:e})}const Ee=function(){const t=i.reactive({}),n=new Map;function r(l){return t[l]}async function o(l){if(n.has(l)&&await n.get(l),t[l])return;const a=await s(l);d(l,a)}function s(l){const a=$i(l).finally(()=>{n.delete(l)});return n.set(l,a),a}function d(l,a){t[l]=a}return{state:t,initEntity:o,get:r}}();class U{static login(t){return $(I.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:I.applicationName})})}static parseProcessAnswer(t){if(t.statusCode>4)throw new Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startRegistrationProcess(t){return U.requestStepRegistrationProcess("StartRegistration",t)}static confirmPhoneRegistrationProcess(t){return U.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",t)}static confirmEmailRegistrationProcess(t){return U.requestStepRegistrationProcess("ConfirmEmailByRegistration",t)}static finishEmailRegistrationProcess(t){return U.requestStepRegistrationProcess("FinishRegistration",t)}static requestStepRegistrationProcess(t,n){return $(`${I.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(t){return U.requestStepLoginProcess("StartLogin",t)}static loginWithPassword(t){return U.requestStepLoginProcess("LoginWithPassword",t)}static loginWithOtpCode(t){return U.requestStepLoginProcess("LoginWithOtpCode",t)}static requestStepLoginProcess(t,n){return $(`${I.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(U.parseLoginProcessAnswer)}static parseLoginProcessAnswer(t){if(t.statusCode>3)throw Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startPasswordReset(t,n){return $(`${I.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,r,o){return $(`${I.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:o})})}static confirmEmailByAccessRecovery(t,n,r,o){return $(`${I.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:o})})}static finishAccessRecovery(t,n,r){return $(`${I.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:r,ConfirmedPassword:r})})}}class Pi{static readHistoryById(t,n){return $(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Di{static getConfiguration(){return $("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await $(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Fi{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return $(`/open-api/internationalization/language/${t}`)}}class Bi{static async upload(t,n){const r=new FormData;return r.append("file",t),$(`/close-api/files?entityName=${n}`,{method:"POST",body:r}).then(o=>(o.filename=t.name,o))}}var Ot=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(Ot||{}),Lt=(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))(Lt||{});function Vi(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function x(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];if(Array.isArray(r)){const o=r.map(s=>typeof s=="string"?`'${s}'`:s).join(", ");return r.length&&t.push(`@${n} in (${o})`),t}if(Vi(r)){let o=function(s){var d;return((d=s.match(/([^Z]*)/))==null?void 0:d[0])+"0000Z"};return r.start&&t.push(`@${n} ge ${o(r.start)}`),r.end&&t.push(`@${n} le ${o(r.end)}`),t}return typeof r=="number"?(t.push(`@${n} eq ${r}`),t):typeof r=="string"?(r.length!==0&&t.push(`@${n} eq '${r}'`),t):(r===null&&t.push(x.is(n,r)),t)},[]).join(" and ")}function oe(e){return typeof e=="string"?`'${e}'`:`${e}`}x.includes=function(t,n){return`@${t} Contains ${oe(n)}`};x.beginWith=function(t,n){return`@${t} BeginWith ${oe(n)}`};x.notEq=function(t,n){return`@${t} nq ${oe(n)}`};x.eq=function(t,n){return Array.isArray(n)?x.in(t,n):`@${t} eq ${oe(n)}`};x.in=function(t,n){const r=n.map(oe).join(", ");return`@${t} in (${r})`};x.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":x.and(...n.map(r=>x.notEq(t,r)))};x.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(x.wrap).join(" and ")};x.wrap=function(t){return`(${t})`};x.is=function(t,n){return`@${t} is ${n}`};x.or=function(...t){return t.join(" or ")};function De(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];const o=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=De(r)),t[o]=r,t},{})}const B=new xi;exports.ApplicationStatus=Lt;exports.Communication=Ri;exports.CoreError=Q;exports.Filter=x;exports.Manager=B;exports.MetadataStore=Ee;exports.NotificationSystem=ie;exports.OBJECT_TYPE_NAME_FIELD=Xn;exports.RecordOperation=Ot;exports.WidgetButton=ln;exports.WidgetField=xn;exports.WidgetIcon=re;exports.WidgetImage=wn;exports.WidgetList=Nn;exports.WidgetLoader=yn;exports.WidgetMultiButton=gn;exports.WidgetSpinner=be;exports.WidgetTable=rn;exports.asyncProcess=$n;exports.authService=U;exports.billingService=K;exports.catchUniversal=V;exports.config=Jt;exports.configuration=I;exports.constants=S;exports.convertDDToDMS=ui;exports.convertDMSToDD=ci;exports.debounce=Wn;exports.documentsService=Ft;exports.fileService=Bi;exports.formatter=Z;exports.getCellName=tt;exports.getCellValue=Ie;exports.getNamesFromListConfig=Fn;exports.getUnitValue=ke;exports.groupArrayByField=Bn;exports.historyService=Pi;exports.injectAction=nr;exports.internationalizationService=Fi;exports.invitationService=Dt;exports.openService=Di;exports.parseError=ye;exports.parseTextByMarkdown=li;exports.prettyDate=Ne;exports.prettyDateWithTime=nt;exports.prettyMoney=rt;exports.prettyValueFieldByEntity=qn;exports.processWizardService=pe;exports.request=$;exports.setupListRow=Le;exports.staticLink=or;exports.t=ee;exports.throttle=Un;exports.universalEntityCount=ir;exports.universalEntityCreate=at;exports.universalEntityDelete=st;exports.universalEntityRead=ve;exports.universalEntityUpdate=xe;exports.universalHistoryRead=rr;exports.universalListSettingRead=Qn;exports.universalMetadataFieldTreat=Zn;exports.universalMetadataListRead=tr;exports.universalToolRead=lt;exports.useActions=_i;exports.useCommunication=wi;exports.useEnter=Ti;exports.useFormEntity=Ei;exports.useListActiveRow=fi;exports.useListEntity=pi;exports.useListSearch=ki;exports.useListSelect=Ai;exports.useManagerState=gi;exports.useMetadata=kt;exports.useSocket=N;exports.useUsageContext=Ct;exports.useWizard=Wt;exports.uuidv4=Vn;exports.valuesToUpperCase=De;exports.wrapToolResponse=ct;
|
|
11
|
+
*/const Xe=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},Je=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},Ye=function(e,t){const n=this.events[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)},Ke=function(){this.events={}};class z{constructor(){this.events={}}on(t,n){return Xe.call(this,t,n)}emit(t,n){return Je.call(this,t,n)}off(t,n){return Ye.call(this,t,n)}cleanEvents(){Ke.call(this)}static on(t,n){return Xe.call(z,t,n)}static emit(t,n){return Je.call(z,t,n)}static off(t,n){return Ye.call(z,t,n)}static cleanEvents(){Ke.call(z)}}z.events={};class Ri extends z{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return yi(this.id,t)}static checkAndGenerate(t,n,r){return mi(t,n,r).then(o=>o.length===0?hi(t,n,r):o[0])}}function Ii(){return N().emit("client:read",{})}var It=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Oi=(e,t,n)=>(It(e,t,"read from private field"),n?n.call(e):t.get(e)),Li=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ni=(e,t,n,r)=>(It(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),he;const Te=class Y extends z{constructor(){super(...arguments),this.type="front",this.organizations=[],Li(this,he,!1)}set language(t){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||Y.DEFAULT_LANGUAGE}get contextType(){var t;if(this.contextId)return((t=this.person)==null?void 0:t.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(t){Ni(this,he,t),this.emit(Y.EVENT_READY_UPDATE,t)}get ready(){return Oi(this,he)}onReady(t){return this.on(Y.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(Y.EVENT_CONTEXT_UPDATE,t)}setCurrentContext(t){if(this.contextId===t)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(t),localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(t)),this.emit(Y.EVENT_CONTEXT_UPDATE,t),console.log(`Current context id %c${t}`,"color: purple")}get context(){var t;return this.contextId?this.contextId===((t=this.person)==null?void 0:t.id)?this.person:this.organizations.find(n=>n.id===this.contextId)||null:null}async init(){try{const t=await this.loadCustomerData();this.person=t,this.organizations=t.organizations,this.userId=t.userId,this.restoreCurrentContext(),this.ready=!0}catch(t){V()(t)}}restoreCurrentContext(){const t=Number.parseInt(localStorage.getItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(t)&&this.validateContextId(Number(t)))this.setCurrentContext(t);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return Ii()}validateContextId(t){var n;try{return((n=this.person)==null?void 0:n.id)==t?!0:!!this.organizations.find(r=>r.id===t)}catch{return!1}}};he=new WeakMap;Te.DEFAULT_LANGUAGE="en";Te.EVENT_CONTEXT_UPDATE="event:context-update";Te.EVENT_READY_UPDATE="event:ready-update";let xi=Te;function $i(e){return N().emit("metadata:read",{entity:e})}const Ee=function(){const t=i.reactive({}),n=new Map;function r(l){return t[l]}async function o(l){if(n.has(l)&&await n.get(l),t[l])return;const a=await s(l);d(l,a)}function s(l){const a=$i(l).finally(()=>{n.delete(l)});return n.set(l,a),a}function d(l,a){t[l]=a}return{state:t,initEntity:o,get:r}}();class U{static login(t){return $(I.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:I.applicationName})})}static parseProcessAnswer(t){if(t.statusCode>4)throw new Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startRegistrationProcess(t){return U.requestStepRegistrationProcess("StartRegistration",t)}static confirmPhoneRegistrationProcess(t){return U.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",t)}static confirmEmailRegistrationProcess(t){return U.requestStepRegistrationProcess("ConfirmEmailByRegistration",t)}static finishEmailRegistrationProcess(t){return U.requestStepRegistrationProcess("FinishRegistration",t)}static requestStepRegistrationProcess(t,n){return $(`${I.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(t){return U.requestStepLoginProcess("StartLogin",t)}static loginWithPassword(t){return U.requestStepLoginProcess("LoginWithPassword",t)}static loginWithOtpCode(t){return U.requestStepLoginProcess("LoginWithOtpCode",t)}static requestStepLoginProcess(t,n){return $(`${I.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(U.parseLoginProcessAnswer)}static parseLoginProcessAnswer(t){if(t.statusCode>3)throw Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startPasswordReset(t,n){return $(`${I.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,r,o){return $(`${I.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:o})})}static confirmEmailByAccessRecovery(t,n,r,o){return $(`${I.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:o})})}static finishAccessRecovery(t,n,r){return $(`${I.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:r,ConfirmedPassword:r})})}}class Pi{static readHistoryById(t,n){return $(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Di{static getConfiguration(){return $("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await $(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Fi{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return $(`/open-api/internationalization/language/${t}`)}}class Bi{static async upload(t,n){const r=new FormData;return r.append("file",t),$(`/close-api/files?entityName=${n}`,{method:"POST",body:r}).then(o=>(o.filename=t.name,o))}}var Ot=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(Ot||{}),Lt=(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))(Lt||{});function Vi(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function x(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];if(Array.isArray(r)){const o=r.map(s=>typeof s=="string"?`'${s}'`:s).join(", ");return r.length&&t.push(`@${n} in (${o})`),t}if(Vi(r)){let o=function(s){var d;return((d=s.match(/([^Z]*)/))==null?void 0:d[0])+"0000Z"};return r.start&&t.push(`@${n} ge ${o(r.start)}`),r.end&&t.push(`@${n} le ${o(r.end)}`),t}return typeof r=="number"||typeof r=="boolean"?(t.push(`@${n} eq ${r}`),t):typeof r=="string"?(r.length!==0&&t.push(`@${n} eq '${r}'`),t):(r===null&&t.push(x.is(n,r)),t)},[]).join(" and ")}function oe(e){return typeof e=="string"?`'${e}'`:`${e}`}x.includes=function(t,n){return`@${t} Contains ${oe(n)}`};x.beginWith=function(t,n){return`@${t} BeginWith ${oe(n)}`};x.notEq=function(t,n){return`@${t} nq ${oe(n)}`};x.eq=function(t,n){return Array.isArray(n)?x.in(t,n):`@${t} eq ${oe(n)}`};x.in=function(t,n){const r=n.map(oe).join(", ");return`@${t} in (${r})`};x.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":x.and(...n.map(r=>x.notEq(t,r)))};x.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(x.wrap).join(" and ")};x.wrap=function(t){return`(${t})`};x.is=function(t,n){return`@${t} is ${n}`};x.or=function(...t){return t.join(" or ")};function De(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];const o=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=De(r)),t[o]=r,t},{})}const B=new xi;exports.ApplicationStatus=Lt;exports.Communication=Ri;exports.CoreError=Q;exports.Filter=x;exports.Manager=B;exports.MetadataStore=Ee;exports.NotificationSystem=ie;exports.OBJECT_TYPE_NAME_FIELD=Xn;exports.RecordOperation=Ot;exports.WidgetButton=ln;exports.WidgetField=xn;exports.WidgetIcon=re;exports.WidgetImage=wn;exports.WidgetList=Nn;exports.WidgetLoader=yn;exports.WidgetMultiButton=gn;exports.WidgetSpinner=be;exports.WidgetTable=rn;exports.asyncProcess=$n;exports.authService=U;exports.billingService=K;exports.catchUniversal=V;exports.config=Jt;exports.configuration=I;exports.constants=S;exports.convertDDToDMS=ui;exports.convertDMSToDD=ci;exports.debounce=Wn;exports.documentsService=Ft;exports.fileService=Bi;exports.formatter=Z;exports.getCellName=tt;exports.getCellValue=Ie;exports.getNamesFromListConfig=Fn;exports.getUnitValue=ke;exports.groupArrayByField=Bn;exports.historyService=Pi;exports.injectAction=nr;exports.internationalizationService=Fi;exports.invitationService=Dt;exports.openService=Di;exports.parseError=ye;exports.parseTextByMarkdown=li;exports.prettyDate=Ne;exports.prettyDateWithTime=nt;exports.prettyMoney=rt;exports.prettyValueFieldByEntity=qn;exports.processWizardService=pe;exports.request=$;exports.setupListRow=Le;exports.staticLink=or;exports.t=ee;exports.throttle=Un;exports.universalEntityCount=ir;exports.universalEntityCreate=at;exports.universalEntityDelete=st;exports.universalEntityRead=ve;exports.universalEntityUpdate=xe;exports.universalHistoryRead=rr;exports.universalListSettingRead=Qn;exports.universalMetadataFieldTreat=Zn;exports.universalMetadataListRead=tr;exports.universalToolRead=lt;exports.useActions=_i;exports.useCommunication=wi;exports.useEnter=Ti;exports.useFormEntity=Ei;exports.useListActiveRow=fi;exports.useListEntity=pi;exports.useListSearch=ki;exports.useListSelect=Ai;exports.useManagerState=gi;exports.useMetadata=kt;exports.useSocket=N;exports.useUsageContext=Ct;exports.useWizard=Wt;exports.uuidv4=Vn;exports.valuesToUpperCase=De;exports.wrapToolResponse=ct;
|
|
12
12
|
//# sourceMappingURL=eservices-core.cjs.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
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-flex-align-center{align-items:center}.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)}})();
|
|
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-flex-align-center{align-items:center}.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-d43a76ce]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-d43a76ce]{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-d43a76ce]{grid-template-rows:calc(var(--button-size) * var(--04895bf1))}.widget-multi-button-body[data-v-d43a76ce]{min-width:80px}.widget-multi-button-body-label[data-v-d43a76ce]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-d43a76ce]:hover{background-color:#223296}.widget-multi-button-side[data-v-d43a76ce]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-d43a76ce]{transform:rotate(180deg)}.widget-multi-button-side[data-v-d43a76ce]: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
|
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";
|
|
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";
|
|
@@ -6,7 +6,7 @@ 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.
|
|
9
|
+
* eservices-core v1.3.161
|
|
10
10
|
* (c) 2024 ESERVICES
|
|
11
11
|
*/
|
|
12
12
|
const mt = class A extends Error {
|
|
@@ -746,7 +746,7 @@ const Bi = /* @__PURE__ */ ee(In, [["__scopeId", "data-v-450dc564"]]), Rn = { cl
|
|
|
746
746
|
setup(e) {
|
|
747
747
|
const t = e;
|
|
748
748
|
Ht((f) => ({
|
|
749
|
-
"
|
|
749
|
+
"04895bf1": r.value
|
|
750
750
|
}));
|
|
751
751
|
const n = J({
|
|
752
752
|
active: !1,
|
|
@@ -802,7 +802,7 @@ const Bi = /* @__PURE__ */ ee(In, [["__scopeId", "data-v-450dc564"]]), Rn = { cl
|
|
|
802
802
|
]));
|
|
803
803
|
}
|
|
804
804
|
});
|
|
805
|
-
const Gi = /* @__PURE__ */ ee(Nn, [["__scopeId", "data-v-
|
|
805
|
+
const Gi = /* @__PURE__ */ ee(Nn, [["__scopeId", "data-v-d43a76ce"]]), $n = { class: "widget-loader flex flex-align_center gap_10 padding_15" }, Pn = { class: "text_md" }, zi = /* @__PURE__ */ M({
|
|
806
806
|
__name: "widget-loader",
|
|
807
807
|
props: {
|
|
808
808
|
label: {}
|
|
@@ -2889,7 +2889,7 @@ function P(e) {
|
|
|
2889
2889
|
};
|
|
2890
2890
|
return r.start && t.push(`@${n} ge ${i(r.start)}`), r.end && t.push(`@${n} le ${i(r.end)}`), t;
|
|
2891
2891
|
}
|
|
2892
|
-
return typeof r == "number" ? (t.push(`@${n} eq ${r}`), t) : typeof r == "string" ? (r.length !== 0 && t.push(`@${n} eq '${r}'`), t) : (r === null && t.push(P.is(n, r)), t);
|
|
2892
|
+
return typeof r == "number" || typeof r == "boolean" ? (t.push(`@${n} eq ${r}`), t) : typeof r == "string" ? (r.length !== 0 && t.push(`@${n} eq '${r}'`), t) : (r === null && t.push(P.is(n, r)), t);
|
|
2893
2893
|
}, []).join(" and ");
|
|
2894
2894
|
}
|
|
2895
2895
|
function me(e) {
|
|
@@ -1,12 +1,12 @@
|
|
|
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-flex-align-center{align-items:center}.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)}})();
|
|
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-flex-align-center{align-items:center}.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-d43a76ce]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-d43a76ce]{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-d43a76ce]{grid-template-rows:calc(var(--button-size) * var(--04895bf1))}.widget-multi-button-body[data-v-d43a76ce]{min-width:80px}.widget-multi-button-body-label[data-v-d43a76ce]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-d43a76ce]:hover{background-color:#223296}.widget-multi-button-side[data-v-d43a76ce]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-d43a76ce]{transform:rotate(180deg)}.widget-multi-button-side[data-v-d43a76ce]: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,ke,se){"use strict";/*!
|
|
3
|
-
* eservices-core v1.3.
|
|
3
|
+
* eservices-core v1.3.161
|
|
4
4
|
* (c) 2024 ESERVICES
|
|
5
5
|
*/const xi="",Me=class C extends Error{constructor(t,n=null){super(),this.message=t,this.details=n,this.id=C.ID++}static ParentFormNotFound(){return new C("Can't found parent form.")}static UndefinedNameOfCompositeFormController(t){return new C("Composite object name is undefined",t)}static EntityWithoutName(t){return new C("'Entity doesn't have a name",t)}static NotResolvedNameEventEmitter(t){return new C(`'${t}' is not a valid Event emitter name`)}static FormIsNotValidated(t){return new C("Form is not validated",t)}static ListWorkerIsRunningOrEnd(t){return new C("List data request is running or already done",t)}static ObjectIdNotNumber(t){return new C(`${t} (id) is not a number`)}static UndefinedErrorId(t,n){return C.ApiNotAvailable()}static ApiError(t){return new C("Request error",t)}static ApiNotAvailable(){return new C(`Sorry, we experience difficulties here.
|
|
6
|
-
Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?C.ApiNotAvailable():new C(t||"Authorization Error",n)}static ApiResponseParseFailed(){return C.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new C("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new C(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new C("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new C("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new C(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new C(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,r){return new C(`Array already includes the element with value ${t}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(t){return new C(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new C("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(w=>w.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 y(),await T()}catch(d){const{message:w}=ue(d);ie.add("error",w)}}function y(){return o.wait="Loading process information.",le.getStartConfig(t,e).then(d=>{s=d.steps.map(w=>({label:w.title,name:w.stepName,number:w.number,fields:w.frontendEntity.objectTypes.reduce((b,O)=>(O.properties.forEach(N=>{b.push({name:N.name,label:N.title,type:N.refEntityName||N.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 w=ue(d);ie.add("error",w.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 Ce(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=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=Oe(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 R={getEntityLink(e,t){return`/forms/${e}/${t}`}};function Yt(e){for(let t in e)R[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:R.iconHandler?R.iconHandler(n):`icon icon-${n}`})}},[["__scopeId","data-v-90f57c16"]]),Kt=ke(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)),R.listCellHandler&&R.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],y=p.indexOf(u);return y===-1?p.push(u):p.splice(y,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,y)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:y},[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)),kn=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="",Cn=z(kn,[["__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 y(m){return m===null?!1:m.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(E){var Lt;function T(V){return V.screenX+w-N}const A=r.value,d=[...A.children].filter(V=>V.localName==="th"),w=((Lt=A.offsetParent)==null?void 0:Lt.scrollLeft)||0,b=d.map(V=>V.clientWidth),O=y(E.target),N=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 (Отступ самой таблицы от края экрана)",N),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",Ot,{passive:!0}),document.addEventListener("pointerup",_e);function _e(V){if(console.group("END"),document.removeEventListener("pointermove",Ot),document.removeEventListener("pointerup",_e),O&&(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)),!O){const q=V.screenX+w-N;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 Ot(V){if(O){const ae=T(V)-U+$;p(ae);return}let q=V.screenX+w-N-_;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(Cn,i.mergeProps({key:c},c,{onOrder:y=>g(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))}}),Ji="",In=z(Sn,[["__scopeId","data-v-ccffc6bd"]]),Rn={class:"widget-list"},On={class:"widget-list-body position_relative"},Ln=50,Nn=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+Ln>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",On,[(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:y=>r(u,y)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),$n=i.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{}},setup(e){const t=e,n=bt(),r=vt(),o=i.computed(()=>{var m,E;const c=a.value,p=u(c),y={type:p,disabled:!((m=l.value)!=null&&m.canSet),label:t.label};return c&&Object.assign(y,{suffix:p==="number"?c.valueUnit:void 0,required:g.includes(p||"")?!1:c.required,label:t.label||c.displayName}),Object.assign(y,((E=R.fieldParamsHandler)==null?void 0:E.call(R,c,l.value,y))||{}),y}),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;const c=n.value.fieldsByName[t.name];if(c)return c});function u(c){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(c){if(c.type==="Reference"||c.type==="Owned")return c.referencedEntity;if(c.dataType==="Boolean")return"single-checkbox";if(c.dataType==="DateTime")return"date";if(c.dataType==="Integer"||c.dataType==="Decimal")return"number";if(c.dataType==="List")return c.aggregatedEntity;if(s.includes(c.presentationType))return"textarea";if(c.presentationType==="PhoneNumber")return"tel"}return"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 Oe(e,"YYYY/MM/DD HH:mm:ss")}function Oe(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 L().emit("entity:read",{...t,entity:e})}function Le(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 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=ke(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=ke(Ie("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 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 w=[...r.values()];X("Handlers array length is %d. Response event: %s. Request id: %d",r.size,d.event,d.requestId),w.forEach(b=>{const O=d.requestId;(b.requestId&&b.requestId===O||!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(w=>{w.guaranteedAnswer&&w.serializeString&&s.add(w.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 w;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}(w=b==null?void 0:b.data)!=null&&w.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,w){T({event:d,callback:w})}function y(d,w){T({event:d,callback:w,once:!0})}function m(){return t&&(t==null?void 0:t.readyState)===1}function E(d,w,b){const O=++e,N=JSON.stringify({requestId:O,event:d,data:w,contextId:x.contextId,url:R.socketURLHandler?R.socketURLHandler():window.location.href});return m()?c(N):(s.add(N),X("Socket is not connected. Message was send to save-queue")),new Promise((U,h)=>{T({event:d,requestId:O,once:!0,guaranteedAnswer:!0,serializeString:N,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 w={timeToLive:0,...d,created:new Date().getTime()};r.add(w)}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:y,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 L().emit("list-setting:read",{entity:e,mark:t})}function Zn(e,t){return L().emit("metadata-field:treat",{entity:e,fieldName:t})}function Ye(e,t){return L().emit("entity:create",{...t,entity:e})}function Ke(e,t){return L().emit("entity:delete",{...t,entity:e})}function er(e,t){return L().emit("usage-context:read",{...t,entity:e})}function Qe(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 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){R.getEntityLink&&r.push(R.getEntityLink(t.name,s));return}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 Ne={exports:{}},k={},$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 y=re.trim(c.slice(0,p)),m=re.trim(c.slice(p+1));if(y){var E=t(o,g.length,y,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?C.ApiNotAvailable():new C(t||"Authorization Error",n)}static ApiResponseParseFailed(){return C.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new C("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new C(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new C("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new C("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new C(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new C(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,r){return new C(`Array already includes the element with value ${t}`,{array:n,table:r})}static MetadataEntityIsNotAvailable(t){return new C(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new C("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(w=>w.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 y(),await T()}catch(d){const{message:w}=ue(d);ie.add("error",w)}}function y(){return o.wait="Loading process information.",le.getStartConfig(t,e).then(d=>{s=d.steps.map(w=>({label:w.title,name:w.stepName,number:w.number,fields:w.frontendEntity.objectTypes.reduce((b,O)=>(O.properties.forEach(N=>{b.push({name:N.name,label:N.title,type:N.refEntityName||N.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 w=ue(d);ie.add("error",w.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 Ce(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=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=Oe(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 R={getEntityLink(e,t){return`/forms/${e}/${t}`}};function Yt(e){for(let t in e)R[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:R.iconHandler?R.iconHandler(n):`icon icon-${n}`})}},[["__scopeId","data-v-90f57c16"]]),Kt=ke(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)),R.listCellHandler&&R.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],y=p.indexOf(u);return y===-1?p.push(u):p.splice(y,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,y)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:y},[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=>({"04895bf1":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-d43a76ce"]]),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)),kn=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="",Cn=z(kn,[["__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 y(m){return m===null?!1:m.classList.contains("head-cell-resize")}r.value.addEventListener("pointerdown",function(E){var Lt;function T(V){return V.screenX+w-N}const A=r.value,d=[...A.children].filter(V=>V.localName==="th"),w=((Lt=A.offsetParent)==null?void 0:Lt.scrollLeft)||0,b=d.map(V=>V.clientWidth),O=y(E.target),N=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 (Отступ самой таблицы от края экрана)",N),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",Ot,{passive:!0}),document.addEventListener("pointerup",_e);function _e(V){if(console.group("END"),document.removeEventListener("pointermove",Ot),document.removeEventListener("pointerup",_e),O&&(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)),!O){const q=V.screenX+w-N;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 Ot(V){if(O){const ae=T(V)-U+$;p(ae);return}let q=V.screenX+w-N-_;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(Cn,i.mergeProps({key:c},c,{onOrder:y=>g(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))}}),Ji="",In=z(Sn,[["__scopeId","data-v-ccffc6bd"]]),Rn={class:"widget-list"},On={class:"widget-list-body position_relative"},Ln=50,Nn=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+Ln>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",On,[(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:y=>r(u,y)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}}),$n=i.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{}},setup(e){const t=e,n=bt(),r=vt(),o=i.computed(()=>{var m,E;const c=a.value,p=u(c),y={type:p,disabled:!((m=l.value)!=null&&m.canSet),label:t.label};return c&&Object.assign(y,{suffix:p==="number"?c.valueUnit:void 0,required:g.includes(p||"")?!1:c.required,label:t.label||c.displayName}),Object.assign(y,((E=R.fieldParamsHandler)==null?void 0:E.call(R,c,l.value,y))||{}),y}),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;const c=n.value.fieldsByName[t.name];if(c)return c});function u(c){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(c){if(c.type==="Reference"||c.type==="Owned")return c.referencedEntity;if(c.dataType==="Boolean")return"single-checkbox";if(c.dataType==="DateTime")return"date";if(c.dataType==="Integer"||c.dataType==="Decimal")return"number";if(c.dataType==="List")return c.aggregatedEntity;if(s.includes(c.presentationType))return"textarea";if(c.presentationType==="PhoneNumber")return"tel"}return"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 Oe(e,"YYYY/MM/DD HH:mm:ss")}function Oe(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 L().emit("entity:read",{...t,entity:e})}function Le(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 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=ke(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=ke(Ie("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 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 w=[...r.values()];X("Handlers array length is %d. Response event: %s. Request id: %d",r.size,d.event,d.requestId),w.forEach(b=>{const O=d.requestId;(b.requestId&&b.requestId===O||!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(w=>{w.guaranteedAnswer&&w.serializeString&&s.add(w.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 w;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}(w=b==null?void 0:b.data)!=null&&w.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,w){T({event:d,callback:w})}function y(d,w){T({event:d,callback:w,once:!0})}function m(){return t&&(t==null?void 0:t.readyState)===1}function E(d,w,b){const O=++e,N=JSON.stringify({requestId:O,event:d,data:w,contextId:x.contextId,url:R.socketURLHandler?R.socketURLHandler():window.location.href});return m()?c(N):(s.add(N),X("Socket is not connected. Message was send to save-queue")),new Promise((U,h)=>{T({event:d,requestId:O,once:!0,guaranteedAnswer:!0,serializeString:N,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 w={timeToLive:0,...d,created:new Date().getTime()};r.add(w)}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:y,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 L().emit("list-setting:read",{entity:e,mark:t})}function Zn(e,t){return L().emit("metadata-field:treat",{entity:e,fieldName:t})}function Ye(e,t){return L().emit("entity:create",{...t,entity:e})}function Ke(e,t){return L().emit("entity:delete",{...t,entity:e})}function er(e,t){return L().emit("usage-context:read",{...t,entity:e})}function Qe(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 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){R.getEntityLink&&r.push(R.getEntityLink(t.name,s));return}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 Ne={exports:{}},k={},$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 y=re.trim(c.slice(0,p)),m=re.trim(c.slice(p+1));if(y){var E=t(o,g.length,y,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,y){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:y,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 kr=rt;(function(e,t){var n=Y,r=kr;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}},Cr=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 Cr;function Ir(e,t,n){}function Rr(e,t,n){}function Or(e,t,n){}function Lr(e,t,n){}function at(e){return e.replace($r,"<").replace(Pr,">")}function Nr(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=/"/g,Fr=/&#([a-zA-Z0-9]*);?/gim,Vr=/:?/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,""")}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("")}k.whiteList=it(),k.getDefaultWhiteList=it,k.onTag=Ir,k.onIgnoreTag=Rr,k.onTagAttr=Or,k.onIgnoreTagAttr=Lr,k.safeAttrValue=Nr,k.escapeHtml=at,k.escapeQuote=ct,k.unescapeQuote=ut,k.escapeHtmlEntities=ft,k.escapeDangerHtml5Entities=dt,k.clearNonPrintableCharacter=gt,k.friendlyAttrValue=pt,k.escapeAttrValue=ht,k.onIgnoreTagStripAll=xr,k.StripTagBody=Wr,k.stripCommentTag=Ur,k.stripBlankChar=qr,k.attributeWrapSign='"',k.cssFilter=ot,k.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 y=1,m=e.charAt(l-y);m.trim()===""||m==="=";){if(m==="="){g=p;continue e}m=e.charAt(l-++y)}}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(y,m){if(y=G.trim(y),y=y.replace(Hr,"").toLowerCase(),!(y.length<1)){var E=t(y,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=k,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 y=!1;n.stripIgnoreTagBody&&(y=F.StripTagBody(n.stripIgnoreTagBody,s),s=y.onIgnoreTag);var m=ei(e,function(E,T,A,d,w){var b={sourcePosition:E,position:T,isClosing:w,isWhite:Object.prototype.hasOwnProperty.call(r,A)},O=o(A,d,b);if(!we(O))return O;if(b.isWhite){if(b.isClosing)return"</"+A+">";var N=ni(d),U=r[A],h=ti(N.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),N.closing&&(d+=" /"),d+=">",d}else return O=s(A,d,b),we(O)?u(d):O},u);return y&&(m=y.remove(m)),m};var oi=wt;(function(e,t){var n=k,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)})(Ne,Ne.exports);var ai=Ne.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=O();return typeof h.limit!="number"&&(h.limit=100),h.offset=l,(n.request||de)(e,h).then(_=>(l+=_.length,_))}function y(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 _=O(),I=y(v,h);delete v.Version,await Le(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 _=O(),I=y(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 N()}catch(v){M()(v)}}let w;async function b(){a.value=!0;try{w!=null&&w.signal&&!w.signal.aborted&&w.abort();let h=w=new AbortController,v=0;const I=O().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 O(){return typeof t=="function"?t():t}async function N(){try{l=0,r=!1,g.splice(0,g.length),await b()}catch(h){M()(h)}}function U(){if(w)return w.abort();a.value=!1}return{array:g,updateById:T,next:b,reload:N,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 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 wi(e){return L().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 Le(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 ki(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=Ci(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 Ci(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 Nt{constructor(t,n,r,o,s){this.type=t,this.message=n,this.timeout=r,this.children=o,this.click=s,this.id=Nt.cardId++}};_t.cardId=1;let Si=_t;/*!
|
|
8
8
|
* jenesius-event-emitter v1.0.2
|
|
9
9
|
* (c) 2022 Jenesius
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/const Tt=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},At=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},kt=function(e,t){const n=this.events[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)},Ct=function(){this.events={}};class H{constructor(){this.events={}}on(t,n){return Tt.call(this,t,n)}emit(t,n){return At.call(this,t,n)}off(t,n){return kt.call(this,t,n)}cleanEvents(){Ct.call(this)}static on(t,n){return Tt.call(H,t,n)}static emit(t,n){return At.call(H,t,n)}static off(t,n){return kt.call(H,t,n)}static cleanEvents(){Ct.call(H)}}H.events={};class Ii extends H{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return yi(this.id,t)}static checkAndGenerate(t,n,r){return mi(t,n,r).then(o=>o.length===0?hi(t,n,r):o[0])}}function Ri(){return L().emit("client:read",{})}var St=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Oi=(e,t,n)=>(St(e,t,"read from private field"),n?n.call(e):t.get(e)),Li=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ni=(e,t,n,r)=>(St(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ee;const be=class te extends H{constructor(){super(...arguments),this.type="front",this.organizations=[],Li(this,Ee,!1)}set language(t){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||te.DEFAULT_LANGUAGE}get contextType(){var t;if(this.contextId)return((t=this.person)==null?void 0:t.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(t){Ni(this,Ee,t),this.emit(te.EVENT_READY_UPDATE,t)}get ready(){return Oi(this,Ee)}onReady(t){return this.on(te.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(te.EVENT_CONTEXT_UPDATE,t)}setCurrentContext(t){if(this.contextId===t)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(t),localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(t)),this.emit(te.EVENT_CONTEXT_UPDATE,t),console.log(`Current context id %c${t}`,"color: purple")}get context(){var t;return this.contextId?this.contextId===((t=this.person)==null?void 0:t.id)?this.person:this.organizations.find(n=>n.id===this.contextId)||null:null}async init(){try{const t=await this.loadCustomerData();this.person=t,this.organizations=t.organizations,this.userId=t.userId,this.restoreCurrentContext(),this.ready=!0}catch(t){M()(t)}}restoreCurrentContext(){const t=Number.parseInt(localStorage.getItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(t)&&this.validateContextId(Number(t)))this.setCurrentContext(t);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return Ri()}validateContextId(t){var n;try{return((n=this.person)==null?void 0:n.id)==t?!0:!!this.organizations.find(r=>r.id===t)}catch{return!1}}};Ee=new WeakMap,be.DEFAULT_LANGUAGE="en",be.EVENT_CONTEXT_UPDATE="event:context-update",be.EVENT_READY_UPDATE="event:ready-update";let $i=be;function Pi(e){return L().emit("metadata:read",{entity:e})}const ve=function(){const t=i.reactive({}),n=new Map;function r(l){return t[l]}async function o(l){if(n.has(l)&&await n.get(l),t[l])return;const a=await s(l);g(l,a)}function s(l){const a=Pi(l).finally(()=>{n.delete(l)});return n.set(l,a),a}function g(l,a){t[l]=a}return{state:t,initEntity:o,get:r}}();class W{static login(t){return D(R.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:R.applicationName})})}static parseProcessAnswer(t){if(t.statusCode>4)throw new Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startRegistrationProcess(t){return W.requestStepRegistrationProcess("StartRegistration",t)}static confirmPhoneRegistrationProcess(t){return W.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",t)}static confirmEmailRegistrationProcess(t){return W.requestStepRegistrationProcess("ConfirmEmailByRegistration",t)}static finishEmailRegistrationProcess(t){return W.requestStepRegistrationProcess("FinishRegistration",t)}static requestStepRegistrationProcess(t,n){return D(`${R.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(t){return W.requestStepLoginProcess("StartLogin",t)}static loginWithPassword(t){return W.requestStepLoginProcess("LoginWithPassword",t)}static loginWithOtpCode(t){return W.requestStepLoginProcess("LoginWithOtpCode",t)}static requestStepLoginProcess(t,n){return D(`${R.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(W.parseLoginProcessAnswer)}static parseLoginProcessAnswer(t){if(t.statusCode>3)throw Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startPasswordReset(t,n){return D(`${R.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,r,o){return D(`${R.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:o})})}static confirmEmailByAccessRecovery(t,n,r,o){return D(`${R.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:o})})}static finishAccessRecovery(t,n,r){return D(`${R.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:r,ConfirmedPassword:r})})}}class Di{static readHistoryById(t,n){return D(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Bi{static getConfiguration(){return D("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await D(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Fi{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return D(`/open-api/internationalization/language/${t}`)}}class Vi{static async upload(t,n){const r=new FormData;return r.append("file",t),D(`/close-api/files?entityName=${n}`,{method:"POST",body:r}).then(o=>(o.filename=t.name,o))}}var It=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(It||{}),Rt=(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))(Rt||{});function Mi(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function P(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];if(Array.isArray(r)){const o=r.map(s=>typeof s=="string"?`'${s}'`:s).join(", ");return r.length&&t.push(`@${n} in (${o})`),t}if(Mi(r)){let o=function(s){var g;return((g=s.match(/([^Z]*)/))==null?void 0:g[0])+"0000Z"};return r.start&&t.push(`@${n} ge ${o(r.start)}`),r.end&&t.push(`@${n} le ${o(r.end)}`),t}return typeof r=="number"?(t.push(`@${n} eq ${r}`),t):typeof r=="string"?(r.length!==0&&t.push(`@${n} eq '${r}'`),t):(r===null&&t.push(P.is(n,r)),t)},[]).join(" and ")}function oe(e){return typeof e=="string"?`'${e}'`:`${e}`}P.includes=function(t,n){return`@${t} Contains ${oe(n)}`},P.beginWith=function(t,n){return`@${t} BeginWith ${oe(n)}`},P.notEq=function(t,n){return`@${t} nq ${oe(n)}`},P.eq=function(t,n){return Array.isArray(n)?P.in(t,n):`@${t} eq ${oe(n)}`},P.in=function(t,n){const r=n.map(oe).join(", ");return`@${t} in (${r})`},P.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":P.and(...n.map(r=>P.notEq(t,r)))},P.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(P.wrap).join(" and ")},P.wrap=function(t){return`(${t})`},P.is=function(t,n){return`@${t} is ${n}`},P.or=function(...t){return t.join(" or ")};function Be(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];const o=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=Be(r)),t[o]=r,t},{})}const x=new $i;f.ApplicationStatus=Rt,f.Communication=Ii,f.CoreError=K,f.Filter=P,f.Manager=x,f.MetadataStore=ve,f.NotificationSystem=ie,f.OBJECT_TYPE_NAME_FIELD=Xn,f.RecordOperation=It,f.WidgetButton=ln,f.WidgetField=$n,f.WidgetIcon=ne,f.WidgetImage=En,f.WidgetList=Nn,f.WidgetLoader=yn,f.WidgetMultiButton=pn,f.WidgetSpinner=ce,f.WidgetTable=rn,f.asyncProcess=Pn,f.authService=W,f.billingService=Q,f.catchUniversal=M,f.config=Yt,f.configuration=R,f.constants=S,f.convertDDToDMS=ui,f.convertDMSToDD=ci,f.debounce=Wn,f.documentsService=Vt,f.fileService=Vi,f.formatter=Z,f.getCellName=Ue,f.getCellValue=Se,f.getNamesFromListConfig=Fn,f.getUnitValue=Ce,f.groupArrayByField=Vn,f.historyService=Di,f.injectAction=nr,f.internationalizationService=Fi,f.invitationService=Ft,f.openService=Bi,f.parseError=ue,f.parseTextByMarkdown=li,f.prettyDate=Oe,f.prettyDateWithTime=Ge,f.prettyMoney=He,f.prettyValueFieldByEntity=jn,f.processWizardService=le,f.request=D,f.setupListRow=Re,f.staticLink=or,f.t=ee,f.throttle=Un,f.universalEntityCount=ir,f.universalEntityCreate=Ye,f.universalEntityDelete=Ke,f.universalEntityRead=de,f.universalEntityUpdate=Le,f.universalHistoryRead=rr,f.universalListSettingRead=Qn,f.universalMetadataFieldTreat=Zn,f.universalMetadataListRead=tr,f.universalToolRead=Qe,f.useActions=_i,f.useCommunication=Ei,f.useEnter=Ti,f.useFormEntity=bi,f.useListActiveRow=fi,f.useListEntity=gi,f.useListSearch=ki,f.useListSelect=Ai,f.useManagerState=pi,f.useMetadata=bt,f.useSocket=L,f.useUsageContext=vt,f.useWizard=Ut,f.uuidv4=Mn,f.valuesToUpperCase=Be,f.wrapToolResponse=Ze,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
11
|
+
*/const Tt=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},At=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},kt=function(e,t){const n=this.events[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)},Ct=function(){this.events={}};class H{constructor(){this.events={}}on(t,n){return Tt.call(this,t,n)}emit(t,n){return At.call(this,t,n)}off(t,n){return kt.call(this,t,n)}cleanEvents(){Ct.call(this)}static on(t,n){return Tt.call(H,t,n)}static emit(t,n){return At.call(H,t,n)}static off(t,n){return kt.call(H,t,n)}static cleanEvents(){Ct.call(H)}}H.events={};class Ii extends H{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return yi(this.id,t)}static checkAndGenerate(t,n,r){return mi(t,n,r).then(o=>o.length===0?hi(t,n,r):o[0])}}function Ri(){return L().emit("client:read",{})}var St=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Oi=(e,t,n)=>(St(e,t,"read from private field"),n?n.call(e):t.get(e)),Li=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ni=(e,t,n,r)=>(St(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ee;const be=class te extends H{constructor(){super(...arguments),this.type="front",this.organizations=[],Li(this,Ee,!1)}set language(t){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||te.DEFAULT_LANGUAGE}get contextType(){var t;if(this.contextId)return((t=this.person)==null?void 0:t.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(t){Ni(this,Ee,t),this.emit(te.EVENT_READY_UPDATE,t)}get ready(){return Oi(this,Ee)}onReady(t){return this.on(te.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(te.EVENT_CONTEXT_UPDATE,t)}setCurrentContext(t){if(this.contextId===t)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(t),localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(t)),this.emit(te.EVENT_CONTEXT_UPDATE,t),console.log(`Current context id %c${t}`,"color: purple")}get context(){var t;return this.contextId?this.contextId===((t=this.person)==null?void 0:t.id)?this.person:this.organizations.find(n=>n.id===this.contextId)||null:null}async init(){try{const t=await this.loadCustomerData();this.person=t,this.organizations=t.organizations,this.userId=t.userId,this.restoreCurrentContext(),this.ready=!0}catch(t){M()(t)}}restoreCurrentContext(){const t=Number.parseInt(localStorage.getItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(t)&&this.validateContextId(Number(t)))this.setCurrentContext(t);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return Ri()}validateContextId(t){var n;try{return((n=this.person)==null?void 0:n.id)==t?!0:!!this.organizations.find(r=>r.id===t)}catch{return!1}}};Ee=new WeakMap,be.DEFAULT_LANGUAGE="en",be.EVENT_CONTEXT_UPDATE="event:context-update",be.EVENT_READY_UPDATE="event:ready-update";let $i=be;function Pi(e){return L().emit("metadata:read",{entity:e})}const ve=function(){const t=i.reactive({}),n=new Map;function r(l){return t[l]}async function o(l){if(n.has(l)&&await n.get(l),t[l])return;const a=await s(l);g(l,a)}function s(l){const a=Pi(l).finally(()=>{n.delete(l)});return n.set(l,a),a}function g(l,a){t[l]=a}return{state:t,initEntity:o,get:r}}();class W{static login(t){return D(R.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:R.applicationName})})}static parseProcessAnswer(t){if(t.statusCode>4)throw new Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startRegistrationProcess(t){return W.requestStepRegistrationProcess("StartRegistration",t)}static confirmPhoneRegistrationProcess(t){return W.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",t)}static confirmEmailRegistrationProcess(t){return W.requestStepRegistrationProcess("ConfirmEmailByRegistration",t)}static finishEmailRegistrationProcess(t){return W.requestStepRegistrationProcess("FinishRegistration",t)}static requestStepRegistrationProcess(t,n){return D(`${R.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(t){return W.requestStepLoginProcess("StartLogin",t)}static loginWithPassword(t){return W.requestStepLoginProcess("LoginWithPassword",t)}static loginWithOtpCode(t){return W.requestStepLoginProcess("LoginWithOtpCode",t)}static requestStepLoginProcess(t,n){return D(`${R.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(W.parseLoginProcessAnswer)}static parseLoginProcessAnswer(t){if(t.statusCode>3)throw Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startPasswordReset(t,n){return D(`${R.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,r,o){return D(`${R.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:o})})}static confirmEmailByAccessRecovery(t,n,r,o){return D(`${R.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:r,Code:o})})}static finishAccessRecovery(t,n,r){return D(`${R.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:r,ConfirmedPassword:r})})}}class Di{static readHistoryById(t,n){return D(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Bi{static getConfiguration(){return D("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await D(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Fi{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return D(`/open-api/internationalization/language/${t}`)}}class Vi{static async upload(t,n){const r=new FormData;return r.append("file",t),D(`/close-api/files?entityName=${n}`,{method:"POST",body:r}).then(o=>(o.filename=t.name,o))}}var It=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(It||{}),Rt=(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))(Rt||{});function Mi(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function P(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];if(Array.isArray(r)){const o=r.map(s=>typeof s=="string"?`'${s}'`:s).join(", ");return r.length&&t.push(`@${n} in (${o})`),t}if(Mi(r)){let o=function(s){var g;return((g=s.match(/([^Z]*)/))==null?void 0:g[0])+"0000Z"};return r.start&&t.push(`@${n} ge ${o(r.start)}`),r.end&&t.push(`@${n} le ${o(r.end)}`),t}return typeof r=="number"||typeof r=="boolean"?(t.push(`@${n} eq ${r}`),t):typeof r=="string"?(r.length!==0&&t.push(`@${n} eq '${r}'`),t):(r===null&&t.push(P.is(n,r)),t)},[]).join(" and ")}function oe(e){return typeof e=="string"?`'${e}'`:`${e}`}P.includes=function(t,n){return`@${t} Contains ${oe(n)}`},P.beginWith=function(t,n){return`@${t} BeginWith ${oe(n)}`},P.notEq=function(t,n){return`@${t} nq ${oe(n)}`},P.eq=function(t,n){return Array.isArray(n)?P.in(t,n):`@${t} eq ${oe(n)}`},P.in=function(t,n){const r=n.map(oe).join(", ");return`@${t} in (${r})`},P.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":P.and(...n.map(r=>P.notEq(t,r)))},P.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(P.wrap).join(" and ")},P.wrap=function(t){return`(${t})`},P.is=function(t,n){return`@${t} is ${n}`},P.or=function(...t){return t.join(" or ")};function Be(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];const o=n.charAt(0).toUpperCase()+n.slice(1);return typeof r=="object"&&!(r==null||Array.isArray(r))&&(r=Be(r)),t[o]=r,t},{})}const x=new $i;f.ApplicationStatus=Rt,f.Communication=Ii,f.CoreError=K,f.Filter=P,f.Manager=x,f.MetadataStore=ve,f.NotificationSystem=ie,f.OBJECT_TYPE_NAME_FIELD=Xn,f.RecordOperation=It,f.WidgetButton=ln,f.WidgetField=$n,f.WidgetIcon=ne,f.WidgetImage=En,f.WidgetList=Nn,f.WidgetLoader=yn,f.WidgetMultiButton=pn,f.WidgetSpinner=ce,f.WidgetTable=rn,f.asyncProcess=Pn,f.authService=W,f.billingService=Q,f.catchUniversal=M,f.config=Yt,f.configuration=R,f.constants=S,f.convertDDToDMS=ui,f.convertDMSToDD=ci,f.debounce=Wn,f.documentsService=Vt,f.fileService=Vi,f.formatter=Z,f.getCellName=Ue,f.getCellValue=Se,f.getNamesFromListConfig=Fn,f.getUnitValue=Ce,f.groupArrayByField=Vn,f.historyService=Di,f.injectAction=nr,f.internationalizationService=Fi,f.invitationService=Ft,f.openService=Bi,f.parseError=ue,f.parseTextByMarkdown=li,f.prettyDate=Oe,f.prettyDateWithTime=Ge,f.prettyMoney=He,f.prettyValueFieldByEntity=jn,f.processWizardService=le,f.request=D,f.setupListRow=Re,f.staticLink=or,f.t=ee,f.throttle=Un,f.universalEntityCount=ir,f.universalEntityCreate=Ye,f.universalEntityDelete=Ke,f.universalEntityRead=de,f.universalEntityUpdate=Le,f.universalHistoryRead=rr,f.universalListSettingRead=Qn,f.universalMetadataFieldTreat=Zn,f.universalMetadataListRead=tr,f.universalToolRead=Qe,f.useActions=_i,f.useCommunication=Ei,f.useEnter=Ti,f.useFormEntity=bi,f.useListActiveRow=fi,f.useListEntity=gi,f.useListSearch=ki,f.useListSelect=Ai,f.useManagerState=pi,f.useMetadata=bt,f.useSocket=L,f.useUsageContext=vt,f.useWizard=Ut,f.uuidv4=Mn,f.valuesToUpperCase=Be,f.wrapToolResponse=Ze,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
|
12
12
|
//# sourceMappingURL=eservices-core.umd.js.map
|