eservices-core 1.3.274 → 1.3.276

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
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}.justify-content-center{justify-content:center}.user-select-none{-webkit-user-select:none;user-select:none}.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{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-light{color:var(--color-light)}.color-primary{color:var(--color-primary)}.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}.transition-fast{transition:.1s}.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}.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,.widget-table-cell_money{text-align:end}.widget-list-cell-history{cursor:pointer}.widget-list-cell-history>span{color:var(--color-primary);font-size:16px;padding:0 10px}.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-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.flex,.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}.gap-10{gap:10px}.gap-15{gap:15px}.gap-5{gap:5px}.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}.padding-bottom-10{padding-bottom:10px}.padding-10{padding:10px}.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-aa18d6fa]{padding:18px;text-align:start}.widget-table__head-label[data-v-aa18d6fa]{font-weight:600;font-size:14px;line-height:19px}.widget-filter-text[data-v-800b3803]{box-shadow:0 2px 2px #00000040;background-color:#fff;padding:20px 10px}.widget-filter-enum[data-v-cd8043dd]{box-shadow:0 2px 2px #00000040;background-color:#fff;padding:3px 0;max-height:400px;max-width:340px;min-width:180px;overflow:hidden auto}.widget-filter-enum-item[data-v-cd8043dd]{padding:6px 11px;transition:.1s;cursor:pointer}.widget-filter-enum-item[data-v-cd8043dd]:hover{background-color:#f1f1f1}[dir=rtl] .icon[data-v-8a72b45f]{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}.widget-head-cell[data-v-d131e64e]{display:flex;gap:4px}.widget-head-cell-order[data-v-d131e64e]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-label[data-v-d131e64e]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-d131e64e]{padding:7px}.widget-head-cell-order-icon[data-v-d131e64e]{transition:.1s;height:18px;width:18px}.widget-head-cell-order-icon_desc[data-v-d131e64e]{transform:rotate(180deg)}.widget-filter-item-container[data-v-ed31ccd3]{position:relative}.widget-filter-item-arrow[data-v-ed31ccd3]{transform:rotate(180deg)}.widget-filter-item-label_active[data-v-ed31ccd3]{font-weight:700}.widget-filter-item[data-v-ed31ccd3]{display:grid;grid-template-columns:max-content max-content;align-items:center;cursor:pointer;padding:0 10px;color:#fff}.widget-filter-item[data-v-ed31ccd3]:not(.widget-filter-item_active){opacity:.6}.widget-filter-item-label[data-v-ed31ccd3]{-webkit-user-select:none;user-select:none;padding:4px 2px 4px 8px}.widget-filter-item-popup[data-v-ed31ccd3]{position:absolute;z-index:2;inset-block-start:100%;inset-inline-end:0}.widget-filter-item-arrow[data-v-ed31ccd3]{transition:.2s}.widget-table-panel-filter[data-v-89e1fa2d]{justify-content:end;background-color:var(--color-primary)}.widget-fast-table-tools[data-v-0070862b]{display:flex;gap:15px}.version-item[data-v-efd61247]{display:grid;gap:2px 10px;grid-template-rows:max-content;grid-template-columns:min-content minmax(100px,200px) 1fr 1fr}.version-item-date[data-v-efd61247]{white-space:nowrap}.line-clamp_5[data-v-efd61247]{text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.history-header[data-v-321c2f32]{align-items:center;position:sticky;top:0;background-color:#fff;grid-template-rows:max-content;grid-template-columns:20px 210px 1fr 1fr}.container-history[data-v-321c2f32]{display:flex;flex-direction:column-reverse;overflow:auto}.wrap-modal-version-history[data-v-321c2f32]{min-height:380px}@media screen and (min-width: 756px){.wrap-modal-version-history[data-v-321c2f32]{min-width:800px;max-width:1000px}}.wrap-history[data-v-321c2f32]{height:100%;overflow:auto}')),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}.justify-content-center{justify-content:center}.user-select-none{-webkit-user-select:none;user-select:none}.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{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-light{color:var(--color-light)}.color-primary{color:var(--color-primary)}.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}.transition-fast{transition:.1s}.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}.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,.widget-table-cell_money{text-align:end}.widget-list-cell-history{cursor:pointer}.widget-list-cell-history>span{color:var(--color-primary);font-size:16px;padding:0 10px}.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}.padding-5{padding:5px}.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-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.flex,.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}.gap-10{gap:10px}.gap-15{gap:15px}.gap-5{gap:5px}.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}.padding-bottom-10{padding-bottom:10px}.padding-10{padding:10px}.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-aa18d6fa]{padding:18px;text-align:start}.widget-table__head-label[data-v-aa18d6fa]{font-weight:600;font-size:14px;line-height:19px}.widget-filter-text[data-v-800b3803]{box-shadow:0 2px 2px #00000040;background-color:#fff;padding:20px 10px}.widget-filter-enum[data-v-cd8043dd]{box-shadow:0 2px 2px #00000040;background-color:#fff;padding:3px 0;max-height:400px;max-width:340px;min-width:180px;overflow:hidden auto}.widget-filter-enum-item[data-v-cd8043dd]{padding:6px 11px;transition:.1s;cursor:pointer}.widget-filter-enum-item[data-v-cd8043dd]:hover{background-color:#f1f1f1}[dir=rtl] .icon[data-v-8a72b45f]{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}.widget-head-cell[data-v-d131e64e]{display:flex;gap:4px}.widget-head-cell-order[data-v-d131e64e]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-label[data-v-d131e64e]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-d131e64e]{padding:7px}.widget-head-cell-order-icon[data-v-d131e64e]{transition:.1s;height:18px;width:18px}.widget-head-cell-order-icon_desc[data-v-d131e64e]{transform:rotate(180deg)}.widget-filter-item-container[data-v-ed31ccd3]{position:relative}.widget-filter-item-arrow[data-v-ed31ccd3]{transform:rotate(180deg)}.widget-filter-item-label_active[data-v-ed31ccd3]{font-weight:700}.widget-filter-item[data-v-ed31ccd3]{display:grid;grid-template-columns:max-content max-content;align-items:center;cursor:pointer;padding:0 10px;color:#fff}.widget-filter-item[data-v-ed31ccd3]:not(.widget-filter-item_active){opacity:.6}.widget-filter-item-label[data-v-ed31ccd3]{-webkit-user-select:none;user-select:none;padding:4px 2px 4px 8px}.widget-filter-item-popup[data-v-ed31ccd3]{position:absolute;z-index:2;inset-block-start:100%;inset-inline-end:0}.widget-filter-item-arrow[data-v-ed31ccd3]{transition:.2s}.widget-table-panel-filter[data-v-89e1fa2d]{justify-content:end;background-color:var(--color-primary)}.widget-fast-table-tools[data-v-0070862b]{display:flex;gap:15px}.version-item[data-v-efd61247]{display:grid;gap:2px 10px;grid-template-rows:max-content;grid-template-columns:min-content minmax(100px,200px) 1fr 1fr}.version-item-date[data-v-efd61247]{white-space:nowrap}.line-clamp_5[data-v-efd61247]{text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.history-header[data-v-321c2f32]{align-items:center;position:sticky;top:0;background-color:#fff;grid-template-rows:max-content;grid-template-columns:20px 210px 1fr 1fr}.container-history[data-v-321c2f32]{display:flex;flex-direction:column-reverse;overflow:auto}.wrap-modal-version-history[data-v-321c2f32]{min-height:380px}@media screen and (min-width: 756px){.wrap-modal-version-history[data-v-321c2f32]{min-width:800px;max-width:1000px}}.wrap-history[data-v-321c2f32]{height:100%;overflow:auto}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  "use strict";var ft=e=>{throw TypeError(e)};var pt=(e,n,t)=>n.has(e)||ft("Cannot "+t);var Pe=(e,n,t)=>(pt(e,n,"read from private field"),t?t.call(e):n.get(e)),Me=(e,n,t)=>n.has(e)?ft("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),ke=(e,n,t,o)=>(pt(e,n,"write to private field"),o?o.call(e,t):n.set(e,t),t);/*!
3
- * eservices-core v1.3.274
3
+ * eservices-core v1.3.276
4
4
  * (c) 2024 ESERVICES
5
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),O=require("jenesius-vue-form"),ie=require("vue-router"),pn=require("date-and-time"),Oe=require("debug"),H=require("jenesius-vue-modal"),R=class R extends Error{constructor(n,t=null){super(),this.message=n,this.details=t,this.id=R.ID++}static ParentFormNotFound(){return new R("Can't found parent form.")}static UndefinedNameOfCompositeFormController(n){return new R("Composite object name is undefined",n)}static EntityWithoutName(n){return new R("'Entity doesn't have a name",n)}static NotResolvedNameEventEmitter(n){return new R(`'${n}' is not a valid Event emitter name`)}static FormIsNotValidated(n){return new R("Form is not validated",n)}static ListWorkerIsRunningOrEnd(n){return new R("List data request is running or already done",n)}static ObjectIdNotNumber(n){return new R(`${n} (id) is not a number`)}static UndefinedErrorId(n,t){return R.ApiNotAvailable()}static ApiError(n){return new R("Request error",n)}static ApiNotAvailable(){return new R(`Sorry, we experience difficulties here.
6
- Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(n,t){return!n&&!t?R.ApiNotAvailable():new R(n||"Authorization Error",t)}static ApiResponseParseFailed(){return R.ApiNotAvailable()}static MissingIdInValuesEntity(n){return new R("Object doesn't have id",n)}static ObjectWithIdNotFound(n,t){return new R(`Can't find object with id: ${n}`,t)}static ObjectWithoutConnectToPresentArray(n,t){return new R("Object is not found.",{object:n,array:t})}static EntityWithoutId(n){return new R("Entity doesn't have id.",n)}static NotFoundedTableIndex(n,t){return new R(`Can't find the element with tableIndex ${n}`,t)}static UndefinedError(n,t=[]){return new R(n,t)}static TableArrayAlreadyIncludeProvidedIndexValue(n,t,o){return new R(`Array already includes the element with value ${n}`,{array:t,table:o})}static MetadataEntityIsNotAvailable(n){return new R(`Metadata for the ${n} is not currently available.`)}static RequestTookToLong(){return new R("The request took too long to complete. Try again later.")}};R.ID=0;let ee=R;const mn="Please try again later or submit a feedback if problem doesn't go.";function gn(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return mn}})}function de(e,n={}){return n.redirect="manual",fetch(e,n).then(t=>t.type==="opaqueredirect"?void window.location.replace("/auth"):t).catch(()=>{throw ee.ApiNotAvailable()}).then(t=>gn(t).then(o=>{if(!t.ok)throw o;return o}))}class hn{constructor(){this.public=!1,this.errors=new Proxy([],{set:(n,t,o)=>(t!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(o)}`),n[t]=o,!0)}),window._journal=this}get error(){return{add:(...n)=>{this.errors.push(n)},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 hn;class yn{static invite(n,t,o){return de("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:n,personKey:t,relatedRoleCode:o})})}static accept(n,t){return de("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:n,version:t,mark:!0})})}static decline(n,t){return de("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:n,version:t,mark:!1})})}}class vn{static getRequiredDocuments(n,t,o){const i=new URLSearchParams({entity:n,primaryKey:t,statusCode:o});return fetch(`/close-api/views/required-documents?${i.toString()}`).then(a=>a.json())}}class ue{static url(){return"close-api/billing"}static getBillingMetadata(n){return fetch(`/${ue.url()}/calculator/${n}`)}static calculate(n,t){return de(`/${ue.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:n,values:t})}).then(o=>{if(o&&o.status===1)return o;throw Array.isArray(o.notes)?new Error(o.notes[0]):ee.ApiNotAvailable()})}static parseMetadataField(n){function t(o){switch(o.type){case"ValueType":switch(o.dataType){case"Integer":return"number";default:return o.dataType}case"EntityReference":return o.dataType}}return{name:n.name,label:n.title,required:n.required,type:t(n)}}static createOnlinePayment(n,t){return de(`/${ue.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:n,returnURL:t})})}static applyOnlinePayment(n){return de(`/${ue.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:n})})}}const wn={class:"widget-table__head-cell"},En={key:1,class:"widget-table__head-label margin_0 text_overflow"},St=r.defineComponent({__name:"widget-table-head-cell",props:{label:{},type:{}},emits:["select"],setup(e,{emit:n}){const t=n;function o(){t("select")}return(i,a)=>(r.openBlock(),r.createElementBlock("th",wn,[i.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(O.FormField),{key:0,onClick:o})):(r.openBlock(),r.createElementBlock("span",En,r.toDisplayString(i.label),1))]))}}),bn={class:"widget-table__head"},_n=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return r.computed(()=>St),(n,t)=>(r.openBlock(),r.createElementBlock("tr",bn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.config,o=>r.renderSlot(n.$slots,"default",r.mergeProps({ref_for:!0},o),void 0,!0)),256))]))}}),M=(e,n)=>{const t=e.__vccOpts||e;for(const[o,i]of n)t[o]=i;return t},kn=M(_n,[["__scopeId","data-v-aa18d6fa"]]);function Ke(e){return Array.isArray(e)?Ke(e[0]):typeof e!="string"?null:e}function ae(e){return Ke(e.name)}function Cn(e){const n=new RegExp(/\$\{([a-zA-Z0-9_.]+)}/,"g"),t=[];let o;for(;(o=n.exec(e))!==null;)t.push(o[1]);return t}function Tn(e,n){return Cn(e).forEach(o=>{e=e.replace(new RegExp("\\$\\{"+o+"}","g"),O.utils.getPropFromObject(n,o))}),e}function We(e){return n=>typeof n=="string"||typeof n=="number"?`${n} ${e}`:""}function Fe(e,n){const t=ae(e);if(typeof e.value=="string")return Tn(e.value,n);let o=t?O.utils.getPropFromObject(n,t):null;if(o===void 0&&(o=null),typeof e.value=="function")return e.value(o,n);if(e.value===null)return null;switch(e.unitValue&&(o=We(e.unitValue)(o)),e.unit&&(o=We(e.unit)(o)),e.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=Ne(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=tt(typeof o=="string"?o:null);break}case"money":{o=xt(o);break}case"DateTime":{o=Ne(typeof o=="string"?o:null,e.format||A.dateTimeFormat);break}}return e.formatter&&(o=pe(e.formatter).exec(o,n)),typeof o=="boolean"&&(o=o?"✓":"—"),o}const Sn=1,An=5e3,In="static-folder",At="request-error",It="EntityTypeName",Nn="REFERENCE_CHANGES",S={LIST_ACTIVE_NEW:-1,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",PROVIDE_ENTITY_NAME:"provide-entity-name",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",MODAL_LIST_DOWNLOAD:"list-download",MODAL_LIST_SETTINGS:"list-settings",MODAL_SIMPLE_TOOL_PARAMETERS:"SimpleToolParameters",MODAL_BATCH_VALUES:"batch-values",MODAL_ENTITY:"form-entity",MODAL_HISTORY:"entity-history",TIME_TO_LIVE_SOCKET_REQUEST:3e4,CORE_DEBUG_LABEL:"eservices-core",VISIBLE_ITEM_PROVIDE_NAME:"visible-item-provider",EVENT_FORM_UPDATE:"form-update",EVENT_AFFECTED_ENTITY:"affected-entity",DEFAULT_ORDER_DIR:"asc",TABLE_MOCK_FIELD:"_A_MOCK_ID_FIELD",OBJECT_TYPE_NAME_FIELD:It,FIELD_NAME_REFERENCE_CHANGES:Nn,PATH_RESOLVER_ENTITY:"resolver"};function Be(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const Rn={class:"widget-filter-text flex gap_20"},Ln=r.defineComponent({__name:"widget-filter-text",props:{values:{}},emits:["update:values"],setup(e,{emit:n}){const t=e,o=n,i=r.ref("");function a(){o("update:values",i.value)}return r.watch(()=>t.values,l=>{if(typeof l!="string")return i.value="";i.value=l},{immediate:!0}),(l,c)=>{const s=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Rn,[r.createVNode(r.unref(O.FormField),{type:"text",modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},null,8,["modelValue"]),r.createVNode(s,{onClick:a,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(te)("Apply")),1)]),_:1})])}}}),On=M(Ln,[["__scopeId","data-v-800b3803"]]),Fn={class:"widget-filter-enum"},Bn={class:"flex gap-10 padding-10"},Dn=r.defineComponent({__name:"widget-filter-entity",props:{baseEntity:{},filters:{},values:{},filterMetadata:{}},emits:["update:values","readProcess"],setup(e,{emit:n}){const t=e,o=r.ref([]),i=be(t.filterMetadata.entity),a=d=>(t.values||[]).includes(d),l=n;function c(d){const f=t.values||[];return f.includes(d)?l("update:values",f.filter(p=>p!==d)):l("update:values",[...f,d])}const s=se(async()=>{o.value=await le(t.baseEntity,{fields:t.filterMetadata.name.join(" "),order:[t.filterMetadata.name[1],"asc"],distinct:!0,filter:x(t.filters)}).then(d=>d.map(f=>({label:f[t.filterMetadata.name[1]],value:f[t.filterMetadata.name[0]]})))});function u(){l("update:values",[])}return r.watch(()=>s.loading,d=>{l("readProcess",d?"start":"end")},{immediate:!0}),r.watch(()=>i.value,()=>{s.loading||s.call()},{immediate:!0}),(d,f)=>{const p=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Fn,[r.createElementVNode("div",Bn,[r.createVNode(p,{label:"Reload filter",loading:r.unref(s).loading||!1,icon:"reload",onClick:f[0]||(f[0]=()=>r.unref(s).call())},null,8,["loading"]),r.createVNode(p,{label:"Clear",onClick:u})]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,w=>(r.openBlock(),r.createBlock(r.unref(O.FormField),{class:"widget-filter-enum-item",key:w.value,onClick:()=>c(w.value),type:"single-checkbox","model-value":a(w.value),label:w.label},null,8,["onClick","model-value","label"]))),128))])}}}),$n=M(Dn,[["__scopeId","data-v-cd8043dd"]]),he=r.reactive({});function xn(){mt(),setInterval(mt,50)}function Nt(){return he}function mt(){const e={};Object.entries(localStorage).forEach(([n,t])=>{e[n]=!0,he[n]!==t&&(he[n]=t)}),Object.keys(he).forEach(n=>{e[n]||delete he[n]})}const A={getEntityLink(e,n){return`/forms/${e}/${n}`},iconHandlerText(){return""},iconTag:"i",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",tableFilterEntityBind:{String:On,Entity:$n},arrayListCellHandlers:[],arrayFieldParamsHandlers:[]};function Vn(e){xn();for(let n in e)A[n]=e[n]}const Pn={props:{name:String},setup(e,n){let t="unknown";try{t=n.slots.default()[0].children}catch{t=e.name}typeof t!="string"&&console.warn(`Name for Icon.vue is not string. ${t}`);try{t=t.replace(/\s+/g,"")}catch{}return()=>r.h(A.iconTag,{class:A.iconHandler?A.iconHandler(t):`icon icon-${t}`},A.iconHandlerText(t))}},ye=M(Pn,[["__scopeId","data-v-8a72b45f"]]),Mn=Oe(Be("setup-list-row"));function jn(e,n){const t=e.config.map(o=>Un(o,e,n));return r.h("tr",{class:"widget-table__row widget-table-row"},t)}function Un(e,n,t){const o=n.values;let i=Fe(e,o);const a={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function l(d){a.onClick.push(()=>d(o,e,t))}function c(d){Array.isArray(d)?a.class.push(...d):a.class.push(d)}const s=[],u=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(c(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(r.h(O.FormField,{type:"single-checkbox",modelValue:n.selected})),l(gt.bind(null,t,!0));break}case"select":{u.push(r.h(O.FormField,{type:"single-radio",modelValue:n.selected})),l(gt.bind(null,t,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const d=e.link(o);if(d){const f=r.h(ie.RouterLink,{to:d});u.push(f),c("widget-table-cell_link")}}catch(d){Mn("Can't add router link",d)}if(e.href&&(u.push(r.h("a",{href:e.href(o),target:"_blank"})),c("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&u.push(r.h("p",{class:"widget-list-cell-text"},i)),e.icon&&(typeof e.icon=="string"&&u.push(r.h(ye,{name:e.icon})),typeof e.icon=="function")){const d=e.icon(o);d!==null&&u.push(r.h(ye,{name:d}))}return e.class&&(typeof e.class=="function"?c(e.class(o)):c(e.class)),A.listCellHandler&&(console.log("listCellHandler is deprecated. Please use coreUtils.addListCellHandler instead."),A.listCellHandler(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:t})),A.arrayListCellHandlers&&A.arrayListCellHandlers.forEach(d=>d(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:t})),s.push(r.h("td",a,u)),s}function gt(e,n){e.emit("select",n)}function Je(e,n){return()=>{try{return jn(e,n)}catch(t){return console.warn(t),null}}}const Wn={props:{values:Object,config:Object,selected:Boolean},setup:Je},qn=["colspan"],ht=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:n}){const t=n,o=r.ref();return r.onMounted(()=>{setTimeout(()=>{o.value&&o.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(i,a)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:o},[r.createElementVNode("td",{colspan:i.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.component),r.mergeProps(i.$attrs,{values:i.values,new:i.isNew,onClose:a[0]||(a[0]=l=>t("close")),onSave:a[1]||(a[1]=l=>t("save",l))}),null,16,["values","new"]))],8,qn)],512))}}),je="update:selectedRows",Hn="update:activeRow",Rt=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1}},emits:["save","order"],setup(e,{emit:n}){const t=e,o=r.ref(),i=n,a=r.useSlots(),l=r.computed(()=>{var p;return(p=a==null?void 0:a.default)==null?void 0:p.call(a)[0]});function c(){const w=t.selectedRows.length!==0?[]:[...t.array];i(je,w)}function s(p,w=!0){if(!t.selectedRows)return;if(!w)return i(je,t.selectedRows.includes(p)?[]:[p]);const y=[...t.selectedRows],h=y.indexOf(p);return h===-1?y.push(p):y.splice(h,1),i(je,y)}function u(p){i(Hn,p)}function d(p){i("save",p),i("update:activeRow",null)}const f=r.computed(()=>t.shortcut?t.config.filter(p=>p.name?!!t.array.find(w=>![null,""].includes(Fe(p,w))):!0):t.config);return r.watch(()=>t.activeRow,(p,w)=>{console.log(p,w),p===null&&typeof w=="number"&&setTimeout(()=>{if(!o.value)return;const y=o.value.querySelector(`tbody>tr:nth-child(${w+1})`);y&&y.scrollIntoView({block:"nearest",behavior:"smooth"})},100)}),(p,w)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",{class:"widget-table",ref_key:"refTable",ref:o},[r.createElementVNode("thead",null,[r.createVNode(kn,{config:f.value,onOrder:w[0]||(w[0]=y=>p.$emit("order",y))},{default:r.withCtx(y=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.$slots["head-cell"]||St),r.mergeProps(y,{onSelect:c}),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.array,(y,h)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:h},[r.createVNode(Wn,{config:f.value,values:y,selected:p.selectedRows.includes(y),onSelect:g=>s(y,g),onActivate:g=>u(h),class:r.normalizeClass(p.classCallback?p.classCallback(y):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),l.value&&p.activeRow===h?(r.openBlock(),r.createBlock(ht,{key:0,component:l.value,"row-length":p.config.length,values:y,onClose:w[1]||(w[1]=g=>i("update:activeRow",null)),onSave:d,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),p.activeRow===r.unref(S).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(ht,{key:0,component:l.value,"row-length":f.value.length,onClose:w[2]||(w[2]=y=>i("update:activeRow",null)),onSave:d,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])],512)]))}}),zn=r.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("div",{class:"widget-spinner",style:r.normalizeStyle({"border-left":`1.1em solid ${n.color}`})},null,4))}}),Ee=M(zn,[["__scopeId","data-v-0ef9ae88"]]),Gn={class:"widget-button"},Yn=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("button",Gn,[n.wait?(r.openBlock(),r.createBlock(Ee,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"default",{},void 0,!0)]))}}),Xn=M(Yn,[["__scopeId","data-v-450dc564"]]),Kn={class:"widget-multi-button-wrap position_relative cursor_pointer"},Jn={class:"widget-multi-button-body grid"},Qn=["onClick"],Zn={class:"widget-multi-button-side-wrap"},er=r.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){r.useCssVars(l=>({"04895bf1":o.value}));const n=e,t=r.reactive({active:!1,wait:!1}),o=r.computed(()=>n.array.length+(n.label?1:0));function i(l){if(!(typeof l!="function"||t.wait))return t.wait=!0,Promise.resolve().then(l).finally(()=>{t.wait=!1})}function a(l=!t.active){t.active=l}return(l,c)=>(r.openBlock(),r.createElementBlock("div",Kn,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",t.active?"widget-multi-button_active":null])},[r.createElementVNode("div",Jn,[l.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=s=>a())},r.toDisplayString(l.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(s,u)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:d=>{i(s.callback),a(!1)}},r.toDisplayString(s.label),9,Qn))),128))]),r.createElementVNode("div",Zn,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",t.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=s=>a())},[t.wait?(r.openBlock(),r.createBlock(r.unref(Ee),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(r.openBlock(),r.createBlock(r.unref(ye),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}}),tr=M(er,[["__scopeId","data-v-d43a76ce"]]),nr={class:"widget-loader flex flex-align_center gap_10 padding_15"},rr={class:"text_md"},De=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("div",nr,[r.createVNode(Ee,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",rr,r.toDisplayString(n.label),1)]))}}),or=["alt","src"],ir=r.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const n=e,t=r.ref();return r.onMounted(()=>{t.value&&(t.value.src=n.src),t.value.onerror=function(){n.default&&(t.value.src=n.default)}}),(o,i)=>(r.openBlock(),r.createElementBlock("img",{alt:o.alt,ref_key:"refImage",ref:t,src:o.src||o.$props.default},null,8,or))}}),ar={props:{config:Array,values:Object,selected:Boolean},setup:Je},sr=M(ar,[["__scopeId","data-v-344a8cc1"]]),lr=e=>(r.pushScopeId("data-v-bf495d6a"),e=e(),r.popScopeId(),e),cr={class:"widget-list-head-cell"},ur=lr(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),dr=r.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:n}){const t=e,o=n;return t.title&&console.warn(`For cell ${t.name} using title,it should be replaced with label.`),(i,a)=>(r.openBlock(),r.createElementBlock("th",null,[r.createElementVNode("div",cr,[r.createElementVNode("div",{class:"head-cell-content flex_grow",style:r.normalizeStyle({"min-width":i.minWidth,"max-width":i.maxWidth,width:i.width})},[i.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(O.FormField),{key:0,type:"single-checkbox",onClick:a[0]||(a[0]=r.withModifiers(l=>o("select"),["stop","prevent"]))})):(r.openBlock(),r.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:a[1]||(a[1]=l=>o("order"))},r.toDisplayString(i.title||i.label),1))],4),i.name&&i.order.length&&i.order[0]===i.name?(r.openBlock(),r.createBlock(r.unref(ye),{key:0,class:r.normalizeClass(["head-cell-order",{"head-cell-order_down":i.order.length>1&&i.order[1]==="desc"}])},{default:r.withCtx(()=>[r.createTextVNode("core-arrow-up")]),_:1},8,["class"])):r.createCommentVNode("",!0),ur])]))}}),fr=M(dr,[["__scopeId","data-v-bf495d6a"]]),pr=r.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:n}){const t=e,o=n,i=r.ref(),a=r.ref();r.onMounted(()=>{function u(y,h){let g=-1;do g++,h-=y[g];while(h>0&&g<y.length);return g}function d(y,h){let g=0;for(;h>0&&h>y[g]&&g<y.length;)h-=y[g],g++;return console.log(h,g),g>0?g:0}function f(y){try{a.value.style.insetInlineStart=y+"px"}catch(h){console.log(h)}}function p(y){try{a.value.style.width=y+"px",a.value.style.minWidth=y+"px",a.value.style.maxWidth=y+"px"}catch(h){console.log(h)}}function w(y){return y===null?!1:y.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(h){var D;function g(V){return V.screenX+E-T}const v=i.value,m=[...v.children].filter(V=>V.localName==="th"),E=((D=v.offsetParent)==null?void 0:D.scrollLeft)||0,b=m.map(V=>V.clientWidth),$=w(h.target),T=v.getBoundingClientRect().left,k=g(h),_=u(b,k),I=b.slice(0,_).reduce((V,W)=>V+W,0),B=k-I,C=v.offsetWidth,N=m[_].clientWidth;if(t.config[_].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",h.screenX),console.log("Widths",b),console.log("max width",C),console.log("Start Position",k),console.log("Position From",_),console.log("Start Position",_),console.log("Global offset (Отступ самой таблицы от края экрана)",T),console.log("Del",B),console.groupEnd(),a.value.innerText=m[_].textContent||"",a.value.style.display="grid",a.value.style.width=N+"px",a.value.style.cursor="grabbing",f(I),p(N),document.addEventListener("pointermove",K,{passive:!0}),document.addEventListener("pointerup",U);function U(V){if(console.group("END"),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",U),$&&(t.config[_].width=a.value.style.width,t.config[_].minWidth=a.value.style.width,t.config[_].maxWidth=a.value.style.width,l(t.config)),!$){const W=V.screenX+E-T;console.log("ENP Position",W);const ne=d(b,W);if(console.log(_,"->",ne),ne!==_){const me=t.config[_],Ve=t.config;Ve.splice(_,1),Ve.splice(ne,0,me),l(Ve)}else{const me=t.config[_].name;c(me)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function K(V){if($){const me=g(V)-k+N;p(me);return}let W=V.screenX+E-T-B;W<0&&(W=0),W+N>C&&(W=C-N),f(W)}})});function l(u){o("update:config",u)}function c(u){if(!u)return;if(Array.isArray(u)){if(u.length<1)return;u=u[0]}if(t.order.length===0||t.order[0]!==u)return void s([u]);const d=t.order.length===1||t.order[1]==="asc"?"asc":"desc";s([u,d==="asc"?"desc":"asc"])}function s(u){o("update:order",u)}return(u,d)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:i},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.config,(f,p)=>(r.openBlock(),r.createBlock(fr,r.mergeProps({key:f,ref_for:!0},f,{onOrder:w=>c(f.name),onSelect:d[0]||(d[0]=w=>o("select")),order:u.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:a},"test",512)],512))}}),mr=M(pr,[["__scopeId","data-v-ccffc6bd"]]),gr={class:"widget-list"},hr={class:"widget-list-body position_relative"},yr=50,vr=r.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:n}){const t=e,o=n;function i(s,u=!0){if(t.selectedRows)if(!u)l(t.selectedRows.includes(s)?[]:[s]);else{const d=[...t.selectedRows],f=d.indexOf(s);f===-1?d.push(s):d==null||d.splice(f,1),l(d)}}function a(){var s;if(((s=t.selectedRows)==null?void 0:s.length)!==t.array.length)return l([...t.array]);l([])}function l(s){o("update:selectedRows",s)}function c(s){if(!s)return;const u=s.target;u.scrollTop+u.clientHeight+yr>u.scrollHeight&&o("scrollEnd")}return(s,u)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[r.createElementVNode("table",gr,[r.createElementVNode("thead",null,[r.createVNode(mr,{onSelect:u[0]||(u[0]=d=>a()),"onUpdate:order":u[1]||(u[1]=d=>o("update:order",d)),"onUpdate:config":u[2]||(u[2]=d=>o("update:config",d)),config:s.config,order:s.order},null,8,["config","order"])]),r.createElementVNode("tbody",hr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.array,(d,f)=>{var p;return r.openBlock(),r.createBlock(sr,{key:f,class:"widget-list-row",values:d,config:s.config,selected:(p=s.selectedRows)==null?void 0:p.includes(d),onSelect:w=>i(d,w)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function Qe(){var a;const e=r.computed(()=>Object.keys(t).length===0||Object.values(t).includes(!0)),n=(a=r.getCurrentInstance())==null?void 0:a.uid;if(!n)throw"Undefined instance. Please check it.";const t=r.reactive({});r.provide(S.VISIBLE_ITEM_PROVIDE_NAME,{show(l){t[l]=!0},hide(l){t[l]=!1},remove(l){delete t[l]}});const o=r.inject(S.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){o==null||o.show(n)},hide(){o==null||o.hide(n)},remove(){o==null||o.remove(n)}},visibleItems:t}}function Lt(e){const n={name:e,entity:r.inject(S.PROVIDE_ENTITY_NAME)};if(!n.name)throw new Error("Field without name try use metadata.");const t=r.ref(!1),o=r.ref(null);return e.split(".").reduce((i,a,l,c)=>l===c.length-1?i:i.then(()=>{var u,d;const s=(d=(u=o.value)==null?void 0:u.fieldsByName[a])==null?void 0:d.referencedEntity;if(!s)throw new Error("---");return Q.initEntity(s).then(()=>s)}).then(s=>{o.value=Q.get(s),n.entity=s,n.name=c[l+1]}),Promise.resolve().then(()=>Q.initEntity(n.entity)).then(()=>{o.value=Q.get(n.entity)})).finally(()=>t.value=!0),r.computed(()=>{if(!t.value||!o.value)return;const i=o.value.fieldsByName[n.name];if(i)return i})}const wr=r.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{},usageContext:{type:Boolean,default:!0}},setup(e){const n=e;be();const t=ct(),o=r.computed(()=>{var y,h,g;const f=c.value,p=s(f),w={type:p,disabled:n.usageContext?!((y=l.value)!=null&&y.canSet):!1,label:n.label};return p==="Decimal"&&((g=(h=f==null?void 0:f.presentationType)==null?void 0:h.toLowerCase)==null?void 0:g.call(h))==="money"&&(w.money=!0),f&&Object.assign(w,{suffix:p==="number"?f.valueUnit:void 0,required:a.includes(p||"")?!1:f.required,label:n.label||f.displayName}),Array.isArray(A.arrayFieldParamsHandlers)&&A.arrayFieldParamsHandlers.forEach(v=>Object.assign(w,v(f,l.value,w))),w}),i=["MultiText","MultiWideText"],a=["switch","single-checkbox","single-radio"],l=r.computed(()=>{var f;return(f=t==null?void 0:t.value)==null?void 0:f.fields[n.name]}),c=Lt(n.name);function s(f){if(typeof n.type=="string"&&n.type.length!==0)return n.type;if(f){if(f.type==="Reference"||f.type==="Owned")return f.referencedEntity;if(f.dataType==="Boolean")return"single-checkbox";if(f.dataType==="DateTime")return"date";if(f.dataType==="Integer"||f.dataType==="Decimal")return"number";if(f.dataType==="List")return f.aggregatedEntity;if(i.includes(f.presentationType))return"textarea";if(f.presentationType==="PhoneNumber")return"tel"}return"text"}const u=r.computed(()=>{var f;return n.usageContext?((f=l.value)==null?void 0:f.canGet)===!0:!0}),{controller:d}=Qe();return r.watch(()=>u.value,f=>f?d.show():d.hide(),{immediate:!0}),r.onUnmounted(()=>d.remove()),(f,p)=>u.value?(r.openBlock(),r.createBlock(r.unref(O.FormField),r.mergeProps({key:0},{...f.$attrs,...o.value},{name:f.name}),null,16,["name"])):r.createCommentVNode("",!0)}});function Er(e){return Array.isArray(e)&&(e==null?void 0:e[1])||S.DEFAULT_ORDER_DIR}const br=["fill"],_r=r.createElementVNode("path",{d:"M440-647 244-451q-12 12-28 11.5T188-452q-11-12-11.5-28t11.5-28l264-264q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l264 264q11 11 11 27.5T772-452q-12 12-28.5 12T715-452L520-647v447q0 17-11.5 28.5T480-160q-17 0-28.5-11.5T440-200v-447Z"},null,-1),kr=[_r],Cr=r.defineComponent({__name:"widget-icon-arrow-up",props:{color:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:n.color},kr,8,br))}}),Tr={class:"widget-fast-table-head-cell-td"},Sr={key:1,class:"widget-head-cell-label"},Ar={key:2,class:"widget-head-cell-order"},Ir=r.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{},type:{},isFullSelected:{type:Boolean}},emits:["select"],setup(e,{emit:n}){const t=e,o=r.computed(()=>Ke(t.name));r.computed(()=>Er(t.order));const i=n;function a(){i("select")}return(l,c)=>{var s;return r.openBlock(),r.createElementBlock("td",Tr,[r.createElementVNode("div",{class:r.normalizeClass(["widget-head-cell",[l.type==="multi-select"?"justify-content-center":""]]),onClick:c[0]||(c[0]=u=>l.$emit("order",l.name))},[l.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(O.FormField),{key:0,"model-value":l.isFullSelected,onClick:a,type:"single-checkbox"},null,8,["model-value"])):(r.openBlock(),r.createElementBlock("span",Sr,r.toDisplayString(l.label),1)),o.value===((s=l.order)==null?void 0:s[0])?(r.openBlock(),r.createElementBlock("div",Ar,[r.createVNode(Cr,{color:"var(--color-primary)",class:r.normalizeClass(["widget-head-cell-order-icon",`widget-head-cell-order-icon_${l.order[1]==="desc"?"desc":"asc"}`])},null,8,["class"])])):r.createCommentVNode("",!0)],2)])}}}),Ot=M(Ir,[["__scopeId","data-v-d131e64e"]]),Nr=["fill"],Rr=r.createElementVNode("path",{d:"M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"},null,-1),Lr=[Rr],Or=r.defineComponent({__name:"widget-icon-keyboard-arrow-down",props:{color:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:n.color},Lr,8,Nr))}}),Fr={class:"widget-filter-item-popup"},Br=r.defineComponent({__name:"widget-table-panel-filter-item",props:{entity:{},values:{},filters:{},filterItem:{}},emits:["update:values"],setup(e,{emit:n}){const t=e,o=n,i=A.tableFilterEntityBind,a=r.ref(),l=r.computed(()=>{const w=t.filterItem;return w.entity?"Entity":w.type?w.type:null});function c(w){s.value=w==="start"}const s=r.ref(!1),u=r.computed(()=>Array.isArray(t.values)||typeof t.values=="string"?t.values.length>0:!!t.values),d=r.ref(!1);let f=null;function p(w=!d.value){d.value=w,!d.value&&f?(f(),f=null):a.value&&(f=O.utils.clickOutside(a.value,p.bind(null,!1)))}return(w,y)=>{var h;return r.openBlock(),r.createElementBlock("div",{class:"widget-filter-item-container grid",ref_key:"refFilterItem",ref:a},[r.createElementVNode("div",{class:r.normalizeClass(["widget-filter-item",{"widget-filter-item_active":u.value}]),onClick:y[0]||(y[0]=()=>p())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":u.value}])},r.toDisplayString(w.filterItem.label||"--"),3),s.value?(r.openBlock(),r.createBlock(Ee,{key:0})):(r.openBlock(),r.createBlock(Or,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":d.value})},null,8,["class"]))],2),r.withDirectives(r.createElementVNode("div",Fr,[l.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((h=r.unref(i))==null?void 0:h[l.value]),{key:0,"filter-metadata":w.filterItem,values:w.values,filters:w.filters,"base-entity":w.entity,"onUpdate:values":y[1]||(y[1]=g=>o("update:values",g)),onReadProcess:c},null,40,["filter-metadata","values","filters","base-entity"])):r.createCommentVNode("",!0)],512),[[r.vShow,d.value]])],512)}}}),Ft=M(Br,[["__scopeId","data-v-ed31ccd3"]]),Dr={class:"widget-table-panel-filter flex"},$r=r.defineComponent({__name:"widget-table-panel-filters",props:{filtersConfig:{},filters:{},entity:{}},emits:["update:filters"],setup(e,{emit:n}){const t=e,o=n;function i(a,l){o("update:filters",{...t.filters,[a]:l})}return(a,l)=>(r.openBlock(),r.createElementBlock("div",Dr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.filtersConfig,(c,s)=>{var u;return r.openBlock(),r.createBlock(Ft,{key:s,entity:a.entity,"filter-item":c,values:(u=a.filters)==null?void 0:u[r.unref(ae)(c)],filters:a.filters,"onUpdate:values":d=>i(r.unref(ae)(c),d)},null,8,["entity","filter-item","values","filters","onUpdate:values"])}),128))]))}}),xr=M($r,[["__scopeId","data-v-89e1fa2d"]]),Vr={class:"widget-fast-table-tools"},Pr=r.defineComponent({__name:"widget-fast-table-tools",props:{tools:{},loading:{type:Boolean},selectedRows:{},metadata:{}},emits:["reload","export"],setup(e,{emit:n}){const t=e,o=ie.useRouter(),i=n,a=[{name:"config",label:"Settings",icon:"list-settings",buttonStyle:"default",callback:()=>null},{name:"export",label:"Save as CSV",icon:"list-download",buttonStyle:"default",callback:()=>i("export")},{name:"reload",label:"Reload",icon:"reload",buttonStyle:"default",callback:()=>i("reload")}],l=a.map(p=>p.name),c=r.inject(S.PROVIDE_NAME_ACTIONS,[]);function s(p){return{...p,label:p.label||"Batch update",callback:async()=>{if(t.selectedRows.length===0)return xe.add("error","Kindly select at least one record to update");const w=await H.promptModal(S.MODAL_BATCH_VALUES,{entity:t.metadata.name,availableFields:p.availableFields||[]}),y=t.metadata.fieldNameForIdentification,h=(t.selectedRows||[]).map(g=>({primaryKey:g[y],version:t.metadata.versioned?g.Version:void 0}));await Wt(t.metadata.name,{values:w,elements:h}),i("reload")}}}const u=r.computed(()=>{var y;const p=((y=c==null?void 0:c.actions)==null?void 0:y.value)||[];return Array.isArray(t.tools)?(t.tools,t.tools.reduce((h,g)=>{if(g.name==="*")h.push(...a);else if(l.includes(g.name)){const v=a.find(m=>m.name===g.name);v&&h.push(v)}else if(g.name==="redirect"){const v={...g,label:g.label,callback:()=>o.push(g.to)};h.push(v)}else if(g.name==="batch-update"&&!g.override)h.push(s(g));else{g.override&&p.find(m=>m.name===g.override)&&g.name==="batch-update"&&h.push(s(g));const v=p.find(m=>m.name===g.name);v&&h.push({name:g.name,label:v.title,icon:g.icon,buttonStyle:g.buttonStyle,callback:()=>Promise.resolve().then(()=>{d[g.name]=!0}).then(()=>f(v)).finally(()=>{d[g.name]=!1})})}return h},[])):[]}),d=r.reactive({});function f(p){var h;const w=(h=p.action.parameters.find(g=>g.dataTypeName==="IntegerArray"))==null?void 0:h.name,y={};return w&&(y[w]=t.selectedRows.map(g=>{if(!(typeof g=="object"&&g!==null))return null;const v=t.metadata.fieldNameForIdentification;return v===void 0?null:g[v]})),p.callback(y)}return(p,w)=>{const y=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Vr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,h=>(r.openBlock(),r.createBlock(y,{label:h.label,title:h.name,icon:h.icon,type:h.buttonStyle,loading:h.name==="reload"?p.loading:d[h.name],onClick:h.callback},null,8,["label","title","icon","type","loading","onClick"]))),256)),r.renderSlot(p.$slots,"default",{},void 0,!0)])}}}),Mr=M(Pr,[["__scopeId","data-v-0070862b"]]);function jr(e){const n=Nt(),t=ie.useRouter(),o=r.reactive({entity:null,mark:null,settings:null});function i(m){const E={...u.value,...m};a(E)}function a(m){{const E=m.prefilters;E&&(Object.keys(E).forEach(b=>{var $,T;Array.isArray(E[b])&&E[b].length===0&&o.settings&&!((T=($=o.settings)==null?void 0:$.prefilters)!=null&&T[b])&&delete E[b]}),O.utils.isEmptyObject(E)&&delete m.prefilters)}localStorage.setItem(s(o.entity,o.mark),JSON.stringify(m))}function l(){return o.entity?JSON.parse(localStorage[s(o.entity,o.mark)]||"{}"):null}function c(m,E){o.entity=m,o.mark=E,f.call()}function s(m,E){return"list-configuration:"+m+(E?"-"+E:"")}const u=r.computed(()=>o.entity?JSON.parse(n[s(o.entity,o.mark)]||"{}"):null),d=r.computed(()=>o.settings?Ge(o.entity,o.settings.config,{router:t,activate:e}):[]),f=se(async function(){if(!o.entity)return;const E=await Pt(o.entity,o.mark);o.settings=Object.freeze(E)}),p=r.computed(()=>{var b;const m=u.value.order||null,E=((b=o.settings)==null?void 0:b.order)||null;return m||E||[]}),w=r.computed(()=>{var b;const m=u.value.prefilters||{};return{...((b=o.settings)==null?void 0:b.prefilters)||{},...m}}),y=r.computed(()=>{var m;return((m=o.settings)==null?void 0:m.filters)||[]}),h=r.computed(()=>{var m;return((m=o.settings)==null?void 0:m.label)||null}),g=r.computed(()=>{var m;return((m=o.settings)==null?void 0:m.tools)||[]}),v=r.computed(()=>!O.utils.isEmptyObject(u.value));return{state:o,get customFilters(){return o.settings.customFilters||[]},set:c,get:l,configuration:u,update:i,computedPrefilter:w,computedFiltersConfiguration:y,get cellConfig(){return o.settings?Ge(o.entity,o.settings.config,{router:t,activate:e}):[]},get prefilters(){var m;return((m=l())==null?void 0:m.prefilters)||o.settings.prefilters||{}},get order(){var m;return((m=l())==null?void 0:m.order)||o.settings.order||[]},clean(){localStorage.removeItem(s(o.entity,o.mark))},cellConfiguration:d,computedLabel:h,computedTools:g,computedHasLocalConfiguration:v,computedOrder:p,get displayModeForNew(){return o.settings.displayModeForNew||"inline"}}}const Ur={class:"es-grid es-gap-15"},Wr={key:0,class:"title-md color-primary margin-0 widget-fast-table-label"},qr={class:""},Hr=r.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{},hideLabel:{type:Boolean}},setup(e,{expose:n}){const t=e,o=ie.useRouter(),i=r.ref([]),a=r.ref(null),l=r.computed(()=>a.value?i.value.indexOf(a.value[2]):null);function c(C,N,U){a.value=[C,N,U]}const s=r.ref(null),u=O.Form.getParentForm(),d=r.ref([]),f=be(t.entity),{state:p,update:w}=ct(t.entity,{masterEntities:t.masterEntities||[]}),y=se(async()=>{try{await g.call(),await w()}catch(C){const{message:N}=nt(C);s.value=N}});u instanceof O.Form&&u.subscribe({read:y.call.bind(null),name:t.entity,type:"table"}),r.watch(()=>t.mark,()=>{T.set(t.entity,t.mark)});function h(){return x.and(x(T.prefilters),x(t.binding||{}))}const g=se(async function(){const N=t.entity;s.value=null,d.value=[];const U=await le(N,{customFilters:T.customFilters,fields:ot(k.value).join(" "),order:T.order,filter:h()});i.value=Object.freeze(U.map(K=>Object.freeze(K)))}),{controller:v}=Qe();r.watch(()=>p.value,C=>{C&&(C.canRead?v.show():v.hide())},{immediate:!0});let m=[ve.on("affected-entity",C=>{C.name===t.entity&&g.call()}),ve.on("display-entity",async C=>{C.name===t.entity&&(g.promise&&await g.promise,c(C.name,C.id,i.value.find(N=>N[f.value.fieldNameForIdentification]===C.id)))})];r.onUnmounted(()=>{m.map(C=>C()),v.remove()});function E(C){function N(D){return Array.isArray(D)?N(D[0]):typeof D!="string"?null:D}const U=N(C);if(!U)return;const K=T.order;b("order",K[0]!==U?[U,"asc"]:K[1]==="desc"?[]:[U,"desc"])}function b(C,N){T.update({[C]:N}),g.call()}const $=r.computed(()=>y.wait),T=jr(c),k=T.cellConfiguration;T.set(t.entity,t.mark),r.watch(()=>T.state.settings,y.call);const _=r.computed(()=>T.state.settings);n({listSettings:_,array:i,config:k});function I(){H.openModal(S.MODAL_LIST_DOWNLOAD,{entity:t.entity,cellConfig:T.cellConfig,order:T.order,prefilters:h(),customFilters:T.customFilters})}function B(){switch(T.displayModeForNew){case"modal":return H.openModal(S.MODAL_ENTITY,{entity:t.entity});case"form":return o.push(lt(t.entity));case"inline":return a.value=[t.entity]}}return(C,N)=>{const U=r.resolveComponent("widget-button"),K=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",Ur,[r.unref(T).computedLabel.value&&!C.hideLabel?(r.openBlock(),r.createElementBlock("p",Wr,r.toDisplayString(r.unref(T).computedLabel.value),1)):r.createCommentVNode("",!0),r.unref(f)?(r.openBlock(),r.createBlock(Mr,{key:1,metadata:r.unref(f),tools:r.unref(T).computedTools.value,loading:$.value,"selected-rows":d.value||[],onReload:r.unref(y).call,onExport:I},{default:r.withCtx(()=>{var D;return[r.renderSlot(C.$slots,"tools"),(D=r.unref(p))!=null&&D.canCreate?(r.openBlock(),r.createBlock(U,{key:0,onClick:B,type:"primary",label:"Add New"})):r.createCommentVNode("",!0),r.unref(T).computedHasLocalConfiguration.value?(r.openBlock(),r.createBlock(U,{key:1,onClick:r.unref(T).clean,type:"primary",label:"Clear all filters"},null,8,["onClick"])):r.createCommentVNode("",!0)]}),_:3},8,["metadata","tools","loading","selected-rows","onReload"])):r.createCommentVNode("",!0),r.createElementVNode("div",qr,[r.createVNode(xr,{entity:C.entity,"filters-config":r.unref(T).computedFiltersConfiguration.value,filters:r.unref(T).computedPrefilter.value,"onUpdate:filters":N[0]||(N[0]=D=>b("prefilters",D))},null,8,["entity","filters-config","filters"]),r.createVNode(r.unref(Rt),{config:r.unref(k),array:i.value,"active-row":l.value,"onUpdate:activeRow":N[2]||(N[2]=D=>a.value=null),onOrder:E,class:"table",selectedRows:d.value,"onUpdate:selectedRows":N[3]||(N[3]=D=>d.value=D)},{"head-cell":r.withCtx(D=>{var V,W,ne;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(C.$slots["head-cell"]?C.$slots["head-cell"]:Ot),r.mergeProps({label:D.label},D,{onOrder:E,order:r.unref(T).computedOrder.value,type:D.type,"is-full-selected":((V=d.value)==null?void 0:V.length)===((W=i.value)==null?void 0:W.length)&&((ne=i.value)==null?void 0:ne.length)>0}),null,16,["label","order","type","is-full-selected"]))]}),default:r.withCtx(()=>{var D,V;return[r.createVNode(K,{entity:(D=a.value)==null?void 0:D[0],"primary-key":((V=a.value)==null?void 0:V[1])||null,"master-entities":C.masterEntities||void 0,binding:C.binding,onFormUpdate:N[1]||(N[1]=()=>{a.value=null,r.unref(g).call()})},null,8,["entity","primary-key","master-entities","binding"])]}),_:1},8,["config","array","active-row","selectedRows"])])])}}});function Bt(e,n={},t={}){const o=r.inject(S.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:n,a=typeof n=="string"?t:n;return r.computed(()=>{var s;const c=((typeof e=="string"?(s=o==null?void 0:o.actions)==null?void 0:s.value:r.unref(e))||[]).find(u=>u.name===i);return c?{...c,...a}:null})}const zr=r.defineComponent({__name:"widget-action",props:{name:{},overrideParams:{}},setup(e){const n=e,t=Bt(n.name,n.overrideParams||{}),o=r.computed(()=>{if(t.value)return se(t.value.callback)});return(i,a)=>{var c;const l=r.resolveComponent("widget-button");return r.unref(t)?(r.openBlock(),r.createBlock(l,{key:0,label:r.unref(t).label,loading:((c=o.value)==null?void 0:c.loading)||!1,onClick:a[0]||(a[0]=()=>{var s,u;return(u=(s=o.value)==null?void 0:s.call)==null?void 0:u.call(s,i.overrideParams||{})})},null,8,["label","loading"])):r.createCommentVNode("",!0)}}}),Gr=r.defineComponent({__name:"WidgetResolverEntity",setup(e){const n=ie.useRouter(),t=ie.useRoute();function o(){const i=t.params.entity,a=t.params.primaryKey;it(i,a).then(l=>n.replace(lt(l,a))).catch(l=>{P("error")(l),n.back()})}return r.onMounted(o),(i,a)=>(r.openBlock(),r.createElementBlock("div",null,[r.createVNode(De,{label:"Loading..."})]))}}),Yr=r.defineComponent({__name:"modal-list-download",props:{entity:{},cellConfig:{},prefilters:{},order:{},customFilters:{}},setup(e){const n=e,t=r.computed(()=>o.finished?"Download CSV":`Download ${o.count} records.`),{state:o,downloadFile:i,reject:a,start:l}=un({entity:n.entity,config:n.cellConfig,prefilters:n.prefilters,order:n.order,customFilters:n.customFilters});return H.onBeforeModalClose(a),r.onMounted(l),r.watch(()=>o.finished,()=>{i(),H.popModal()}),(c,s)=>{const u=r.resolveComponent("widget-button"),d=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(d,null,{footer:r.withCtx(()=>[r.createVNode(u,{onClick:s[0]||(s[0]=f=>{r.unref(i)(),r.unref(H.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(De,{label:"Loading"})])]),_:1})}}}),Ze=e=>(r.pushScopeId("data-v-efd61247"),e=e(),r.popScopeId(),e),Xr={class:"version-item"},Kr={class:"text_md"},Jr={class:"version-item-date text_md"},Qr=Ze(()=>r.createElementVNode("span",null,null,-1)),Zr=Ze(()=>r.createElementVNode("div",null,null,-1)),eo=Ze(()=>r.createElementVNode("span",null,null,-1)),to={class:"text_sm"},no={class:"text_sm line-clamp_5"},ro={class:"text_sm line-clamp_5"},oo=r.defineComponent({__name:"version-item",props:{selectedFields:{},date:{},customerName:{},version:{},changes:{},entity:{}},setup(e){const n=e;function t(a,l){const c=a.name.toLowerCase(),s=l.name.toLowerCase();return s==="version"?-1:c==="version"?1:s.startsWith("utc")?-1:c.startsWith("utc")?1:0}const o=r.computed(()=>[...n.changes||[]].sort(t)),i=r.computed(()=>(o.value||[]).filter(a=>Array.isArray(n.selectedFields)&&n.selectedFields.length!==0?n.selectedFields.includes(a.name):!0));return(a,l)=>(r.openBlock(),r.createElementBlock("div",Xr,[r.createElementVNode("span",Kr,[r.createElementVNode("b",null,r.toDisplayString(a.version),1)]),r.createElementVNode("span",Jr,[r.createElementVNode("b",null,r.toDisplayString(r.unref(tt)(a.date)),1)]),Qr,Zr,(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.name},[eo,r.createElementVNode("span",to,r.toDisplayString(c.name),1),r.createElementVNode("span",no,r.toDisplayString(r.unref(qe)(a.entity,c.name,c.newValue)),1),r.createElementVNode("span",ro,r.toDisplayString(r.unref(qe)(a.entity,c.name,c.oldValue)),1)],64))),128))]))}}),io=M(oo,[["__scopeId","data-v-efd61247"]]),et=e=>(r.pushScopeId("data-v-321c2f32"),e=e(),r.popScopeId(),e),ao={key:1,class:"wrap-history"},so={class:"history-header grid gap_10"},lo=et(()=>r.createElementVNode("span",null,null,-1)),co=et(()=>r.createElementVNode("span",{class:"text_md"},"New Value",-1)),uo=et(()=>r.createElementVNode("span",{class:"text_md"},"Old Value",-1)),fo={class:"padding_15 grid gap_10 container-history"},po=r.defineComponent({__name:"modal-version-history",props:{entity:{},primaryKey:{}},setup(e){const n=e,t=r.computed(()=>`${n.entity} Version History`),o=r.ref(),i=r.computed(()=>!s.value||Array.isArray(s.value)&&s.value.length===0?o.value:(o.value||[]).filter(f=>{var p;return f.action==="Insert"?!0:(p=f.changes)==null?void 0:p.find(w=>s.value&&s.value.includes(w.name))})),a=se(u),l=be(n.entity),c=r.computed(()=>l.value.fields.map(f=>({label:f.displayName,value:f.name}))),s=r.ref(null);async function u(){try{const f=await qt({entity:n.entity,primaryKey:n.primaryKey});o.value=f.history}catch(f){P("error")(f)}}r.onMounted(()=>a.call());function d(f){return f.currentValues.map(p=>({name:p.fieldName,newValue:p.value})).filter(p=>p.newValue)}return(f,p)=>{const w=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(w,{label:t.value,class:"wrap-modal-version-history"},{default:r.withCtx(()=>[r.unref(a).loading?(r.openBlock(),r.createBlock(r.unref(De),{key:0,label:"Loading history..."})):(r.openBlock(),r.createElementBlock("div",ao,[r.createElementVNode("div",so,[lo,r.createVNode(r.unref(O.FormField),{type:"select",options:c.value,modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=y=>s.value=y),multiple:""},null,8,["options","modelValue"]),co,uo]),r.createElementVNode("div",fo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(y,h)=>(r.openBlock(),r.createBlock(io,{"selected-fields":s.value,date:y.utcCreated,"customer-name":"",version:y.version,changes:y.action==="Insert"?d(y):y.changes,entity:f.entity,key:h},null,8,["selected-fields","date","version","changes","entity"]))),128))])]))]),_:1},8,["label"])}}}),mo=M(po,[["__scopeId","data-v-321c2f32"]]);function tt(e){return Ne(e,"YYYY/MM/DD HH:mm:ss")}function Ne(e,n="YYYY/MM/DD"){if(!e)return"";try{const t=new Date(e);return pn.format(t,n)}catch(t){return console.log(t),"Invalid date"}}function se(e){function n(i){o.status=i}function t(...i){if(o.loading)return Promise.reject("The process has already started.");o.loading=!0,o.wait=!0;const a=Promise.resolve().then(()=>n(1)).then(()=>e(...i)).then(l=>(n(3),l)).catch(l=>{throw n(2),l}).finally(()=>{o.wait=!1,o.loading=!1,o.promise=null});return o.promise=a,a}const o=r.reactive({status:0,wait:!1,loading:!1,call:t,promise:null});return o}var Dt=(e=>(e[e.init=0]="init",e[e.loading=1]="loading",e[e.error=2]="error",e[e.done=3]="done",e))(Dt||{});function nt(e){return typeof e=="string"?Ce(e):go(e)?Ce(e.message,e.children||e.details||[]):ho(e)?Ce(e.title,[e.detail||""]):Ce(S.DEFAULT_ERROR_MESSAGE)}function go(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function ho(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function Ce(e,n=[]){return{message:e,children:n}}function P(e="error"){return function(n){const{message:t,children:o}=nt(n);xe.add(e,t,{children:o})}}function le(e,n={}){const t=L();return $t(n)&&n.id&&(n.primaryKey=n.id,delete n.id),t.emit("entity:read",{entity:e,...n})}function $t(e){return!!(e.id||e.primaryKey)}function rt(e,n){const t=L();return $t(n)&&n.id&&(n.primaryKey=n.id,delete n.id),t.emit("entity:update",{...n,entity:e})}function ot(e){return e.reduce((n,t)=>(t.name&&(typeof t.name=="string"?n.push(t.name):n.push(...t.name)),n),[])}function xt(e,n=2){if(!(typeof e=="string"||typeof e=="number"))return"";let o=String(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.length<2&&(o[1]=""),o[1]=o[1].padEnd(n,"0"),o[1].length>n&&(o[1]=o[1].substring(0,n)),o.join(".")}function yo(e,n){const t=new Map;return e.forEach(o=>{var a;const i=n(o);t.has(i)||t.set(i,[]),(a=t.get(i))==null||a.push(o)}),t}function vo(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function wo(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return S.DEFAULT_ERROR_MESSAGE}})}function q(e,n={}){return G.isFront&&(n.headers||(n.headers={}),n.headers["Context-Id"]=G.contextId),n.redirect="manual",fetch(e,n).then(t=>t.type==="opaqueredirect"?void window.location.reload():t).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(t=>wo(t).then(o=>{if(!t.ok)throw o;return o}))}function Eo(e,n=1e3){let t=0;return(...o)=>{clearTimeout(t),t=window.setTimeout(()=>e(...o),n)}}function bo(e,n){let t=!1;return(...o)=>{if(!t)return t=!0,setTimeout(()=>t=!1,n),e(...o)}}const _o=Oe(Be("pretty-value-field-by-entity"));function qe(e,n,t){try{const o=Q.get(e);if(!o)throw new Error("For entity metadata is not loaded");const i=o.fieldsByName[n];if(!i)throw new Error(`For entity ${e} can't found fieldMetadata for field ${n}`);return i.dataType==="DateTime"&&typeof t=="string"?new Date(t).toLocaleString():t}catch(o){return _o('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,n,t),t}}const re=Oe(Be("use-socket"));function L(){return Co}function ko(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Co=function(){let e=1,n,t;const o=new Set;let i=0;const a=new Set;function l(){if(n)i&&(clearTimeout(i),i=0);else return;i=setTimeout(()=>{n.close()},An*2);const v=new Uint8Array(1);v[0]=Sn,n.send(v)}setInterval(()=>{Array.from(o).forEach(v=>{g(v)&&(re("Handler for event %s requestId %d was expired",v.event,v.requestId),v.requestId?s({requestId:v.requestId,event:At,data:{message:ee.RequestTookToLong().message}}):o.delete(v))})},1e3),setInterval(()=>{(!n||n.readyState===3)&&u()},S.DELAY_SOCKET_RECONNECT);function c(){return{safeQueue:a,requestId:e,handlers:o,socketInstance:n}}function s(v){const m=[...o.values()];re("Handlers array length is %d. Response event: %s. Request id: %d",o.size,v.event,v.requestId),m.forEach(E=>{const b=v.requestId;(E.requestId&&E.requestId===b||!E.requestId&&E.event===v.event)&&(re("Find appropriated handler: %d, event: %s",e,E.event),E.callback(v.data,v),E.once&&(o.delete(E),re("Handler was removed by *once* params was passed. %o",E)))})}function u(){if(typeof t!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${t}`,"color: purple","color: black"),n=new WebSocket(t),n.onclose=function(v){re("Connection to server was stopped: %d %s",v.code,v.reason),Array.from(o).forEach(m=>{m.guaranteedAnswer&&m.serializeString&&a.add(m.serializeString)})},n.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(v=>{d(v),a.delete(v)})},n.onerror=function(v){console.warn(v)},n.onmessage=v=>{var m;try{if(ko(v.data)){l();return}const E=JSON.parse(v.data);if(!Vt(E)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(E);return}E.event==="progress"&&o.forEach(b=>{b.event===E.data.for.event&&b.requestId===E.data.for.requestId&&(console.log("UPDATE TIME"),b.timeToLive=new Date().getTime()-b.created+S.TIME_TO_LIVE_SOCKET_REQUEST)}),(m=E==null?void 0:E.data)!=null&&m.refresh&&location.reload(),s(E)}catch(E){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(E)}}}function d(v){n.send(v)}function f(v,m){h({event:v,callback:m})}function p(v,m){h({event:v,callback:m,once:!0})}function w(){return n&&(n==null?void 0:n.readyState)===1}function y(v,m,E){const b=++e,$=JSON.stringify({requestId:b,event:v,data:m,contextId:G.contextId,url:A.socketURLHandler?A.socketURLHandler():window.location.href});return w()?d($):(a.add($),re("Socket is not connected. Message was send to save-queue")),new Promise((T,k)=>{h({event:v,requestId:b,once:!0,guaranteedAnswer:!0,serializeString:$,callback:(_,I)=>{if(re("Promise was resolve with next data:",_),To(I))return void k(_);E&&E(_,I),T(_)},timeToLive:S.TIME_TO_LIVE_SOCKET_REQUEST})})}function h(v){const m={timeToLive:0,...v,created:new Date().getTime()};o.add(m)}function g(v){return v.timeToLive===0||typeof v.timeToLive!="number"?!1:new Date().getTime()-v.created>v.timeToLive}return{get socket(){return n},on:f,once:p,emit:y,initialization(v){t=v},getDevInfo:c}}(),To=e=>!!Vt(e)&&e.event===At,Vt=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function Pt(e,n){return L().emit("list-setting:read",{entity:e,mark:n})}function So(e,n){return L().emit("metadata-field:treat",{entity:e,fieldName:n})}function Mt(e,n){return L().emit("entity:create",{...n,entity:e})}function jt(e,n){return L().emit("entity:delete",{...n,entity:e})}function Ao(e,n){return L().emit("usage-context:read",{...n,entity:e})}function Ut(e={}){return L().emit("tool:read",e)}function Io(){return L().emit("metadata-list:read",{})}function Wt(e,n){return L().emit("batch:update",{...n,entity:e})}function it(e,n){return L().emit("entity:resolve",{primaryKey:n,entity:e})}function qt(e){return L().emit("history:read",e)}function No(e,n){return L().emit("entity:count",{...n,entity:e})}function Ro(e){return`/${In}/${e}`}function pe(e){return{exec(n,t){switch(e.name){case"replace-boolean":return pe.replaceBoolean(n,e.values);case"replace-record-operation":return pe.replaceRecordOperation(n)}}}}pe.replaceBoolean=Lo;pe.replaceRecordOperation=Oo;function Lo(e,n){return typeof e!="boolean"?"":e?n[1]:n[0]}function Oo(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Fo(e={}){return L().emit("tool:execute",e)}const Bo=Oe(Be("wrap-tool-response"));function Ht(e,n){return e.handleConfirmation===void 0&&(e.handleConfirmation=xo),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=Po),e.handleCloseForm===void 0&&(e.handleCloseForm=Mo),e.handleValidationResult===void 0&&(e.handleValidationResult=Vo),{...n,label:n.title,async callback(t={}){var l;const o=typeof e.values=="function"?e.values(n,e):e.values;let i={};n.action.targetName==="Record"&&o.hasOwnProperty("Id")&&(i.Id=o.Id,delete o.Id);const a=()=>Fo({name:n.name,values:{...o,...t},primaryKeys:i,usageContext:n.usageContext}).then(async c=>{var s,u;if(!Do(c))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const d of e.handlers)await d(n,c,e);if(!c.success)throw e.handleValidationResult&&c.validationEffect&&((u=(s=c.validationEffect)==null?void 0:s.results)!=null&&u.length)&&e.handleValidationResult(n,c.validationEffect,e),new Error(c.message);return c.message&&xe.add("info",c.message),Array.isArray(c.affectedEntities)&&e.handleAffectedEntity&&c.affectedEntities.forEach(d=>{var f;return(f=e.handleAffectedEntity)==null?void 0:f.call(e,n,d,e)}),n.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(n,e),c}).catch(P("error"));if((l=e.overrides)!=null&&l[n.name])return e.overrides[n.name](n,e);if(n.paramDialog){const c=await jo(n,e);if(c===null)return;t=Object.assign(t,c||{})}return n.requireSave&&e.form&&e.form.changed?e.form.save().then(a):!n.confirmation||!e.handleConfirmation||n.paramDialog?a():e.handleConfirmation(n,a)}}}function Do(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function $o(e){const n="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?n:typeof e=="string"?e:n}async function xo(e,n){const t=$o(e.confirmation);if(!H.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await H.promptModal(S.MODAL_CONFIRM,{message:t}))return n()}function Vo(e,n){const t=S.MODAL_VALIDATION_EFFECT;if(!H.getComponentFromStore(t))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{H.pushModal(t,n)})}function Po(e,n,t){var s;function o(u){return u!==null&&typeof u=="object"&&typeof u.read=="function"}function i(u,d){u&&(Bo("Affected Entity %s. Find form with name %s.",d,u.name),u.name===d&&o(u)&&u.read(),u instanceof O.Form&&u.dependencies.forEach(f=>i(f,d)))}ve.emit("affected-entity",n);const{router:a,form:l}=t,c=(s=n.primaryKey)==null?void 0:s.Id;if(a&&n&&n.name===e.redirectEntity){ve.emit("display-entity",{id:c,name:n.name}),A.getEntityLink&&a.push(A.getEntityLink(n.name,c));return}i(l,n.name)}function Mo(e,n){const{router:t}=n;t&&e.closeHostForm&&t.back()}function jo(e,n){var t;if((t=e.paramDialog)!=null&&t.name)return H.promptModal(e.paramDialog.name,{paramDialog:e.paramDialog,tool:e,options:n})}let oe={};function te(e,...n){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let t=O.utils.getPropFromObject((this==null?void 0:this.vocabulary)||oe,e);if(typeof t=="string")return yt(t,n);const o=O.utils.getPropFromObject(oe==null?void 0:oe.root,e);return typeof o=="string"?yt(o,n):(typeof t===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function yt(e,n){return n.forEach((t,o)=>{e=e.replaceAll(new RegExp(`\\{${o}}`,"g"),t)}),e}te.setGlobalVocabulary=function(e){oe=e};te.getScope=function(e){const n=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),te.bind({vocabulary:O.utils.getPropFromObject(oe,n.toLowerCase())})};te.setVocabulary=function(e){return typeof e=="string"&&(e=O.utils.getPropFromObject(oe,e)),te.bind({vocabulary:e})};function Uo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var He={exports:{}},F={},ze={exports:{}},ce={};function zt(){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 Wo(e,n,t){}function qo(e,n,t){}var Ho=/javascript\s*\:/img;function zo(e,n){return Ho.test(n)?"":n}ce.whiteList=zt();ce.getDefaultWhiteList=zt;ce.onAttr=Wo;ce.onIgnoreAttr=qo;ce.safeAttrValue=zo;var Go={indexOf:function(e,n){var t,o;if(Array.prototype.indexOf)return e.indexOf(n);for(t=0,o=e.length;t<o;t++)if(e[t]===n)return t;return-1},forEach:function(e,n,t){var o,i;if(Array.prototype.forEach)return e.forEach(n,t);for(o=0,i=e.length;o<i;o++)n.call(t,e[o],o,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,"")}},ge=Go;function Yo(e,n){e=ge.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,o=!1,i=0,a=0,l="";function c(){if(!o){var d=ge.trim(e.slice(i,a)),f=d.indexOf(":");if(f!==-1){var p=ge.trim(d.slice(0,f)),w=ge.trim(d.slice(f+1));if(p){var y=n(i,l.length,p,w,d);y&&(l+=y+"; ")}}}i=a+1}for(;a<t;a++){var s=e[a];if(s==="/"&&e[a+1]==="*"){var u=e.indexOf("*/",a+2);if(u===-1)break;a=u+1,i=a+1,o=!1}else s==="("?o=!0:s===")"?o=!1:s===";"?o||c():s===`
7
- `&&c()}return ge.trim(l)}var Xo=Yo,Te=ce,Ko=Xo;function vt(e){return e==null}function Jo(e){var n={};for(var t in e)n[t]=e[t];return n}function Gt(e){e=Jo(e||{}),e.whiteList=e.whiteList||Te.whiteList,e.onAttr=e.onAttr||Te.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Te.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Te.safeAttrValue,this.options=e}Gt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var n=this,t=n.options,o=t.whiteList,i=t.onAttr,a=t.onIgnoreAttr,l=t.safeAttrValue,c=Ko(e,function(s,u,d,f,p){var w=o[d],y=!1;if(w===!0?y=w:typeof w=="function"?y=w(f):w instanceof RegExp&&(y=w.test(f)),y!==!0&&(y=!1),f=l(d,f),!!f){var h={position:u,sourcePosition:s,source:p,isWhite:y};if(y){var g=i(d,f,h);return vt(g)?d+":"+f:g}else{var g=a(d,f,h);if(!vt(g))return g}}});return c};var Qo=Gt;(function(e,n){var t=ce,o=Qo;function i(l,c){var s=new o(c);return s.process(l)}n=e.exports=i,n.FilterCSS=o;for(var a in t)n[a]=t[a];typeof window<"u"&&(window.filterCSS=e.exports)})(ze,ze.exports);var at=ze.exports,st={indexOf:function(e,n){var t,o;if(Array.prototype.indexOf)return e.indexOf(n);for(t=0,o=e.length;t<o;t++)if(e[t]===n)return t;return-1},forEach:function(e,n,t){var o,i;if(Array.prototype.forEach)return e.forEach(n,t);for(o=0,i=e.length;o<i;o++)n.call(t,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var n=/\s|\n|\t/,t=n.exec(e);return t?t.index:-1}},Zo=at.FilterCSS,ei=at.getDefaultWhiteList,Re=st;function Yt(){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 Xt=new Zo;function ti(e,n,t){}function ni(e,n,t){}function ri(e,n,t){}function oi(e,n,t){}function Kt(e){return e.replace(ai,"&lt;").replace(si,"&gt;")}function ii(e,n,t,o){if(t=nn(t),n==="href"||n==="src"){if(t=Re.trim(t),t==="#")return"#";if(!(t.substr(0,7)==="http://"||t.substr(0,8)==="https://"||t.substr(0,7)==="mailto:"||t.substr(0,4)==="tel:"||t.substr(0,11)==="data:image/"||t.substr(0,6)==="ftp://"||t.substr(0,2)==="./"||t.substr(0,3)==="../"||t[0]==="#"||t[0]==="/"))return""}else if(n==="background"){if(Se.lastIndex=0,Se.test(t))return""}else if(n==="style"){if(wt.lastIndex=0,wt.test(t)||(Et.lastIndex=0,Et.test(t)&&(Se.lastIndex=0,Se.test(t))))return"";o!==!1&&(o=o||Xt,t=o.process(t))}return t=rn(t),t}var ai=/</g,si=/>/g,li=/"/g,ci=/&quot;/g,ui=/&#([a-zA-Z0-9]*);?/gim,di=/&colon;?/gim,fi=/&newline;?/gim,Se=/((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,wt=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Et=/u\s*r\s*l\s*\(.*/gi;function Jt(e){return e.replace(li,"&quot;")}function Qt(e){return e.replace(ci,'"')}function Zt(e){return e.replace(ui,function(t,o){return o[0]==="x"||o[0]==="X"?String.fromCharCode(parseInt(o.substr(1),16)):String.fromCharCode(parseInt(o,10))})}function en(e){return e.replace(di,":").replace(fi," ")}function tn(e){for(var n="",t=0,o=e.length;t<o;t++)n+=e.charCodeAt(t)<32?" ":e.charAt(t);return Re.trim(n)}function nn(e){return e=Qt(e),e=Zt(e),e=en(e),e=tn(e),e}function rn(e){return e=Jt(e),e=Kt(e),e}function pi(){return""}function mi(e,n){typeof n!="function"&&(n=function(){});var t=!Array.isArray(e);function o(l){return t?!0:Re.indexOf(e,l)!==-1}var i=[],a=!1;return{onIgnoreTag:function(l,c,s){if(o(l))if(s.isClosing){var u="[/removed]",d=s.position+u.length;return i.push([a!==!1?a:s.position,d]),a=!1,u}else return a||(a=s.position),"[removed]";else return n(l,c,s)},remove:function(l){var c="",s=0;return Re.forEach(i,function(u){c+=l.slice(s,u[0]),s=u[1]}),c+=l.slice(s),c}}}function gi(e){for(var n="",t=0;t<e.length;){var o=e.indexOf("<!--",t);if(o===-1){n+=e.slice(t);break}n+=e.slice(t,o);var i=e.indexOf("-->",o);if(i===-1)break;t=i+3}return n}function hi(e){var n=e.split("");return n=n.filter(function(t){var o=t.charCodeAt(0);return o===127?!1:o<=31?o===10||o===13:!0}),n.join("")}F.whiteList=Yt();F.getDefaultWhiteList=Yt;F.onTag=ti;F.onIgnoreTag=ni;F.onTagAttr=ri;F.onIgnoreTagAttr=oi;F.safeAttrValue=ii;F.escapeHtml=Kt;F.escapeQuote=Jt;F.unescapeQuote=Qt;F.escapeHtmlEntities=Zt;F.escapeDangerHtml5Entities=en;F.clearNonPrintableCharacter=tn;F.friendlyAttrValue=nn;F.escapeAttrValue=rn;F.onIgnoreTagStripAll=pi;F.StripTagBody=mi;F.stripCommentTag=gi;F.stripBlankChar=hi;F.attributeWrapSign='"';F.cssFilter=Xt;F.getDefaultCSSWhiteList=ei;var $e={},Z=st;function yi(e){var n=Z.spaceIndex(e),t;return n===-1?t=e.slice(1,-1):t=e.slice(1,n+1),t=Z.trim(t).toLowerCase(),t.slice(0,1)==="/"&&(t=t.slice(1)),t.slice(-1)==="/"&&(t=t.slice(0,-1)),t}function vi(e){return e.slice(0,2)==="</"}function wi(e,n,t){var o="",i=0,a=!1,l=!1,c=0,s=e.length,u="",d="";e:for(c=0;c<s;c++){var f=e.charAt(c);if(a===!1){if(f==="<"){a=c;continue}}else if(l===!1){if(f==="<"){o+=t(e.slice(i,c)),a=c,i=c;continue}if(f===">"||c===s-1){o+=t(e.slice(i,a)),d=e.slice(a,c+1),u=yi(d),o+=n(a,o.length,u,d,vi(d)),i=c+1,a=!1;continue}if(f==='"'||f==="'")for(var p=1,w=e.charAt(c-p);w.trim()===""||w==="=";){if(w==="="){l=f;continue e}w=e.charAt(c-++p)}}else if(f===l){l=!1;continue}}return i<s&&(o+=t(e.substr(i))),o}var Ei=/[^a-zA-Z0-9\\_:.-]/gim;function bi(e,n){var t=0,o=0,i=[],a=!1,l=e.length;function c(p,w){if(p=Z.trim(p),p=p.replace(Ei,"").toLowerCase(),!(p.length<1)){var y=n(p,w||"");y&&i.push(y)}}for(var s=0;s<l;s++){var u=e.charAt(s),d,f;if(a===!1&&u==="="){a=e.slice(t,s),t=s+1,o=e.charAt(t)==='"'||e.charAt(t)==="'"?t:ki(e,s+1);continue}if(a!==!1&&s===o){if(f=e.indexOf(u,s+1),f===-1)break;d=Z.trim(e.slice(o+1,f)),c(a,d),a=!1,s=f,t=s+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),a===!1)if(f=_i(e,s),f===-1){d=Z.trim(e.slice(t,s)),c(d),a=!1,t=s+1;continue}else{s=f-1;continue}else if(f=Ci(e,s-1),f===-1){d=Z.trim(e.slice(t,s)),d=bt(d),c(a,d),a=!1,t=s+1;continue}else continue}return t<e.length&&(a===!1?c(e.slice(t)):c(a,bt(Z.trim(e.slice(t))))),Z.trim(i.join(" "))}function _i(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="="?n:-1}}function ki(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="'"||t==='"'?n:-1}}function Ci(e,n){for(;n>0;n--){var t=e[n];if(t!==" ")return t==="="?n:-1}}function Ti(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function bt(e){return Ti(e)?e.substr(1,e.length-2):e}$e.parseTag=wi;$e.parseAttr=bi;var Si=at.FilterCSS,z=F,on=$e,Ai=on.parseTag,Ii=on.parseAttr,Ie=st;function Ae(e){return e==null}function Ni(e){var n=Ie.spaceIndex(e);if(n===-1)return{html:"",closing:e[e.length-2]==="/"};e=Ie.trim(e.slice(n+1,-1));var t=e[e.length-1]==="/";return t&&(e=Ie.trim(e.slice(0,-1))),{html:e,closing:t}}function Ri(e){var n={};for(var t in e)n[t]=e[t];return n}function Li(e){var n={};for(var t in e)Array.isArray(e[t])?n[t.toLowerCase()]=e[t].map(function(o){return o.toLowerCase()}):n[t.toLowerCase()]=e[t];return n}function an(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=z.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Li(e.whiteList||e.allowList):e.whiteList=z.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":z.attributeWrapSign,e.onTag=e.onTag||z.onTag,e.onTagAttr=e.onTagAttr||z.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||z.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||z.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||z.safeAttrValue,e.escapeHtml=e.escapeHtml||z.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Si(e.css))}an.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var n=this,t=n.options,o=t.whiteList,i=t.onTag,a=t.onIgnoreTag,l=t.onTagAttr,c=t.onIgnoreTagAttr,s=t.safeAttrValue,u=t.escapeHtml,d=n.attributeWrapSign,f=n.cssFilter;t.stripBlankChar&&(e=z.stripBlankChar(e)),t.allowCommentTag||(e=z.stripCommentTag(e));var p=!1;t.stripIgnoreTagBody&&(p=z.StripTagBody(t.stripIgnoreTagBody,a),a=p.onIgnoreTag);var w=Ai(e,function(y,h,g,v,m){var E={sourcePosition:y,position:h,isClosing:m,isWhite:Object.prototype.hasOwnProperty.call(o,g)},b=i(g,v,E);if(!Ae(b))return b;if(E.isWhite){if(E.isClosing)return"</"+g+">";var $=Ni(v),T=o[g],k=Ii($.html,function(_,I){var B=Ie.indexOf(T,_)!==-1,C=l(g,_,I,B);return Ae(C)?B?(I=s(g,_,I,f),I?_+"="+d+I+d:_):(C=c(g,_,I,B),Ae(C)?void 0:C):C});return v="<"+g,k&&(v+=" "+k),$.closing&&(v+=" /"),v+=">",v}else return b=a(g,v,E),Ae(b)?u(v):b},u);return p&&(w=p.remove(w)),w};var Oi=an;(function(e,n){var t=F,o=$e,i=Oi;function a(c,s){var u=new i(s);return u.process(c)}n=e.exports=a,n.filterXSS=a,n.FilterXSS=i,function(){for(var c in t)n[c]=t[c];for(var s in o)n[s]=o[s]}(),typeof window<"u"&&(window.filterXSS=e.exports);function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(He,He.exports);var Fi=He.exports;const Bi=Uo(Fi);function Di(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>'),Bi(e)}function $i(e,n,t,o){let i=e+n/60+t/3600;return(o=="S"||o=="W")&&(i=i*-1),i}function xi(e,n){const t={dir:e<0?n==="long"?"W":"S":n==="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`${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`}function lt(e,n){const t=["forms",e];return n&&t.push(n),"/"+t.join("/")}function Vi(e,n){return"/"+[S.PATH_RESOLVER_ENTITY,e,n].join("/")}function Pi(){return`/${S.PATH_RESOLVER_ENTITY}/:entity/:primaryKey`}function sn(e){const n=Q.get(e);if(!n)throw new Error(`Metadata ${e} is still missing.`);return n.useCatalogInsteadId?"CatalogId":n.fieldNameForIdentification}function Ge(e,n,t){const o=te.getScope(e.toLowerCase());return n.map(i=>{typeof i.label=="string"&&(i.label=o(i.label)),i.type==="history"&&(i.onClick=l=>H.openModal(S.MODAL_HISTORY,{primaryKey:l[sn(e)],entity:e}),i.icon="history",i.class="widget-list-cell-history",i.hint="Open the History");const a=i.displayMode;if(a){const l=async c=>{try{const s=c[ae(i)];return[await it(ji(i,c),s),s]}catch{return[]}};a&&(a==="form"?i.link=c=>{const s=c[ae(i)];return s?Vi(i.entity,s):null}:i.onClick=async c=>{const[s,u]=await l(c);if(!s||!u)return null;switch(i.displayMode){case"modal":return H.openModal(S.MODAL_ENTITY,{entity:s,primaryKey:u});case"inline":return t.activate(s,u,c)}}),i.class="widget-table-cell_link cursor_pointer",typeof i.value!="string"&&(i.value=(c,s)=>s[i.name[1]])}return Mi(i,i.type,i.presentation),A.listConvertCellConfigHandler&&A.listConvertCellConfigHandler(e,i),i})}function Mi(e,n,t){switch(n){case"Decimal":{t==="Money"&&(e.type="money");break}}return e}const ji=(e,n)=>e.useObjectTypeName?n[e.name[2]]:e.entity?e.entity:null;function Ui(e){if(!Array.isArray(A.arrayListCellHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");A.arrayListCellHandlers.push(e)}function Wi(e,n){const t=ae(e);return t?O.utils.getPropFromObject(n,t):null}function qi(e){if(!Array.isArray(A.arrayFieldParamsHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");A.arrayFieldParamsHandlers.push(e)}const Hi={addListCellHandler:Ui,getCellModelValue:Wi,addFieldParamsHandler:qi};var ln=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(ln||{});function zi(){const e=r.ref(null);function n(t){e.value=t}return{activeRow:e,activateRow:n}}function Gi(e,n){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(n)}async function cn(e,n){e()&&(await n(),await cn(e,n))}function Yi(e,n,t={}){let o=!1;const i=r.ref(""),a=r.computed(()=>l.filter(k=>u(k,i.value))),l=r.reactive([]);let c=0;const s=r.ref(!1);let u=(t==null?void 0:t.filterSearchFn)||((k,_)=>Gi(k,_));function d(){return t.masterEntities?typeof t.masterEntities=="function"?t.masterEntities():t.masterEntities:[]}function f(){const k=b();return typeof k.limit!="number"&&(k.limit=100),k.offset=c,(t.request||le)(e,k).then(I=>(c+=I.length,I))}function p(k,_){var B;return typeof k.Version=="number"?k.Version:(B=l.find(C=>C.Id===_))==null?void 0:B.Version}function w(k,_){const I=l.findIndex(B=>B.Id===k);if(I===-1)throw new Error(`Can't found item with Id ${k}`);l.splice(I,1,_)}function y(k){const _=l.findIndex(I=>I.Id===k);if(_===-1)throw new Error(`Can't found item with Id ${k}`);l.splice(_,1)}async function h(k,_){try{const I=b(),B=p(_,k);delete _.Version,await rt(e,{id:k,values:_,version:B,masterEntities:d()});const C=await le(e,{fields:I.fields||"",id:k});w(k,C)}catch(I){P()(I)}}async function g(k,_={}){try{const I=b(),B=p(_,k);delete _.Version,await jt(e,{id:k,version:B,masterEntities:d()}),y(k)}catch(I){P()(I)}}async function v(k){try{await Mt(e,{values:k,masterEntities:d()}),await $()}catch(_){P()(_)}}let m;async function E(){s.value=!0;try{m!=null&&m.signal&&!m.signal.aborted&&m.abort();let k=m=new AbortController,_=0;const B=b().limit||0;if(i.value&&!B){console.warn("Using textSearch assumes the use of limit.");return}await cn(()=>(B>0?_<B:!0)&&!o&&!k.signal.aborted,async()=>{const C=await f();k.signal.aborted||(l.push(...C),_+=C.filter(N=>u(N,i.value)).length,(C.length<B||B===0)&&(o=!0))})}catch(k){P()(k)}s.value=!1}function b(){return typeof n=="function"?n():n}async function $(){try{c=0,o=!1,l.splice(0,l.length),await E()}catch(k){P()(k)}}function T(){if(m)return m.abort();s.value=!1}return{array:l,updateById:h,next:E,reload:$,wait:s,create:v,deleteById:g,textSearch:i,filteredArray:a,abort:T}}function Xi(){function e(){return{organizations:G.organizations,currentContextId:G.contextId,person:G.person,context:G.context,contextType:G.contextType,userId:G.userId}}const n=r.reactive(e());return G.onupdateContext(()=>{Object.assign(n,e())}),n}function Ki(e,n,t){return L().emit("communication:create",{entityName:e,entityCatalogId:n,targetCode:t})}function Ji(e,n,t){return L().emit("communication:read",{entityName:e,entityCatalogId:n,targetCode:t})}function Qi(e,n){return L().emit("communication-message:create",{communicationId:e,text:n})}function Zi(e){return L().emit("communication-message:read",{communicationId:e})}function ea(e){const n=O.Form.getParentForm(),t=r.reactive([]);return n&&n.subscribe(e),e.read=()=>Zi(e.id).then(o=>(t.splice(0,t.length,...o),o)),{array:t}}function ta(e,n){e.read=()=>{const o=t();return Promise.resolve().then(()=>{if(!e.name)throw ee.EntityWithoutName(e);return le(e.name,o)}).then(dt).then(i=>(i.hasOwnProperty("Version")&&(e.version=i.Version),e.setValues(i),i)).catch(P())},e.save=()=>{const o=t();return Promise.resolve().then(()=>{if(!e.name)throw ee.EntityWithoutName(e);return rt(e.name,{id:o.id,values:e.changes,version:e.version})}).then(i=>{e.version=i.version}).catch(i=>{throw P()(i),i})};function t(){return typeof n=="function"?n():n}}function be(e){if(!e)return r.inject(S.PROVIDE_NAME_METADATA);Q.initEntity(e);const n=r.computed(()=>Q.state[e]);return r.provide(S.PROVIDE_NAME_METADATA,n),r.provide(S.PROVIDE_ENTITY_NAME,e),n}function ct(e,n={}){if(!e)return r.inject(S.PROVIDE_NAME_USAGE_CONTEXT);const t=r.ref(null);return r.provide(S.PROVIDE_NAME_USAGE_CONTEXT,t),{state:t,update:async function(){t.value=await Ao(e,na(n||{}))}}}function na(e){return typeof e=="function"?e():e}function ra(e){if(!e)return r.inject(S.PROVIDE_NAME_ACTIONS);const n=r.ref(!1),t=r.reactive([]),o=r.computed(()=>t.map(l=>Ht(e,l))),i={actions:o,update:a};r.provide(S.PROVIDE_NAME_ACTIONS,i),e.router=ie.useRouter();function a(){if(n.value)return;n.value=!0,t.splice(0,t.length);const l=e==null?void 0:e.form;return Ut({masterEntities:e==null?void 0:e.masterEntities,id:l==null?void 0:l.id,entity:l==null?void 0:l.name}).then(c=>t.splice(0,0,...c)).catch(P("error")).finally(()=>n.value=!1)}return{actions:o,update:a,loading:r.readonly(n)}}function oa(e){function n(t){t.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",n)}),r.onUnmounted(()=>{document.removeEventListener("keypress",n)})}function ia(e,n={}){const t=r.reactive([]),o=s=>{const u=r.unref(e);if(s===void 0){t.length===0?u.forEach(a):u.forEach(l);return}i(s)?l(s):a(s)},i=s=>t.includes(s),a=s=>{n.handleSelect&&!n.handleSelect(s)||i(s)||t.push(s)},l=s=>{const u=t.findIndex(d=>d===s);u!==-1&&t.splice(u,1)},c=r.computed(()=>{const s=r.unref(e);return t.length===s.length&&s.length!==0});return[t,o,c,a,l]}function aa(e){const n=r.ref(""),t=r.computed(()=>{const o=n.value.toLowerCase();return r.unref(e).filter(i=>n.value.length?Object.values(i).join().toLowerCase().includes(o):!0)});return{search:n,searchArray:t}}class Ue{static async getStartConfig(n,t){return L().emit("wizard:configuration",{process:n,entity:t})}static async startProcess(n,t){return L().emit("wizard:start",{process:n,entity:t})}static async runStep(n,t,o,i,a){return L().emit("wizard:step",{process:n,entity:t,stepName:o,token:i,values:a})}}function sa(e){return e.statusName===j.Completed}function la(e){return[j.FinalStepWithConfirmation,j.NextStepWithConfirmation].includes(e.statusName)}function ca(e){return e.statusName===j.ValidationError}function ua(e){return e.statusName===j.Undefined}function da(e,n,t){let o=null,i=[];const a=r.ref(!1),l=r.ref(null),c=r.computed(()=>f(i,l.value)),s=r.ref(null),u=r.reactive([]),d=r.computed(()=>u.map(m=>f(i,m)));function f(m,E){return m.find(b=>b.name===E)||null}async function p(m){var E;if(ua(m)){await t.onDisplayDataSet(m);return}if(!(la(m)&&!await t.onDisplayDataSet(m))){if(ca(m))return void t.onValidation(m.validationResults);h(m),await r.nextTick();{const b=((E=f(i,l.value))==null?void 0:E.fields)||[];if([j.FinalStep,j.NextStep,j.FinalStepWithConfirmation,j.NextStepWithConfirmation].includes(m.statusName)&&(!b.length||fa(b,t.presets)))return v(t.presets||{})}sa(m)&&t.onCompleted(m)}}async function w(){try{await y(),await g()}catch(m){P("error")(m)}}function y(){return a.value="Loading process information.",Ue.getStartConfig(n,e).then(m=>(s.value={label:m.processTitle,info:m.processInfo,icon:m.processIcon},i=m.steps.map(E=>{const b=E.frontendEntity.rootObject,$=Object.fromEntries(E.frontendEntity.objectTypes.map(T=>[T.name,T.properties]));return{label:E.title,name:E.stepName,number:E.number,rootObjectName:b,objectTypes:$,fields:$[b],buttonCaption:E.buttonCaption}}))).finally(()=>{a.value=!1})}function h(m){return[j.FinalStepWithConfirmation,j.NextStepWithConfirmation,j.NextStep,j.Completed,j.FinalStep].includes(m.statusName)?(o=m.token,l.value=m.nextStepName):console.log("Saving is not completed:",m),m}function g(){return a.value="Starting process",Ue.startProcess(n,e).then(p).catch(P("error")).finally(()=>{a.value=null})}function v(m={}){const E=l.value;return!o||!E?Promise.reject("Not step or token."):(a.value="Waiting for result...",Ue.runStep(n,e,E,o,m).then(p).then(b=>(u[u.length-1]!==E&&u.push(E),b)).catch(P("error")).finally(()=>{a.value=!1}))}return{initialize:w,loading:a,currentStepConfig:c,currentStepName:l,arrayPassedSteps:d,arrayProcessStepName:u,processInfo:s,next:v}}function fa(e,n){for(let t=0;t<e.length;t++){const o=e[t];if(!O.utils.getPropFromObject(n,o.name))return!1}return!0}function pa(e,n){const t=typeof e=="string"?e:e.name,o=Object.assign({},typeof e=="string"?{}:e.arguments,n||{});return{name:t,arguments:o}}function ma(e){return e.limit||(e.limit=150),e}function un(e,n={}){const{limit:t}=ma(n),{prefilters:o,order:i}=e;if(!e.entity)throw new Error("-");if(!e.config)throw new Error("-");const a=e.entity,l=e.config,c=e.customFilters||[],s=[l.map(h=>d(h.label)).join(",")],u=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function d(h){h===null&&(h=""),h===void 0&&(h="-");let g=typeof h!="string"?String(h):h;return g=g.replace(/"/g,'""'),g.search(/("|,|\n)/g)>=0&&(g='"'+g+'"'),g}function f(){return le(a,{fields:ot(l).join(" "),limit:t,offset:u.offset,order:i,filter:typeof o=="string"?o:x(o||{}),customFilters:c.map(h=>{var g;return pa(h,(g=n.customFiltersData)==null?void 0:g[typeof h=="string"?h:h.name])})}).then(h=>(u.offset+=t,h))}function p(){const h="data:text/csv;charset=utf-8,"+s.join(`\r
8
- `),g=encodeURI(h),v=document.createElement("a");v.setAttribute("href",g),v.setAttribute("download",`${a}.csv`),document.body.appendChild(v),v.click()}function w(){u.rejected=!0}async function y(){return f().then(h=>{const g=h.map(v=>l.map(m=>d(Fe(m,v))).join(","));return s.push(...g),u.count=s.length,h.length}).then(h=>{if(h!==t&&(u.finished=!0),h===t&&!u.rejected)return y()})}return{downloadFile:p,reject:w,state:u,start:y}}const xe=new class{constructor(){this.store=r.reactive([])}add(n,t,o={}){const i=ga(o),a=new Ye(n,t,i.timeout,i.children,i.click);return this.store.push(a),i.timeout&&setTimeout(this.remove.bind(this,a.id),i.timeout*1e3),a}remove(n){const t=this.store.findIndex(o=>o.id===n);if(t===-1)return!1;this.store.splice(t,1)}};function ga(e){function n(o){return!!o&&typeof o=="object"}const t={timeout:10,click:()=>null,children:[]};return n(e)?{timeout:e.timeout||t.timeout,click:e.click||t.click,children:e.children||t.children}:t}const Le=class Le{constructor(n,t,o,i,a){this.type=n,this.message=t,this.timeout=o,this.children=i,this.click=a,this.id=Le.cardId++}};Le.cardId=1;let Ye=Le;/*!
5
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),O=require("jenesius-vue-form"),ie=require("vue-router"),mn=require("date-and-time"),Oe=require("debug"),H=require("jenesius-vue-modal"),R=class R extends Error{constructor(n,t=null){super(),this.message=n,this.details=t,this.id=R.ID++}static ParentFormNotFound(){return new R("Can't found parent form.")}static UndefinedNameOfCompositeFormController(n){return new R("Composite object name is undefined",n)}static EntityWithoutName(n){return new R("'Entity doesn't have a name",n)}static NotResolvedNameEventEmitter(n){return new R(`'${n}' is not a valid Event emitter name`)}static FormIsNotValidated(n){return new R("Form is not validated",n)}static ListWorkerIsRunningOrEnd(n){return new R("List data request is running or already done",n)}static ObjectIdNotNumber(n){return new R(`${n} (id) is not a number`)}static UndefinedErrorId(n,t){return R.ApiNotAvailable()}static ApiError(n){return new R("Request error",n)}static ApiNotAvailable(){return new R(`Sorry, we experience difficulties here.
6
+ Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(n,t){return!n&&!t?R.ApiNotAvailable():new R(n||"Authorization Error",t)}static ApiResponseParseFailed(){return R.ApiNotAvailable()}static MissingIdInValuesEntity(n){return new R("Object doesn't have id",n)}static ObjectWithIdNotFound(n,t){return new R(`Can't find object with id: ${n}`,t)}static ObjectWithoutConnectToPresentArray(n,t){return new R("Object is not found.",{object:n,array:t})}static EntityWithoutId(n){return new R("Entity doesn't have id.",n)}static NotFoundedTableIndex(n,t){return new R(`Can't find the element with tableIndex ${n}`,t)}static UndefinedError(n,t=[]){return new R(n,t)}static TableArrayAlreadyIncludeProvidedIndexValue(n,t,o){return new R(`Array already includes the element with value ${n}`,{array:t,table:o})}static MetadataEntityIsNotAvailable(n){return new R(`Metadata for the ${n} is not currently available.`)}static RequestTookToLong(){return new R("The request took too long to complete. Try again later.")}};R.ID=0;let ee=R;const gn="Please try again later or submit a feedback if problem doesn't go.";function hn(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return gn}})}function de(e,n={}){return n.redirect="manual",fetch(e,n).then(t=>t.type==="opaqueredirect"?void window.location.replace("/auth"):t).catch(()=>{throw ee.ApiNotAvailable()}).then(t=>hn(t).then(o=>{if(!t.ok)throw o;return o}))}class yn{constructor(){this.public=!1,this.errors=new Proxy([],{set:(n,t,o)=>(t!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(o)}`),n[t]=o,!0)}),window._journal=this}get error(){return{add:(...n)=>{this.errors.push(n)},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 yn;class vn{static invite(n,t,o){return de("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:n,personKey:t,relatedRoleCode:o})})}static accept(n,t){return de("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:n,version:t,mark:!0})})}static decline(n,t){return de("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:n,version:t,mark:!1})})}}class wn{static getRequiredDocuments(n,t,o){const i=new URLSearchParams({entity:n,primaryKey:t,statusCode:o});return fetch(`/close-api/views/required-documents?${i.toString()}`).then(a=>a.json())}}class ue{static url(){return"close-api/billing"}static getBillingMetadata(n){return fetch(`/${ue.url()}/calculator/${n}`)}static calculate(n,t){return de(`/${ue.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:n,values:t})}).then(o=>{if(o&&o.status===1)return o;throw Array.isArray(o.notes)?new Error(o.notes[0]):ee.ApiNotAvailable()})}static parseMetadataField(n){function t(o){switch(o.type){case"ValueType":switch(o.dataType){case"Integer":return"number";default:return o.dataType}case"EntityReference":return o.dataType}}return{name:n.name,label:n.title,required:n.required,type:t(n)}}static createOnlinePayment(n,t){return de(`/${ue.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:n,returnURL:t})})}static applyOnlinePayment(n){return de(`/${ue.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:n})})}}const bn={class:"widget-table__head-cell"},En={key:1,class:"widget-table__head-label margin_0 text_overflow"},St=r.defineComponent({__name:"widget-table-head-cell",props:{label:{},type:{}},emits:["select"],setup(e,{emit:n}){const t=n;function o(){t("select")}return(i,a)=>(r.openBlock(),r.createElementBlock("th",bn,[i.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(O.FormField),{key:0,onClick:o})):(r.openBlock(),r.createElementBlock("span",En,r.toDisplayString(i.label),1))]))}}),_n={class:"widget-table__head"},kn=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return r.computed(()=>St),(n,t)=>(r.openBlock(),r.createElementBlock("tr",_n,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.config,o=>r.renderSlot(n.$slots,"default",r.mergeProps({ref_for:!0},o),void 0,!0)),256))]))}}),M=(e,n)=>{const t=e.__vccOpts||e;for(const[o,i]of n)t[o]=i;return t},Cn=M(kn,[["__scopeId","data-v-aa18d6fa"]]);function Ke(e){return Array.isArray(e)?Ke(e[0]):typeof e!="string"?null:e}function ae(e){return Ke(e.name)}function Tn(e){const n=new RegExp(/\$\{([a-zA-Z0-9_.]+)}/,"g"),t=[];let o;for(;(o=n.exec(e))!==null;)t.push(o[1]);return t}function Sn(e,n){return Tn(e).forEach(o=>{e=e.replace(new RegExp("\\$\\{"+o+"}","g"),O.utils.getPropFromObject(n,o))}),e}function We(e){return n=>typeof n=="string"||typeof n=="number"?`${n} ${e}`:""}function Fe(e,n){const t=ae(e);if(typeof e.value=="string")return Sn(e.value,n);let o=t?O.utils.getPropFromObject(n,t):null;if(o===void 0&&(o=null),typeof e.value=="function")return e.value(o,n);if(e.value===null)return null;switch(e.unitValue&&(o=We(e.unitValue)(o)),e.unit&&(o=We(e.unit)(o)),e.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=Ne(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=tt(typeof o=="string"?o:null);break}case"money":{o=Vt(o);break}case"DateTime":{o=Ne(typeof o=="string"?o:null,e.format||A.dateTimeFormat);break}}return e.formatter&&(o=pe(e.formatter).exec(o,n)),typeof o=="boolean"&&(o=o?"✓":"—"),o}const An=1,In=5e3,Nn="static-folder",At="request-error",It="EntityTypeName",Rn="REFERENCE_CHANGES",S={LIST_ACTIVE_NEW:-1,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",PROVIDE_ENTITY_NAME:"provide-entity-name",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",MODAL_LIST_DOWNLOAD:"list-download",MODAL_LIST_SETTINGS:"list-settings",MODAL_SIMPLE_TOOL_PARAMETERS:"SimpleToolParameters",MODAL_BATCH_VALUES:"batch-values",MODAL_ENTITY:"form-entity",MODAL_HISTORY:"entity-history",TIME_TO_LIVE_SOCKET_REQUEST:3e4,CORE_DEBUG_LABEL:"eservices-core",VISIBLE_ITEM_PROVIDE_NAME:"visible-item-provider",EVENT_FORM_UPDATE:"form-update",EVENT_AFFECTED_ENTITY:"affected-entity",DEFAULT_ORDER_DIR:"asc",TABLE_MOCK_FIELD:"_A_MOCK_ID_FIELD",OBJECT_TYPE_NAME_FIELD:It,FIELD_NAME_REFERENCE_CHANGES:Rn,PATH_RESOLVER_ENTITY:"resolver",TOOL_PRINT_NAME:"Print"};function Be(e){return[S.CORE_DEBUG_LABEL,e].join(":")}const Ln={class:"widget-filter-text flex gap_20"},On=r.defineComponent({__name:"widget-filter-text",props:{values:{}},emits:["update:values"],setup(e,{emit:n}){const t=e,o=n,i=r.ref("");function a(){o("update:values",i.value)}return r.watch(()=>t.values,l=>{if(typeof l!="string")return i.value="";i.value=l},{immediate:!0}),(l,c)=>{const s=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Ln,[r.createVNode(r.unref(O.FormField),{type:"text",modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},null,8,["modelValue"]),r.createVNode(s,{onClick:a,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(te)("Apply")),1)]),_:1})])}}}),Fn=M(On,[["__scopeId","data-v-800b3803"]]),Bn={class:"widget-filter-enum"},Dn={class:"flex gap-10 padding-10"},$n=r.defineComponent({__name:"widget-filter-entity",props:{baseEntity:{},filters:{},values:{},filterMetadata:{}},emits:["update:values","readProcess"],setup(e,{emit:n}){const t=e,o=r.ref([]),i=Ee(t.filterMetadata.entity),a=d=>(t.values||[]).includes(d),l=n;function c(d){const f=t.values||[];return f.includes(d)?l("update:values",f.filter(p=>p!==d)):l("update:values",[...f,d])}const s=se(async()=>{o.value=await le(t.baseEntity,{fields:t.filterMetadata.name.join(" "),order:[t.filterMetadata.name[1],"asc"],distinct:!0,filter:x(t.filters)}).then(d=>d.map(f=>({label:f[t.filterMetadata.name[1]],value:f[t.filterMetadata.name[0]]})))});function u(){l("update:values",[])}return r.watch(()=>s.loading,d=>{l("readProcess",d?"start":"end")},{immediate:!0}),r.watch(()=>i.value,()=>{s.loading||s.call()},{immediate:!0}),(d,f)=>{const p=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Bn,[r.createElementVNode("div",Dn,[r.createVNode(p,{label:"Reload filter",loading:r.unref(s).loading||!1,icon:"reload",onClick:f[0]||(f[0]=()=>r.unref(s).call())},null,8,["loading"]),r.createVNode(p,{label:"Clear",onClick:u})]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,w=>(r.openBlock(),r.createBlock(r.unref(O.FormField),{class:"widget-filter-enum-item",key:w.value,onClick:()=>c(w.value),type:"single-checkbox","model-value":a(w.value),label:w.label},null,8,["onClick","model-value","label"]))),128))])}}}),xn=M($n,[["__scopeId","data-v-cd8043dd"]]),he=r.reactive({});function Vn(){mt(),setInterval(mt,50)}function Nt(){return he}function mt(){const e={};Object.entries(localStorage).forEach(([n,t])=>{e[n]=!0,he[n]!==t&&(he[n]=t)}),Object.keys(he).forEach(n=>{e[n]||delete he[n]})}const A={getEntityLink(e,n){return`/forms/${e}/${n}`},iconHandlerText(){return""},iconTag:"i",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",tableFilterEntityBind:{String:Fn,Entity:xn},arrayListCellHandlers:[],arrayFieldParamsHandlers:[]};function Pn(e){Vn();for(let n in e)A[n]=e[n]}const Mn={props:{name:String},setup(e,n){let t="unknown";try{t=n.slots.default()[0].children}catch{t=e.name}typeof t!="string"&&console.warn(`Name for Icon.vue is not string. ${t}`);try{t=t.replace(/\s+/g,"")}catch{}return()=>r.h(A.iconTag,{class:A.iconHandler?A.iconHandler(t):`icon icon-${t}`},A.iconHandlerText(t))}},ye=M(Mn,[["__scopeId","data-v-8a72b45f"]]),jn=Oe(Be("setup-list-row"));function Un(e,n){const t=e.config.map(o=>Wn(o,e,n));return r.h("tr",{class:"widget-table__row widget-table-row"},t)}function Wn(e,n,t){const o=n.values;let i=Fe(e,o);const a={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function l(d){a.onClick.push(()=>d(o,e,t))}function c(d){Array.isArray(d)?a.class.push(...d):a.class.push(d)}const s=[],u=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(c(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(r.h(O.FormField,{type:"single-checkbox",modelValue:n.selected})),l(gt.bind(null,t,!0));break}case"select":{u.push(r.h(O.FormField,{type:"single-radio",modelValue:n.selected})),l(gt.bind(null,t,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const d=e.link(o);if(d){const f=r.h(ie.RouterLink,{to:d});u.push(f),c("widget-table-cell_link")}}catch(d){jn("Can't add router link",d)}if(e.href&&(u.push(r.h("a",{href:e.href(o),target:"_blank"})),c("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&u.push(r.h("p",{class:"widget-list-cell-text"},i)),e.icon&&(typeof e.icon=="string"&&u.push(r.h(ye,{name:e.icon})),typeof e.icon=="function")){const d=e.icon(o);d!==null&&u.push(r.h(ye,{name:d}))}return e.class&&(typeof e.class=="function"?c(e.class(o)):c(e.class)),A.listCellHandler&&(console.log("listCellHandler is deprecated. Please use coreUtils.addListCellHandler instead."),A.listCellHandler(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:t})),A.arrayListCellHandlers&&A.arrayListCellHandlers.forEach(d=>d(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:t})),s.push(r.h("td",a,u)),s}function gt(e,n){e.emit("select",n)}function Je(e,n){return()=>{try{return Un(e,n)}catch(t){return console.warn(t),null}}}const qn={props:{values:Object,config:Object,selected:Boolean},setup:Je},Hn=["colspan"],ht=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:n}){const t=n,o=r.ref();return r.onMounted(()=>{setTimeout(()=>{o.value&&o.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(i,a)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:o},[r.createElementVNode("td",{colspan:i.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.component),r.mergeProps(i.$attrs,{values:i.values,new:i.isNew,onClose:a[0]||(a[0]=l=>t("close")),onSave:a[1]||(a[1]=l=>t("save",l))}),null,16,["values","new"]))],8,Hn)],512))}}),je="update:selectedRows",zn="update:activeRow",Rt=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1}},emits:["save","order"],setup(e,{emit:n}){const t=e,o=r.ref(),i=n,a=r.useSlots(),l=r.computed(()=>{var p;return(p=a==null?void 0:a.default)==null?void 0:p.call(a)[0]});function c(){const w=t.selectedRows.length!==0?[]:[...t.array];i(je,w)}function s(p,w=!0){if(!t.selectedRows)return;if(!w)return i(je,t.selectedRows.includes(p)?[]:[p]);const y=[...t.selectedRows],h=y.indexOf(p);return h===-1?y.push(p):y.splice(h,1),i(je,y)}function u(p){i(zn,p)}function d(p){i("save",p),i("update:activeRow",null)}const f=r.computed(()=>t.shortcut?t.config.filter(p=>p.name?!!t.array.find(w=>![null,""].includes(Fe(p,w))):!0):t.config);return r.watch(()=>t.activeRow,(p,w)=>{console.log(p,w),p===null&&typeof w=="number"&&setTimeout(()=>{if(!o.value)return;const y=o.value.querySelector(`tbody>tr:nth-child(${w+1})`);y&&y.scrollIntoView({block:"center",behavior:"smooth"})},100)}),(p,w)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",{class:"widget-table",ref_key:"refTable",ref:o},[r.createElementVNode("thead",null,[r.createVNode(Cn,{config:f.value,onOrder:w[0]||(w[0]=y=>p.$emit("order",y))},{default:r.withCtx(y=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.$slots["head-cell"]||St),r.mergeProps(y,{onSelect:c}),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.array,(y,h)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:h},[r.createVNode(qn,{config:f.value,values:y,selected:p.selectedRows.includes(y),onSelect:g=>s(y,g),onActivate:g=>u(h),class:r.normalizeClass(p.classCallback?p.classCallback(y):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),l.value&&p.activeRow===h?(r.openBlock(),r.createBlock(ht,{key:0,component:l.value,"row-length":p.config.length,values:y,onClose:w[1]||(w[1]=g=>i("update:activeRow",null)),onSave:d,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),p.activeRow===r.unref(S).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(ht,{key:0,component:l.value,"row-length":f.value.length,onClose:w[2]||(w[2]=y=>i("update:activeRow",null)),onSave:d,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])],512)]))}}),Gn=r.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("div",{class:"widget-spinner",style:r.normalizeStyle({"border-left":`1.1em solid ${n.color}`})},null,4))}}),be=M(Gn,[["__scopeId","data-v-0ef9ae88"]]),Yn={class:"widget-button"},Xn=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("button",Yn,[n.wait?(r.openBlock(),r.createBlock(be,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"default",{},void 0,!0)]))}}),Kn=M(Xn,[["__scopeId","data-v-450dc564"]]),Jn={class:"widget-multi-button-wrap position_relative cursor_pointer"},Qn={class:"widget-multi-button-body grid"},Zn=["onClick"],er={class:"widget-multi-button-side-wrap"},tr=r.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){r.useCssVars(l=>({"04895bf1":o.value}));const n=e,t=r.reactive({active:!1,wait:!1}),o=r.computed(()=>n.array.length+(n.label?1:0));function i(l){if(!(typeof l!="function"||t.wait))return t.wait=!0,Promise.resolve().then(l).finally(()=>{t.wait=!1})}function a(l=!t.active){t.active=l}return(l,c)=>(r.openBlock(),r.createElementBlock("div",Jn,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",t.active?"widget-multi-button_active":null])},[r.createElementVNode("div",Qn,[l.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=s=>a())},r.toDisplayString(l.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(s,u)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:d=>{i(s.callback),a(!1)}},r.toDisplayString(s.label),9,Zn))),128))]),r.createElementVNode("div",er,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",t.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=s=>a())},[t.wait?(r.openBlock(),r.createBlock(r.unref(be),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(r.openBlock(),r.createBlock(r.unref(ye),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}}),nr=M(tr,[["__scopeId","data-v-d43a76ce"]]),rr={class:"widget-loader flex flex-align_center gap_10 padding_15"},or={class:"text_md"},De=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("div",rr,[r.createVNode(be,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",or,r.toDisplayString(n.label),1)]))}}),ir=["alt","src"],ar=r.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const n=e,t=r.ref();return r.onMounted(()=>{t.value&&(t.value.src=n.src),t.value.onerror=function(){n.default&&(t.value.src=n.default)}}),(o,i)=>(r.openBlock(),r.createElementBlock("img",{alt:o.alt,ref_key:"refImage",ref:t,src:o.src||o.$props.default},null,8,ir))}}),sr={props:{config:Array,values:Object,selected:Boolean},setup:Je},lr=M(sr,[["__scopeId","data-v-344a8cc1"]]),cr=e=>(r.pushScopeId("data-v-bf495d6a"),e=e(),r.popScopeId(),e),ur={class:"widget-list-head-cell"},dr=cr(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),fr=r.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:n}){const t=e,o=n;return t.title&&console.warn(`For cell ${t.name} using title,it should be replaced with label.`),(i,a)=>(r.openBlock(),r.createElementBlock("th",null,[r.createElementVNode("div",ur,[r.createElementVNode("div",{class:"head-cell-content flex_grow",style:r.normalizeStyle({"min-width":i.minWidth,"max-width":i.maxWidth,width:i.width})},[i.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(O.FormField),{key:0,type:"single-checkbox",onClick:a[0]||(a[0]=r.withModifiers(l=>o("select"),["stop","prevent"]))})):(r.openBlock(),r.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:a[1]||(a[1]=l=>o("order"))},r.toDisplayString(i.title||i.label),1))],4),i.name&&i.order.length&&i.order[0]===i.name?(r.openBlock(),r.createBlock(r.unref(ye),{key:0,class:r.normalizeClass(["head-cell-order",{"head-cell-order_down":i.order.length>1&&i.order[1]==="desc"}])},{default:r.withCtx(()=>[r.createTextVNode("core-arrow-up")]),_:1},8,["class"])):r.createCommentVNode("",!0),dr])]))}}),pr=M(fr,[["__scopeId","data-v-bf495d6a"]]),mr=r.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:n}){const t=e,o=n,i=r.ref(),a=r.ref();r.onMounted(()=>{function u(y,h){let g=-1;do g++,h-=y[g];while(h>0&&g<y.length);return g}function d(y,h){let g=0;for(;h>0&&h>y[g]&&g<y.length;)h-=y[g],g++;return console.log(h,g),g>0?g:0}function f(y){try{a.value.style.insetInlineStart=y+"px"}catch(h){console.log(h)}}function p(y){try{a.value.style.width=y+"px",a.value.style.minWidth=y+"px",a.value.style.maxWidth=y+"px"}catch(h){console.log(h)}}function w(y){return y===null?!1:y.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(h){var D;function g(V){return V.screenX+b-T}const v=i.value,m=[...v.children].filter(V=>V.localName==="th"),b=((D=v.offsetParent)==null?void 0:D.scrollLeft)||0,E=m.map(V=>V.clientWidth),$=w(h.target),T=v.getBoundingClientRect().left,k=g(h),_=u(E,k),I=E.slice(0,_).reduce((V,W)=>V+W,0),B=k-I,C=v.offsetWidth,N=m[_].clientWidth;if(t.config[_].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",h.screenX),console.log("Widths",E),console.log("max width",C),console.log("Start Position",k),console.log("Position From",_),console.log("Start Position",_),console.log("Global offset (Отступ самой таблицы от края экрана)",T),console.log("Del",B),console.groupEnd(),a.value.innerText=m[_].textContent||"",a.value.style.display="grid",a.value.style.width=N+"px",a.value.style.cursor="grabbing",f(I),p(N),document.addEventListener("pointermove",K,{passive:!0}),document.addEventListener("pointerup",U);function U(V){if(console.group("END"),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",U),$&&(t.config[_].width=a.value.style.width,t.config[_].minWidth=a.value.style.width,t.config[_].maxWidth=a.value.style.width,l(t.config)),!$){const W=V.screenX+b-T;console.log("ENP Position",W);const ne=d(E,W);if(console.log(_,"->",ne),ne!==_){const me=t.config[_],Ve=t.config;Ve.splice(_,1),Ve.splice(ne,0,me),l(Ve)}else{const me=t.config[_].name;c(me)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function K(V){if($){const me=g(V)-k+N;p(me);return}let W=V.screenX+b-T-B;W<0&&(W=0),W+N>C&&(W=C-N),f(W)}})});function l(u){o("update:config",u)}function c(u){if(!u)return;if(Array.isArray(u)){if(u.length<1)return;u=u[0]}if(t.order.length===0||t.order[0]!==u)return void s([u]);const d=t.order.length===1||t.order[1]==="asc"?"asc":"desc";s([u,d==="asc"?"desc":"asc"])}function s(u){o("update:order",u)}return(u,d)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:i},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.config,(f,p)=>(r.openBlock(),r.createBlock(pr,r.mergeProps({key:f,ref_for:!0},f,{onOrder:w=>c(f.name),onSelect:d[0]||(d[0]=w=>o("select")),order:u.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:a},"test",512)],512))}}),gr=M(mr,[["__scopeId","data-v-ccffc6bd"]]),hr={class:"widget-list"},yr={class:"widget-list-body position_relative"},vr=50,wr=r.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:n}){const t=e,o=n;function i(s,u=!0){if(t.selectedRows)if(!u)l(t.selectedRows.includes(s)?[]:[s]);else{const d=[...t.selectedRows],f=d.indexOf(s);f===-1?d.push(s):d==null||d.splice(f,1),l(d)}}function a(){var s;if(((s=t.selectedRows)==null?void 0:s.length)!==t.array.length)return l([...t.array]);l([])}function l(s){o("update:selectedRows",s)}function c(s){if(!s)return;const u=s.target;u.scrollTop+u.clientHeight+vr>u.scrollHeight&&o("scrollEnd")}return(s,u)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[r.createElementVNode("table",hr,[r.createElementVNode("thead",null,[r.createVNode(gr,{onSelect:u[0]||(u[0]=d=>a()),"onUpdate:order":u[1]||(u[1]=d=>o("update:order",d)),"onUpdate:config":u[2]||(u[2]=d=>o("update:config",d)),config:s.config,order:s.order},null,8,["config","order"])]),r.createElementVNode("tbody",yr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.array,(d,f)=>{var p;return r.openBlock(),r.createBlock(lr,{key:f,class:"widget-list-row",values:d,config:s.config,selected:(p=s.selectedRows)==null?void 0:p.includes(d),onSelect:w=>i(d,w)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function Qe(){var a;const e=r.computed(()=>Object.keys(t).length===0||Object.values(t).includes(!0)),n=(a=r.getCurrentInstance())==null?void 0:a.uid;if(!n)throw"Undefined instance. Please check it.";const t=r.reactive({});r.provide(S.VISIBLE_ITEM_PROVIDE_NAME,{show(l){t[l]=!0},hide(l){t[l]=!1},remove(l){delete t[l]}});const o=r.inject(S.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){o==null||o.show(n)},hide(){o==null||o.hide(n)},remove(){o==null||o.remove(n)}},visibleItems:t}}function Lt(e){const n={name:e,entity:r.inject(S.PROVIDE_ENTITY_NAME)};if(!n.name)throw new Error("Field without name try use metadata.");const t=r.ref(!1),o=r.ref(null);return e.split(".").reduce((i,a,l,c)=>l===c.length-1?i:i.then(()=>{var u,d;const s=(d=(u=o.value)==null?void 0:u.fieldsByName[a])==null?void 0:d.referencedEntity;if(!s)throw new Error("---");return Q.initEntity(s).then(()=>s)}).then(s=>{o.value=Q.get(s),n.entity=s,n.name=c[l+1]}),Promise.resolve().then(()=>Q.initEntity(n.entity)).then(()=>{o.value=Q.get(n.entity)})).finally(()=>t.value=!0),r.computed(()=>{if(!t.value||!o.value)return;const i=o.value.fieldsByName[n.name];if(i)return i})}const br=r.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{},usageContext:{type:Boolean,default:!0}},setup(e){const n=e;Ee();const t=ct(),o=r.computed(()=>{var y,h,g;const f=c.value,p=s(f),w={type:p,disabled:n.usageContext?!((y=l.value)!=null&&y.canSet):!1,label:n.label};return p==="Decimal"&&((g=(h=f==null?void 0:f.presentationType)==null?void 0:h.toLowerCase)==null?void 0:g.call(h))==="money"&&(w.money=!0),f&&Object.assign(w,{suffix:p==="number"?f.valueUnit:void 0,required:a.includes(p||"")?!1:f.required,label:n.label||f.displayName}),Array.isArray(A.arrayFieldParamsHandlers)&&A.arrayFieldParamsHandlers.forEach(v=>Object.assign(w,v(f,l.value,w))),w}),i=["MultiText","MultiWideText"],a=["switch","single-checkbox","single-radio"],l=r.computed(()=>{var f;return(f=t==null?void 0:t.value)==null?void 0:f.fields[n.name]}),c=Lt(n.name);function s(f){if(typeof n.type=="string"&&n.type.length!==0)return n.type;if(f){if(f.type==="Reference"||f.type==="Owned")return f.referencedEntity;if(f.dataType==="Boolean")return"single-checkbox";if(f.dataType==="DateTime")return"date";if(f.dataType==="Integer"||f.dataType==="Decimal")return"number";if(f.dataType==="List")return f.aggregatedEntity;if(i.includes(f.presentationType))return"textarea";if(f.presentationType==="PhoneNumber")return"tel"}return"text"}const u=r.computed(()=>{var f;return n.usageContext?((f=l.value)==null?void 0:f.canGet)===!0:!0}),{controller:d}=Qe();return r.watch(()=>u.value,f=>f?d.show():d.hide(),{immediate:!0}),r.onUnmounted(()=>d.remove()),(f,p)=>u.value?(r.openBlock(),r.createBlock(r.unref(O.FormField),r.mergeProps({key:0},{...f.$attrs,...o.value},{name:f.name}),null,16,["name"])):r.createCommentVNode("",!0)}});function Er(e){return Array.isArray(e)&&(e==null?void 0:e[1])||S.DEFAULT_ORDER_DIR}const _r=["fill"],kr=r.createElementVNode("path",{d:"M440-647 244-451q-12 12-28 11.5T188-452q-11-12-11.5-28t11.5-28l264-264q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l264 264q11 11 11 27.5T772-452q-12 12-28.5 12T715-452L520-647v447q0 17-11.5 28.5T480-160q-17 0-28.5-11.5T440-200v-447Z"},null,-1),Cr=[kr],Tr=r.defineComponent({__name:"widget-icon-arrow-up",props:{color:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:n.color},Cr,8,_r))}}),Sr={class:"widget-fast-table-head-cell-td"},Ar={key:1,class:"widget-head-cell-label"},Ir={key:2,class:"widget-head-cell-order"},Nr=r.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{},type:{},isFullSelected:{type:Boolean}},emits:["select"],setup(e,{emit:n}){const t=e,o=r.computed(()=>Ke(t.name));r.computed(()=>Er(t.order));const i=n;function a(){i("select")}return(l,c)=>{var s;return r.openBlock(),r.createElementBlock("td",Sr,[r.createElementVNode("div",{class:r.normalizeClass(["widget-head-cell",[l.type==="multi-select"?"justify-content-center":""]]),onClick:c[0]||(c[0]=u=>l.$emit("order",l.name))},[l.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(O.FormField),{key:0,"model-value":l.isFullSelected,onClick:a,type:"single-checkbox"},null,8,["model-value"])):(r.openBlock(),r.createElementBlock("span",Ar,r.toDisplayString(l.label),1)),o.value===((s=l.order)==null?void 0:s[0])?(r.openBlock(),r.createElementBlock("div",Ir,[r.createVNode(Tr,{color:"var(--color-primary)",class:r.normalizeClass(["widget-head-cell-order-icon",`widget-head-cell-order-icon_${l.order[1]==="desc"?"desc":"asc"}`])},null,8,["class"])])):r.createCommentVNode("",!0)],2)])}}}),Ot=M(Nr,[["__scopeId","data-v-d131e64e"]]),Rr=["fill"],Lr=r.createElementVNode("path",{d:"M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"},null,-1),Or=[Lr],Fr=r.defineComponent({__name:"widget-icon-keyboard-arrow-down",props:{color:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:n.color},Or,8,Rr))}}),Br={class:"widget-filter-item-popup"},Dr=r.defineComponent({__name:"widget-table-panel-filter-item",props:{entity:{},values:{},filters:{},filterItem:{}},emits:["update:values"],setup(e,{emit:n}){const t=e,o=n,i=A.tableFilterEntityBind,a=r.ref(),l=r.computed(()=>{const w=t.filterItem;return w.entity?"Entity":w.type?w.type:null});function c(w){s.value=w==="start"}const s=r.ref(!1),u=r.computed(()=>Array.isArray(t.values)||typeof t.values=="string"?t.values.length>0:!!t.values),d=r.ref(!1);let f=null;function p(w=!d.value){d.value=w,!d.value&&f?(f(),f=null):a.value&&(f=O.utils.clickOutside(a.value,p.bind(null,!1)))}return(w,y)=>{var h;return r.openBlock(),r.createElementBlock("div",{class:"widget-filter-item-container grid",ref_key:"refFilterItem",ref:a},[r.createElementVNode("div",{class:r.normalizeClass(["widget-filter-item",{"widget-filter-item_active":u.value}]),onClick:y[0]||(y[0]=()=>p())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":u.value}])},r.toDisplayString(w.filterItem.label||"--"),3),s.value?(r.openBlock(),r.createBlock(be,{key:0})):(r.openBlock(),r.createBlock(Fr,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":d.value})},null,8,["class"]))],2),r.withDirectives(r.createElementVNode("div",Br,[l.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((h=r.unref(i))==null?void 0:h[l.value]),{key:0,"filter-metadata":w.filterItem,values:w.values,filters:w.filters,"base-entity":w.entity,"onUpdate:values":y[1]||(y[1]=g=>o("update:values",g)),onReadProcess:c},null,40,["filter-metadata","values","filters","base-entity"])):r.createCommentVNode("",!0)],512),[[r.vShow,d.value]])],512)}}}),Ft=M(Dr,[["__scopeId","data-v-ed31ccd3"]]),$r={class:"widget-table-panel-filter flex"},xr=r.defineComponent({__name:"widget-table-panel-filters",props:{filtersConfig:{},filters:{},entity:{}},emits:["update:filters"],setup(e,{emit:n}){const t=e,o=n;function i(a,l){o("update:filters",{...t.filters,[a]:l})}return(a,l)=>(r.openBlock(),r.createElementBlock("div",$r,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.filtersConfig,(c,s)=>{var u;return r.openBlock(),r.createBlock(Ft,{key:s,entity:a.entity,"filter-item":c,values:(u=a.filters)==null?void 0:u[r.unref(ae)(c)],filters:a.filters,"onUpdate:values":d=>i(r.unref(ae)(c),d)},null,8,["entity","filter-item","values","filters","onUpdate:values"])}),128))]))}}),Vr=M(xr,[["__scopeId","data-v-89e1fa2d"]]),Pr={class:"widget-fast-table-tools"},Mr=r.defineComponent({__name:"widget-fast-table-tools",props:{tools:{},loading:{type:Boolean},selectedRows:{},metadata:{}},emits:["reload","export"],setup(e,{emit:n}){const t=e,o=ie.useRouter(),i=n,a=[{name:"config",label:"Settings",icon:"list-settings",buttonStyle:"default",callback:()=>null},{name:"export",label:"Save as CSV",icon:"list-download",buttonStyle:"default",callback:()=>i("export")},{name:"reload",label:"Reload",icon:"reload",buttonStyle:"default",callback:()=>i("reload")}],l=a.map(p=>p.name),c=r.inject(S.PROVIDE_NAME_ACTIONS,[]);function s(p){return{...p,label:p.label||"Batch update",callback:async()=>{if(t.selectedRows.length===0)return xe.add("error","Kindly select at least one record to update");const w=await H.promptModal(S.MODAL_BATCH_VALUES,{entity:t.metadata.name,availableFields:p.availableFields||[]}),y=t.metadata.fieldNameForIdentification,h=(t.selectedRows||[]).map(g=>({primaryKey:g[y],version:t.metadata.versioned?g.Version:void 0}));await qt(t.metadata.name,{values:w,elements:h}),i("reload")}}}const u=r.computed(()=>{var y;const p=((y=c==null?void 0:c.actions)==null?void 0:y.value)||[];return Array.isArray(t.tools)?(t.tools,t.tools.reduce((h,g)=>{if(g.name==="*")h.push(...a);else if(l.includes(g.name)){const v=a.find(m=>m.name===g.name);v&&h.push(v)}else if(g.name==="redirect"){const v={...g,label:g.label,callback:()=>o.push(g.to)};h.push(v)}else if(g.name==="batch-update"&&!g.override)h.push(s(g));else{g.override&&p.find(m=>m.name===g.override)&&g.name==="batch-update"&&h.push(s(g));const v=p.find(m=>m.name===g.name);v&&h.push({name:g.name,label:v.title,icon:g.icon,buttonStyle:g.buttonStyle,callback:()=>Promise.resolve().then(()=>{d[g.name]=!0}).then(()=>f(v)).finally(()=>{d[g.name]=!1})})}return h},[])):[]}),d=r.reactive({});function f(p){var h;const w=(h=p.action.parameters.find(g=>g.dataTypeName==="IntegerArray"))==null?void 0:h.name,y={};return w&&(y[w]=t.selectedRows.map(g=>{if(!(typeof g=="object"&&g!==null))return null;const v=t.metadata.fieldNameForIdentification;return v===void 0?null:g[v]})),p.callback(y)}return(p,w)=>{const y=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Pr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,h=>(r.openBlock(),r.createBlock(y,{label:h.label,title:h.name,icon:h.icon,type:h.buttonStyle,loading:h.name==="reload"?p.loading:d[h.name],onClick:h.callback},null,8,["label","title","icon","type","loading","onClick"]))),256)),r.renderSlot(p.$slots,"default",{},void 0,!0)])}}}),jr=M(Mr,[["__scopeId","data-v-0070862b"]]);function Ur(e){const n=Nt(),t=ie.useRouter(),o=r.reactive({entity:null,mark:null,settings:null});function i(m){const b={...u.value,...m};a(b)}function a(m){{const b=m.prefilters;b&&(Object.keys(b).forEach(E=>{var $,T;Array.isArray(b[E])&&b[E].length===0&&o.settings&&!((T=($=o.settings)==null?void 0:$.prefilters)!=null&&T[E])&&delete b[E]}),O.utils.isEmptyObject(b)&&delete m.prefilters)}localStorage.setItem(s(o.entity,o.mark),JSON.stringify(m))}function l(){return o.entity?JSON.parse(localStorage[s(o.entity,o.mark)]||"{}"):null}function c(m,b){o.entity=m,o.mark=b,f.call()}function s(m,b){return"list-configuration:"+m+(b?"-"+b:"")}const u=r.computed(()=>o.entity?JSON.parse(n[s(o.entity,o.mark)]||"{}"):null),d=r.computed(()=>o.settings?Ge(o.entity,o.settings.config,{router:t,activate:e}):[]),f=se(async function(){if(!o.entity)return;const b=await Mt(o.entity,o.mark);o.settings=Object.freeze(b)}),p=r.computed(()=>{var E;const m=u.value.order||null,b=((E=o.settings)==null?void 0:E.order)||null;return m||b||[]}),w=r.computed(()=>{var E;const m=u.value.prefilters||{};return{...((E=o.settings)==null?void 0:E.prefilters)||{},...m}}),y=r.computed(()=>{var m;return((m=o.settings)==null?void 0:m.filters)||[]}),h=r.computed(()=>{var m;return((m=o.settings)==null?void 0:m.label)||null}),g=r.computed(()=>{var m;return((m=o.settings)==null?void 0:m.tools)||[]}),v=r.computed(()=>!O.utils.isEmptyObject(u.value));return{state:o,get customFilters(){return o.settings.customFilters||[]},set:c,get:l,configuration:u,update:i,computedPrefilter:w,computedFiltersConfiguration:y,get cellConfig(){return o.settings?Ge(o.entity,o.settings.config,{router:t,activate:e}):[]},get prefilters(){var m;return((m=l())==null?void 0:m.prefilters)||o.settings.prefilters||{}},get order(){var m;return((m=l())==null?void 0:m.order)||o.settings.order||[]},clean(){localStorage.removeItem(s(o.entity,o.mark))},cellConfiguration:d,computedLabel:h,computedTools:g,computedHasLocalConfiguration:v,computedOrder:p,get displayModeForNew(){return o.settings.displayModeForNew||"inline"}}}const Wr={class:"es-grid es-gap-15"},qr={key:0,class:"title-md color-primary margin-0 widget-fast-table-label"},Hr={class:""},zr=r.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{},hideLabel:{type:Boolean}},setup(e,{expose:n}){const t=e,o=ie.useRouter(),i=r.ref([]),a=r.ref(null),l=r.computed(()=>a.value?i.value.indexOf(a.value[2]):null);function c(C,N,U){a.value=[C,N,U]}const s=r.ref(null),u=O.Form.getParentForm(),d=r.ref([]),f=Ee(t.entity),{state:p,update:w}=ct(t.entity,{masterEntities:t.masterEntities||[]}),y=se(async()=>{try{await g.call(),await w()}catch(C){const{message:N}=nt(C);s.value=N}});u instanceof O.Form&&u.subscribe({read:y.call.bind(null),name:t.entity,type:"table"}),r.watch(()=>t.mark,()=>{T.set(t.entity,t.mark)});function h(){return x.and(x(T.prefilters),x(t.binding||{}))}const g=se(async function(){const N=t.entity;s.value=null,d.value=[];const U=await le(N,{customFilters:T.customFilters,fields:ot(k.value).join(" "),order:T.order,filter:h()});i.value=Object.freeze(U.map(K=>Object.freeze(K)))}),{controller:v}=Qe();r.watch(()=>p.value,C=>{C&&(C.canRead?v.show():v.hide())},{immediate:!0});let m=[ve.on("affected-entity",C=>{C.name===t.entity&&g.call()}),ve.on("display-entity",async C=>{C.name===t.entity&&(g.promise&&await g.promise,c(C.name,C.id,i.value.find(N=>N[f.value.fieldNameForIdentification]===C.id)))})];r.onUnmounted(()=>{m.map(C=>C()),v.remove()});function b(C){function N(D){return Array.isArray(D)?N(D[0]):typeof D!="string"?null:D}const U=N(C);if(!U)return;const K=T.order;E("order",K[0]!==U?[U,"asc"]:K[1]==="desc"?[]:[U,"desc"])}function E(C,N){T.update({[C]:N}),g.call()}const $=r.computed(()=>y.wait),T=Ur(c),k=T.cellConfiguration;T.set(t.entity,t.mark),r.watch(()=>T.state.settings,y.call);const _=r.computed(()=>T.state.settings);n({listSettings:_,array:i,config:k});function I(){H.openModal(S.MODAL_LIST_DOWNLOAD,{entity:t.entity,cellConfig:T.cellConfig,order:T.order,prefilters:h(),customFilters:T.customFilters})}function B(){switch(T.displayModeForNew){case"modal":return H.openModal(S.MODAL_ENTITY,{entity:t.entity});case"form":return o.push(lt(t.entity));case"inline":return a.value=[t.entity]}}return(C,N)=>{const U=r.resolveComponent("widget-button"),K=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",Wr,[r.unref(T).computedLabel.value&&!C.hideLabel?(r.openBlock(),r.createElementBlock("p",qr,r.toDisplayString(r.unref(T).computedLabel.value),1)):r.createCommentVNode("",!0),r.unref(f)?(r.openBlock(),r.createBlock(jr,{key:1,metadata:r.unref(f),tools:r.unref(T).computedTools.value,loading:$.value,"selected-rows":d.value||[],onReload:r.unref(y).call,onExport:I},{default:r.withCtx(()=>{var D;return[r.renderSlot(C.$slots,"tools"),(D=r.unref(p))!=null&&D.canCreate?(r.openBlock(),r.createBlock(U,{key:0,onClick:B,type:"primary",label:"Add New"})):r.createCommentVNode("",!0),r.unref(T).computedHasLocalConfiguration.value?(r.openBlock(),r.createBlock(U,{key:1,onClick:r.unref(T).clean,type:"primary",label:"Clear all filters"},null,8,["onClick"])):r.createCommentVNode("",!0)]}),_:3},8,["metadata","tools","loading","selected-rows","onReload"])):r.createCommentVNode("",!0),r.createElementVNode("div",Hr,[r.createVNode(Vr,{entity:C.entity,"filters-config":r.unref(T).computedFiltersConfiguration.value,filters:r.unref(T).computedPrefilter.value,"onUpdate:filters":N[0]||(N[0]=D=>E("prefilters",D))},null,8,["entity","filters-config","filters"]),r.createVNode(r.unref(Rt),{config:r.unref(k),array:i.value,"active-row":l.value,"onUpdate:activeRow":N[2]||(N[2]=D=>a.value=null),onOrder:b,class:"table",selectedRows:d.value,"onUpdate:selectedRows":N[3]||(N[3]=D=>d.value=D)},{"head-cell":r.withCtx(D=>{var V,W,ne;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(C.$slots["head-cell"]?C.$slots["head-cell"]:Ot),r.mergeProps({label:D.label},D,{onOrder:b,order:r.unref(T).computedOrder.value,type:D.type,"is-full-selected":((V=d.value)==null?void 0:V.length)===((W=i.value)==null?void 0:W.length)&&((ne=i.value)==null?void 0:ne.length)>0}),null,16,["label","order","type","is-full-selected"]))]}),default:r.withCtx(()=>{var D,V;return[r.createVNode(K,{entity:(D=a.value)==null?void 0:D[0],"primary-key":((V=a.value)==null?void 0:V[1])||null,"master-entities":C.masterEntities||void 0,binding:C.binding,onFormUpdate:N[1]||(N[1]=()=>{a.value=null,r.unref(g).call()})},null,8,["entity","primary-key","master-entities","binding"])]}),_:1},8,["config","array","active-row","selectedRows"])])])}}});function Bt(e,n={},t={}){const o=r.inject(S.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:n,a=typeof n=="string"?t:n;return r.computed(()=>{var s;const c=((typeof e=="string"?(s=o==null?void 0:o.actions)==null?void 0:s.value:r.unref(e))||[]).find(u=>u.name===i);return c?{...c,...a}:null})}const Gr=r.defineComponent({__name:"widget-action",props:{name:{},overrideParams:{}},setup(e){const n=e,t=Bt(n.name,n.overrideParams||{}),o=r.computed(()=>{if(t.value)return se(t.value.callback)});return(i,a)=>{var c;const l=r.resolveComponent("widget-button");return r.unref(t)?(r.openBlock(),r.createBlock(l,{key:0,label:r.unref(t).label,loading:((c=o.value)==null?void 0:c.loading)||!1,onClick:a[0]||(a[0]=()=>{var s,u;return(u=(s=o.value)==null?void 0:s.call)==null?void 0:u.call(s,i.overrideParams||{})})},null,8,["label","loading"])):r.createCommentVNode("",!0)}}}),Yr=r.defineComponent({__name:"WidgetResolverEntity",setup(e){const n=ie.useRouter(),t=ie.useRoute();function o(){const i=t.params.entity,a=t.params.primaryKey;it(i,a).then(l=>n.replace(lt(l,a))).catch(l=>{P("error")(l),n.back()})}return r.onMounted(o),(i,a)=>(r.openBlock(),r.createElementBlock("div",null,[r.createVNode(De,{label:"Loading..."})]))}}),Xr=r.defineComponent({__name:"modal-list-download",props:{entity:{},cellConfig:{},prefilters:{},order:{},customFilters:{}},setup(e){const n=e,t=r.computed(()=>o.finished?"Download CSV":`Download ${o.count} records.`),{state:o,downloadFile:i,reject:a,start:l}=dn({entity:n.entity,config:n.cellConfig,prefilters:n.prefilters,order:n.order,customFilters:n.customFilters});return H.onBeforeModalClose(a),r.onMounted(l),r.watch(()=>o.finished,()=>{i(),H.popModal()}),(c,s)=>{const u=r.resolveComponent("widget-button"),d=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(d,null,{footer:r.withCtx(()=>[r.createVNode(u,{onClick:s[0]||(s[0]=f=>{r.unref(i)(),r.unref(H.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(De,{label:"Loading"})])]),_:1})}}}),Ze=e=>(r.pushScopeId("data-v-efd61247"),e=e(),r.popScopeId(),e),Kr={class:"version-item"},Jr={class:"text_md"},Qr={class:"version-item-date text_md"},Zr=Ze(()=>r.createElementVNode("span",null,null,-1)),eo=Ze(()=>r.createElementVNode("div",null,null,-1)),to=Ze(()=>r.createElementVNode("span",null,null,-1)),no={class:"text_sm"},ro={class:"text_sm line-clamp_5"},oo={class:"text_sm line-clamp_5"},io=r.defineComponent({__name:"version-item",props:{selectedFields:{},date:{},customerName:{},version:{},changes:{},entity:{}},setup(e){const n=e;function t(a,l){const c=a.name.toLowerCase(),s=l.name.toLowerCase();return s==="version"?-1:c==="version"?1:s.startsWith("utc")?-1:c.startsWith("utc")?1:0}const o=r.computed(()=>[...n.changes||[]].sort(t)),i=r.computed(()=>(o.value||[]).filter(a=>Array.isArray(n.selectedFields)&&n.selectedFields.length!==0?n.selectedFields.includes(a.name):!0));return(a,l)=>(r.openBlock(),r.createElementBlock("div",Kr,[r.createElementVNode("span",Jr,[r.createElementVNode("b",null,r.toDisplayString(a.version),1)]),r.createElementVNode("span",Qr,[r.createElementVNode("b",null,r.toDisplayString(r.unref(tt)(a.date)),1)]),Zr,eo,(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.name},[to,r.createElementVNode("span",no,r.toDisplayString(c.name),1),r.createElementVNode("span",ro,r.toDisplayString(r.unref(qe)(a.entity,c.name,c.newValue)),1),r.createElementVNode("span",oo,r.toDisplayString(r.unref(qe)(a.entity,c.name,c.oldValue)),1)],64))),128))]))}}),ao=M(io,[["__scopeId","data-v-efd61247"]]),et=e=>(r.pushScopeId("data-v-321c2f32"),e=e(),r.popScopeId(),e),so={key:1,class:"wrap-history"},lo={class:"history-header grid gap_10"},co=et(()=>r.createElementVNode("span",null,null,-1)),uo=et(()=>r.createElementVNode("span",{class:"text_md"},"New Value",-1)),fo=et(()=>r.createElementVNode("span",{class:"text_md"},"Old Value",-1)),po={class:"padding_15 grid gap_10 container-history"},mo=r.defineComponent({__name:"modal-version-history",props:{entity:{},primaryKey:{}},setup(e){const n=e,t=r.computed(()=>`${n.entity} Version History`),o=r.ref(),i=r.computed(()=>!s.value||Array.isArray(s.value)&&s.value.length===0?o.value:(o.value||[]).filter(f=>{var p;return f.action==="Insert"?!0:(p=f.changes)==null?void 0:p.find(w=>s.value&&s.value.includes(w.name))})),a=se(u),l=Ee(n.entity),c=r.computed(()=>l.value.fields.map(f=>({label:f.displayName,value:f.name}))),s=r.ref(null);async function u(){try{const f=await Ht({entity:n.entity,primaryKey:n.primaryKey});o.value=f.history}catch(f){P("error")(f)}}r.onMounted(()=>a.call());function d(f){return f.currentValues.map(p=>({name:p.fieldName,newValue:p.value})).filter(p=>p.newValue)}return(f,p)=>{const w=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(w,{label:t.value,class:"wrap-modal-version-history"},{default:r.withCtx(()=>[r.unref(a).loading?(r.openBlock(),r.createBlock(r.unref(De),{key:0,label:"Loading history..."})):(r.openBlock(),r.createElementBlock("div",so,[r.createElementVNode("div",lo,[co,r.createVNode(r.unref(O.FormField),{type:"select",options:c.value,modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=y=>s.value=y),multiple:""},null,8,["options","modelValue"]),uo,fo]),r.createElementVNode("div",po,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(y,h)=>(r.openBlock(),r.createBlock(ao,{"selected-fields":s.value,date:y.utcCreated,"customer-name":"",version:y.version,changes:y.action==="Insert"?d(y):y.changes,entity:f.entity,key:h},null,8,["selected-fields","date","version","changes","entity"]))),128))])]))]),_:1},8,["label"])}}}),go=M(mo,[["__scopeId","data-v-321c2f32"]]);function Dt(e,n,t){const o=window.URL.createObjectURL(e),i=document.createElement("a");i.href=o,t!=null&&t.blank&&(i.target="_blank"),i.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{window.URL.revokeObjectURL(o),i.remove()},100)}function ho(e,n){return fetch(`/close-api/document-builder/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({CatalogId:n})}).then(t=>t.blob()).then(t=>{Dt(t,e+n+"-print-form.pdf",{blank:!0})})}function tt(e){return Ne(e,"YYYY/MM/DD HH:mm:ss")}function Ne(e,n="YYYY/MM/DD"){if(!e)return"";try{const t=new Date(e);return mn.format(t,n)}catch(t){return console.log(t),"Invalid date"}}function se(e){function n(i){o.status=i}function t(...i){if(o.loading)return Promise.reject("The process has already started.");o.loading=!0,o.wait=!0;const a=Promise.resolve().then(()=>n(1)).then(()=>e(...i)).then(l=>(n(3),l)).catch(l=>{throw n(2),l}).finally(()=>{o.wait=!1,o.loading=!1,o.promise=null});return o.promise=a,a}const o=r.reactive({status:0,wait:!1,loading:!1,call:t,promise:null});return o}var $t=(e=>(e[e.init=0]="init",e[e.loading=1]="loading",e[e.error=2]="error",e[e.done=3]="done",e))($t||{});function nt(e){return typeof e=="string"?Ce(e):yo(e)?Ce(e.message,e.children||e.details||[]):vo(e)?Ce(e.title,[e.detail||""]):Ce(S.DEFAULT_ERROR_MESSAGE)}function yo(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function vo(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function Ce(e,n=[]){return{message:e,children:n}}function P(e="error"){return function(n){const{message:t,children:o}=nt(n);xe.add(e,t,{children:o})}}function le(e,n={}){const t=L();return xt(n)&&n.id&&(n.primaryKey=n.id,delete n.id),t.emit("entity:read",{entity:e,...n})}function xt(e){return!!(e.id||e.primaryKey)}function rt(e,n){const t=L();return xt(n)&&n.id&&(n.primaryKey=n.id,delete n.id),t.emit("entity:update",{...n,entity:e})}function ot(e){return e.reduce((n,t)=>(t.name&&(typeof t.name=="string"?n.push(t.name):n.push(...t.name)),n),[])}function Vt(e,n=2){if(!(typeof e=="string"||typeof e=="number"))return"";let o=String(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.length<2&&(o[1]=""),o[1]=o[1].padEnd(n,"0"),o[1].length>n&&(o[1]=o[1].substring(0,n)),o.join(".")}function wo(e,n){const t=new Map;return e.forEach(o=>{var a;const i=n(o);t.has(i)||t.set(i,[]),(a=t.get(i))==null||a.push(o)}),t}function bo(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function Eo(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return S.DEFAULT_ERROR_MESSAGE}})}function q(e,n={}){return G.isFront&&(n.headers||(n.headers={}),n.headers["Context-Id"]=G.contextId),n.redirect="manual",fetch(e,n).then(t=>t.type==="opaqueredirect"?void window.location.reload():t).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(t=>Eo(t).then(o=>{if(!t.ok)throw o;return o}))}function _o(e,n=1e3){let t=0;return(...o)=>{clearTimeout(t),t=window.setTimeout(()=>e(...o),n)}}function ko(e,n){let t=!1;return(...o)=>{if(!t)return t=!0,setTimeout(()=>t=!1,n),e(...o)}}const Co=Oe(Be("pretty-value-field-by-entity"));function qe(e,n,t){try{const o=Q.get(e);if(!o)throw new Error("For entity metadata is not loaded");const i=o.fieldsByName[n];if(!i)throw new Error(`For entity ${e} can't found fieldMetadata for field ${n}`);return i.dataType==="DateTime"&&typeof t=="string"?new Date(t).toLocaleString():t}catch(o){return Co('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,n,t),t}}const re=Oe(Be("use-socket"));function L(){return So}function To(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const So=function(){let e=1,n,t;const o=new Set;let i=0;const a=new Set;function l(){if(n)i&&(clearTimeout(i),i=0);else return;i=setTimeout(()=>{n.close()},In*2);const v=new Uint8Array(1);v[0]=An,n.send(v)}setInterval(()=>{Array.from(o).forEach(v=>{g(v)&&(re("Handler for event %s requestId %d was expired",v.event,v.requestId),v.requestId?s({requestId:v.requestId,event:At,data:{message:ee.RequestTookToLong().message}}):o.delete(v))})},1e3),setInterval(()=>{(!n||n.readyState===3)&&u()},S.DELAY_SOCKET_RECONNECT);function c(){return{safeQueue:a,requestId:e,handlers:o,socketInstance:n}}function s(v){const m=[...o.values()];re("Handlers array length is %d. Response event: %s. Request id: %d",o.size,v.event,v.requestId),m.forEach(b=>{const E=v.requestId;(b.requestId&&b.requestId===E||!b.requestId&&b.event===v.event)&&(re("Find appropriated handler: %d, event: %s",e,b.event),b.callback(v.data,v),b.once&&(o.delete(b),re("Handler was removed by *once* params was passed. %o",b)))})}function u(){if(typeof t!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${t}`,"color: purple","color: black"),n=new WebSocket(t),n.onclose=function(v){re("Connection to server was stopped: %d %s",v.code,v.reason),Array.from(o).forEach(m=>{m.guaranteedAnswer&&m.serializeString&&a.add(m.serializeString)})},n.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(v=>{d(v),a.delete(v)})},n.onerror=function(v){console.warn(v)},n.onmessage=v=>{var m;try{if(To(v.data)){l();return}const b=JSON.parse(v.data);if(!Pt(b)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(b);return}b.event==="progress"&&o.forEach(E=>{E.event===b.data.for.event&&E.requestId===b.data.for.requestId&&(console.log("UPDATE TIME"),E.timeToLive=new Date().getTime()-E.created+S.TIME_TO_LIVE_SOCKET_REQUEST)}),(m=b==null?void 0:b.data)!=null&&m.refresh&&location.reload(),s(b)}catch(b){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(b)}}}function d(v){n.send(v)}function f(v,m){h({event:v,callback:m})}function p(v,m){h({event:v,callback:m,once:!0})}function w(){return n&&(n==null?void 0:n.readyState)===1}function y(v,m,b){const E=++e,$=JSON.stringify({requestId:E,event:v,data:m,contextId:G.contextId,url:A.socketURLHandler?A.socketURLHandler():window.location.href});return w()?d($):(a.add($),re("Socket is not connected. Message was send to save-queue")),new Promise((T,k)=>{h({event:v,requestId:E,once:!0,guaranteedAnswer:!0,serializeString:$,callback:(_,I)=>{if(re("Promise was resolve with next data:",_),Ao(I))return void k(_);b&&b(_,I),T(_)},timeToLive:S.TIME_TO_LIVE_SOCKET_REQUEST})})}function h(v){const m={timeToLive:0,...v,created:new Date().getTime()};o.add(m)}function g(v){return v.timeToLive===0||typeof v.timeToLive!="number"?!1:new Date().getTime()-v.created>v.timeToLive}return{get socket(){return n},on:f,once:p,emit:y,initialization(v){t=v},getDevInfo:c}}(),Ao=e=>!!Pt(e)&&e.event===At,Pt=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function Mt(e,n){return L().emit("list-setting:read",{entity:e,mark:n})}function Io(e,n){return L().emit("metadata-field:treat",{entity:e,fieldName:n})}function jt(e,n){return L().emit("entity:create",{...n,entity:e})}function Ut(e,n){return L().emit("entity:delete",{...n,entity:e})}function No(e,n){return L().emit("usage-context:read",{...n,entity:e})}function Wt(e={}){return L().emit("tool:read",e)}function Ro(){return L().emit("metadata-list:read",{})}function qt(e,n){return L().emit("batch:update",{...n,entity:e})}function it(e,n){return L().emit("entity:resolve",{primaryKey:n,entity:e})}function Ht(e){return L().emit("history:read",e)}function Lo(e,n){return L().emit("entity:count",{...n,entity:e})}function Oo(e){return`/${Nn}/${e}`}function pe(e){return{exec(n,t){switch(e.name){case"replace-boolean":return pe.replaceBoolean(n,e.values);case"replace-record-operation":return pe.replaceRecordOperation(n)}}}}pe.replaceBoolean=Fo;pe.replaceRecordOperation=Bo;function Fo(e,n){return typeof e!="boolean"?"":e?n[1]:n[0]}function Bo(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Do(e={}){return L().emit("tool:execute",e)}const $o=Oe(Be("wrap-tool-response"));function zt(e,n){return e.handleConfirmation===void 0&&(e.handleConfirmation=Po),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=jo),e.handleCloseForm===void 0&&(e.handleCloseForm=Uo),e.handleValidationResult===void 0&&(e.handleValidationResult=Mo),{...n,label:n.title,async callback(t={}){var l;const o=typeof e.values=="function"?e.values(n,e):e.values;let i={};n.action.targetName==="Record"&&o.hasOwnProperty("Id")&&(i.Id=o.Id,delete o.Id);const a=()=>Do({name:n.name,values:{...o,...t},primaryKeys:i,usageContext:n.usageContext}).then(async c=>{var s,u;if(!xo(c))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const d of e.handlers)await d(n,c,e);if(!c.success)throw e.handleValidationResult&&c.validationEffect&&((u=(s=c.validationEffect)==null?void 0:s.results)!=null&&u.length)&&e.handleValidationResult(n,c.validationEffect,e),new Error(c.message);return c.message&&xe.add("info",c.message),Array.isArray(c.affectedEntities)&&e.handleAffectedEntity&&c.affectedEntities.forEach(d=>{var f;return(f=e.handleAffectedEntity)==null?void 0:f.call(e,n,d,e)}),n.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(n,e),c}).catch(P("error"));if((l=e.overrides)!=null&&l[n.name])return e.overrides[n.name](n,e);if(n.paramDialog){const c=await Wo(n,e);if(c===null)return;t=Object.assign(t,c||{})}return n.requireSave&&e.form&&e.form.changed?e.form.save().then(a):!n.confirmation||!e.handleConfirmation||n.paramDialog?a():e.handleConfirmation(n,a)}}}function xo(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function Vo(e){const n="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?n:typeof e=="string"?e:n}async function Po(e,n){const t=Vo(e.confirmation);if(!H.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await H.promptModal(S.MODAL_CONFIRM,{message:t}))return n()}function Mo(e,n){const t=S.MODAL_VALIDATION_EFFECT;if(!H.getComponentFromStore(t))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{H.pushModal(t,n)})}function jo(e,n,t){var s;function o(u){return u!==null&&typeof u=="object"&&typeof u.read=="function"}function i(u,d){u&&($o("Affected Entity %s. Find form with name %s.",d,u.name),u.name===d&&o(u)&&u.read(),u instanceof O.Form&&u.dependencies.forEach(f=>i(f,d)))}ve.emit("affected-entity",n);const{router:a,form:l}=t,c=(s=n.primaryKey)==null?void 0:s.Id;if(a&&n&&n.name===e.redirectEntity){ve.emit("display-entity",{id:c,name:n.name}),A.getEntityLink&&a.push(A.getEntityLink(n.name,c));return}i(l,n.name)}function Uo(e,n){const{router:t}=n;t&&e.closeHostForm&&t.back()}function Wo(e,n){var t;if((t=e.paramDialog)!=null&&t.name)return H.promptModal(e.paramDialog.name,{paramDialog:e.paramDialog,tool:e,options:n})}let oe={};function te(e,...n){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let t=O.utils.getPropFromObject((this==null?void 0:this.vocabulary)||oe,e);if(typeof t=="string")return yt(t,n);const o=O.utils.getPropFromObject(oe==null?void 0:oe.root,e);return typeof o=="string"?yt(o,n):(typeof t===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function yt(e,n){return n.forEach((t,o)=>{e=e.replaceAll(new RegExp(`\\{${o}}`,"g"),t)}),e}te.setGlobalVocabulary=function(e){oe=e};te.getScope=function(e){const n=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),te.bind({vocabulary:O.utils.getPropFromObject(oe,n.toLowerCase())})};te.setVocabulary=function(e){return typeof e=="string"&&(e=O.utils.getPropFromObject(oe,e)),te.bind({vocabulary:e})};function qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var He={exports:{}},F={},ze={exports:{}},ce={};function Gt(){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 Ho(e,n,t){}function zo(e,n,t){}var Go=/javascript\s*\:/img;function Yo(e,n){return Go.test(n)?"":n}ce.whiteList=Gt();ce.getDefaultWhiteList=Gt;ce.onAttr=Ho;ce.onIgnoreAttr=zo;ce.safeAttrValue=Yo;var Xo={indexOf:function(e,n){var t,o;if(Array.prototype.indexOf)return e.indexOf(n);for(t=0,o=e.length;t<o;t++)if(e[t]===n)return t;return-1},forEach:function(e,n,t){var o,i;if(Array.prototype.forEach)return e.forEach(n,t);for(o=0,i=e.length;o<i;o++)n.call(t,e[o],o,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,"")}},ge=Xo;function Ko(e,n){e=ge.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,o=!1,i=0,a=0,l="";function c(){if(!o){var d=ge.trim(e.slice(i,a)),f=d.indexOf(":");if(f!==-1){var p=ge.trim(d.slice(0,f)),w=ge.trim(d.slice(f+1));if(p){var y=n(i,l.length,p,w,d);y&&(l+=y+"; ")}}}i=a+1}for(;a<t;a++){var s=e[a];if(s==="/"&&e[a+1]==="*"){var u=e.indexOf("*/",a+2);if(u===-1)break;a=u+1,i=a+1,o=!1}else s==="("?o=!0:s===")"?o=!1:s===";"?o||c():s===`
7
+ `&&c()}return ge.trim(l)}var Jo=Ko,Te=ce,Qo=Jo;function vt(e){return e==null}function Zo(e){var n={};for(var t in e)n[t]=e[t];return n}function Yt(e){e=Zo(e||{}),e.whiteList=e.whiteList||Te.whiteList,e.onAttr=e.onAttr||Te.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Te.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Te.safeAttrValue,this.options=e}Yt.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var n=this,t=n.options,o=t.whiteList,i=t.onAttr,a=t.onIgnoreAttr,l=t.safeAttrValue,c=Qo(e,function(s,u,d,f,p){var w=o[d],y=!1;if(w===!0?y=w:typeof w=="function"?y=w(f):w instanceof RegExp&&(y=w.test(f)),y!==!0&&(y=!1),f=l(d,f),!!f){var h={position:u,sourcePosition:s,source:p,isWhite:y};if(y){var g=i(d,f,h);return vt(g)?d+":"+f:g}else{var g=a(d,f,h);if(!vt(g))return g}}});return c};var ei=Yt;(function(e,n){var t=ce,o=ei;function i(l,c){var s=new o(c);return s.process(l)}n=e.exports=i,n.FilterCSS=o;for(var a in t)n[a]=t[a];typeof window<"u"&&(window.filterCSS=e.exports)})(ze,ze.exports);var at=ze.exports,st={indexOf:function(e,n){var t,o;if(Array.prototype.indexOf)return e.indexOf(n);for(t=0,o=e.length;t<o;t++)if(e[t]===n)return t;return-1},forEach:function(e,n,t){var o,i;if(Array.prototype.forEach)return e.forEach(n,t);for(o=0,i=e.length;o<i;o++)n.call(t,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var n=/\s|\n|\t/,t=n.exec(e);return t?t.index:-1}},ti=at.FilterCSS,ni=at.getDefaultWhiteList,Re=st;function Xt(){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 Kt=new ti;function ri(e,n,t){}function oi(e,n,t){}function ii(e,n,t){}function ai(e,n,t){}function Jt(e){return e.replace(li,"&lt;").replace(ci,"&gt;")}function si(e,n,t,o){if(t=rn(t),n==="href"||n==="src"){if(t=Re.trim(t),t==="#")return"#";if(!(t.substr(0,7)==="http://"||t.substr(0,8)==="https://"||t.substr(0,7)==="mailto:"||t.substr(0,4)==="tel:"||t.substr(0,11)==="data:image/"||t.substr(0,6)==="ftp://"||t.substr(0,2)==="./"||t.substr(0,3)==="../"||t[0]==="#"||t[0]==="/"))return""}else if(n==="background"){if(Se.lastIndex=0,Se.test(t))return""}else if(n==="style"){if(wt.lastIndex=0,wt.test(t)||(bt.lastIndex=0,bt.test(t)&&(Se.lastIndex=0,Se.test(t))))return"";o!==!1&&(o=o||Kt,t=o.process(t))}return t=on(t),t}var li=/</g,ci=/>/g,ui=/"/g,di=/&quot;/g,fi=/&#([a-zA-Z0-9]*);?/gim,pi=/&colon;?/gim,mi=/&newline;?/gim,Se=/((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,wt=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,bt=/u\s*r\s*l\s*\(.*/gi;function Qt(e){return e.replace(ui,"&quot;")}function Zt(e){return e.replace(di,'"')}function en(e){return e.replace(fi,function(t,o){return o[0]==="x"||o[0]==="X"?String.fromCharCode(parseInt(o.substr(1),16)):String.fromCharCode(parseInt(o,10))})}function tn(e){return e.replace(pi,":").replace(mi," ")}function nn(e){for(var n="",t=0,o=e.length;t<o;t++)n+=e.charCodeAt(t)<32?" ":e.charAt(t);return Re.trim(n)}function rn(e){return e=Zt(e),e=en(e),e=tn(e),e=nn(e),e}function on(e){return e=Qt(e),e=Jt(e),e}function gi(){return""}function hi(e,n){typeof n!="function"&&(n=function(){});var t=!Array.isArray(e);function o(l){return t?!0:Re.indexOf(e,l)!==-1}var i=[],a=!1;return{onIgnoreTag:function(l,c,s){if(o(l))if(s.isClosing){var u="[/removed]",d=s.position+u.length;return i.push([a!==!1?a:s.position,d]),a=!1,u}else return a||(a=s.position),"[removed]";else return n(l,c,s)},remove:function(l){var c="",s=0;return Re.forEach(i,function(u){c+=l.slice(s,u[0]),s=u[1]}),c+=l.slice(s),c}}}function yi(e){for(var n="",t=0;t<e.length;){var o=e.indexOf("<!--",t);if(o===-1){n+=e.slice(t);break}n+=e.slice(t,o);var i=e.indexOf("-->",o);if(i===-1)break;t=i+3}return n}function vi(e){var n=e.split("");return n=n.filter(function(t){var o=t.charCodeAt(0);return o===127?!1:o<=31?o===10||o===13:!0}),n.join("")}F.whiteList=Xt();F.getDefaultWhiteList=Xt;F.onTag=ri;F.onIgnoreTag=oi;F.onTagAttr=ii;F.onIgnoreTagAttr=ai;F.safeAttrValue=si;F.escapeHtml=Jt;F.escapeQuote=Qt;F.unescapeQuote=Zt;F.escapeHtmlEntities=en;F.escapeDangerHtml5Entities=tn;F.clearNonPrintableCharacter=nn;F.friendlyAttrValue=rn;F.escapeAttrValue=on;F.onIgnoreTagStripAll=gi;F.StripTagBody=hi;F.stripCommentTag=yi;F.stripBlankChar=vi;F.attributeWrapSign='"';F.cssFilter=Kt;F.getDefaultCSSWhiteList=ni;var $e={},Z=st;function wi(e){var n=Z.spaceIndex(e),t;return n===-1?t=e.slice(1,-1):t=e.slice(1,n+1),t=Z.trim(t).toLowerCase(),t.slice(0,1)==="/"&&(t=t.slice(1)),t.slice(-1)==="/"&&(t=t.slice(0,-1)),t}function bi(e){return e.slice(0,2)==="</"}function Ei(e,n,t){var o="",i=0,a=!1,l=!1,c=0,s=e.length,u="",d="";e:for(c=0;c<s;c++){var f=e.charAt(c);if(a===!1){if(f==="<"){a=c;continue}}else if(l===!1){if(f==="<"){o+=t(e.slice(i,c)),a=c,i=c;continue}if(f===">"||c===s-1){o+=t(e.slice(i,a)),d=e.slice(a,c+1),u=wi(d),o+=n(a,o.length,u,d,bi(d)),i=c+1,a=!1;continue}if(f==='"'||f==="'")for(var p=1,w=e.charAt(c-p);w.trim()===""||w==="=";){if(w==="="){l=f;continue e}w=e.charAt(c-++p)}}else if(f===l){l=!1;continue}}return i<s&&(o+=t(e.substr(i))),o}var _i=/[^a-zA-Z0-9\\_:.-]/gim;function ki(e,n){var t=0,o=0,i=[],a=!1,l=e.length;function c(p,w){if(p=Z.trim(p),p=p.replace(_i,"").toLowerCase(),!(p.length<1)){var y=n(p,w||"");y&&i.push(y)}}for(var s=0;s<l;s++){var u=e.charAt(s),d,f;if(a===!1&&u==="="){a=e.slice(t,s),t=s+1,o=e.charAt(t)==='"'||e.charAt(t)==="'"?t:Ti(e,s+1);continue}if(a!==!1&&s===o){if(f=e.indexOf(u,s+1),f===-1)break;d=Z.trim(e.slice(o+1,f)),c(a,d),a=!1,s=f,t=s+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),a===!1)if(f=Ci(e,s),f===-1){d=Z.trim(e.slice(t,s)),c(d),a=!1,t=s+1;continue}else{s=f-1;continue}else if(f=Si(e,s-1),f===-1){d=Z.trim(e.slice(t,s)),d=Et(d),c(a,d),a=!1,t=s+1;continue}else continue}return t<e.length&&(a===!1?c(e.slice(t)):c(a,Et(Z.trim(e.slice(t))))),Z.trim(i.join(" "))}function Ci(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="="?n:-1}}function Ti(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="'"||t==='"'?n:-1}}function Si(e,n){for(;n>0;n--){var t=e[n];if(t!==" ")return t==="="?n:-1}}function Ai(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function Et(e){return Ai(e)?e.substr(1,e.length-2):e}$e.parseTag=Ei;$e.parseAttr=ki;var Ii=at.FilterCSS,z=F,an=$e,Ni=an.parseTag,Ri=an.parseAttr,Ie=st;function Ae(e){return e==null}function Li(e){var n=Ie.spaceIndex(e);if(n===-1)return{html:"",closing:e[e.length-2]==="/"};e=Ie.trim(e.slice(n+1,-1));var t=e[e.length-1]==="/";return t&&(e=Ie.trim(e.slice(0,-1))),{html:e,closing:t}}function Oi(e){var n={};for(var t in e)n[t]=e[t];return n}function Fi(e){var n={};for(var t in e)Array.isArray(e[t])?n[t.toLowerCase()]=e[t].map(function(o){return o.toLowerCase()}):n[t.toLowerCase()]=e[t];return n}function sn(e){e=Oi(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=z.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Fi(e.whiteList||e.allowList):e.whiteList=z.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":z.attributeWrapSign,e.onTag=e.onTag||z.onTag,e.onTagAttr=e.onTagAttr||z.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||z.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||z.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||z.safeAttrValue,e.escapeHtml=e.escapeHtml||z.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Ii(e.css))}sn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var n=this,t=n.options,o=t.whiteList,i=t.onTag,a=t.onIgnoreTag,l=t.onTagAttr,c=t.onIgnoreTagAttr,s=t.safeAttrValue,u=t.escapeHtml,d=n.attributeWrapSign,f=n.cssFilter;t.stripBlankChar&&(e=z.stripBlankChar(e)),t.allowCommentTag||(e=z.stripCommentTag(e));var p=!1;t.stripIgnoreTagBody&&(p=z.StripTagBody(t.stripIgnoreTagBody,a),a=p.onIgnoreTag);var w=Ni(e,function(y,h,g,v,m){var b={sourcePosition:y,position:h,isClosing:m,isWhite:Object.prototype.hasOwnProperty.call(o,g)},E=i(g,v,b);if(!Ae(E))return E;if(b.isWhite){if(b.isClosing)return"</"+g+">";var $=Li(v),T=o[g],k=Ri($.html,function(_,I){var B=Ie.indexOf(T,_)!==-1,C=l(g,_,I,B);return Ae(C)?B?(I=s(g,_,I,f),I?_+"="+d+I+d:_):(C=c(g,_,I,B),Ae(C)?void 0:C):C});return v="<"+g,k&&(v+=" "+k),$.closing&&(v+=" /"),v+=">",v}else return E=a(g,v,b),Ae(E)?u(v):E},u);return p&&(w=p.remove(w)),w};var Bi=sn;(function(e,n){var t=F,o=$e,i=Bi;function a(c,s){var u=new i(s);return u.process(c)}n=e.exports=a,n.filterXSS=a,n.FilterXSS=i,function(){for(var c in t)n[c]=t[c];for(var s in o)n[s]=o[s]}(),typeof window<"u"&&(window.filterXSS=e.exports);function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(He,He.exports);var Di=He.exports;const $i=qo(Di);function xi(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>'),$i(e)}function Vi(e,n,t,o){let i=e+n/60+t/3600;return(o=="S"||o=="W")&&(i=i*-1),i}function Pi(e,n){const t={dir:e<0?n==="long"?"W":"S":n==="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`${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`}function lt(e,n){const t=["forms",e];return n&&t.push(n),"/"+t.join("/")}function Mi(e,n){return"/"+[S.PATH_RESOLVER_ENTITY,e,n].join("/")}function ji(){return`/${S.PATH_RESOLVER_ENTITY}/:entity/:primaryKey`}function ln(e){const n=Q.get(e);if(!n)throw new Error(`Metadata ${e} is still missing.`);return n.useCatalogInsteadId?"CatalogId":n.fieldNameForIdentification}function Ge(e,n,t){const o=te.getScope(e.toLowerCase());return n.map(i=>{typeof i.label=="string"&&(i.label=o(i.label)),i.type==="history"&&(i.onClick=l=>H.openModal(S.MODAL_HISTORY,{primaryKey:l[ln(e)],entity:e}),i.icon="history",i.class="widget-list-cell-history",i.hint="Open the History");const a=i.displayMode;if(a){const l=async c=>{try{const s=c[ae(i)];return[await it(Wi(i,c),s),s]}catch{return[]}};a&&(a==="form"?i.link=c=>{const s=c[ae(i)];return s?Mi(i.entity,s):null}:i.onClick=async c=>{const[s,u]=await l(c);if(!s||!u)return null;switch(i.displayMode){case"modal":return H.openModal(S.MODAL_ENTITY,{entity:s,primaryKey:u});case"inline":return t.activate(s,u,c)}}),i.class="widget-table-cell_link cursor_pointer",typeof i.value!="string"&&(i.value=(c,s)=>s[i.name[1]])}return Ui(i,i.type,i.presentation),A.listConvertCellConfigHandler&&A.listConvertCellConfigHandler(e,i),i})}function Ui(e,n,t){switch(n){case"Decimal":{t==="Money"&&(e.type="money");break}}return e}const Wi=(e,n)=>e.useObjectTypeName?n[e.name[2]]:e.entity?e.entity:null;function qi(e){if(!Array.isArray(A.arrayListCellHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");A.arrayListCellHandlers.push(e)}function Hi(e,n){const t=ae(e);return t?O.utils.getPropFromObject(n,t):null}function zi(e){if(!Array.isArray(A.arrayFieldParamsHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");A.arrayFieldParamsHandlers.push(e)}const Gi={addListCellHandler:qi,getCellModelValue:Hi,addFieldParamsHandler:zi};var cn=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(cn||{});function Yi(){const e=r.ref(null);function n(t){e.value=t}return{activeRow:e,activateRow:n}}function Xi(e,n){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(n)}async function un(e,n){e()&&(await n(),await un(e,n))}function Ki(e,n,t={}){let o=!1;const i=r.ref(""),a=r.computed(()=>l.filter(k=>u(k,i.value))),l=r.reactive([]);let c=0;const s=r.ref(!1);let u=(t==null?void 0:t.filterSearchFn)||((k,_)=>Xi(k,_));function d(){return t.masterEntities?typeof t.masterEntities=="function"?t.masterEntities():t.masterEntities:[]}function f(){const k=E();return typeof k.limit!="number"&&(k.limit=100),k.offset=c,(t.request||le)(e,k).then(I=>(c+=I.length,I))}function p(k,_){var B;return typeof k.Version=="number"?k.Version:(B=l.find(C=>C.Id===_))==null?void 0:B.Version}function w(k,_){const I=l.findIndex(B=>B.Id===k);if(I===-1)throw new Error(`Can't found item with Id ${k}`);l.splice(I,1,_)}function y(k){const _=l.findIndex(I=>I.Id===k);if(_===-1)throw new Error(`Can't found item with Id ${k}`);l.splice(_,1)}async function h(k,_){try{const I=E(),B=p(_,k);delete _.Version,await rt(e,{id:k,values:_,version:B,masterEntities:d()});const C=await le(e,{fields:I.fields||"",id:k});w(k,C)}catch(I){P()(I)}}async function g(k,_={}){try{const I=E(),B=p(_,k);delete _.Version,await Ut(e,{id:k,version:B,masterEntities:d()}),y(k)}catch(I){P()(I)}}async function v(k){try{await jt(e,{values:k,masterEntities:d()}),await $()}catch(_){P()(_)}}let m;async function b(){s.value=!0;try{m!=null&&m.signal&&!m.signal.aborted&&m.abort();let k=m=new AbortController,_=0;const B=E().limit||0;if(i.value&&!B){console.warn("Using textSearch assumes the use of limit.");return}await un(()=>(B>0?_<B:!0)&&!o&&!k.signal.aborted,async()=>{const C=await f();k.signal.aborted||(l.push(...C),_+=C.filter(N=>u(N,i.value)).length,(C.length<B||B===0)&&(o=!0))})}catch(k){P()(k)}s.value=!1}function E(){return typeof n=="function"?n():n}async function $(){try{c=0,o=!1,l.splice(0,l.length),await b()}catch(k){P()(k)}}function T(){if(m)return m.abort();s.value=!1}return{array:l,updateById:h,next:b,reload:$,wait:s,create:v,deleteById:g,textSearch:i,filteredArray:a,abort:T}}function Ji(){function e(){return{organizations:G.organizations,currentContextId:G.contextId,person:G.person,context:G.context,contextType:G.contextType,userId:G.userId}}const n=r.reactive(e());return G.onupdateContext(()=>{Object.assign(n,e())}),n}function Qi(e,n,t){return L().emit("communication:create",{entityName:e,entityCatalogId:n,targetCode:t})}function Zi(e,n,t){return L().emit("communication:read",{entityName:e,entityCatalogId:n,targetCode:t})}function ea(e,n){return L().emit("communication-message:create",{communicationId:e,text:n})}function ta(e){return L().emit("communication-message:read",{communicationId:e})}function na(e){const n=O.Form.getParentForm(),t=r.reactive([]);return n&&n.subscribe(e),e.read=()=>ta(e.id).then(o=>(t.splice(0,t.length,...o),o)),{array:t}}function ra(e,n){e.read=()=>{const o=t();return Promise.resolve().then(()=>{if(!e.name)throw ee.EntityWithoutName(e);return le(e.name,o)}).then(dt).then(i=>(i.hasOwnProperty("Version")&&(e.version=i.Version),e.setValues(i),i)).catch(P())},e.save=()=>{const o=t();return Promise.resolve().then(()=>{if(!e.name)throw ee.EntityWithoutName(e);return rt(e.name,{id:o.id,values:e.changes,version:e.version})}).then(i=>{e.version=i.version}).catch(i=>{throw P()(i),i})};function t(){return typeof n=="function"?n():n}}function Ee(e){if(!e)return r.inject(S.PROVIDE_NAME_METADATA);Q.initEntity(e);const n=r.computed(()=>Q.state[e]);return r.provide(S.PROVIDE_NAME_METADATA,n),r.provide(S.PROVIDE_ENTITY_NAME,e),n}function ct(e,n={}){if(!e)return r.inject(S.PROVIDE_NAME_USAGE_CONTEXT);const t=r.ref(null);return r.provide(S.PROVIDE_NAME_USAGE_CONTEXT,t),{state:t,update:async function(){t.value=await No(e,oa(n||{}))}}}function oa(e){return typeof e=="function"?e():e}function ia(e){if(!e)return r.inject(S.PROVIDE_NAME_ACTIONS);const n=r.ref(!1),t=r.reactive([]),o=r.computed(()=>t.map(l=>zt(e,l))),i={actions:o,update:a};r.provide(S.PROVIDE_NAME_ACTIONS,i),e.router=ie.useRouter();function a(){if(n.value)return;n.value=!0,t.splice(0,t.length);const l=e==null?void 0:e.form;return Wt({masterEntities:e==null?void 0:e.masterEntities,id:l==null?void 0:l.id,entity:l==null?void 0:l.name}).then(c=>t.splice(0,0,...c)).catch(P("error")).finally(()=>n.value=!1)}return{actions:o,update:a,loading:r.readonly(n)}}function aa(e){function n(t){t.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",n)}),r.onUnmounted(()=>{document.removeEventListener("keypress",n)})}function sa(e,n={}){const t=r.reactive([]),o=s=>{const u=r.unref(e);if(s===void 0){t.length===0?u.forEach(a):u.forEach(l);return}i(s)?l(s):a(s)},i=s=>t.includes(s),a=s=>{n.handleSelect&&!n.handleSelect(s)||i(s)||t.push(s)},l=s=>{const u=t.findIndex(d=>d===s);u!==-1&&t.splice(u,1)},c=r.computed(()=>{const s=r.unref(e);return t.length===s.length&&s.length!==0});return[t,o,c,a,l]}function la(e){const n=r.ref(""),t=r.computed(()=>{const o=n.value.toLowerCase();return r.unref(e).filter(i=>n.value.length?Object.values(i).join().toLowerCase().includes(o):!0)});return{search:n,searchArray:t}}class Ue{static async getStartConfig(n,t){return L().emit("wizard:configuration",{process:n,entity:t})}static async startProcess(n,t){return L().emit("wizard:start",{process:n,entity:t})}static async runStep(n,t,o,i,a){return L().emit("wizard:step",{process:n,entity:t,stepName:o,token:i,values:a})}}function ca(e){return e.statusName===j.Completed}function ua(e){return[j.FinalStepWithConfirmation,j.NextStepWithConfirmation].includes(e.statusName)}function da(e){return e.statusName===j.ValidationError}function fa(e){return e.statusName===j.Undefined}function pa(e,n,t){let o=null,i=[];const a=r.ref(!1),l=r.ref(null),c=r.computed(()=>f(i,l.value)),s=r.ref(null),u=r.reactive([]),d=r.computed(()=>u.map(m=>f(i,m)));function f(m,b){return m.find(E=>E.name===b)||null}async function p(m){var b;if(fa(m)){await t.onDisplayDataSet(m);return}if(!(ua(m)&&!await t.onDisplayDataSet(m))){if(da(m))return void t.onValidation(m.validationResults);h(m),await r.nextTick();{const E=((b=f(i,l.value))==null?void 0:b.fields)||[];if([j.FinalStep,j.NextStep,j.FinalStepWithConfirmation,j.NextStepWithConfirmation].includes(m.statusName)&&(!E.length||ma(E,t.presets)))return v(t.presets||{})}ca(m)&&t.onCompleted(m)}}async function w(){try{await y(),await g()}catch(m){P("error")(m)}}function y(){return a.value="Loading process information.",Ue.getStartConfig(n,e).then(m=>(s.value={label:m.processTitle,info:m.processInfo,icon:m.processIcon},i=m.steps.map(b=>{const E=b.frontendEntity.rootObject,$=Object.fromEntries(b.frontendEntity.objectTypes.map(T=>[T.name,T.properties]));return{label:b.title,name:b.stepName,number:b.number,rootObjectName:E,objectTypes:$,fields:$[E],buttonCaption:b.buttonCaption}}))).finally(()=>{a.value=!1})}function h(m){return[j.FinalStepWithConfirmation,j.NextStepWithConfirmation,j.NextStep,j.Completed,j.FinalStep].includes(m.statusName)?(o=m.token,l.value=m.nextStepName):console.log("Saving is not completed:",m),m}function g(){return a.value="Starting process",Ue.startProcess(n,e).then(p).catch(P("error")).finally(()=>{a.value=null})}function v(m={}){const b=l.value;return!o||!b?Promise.reject("Not step or token."):(a.value="Waiting for result...",Ue.runStep(n,e,b,o,m).then(p).then(E=>(u[u.length-1]!==b&&u.push(b),E)).catch(P("error")).finally(()=>{a.value=!1}))}return{initialize:w,loading:a,currentStepConfig:c,currentStepName:l,arrayPassedSteps:d,arrayProcessStepName:u,processInfo:s,next:v}}function ma(e,n){for(let t=0;t<e.length;t++){const o=e[t];if(!O.utils.getPropFromObject(n,o.name))return!1}return!0}function ga(e,n){const t=typeof e=="string"?e:e.name,o=Object.assign({},typeof e=="string"?{}:e.arguments,n||{});return{name:t,arguments:o}}function ha(e){return e.limit||(e.limit=150),e}function dn(e,n={}){const{limit:t}=ha(n),{prefilters:o,order:i}=e;if(!e.entity)throw new Error("-");if(!e.config)throw new Error("-");const a=e.entity,l=e.config,c=e.customFilters||[],s=[l.map(h=>d(h.label)).join(",")],u=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function d(h){h===null&&(h=""),h===void 0&&(h="-");let g=typeof h!="string"?String(h):h;return g=g.replace(/"/g,'""'),g.search(/("|,|\n)/g)>=0&&(g='"'+g+'"'),g}function f(){return le(a,{fields:ot(l).join(" "),limit:t,offset:u.offset,order:i,filter:typeof o=="string"?o:x(o||{}),customFilters:c.map(h=>{var g;return ga(h,(g=n.customFiltersData)==null?void 0:g[typeof h=="string"?h:h.name])})}).then(h=>(u.offset+=t,h))}function p(){const h="data:text/csv;charset=utf-8,"+s.join(`\r
8
+ `),g=encodeURI(h),v=document.createElement("a");v.setAttribute("href",g),v.setAttribute("download",`${a}.csv`),document.body.appendChild(v),v.click()}function w(){u.rejected=!0}async function y(){return f().then(h=>{const g=h.map(v=>l.map(m=>d(Fe(m,v))).join(","));return s.push(...g),u.count=s.length,h.length}).then(h=>{if(h!==t&&(u.finished=!0),h===t&&!u.rejected)return y()})}return{downloadFile:p,reject:w,state:u,start:y}}const xe=new class{constructor(){this.store=r.reactive([])}add(n,t,o={}){const i=ya(o),a=new Ye(n,t,i.timeout,i.children,i.click);return this.store.push(a),i.timeout&&setTimeout(this.remove.bind(this,a.id),i.timeout*1e3),a}remove(n){const t=this.store.findIndex(o=>o.id===n);if(t===-1)return!1;this.store.splice(t,1)}};function ya(e){function n(o){return!!o&&typeof o=="object"}const t={timeout:10,click:()=>null,children:[]};return n(e)?{timeout:e.timeout||t.timeout,click:e.click||t.click,children:e.children||t.children}:t}const Le=class Le{constructor(n,t,o,i,a){this.type=n,this.message=t,this.timeout=o,this.children=i,this.click=a,this.id=Le.cardId++}};Le.cardId=1;let Ye=Le;/*!
9
9
  * jenesius-event-emitter v1.0.2
10
10
  * (c) 2022 Jenesius
11
11
  * @license MIT
12
- */const _t=function(e,n){return e in this.events||(this.events[e]=[]),this.events[e].push(n),this.off.bind(this,e,n)},kt=function(e,n){e in this.events&&this.events[e].forEach(t=>t(n))},Ct=function(e,n){const t=this.events[e];if(!t)return;const o=t.indexOf(n);o!==-1&&t.splice(o,1)},Tt=function(){this.events={}};class J{constructor(){this.events={}}on(n,t){return _t.call(this,n,t)}emit(n,t){return kt.call(this,n,t)}off(n,t){return Ct.call(this,n,t)}cleanEvents(){Tt.call(this)}static on(n,t){return _t.call(J,n,t)}static emit(n,t){return kt.call(J,n,t)}static off(n,t){return Ct.call(J,n,t)}static cleanEvents(){Tt.call(J)}}J.events={};class ha extends J{constructor(n){super(),this.name="Communication",this.read=()=>{},this.id=n}sendMessage(n){return Qi(this.id,n)}static checkAndGenerate(n,t,o){return Ji(n,t,o).then(i=>i.length===0?Ki(n,t,o):i[0])}}function ya(){return L().emit("client:read",{})}class ut extends Error{static ConstContextCannotBeChanged(){return new ut("The current context is set to constant. In order to change it, you need to put Manager into a changeable state.")}}var we,fe;const X=class X extends J{constructor(){super(...arguments);Me(this,we);Me(this,fe);this.isConstContext=!1,this.type="front",this.organizations=[],ke(this,fe,!1)}set language(t){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||X.DEFAULT_LANGUAGE}get contextId(){return Pe(this,we)}set contextId(t){if(this.isConstContext)throw ut.ConstContextCannotBeChanged();ke(this,we,t)}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){ke(this,fe,t),this.emit(X.EVENT_READY_UPDATE,t)}get ready(){return Pe(this,fe)}onReady(t){return this.on(X.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(X.EVENT_CONTEXT_UPDATE,t)}setCurrentContext(t){if(this.contextId===t)return console.warn("[application-manager] The current context has already been installed.");this.contextId=t,localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(t)),this.emit(X.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(o=>o.id===this.contextId)||null:null}async init(){try{const t=await this.loadCustomerData();this.customer=t,this.person=t,this.organizations=t.organizations,this.userId=t.userId,this.restoreCurrentContext(),this.ready=!0}catch(t){P()(t)}}restoreCurrentContext(){var o,i;if(typeof((o=this.customer)==null?void 0:o.constContextId)=="number"||((i=this.customer)==null?void 0:i.constContextId)===null)return this.setCurrentContext(this.customer.constContextId),this.isConstContext=!0;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 ya()}validateContextId(t){var o;try{return((o=this.person)==null?void 0:o.id)==t?!0:!!this.organizations.find(i=>i.id===t)}catch{return!1}}};we=new WeakMap,fe=new WeakMap,X.DEFAULT_LANGUAGE="en",X.EVENT_CONTEXT_UPDATE="event:context-update",X.EVENT_READY_UPDATE="event:ready-update";let Xe=X;function va(e){return L().emit("metadata:read",{entity:e})}const Q=function(){const n=r.reactive({}),t=new Map;function o(c){return n[c]}async function i(c){if(t.has(c)&&await t.get(c),n[c])return o(c);const s=await a(c);return l(c,s),o(c)}function a(c){const s=va(c).finally(()=>{t.delete(c)});return t.set(c,s),s}function l(c,s){n[c]=s}return{state:n,initEntity:i,get:o,loadingFlags:t}}();class wa extends J{on(n,t){return super.on(n,t)}emit(n,t){console.log("[event-bus] emit",n,t),super.emit(n,t)}off(n,t){super.off(n,t)}}class Y{static login(n){return q(A.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...n,AppName:A.applicationName})})}static parseProcessAnswer(n){if(n.statusCode>4)throw new Error(n.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return n}static startRegistrationProcess(n){return Y.requestStepRegistrationProcess("StartRegistration",n)}static confirmPhoneRegistrationProcess(n){return Y.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",n)}static confirmEmailRegistrationProcess(n){return Y.requestStepRegistrationProcess("ConfirmEmailByRegistration",n)}static finishEmailRegistrationProcess(n){return Y.requestStepRegistrationProcess("FinishRegistration",n)}static requestStepRegistrationProcess(n,t){return q(`${A.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)})}static startLoginProcess(n){return Y.requestStepLoginProcess("StartLogin",n)}static loginWithPassword(n){return Y.requestStepLoginProcess("LoginWithPassword",n)}static loginWithOtpCode(n){return Y.requestStepLoginProcess("LoginWithOtpCode",n)}static requestStepLoginProcess(n,t){return q(`${A.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).then(Y.parseLoginProcessAnswer)}static parseLoginProcessAnswer(n){if(n.statusCode>3)throw Error(n.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return n}static startPasswordReset(n,t){return q(`${A.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:t,AppName:n})})}static confirmPhoneNumberByAccessRecovery(n,t,o,i){return q(`${A.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:n,Token:t,Prefix:o,Code:i})})}static confirmEmailByAccessRecovery(n,t,o,i){return q(`${A.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:n,Token:t,Prefix:o,Code:i})})}static finishAccessRecovery(n,t,o,i){return q(`${A.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:n,Token:t,Password:o,ConfirmedPassword:i})})}}class Ea{static readHistoryById(n,t){return q(`/close-api/audits/history/${n}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class ba{static getConfiguration(){return q("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(n){return await q(`/open-api/data/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class _a{static getDictionary(n){if(!n)throw new Error(`Can't get dictionary for ${n}.`);return q(`/open-api/internationalization/language/${n}`)}}class ka{static async upload(n,t){const o=new FormData;return o.append("file",n),q(`/close-api/files?entityName=${t}`,{method:"POST",body:o}).then(i=>(i.filename=n.name,i))}}var dn=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(dn||{}),fn=(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))(fn||{});function Ca(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function x(e){return Object.keys(e).reduce((n,t)=>{const o=e[t];if(Array.isArray(o)){const i=o.map(a=>typeof a=="string"?`'${a}'`:a).join(", ");return o.length&&n.push(`@${t} in (${i})`),n}if(Ca(o)){let i=function(a){var l;return((l=a.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return o.start&&n.push(`@${t} ge ${i(o.start)}`),o.end&&n.push(`@${t} le ${i(o.end)}`),n}return typeof o=="number"||typeof o=="boolean"?(n.push(`@${t} eq ${o}`),n):typeof o=="string"?(o.length!==0&&n.push(`@${t} eq '${o}'`),n):(o===null&&n.push(x.is(t,o)),n)},[]).join(" and ")}function _e(e){return typeof e=="string"?`'${e}'`:`${e}`}x.includes=function(n,t){return`@${n} Contains ${_e(t)}`};x.beginWith=function(n,t){return`@${n} BeginWith ${_e(t)}`};x.notEq=function(n,t){return`@${n} nq ${_e(t)}`};x.eq=function(n,t){return Array.isArray(t)?x.in(n,t):`@${n} eq ${_e(t)}`};x.in=function(n,t){const o=t.map(_e).join(", ");return`@${n} in (${o})`};x.notIn=function(n,t){return!Array.isArray(t)||t.length===0?"":x.and(...t.map(o=>x.notEq(n,o)))};x.and=function(...n){return n.filter(t=>typeof t!="string"||t.trim().length===0?!1:t).map(x.wrap).join(" and ")};x.wrap=function(n){return`(${n})`};x.is=function(n,t){return`@${n} is ${t}`};x.or=function(...n){return n.join(" or ")};function dt(e){return Object.keys(e).reduce((n,t)=>{let o=e[t];const i=t.charAt(0).toUpperCase()+t.slice(1);return typeof o=="object"&&!(o==null||Array.isArray(o))&&(o=dt(o)),n[i]=o,n},{})}var j=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(j||{});function Ta(e){return typeof e!="string"?!1:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}const G=new Xe,ve=new wa;exports.ApplicationStatus=fn;exports.AsyncProcessStatus=Dt;exports.Communication=ha;exports.CoreError=ee;exports.DisplayListRow=ln;exports.EventBus=ve;exports.Filter=x;exports.Manager=G;exports.MetadataStore=Q;exports.ModalListDownload=Yr;exports.ModalVersionHistory=mo;exports.NotificationSystem=xe;exports.OBJECT_TYPE_NAME_FIELD=It;exports.RecordOperation=dn;exports.WidgetAction=zr;exports.WidgetButton=Xn;exports.WidgetFastTable=Hr;exports.WidgetFastTableHeadCell=Ot;exports.WidgetField=wr;exports.WidgetIcon=ye;exports.WidgetImage=ir;exports.WidgetList=vr;exports.WidgetLoader=De;exports.WidgetMultiButton=tr;exports.WidgetResolverEntity=Gr;exports.WidgetSpinner=Ee;exports.WidgetTable=Rt;exports.WidgetTablePanelFilterItem=Ft;exports.asyncProcess=se;exports.authService=Y;exports.billingService=ue;exports.catchUniversal=P;exports.config=Vn;exports.configuration=A;exports.constants=S;exports.convertDDToDMS=xi;exports.convertDMSToDD=$i;exports.convertListConfig=Ge;exports.coreUtils=Hi;exports.debounce=Eo;exports.documentsService=vn;exports.fileService=ka;exports.formatter=pe;exports.getCellName=ae;exports.getCellValue=Fe;exports.getEntityLink=lt;exports.getNamesFromListConfig=ot;exports.getPathForResolveRouter=Pi;exports.getPrimaryFieldNameForEntity=sn;exports.getUnitValue=We;exports.groupArrayByField=yo;exports.historyService=Ea;exports.injectAction=Bt;exports.internationalizationService=_a;exports.invitationService=yn;exports.isUUID=Ta;exports.openService=ba;exports.parseError=nt;exports.parseTextByMarkdown=Di;exports.prettyDate=Ne;exports.prettyDateWithTime=tt;exports.prettyMoney=xt;exports.prettyValueFieldByEntity=qe;exports.request=q;exports.setupListRow=Je;exports.staticLink=Ro;exports.t=te;exports.throttle=bo;exports.universalBatchUpdate=Wt;exports.universalEntityCount=No;exports.universalEntityCreate=Mt;exports.universalEntityDelete=jt;exports.universalEntityRead=le;exports.universalEntityResolve=it;exports.universalEntityUpdate=rt;exports.universalHistoryRead=qt;exports.universalListSettingRead=Pt;exports.universalMetadataFieldTreat=So;exports.universalMetadataListRead=Io;exports.universalToolRead=Ut;exports.useActions=ra;exports.useCommunication=ea;exports.useEnter=oa;exports.useFormEntity=ta;exports.useListActiveRow=zi;exports.useListDownload=un;exports.useListEntity=Yi;exports.useListSearch=aa;exports.useListSelect=ia;exports.useLocalStorage=Nt;exports.useManagerState=Xi;exports.useMetadata=be;exports.useMetadataField=Lt;exports.useSocket=L;exports.useUsageContext=ct;exports.useVisibleItem=Qe;exports.useWizard=da;exports.uuidv4=vo;exports.valuesToUpperCase=dt;exports.wrapToolResponse=Ht;
12
+ */const _t=function(e,n){return e in this.events||(this.events[e]=[]),this.events[e].push(n),this.off.bind(this,e,n)},kt=function(e,n){e in this.events&&this.events[e].forEach(t=>t(n))},Ct=function(e,n){const t=this.events[e];if(!t)return;const o=t.indexOf(n);o!==-1&&t.splice(o,1)},Tt=function(){this.events={}};class J{constructor(){this.events={}}on(n,t){return _t.call(this,n,t)}emit(n,t){return kt.call(this,n,t)}off(n,t){return Ct.call(this,n,t)}cleanEvents(){Tt.call(this)}static on(n,t){return _t.call(J,n,t)}static emit(n,t){return kt.call(J,n,t)}static off(n,t){return Ct.call(J,n,t)}static cleanEvents(){Tt.call(J)}}J.events={};class va extends J{constructor(n){super(),this.name="Communication",this.read=()=>{},this.id=n}sendMessage(n){return ea(this.id,n)}static checkAndGenerate(n,t,o){return Zi(n,t,o).then(i=>i.length===0?Qi(n,t,o):i[0])}}function wa(){return L().emit("client:read",{})}class ut extends Error{static ConstContextCannotBeChanged(){return new ut("The current context is set to constant. In order to change it, you need to put Manager into a changeable state.")}}var we,fe;const X=class X extends J{constructor(){super(...arguments);Me(this,we);Me(this,fe);this.isConstContext=!1,this.type="front",this.organizations=[],ke(this,fe,!1)}set language(t){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||X.DEFAULT_LANGUAGE}get contextId(){return Pe(this,we)}set contextId(t){if(this.isConstContext)throw ut.ConstContextCannotBeChanged();ke(this,we,t)}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){ke(this,fe,t),this.emit(X.EVENT_READY_UPDATE,t)}get ready(){return Pe(this,fe)}onReady(t){return this.on(X.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(X.EVENT_CONTEXT_UPDATE,t)}setCurrentContext(t){if(this.contextId===t)return console.warn("[application-manager] The current context has already been installed.");this.contextId=t,localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(t)),this.emit(X.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(o=>o.id===this.contextId)||null:null}async init(){try{const t=await this.loadCustomerData();this.customer=t,this.person=t,this.organizations=t.organizations,this.userId=t.userId,this.restoreCurrentContext(),this.ready=!0}catch(t){P()(t)}}restoreCurrentContext(){var o,i;if(typeof((o=this.customer)==null?void 0:o.constContextId)=="number"||((i=this.customer)==null?void 0:i.constContextId)===null)return this.setCurrentContext(this.customer.constContextId),this.isConstContext=!0;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 wa()}validateContextId(t){var o;try{return((o=this.person)==null?void 0:o.id)==t?!0:!!this.organizations.find(i=>i.id===t)}catch{return!1}}};we=new WeakMap,fe=new WeakMap,X.DEFAULT_LANGUAGE="en",X.EVENT_CONTEXT_UPDATE="event:context-update",X.EVENT_READY_UPDATE="event:ready-update";let Xe=X;function ba(e){return L().emit("metadata:read",{entity:e})}const Q=function(){const n=r.reactive({}),t=new Map;function o(c){return n[c]}async function i(c){if(t.has(c)&&await t.get(c),n[c])return o(c);const s=await a(c);return l(c,s),o(c)}function a(c){const s=ba(c).finally(()=>{t.delete(c)});return t.set(c,s),s}function l(c,s){n[c]=s}return{state:n,initEntity:i,get:o,loadingFlags:t}}();class Ea extends J{on(n,t){return super.on(n,t)}emit(n,t){console.log("[event-bus] emit",n,t),super.emit(n,t)}off(n,t){super.off(n,t)}}class Y{static login(n){return q(A.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...n,AppName:A.applicationName})})}static parseProcessAnswer(n){if(n.statusCode>4)throw new Error(n.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return n}static startRegistrationProcess(n){return Y.requestStepRegistrationProcess("StartRegistration",n)}static confirmPhoneRegistrationProcess(n){return Y.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",n)}static confirmEmailRegistrationProcess(n){return Y.requestStepRegistrationProcess("ConfirmEmailByRegistration",n)}static finishEmailRegistrationProcess(n){return Y.requestStepRegistrationProcess("FinishRegistration",n)}static requestStepRegistrationProcess(n,t){return q(`${A.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)})}static startLoginProcess(n){return Y.requestStepLoginProcess("StartLogin",n)}static loginWithPassword(n){return Y.requestStepLoginProcess("LoginWithPassword",n)}static loginWithOtpCode(n){return Y.requestStepLoginProcess("LoginWithOtpCode",n)}static requestStepLoginProcess(n,t){return q(`${A.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).then(Y.parseLoginProcessAnswer)}static parseLoginProcessAnswer(n){if(n.statusCode>3)throw Error(n.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return n}static startPasswordReset(n,t){return q(`${A.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:t,AppName:n})})}static confirmPhoneNumberByAccessRecovery(n,t,o,i){return q(`${A.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:n,Token:t,Prefix:o,Code:i})})}static confirmEmailByAccessRecovery(n,t,o,i){return q(`${A.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:n,Token:t,Prefix:o,Code:i})})}static finishAccessRecovery(n,t,o,i){return q(`${A.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:n,Token:t,Password:o,ConfirmedPassword:i})})}}class _a{static readHistoryById(n,t){return q(`/close-api/audits/history/${n}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class ka{static getConfiguration(){return q("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(n){return await q(`/open-api/data/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Ca{static getDictionary(n){if(!n)throw new Error(`Can't get dictionary for ${n}.`);return q(`/open-api/internationalization/language/${n}`)}}class Ta{static async upload(n,t){const o=new FormData;return o.append("file",n),q(`/close-api/files?entityName=${t}`,{method:"POST",body:o}).then(i=>(i.filename=n.name,i))}}var fn=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(fn||{}),pn=(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))(pn||{});function Sa(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function x(e){return Object.keys(e).reduce((n,t)=>{const o=e[t];if(Array.isArray(o)){const i=o.map(a=>typeof a=="string"?`'${a}'`:a).join(", ");return o.length&&n.push(`@${t} in (${i})`),n}if(Sa(o)){let i=function(a){var l;return((l=a.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return o.start&&n.push(`@${t} ge ${i(o.start)}`),o.end&&n.push(`@${t} le ${i(o.end)}`),n}return typeof o=="number"||typeof o=="boolean"?(n.push(`@${t} eq ${o}`),n):typeof o=="string"?(o.length!==0&&n.push(`@${t} eq '${o}'`),n):(o===null&&n.push(x.is(t,o)),n)},[]).join(" and ")}function _e(e){return typeof e=="string"?`'${e}'`:`${e}`}x.includes=function(n,t){return`@${n} Contains ${_e(t)}`};x.beginWith=function(n,t){return`@${n} BeginWith ${_e(t)}`};x.notEq=function(n,t){return`@${n} nq ${_e(t)}`};x.eq=function(n,t){return Array.isArray(t)?x.in(n,t):`@${n} eq ${_e(t)}`};x.in=function(n,t){const o=t.map(_e).join(", ");return`@${n} in (${o})`};x.notIn=function(n,t){return!Array.isArray(t)||t.length===0?"":x.and(...t.map(o=>x.notEq(n,o)))};x.and=function(...n){return n.filter(t=>typeof t!="string"||t.trim().length===0?!1:t).map(x.wrap).join(" and ")};x.wrap=function(n){return`(${n})`};x.is=function(n,t){return`@${n} is ${t}`};x.or=function(...n){return n.join(" or ")};function dt(e){return Object.keys(e).reduce((n,t)=>{let o=e[t];const i=t.charAt(0).toUpperCase()+t.slice(1);return typeof o=="object"&&!(o==null||Array.isArray(o))&&(o=dt(o)),n[i]=o,n},{})}var j=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(j||{});function Aa(e){return typeof e!="string"?!1:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}const G=new Xe,ve=new Ea;exports.ApplicationStatus=pn;exports.AsyncProcessStatus=$t;exports.Communication=va;exports.CoreError=ee;exports.DisplayListRow=cn;exports.EventBus=ve;exports.Filter=x;exports.Manager=G;exports.MetadataStore=Q;exports.ModalListDownload=Xr;exports.ModalVersionHistory=go;exports.NotificationSystem=xe;exports.OBJECT_TYPE_NAME_FIELD=It;exports.RecordOperation=fn;exports.WidgetAction=Gr;exports.WidgetButton=Kn;exports.WidgetFastTable=zr;exports.WidgetFastTableHeadCell=Ot;exports.WidgetField=br;exports.WidgetIcon=ye;exports.WidgetImage=ar;exports.WidgetList=wr;exports.WidgetLoader=De;exports.WidgetMultiButton=nr;exports.WidgetResolverEntity=Yr;exports.WidgetSpinner=be;exports.WidgetTable=Rt;exports.WidgetTablePanelFilterItem=Ft;exports.asyncProcess=se;exports.authService=Y;exports.billingService=ue;exports.catchUniversal=P;exports.config=Pn;exports.configuration=A;exports.constants=S;exports.convertDDToDMS=Pi;exports.convertDMSToDD=Vi;exports.convertListConfig=Ge;exports.coreUtils=Gi;exports.debounce=_o;exports.documentsService=wn;exports.downloadDocumentBuilderFile=ho;exports.fileService=Ta;exports.formatter=pe;exports.getCellName=ae;exports.getCellValue=Fe;exports.getEntityLink=lt;exports.getNamesFromListConfig=ot;exports.getPathForResolveRouter=ji;exports.getPrimaryFieldNameForEntity=ln;exports.getUnitValue=We;exports.groupArrayByField=wo;exports.historyService=_a;exports.injectAction=Bt;exports.internationalizationService=Ca;exports.invitationService=vn;exports.isUUID=Aa;exports.openBlobFile=Dt;exports.openService=ka;exports.parseError=nt;exports.parseTextByMarkdown=xi;exports.prettyDate=Ne;exports.prettyDateWithTime=tt;exports.prettyMoney=Vt;exports.prettyValueFieldByEntity=qe;exports.request=q;exports.setupListRow=Je;exports.staticLink=Oo;exports.t=te;exports.throttle=ko;exports.universalBatchUpdate=qt;exports.universalEntityCount=Lo;exports.universalEntityCreate=jt;exports.universalEntityDelete=Ut;exports.universalEntityRead=le;exports.universalEntityResolve=it;exports.universalEntityUpdate=rt;exports.universalHistoryRead=Ht;exports.universalListSettingRead=Mt;exports.universalMetadataFieldTreat=Io;exports.universalMetadataListRead=Ro;exports.universalToolRead=Wt;exports.useActions=ia;exports.useCommunication=na;exports.useEnter=aa;exports.useFormEntity=ra;exports.useListActiveRow=Yi;exports.useListDownload=dn;exports.useListEntity=Ki;exports.useListSearch=la;exports.useListSelect=sa;exports.useLocalStorage=Nt;exports.useManagerState=Ji;exports.useMetadata=Ee;exports.useMetadataField=Lt;exports.useSocket=L;exports.useUsageContext=ct;exports.useVisibleItem=Qe;exports.useWizard=pa;exports.uuidv4=bo;exports.valuesToUpperCase=dt;exports.wrapToolResponse=zt;
13
13
  //# sourceMappingURL=eservices-core.cjs.js.map