eservices-core 1.3.214 → 1.3.216

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}.flex{display:flex}.flex_column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.flex_grow{flex-grow:1}.flex-align_center{align-items:center}.grid{display:grid}.grid-center{display:grid;place-content:center}.link{text-decoration:var(--link-decoration);color:var(--link-color)}.link_hover-underline:hover,.link_hover_underline:hover{text-decoration:underline}.link_full{position:absolute;height:100%;width:100%;left:0;top:0}.text_sm{font-weight:400;font-size:12px;line-height:16px}.text_md{font-size:14px;line-height:20px}.text_lg{font-size:16px;line-height:24px}.text_size_xxl{font-size:18px;line-height:25px}.text_bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_center{text-align:center}.text_size_sm{font-size:12px;line-height:130%}.text_size_md{font-size:14px;line-height:140%}.text_error{color:red}.text_overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.title_sm{font-weight:600;font-size:16px;line-height:24px}.title_md{font-weight:600;font-size:24px;line-height:32px}.title_lg{font-weight:700;font-size:32px;line-height:48px}.title_xxl,.title_xl{font-weight:700;font-size:48px;line-height:64px}.cursor_pointer{cursor:pointer}.cursor_default{cursor:default}button{outline:none;-webkit-user-select:none;user-select:none;transition:background-color .2s}.button{display:flex;align-items:center;justify-content:center;outline:none}.button_main{background-color:var(--button-background);color:var(--button-color)}.button_main:focus{background-color:var(--button-background-active)}.button_main:active{background-color:var(--button-background-active)}.button_white{background-color:var(--white);color:var(--main)}.button_sm{height:30px;width:130px}.button_shadow{box-shadow:0 2px 4px #00000040}.button_lg{font-weight:600;font-size:16px;line-height:24px;padding:12px 0;height:50px;width:200px}.button_disabled{background-color:var(--gray-1)}.button_resolve{background-color:var(--main);color:var(--white);border-radius:2px}.button_reject{border:1px solid var(--color-dark);border-radius:2px}.button_md{height:30px;padding:0 10px;min-width:80px}.button_disabled{background-color:var(--button-disabled-background-color);cursor:pointer!important}.color_main,.color__text_main{color:var(--main)}.color__text_black{color:var(--black-1)}.color__text_gray{color:var(--text-gray)}.color__text_red,.color_red{color:var(--red)}.color__text_white{color:var(--white)}.background_orange{background-color:var(--orange)}.background_red{background-color:var(--red)}.color_dark{color:var(--dark)}.color_light{color:var(--light)}.move-vertical-enter-active,.move-vertical-leave-active{transition:transform .5s ease}.move-vertical-enter-from,.move-vertical-leave-to{transform:translateY(-10px)}.move-horizontal-enter-active,.move-horizontal-leave-active{transition:transform .5s}.move-horizontal-enter-from,.move-horizontal-leave-to{transform:translate(-40px)}.modal-vertical-enter-active,.modal-vertical-leave-active,.modal-default{transition:transform var(--medium)}.modal-vertical-enter-active .modal-default,.modal-vertical-leave-active .modal-default{transform:translateY(-100px)}.move-vertical-fast-enter-active,.move-vertical-fast-leave-active{transition:transform var(--fast) ease}.move-vertical-fast-enter-from,.move-vertical-fast-leave-to{transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:transform var(--fast) ease,opacity var(--fast)}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(20px);opacity:0}.opacity-enter-active,.opacity-leave-active{transition:opacity var(--fast) ease}.opacity-enter-from,.opacity-leave-to{opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute}.modal-default{background-color:var(--white);position:relative;z-index:1;width:auto;background:var(--white);border-radius:var(--border-radius)}.modal-default__head{background-color:var(--black-1);text-align:center;padding:5px 0;border-radius:6px 6px 0 0}.modal-default__body{gap:20px;padding:0 15px}.modal-default__foot{padding:30px 0;display:flex;justify-content:center}.hint-tooltip{display:block;z-index:222;margin:auto;pointer-events:none;box-shadow:0 0 0 9999px #00000080}.tooltip-help-circle-in,.tooltip-help-circle-out{border-radius:50%}.tooltip-help-undefined{border-radius:50px}.tooltip-card{position:fixed;z-index:315;display:flex;flex-direction:column;width:480px;height:fit-content;margin:auto;border-radius:10px;background-color:var(--hint-background);cursor:default}.tooltip-card__foot{display:flex;justify-content:space-between;align-items:center;background-color:var(--hint-background-navigation);border-radius:10px;padding:20px}.tooltip-card__foot-current{font-weight:600;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px 20px 10px}.tooltip-card__body-title{font-weight:700;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body-text{font-size:16px;line-height:24px;color:var(--white)}.tooltip-card__foot-button_back{background-color:var(--main-1)}.tooltip-card__foot-button_next{background-color:var(--hint)}.tooltip-card__body-close{position:absolute;right:22px;top:12px;width:20px;height:16px;opacity:.3;cursor:pointer}.tooltip-card__body-close:hover{opacity:1}.tooltip-card__body-close:before,.tooltip-card__body-close:after{position:absolute;left:15px;content:" ";height:21px;width:2px;background-color:#fff}.tooltip-card__body-close:before{transform:rotate(45deg)}.tooltip-card__body-close:after{transform:rotate(-45deg)}.tooltip-card-container-wrap{pointer-events:none;position:absolute;left:0;top:0;z-index:123132;height:100%;width:100%}.tooltip-card-container-wrap>div{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.tester-box-tooltip{pointer-events:all}.position_relative{position:relative}.position_absolute{position:absolute}.gap_5{gap:5px}.gap_10{gap:10px}.gap_15{gap:15px}.gap_20{gap:20px}.margin-0,.margin_0{margin:0}.widget-input{background-color:var(--input-background);border:var(--input-border);border-radius:var(--input-border-radius);color:var(--input-color)}.widget-input:disabled{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.widget-input[error=true]{border:var(--input-border-error)}.widget-input::placeholder{color:var(--input-placeholder-color)}.widget-input:disabled::placeholder{color:var(--input-placeholder-color-disabled)}.input_error{border:1px solid red!important}.input_size_md{height:var(--input-height)}.input-title{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.widget-table{border-collapse:collapse}.widget-table_mini p{margin:0}.list-cell-link>a{position:absolute;left:0;top:0;z-index:1;height:100%;width:100%;cursor:pointer}.list-cell-link>p{font-weight:500}.widget-table__cell{padding:0 20px;font-weight:400;font-size:14px;line-height:19px;color:#4f4f4f}.widget-table-cell_use{cursor:pointer}.widget-table-cell_select{width:min-content}.table-cell-toggle{--border-color: black;position:relative;display:grid;place-content:center;border:1px solid var(--border-color);height:15px;aspect-ratio:1 / 1;border-radius:50%}.table-cell-toggle_active:after{content:"";border-radius:50%;background-color:var(--border-color);height:9px;aspect-ratio:1/1}.widget-table-cell_number{text-align:right}.overflow_auto{overflow:auto}.overflow_hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.padding_0{padding:0}.padding_15{padding:15px}.padding_20{padding:20px}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-primary{color:var(--primary)}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-flex-align-center{align-items:center}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.widget-table__head-cell[data-v-498c4f00]{padding:18px;text-align:start}.widget-table__head-label[data-v-498c4f00]{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-cf143196]{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-cf143196]{padding:6px 11px;transition:.1s;cursor:pointer}.widget-filter-enum-item[data-v-cf143196]: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-9db5d417]{display:flex;gap:4px}.widget-head-cell-order[data-v-9db5d417]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-label[data-v-9db5d417]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-9db5d417]{padding:7px}.widget-head-cell-order-icon[data-v-9db5d417]{transition:.1s;height:18px;width:18px}.widget-head-cell-order-icon_desc[data-v-9db5d417]{transform:rotate(180deg)}.widget-filter-item-container[data-v-5b9128bc]{position:relative}.widget-filter-item-arrow[data-v-5b9128bc]{transform:rotate(180deg)}.widget-filter-item-label_active[data-v-5b9128bc]{font-weight:700}.widget-filter-item[data-v-5b9128bc]{display:grid;grid-template-columns:max-content max-content;align-items:center;cursor:pointer;padding:0 10px;color:#fff}.widget-filter-item-label[data-v-5b9128bc]{-webkit-user-select:none;user-select:none;padding:4px 2px 4px 8px}.widget-filter-item-popup[data-v-5b9128bc]{position:absolute;z-index:2;inset-block-start:100%;inset-inline-end:0}.widget-filter-item-arrow[data-v-5b9128bc]{transition:.2s}.widget-table-panel-filter[data-v-f1534314]{justify-content:end;background-color:var(--color-primary)}.widget-fast-table-button-reload-icon[data-v-81e18cd4]{font-size:18px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('*{--extra-fast:.1s;--fast:.2s;--medium:.3s;box-sizing:border-box;--primary: #3949ab }html,body,#app{height:100%}body{margin:0}ul{text-align:left}.flex{display:flex}.flex_column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.flex_grow{flex-grow:1}.flex-align_center{align-items:center}.grid{display:grid}.grid-center{display:grid;place-content:center}.link{text-decoration:var(--link-decoration);color:var(--link-color)}.link_hover-underline:hover,.link_hover_underline:hover{text-decoration:underline}.link_full{position:absolute;height:100%;width:100%;left:0;top:0}.text_sm{font-weight:400;font-size:12px;line-height:16px}.text_md{font-size:14px;line-height:20px}.text_lg{font-size:16px;line-height:24px}.text_size_xxl{font-size:18px;line-height:25px}.text_bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_center{text-align:center}.text_size_sm{font-size:12px;line-height:130%}.text_size_md{font-size:14px;line-height:140%}.text_error{color:red}.text_overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.title_sm{font-weight:600;font-size:16px;line-height:24px}.title_md{font-weight:600;font-size:24px;line-height:32px}.title_lg{font-weight:700;font-size:32px;line-height:48px}.title_xxl,.title_xl{font-weight:700;font-size:48px;line-height:64px}.cursor_pointer{cursor:pointer}.cursor_default{cursor:default}button{outline:none;-webkit-user-select:none;user-select:none;transition:background-color .2s}.button{display:flex;align-items:center;justify-content:center;outline:none}.button_main{background-color:var(--button-background);color:var(--button-color)}.button_main:focus{background-color:var(--button-background-active)}.button_main:active{background-color:var(--button-background-active)}.button_white{background-color:var(--white);color:var(--main)}.button_sm{height:30px;width:130px}.button_shadow{box-shadow:0 2px 4px #00000040}.button_lg{font-weight:600;font-size:16px;line-height:24px;padding:12px 0;height:50px;width:200px}.button_disabled{background-color:var(--gray-1)}.button_resolve{background-color:var(--main);color:var(--white);border-radius:2px}.button_reject{border:1px solid var(--color-dark);border-radius:2px}.button_md{height:30px;padding:0 10px;min-width:80px}.button_disabled{background-color:var(--button-disabled-background-color);cursor:pointer!important}.color_main,.color__text_main{color:var(--main)}.color__text_black{color:var(--black-1)}.color__text_gray{color:var(--text-gray)}.color__text_red,.color_red{color:var(--red)}.color__text_white{color:var(--white)}.background_orange{background-color:var(--orange)}.background_red{background-color:var(--red)}.color_dark{color:var(--dark)}.color_light{color:var(--light)}.move-vertical-enter-active,.move-vertical-leave-active{transition:transform .5s ease}.move-vertical-enter-from,.move-vertical-leave-to{transform:translateY(-10px)}.move-horizontal-enter-active,.move-horizontal-leave-active{transition:transform .5s}.move-horizontal-enter-from,.move-horizontal-leave-to{transform:translate(-40px)}.modal-vertical-enter-active,.modal-vertical-leave-active,.modal-default{transition:transform var(--medium)}.modal-vertical-enter-active .modal-default,.modal-vertical-leave-active .modal-default{transform:translateY(-100px)}.move-vertical-fast-enter-active,.move-vertical-fast-leave-active{transition:transform var(--fast) ease}.move-vertical-fast-enter-from,.move-vertical-fast-leave-to{transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:transform var(--fast) ease,opacity var(--fast)}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(20px);opacity:0}.opacity-enter-active,.opacity-leave-active{transition:opacity var(--fast) ease}.opacity-enter-from,.opacity-leave-to{opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute}.modal-default{background-color:var(--white);position:relative;z-index:1;width:auto;background:var(--white);border-radius:var(--border-radius)}.modal-default__head{background-color:var(--black-1);text-align:center;padding:5px 0;border-radius:6px 6px 0 0}.modal-default__body{gap:20px;padding:0 15px}.modal-default__foot{padding:30px 0;display:flex;justify-content:center}.hint-tooltip{display:block;z-index:222;margin:auto;pointer-events:none;box-shadow:0 0 0 9999px #00000080}.tooltip-help-circle-in,.tooltip-help-circle-out{border-radius:50%}.tooltip-help-undefined{border-radius:50px}.tooltip-card{position:fixed;z-index:315;display:flex;flex-direction:column;width:480px;height:fit-content;margin:auto;border-radius:10px;background-color:var(--hint-background);cursor:default}.tooltip-card__foot{display:flex;justify-content:space-between;align-items:center;background-color:var(--hint-background-navigation);border-radius:10px;padding:20px}.tooltip-card__foot-current{font-weight:600;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px 20px 10px}.tooltip-card__body-title{font-weight:700;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body-text{font-size:16px;line-height:24px;color:var(--white)}.tooltip-card__foot-button_back{background-color:var(--main-1)}.tooltip-card__foot-button_next{background-color:var(--hint)}.tooltip-card__body-close{position:absolute;right:22px;top:12px;width:20px;height:16px;opacity:.3;cursor:pointer}.tooltip-card__body-close:hover{opacity:1}.tooltip-card__body-close:before,.tooltip-card__body-close:after{position:absolute;left:15px;content:" ";height:21px;width:2px;background-color:#fff}.tooltip-card__body-close:before{transform:rotate(45deg)}.tooltip-card__body-close:after{transform:rotate(-45deg)}.tooltip-card-container-wrap{pointer-events:none;position:absolute;left:0;top:0;z-index:123132;height:100%;width:100%}.tooltip-card-container-wrap>div{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.tester-box-tooltip{pointer-events:all}.position_relative{position:relative}.position_absolute{position:absolute}.gap_5{gap:5px}.gap_10{gap:10px}.gap_15{gap:15px}.gap_20{gap:20px}.margin-0,.margin_0{margin:0}.widget-input{background-color:var(--input-background);border:var(--input-border);border-radius:var(--input-border-radius);color:var(--input-color)}.widget-input:disabled{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.widget-input[error=true]{border:var(--input-border-error)}.widget-input::placeholder{color:var(--input-placeholder-color)}.widget-input:disabled::placeholder{color:var(--input-placeholder-color-disabled)}.input_error{border:1px solid red!important}.input_size_md{height:var(--input-height)}.input-title{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.widget-table{border-collapse:collapse}.widget-table_mini p{margin:0}.list-cell-link>a{position:absolute;left:0;top:0;z-index:1;height:100%;width:100%;cursor:pointer}.list-cell-link>p{font-weight:500}.widget-table__cell{padding:0 20px;font-weight:400;font-size:14px;line-height:19px;color:#4f4f4f}.widget-table-cell_use{cursor:pointer}.widget-table-cell_select{width:min-content}.table-cell-toggle{--border-color: black;position:relative;display:grid;place-content:center;border:1px solid var(--border-color);height:15px;aspect-ratio:1 / 1;border-radius:50%}.table-cell-toggle_active:after{content:"";border-radius:50%;background-color:var(--border-color);height:9px;aspect-ratio:1/1}.widget-table-cell_number{text-align:right}.overflow_auto{overflow:auto}.overflow_hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.padding_0{padding:0}.padding_15{padding:15px}.padding_20{padding:20px}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-primary{color:var(--primary)}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-flex-align-center{align-items:center}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.widget-table__head-cell[data-v-498c4f00]{padding:18px;text-align:start}.widget-table__head-label[data-v-498c4f00]{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-cf143196]{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-cf143196]{padding:6px 11px;transition:.1s;cursor:pointer}.widget-filter-enum-item[data-v-cf143196]: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-9db5d417]{display:flex;gap:4px}.widget-head-cell-order[data-v-9db5d417]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-label[data-v-9db5d417]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-9db5d417]{padding:7px}.widget-head-cell-order-icon[data-v-9db5d417]{transition:.1s;height:18px;width:18px}.widget-head-cell-order-icon_desc[data-v-9db5d417]{transform:rotate(180deg)}.widget-filter-item-container[data-v-5b9128bc]{position:relative}.widget-filter-item-arrow[data-v-5b9128bc]{transform:rotate(180deg)}.widget-filter-item-label_active[data-v-5b9128bc]{font-weight:700}.widget-filter-item[data-v-5b9128bc]{display:grid;grid-template-columns:max-content max-content;align-items:center;cursor:pointer;padding:0 10px;color:#fff}.widget-filter-item-label[data-v-5b9128bc]{-webkit-user-select:none;user-select:none;padding:4px 2px 4px 8px}.widget-filter-item-popup[data-v-5b9128bc]{position:absolute;z-index:2;inset-block-start:100%;inset-inline-end:0}.widget-filter-item-arrow[data-v-5b9128bc]{transition:.2s}.widget-table-panel-filter[data-v-f1534314]{justify-content:end;background-color:var(--color-primary)}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  "use strict";var et=e=>{throw TypeError(e)};var tt=(e,n,t)=>n.has(e)||et("Cannot "+t);var nt=(e,n,t)=>(tt(e,n,"read from private field"),t?t.call(e):n.get(e)),rt=(e,n,t)=>n.has(e)?et("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),$e=(e,n,t,o)=>(tt(e,n,"write to private field"),o?o.call(e,t):n.set(e,t),t);/*!
3
- * eservices-core v1.3.214
3
+ * eservices-core v1.3.216
4
4
  * (c) 2024 ESERVICES
5
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),Me=require("vue-router"),D=require("jenesius-vue-form"),Zt=require("date-and-time"),Se=require("debug"),q=require("jenesius-vue-modal"),N=class N extends Error{constructor(n,t=null){super(),this.message=n,this.details=t,this.id=N.ID++}static ParentFormNotFound(){return new N("Can't found parent form.")}static UndefinedNameOfCompositeFormController(n){return new N("Composite object name is undefined",n)}static EntityWithoutName(n){return new N("'Entity doesn't have a name",n)}static NotResolvedNameEventEmitter(n){return new N(`'${n}' is not a valid Event emitter name`)}static FormIsNotValidated(n){return new N("Form is not validated",n)}static ListWorkerIsRunningOrEnd(n){return new N("List data request is running or already done",n)}static ObjectIdNotNumber(n){return new N(`${n} (id) is not a number`)}static UndefinedErrorId(n,t){return N.ApiNotAvailable()}static ApiError(n){return new N("Request error",n)}static ApiNotAvailable(){return new N(`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?N.ApiNotAvailable():new N(n||"Authorization Error",t)}static ApiResponseParseFailed(){return N.ApiNotAvailable()}static MissingIdInValuesEntity(n){return new N("Object doesn't have id",n)}static ObjectWithIdNotFound(n,t){return new N(`Can't find object with id: ${n}`,t)}static ObjectWithoutConnectToPresentArray(n,t){return new N("Object is not found.",{object:n,array:t})}static EntityWithoutId(n){return new N("Entity doesn't have id.",n)}static NotFoundedTableIndex(n,t){return new N(`Can't find the element with tableIndex ${n}`,t)}static UndefinedError(n,t=[]){return new N(n,t)}static TableArrayAlreadyIncludeProvidedIndexValue(n,t,o){return new N(`Array already includes the element with value ${n}`,{array:t,table:o})}static MetadataEntityIsNotAvailable(n){return new N(`Metadata for the ${n} is not currently available.`)}static RequestTookToLong(){return new N("The request took too long to complete. Try again later.")}};N.ID=0;let ee=N;const en="Please try again later or submit a feedback if problem doesn't go.";function tn(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return en}})}function le(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=>tn(t).then(o=>{if(!t.ok)throw o;return o}))}class nn{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 nn;class rn{static invite(n,t,o){return le("/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 le("/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 le("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:n,version:t,mark:!1})})}}class on{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 se{static url(){return"close-api/billing"}static getBillingMetadata(n){return fetch(`/${se.url()}/calculator/${n}`)}static calculate(n,t){return le(`/${se.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 le(`/${se.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:n,returnURL:t})})}static applyOnlinePayment(n){return le(`/${se.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:n})})}}const an={class:"widget-table__head-cell"},sn={class:"widget-table__head-label margin_0 text_overflow"},yt=r.defineComponent({__name:"widget-table-head-cell",props:{label:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("th",an,[r.createElementVNode("span",sn,r.toDisplayString(n.label),1)]))}}),ln={class:"widget-table__head"},cn=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return r.computed(()=>I.componentTableHeadCell||yt),(n,t)=>(r.openBlock(),r.createElementBlock("tr",ln,[(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))]))}}),j=(e,n)=>{const t=e.__vccOpts||e;for(const[o,i]of n)t[o]=i;return t},un=j(cn,[["__scopeId","data-v-498c4f00"]]);function je(e){return Array.isArray(e)?je(e[0]):typeof e!="string"?null:e}function de(e){return je(e.name)}function fn(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 dn(e,n){return fn(e).forEach(o=>{e=e.replace(new RegExp("\\$\\{"+o+"}","g"),D.utils.getPropFromObject(n,o))}),e}function Fe(e){return n=>typeof n=="string"||typeof n=="number"?`${n} ${e}`:""}function Ie(e,n){const t=de(e);if(typeof e.value=="string")return dn(e.value,n);let o=t?D.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=Fe(e.unitValue)(o)),e.unit&&(o=Fe(e.unit)(o)),e.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=_e(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=Tt(typeof o=="string"?o:null);break}case"money":{o=At(o);break}case"DateTime":{o=_e(typeof o=="string"?o:null,e.format||I.dateTimeFormat);break}}return e.formatter&&(o=ue(e.formatter).exec(o,n)),typeof o=="boolean"&&(o=o?"✓":"—"),o}const pn=1,gn=5e3,mn="static-folder",wt="request-error",bt="Distinguisher",A={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",MODAL_LIST_DOWNLOAD:"list-download",MODAL_LIST_SETTINGS:"list-settings",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:bt};function Ne(e){return[A.CORE_DEBUG_LABEL,e].join(":")}const hn={class:"widget-filter-text flex gap_20"},vn=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,u)=>{const s=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",hn,[r.createVNode(r.unref(D.FormField),{type:"text",modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=c=>i.value=c)},null,8,["modelValue"]),r.createVNode(s,{onClick:a,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(te)("Apply")),1)]),_:1})])}}}),yn=j(vn,[["__scopeId","data-v-800b3803"]]),wn={class:"widget-filter-enum"},bn=r.defineComponent({__name:"widget-filter-entity",props:{values:{},fieldMetadata:{}},emits:["update:values","readProcess"],setup(e,{emit:n}){const t=e,o=r.ref([]),i=Oe(t.fieldMetadata.entity),a=c=>(t.values||[]).includes(c),l=n;function u(c){const f=t.values||[];return f.includes(c)?l("update:values",f.filter(p=>p!==c)):l("update:values",[...f,c])}async function s(){var p;if(!((p=t.fieldMetadata)!=null&&p.entity)||!i.value)return;const c=i.value.fieldNameForLabel,f=i.value.fieldNameForIdentification;l("readProcess","start"),o.value=await oe(t.fieldMetadata.entity,{fields:[c,f].join(" "),order:[c,"asc"]}).then(d=>(l("readProcess","end"),d.map(v=>({label:v[c],value:v[f]}))))}return r.watch(()=>i.value,s,{immediate:!0}),(c,f)=>(r.openBlock(),r.createElementBlock("div",wn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,p=>(r.openBlock(),r.createBlock(r.unref(D.FormField),{class:"widget-filter-enum-item",key:p.value,onClick:()=>u(p.value),type:"single-checkbox","model-value":a(p.value),label:p.label},null,8,["onClick","model-value","label"]))),128))]))}}),En=j(bn,[["__scopeId","data-v-cf143196"]]),I={getEntityLink(e,n){return`/forms/${e}/${n}`},iconHandlerText(){return""},iconTag:"i",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",tableFilterEntityBind:{String:yn,Entity:En}};function kn(e){for(let n in e)I[n]=e[n]}const _n={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(I.iconTag,{class:I.iconHandler?I.iconHandler(t):`icon icon-${t}`},I.iconHandlerText(t))}},pe=j(_n,[["__scopeId","data-v-8a72b45f"]]),Cn=Se(Ne("setup-list-row"));function Tn(e,n){const t=e.config.map(o=>An(o,e,n));return r.h("tr",{class:"widget-table__row widget-table-row"},t)}function An(e,n,t){const o=n.values;let i=Ie(e,o);const a={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function l(f){a.onClick.push(()=>f(o,e,t))}function u(f){Array.isArray(f)?a.class.push(...f):a.class.push(f)}const s=[],c=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(u(`widget-table-cell_${e.type}`),e.type){case"multi-select":{c.push(r.h(D.FormField,{type:"single-checkbox",modelValue:n.selected})),l(ot.bind(null,t,!0));break}case"select":{c.push(r.h(D.FormField,{type:"single-radio",modelValue:n.selected})),l(ot.bind(null,t,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const f=e.link(o);if(f){const p=r.h(Me.RouterLink,{to:f});c.push(p),u("widget-table-cell_link")}}catch(f){Cn("Can't add router link",f)}if(e.href&&(c.push(r.h("a",{href:e.href(o),target:"_blank"})),u("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&c.push(r.h("p",{class:"widget-list-cell-text"},i)),e.icon&&(typeof e.icon=="string"&&c.push(r.h(pe,{name:e.icon})),typeof e.icon=="function")){const f=e.icon(o);f!==null&&c.push(r.h(pe,{name:f}))}return e.class&&(typeof e.class=="function"?u(e.class(o)):u(e.class)),I.listCellHandler&&I.listCellHandler(e,o,{cellNodeChildren:c,addClass:u,addHandleClick:l,context:t}),s.push(r.h("td",a,c)),s}function ot(e,n){e.emit("select",n)}function Ue(e,n){return()=>{try{return Tn(e,n)}catch(t){return console.warn(t),null}}}const Sn={props:{values:Object,config:Object,selected:Boolean},setup:Ue},In=["colspan"],it=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,In)],512))}}),Nn={class:"widget-table"},at="update:selectedRows",Ln="update:activeRow",Et=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1},useMockField:{type:Boolean,default:!1}},emits:["save","order"],setup(e,{emit:n}){const t=e,o=n,i=r.useSlots(),a=r.computed(()=>{var d;return(d=i==null?void 0:i.default)==null?void 0:d.call(i)[0]});function l(d){return t.useMockField?pt(d):d}function u(d,v=!0){if(!t.selectedRows)return;if(!v)return o(at,t.selectedRows.includes(d)?[]:[d]);const m=[...t.selectedRows],h=m.indexOf(d);return h===-1?m.push(d):m.splice(h,1),o(at,m)}function s(d){o(Ln,d)}function c(d){o("save",d),o("update:activeRow",null)}const f=r.computed(()=>t.shortcut?t.config.filter(d=>d.name?!!t.array.find(m=>![null,""].includes(Ie(d,m))):!0):t.config),p=r.computed(()=>t.useMockField?t.array.filter(pt):t.array);return(d,v)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",Nn,[r.createElementVNode("thead",null,[r.createVNode(un,{config:f.value,onOrder:v[0]||(v[0]=m=>d.$emit("order",m))},{default:r.withCtx(m=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(d.$slots["head-cell"]||yt),r.normalizeProps(r.guardReactiveProps(m)),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.value,(m,h)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:h},[r.createVNode(Sn,{config:f.value,values:m,selected:d.selectedRows.includes(l(m)),onSelect:b=>u(l(m),b),onActivate:b=>s(l(m)),class:r.normalizeClass(d.classCallback?d.classCallback(m):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),a.value&&d.activeRow===l(m)?(r.openBlock(),r.createBlock(it,{key:0,component:a.value,"row-length":d.config.length,values:m,onClose:v[1]||(v[1]=b=>o("update:activeRow",null)),onSave:c,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),d.activeRow===r.unref(A).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(it,{key:0,component:a.value,"row-length":f.value.length,onClose:v[2]||(v[2]=m=>o("update:activeRow",null)),onSave:c,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])])]))}}),On=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))}}),me=j(On,[["__scopeId","data-v-0ef9ae88"]]),Rn={class:"widget-button"},$n=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("button",Rn,[n.wait?(r.openBlock(),r.createBlock(me,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"default",{},void 0,!0)]))}}),Bn=j($n,[["__scopeId","data-v-450dc564"]]),Fn={class:"widget-multi-button-wrap position_relative cursor_pointer"},Dn={class:"widget-multi-button-body grid"},xn=["onClick"],Pn={class:"widget-multi-button-side-wrap"},Vn=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,u)=>(r.openBlock(),r.createElementBlock("div",Fn,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",t.active?"widget-multi-button_active":null])},[r.createElementVNode("div",Dn,[l.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:u[0]||(u[0]=s=>a())},r.toDisplayString(l.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(s,c)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:c,onClick:f=>{i(s.callback),a(!1)}},r.toDisplayString(s.label),9,xn))),128))]),r.createElementVNode("div",Pn,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",t.active?"widget-multi-button-side_active":null]),onClick:u[1]||(u[1]=s=>a())},[t.wait?(r.openBlock(),r.createBlock(r.unref(me),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(r.openBlock(),r.createBlock(r.unref(pe),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}}),Mn=j(Vn,[["__scopeId","data-v-d43a76ce"]]),jn={class:"widget-loader flex flex-align_center gap_10 padding_15"},Un={class:"text_md"},kt=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("div",jn,[r.createVNode(me,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",Un,r.toDisplayString(n.label),1)]))}}),Wn=["alt","src"],qn=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,Wn))}}),Gn={props:{config:Array,values:Object,selected:Boolean},setup:Ue},zn=j(Gn,[["__scopeId","data-v-344a8cc1"]]),Hn=e=>(r.pushScopeId("data-v-bf495d6a"),e=e(),r.popScopeId(),e),Xn={class:"widget-list-head-cell"},Yn=Hn(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Jn=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",Xn,[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(D.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(pe),{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),Yn])]))}}),Kn=j(Jn,[["__scopeId","data-v-bf495d6a"]]),Qn=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 c(m,h){let b=-1;do b++,h-=m[b];while(h>0&&b<m.length);return b}function f(m,h){let b=0;for(;h>0&&h>m[b]&&b<m.length;)h-=m[b],b++;return console.log(h,b),b>0?b:0}function p(m){try{a.value.style.insetInlineStart=m+"px"}catch(h){console.log(h)}}function d(m){try{a.value.style.width=m+"px",a.value.style.minWidth=m+"px",a.value.style.maxWidth=m+"px"}catch(h){console.log(h)}}function v(m){return m===null?!1:m.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(h){var K;function b(R){return R.screenX+E-x}const g=i.value,w=[...g.children].filter(R=>R.localName==="th"),E=((K=g.offsetParent)==null?void 0:K.scrollLeft)||0,T=w.map(R=>R.clientWidth),F=v(h.target),x=g.getBoundingClientRect().left,k=b(h),_=c(T,k),y=T.slice(0,_).reduce((R,O)=>R+O,0),C=k-y,S=g.offsetWidth,P=w[_].clientWidth;if(t.config[_].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",h.screenX),console.log("Widths",T),console.log("max width",S),console.log("Start Position",k),console.log("Position From",_),console.log("Start Position",_),console.log("Global offset (Отступ самой таблицы от края экрана)",x),console.log("Del",C),console.groupEnd(),a.value.innerText=w[_].textContent||"",a.value.style.display="grid",a.value.style.width=P+"px",a.value.style.cursor="grabbing",p(y),d(P),document.addEventListener("pointermove",ae,{passive:!0}),document.addEventListener("pointerup",Y);function Y(R){if(console.group("END"),document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",Y),F&&(t.config[_].width=a.value.style.width,t.config[_].minWidth=a.value.style.width,t.config[_].maxWidth=a.value.style.width,l(t.config)),!F){const O=R.screenX+E-x;console.log("ENP Position",O);const z=f(T,O);if(console.log(_,"->",z),z!==_){const Q=t.config[_],Re=t.config;Re.splice(_,1),Re.splice(z,0,Q),l(Re)}else{const Q=t.config[_].name;u(Q)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function ae(R){if(F){const Q=b(R)-k+P;d(Q);return}let O=R.screenX+E-x-C;O<0&&(O=0),O+P>S&&(O=S-P),p(O)}})});function l(c){o("update:config",c)}function u(c){if(!c)return;if(Array.isArray(c)){if(c.length<1)return;c=c[0]}if(t.order.length===0||t.order[0]!==c)return void s([c]);const f=t.order.length===1||t.order[1]==="asc"?"asc":"desc";s([c,f==="asc"?"desc":"asc"])}function s(c){o("update:order",c)}return(c,f)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:i},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.config,(p,d)=>(r.openBlock(),r.createBlock(Kn,r.mergeProps({key:p,ref_for:!0},p,{onOrder:v=>u(p.name),onSelect:f[0]||(f[0]=v=>o("select")),order:c.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:a},"test",512)],512))}}),Zn=j(Qn,[["__scopeId","data-v-ccffc6bd"]]),er={class:"widget-list"},tr={class:"widget-list-body position_relative"},nr=50,rr=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,c=!0){if(t.selectedRows)if(!c)l(t.selectedRows.includes(s)?[]:[s]);else{const f=[...t.selectedRows],p=f.indexOf(s);p===-1?f.push(s):f==null||f.splice(p,1),l(f)}}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 u(s){if(!s)return;const c=s.target;c.scrollTop+c.clientHeight+nr>c.scrollHeight&&o("scrollEnd")}return(s,c)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:u},[r.createElementVNode("table",er,[r.createElementVNode("thead",null,[r.createVNode(Zn,{onSelect:c[0]||(c[0]=f=>a()),"onUpdate:order":c[1]||(c[1]=f=>o("update:order",f)),"onUpdate:config":c[2]||(c[2]=f=>o("update:config",f)),config:s.config,order:s.order},null,8,["config","order"])]),r.createElementVNode("tbody",tr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.array,(f,p)=>{var d;return r.openBlock(),r.createBlock(zn,{key:p,class:"widget-list-row",values:f,config:s.config,selected:(d=s.selectedRows)==null?void 0:d.includes(f),onSelect:v=>i(f,v)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function We(){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(A.VISIBLE_ITEM_PROVIDE_NAME,{show(l){t[l]=!0},hide(l){t[l]=!1},remove(l){delete t[l]}});const o=r.inject(A.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}}const or=r.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{}},setup(e){const n=e,t=Oe(),o=Ke(),i=r.computed(()=>{var h,b;const d=s.value,v=c(d),m={type:v,disabled:!((h=u.value)!=null&&h.canSet),label:n.label};return d&&Object.assign(m,{suffix:v==="number"?d.valueUnit:void 0,required:l.includes(v||"")?!1:d.required,label:n.label||d.displayName}),Object.assign(m,((b=I.fieldParamsHandler)==null?void 0:b.call(I,d,u.value,m))||{}),m}),a=["MultiText","MultiWideText"],l=["switch","single-checkbox","single-radio"],u=r.computed(()=>{var d;return(d=o==null?void 0:o.value)==null?void 0:d.fields[n.name]}),s=r.computed(()=>{if(!t.value)return;const d=t.value.fieldsByName[n.name];if(d)return d});function c(d){if(typeof n.type=="string"&&n.type.length!==0)return n.type;if(d){if(d.type==="Reference"||d.type==="Owned")return d.referencedEntity;if(d.dataType==="Boolean")return"single-checkbox";if(d.dataType==="DateTime")return"date";if(d.dataType==="Integer"||d.dataType==="Decimal")return"number";if(d.dataType==="List")return d.aggregatedEntity;if(a.includes(d.presentationType))return"textarea";if(d.presentationType==="PhoneNumber")return"tel"}return"text"}const f=r.computed(()=>{var d;return((d=u.value)==null?void 0:d.canGet)===!0}),{controller:p}=We();return r.watch(()=>f.value,d=>d?p.show():p.hide(),{immediate:!0}),r.onUnmounted(()=>p.remove()),(d,v)=>f.value?(r.openBlock(),r.createBlock(r.unref(D.FormField),r.mergeProps({key:0},{...d.$attrs,...i.value},{name:d.name}),null,16,["name"])):r.createCommentVNode("",!0)}});function ir(e){return Array.isArray(e)&&(e==null?void 0:e[1])||A.DEFAULT_ORDER_DIR}const ar=["fill"],sr=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),lr=[sr],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},lr,8,ar))}}),ur={class:"widget-fast-table-head-cell-td"},fr={class:"widget-head-cell-label"},dr={key:0,class:"widget-head-cell-order"},pr=r.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{}},setup(e){const n=e,t=r.computed(()=>je(n.name));return r.computed(()=>ir(n.order)),(o,i)=>{var a;return r.openBlock(),r.createElementBlock("td",ur,[r.createElementVNode("div",{class:"widget-head-cell",onClick:i[0]||(i[0]=l=>o.$emit("order",o.name))},[r.createElementVNode("span",fr,r.toDisplayString(o.label),1),t.value===((a=o.order)==null?void 0:a[0])?(r.openBlock(),r.createElementBlock("div",dr,[r.createVNode(cr,{color:"var(--color-primary)",class:r.normalizeClass(["widget-head-cell-order-icon",`widget-head-cell-order-icon_${o.order[1]==="desc"?"desc":"asc"}`])},null,8,["class"])])):r.createCommentVNode("",!0)])])}}}),_t=j(pr,[["__scopeId","data-v-9db5d417"]]),gr=["fill"],mr=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),hr=[mr],vr=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},hr,8,gr))}}),yr={class:"widget-filter-item-popup"},wr=r.defineComponent({__name:"widget-table-panel-filter-item",props:{entity:{},values:{},filterItem:{}},emits:["update:values"],setup(e,{emit:n}){const t=e,o=n,i=I.tableFilterEntityBind,a=r.ref(),l=r.computed(()=>{const v=t.filterItem;return v.entity?"Entity":v.type?v.type:null});function u(v){s.value=v==="start"}const s=r.ref(!1),c=r.computed(()=>Array.isArray(t.values)||typeof t.values=="string"?t.values.length>0:!!t.values),f=r.ref(!1);let p=null;function d(v=!f.value){f.value=v,!f.value&&p?(p(),p=null):a.value&&(p=D.utils.clickOutside(a.value,d.bind(null,!1)))}return(v,m)=>{var h;return r.openBlock(),r.createElementBlock("div",{class:"widget-filter-item-container grid",ref_key:"refFilterItem",ref:a},[r.createElementVNode("div",{class:"widget-filter-item",onClick:m[0]||(m[0]=()=>d())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":c.value}])},r.toDisplayString(v.filterItem.label||"--"),3),s.value?(r.openBlock(),r.createBlock(me,{key:0})):(r.openBlock(),r.createBlock(vr,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":f.value})},null,8,["class"]))]),r.withDirectives(r.createElementVNode("div",yr,[l.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((h=r.unref(i))==null?void 0:h[l.value]),{key:0,"field-metadata":v.filterItem,values:v.values,"onUpdate:values":m[1]||(m[1]=b=>o("update:values",b)),onReadProcess:u},null,40,["field-metadata","values"])):r.createCommentVNode("",!0)],512),[[r.vShow,f.value]])],512)}}}),Ct=j(wr,[["__scopeId","data-v-5b9128bc"]]),br={class:"widget-table-panel-filter flex"},Er=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",br,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.filtersConfig,(u,s)=>{var c;return r.openBlock(),r.createBlock(Ct,{key:s,entity:a.entity,"filter-item":u,values:(c=a.filters)==null?void 0:c[r.unref(de)(u)],"onUpdate:values":f=>i(r.unref(de)(u),f)},null,8,["entity","filter-item","values","onUpdate:values"])}),128))]))}}),kr=j(Er,[["__scopeId","data-v-f1534314"]]),_r=r.defineComponent({__name:"widget-fast-table-button-download-csv",props:{settings:{},label:{default:"Save as CSV"}},setup(e){const n=e;function t(){q.openModal(A.MODAL_LIST_DOWNLOAD,n)}return(o,i)=>{const a=r.resolveComponent("widget-button");return r.openBlock(),r.createBlock(a,{onClick:t,label:o.label,icon:"list-download"},null,8,["label"])}}}),Cr=r.defineComponent({__name:"widget-fast-table-button-settings",props:{settings:{},label:{default:"Settings"}},setup(e){const n=e;async function t(){const o=await q.promptModal(A.MODAL_LIST_SETTINGS,n);o&&console.log(o)}return(o,i)=>{const a=r.resolveComponent("widget-button");return r.openBlock(),r.createBlock(a,{onClick:t,label:o.label,icon:"list-settings"},null,8,["label"])}}}),Tr={class:"es-grid es-gap-15"},Ar={key:0,class:"title-md color-primary margin-0 widget-fast-table-label"},Sr={class:"widget-fast-table-tools es-flex es-gap-15"},Ir={class:""},Nr=r.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{},hideLabel:{type:Boolean}},setup(e,{expose:n}){const t=e,o=Me.useRouter(),i=r.ref([]),a=r.ref(null),l=r.ref(null),u=r.ref(null),s=D.Form.getParentForm();Oe(t.entity);const{state:c,update:f}=Ke(t.entity,{masterEntities:t.masterEntities||[]}),p=(t.actions||[]).map(y=>Rt(y)),d=r.computed(()=>a.value?Xt(t.entity,a.value.config):[]),v=r.computed(()=>{var y;return((y=a.value)==null?void 0:y.displayItem)||Je.inline}),m=r.computed(()=>{var y;return((y=a.value)==null?void 0:y.newItem)||v.value}),h=Ee(async()=>{try{await g.call(),await f()}catch(y){const{message:C}=qe(y);l.value=C}});s instanceof D.Form&&s.subscribe({read:h.call.bind(null),name:t.entity,type:"table"}),r.onMounted(()=>{b.call(),h.call()});const b=Ee(async function(){const C=t.entity;a.value=await It(C,t.mark)}),g=Ee(async function(){var S,P,Y;const C=t.entity;l.value=null,b.promise&&await b.promise,i.value=(await oe(C,{customFilters:((S=a.value)==null?void 0:S.customFilters)||[],fields:ze(d.value).join(" "),order:((P=a.value)==null?void 0:P.order)||[],filter:B.and(B(k.value),B(t.binding||{}),B(((Y=a.value)==null?void 0:Y.prefilters)||{}))})).map(oi)});async function w(y){var S;if(y===null)return u.value=null;const C=y==null?void 0:y.Id;if(!C&&((S=a.value)!=null&&S.linkNew))return o.push(a.value.linkNew);if(v.value==="form")return o.push(Ye(t.entity,C));if(v.value==="inline")return u.value=y||A.LIST_ACTIVE_NEW;v.value==="modal"?(await q.promptModal("form",{entity:t.entity,id:C}),await g.call()):u.value=A.LIST_ACTIVE_NEW}const{controller:E}=We();r.watch(()=>c.value,y=>{y&&(y.canRead?E.show():E.hide())},{immediate:!0}),r.onUnmounted(()=>E.remove());const T={icon:"reload",label:"Reload",process:h};let F=[ge.on("affected-entity",y=>{y.name===t.entity&&g.call()}),ge.on("display-entity",async y=>{y.name===t.entity&&(g.promise&&await g.promise,u.value=i.value.find(C=>C.Id===y.id)||null)})];r.onUnmounted(()=>F.map(y=>y()));function x(y){var K;function C(R){return Array.isArray(R)?C(R[0]):typeof R!="string"?null:R}const S=C(y);if(!S)return;const P=((K=a.value)==null?void 0:K.order)||[];(R=>{if(a.value)return a.value.order=R,!0})(P[0]!==S?[S,"asc"]:P[1]==="desc"?[]:[S,"desc"])&&g.call()}const k=r.ref({});r.watch(()=>k.value,()=>g.call()),n({listSettings:a,array:i,config:d});const _=r.computed(()=>h.wait||b.wait||g.wait);return(y,C)=>{var Y,ae,K,R;const S=r.resolveComponent("widget-button"),P=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",Tr,[(Y=a.value)!=null&&Y.label&&!y.hideLabel?(r.openBlock(),r.createElementBlock("p",Ar,r.toDisplayString((ae=a.value)==null?void 0:ae.label),1)):r.createCommentVNode("",!0),r.createElementVNode("div",Sr,[m.value==="form"||(K=r.unref(c))!=null&&K.canCreate?(r.openBlock(),r.createBlock(S,{key:0,onClick:w,type:"primary",label:"Add New"})):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(p).filter(O=>!!O.value),O=>{var z,Q;return r.openBlock(),r.createBlock(S,{click:(z=O.value)==null?void 0:z.callback,type:"primary",label:(Q=O.value)==null?void 0:Q.label},null,8,["click","label"])}),256)),r.createVNode(_r,{settings:a.value},null,8,["settings"]),r.createVNode(S,{label:T.label,icon:T.icon,loading:_.value,onClick:C[0]||(C[0]=()=>T.process.call())},null,8,["label","icon","loading"]),r.createVNode(Cr,{settings:a.value},null,8,["settings"])]),r.createElementVNode("div",Ir,[r.createVNode(kr,{entity:y.entity,"filters-config":((R=a.value)==null?void 0:R.filters)||[],filters:k.value,"onUpdate:filters":C[1]||(C[1]=O=>k.value=O)},null,8,["entity","filters-config","filters"]),r.createVNode(r.unref(Et),{config:d.value,array:i.value,"active-row":u.value,"onUpdate:activeRow":w,onOrder:x,class:"table"},{"head-cell":r.withCtx(O=>{var z;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(y.$slots["head-cell"]?y.$slots["head-cell"]:_t),r.mergeProps({label:O.label},O,{onOrder:x,order:((z=a.value)==null?void 0:z.order)||[]}),null,16,["label","order"]))]}),default:r.withCtx(()=>{var O;return[r.createVNode(P,{entity:y.entity,id:(O=u.value)==null?void 0:O.Id,"master-entities":y.masterEntities||void 0,binding:y.binding,onFormUpdate:C[2]||(C[2]=()=>{u.value=null,r.unref(g).call()})},null,8,["entity","id","master-entities","binding"])]}),_:1},8,["config","array","active-row"])])])}}}),Lr=j(Nr,[["__scopeId","data-v-81e18cd4"]]),Or=r.defineComponent({__name:"modal-list-download",props:{settings:{}},setup(e){const n=e,t=r.computed(()=>o.finished?"Download CSV":`Download ${o.count} records.`),{state:o,downloadFile:i,reject:a,start:l}=Jt(n.settings);return q.onBeforeModalClose(a),r.onMounted(l),r.watch(()=>o.finished,()=>{i(),q.popModal()}),(u,s)=>{const c=r.resolveComponent("widget-button"),f=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(f,null,{footer:r.withCtx(()=>[r.createVNode(c,{onClick:s[0]||(s[0]=p=>{r.unref(i)(),r.unref(q.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(kt,{label:"Loading"})])]),_:1})}}});function Tt(e){return _e(e,"YYYY/MM/DD HH:mm:ss")}function _e(e,n="YYYY/MM/DD"){if(!e)return"";try{const t=new Date(e);return Zt.format(t,n)}catch(t){return console.log(t),"Invalid date"}}function Ee(e){function n(...o){if(t.loading)return Promise.reject("The process has already started.");t.loading=!0,t.wait=!0;const i=Promise.resolve().then(()=>e(...o)).finally(()=>{t.wait=!1,t.loading=!1,t.promise=null});return t.promise=i,i}const t=r.reactive({wait:!1,loading:!1,call:n,promise:null});return t}function qe(e){return typeof e=="string"?ve(e):Rr(e)?ve(e.message,e.children||e.details||[]):$r(e)?ve(e.title,[e.detail||""]):ve(A.DEFAULT_ERROR_MESSAGE)}function Rr(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function $r(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function ve(e,n=[]){return{message:e,children:n}}function M(e="error"){return function(n){const{message:t,children:o}=qe(n);Qe.add(e,t,{children:o})}}function oe(e,n={}){return $().emit("entity:read",{...n,entity:e})}function Ge(e,n){return $().emit("entity:update",{...n,entity:e})}function ze(e){return e.reduce((n,t)=>(t.name&&(typeof t.name=="string"?n.push(t.name):n.push(...t.name)),n),[])}function At(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 Br(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 Fr(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function Dr(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return A.DEFAULT_ERROR_MESSAGE}})}function U(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(A.DEFAULT_ERROR_MESSAGE)}).then(t=>Dr(t).then(o=>{if(!t.ok)throw o;return o}))}function xr(e,n=1e3){let t=0;return(...o)=>{clearTimeout(t),t=window.setTimeout(()=>e(...o),n)}}function Pr(e,n){let t=!1;return(...o)=>{if(!t)return t=!0,setTimeout(()=>t=!1,n),e(...o)}}const Vr=Se(Ne("pretty-value-field-by-entity"));function Mr(e,n,t){try{const o=Te.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 Vr('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,n,t),t}}const ne=Se(Ne("use-socket"));function $(){return Ur}function jr(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Ur=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()},gn*2);const g=new Uint8Array(1);g[0]=pn,n.send(g)}setInterval(()=>{Array.from(o).forEach(g=>{b(g)&&(ne("Handler for event %s requestId %d was expired",g.event,g.requestId),g.requestId?s({requestId:g.requestId,event:wt,data:{message:ee.RequestTookToLong().message}}):o.delete(g))})},1e3),setInterval(()=>{(!n||n.readyState===3)&&c()},A.DELAY_SOCKET_RECONNECT);function u(){return{safeQueue:a,requestId:e,handlers:o,socketInstance:n}}function s(g){const w=[...o.values()];ne("Handlers array length is %d. Response event: %s. Request id: %d",o.size,g.event,g.requestId),w.forEach(E=>{const T=g.requestId;(E.requestId&&E.requestId===T||!E.requestId&&E.event===g.event)&&(ne("Find appropriated handler: %d, event: %s",e,E.event),E.callback(g.data,g),E.once&&(o.delete(E),ne("Handler was removed by *once* params was passed. %o",E)))})}function c(){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(g){ne("Connection to server was stopped: %d %s",g.code,g.reason),Array.from(o).forEach(w=>{w.guaranteedAnswer&&w.serializeString&&a.add(w.serializeString)})},n.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(g=>{f(g),a.delete(g)})},n.onerror=function(g){console.warn(g)},n.onmessage=g=>{var w;try{if(jr(g.data)){l();return}const E=JSON.parse(g.data);if(!St(E)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(E);return}(w=E==null?void 0:E.data)!=null&&w.refresh&&location.reload(),s(E)}catch(E){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(E)}}}function f(g){n.send(g)}function p(g,w){h({event:g,callback:w})}function d(g,w){h({event:g,callback:w,once:!0})}function v(){return n&&(n==null?void 0:n.readyState)===1}function m(g,w,E){const T=++e,F=JSON.stringify({requestId:T,event:g,data:w,contextId:G.contextId,url:I.socketURLHandler?I.socketURLHandler():window.location.href});return v()?f(F):(a.add(F),ne("Socket is not connected. Message was send to save-queue")),new Promise((x,k)=>{h({event:g,requestId:T,once:!0,guaranteedAnswer:!0,serializeString:F,callback:(_,y)=>{if(ne("Promise was resolve with next data:",_),Wr(y))return void k(_);E&&E(_,y),x(_)},timeToLive:A.TIME_TO_LIVE_SOCKET_REQUEST})})}function h(g){const w={timeToLive:0,...g,created:new Date().getTime()};o.add(w)}function b(g){return g.timeToLive===0||typeof g.timeToLive!="number"?!1:new Date().getTime()-g.created>g.timeToLive}return{get socket(){return n},on:p,once:d,emit:m,initialization(g){t=g},getDevInfo:u}}(),Wr=e=>!!St(e)&&e.event===wt,St=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function It(e,n){return $().emit("list-setting:read",{entity:e,mark:n})}function qr(e,n){return $().emit("metadata-field:treat",{entity:e,fieldName:n})}function Nt(e,n){return $().emit("entity:create",{...n,entity:e})}function Lt(e,n){return $().emit("entity:delete",{...n,entity:e})}function Gr(e,n){return $().emit("usage-context:read",{...n,entity:e})}function Ot(e={}){return $().emit("tool:read",e)}function zr(){return $().emit("metadata-list:read",{})}function Rt(e,n={},t={}){const o=r.inject(A.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:n,a=typeof n=="string"?t:n;return r.computed(()=>{var s;const u=((typeof e=="string"?(s=o==null?void 0:o.actions)==null?void 0:s.value:r.unref(e))||[]).find(c=>c.name===i);return u?{...u,...a}:null})}function Hr(e){return $().emit("history:read",e)}function Xr(e,n){return $().emit("entity:count",{...n,entity:e})}function Yr(e){return`/${mn}/${e}`}function ue(e){return{exec(n,t){switch(e.name){case"replace-boolean":return ue.replaceBoolean(n,e.values);case"replace-record-operation":return ue.replaceRecordOperation(n)}}}}ue.replaceBoolean=Jr;ue.replaceRecordOperation=Kr;function Jr(e,n){return typeof e!="boolean"?"":e?n[1]:n[0]}function Kr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Qr(e={}){return $().emit("tool:execute",e)}const Zr=Se(Ne("wrap-tool-response"));function $t(e,n){return e.handleConfirmation===void 0&&(e.handleConfirmation=no),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=oo),e.handleCloseForm===void 0&&(e.handleCloseForm=io),e.handleValidationResult===void 0&&(e.handleValidationResult=ro),{...n,label:n.title,callback(){var i;const t=typeof e.values=="function"?e.values(n,e):e.values,o=()=>Qr({name:n.name,values:t,usageContext:n.usageContext}).then(async a=>{var l,u;if(!eo(a))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const s of e.handlers)await s(n,a,e);if(!a.success)throw e.handleValidationResult&&a.validationEffect&&((u=(l=a.validationEffect)==null?void 0:l.results)!=null&&u.length)&&e.handleValidationResult(n,a.validationEffect,e),new Error(a.message);return a.message&&Qe.add("info",a.message),Array.isArray(a.affectedEntities)&&e.handleAffectedEntity&&a.affectedEntities.forEach(s=>{var c;return(c=e.handleAffectedEntity)==null?void 0:c.call(e,n,s,e)}),n.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(n,e),a}).catch(M("error"));return(i=e.overrides)!=null&&i[n.name]?e.overrides[n.name](n,e):n.requireSave&&e.form&&e.form.changed?e.form.save().then(o):!n.confirmation||!e.handleConfirmation?o():e.handleConfirmation(n,o)}}}function eo(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function to(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 no(e,n){const t=to(e.confirmation);if(!q.getComponentFromStore(A.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await q.promptModal(A.MODAL_CONFIRM,{message:t}))return n()}function ro(e,n){const t=A.MODAL_VALIDATION_EFFECT;if(!q.getComponentFromStore(t))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{q.pushModal(t,n)})}function oo(e,n,t){var s;function o(c){return c!==null&&typeof c=="object"&&typeof c.read=="function"}function i(c,f){c&&(Zr("Affected Entity %s. Find form with name %s.",f,c.name),c.name===f&&o(c)&&c.read(),c instanceof D.Form&&c.dependencies.forEach(p=>i(p,f)))}ge.emit("affected-entity",n);const{router:a,form:l}=t,u=(s=n.primaryKey)==null?void 0:s.Id;if(a&&n&&n.name===e.redirectEntity){ge.emit("display-entity",{id:u,name:n.name}),I.getEntityLink&&a.push(I.getEntityLink(n.name,u));return}i(l,n.name)}function io(e,n){const{router:t}=n;t&&e.closeHostForm&&t.back()}let re={};function te(e,...n){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let t=D.utils.getPropFromObject((this==null?void 0:this.vocabulary)||re,e);if(typeof t=="string")return st(t,n);const o=D.utils.getPropFromObject(re==null?void 0:re.root,e);return typeof o=="string"?st(o,n):(typeof t===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function st(e,n){return n.forEach((t,o)=>{e=e.replaceAll(new RegExp(`\\{${o}}`,"g"),t)}),e}te.setGlobalVocabulary=function(e){re=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:D.utils.getPropFromObject(re,n.toLowerCase())})};te.setVocabulary=function(e){return typeof e=="string"&&(e=D.utils.getPropFromObject(re,e)),te.bind({vocabulary:e})};function ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var De={exports:{}},L={},xe={exports:{}},ie={};function Bt(){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 so(e,n,t){}function lo(e,n,t){}var co=/javascript\s*\:/img;function uo(e,n){return co.test(n)?"":n}ie.whiteList=Bt();ie.getDefaultWhiteList=Bt;ie.onAttr=so;ie.onIgnoreAttr=lo;ie.safeAttrValue=uo;var fo={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,"")}},fe=fo;function po(e,n){e=fe.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,o=!1,i=0,a=0,l="";function u(){if(!o){var f=fe.trim(e.slice(i,a)),p=f.indexOf(":");if(p!==-1){var d=fe.trim(f.slice(0,p)),v=fe.trim(f.slice(p+1));if(d){var m=n(i,l.length,d,v,f);m&&(l+=m+"; ")}}}i=a+1}for(;a<t;a++){var s=e[a];if(s==="/"&&e[a+1]==="*"){var c=e.indexOf("*/",a+2);if(c===-1)break;a=c+1,i=a+1,o=!1}else s==="("?o=!0:s===")"?o=!1:s===";"?o||u():s===`
7
- `&&u()}return fe.trim(l)}var go=po,ye=ie,mo=go;function lt(e){return e==null}function ho(e){var n={};for(var t in e)n[t]=e[t];return n}function Ft(e){e=ho(e||{}),e.whiteList=e.whiteList||ye.whiteList,e.onAttr=e.onAttr||ye.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||ye.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||ye.safeAttrValue,this.options=e}Ft.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,u=mo(e,function(s,c,f,p,d){var v=o[f],m=!1;if(v===!0?m=v:typeof v=="function"?m=v(p):v instanceof RegExp&&(m=v.test(p)),m!==!0&&(m=!1),p=l(f,p),!!p){var h={position:c,sourcePosition:s,source:d,isWhite:m};if(m){var b=i(f,p,h);return lt(b)?f+":"+p:b}else{var b=a(f,p,h);if(!lt(b))return b}}});return u};var vo=Ft;(function(e,n){var t=ie,o=vo;function i(l,u){var s=new o(u);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)})(xe,xe.exports);var He=xe.exports,Xe={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}},yo=He.FilterCSS,wo=He.getDefaultWhiteList,Ce=Xe;function Dt(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var xt=new yo;function bo(e,n,t){}function Eo(e,n,t){}function ko(e,n,t){}function _o(e,n,t){}function Pt(e){return e.replace(To,"&lt;").replace(Ao,"&gt;")}function Co(e,n,t,o){if(t=qt(t),n==="href"||n==="src"){if(t=Ce.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(we.lastIndex=0,we.test(t))return""}else if(n==="style"){if(ct.lastIndex=0,ct.test(t)||(ut.lastIndex=0,ut.test(t)&&(we.lastIndex=0,we.test(t))))return"";o!==!1&&(o=o||xt,t=o.process(t))}return t=Gt(t),t}var To=/</g,Ao=/>/g,So=/"/g,Io=/&quot;/g,No=/&#([a-zA-Z0-9]*);?/gim,Lo=/&colon;?/gim,Oo=/&newline;?/gim,we=/((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,ct=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,ut=/u\s*r\s*l\s*\(.*/gi;function Vt(e){return e.replace(So,"&quot;")}function Mt(e){return e.replace(Io,'"')}function jt(e){return e.replace(No,function(t,o){return o[0]==="x"||o[0]==="X"?String.fromCharCode(parseInt(o.substr(1),16)):String.fromCharCode(parseInt(o,10))})}function Ut(e){return e.replace(Lo,":").replace(Oo," ")}function Wt(e){for(var n="",t=0,o=e.length;t<o;t++)n+=e.charCodeAt(t)<32?" ":e.charAt(t);return Ce.trim(n)}function qt(e){return e=Mt(e),e=jt(e),e=Ut(e),e=Wt(e),e}function Gt(e){return e=Vt(e),e=Pt(e),e}function Ro(){return""}function $o(e,n){typeof n!="function"&&(n=function(){});var t=!Array.isArray(e);function o(l){return t?!0:Ce.indexOf(e,l)!==-1}var i=[],a=!1;return{onIgnoreTag:function(l,u,s){if(o(l))if(s.isClosing){var c="[/removed]",f=s.position+c.length;return i.push([a!==!1?a:s.position,f]),a=!1,c}else return a||(a=s.position),"[removed]";else return n(l,u,s)},remove:function(l){var u="",s=0;return Ce.forEach(i,function(c){u+=l.slice(s,c[0]),s=c[1]}),u+=l.slice(s),u}}}function Bo(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 Fo(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("")}L.whiteList=Dt();L.getDefaultWhiteList=Dt;L.onTag=bo;L.onIgnoreTag=Eo;L.onTagAttr=ko;L.onIgnoreTagAttr=_o;L.safeAttrValue=Co;L.escapeHtml=Pt;L.escapeQuote=Vt;L.unescapeQuote=Mt;L.escapeHtmlEntities=jt;L.escapeDangerHtml5Entities=Ut;L.clearNonPrintableCharacter=Wt;L.friendlyAttrValue=qt;L.escapeAttrValue=Gt;L.onIgnoreTagStripAll=Ro;L.StripTagBody=$o;L.stripCommentTag=Bo;L.stripBlankChar=Fo;L.attributeWrapSign='"';L.cssFilter=xt;L.getDefaultCSSWhiteList=wo;var Le={},Z=Xe;function Do(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 xo(e){return e.slice(0,2)==="</"}function Po(e,n,t){var o="",i=0,a=!1,l=!1,u=0,s=e.length,c="",f="";e:for(u=0;u<s;u++){var p=e.charAt(u);if(a===!1){if(p==="<"){a=u;continue}}else if(l===!1){if(p==="<"){o+=t(e.slice(i,u)),a=u,i=u;continue}if(p===">"||u===s-1){o+=t(e.slice(i,a)),f=e.slice(a,u+1),c=Do(f),o+=n(a,o.length,c,f,xo(f)),i=u+1,a=!1;continue}if(p==='"'||p==="'")for(var d=1,v=e.charAt(u-d);v.trim()===""||v==="=";){if(v==="="){l=p;continue e}v=e.charAt(u-++d)}}else if(p===l){l=!1;continue}}return i<s&&(o+=t(e.substr(i))),o}var Vo=/[^a-zA-Z0-9\\_:.-]/gim;function Mo(e,n){var t=0,o=0,i=[],a=!1,l=e.length;function u(d,v){if(d=Z.trim(d),d=d.replace(Vo,"").toLowerCase(),!(d.length<1)){var m=n(d,v||"");m&&i.push(m)}}for(var s=0;s<l;s++){var c=e.charAt(s),f,p;if(a===!1&&c==="="){a=e.slice(t,s),t=s+1,o=e.charAt(t)==='"'||e.charAt(t)==="'"?t:Uo(e,s+1);continue}if(a!==!1&&s===o){if(p=e.indexOf(c,s+1),p===-1)break;f=Z.trim(e.slice(o+1,p)),u(a,f),a=!1,s=p,t=s+1;continue}if(/\s|\n|\t/.test(c))if(e=e.replace(/\s|\n|\t/g," "),a===!1)if(p=jo(e,s),p===-1){f=Z.trim(e.slice(t,s)),u(f),a=!1,t=s+1;continue}else{s=p-1;continue}else if(p=Wo(e,s-1),p===-1){f=Z.trim(e.slice(t,s)),f=ft(f),u(a,f),a=!1,t=s+1;continue}else continue}return t<e.length&&(a===!1?u(e.slice(t)):u(a,ft(Z.trim(e.slice(t))))),Z.trim(i.join(" "))}function jo(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="="?n:-1}}function Uo(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="'"||t==='"'?n:-1}}function Wo(e,n){for(;n>0;n--){var t=e[n];if(t!==" ")return t==="="?n:-1}}function qo(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function ft(e){return qo(e)?e.substr(1,e.length-2):e}Le.parseTag=Po;Le.parseAttr=Mo;var Go=He.FilterCSS,W=L,zt=Le,zo=zt.parseTag,Ho=zt.parseAttr,ke=Xe;function be(e){return e==null}function Xo(e){var n=ke.spaceIndex(e);if(n===-1)return{html:"",closing:e[e.length-2]==="/"};e=ke.trim(e.slice(n+1,-1));var t=e[e.length-1]==="/";return t&&(e=ke.trim(e.slice(0,-1))),{html:e,closing:t}}function Yo(e){var n={};for(var t in e)n[t]=e[t];return n}function Jo(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 Ht(e){e=Yo(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=W.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Jo(e.whiteList||e.allowList):e.whiteList=W.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":W.attributeWrapSign,e.onTag=e.onTag||W.onTag,e.onTagAttr=e.onTagAttr||W.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||W.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||W.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||W.safeAttrValue,e.escapeHtml=e.escapeHtml||W.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Go(e.css))}Ht.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,u=t.onIgnoreTagAttr,s=t.safeAttrValue,c=t.escapeHtml,f=n.attributeWrapSign,p=n.cssFilter;t.stripBlankChar&&(e=W.stripBlankChar(e)),t.allowCommentTag||(e=W.stripCommentTag(e));var d=!1;t.stripIgnoreTagBody&&(d=W.StripTagBody(t.stripIgnoreTagBody,a),a=d.onIgnoreTag);var v=zo(e,function(m,h,b,g,w){var E={sourcePosition:m,position:h,isClosing:w,isWhite:Object.prototype.hasOwnProperty.call(o,b)},T=i(b,g,E);if(!be(T))return T;if(E.isWhite){if(E.isClosing)return"</"+b+">";var F=Xo(g),x=o[b],k=Ho(F.html,function(_,y){var C=ke.indexOf(x,_)!==-1,S=l(b,_,y,C);return be(S)?C?(y=s(b,_,y,p),y?_+"="+f+y+f:_):(S=u(b,_,y,C),be(S)?void 0:S):S});return g="<"+b,k&&(g+=" "+k),F.closing&&(g+=" /"),g+=">",g}else return T=a(b,g,E),be(T)?c(g):T},c);return d&&(v=d.remove(v)),v};var Ko=Ht;(function(e,n){var t=L,o=Le,i=Ko;function a(u,s){var c=new i(s);return c.process(u)}n=e.exports=a,n.filterXSS=a,n.FilterXSS=i,function(){for(var u in t)n[u]=t[u];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)})(De,De.exports);var Qo=De.exports;const Zo=ao(Qo);function ei(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>'),Zo(e)}function ti(e,n,t,o){let i=e+n/60+t/3600;return(o=="S"||o=="W")&&(i=i*-1),i}function ni(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 Ye(e,n){return`/forms/${e}/${n}`}function Xt(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=a=>q.openModal("modal-history",{id:a.Id,entity:e}),i.icon="history",i.class="widget-list-cell-history",i.hint="Open the History"),(i.entity||i.useObjectTypeName)&&Array.isArray(i.name)&&i.name.length>1&&(i.modal===!0?(i.onClick=a=>{q.openModal("form",{entity:dt(i,a),id:a[de(i)]})},i.class="widget-table-cell_link cursor_pointer"):i.link=a=>{if(typeof a!="object"||a==null)return null;const l=i.name[0],u=a[l];return u?Ye(dt(i,a),u):null},i.value=(a,l)=>l[i.name[1]]),ri(i,i.type,i.presentation),I.listConvertCellConfigHandler&&I.listConvertCellConfigHandler(e,i),i))}function ri(e,n,t){switch(n){case"Decimal":{t==="Money"&&(e.type="money");break}}return e}const dt=(e,n)=>e.useObjectTypeName?n[e.name[2]]:e.entity?e.entity:null;function pt(e){return typeof e!="object"||e===null?null:e[A.TABLE_MOCK_FIELD]}function oi(e,n){return typeof e!="object"||e===null?(console.warn("cell data is not a valid object."),e):(typeof n=="string"||typeof n=="number"||typeof n=="function"?(typeof n=="function"&&(n=n(e)),e[A.TABLE_MOCK_FIELD]=n):e[A.TABLE_MOCK_FIELD]=e.Id,e)}var Je=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(Je||{});function ii(){const e=r.ref(null);function n(t){e.value=t}return{activeRow:e,activateRow:n}}function ai(e,n){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(n)}async function Yt(e,n){e()&&(await n(),await Yt(e,n))}function si(e,n,t={}){let o=!1;const i=r.ref(""),a=r.computed(()=>l.filter(k=>c(k,i.value))),l=r.reactive([]);let u=0;const s=r.ref(!1);let c=(t==null?void 0:t.filterSearchFn)||((k,_)=>ai(k,_));function f(){return t.masterEntities?typeof t.masterEntities=="function"?t.masterEntities():t.masterEntities:[]}function p(){const k=T();return typeof k.limit!="number"&&(k.limit=100),k.offset=u,(t.request||oe)(e,k).then(y=>(u+=y.length,y))}function d(k,_){var C;return typeof k.Version=="number"?k.Version:(C=l.find(S=>S.Id===_))==null?void 0:C.Version}function v(k,_){const y=l.findIndex(C=>C.Id===k);if(y===-1)throw new Error(`Can't found item with Id ${k}`);l.splice(y,1,_)}function m(k){const _=l.findIndex(y=>y.Id===k);if(_===-1)throw new Error(`Can't found item with Id ${k}`);l.splice(_,1)}async function h(k,_){try{const y=T(),C=d(_,k);delete _.Version,await Ge(e,{id:k,values:_,version:C,masterEntities:f()});const S=await oe(e,{fields:y.fields||"",id:k});v(k,S)}catch(y){M()(y)}}async function b(k,_={}){try{const y=T(),C=d(_,k);delete _.Version,await Lt(e,{id:k,version:C,masterEntities:f()}),m(k)}catch(y){M()(y)}}async function g(k){try{await Nt(e,{values:k,masterEntities:f()}),await F()}catch(_){M()(_)}}let w;async function E(){s.value=!0;try{w!=null&&w.signal&&!w.signal.aborted&&w.abort();let k=w=new AbortController,_=0;const C=T().limit||0;if(i.value&&!C){console.warn("Using textSearch assumes the use of limit.");return}await Yt(()=>(C>0?_<C:!0)&&!o&&!k.signal.aborted,async()=>{const S=await p();k.signal.aborted||(l.push(...S),_+=S.filter(P=>c(P,i.value)).length,(S.length<C||C===0)&&(o=!0))})}catch(k){M()(k)}s.value=!1}function T(){return typeof n=="function"?n():n}async function F(){try{u=0,o=!1,l.splice(0,l.length),await E()}catch(k){M()(k)}}function x(){if(w)return w.abort();s.value=!1}return{array:l,updateById:h,next:E,reload:F,wait:s,create:g,deleteById:b,textSearch:i,filteredArray:a,abort:x}}function li(){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 ci(e,n,t){return $().emit("communication:create",{entityName:e,entityCatalogId:n,targetCode:t})}function ui(e,n,t){return $().emit("communication:read",{entityName:e,entityCatalogId:n,targetCode:t})}function fi(e,n){return $().emit("communication-message:create",{communicationId:e,text:n})}function di(e){return $().emit("communication-message:read",{communicationId:e})}function pi(e){const n=D.Form.getParentForm(),t=r.reactive([]);return n&&n.subscribe(e),e.read=()=>di(e.id).then(o=>(t.splice(0,t.length,...o),o)),{array:t}}function gi(e,n){e.read=()=>{const o=t();return Promise.resolve().then(()=>{if(!e.name)throw ee.EntityWithoutName(e);return oe(e.name,o)}).then(Ze).then(i=>(i.hasOwnProperty("Version")&&(e.version=i.Version),e.setValues(i),i)).catch(M())},e.save=()=>{const o=t();return Promise.resolve().then(()=>{if(!e.name)throw ee.EntityWithoutName(e);return Ge(e.name,{id:o.id,values:e.changes,version:e.version})}).then(i=>{e.version=i.version}).catch(i=>{throw M()(i),i})};function t(){return typeof n=="function"?n():n}}function Oe(e){if(!e)return r.inject(A.PROVIDE_NAME_METADATA);Te.initEntity(e);const n=r.computed(()=>Te.state[e]);return r.provide(A.PROVIDE_NAME_METADATA,n),n}function Ke(e,n={}){if(!e)return r.inject(A.PROVIDE_NAME_USAGE_CONTEXT);const t=r.ref(null);return r.provide(A.PROVIDE_NAME_USAGE_CONTEXT,t),{state:t,update:async function(){t.value=await Gr(e,mi(n||{}))}}}function mi(e){return typeof e=="function"?e():e}function hi(e){if(!e)return r.inject(A.PROVIDE_NAME_ACTIONS);const n=r.ref(!1),t=r.reactive([]),o=r.computed(()=>t.map(l=>$t(e,l))),i={actions:o,update:a};r.provide(A.PROVIDE_NAME_ACTIONS,i),e.router=Me.useRouter();function a(){if(n.value)return;n.value=!0,t.splice(0,t.length);const l=e==null?void 0:e.form;return Ot({masterEntities:e==null?void 0:e.masterEntities,id:l==null?void 0:l.id,entity:l==null?void 0:l.name}).then(u=>t.splice(0,0,...u)).catch(M("error")).finally(()=>n.value=!1)}return{actions:o,update:a,loading:r.readonly(n)}}function vi(e){function n(t){t.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",n)}),r.onUnmounted(()=>{document.removeEventListener("keypress",n)})}function yi(e,n={}){const t=r.reactive([]),o=s=>{const c=r.unref(e);if(s===void 0){t.length===0?c.forEach(a):c.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 c=t.findIndex(f=>f===s);c!==-1&&t.splice(c,1)},u=r.computed(()=>{const s=r.unref(e);return t.length===s.length&&s.length!==0});return[t,o,u,a,l]}function wi(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 Be{static async getStartConfig(n,t){return $().emit("wizard:configuration",{process:n,entity:t})}static async startProcess(n,t){return $().emit("wizard:start",{process:n,entity:t})}static async runStep(n,t,o,i,a){return $().emit("wizard:step",{process:n,entity:t,stepName:o,token:i,values:a})}}function bi(e){return e.statusName===V.Completed}function Ei(e){return[V.FinalStepWithConfirmation,V.NextStepWithConfirmation].includes(e.statusName)}function ki(e){return e.statusName===V.ValidationError}function _i(e){return e.statusName===V.Undefined}function Ci(e,n,t){let o=null,i=[];const a=r.ref(!1),l=r.ref(null),u=r.computed(()=>p(i,l.value)),s=r.ref(null),c=r.reactive([]),f=r.computed(()=>c.map(w=>p(i,w)));function p(w,E){return w.find(T=>T.name===E)||null}async function d(w){var E;if(_i(w)){await t.onDisplayDataSet(w);return}if(!(Ei(w)&&!await t.onDisplayDataSet(w))){if(ki(w))return void t.onValidation(w.validationResults);h(w),await r.nextTick();{const T=((E=p(i,l.value))==null?void 0:E.fields)||[];if([V.FinalStep,V.NextStep,V.FinalStepWithConfirmation,V.NextStepWithConfirmation].includes(w.statusName)&&(!T.length||Ti(T,t.presets)))return g(t.presets||{})}bi(w)&&t.onCompleted(w)}}async function v(){try{await m(),await b()}catch(w){M("error")(w)}}function m(){return a.value="Loading process information.",Be.getStartConfig(n,e).then(w=>(s.value={label:w.processTitle,info:w.processInfo,icon:w.processIcon},i=w.steps.map(E=>{const T=E.frontendEntity.rootObject,F=Object.fromEntries(E.frontendEntity.objectTypes.map(x=>[x.name,x.properties]));return{label:E.title,name:E.stepName,number:E.number,rootObjectName:T,objectTypes:F,fields:F[T],buttonCaption:E.buttonCaption}}))).finally(()=>{a.value=!1})}function h(w){return[V.FinalStepWithConfirmation,V.NextStepWithConfirmation,V.NextStep,V.Completed,V.FinalStep].includes(w.statusName)?(o=w.token,l.value=w.nextStepName):console.log("Saving is not completed:",w),w}function b(){return a.value="Starting process",Be.startProcess(n,e).then(d).catch(M("error")).finally(()=>{a.value=null})}function g(w={}){const E=l.value;return!o||!E?Promise.reject("Not step or token."):(a.value="Waiting for result...",Be.runStep(n,e,E,o,w).then(d).then(T=>(c[c.length-1]!==E&&c.push(E),T)).catch(M("error")).finally(()=>{a.value=!1}))}return{initialize:v,loading:a,currentStepConfig:u,currentStepName:l,arrayPassedSteps:f,arrayProcessStepName:c,processInfo:s,next:g}}function Ti(e,n){for(let t=0;t<e.length;t++){const o=e[t];if(!D.utils.getPropFromObject(n,o.name))return!1}return!0}function Ai(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 Si(e){return e.limit||(e.limit=150),e}function Jt(e,n={}){const{limit:t}=Si(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,u=e.customFilters||[],s=[l.map(h=>f(h.label)).join(",")],c=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function f(h){h===null&&(h=""),h===void 0&&(h="-");let b=typeof h!="string"?String(h):h;return b=b.replace(/"/g,'""'),b.search(/("|,|\n)/g)>=0&&(b='"'+b+'"'),b}function p(){return oe(a,{fields:ze(l).join(" "),limit:t,offset:c.offset,order:i,filter:B(o||{}),customFilters:u.map(h=>{var b;return Ai(h,(b=n.customFiltersData)==null?void 0:b[typeof h=="string"?h:h.name])})}).then(h=>(c.offset+=t,h))}function d(){const h="data:text/csv;charset=utf-8,"+s.join(`\r
8
- `),b=encodeURI(h),g=document.createElement("a");g.setAttribute("href",b),g.setAttribute("download",`${a}.csv`),document.body.appendChild(g),g.click()}function v(){c.rejected=!0}async function m(){return p().then(h=>{const b=h.map(g=>l.map(w=>f(Ie(w,g))).join(","));return s.push(...b),c.count=s.length,h.length}).then(h=>{if(h!==t&&(c.finished=!0),h===t&&!c.rejected)return m()})}return{downloadFile:d,reject:v,state:c,start:m}}const Qe=new class{constructor(){this.store=r.reactive([])}add(n,t,o={}){const i=Ii(o),a=new Pe(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 Ii(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 Ae=class Ae{constructor(n,t,o,i,a){this.type=n,this.message=t,this.timeout=o,this.children=i,this.click=a,this.id=Ae.cardId++}};Ae.cardId=1;let Pe=Ae;/*!
5
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),Me=require("vue-router"),M=require("jenesius-vue-form"),Qt=require("date-and-time"),Ie=require("debug"),J=require("jenesius-vue-modal"),N=class N extends Error{constructor(n,t=null){super(),this.message=n,this.details=t,this.id=N.ID++}static ParentFormNotFound(){return new N("Can't found parent form.")}static UndefinedNameOfCompositeFormController(n){return new N("Composite object name is undefined",n)}static EntityWithoutName(n){return new N("'Entity doesn't have a name",n)}static NotResolvedNameEventEmitter(n){return new N(`'${n}' is not a valid Event emitter name`)}static FormIsNotValidated(n){return new N("Form is not validated",n)}static ListWorkerIsRunningOrEnd(n){return new N("List data request is running or already done",n)}static ObjectIdNotNumber(n){return new N(`${n} (id) is not a number`)}static UndefinedErrorId(n,t){return N.ApiNotAvailable()}static ApiError(n){return new N("Request error",n)}static ApiNotAvailable(){return new N(`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?N.ApiNotAvailable():new N(n||"Authorization Error",t)}static ApiResponseParseFailed(){return N.ApiNotAvailable()}static MissingIdInValuesEntity(n){return new N("Object doesn't have id",n)}static ObjectWithIdNotFound(n,t){return new N(`Can't find object with id: ${n}`,t)}static ObjectWithoutConnectToPresentArray(n,t){return new N("Object is not found.",{object:n,array:t})}static EntityWithoutId(n){return new N("Entity doesn't have id.",n)}static NotFoundedTableIndex(n,t){return new N(`Can't find the element with tableIndex ${n}`,t)}static UndefinedError(n,t=[]){return new N(n,t)}static TableArrayAlreadyIncludeProvidedIndexValue(n,t,o){return new N(`Array already includes the element with value ${n}`,{array:t,table:o})}static MetadataEntityIsNotAvailable(n){return new N(`Metadata for the ${n} is not currently available.`)}static RequestTookToLong(){return new N("The request took too long to complete. Try again later.")}};N.ID=0;let te=N;const Zt="Please try again later or submit a feedback if problem doesn't go.";function en(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return Zt}})}function ce(e,n={}){return n.redirect="manual",fetch(e,n).then(t=>t.type==="opaqueredirect"?void window.location.replace("/auth"):t).catch(()=>{throw te.ApiNotAvailable()}).then(t=>en(t).then(o=>{if(!t.ok)throw o;return o}))}class tn{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 tn;class nn{static invite(n,t,o){return ce("/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 ce("/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 ce("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:n,version:t,mark:!1})})}}class rn{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 le{static url(){return"close-api/billing"}static getBillingMetadata(n){return fetch(`/${le.url()}/calculator/${n}`)}static calculate(n,t){return ce(`/${le.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]):te.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 ce(`/${le.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:n,returnURL:t})})}static applyOnlinePayment(n){return ce(`/${le.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:n})})}}const on={class:"widget-table__head-cell"},an={class:"widget-table__head-label margin_0 text_overflow"},yt=r.defineComponent({__name:"widget-table-head-cell",props:{label:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("th",on,[r.createElementVNode("span",an,r.toDisplayString(n.label),1)]))}}),sn={class:"widget-table__head"},ln=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return r.computed(()=>I.componentTableHeadCell||yt),(n,t)=>(r.openBlock(),r.createElementBlock("tr",sn,[(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))]))}}),H=(e,n)=>{const t=e.__vccOpts||e;for(const[o,i]of n)t[o]=i;return t},cn=H(ln,[["__scopeId","data-v-498c4f00"]]);function je(e){return Array.isArray(e)?je(e[0]):typeof e!="string"?null:e}function pe(e){return je(e.name)}function un(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 fn(e,n){return un(e).forEach(o=>{e=e.replace(new RegExp("\\$\\{"+o+"}","g"),M.utils.getPropFromObject(n,o))}),e}function Fe(e){return n=>typeof n=="string"||typeof n=="number"?`${n} ${e}`:""}function Ne(e,n){const t=pe(e);if(typeof e.value=="string")return fn(e.value,n);let o=t?M.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=Fe(e.unitValue)(o)),e.unit&&(o=Fe(e.unit)(o)),e.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=Ce(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=Tt(typeof o=="string"?o:null);break}case"money":{o=At(o);break}case"DateTime":{o=Ce(typeof o=="string"?o:null,e.format||I.dateTimeFormat);break}}return e.formatter&&(o=fe(e.formatter).exec(o,n)),typeof o=="boolean"&&(o=o?"✓":"—"),o}const dn=1,pn=5e3,gn="static-folder",wt="request-error",bt="Distinguisher",A={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",MODAL_LIST_DOWNLOAD:"list-download",MODAL_LIST_SETTINGS:"list-settings",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:bt};function Le(e){return[A.CORE_DEBUG_LABEL,e].join(":")}const mn={class:"widget-filter-text flex gap_20"},hn=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,s=>{if(typeof s!="string")return i.value="";i.value=s},{immediate:!0}),(s,u)=>{const l=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",mn,[r.createVNode(r.unref(M.FormField),{type:"text",modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=c=>i.value=c)},null,8,["modelValue"]),r.createVNode(l,{onClick:a,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(ne)("Apply")),1)]),_:1})])}}}),vn=H(hn,[["__scopeId","data-v-800b3803"]]),yn={class:"widget-filter-enum"},wn=r.defineComponent({__name:"widget-filter-entity",props:{values:{},fieldMetadata:{}},emits:["update:values","readProcess"],setup(e,{emit:n}){const t=e,o=r.ref([]),i=Re(t.fieldMetadata.entity),a=c=>(t.values||[]).includes(c),s=n;function u(c){const f=t.values||[];return f.includes(c)?s("update:values",f.filter(p=>p!==c)):s("update:values",[...f,c])}async function l(){var p;if(!((p=t.fieldMetadata)!=null&&p.entity)||!i.value)return;const c=i.value.fieldNameForLabel,f=i.value.fieldNameForIdentification;s("readProcess","start"),o.value=await ie(t.fieldMetadata.entity,{fields:[c,f].join(" "),order:[c,"asc"]}).then(d=>(s("readProcess","end"),d.map(y=>({label:y[c],value:y[f]}))))}return r.watch(()=>i.value,l,{immediate:!0}),(c,f)=>(r.openBlock(),r.createElementBlock("div",yn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,p=>(r.openBlock(),r.createBlock(r.unref(M.FormField),{class:"widget-filter-enum-item",key:p.value,onClick:()=>u(p.value),type:"single-checkbox","model-value":a(p.value),label:p.label},null,8,["onClick","model-value","label"]))),128))]))}}),bn=H(wn,[["__scopeId","data-v-cf143196"]]),I={getEntityLink(e,n){return`/forms/${e}/${n}`},iconHandlerText(){return""},iconTag:"i",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",tableFilterEntityBind:{String:vn,Entity:bn}};function En(e){for(let n in e)I[n]=e[n]}const kn={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(I.iconTag,{class:I.iconHandler?I.iconHandler(t):`icon icon-${t}`},I.iconHandlerText(t))}},ge=H(kn,[["__scopeId","data-v-8a72b45f"]]),_n=Ie(Le("setup-list-row"));function Cn(e,n){const t=e.config.map(o=>Tn(o,e,n));return r.h("tr",{class:"widget-table__row widget-table-row"},t)}function Tn(e,n,t){const o=n.values;let i=Ne(e,o);const a={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function s(f){a.onClick.push(()=>f(o,e,t))}function u(f){Array.isArray(f)?a.class.push(...f):a.class.push(f)}const l=[],c=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(u(`widget-table-cell_${e.type}`),e.type){case"multi-select":{c.push(r.h(M.FormField,{type:"single-checkbox",modelValue:n.selected})),s(ot.bind(null,t,!0));break}case"select":{c.push(r.h(M.FormField,{type:"single-radio",modelValue:n.selected})),s(ot.bind(null,t,!1));break}}if(e.onClick&&s(e.onClick),e.link)try{const f=e.link(o);if(f){const p=r.h(Me.RouterLink,{to:f});c.push(p),u("widget-table-cell_link")}}catch(f){_n("Can't add router link",f)}if(e.href&&(c.push(r.h("a",{href:e.href(o),target:"_blank"})),u("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&c.push(r.h("p",{class:"widget-list-cell-text"},i)),e.icon&&(typeof e.icon=="string"&&c.push(r.h(ge,{name:e.icon})),typeof e.icon=="function")){const f=e.icon(o);f!==null&&c.push(r.h(ge,{name:f}))}return e.class&&(typeof e.class=="function"?u(e.class(o)):u(e.class)),I.listCellHandler&&I.listCellHandler(e,o,{cellNodeChildren:c,addClass:u,addHandleClick:s,context:t}),l.push(r.h("td",a,c)),l}function ot(e,n){e.emit("select",n)}function Ue(e,n){return()=>{try{return Cn(e,n)}catch(t){return console.warn(t),null}}}const An={props:{values:Object,config:Object,selected:Boolean},setup:Ue},Sn=["colspan"],it=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]=s=>t("close")),onSave:a[1]||(a[1]=s=>t("save",s))}),null,16,["values","new"]))],8,Sn)],512))}}),In={class:"widget-table"},at="update:selectedRows",Nn="update:activeRow",Et=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1},useMockField:{type:Boolean,default:!1}},emits:["save","order"],setup(e,{emit:n}){const t=e,o=n,i=r.useSlots(),a=r.computed(()=>{var d;return(d=i==null?void 0:i.default)==null?void 0:d.call(i)[0]});function s(d){return t.useMockField?pt(d):d}function u(d,y=!0){if(!t.selectedRows)return;if(!y)return o(at,t.selectedRows.includes(d)?[]:[d]);const m=[...t.selectedRows],h=m.indexOf(d);return h===-1?m.push(d):m.splice(h,1),o(at,m)}function l(d){o(Nn,d)}function c(d){o("save",d),o("update:activeRow",null)}const f=r.computed(()=>t.shortcut?t.config.filter(d=>d.name?!!t.array.find(m=>![null,""].includes(Ne(d,m))):!0):t.config),p=r.computed(()=>t.useMockField?t.array.filter(pt):t.array);return(d,y)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",In,[r.createElementVNode("thead",null,[r.createVNode(cn,{config:f.value,onOrder:y[0]||(y[0]=m=>d.$emit("order",m))},{default:r.withCtx(m=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(d.$slots["head-cell"]||yt),r.normalizeProps(r.guardReactiveProps(m)),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.value,(m,h)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:h},[r.createVNode(An,{config:f.value,values:m,selected:d.selectedRows.includes(s(m)),onSelect:w=>u(s(m),w),onActivate:w=>l(s(m)),class:r.normalizeClass(d.classCallback?d.classCallback(m):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),a.value&&d.activeRow===s(m)?(r.openBlock(),r.createBlock(it,{key:0,component:a.value,"row-length":d.config.length,values:m,onClose:y[1]||(y[1]=w=>o("update:activeRow",null)),onSave:c,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),d.activeRow===r.unref(A).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(it,{key:0,component:a.value,"row-length":f.value.length,onClose:y[2]||(y[2]=m=>o("update:activeRow",null)),onSave:c,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])])]))}}),Ln=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))}}),he=H(Ln,[["__scopeId","data-v-0ef9ae88"]]),On={class:"widget-button"},Rn=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("button",On,[n.wait?(r.openBlock(),r.createBlock(he,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"default",{},void 0,!0)]))}}),$n=H(Rn,[["__scopeId","data-v-450dc564"]]),Bn={class:"widget-multi-button-wrap position_relative cursor_pointer"},Fn={class:"widget-multi-button-body grid"},Dn=["onClick"],xn={class:"widget-multi-button-side-wrap"},Pn=r.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){r.useCssVars(s=>({"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(s){if(!(typeof s!="function"||t.wait))return t.wait=!0,Promise.resolve().then(s).finally(()=>{t.wait=!1})}function a(s=!t.active){t.active=s}return(s,u)=>(r.openBlock(),r.createElementBlock("div",Bn,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",t.active?"widget-multi-button_active":null])},[r.createElementVNode("div",Fn,[s.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:u[0]||(u[0]=l=>a())},r.toDisplayString(s.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.array,(l,c)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:c,onClick:f=>{i(l.callback),a(!1)}},r.toDisplayString(l.label),9,Dn))),128))]),r.createElementVNode("div",xn,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",t.active?"widget-multi-button-side_active":null]),onClick:u[1]||(u[1]=l=>a())},[t.wait?(r.openBlock(),r.createBlock(r.unref(he),{key:0,class:"widget-multi-button-side-spinner"})):s.array.length>1?(r.openBlock(),r.createBlock(r.unref(ge),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}}),Vn=H(Pn,[["__scopeId","data-v-d43a76ce"]]),Mn={class:"widget-loader flex flex-align_center gap_10 padding_15"},jn={class:"text_md"},kt=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("div",Mn,[r.createVNode(he,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",jn,r.toDisplayString(n.label),1)]))}}),Un=["alt","src"],Wn=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,Un))}}),qn={props:{config:Array,values:Object,selected:Boolean},setup:Ue},Gn=H(qn,[["__scopeId","data-v-344a8cc1"]]),zn=e=>(r.pushScopeId("data-v-bf495d6a"),e=e(),r.popScopeId(),e),Hn={class:"widget-list-head-cell"},Xn=zn(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Yn=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",Hn,[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(M.FormField),{key:0,type:"single-checkbox",onClick:a[0]||(a[0]=r.withModifiers(s=>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]=s=>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(ge),{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),Xn])]))}}),Jn=H(Yn,[["__scopeId","data-v-bf495d6a"]]),Kn=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 c(m,h){let w=-1;do w++,h-=m[w];while(h>0&&w<m.length);return w}function f(m,h){let w=0;for(;h>0&&h>m[w]&&w<m.length;)h-=m[w],w++;return console.log(h,w),w>0?w:0}function p(m){try{a.value.style.insetInlineStart=m+"px"}catch(h){console.log(h)}}function d(m){try{a.value.style.width=m+"px",a.value.style.minWidth=m+"px",a.value.style.maxWidth=m+"px"}catch(h){console.log(h)}}function y(m){return m===null?!1:m.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(h){var P;function w(D){return D.screenX+b-U}const g=i.value,v=[...g.children].filter(D=>D.localName==="th"),b=((P=g.offsetParent)==null?void 0:P.scrollLeft)||0,T=v.map(D=>D.clientWidth),F=y(h.target),U=g.getBoundingClientRect().left,_=w(h),k=c(T,_),S=T.slice(0,k).reduce((D,V)=>D+V,0),O=_-S,E=g.offsetWidth,C=v[k].clientWidth;if(t.config[k].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",h.screenX),console.log("Widths",T),console.log("max width",E),console.log("Start Position",_),console.log("Position From",k),console.log("Start Position",k),console.log("Global offset (Отступ самой таблицы от края экрана)",U),console.log("Del",O),console.groupEnd(),a.value.innerText=v[k].textContent||"",a.value.style.display="grid",a.value.style.width=C+"px",a.value.style.cursor="grabbing",p(S),d(C),document.addEventListener("pointermove",j,{passive:!0}),document.addEventListener("pointerup",R);function R(D){if(console.group("END"),document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",R),F&&(t.config[k].width=a.value.style.width,t.config[k].minWidth=a.value.style.width,t.config[k].maxWidth=a.value.style.width,s(t.config)),!F){const V=D.screenX+b-U;console.log("ENP Position",V);const q=f(T,V);if(console.log(k,"->",q),q!==k){const x=t.config[k],se=t.config;se.splice(k,1),se.splice(q,0,x),s(se)}else{const x=t.config[k].name;u(x)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function j(D){if(F){const x=w(D)-_+C;d(x);return}let V=D.screenX+b-U-O;V<0&&(V=0),V+C>E&&(V=E-C),p(V)}})});function s(c){o("update:config",c)}function u(c){if(!c)return;if(Array.isArray(c)){if(c.length<1)return;c=c[0]}if(t.order.length===0||t.order[0]!==c)return void l([c]);const f=t.order.length===1||t.order[1]==="asc"?"asc":"desc";l([c,f==="asc"?"desc":"asc"])}function l(c){o("update:order",c)}return(c,f)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:i},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.config,(p,d)=>(r.openBlock(),r.createBlock(Jn,r.mergeProps({key:p,ref_for:!0},p,{onOrder:y=>u(p.name),onSelect:f[0]||(f[0]=y=>o("select")),order:c.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:a},"test",512)],512))}}),Qn=H(Kn,[["__scopeId","data-v-ccffc6bd"]]),Zn={class:"widget-list"},er={class:"widget-list-body position_relative"},tr=50,nr=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(l,c=!0){if(t.selectedRows)if(!c)s(t.selectedRows.includes(l)?[]:[l]);else{const f=[...t.selectedRows],p=f.indexOf(l);p===-1?f.push(l):f==null||f.splice(p,1),s(f)}}function a(){var l;if(((l=t.selectedRows)==null?void 0:l.length)!==t.array.length)return s([...t.array]);s([])}function s(l){o("update:selectedRows",l)}function u(l){if(!l)return;const c=l.target;c.scrollTop+c.clientHeight+tr>c.scrollHeight&&o("scrollEnd")}return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:u},[r.createElementVNode("table",Zn,[r.createElementVNode("thead",null,[r.createVNode(Qn,{onSelect:c[0]||(c[0]=f=>a()),"onUpdate:order":c[1]||(c[1]=f=>o("update:order",f)),"onUpdate:config":c[2]||(c[2]=f=>o("update:config",f)),config:l.config,order:l.order},null,8,["config","order"])]),r.createElementVNode("tbody",er,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(f,p)=>{var d;return r.openBlock(),r.createBlock(Gn,{key:p,class:"widget-list-row",values:f,config:l.config,selected:(d=l.selectedRows)==null?void 0:d.includes(f),onSelect:y=>i(f,y)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function We(){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(A.VISIBLE_ITEM_PROVIDE_NAME,{show(s){t[s]=!0},hide(s){t[s]=!1},remove(s){delete t[s]}});const o=r.inject(A.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}}const rr=r.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{}},setup(e){const n=e,t=Re(),o=Ke(),i=r.computed(()=>{var h,w;const d=l.value,y=c(d),m={type:y,disabled:!((h=u.value)!=null&&h.canSet),label:n.label};return d&&Object.assign(m,{suffix:y==="number"?d.valueUnit:void 0,required:s.includes(y||"")?!1:d.required,label:n.label||d.displayName}),Object.assign(m,((w=I.fieldParamsHandler)==null?void 0:w.call(I,d,u.value,m))||{}),m}),a=["MultiText","MultiWideText"],s=["switch","single-checkbox","single-radio"],u=r.computed(()=>{var d;return(d=o==null?void 0:o.value)==null?void 0:d.fields[n.name]}),l=r.computed(()=>{if(!t.value)return;const d=t.value.fieldsByName[n.name];if(d)return d});function c(d){if(typeof n.type=="string"&&n.type.length!==0)return n.type;if(d){if(d.type==="Reference"||d.type==="Owned")return d.referencedEntity;if(d.dataType==="Boolean")return"single-checkbox";if(d.dataType==="DateTime")return"date";if(d.dataType==="Integer"||d.dataType==="Decimal")return"number";if(d.dataType==="List")return d.aggregatedEntity;if(a.includes(d.presentationType))return"textarea";if(d.presentationType==="PhoneNumber")return"tel"}return"text"}const f=r.computed(()=>{var d;return((d=u.value)==null?void 0:d.canGet)===!0}),{controller:p}=We();return r.watch(()=>f.value,d=>d?p.show():p.hide(),{immediate:!0}),r.onUnmounted(()=>p.remove()),(d,y)=>f.value?(r.openBlock(),r.createBlock(r.unref(M.FormField),r.mergeProps({key:0},{...d.$attrs,...i.value},{name:d.name}),null,16,["name"])):r.createCommentVNode("",!0)}});function or(e){return Array.isArray(e)&&(e==null?void 0:e[1])||A.DEFAULT_ORDER_DIR}const ir=["fill"],ar=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),sr=[ar],lr=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},sr,8,ir))}}),cr={class:"widget-fast-table-head-cell-td"},ur={class:"widget-head-cell-label"},fr={key:0,class:"widget-head-cell-order"},dr=r.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{}},setup(e){const n=e,t=r.computed(()=>je(n.name));return r.computed(()=>or(n.order)),(o,i)=>{var a;return r.openBlock(),r.createElementBlock("td",cr,[r.createElementVNode("div",{class:"widget-head-cell",onClick:i[0]||(i[0]=s=>o.$emit("order",o.name))},[r.createElementVNode("span",ur,r.toDisplayString(o.label),1),t.value===((a=o.order)==null?void 0:a[0])?(r.openBlock(),r.createElementBlock("div",fr,[r.createVNode(lr,{color:"var(--color-primary)",class:r.normalizeClass(["widget-head-cell-order-icon",`widget-head-cell-order-icon_${o.order[1]==="desc"?"desc":"asc"}`])},null,8,["class"])])):r.createCommentVNode("",!0)])])}}}),_t=H(dr,[["__scopeId","data-v-9db5d417"]]),pr=["fill"],gr=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),mr=[gr],hr=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},mr,8,pr))}}),vr={class:"widget-filter-item-popup"},yr=r.defineComponent({__name:"widget-table-panel-filter-item",props:{entity:{},values:{},filterItem:{}},emits:["update:values"],setup(e,{emit:n}){const t=e,o=n,i=I.tableFilterEntityBind,a=r.ref(),s=r.computed(()=>{const y=t.filterItem;return y.entity?"Entity":y.type?y.type:null});function u(y){l.value=y==="start"}const l=r.ref(!1),c=r.computed(()=>Array.isArray(t.values)||typeof t.values=="string"?t.values.length>0:!!t.values),f=r.ref(!1);let p=null;function d(y=!f.value){f.value=y,!f.value&&p?(p(),p=null):a.value&&(p=M.utils.clickOutside(a.value,d.bind(null,!1)))}return(y,m)=>{var h;return r.openBlock(),r.createElementBlock("div",{class:"widget-filter-item-container grid",ref_key:"refFilterItem",ref:a},[r.createElementVNode("div",{class:"widget-filter-item",onClick:m[0]||(m[0]=()=>d())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":c.value}])},r.toDisplayString(y.filterItem.label||"--"),3),l.value?(r.openBlock(),r.createBlock(he,{key:0})):(r.openBlock(),r.createBlock(hr,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":f.value})},null,8,["class"]))]),r.withDirectives(r.createElementVNode("div",vr,[s.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((h=r.unref(i))==null?void 0:h[s.value]),{key:0,"field-metadata":y.filterItem,values:y.values,"onUpdate:values":m[1]||(m[1]=w=>o("update:values",w)),onReadProcess:u},null,40,["field-metadata","values"])):r.createCommentVNode("",!0)],512),[[r.vShow,f.value]])],512)}}}),Ct=H(yr,[["__scopeId","data-v-5b9128bc"]]),wr={class:"widget-table-panel-filter flex"},br=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,s){o("update:filters",{...t.filters,[a]:s})}return(a,s)=>(r.openBlock(),r.createElementBlock("div",wr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.filtersConfig,(u,l)=>{var c;return r.openBlock(),r.createBlock(Ct,{key:l,entity:a.entity,"filter-item":u,values:(c=a.filters)==null?void 0:c[r.unref(pe)(u)],"onUpdate:values":f=>i(r.unref(pe)(u),f)},null,8,["entity","filter-item","values","onUpdate:values"])}),128))]))}}),Er=H(br,[["__scopeId","data-v-f1534314"]]),kr=r.defineComponent({__name:"widget-fast-table-button-download-csv",props:{settings:{},label:{default:"Save as CSV"}},setup(e){const n=e;function t(){J.openModal(A.MODAL_LIST_DOWNLOAD,n)}return(o,i)=>{const a=r.resolveComponent("widget-button");return r.openBlock(),r.createBlock(a,{onClick:t,label:o.label,icon:"list-download"},null,8,["label"])}}}),_r=r.defineComponent({__name:"widget-fast-table-button-reload",props:{loading:{type:Boolean}},setup(e){return(n,t)=>{const o=r.resolveComponent("widget-button");return r.openBlock(),r.createBlock(o,{label:"Reload",icon:"reload",loading:n.loading},null,8,["loading"])}}}),Cr={class:"es-grid es-gap-15"},Tr={key:0,class:"title-md color-primary margin-0 widget-fast-table-label"},Ar={class:"widget-fast-table-tools es-flex es-gap-15"},Sr={class:""},Ir=r.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{},hideLabel:{type:Boolean}},setup(e,{expose:n}){const t=e,o=Me.useRouter(),i=r.ref([]),a=r.ref(null),s=r.ref(null),u=r.ref(null),l=M.Form.getParentForm(),c=r.ref();Re(t.entity);const{state:f,update:p}=Ke(t.entity,{masterEntities:t.masterEntities||[]}),d=r.inject(A.PROVIDE_NAME_ACTIONS,[]),y=r.computed(()=>{var R,j;const E=((R=d==null?void 0:d.actions)==null?void 0:R.value)||[];return(((j=a.value)==null?void 0:j.tools)||[]).map(P=>{const D=E.find(V=>V.name===P.name);return D?{...D,...P}:null}).filter(P=>!!P)}),m=r.computed(()=>a.value?Ht(t.entity,a.value.config):[]),h=r.computed(()=>{var E;return((E=a.value)==null?void 0:E.displayItem)||Je.inline}),w=r.computed(()=>{var E;return((E=a.value)==null?void 0:E.newItem)||h.value}),g=ke(async()=>{try{await b.call(),await p()}catch(E){const{message:C}=qe(E);s.value=C}});l instanceof M.Form&&l.subscribe({read:g.call.bind(null),name:t.entity,type:"table"}),r.onMounted(()=>{v.call(),g.call()});const v=ke(async function(){const C=t.entity;a.value=await It(C,t.mark)}),b=ke(async function(){var R,j,P;const C=t.entity;s.value=null,v.promise&&await v.promise,i.value=(await ie(C,{customFilters:((R=a.value)==null?void 0:R.customFilters)||[],fields:ze(m.value).join(" "),order:((j=a.value)==null?void 0:j.order)||[],filter:B.and(B(k.value),B(t.binding||{}),B(((P=a.value)==null?void 0:P.prefilters)||{}))})).map(ri)});async function T(E){var R;if(E===null)return u.value=null;const C=E==null?void 0:E.Id;if(!C&&((R=a.value)!=null&&R.linkNew))return o.push(a.value.linkNew);if(h.value==="form")return o.push(Ye(t.entity,C));if(h.value==="inline")return u.value=E||A.LIST_ACTIVE_NEW;h.value==="modal"?(await J.promptModal("form",{entity:t.entity,id:C}),await b.call()):u.value=A.LIST_ACTIVE_NEW}const{controller:F}=We();r.watch(()=>f.value,E=>{E&&(E.canRead?F.show():F.hide())},{immediate:!0}),r.onUnmounted(()=>F.remove());let U=[me.on("affected-entity",E=>{E.name===t.entity&&b.call()}),me.on("display-entity",async E=>{E.name===t.entity&&(b.promise&&await b.promise,u.value=i.value.find(C=>C.Id===E.id)||null)})];r.onUnmounted(()=>U.map(E=>E()));function _(E){var V;function C(q){return Array.isArray(q)?C(q[0]):typeof q!="string"?null:q}const R=C(E);if(!R)return;const j=((V=a.value)==null?void 0:V.order)||[];(q=>{if(a.value)return a.value.order=q,!0})(j[0]!==R?[R,"asc"]:j[1]==="desc"?[]:[R,"desc"])&&b.call()}const k=r.ref({});r.watch(()=>k.value,()=>b.call()),n({listSettings:a,array:i,config:m});const S=r.computed(()=>g.wait||v.wait||b.wait);function O(E){var j;const C=(j=E.action.parameters.find(P=>P.dataTypeName==="IntegerArray"))==null?void 0:j.name,R={};C&&(R[C]=c.value.map(P=>P.Id)),E.callback(R)}return(E,C)=>{var P,D,V,q;const R=r.resolveComponent("widget-button"),j=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",Cr,[(P=a.value)!=null&&P.label&&!E.hideLabel?(r.openBlock(),r.createElementBlock("p",Tr,r.toDisplayString((D=a.value)==null?void 0:D.label),1)):r.createCommentVNode("",!0),r.createElementVNode("div",Ar,[w.value==="form"||(V=r.unref(f))!=null&&V.canCreate?(r.openBlock(),r.createBlock(R,{key:0,onClick:T,type:"primary",label:"Add New"})):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,x=>(r.openBlock(),r.createBlock(R,{onClick:()=>O(x),type:x.type,label:x.label},null,8,["onClick","type","label"]))),256)),r.createVNode(kr,{settings:a.value},null,8,["settings"]),r.createCommentVNode("",!0),r.createVNode(_r,{loading:S.value,onClick:C[0]||(C[0]=()=>r.unref(g).call())},null,8,["loading"])]),r.createElementVNode("div",Sr,[r.createVNode(Er,{entity:E.entity,"filters-config":((q=a.value)==null?void 0:q.filters)||[],filters:k.value,"onUpdate:filters":C[1]||(C[1]=x=>k.value=x)},null,8,["entity","filters-config","filters"]),r.createVNode(r.unref(Et),{config:m.value,array:i.value,"active-row":u.value,"onUpdate:activeRow":T,onOrder:_,class:"table",selectedRows:c.value,"onUpdate:selectedRows":C[3]||(C[3]=x=>c.value=x)},{"head-cell":r.withCtx(x=>{var se;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(E.$slots["head-cell"]?E.$slots["head-cell"]:_t),r.mergeProps({label:x.label},x,{onOrder:_,order:((se=a.value)==null?void 0:se.order)||[]}),null,16,["label","order"]))]}),default:r.withCtx(()=>{var x;return[r.createVNode(j,{entity:E.entity,id:(x=u.value)==null?void 0:x.Id,"master-entities":E.masterEntities||void 0,binding:E.binding,onFormUpdate:C[2]||(C[2]=()=>{u.value=null,r.unref(b).call()})},null,8,["entity","id","master-entities","binding"])]}),_:1},8,["config","array","active-row","selectedRows"])])])}}}),Nr=r.defineComponent({__name:"modal-list-download",props:{settings:{}},setup(e){const n=e,t=r.computed(()=>o.finished?"Download CSV":`Download ${o.count} records.`),{state:o,downloadFile:i,reject:a,start:s}=Yt(n.settings);return J.onBeforeModalClose(a),r.onMounted(s),r.watch(()=>o.finished,()=>{i(),J.popModal()}),(u,l)=>{const c=r.resolveComponent("widget-button"),f=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(f,null,{footer:r.withCtx(()=>[r.createVNode(c,{onClick:l[0]||(l[0]=p=>{r.unref(i)(),r.unref(J.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(kt,{label:"Loading"})])]),_:1})}}});function Tt(e){return Ce(e,"YYYY/MM/DD HH:mm:ss")}function Ce(e,n="YYYY/MM/DD"){if(!e)return"";try{const t=new Date(e);return Qt.format(t,n)}catch(t){return console.log(t),"Invalid date"}}function ke(e){function n(...o){if(t.loading)return Promise.reject("The process has already started.");t.loading=!0,t.wait=!0;const i=Promise.resolve().then(()=>e(...o)).finally(()=>{t.wait=!1,t.loading=!1,t.promise=null});return t.promise=i,i}const t=r.reactive({wait:!1,loading:!1,call:n,promise:null});return t}function qe(e){return typeof e=="string"?ye(e):Lr(e)?ye(e.message,e.children||e.details||[]):Or(e)?ye(e.title,[e.detail||""]):ye(A.DEFAULT_ERROR_MESSAGE)}function Lr(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function Or(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function ye(e,n=[]){return{message:e,children:n}}function G(e="error"){return function(n){const{message:t,children:o}=qe(n);Qe.add(e,t,{children:o})}}function ie(e,n={}){return $().emit("entity:read",{...n,entity:e})}function Ge(e,n){return $().emit("entity:update",{...n,entity:e})}function ze(e){return e.reduce((n,t)=>(t.name&&(typeof t.name=="string"?n.push(t.name):n.push(...t.name)),n),[])}function At(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 Rr(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 $r(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function Br(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return A.DEFAULT_ERROR_MESSAGE}})}function z(e,n={}){return Y.isFront&&(n.headers||(n.headers={}),n.headers["Context-Id"]=Y.contextId),n.redirect="manual",fetch(e,n).then(t=>t.type==="opaqueredirect"?void window.location.reload():t).catch(()=>{throw new Error(A.DEFAULT_ERROR_MESSAGE)}).then(t=>Br(t).then(o=>{if(!t.ok)throw o;return o}))}function Fr(e,n=1e3){let t=0;return(...o)=>{clearTimeout(t),t=window.setTimeout(()=>e(...o),n)}}function Dr(e,n){let t=!1;return(...o)=>{if(!t)return t=!0,setTimeout(()=>t=!1,n),e(...o)}}const xr=Ie(Le("pretty-value-field-by-entity"));function Pr(e,n,t){try{const o=Ae.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 xr('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,n,t),t}}const re=Ie(Le("use-socket"));function $(){return Mr}function Vr(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Mr=function(){let e=1,n,t;const o=new Set;let i=0;const a=new Set;function s(){if(n)i&&(clearTimeout(i),i=0);else return;i=setTimeout(()=>{n.close()},pn*2);const g=new Uint8Array(1);g[0]=dn,n.send(g)}setInterval(()=>{Array.from(o).forEach(g=>{w(g)&&(re("Handler for event %s requestId %d was expired",g.event,g.requestId),g.requestId?l({requestId:g.requestId,event:wt,data:{message:te.RequestTookToLong().message}}):o.delete(g))})},1e3),setInterval(()=>{(!n||n.readyState===3)&&c()},A.DELAY_SOCKET_RECONNECT);function u(){return{safeQueue:a,requestId:e,handlers:o,socketInstance:n}}function l(g){const v=[...o.values()];re("Handlers array length is %d. Response event: %s. Request id: %d",o.size,g.event,g.requestId),v.forEach(b=>{const T=g.requestId;(b.requestId&&b.requestId===T||!b.requestId&&b.event===g.event)&&(re("Find appropriated handler: %d, event: %s",e,b.event),b.callback(g.data,g),b.once&&(o.delete(b),re("Handler was removed by *once* params was passed. %o",b)))})}function c(){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(g){re("Connection to server was stopped: %d %s",g.code,g.reason),Array.from(o).forEach(v=>{v.guaranteedAnswer&&v.serializeString&&a.add(v.serializeString)})},n.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(g=>{f(g),a.delete(g)})},n.onerror=function(g){console.warn(g)},n.onmessage=g=>{var v;try{if(Vr(g.data)){s();return}const b=JSON.parse(g.data);if(!St(b)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(b);return}(v=b==null?void 0:b.data)!=null&&v.refresh&&location.reload(),l(b)}catch(b){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(b)}}}function f(g){n.send(g)}function p(g,v){h({event:g,callback:v})}function d(g,v){h({event:g,callback:v,once:!0})}function y(){return n&&(n==null?void 0:n.readyState)===1}function m(g,v,b){const T=++e,F=JSON.stringify({requestId:T,event:g,data:v,contextId:Y.contextId,url:I.socketURLHandler?I.socketURLHandler():window.location.href});return y()?f(F):(a.add(F),re("Socket is not connected. Message was send to save-queue")),new Promise((U,_)=>{h({event:g,requestId:T,once:!0,guaranteedAnswer:!0,serializeString:F,callback:(k,S)=>{if(re("Promise was resolve with next data:",k),jr(S))return void _(k);b&&b(k,S),U(k)},timeToLive:A.TIME_TO_LIVE_SOCKET_REQUEST})})}function h(g){const v={timeToLive:0,...g,created:new Date().getTime()};o.add(v)}function w(g){return g.timeToLive===0||typeof g.timeToLive!="number"?!1:new Date().getTime()-g.created>g.timeToLive}return{get socket(){return n},on:p,once:d,emit:m,initialization(g){t=g},getDevInfo:u}}(),jr=e=>!!St(e)&&e.event===wt,St=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function It(e,n){return $().emit("list-setting:read",{entity:e,mark:n})}function Ur(e,n){return $().emit("metadata-field:treat",{entity:e,fieldName:n})}function Nt(e,n){return $().emit("entity:create",{...n,entity:e})}function Lt(e,n){return $().emit("entity:delete",{...n,entity:e})}function Wr(e,n){return $().emit("usage-context:read",{...n,entity:e})}function Ot(e={}){return $().emit("tool:read",e)}function qr(){return $().emit("metadata-list:read",{})}function Gr(e,n={},t={}){const o=r.inject(A.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:n,a=typeof n=="string"?t:n;return r.computed(()=>{var l;const u=((typeof e=="string"?(l=o==null?void 0:o.actions)==null?void 0:l.value:r.unref(e))||[]).find(c=>c.name===i);return u?{...u,...a}:null})}function zr(e){return $().emit("history:read",e)}function Hr(e,n){return $().emit("entity:count",{...n,entity:e})}function Xr(e){return`/${gn}/${e}`}function fe(e){return{exec(n,t){switch(e.name){case"replace-boolean":return fe.replaceBoolean(n,e.values);case"replace-record-operation":return fe.replaceRecordOperation(n)}}}}fe.replaceBoolean=Yr;fe.replaceRecordOperation=Jr;function Yr(e,n){return typeof e!="boolean"?"":e?n[1]:n[0]}function Jr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Kr(e={}){return $().emit("tool:execute",e)}const Qr=Ie(Le("wrap-tool-response"));function Rt(e,n){return e.handleConfirmation===void 0&&(e.handleConfirmation=to),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=ro),e.handleCloseForm===void 0&&(e.handleCloseForm=oo),e.handleValidationResult===void 0&&(e.handleValidationResult=no),{...n,label:n.title,callback(t={}){var a;const o=typeof e.values=="function"?e.values(n,e):e.values,i=()=>Kr({name:n.name,values:{...o,...t},usageContext:n.usageContext}).then(async s=>{var u,l;if(!Zr(s))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const c of e.handlers)await c(n,s,e);if(!s.success)throw e.handleValidationResult&&s.validationEffect&&((l=(u=s.validationEffect)==null?void 0:u.results)!=null&&l.length)&&e.handleValidationResult(n,s.validationEffect,e),new Error(s.message);return s.message&&Qe.add("info",s.message),Array.isArray(s.affectedEntities)&&e.handleAffectedEntity&&s.affectedEntities.forEach(c=>{var f;return(f=e.handleAffectedEntity)==null?void 0:f.call(e,n,c,e)}),n.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(n,e),s}).catch(G("error"));return(a=e.overrides)!=null&&a[n.name]?e.overrides[n.name](n,e):n.requireSave&&e.form&&e.form.changed?e.form.save().then(i):!n.confirmation||!e.handleConfirmation?i():e.handleConfirmation(n,i)}}}function Zr(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function eo(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 to(e,n){const t=eo(e.confirmation);if(!J.getComponentFromStore(A.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await J.promptModal(A.MODAL_CONFIRM,{message:t}))return n()}function no(e,n){const t=A.MODAL_VALIDATION_EFFECT;if(!J.getComponentFromStore(t))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{J.pushModal(t,n)})}function ro(e,n,t){var l;function o(c){return c!==null&&typeof c=="object"&&typeof c.read=="function"}function i(c,f){c&&(Qr("Affected Entity %s. Find form with name %s.",f,c.name),c.name===f&&o(c)&&c.read(),c instanceof M.Form&&c.dependencies.forEach(p=>i(p,f)))}me.emit("affected-entity",n);const{router:a,form:s}=t,u=(l=n.primaryKey)==null?void 0:l.Id;if(a&&n&&n.name===e.redirectEntity){me.emit("display-entity",{id:u,name:n.name}),I.getEntityLink&&a.push(I.getEntityLink(n.name,u));return}i(s,n.name)}function oo(e,n){const{router:t}=n;t&&e.closeHostForm&&t.back()}let oe={};function ne(e,...n){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let t=M.utils.getPropFromObject((this==null?void 0:this.vocabulary)||oe,e);if(typeof t=="string")return st(t,n);const o=M.utils.getPropFromObject(oe==null?void 0:oe.root,e);return typeof o=="string"?st(o,n):(typeof t===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function st(e,n){return n.forEach((t,o)=>{e=e.replaceAll(new RegExp(`\\{${o}}`,"g"),t)}),e}ne.setGlobalVocabulary=function(e){oe=e};ne.getScope=function(e){const n=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),ne.bind({vocabulary:M.utils.getPropFromObject(oe,n.toLowerCase())})};ne.setVocabulary=function(e){return typeof e=="string"&&(e=M.utils.getPropFromObject(oe,e)),ne.bind({vocabulary:e})};function io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var De={exports:{}},L={},xe={exports:{}},ae={};function $t(){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 ao(e,n,t){}function so(e,n,t){}var lo=/javascript\s*\:/img;function co(e,n){return lo.test(n)?"":n}ae.whiteList=$t();ae.getDefaultWhiteList=$t;ae.onAttr=ao;ae.onIgnoreAttr=so;ae.safeAttrValue=co;var uo={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,"")}},de=uo;function fo(e,n){e=de.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,o=!1,i=0,a=0,s="";function u(){if(!o){var f=de.trim(e.slice(i,a)),p=f.indexOf(":");if(p!==-1){var d=de.trim(f.slice(0,p)),y=de.trim(f.slice(p+1));if(d){var m=n(i,s.length,d,y,f);m&&(s+=m+"; ")}}}i=a+1}for(;a<t;a++){var l=e[a];if(l==="/"&&e[a+1]==="*"){var c=e.indexOf("*/",a+2);if(c===-1)break;a=c+1,i=a+1,o=!1}else l==="("?o=!0:l===")"?o=!1:l===";"?o||u():l===`
7
+ `&&u()}return de.trim(s)}var po=fo,we=ae,go=po;function lt(e){return e==null}function mo(e){var n={};for(var t in e)n[t]=e[t];return n}function Bt(e){e=mo(e||{}),e.whiteList=e.whiteList||we.whiteList,e.onAttr=e.onAttr||we.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||we.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||we.safeAttrValue,this.options=e}Bt.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,s=t.safeAttrValue,u=go(e,function(l,c,f,p,d){var y=o[f],m=!1;if(y===!0?m=y:typeof y=="function"?m=y(p):y instanceof RegExp&&(m=y.test(p)),m!==!0&&(m=!1),p=s(f,p),!!p){var h={position:c,sourcePosition:l,source:d,isWhite:m};if(m){var w=i(f,p,h);return lt(w)?f+":"+p:w}else{var w=a(f,p,h);if(!lt(w))return w}}});return u};var ho=Bt;(function(e,n){var t=ae,o=ho;function i(s,u){var l=new o(u);return l.process(s)}n=e.exports=i,n.FilterCSS=o;for(var a in t)n[a]=t[a];typeof window<"u"&&(window.filterCSS=e.exports)})(xe,xe.exports);var He=xe.exports,Xe={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}},vo=He.FilterCSS,yo=He.getDefaultWhiteList,Te=Xe;function Ft(){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 Dt=new vo;function wo(e,n,t){}function bo(e,n,t){}function Eo(e,n,t){}function ko(e,n,t){}function xt(e){return e.replace(Co,"&lt;").replace(To,"&gt;")}function _o(e,n,t,o){if(t=Wt(t),n==="href"||n==="src"){if(t=Te.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(be.lastIndex=0,be.test(t))return""}else if(n==="style"){if(ct.lastIndex=0,ct.test(t)||(ut.lastIndex=0,ut.test(t)&&(be.lastIndex=0,be.test(t))))return"";o!==!1&&(o=o||Dt,t=o.process(t))}return t=qt(t),t}var Co=/</g,To=/>/g,Ao=/"/g,So=/&quot;/g,Io=/&#([a-zA-Z0-9]*);?/gim,No=/&colon;?/gim,Lo=/&newline;?/gim,be=/((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,ct=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,ut=/u\s*r\s*l\s*\(.*/gi;function Pt(e){return e.replace(Ao,"&quot;")}function Vt(e){return e.replace(So,'"')}function Mt(e){return e.replace(Io,function(t,o){return o[0]==="x"||o[0]==="X"?String.fromCharCode(parseInt(o.substr(1),16)):String.fromCharCode(parseInt(o,10))})}function jt(e){return e.replace(No,":").replace(Lo," ")}function Ut(e){for(var n="",t=0,o=e.length;t<o;t++)n+=e.charCodeAt(t)<32?" ":e.charAt(t);return Te.trim(n)}function Wt(e){return e=Vt(e),e=Mt(e),e=jt(e),e=Ut(e),e}function qt(e){return e=Pt(e),e=xt(e),e}function Oo(){return""}function Ro(e,n){typeof n!="function"&&(n=function(){});var t=!Array.isArray(e);function o(s){return t?!0:Te.indexOf(e,s)!==-1}var i=[],a=!1;return{onIgnoreTag:function(s,u,l){if(o(s))if(l.isClosing){var c="[/removed]",f=l.position+c.length;return i.push([a!==!1?a:l.position,f]),a=!1,c}else return a||(a=l.position),"[removed]";else return n(s,u,l)},remove:function(s){var u="",l=0;return Te.forEach(i,function(c){u+=s.slice(l,c[0]),l=c[1]}),u+=s.slice(l),u}}}function $o(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 Bo(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("")}L.whiteList=Ft();L.getDefaultWhiteList=Ft;L.onTag=wo;L.onIgnoreTag=bo;L.onTagAttr=Eo;L.onIgnoreTagAttr=ko;L.safeAttrValue=_o;L.escapeHtml=xt;L.escapeQuote=Pt;L.unescapeQuote=Vt;L.escapeHtmlEntities=Mt;L.escapeDangerHtml5Entities=jt;L.clearNonPrintableCharacter=Ut;L.friendlyAttrValue=Wt;L.escapeAttrValue=qt;L.onIgnoreTagStripAll=Oo;L.StripTagBody=Ro;L.stripCommentTag=$o;L.stripBlankChar=Bo;L.attributeWrapSign='"';L.cssFilter=Dt;L.getDefaultCSSWhiteList=yo;var Oe={},ee=Xe;function Fo(e){var n=ee.spaceIndex(e),t;return n===-1?t=e.slice(1,-1):t=e.slice(1,n+1),t=ee.trim(t).toLowerCase(),t.slice(0,1)==="/"&&(t=t.slice(1)),t.slice(-1)==="/"&&(t=t.slice(0,-1)),t}function Do(e){return e.slice(0,2)==="</"}function xo(e,n,t){var o="",i=0,a=!1,s=!1,u=0,l=e.length,c="",f="";e:for(u=0;u<l;u++){var p=e.charAt(u);if(a===!1){if(p==="<"){a=u;continue}}else if(s===!1){if(p==="<"){o+=t(e.slice(i,u)),a=u,i=u;continue}if(p===">"||u===l-1){o+=t(e.slice(i,a)),f=e.slice(a,u+1),c=Fo(f),o+=n(a,o.length,c,f,Do(f)),i=u+1,a=!1;continue}if(p==='"'||p==="'")for(var d=1,y=e.charAt(u-d);y.trim()===""||y==="=";){if(y==="="){s=p;continue e}y=e.charAt(u-++d)}}else if(p===s){s=!1;continue}}return i<l&&(o+=t(e.substr(i))),o}var Po=/[^a-zA-Z0-9\\_:.-]/gim;function Vo(e,n){var t=0,o=0,i=[],a=!1,s=e.length;function u(d,y){if(d=ee.trim(d),d=d.replace(Po,"").toLowerCase(),!(d.length<1)){var m=n(d,y||"");m&&i.push(m)}}for(var l=0;l<s;l++){var c=e.charAt(l),f,p;if(a===!1&&c==="="){a=e.slice(t,l),t=l+1,o=e.charAt(t)==='"'||e.charAt(t)==="'"?t:jo(e,l+1);continue}if(a!==!1&&l===o){if(p=e.indexOf(c,l+1),p===-1)break;f=ee.trim(e.slice(o+1,p)),u(a,f),a=!1,l=p,t=l+1;continue}if(/\s|\n|\t/.test(c))if(e=e.replace(/\s|\n|\t/g," "),a===!1)if(p=Mo(e,l),p===-1){f=ee.trim(e.slice(t,l)),u(f),a=!1,t=l+1;continue}else{l=p-1;continue}else if(p=Uo(e,l-1),p===-1){f=ee.trim(e.slice(t,l)),f=ft(f),u(a,f),a=!1,t=l+1;continue}else continue}return t<e.length&&(a===!1?u(e.slice(t)):u(a,ft(ee.trim(e.slice(t))))),ee.trim(i.join(" "))}function Mo(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="="?n:-1}}function jo(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="'"||t==='"'?n:-1}}function Uo(e,n){for(;n>0;n--){var t=e[n];if(t!==" ")return t==="="?n:-1}}function Wo(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function ft(e){return Wo(e)?e.substr(1,e.length-2):e}Oe.parseTag=xo;Oe.parseAttr=Vo;var qo=He.FilterCSS,X=L,Gt=Oe,Go=Gt.parseTag,zo=Gt.parseAttr,_e=Xe;function Ee(e){return e==null}function Ho(e){var n=_e.spaceIndex(e);if(n===-1)return{html:"",closing:e[e.length-2]==="/"};e=_e.trim(e.slice(n+1,-1));var t=e[e.length-1]==="/";return t&&(e=_e.trim(e.slice(0,-1))),{html:e,closing:t}}function Xo(e){var n={};for(var t in e)n[t]=e[t];return n}function Yo(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 zt(e){e=Xo(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=X.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Yo(e.whiteList||e.allowList):e.whiteList=X.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":X.attributeWrapSign,e.onTag=e.onTag||X.onTag,e.onTagAttr=e.onTagAttr||X.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||X.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||X.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||X.safeAttrValue,e.escapeHtml=e.escapeHtml||X.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new qo(e.css))}zt.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,s=t.onTagAttr,u=t.onIgnoreTagAttr,l=t.safeAttrValue,c=t.escapeHtml,f=n.attributeWrapSign,p=n.cssFilter;t.stripBlankChar&&(e=X.stripBlankChar(e)),t.allowCommentTag||(e=X.stripCommentTag(e));var d=!1;t.stripIgnoreTagBody&&(d=X.StripTagBody(t.stripIgnoreTagBody,a),a=d.onIgnoreTag);var y=Go(e,function(m,h,w,g,v){var b={sourcePosition:m,position:h,isClosing:v,isWhite:Object.prototype.hasOwnProperty.call(o,w)},T=i(w,g,b);if(!Ee(T))return T;if(b.isWhite){if(b.isClosing)return"</"+w+">";var F=Ho(g),U=o[w],_=zo(F.html,function(k,S){var O=_e.indexOf(U,k)!==-1,E=s(w,k,S,O);return Ee(E)?O?(S=l(w,k,S,p),S?k+"="+f+S+f:k):(E=u(w,k,S,O),Ee(E)?void 0:E):E});return g="<"+w,_&&(g+=" "+_),F.closing&&(g+=" /"),g+=">",g}else return T=a(w,g,b),Ee(T)?c(g):T},c);return d&&(y=d.remove(y)),y};var Jo=zt;(function(e,n){var t=L,o=Oe,i=Jo;function a(u,l){var c=new i(l);return c.process(u)}n=e.exports=a,n.filterXSS=a,n.FilterXSS=i,function(){for(var u in t)n[u]=t[u];for(var l in o)n[l]=o[l]}(),typeof window<"u"&&(window.filterXSS=e.exports);function s(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}s()&&(self.filterXSS=e.exports)})(De,De.exports);var Ko=De.exports;const Qo=io(Ko);function Zo(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>'),Qo(e)}function ei(e,n,t,o){let i=e+n/60+t/3600;return(o=="S"||o=="W")&&(i=i*-1),i}function ti(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 Ye(e,n){return`/forms/${e}/${n}`}function Ht(e,n,t){const o=ne.getScope(e.toLowerCase());return n.map(i=>(typeof i.label=="string"&&(i.label=o(i.label)),i.type==="history"&&(i.onClick=a=>J.openModal("modal-history",{id:a.Id,entity:e}),i.icon="history",i.class="widget-list-cell-history",i.hint="Open the History"),(i.entity||i.useObjectTypeName)&&Array.isArray(i.name)&&i.name.length>1&&(i.modal===!0?(i.onClick=a=>{J.openModal("form",{entity:dt(i,a),id:a[pe(i)]})},i.class="widget-table-cell_link cursor_pointer"):i.link=a=>{if(typeof a!="object"||a==null)return null;const s=i.name[0],u=a[s];return u?Ye(dt(i,a),u):null},i.value=(a,s)=>s[i.name[1]]),ni(i,i.type,i.presentation),I.listConvertCellConfigHandler&&I.listConvertCellConfigHandler(e,i),i))}function ni(e,n,t){switch(n){case"Decimal":{t==="Money"&&(e.type="money");break}}return e}const dt=(e,n)=>e.useObjectTypeName?n[e.name[2]]:e.entity?e.entity:null;function pt(e){return typeof e!="object"||e===null?null:e[A.TABLE_MOCK_FIELD]}function ri(e,n){return typeof e!="object"||e===null?(console.warn("cell data is not a valid object."),e):(typeof n=="string"||typeof n=="number"||typeof n=="function"?(typeof n=="function"&&(n=n(e)),e[A.TABLE_MOCK_FIELD]=n):e[A.TABLE_MOCK_FIELD]=e.Id,e)}var Je=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(Je||{});function oi(){const e=r.ref(null);function n(t){e.value=t}return{activeRow:e,activateRow:n}}function ii(e,n){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(n)}async function Xt(e,n){e()&&(await n(),await Xt(e,n))}function ai(e,n,t={}){let o=!1;const i=r.ref(""),a=r.computed(()=>s.filter(_=>c(_,i.value))),s=r.reactive([]);let u=0;const l=r.ref(!1);let c=(t==null?void 0:t.filterSearchFn)||((_,k)=>ii(_,k));function f(){return t.masterEntities?typeof t.masterEntities=="function"?t.masterEntities():t.masterEntities:[]}function p(){const _=T();return typeof _.limit!="number"&&(_.limit=100),_.offset=u,(t.request||ie)(e,_).then(S=>(u+=S.length,S))}function d(_,k){var O;return typeof _.Version=="number"?_.Version:(O=s.find(E=>E.Id===k))==null?void 0:O.Version}function y(_,k){const S=s.findIndex(O=>O.Id===_);if(S===-1)throw new Error(`Can't found item with Id ${_}`);s.splice(S,1,k)}function m(_){const k=s.findIndex(S=>S.Id===_);if(k===-1)throw new Error(`Can't found item with Id ${_}`);s.splice(k,1)}async function h(_,k){try{const S=T(),O=d(k,_);delete k.Version,await Ge(e,{id:_,values:k,version:O,masterEntities:f()});const E=await ie(e,{fields:S.fields||"",id:_});y(_,E)}catch(S){G()(S)}}async function w(_,k={}){try{const S=T(),O=d(k,_);delete k.Version,await Lt(e,{id:_,version:O,masterEntities:f()}),m(_)}catch(S){G()(S)}}async function g(_){try{await Nt(e,{values:_,masterEntities:f()}),await F()}catch(k){G()(k)}}let v;async function b(){l.value=!0;try{v!=null&&v.signal&&!v.signal.aborted&&v.abort();let _=v=new AbortController,k=0;const O=T().limit||0;if(i.value&&!O){console.warn("Using textSearch assumes the use of limit.");return}await Xt(()=>(O>0?k<O:!0)&&!o&&!_.signal.aborted,async()=>{const E=await p();_.signal.aborted||(s.push(...E),k+=E.filter(C=>c(C,i.value)).length,(E.length<O||O===0)&&(o=!0))})}catch(_){G()(_)}l.value=!1}function T(){return typeof n=="function"?n():n}async function F(){try{u=0,o=!1,s.splice(0,s.length),await b()}catch(_){G()(_)}}function U(){if(v)return v.abort();l.value=!1}return{array:s,updateById:h,next:b,reload:F,wait:l,create:g,deleteById:w,textSearch:i,filteredArray:a,abort:U}}function si(){function e(){return{organizations:Y.organizations,currentContextId:Y.contextId,person:Y.person,context:Y.context,contextType:Y.contextType,userId:Y.userId}}const n=r.reactive(e());return Y.onupdateContext(()=>{Object.assign(n,e())}),n}function li(e,n,t){return $().emit("communication:create",{entityName:e,entityCatalogId:n,targetCode:t})}function ci(e,n,t){return $().emit("communication:read",{entityName:e,entityCatalogId:n,targetCode:t})}function ui(e,n){return $().emit("communication-message:create",{communicationId:e,text:n})}function fi(e){return $().emit("communication-message:read",{communicationId:e})}function di(e){const n=M.Form.getParentForm(),t=r.reactive([]);return n&&n.subscribe(e),e.read=()=>fi(e.id).then(o=>(t.splice(0,t.length,...o),o)),{array:t}}function pi(e,n){e.read=()=>{const o=t();return Promise.resolve().then(()=>{if(!e.name)throw te.EntityWithoutName(e);return ie(e.name,o)}).then(Ze).then(i=>(i.hasOwnProperty("Version")&&(e.version=i.Version),e.setValues(i),i)).catch(G())},e.save=()=>{const o=t();return Promise.resolve().then(()=>{if(!e.name)throw te.EntityWithoutName(e);return Ge(e.name,{id:o.id,values:e.changes,version:e.version})}).then(i=>{e.version=i.version}).catch(i=>{throw G()(i),i})};function t(){return typeof n=="function"?n():n}}function Re(e){if(!e)return r.inject(A.PROVIDE_NAME_METADATA);Ae.initEntity(e);const n=r.computed(()=>Ae.state[e]);return r.provide(A.PROVIDE_NAME_METADATA,n),n}function Ke(e,n={}){if(!e)return r.inject(A.PROVIDE_NAME_USAGE_CONTEXT);const t=r.ref(null);return r.provide(A.PROVIDE_NAME_USAGE_CONTEXT,t),{state:t,update:async function(){t.value=await Wr(e,gi(n||{}))}}}function gi(e){return typeof e=="function"?e():e}function mi(e){if(!e)return r.inject(A.PROVIDE_NAME_ACTIONS);const n=r.ref(!1),t=r.reactive([]),o=r.computed(()=>t.map(s=>Rt(e,s))),i={actions:o,update:a};r.provide(A.PROVIDE_NAME_ACTIONS,i),e.router=Me.useRouter();function a(){if(n.value)return;n.value=!0,t.splice(0,t.length);const s=e==null?void 0:e.form;return Ot({masterEntities:e==null?void 0:e.masterEntities,id:s==null?void 0:s.id,entity:s==null?void 0:s.name}).then(u=>t.splice(0,0,...u)).catch(G("error")).finally(()=>n.value=!1)}return{actions:o,update:a,loading:r.readonly(n)}}function hi(e){function n(t){t.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",n)}),r.onUnmounted(()=>{document.removeEventListener("keypress",n)})}function vi(e,n={}){const t=r.reactive([]),o=l=>{const c=r.unref(e);if(l===void 0){t.length===0?c.forEach(a):c.forEach(s);return}i(l)?s(l):a(l)},i=l=>t.includes(l),a=l=>{n.handleSelect&&!n.handleSelect(l)||i(l)||t.push(l)},s=l=>{const c=t.findIndex(f=>f===l);c!==-1&&t.splice(c,1)},u=r.computed(()=>{const l=r.unref(e);return t.length===l.length&&l.length!==0});return[t,o,u,a,s]}function yi(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 Be{static async getStartConfig(n,t){return $().emit("wizard:configuration",{process:n,entity:t})}static async startProcess(n,t){return $().emit("wizard:start",{process:n,entity:t})}static async runStep(n,t,o,i,a){return $().emit("wizard:step",{process:n,entity:t,stepName:o,token:i,values:a})}}function wi(e){return e.statusName===W.Completed}function bi(e){return[W.FinalStepWithConfirmation,W.NextStepWithConfirmation].includes(e.statusName)}function Ei(e){return e.statusName===W.ValidationError}function ki(e){return e.statusName===W.Undefined}function _i(e,n,t){let o=null,i=[];const a=r.ref(!1),s=r.ref(null),u=r.computed(()=>p(i,s.value)),l=r.ref(null),c=r.reactive([]),f=r.computed(()=>c.map(v=>p(i,v)));function p(v,b){return v.find(T=>T.name===b)||null}async function d(v){var b;if(ki(v)){await t.onDisplayDataSet(v);return}if(!(bi(v)&&!await t.onDisplayDataSet(v))){if(Ei(v))return void t.onValidation(v.validationResults);h(v),await r.nextTick();{const T=((b=p(i,s.value))==null?void 0:b.fields)||[];if([W.FinalStep,W.NextStep,W.FinalStepWithConfirmation,W.NextStepWithConfirmation].includes(v.statusName)&&(!T.length||Ci(T,t.presets)))return g(t.presets||{})}wi(v)&&t.onCompleted(v)}}async function y(){try{await m(),await w()}catch(v){G("error")(v)}}function m(){return a.value="Loading process information.",Be.getStartConfig(n,e).then(v=>(l.value={label:v.processTitle,info:v.processInfo,icon:v.processIcon},i=v.steps.map(b=>{const T=b.frontendEntity.rootObject,F=Object.fromEntries(b.frontendEntity.objectTypes.map(U=>[U.name,U.properties]));return{label:b.title,name:b.stepName,number:b.number,rootObjectName:T,objectTypes:F,fields:F[T],buttonCaption:b.buttonCaption}}))).finally(()=>{a.value=!1})}function h(v){return[W.FinalStepWithConfirmation,W.NextStepWithConfirmation,W.NextStep,W.Completed,W.FinalStep].includes(v.statusName)?(o=v.token,s.value=v.nextStepName):console.log("Saving is not completed:",v),v}function w(){return a.value="Starting process",Be.startProcess(n,e).then(d).catch(G("error")).finally(()=>{a.value=null})}function g(v={}){const b=s.value;return!o||!b?Promise.reject("Not step or token."):(a.value="Waiting for result...",Be.runStep(n,e,b,o,v).then(d).then(T=>(c[c.length-1]!==b&&c.push(b),T)).catch(G("error")).finally(()=>{a.value=!1}))}return{initialize:y,loading:a,currentStepConfig:u,currentStepName:s,arrayPassedSteps:f,arrayProcessStepName:c,processInfo:l,next:g}}function Ci(e,n){for(let t=0;t<e.length;t++){const o=e[t];if(!M.utils.getPropFromObject(n,o.name))return!1}return!0}function Ti(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 Ai(e){return e.limit||(e.limit=150),e}function Yt(e,n={}){const{limit:t}=Ai(n),{prefilters:o,order:i}=e;if(!e.entity)throw new Error("-");if(!e.config)throw new Error("-");const a=e.entity,s=e.config,u=e.customFilters||[],l=[s.map(h=>f(h.label)).join(",")],c=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function f(h){h===null&&(h=""),h===void 0&&(h="-");let w=typeof h!="string"?String(h):h;return w=w.replace(/"/g,'""'),w.search(/("|,|\n)/g)>=0&&(w='"'+w+'"'),w}function p(){return ie(a,{fields:ze(s).join(" "),limit:t,offset:c.offset,order:i,filter:B(o||{}),customFilters:u.map(h=>{var w;return Ti(h,(w=n.customFiltersData)==null?void 0:w[typeof h=="string"?h:h.name])})}).then(h=>(c.offset+=t,h))}function d(){const h="data:text/csv;charset=utf-8,"+l.join(`\r
8
+ `),w=encodeURI(h),g=document.createElement("a");g.setAttribute("href",w),g.setAttribute("download",`${a}.csv`),document.body.appendChild(g),g.click()}function y(){c.rejected=!0}async function m(){return p().then(h=>{const w=h.map(g=>s.map(v=>f(Ne(v,g))).join(","));return l.push(...w),c.count=l.length,h.length}).then(h=>{if(h!==t&&(c.finished=!0),h===t&&!c.rejected)return m()})}return{downloadFile:d,reject:y,state:c,start:m}}const Qe=new class{constructor(){this.store=r.reactive([])}add(n,t,o={}){const i=Si(o),a=new Pe(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 Si(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 Se=class Se{constructor(n,t,o,i,a){this.type=n,this.message=t,this.timeout=o,this.children=i,this.click=a,this.id=Se.cardId++}};Se.cardId=1;let Pe=Se;/*!
9
9
  * jenesius-event-emitter v1.0.2
10
10
  * (c) 2022 Jenesius
11
11
  * @license MIT
12
- */const gt=function(e,n){return e in this.events||(this.events[e]=[]),this.events[e].push(n),this.off.bind(this,e,n)},mt=function(e,n){e in this.events&&this.events[e].forEach(t=>t(n))},ht=function(e,n){const t=this.events[e];if(!t)return;const o=t.indexOf(n);o!==-1&&t.splice(o,1)},vt=function(){this.events={}};class J{constructor(){this.events={}}on(n,t){return gt.call(this,n,t)}emit(n,t){return mt.call(this,n,t)}off(n,t){return ht.call(this,n,t)}cleanEvents(){vt.call(this)}static on(n,t){return gt.call(J,n,t)}static emit(n,t){return mt.call(J,n,t)}static off(n,t){return ht.call(J,n,t)}static cleanEvents(){vt.call(J)}}J.events={};class Ni extends J{constructor(n){super(),this.name="Communication",this.read=()=>{},this.id=n}sendMessage(n){return fi(this.id,n)}static checkAndGenerate(n,t,o){return ui(n,t,o).then(i=>i.length===0?ci(n,t,o):i[0])}}function Li(){return $().emit("client:read",{})}var ce;const X=class X extends J{constructor(){super(...arguments);rt(this,ce);this.type="front",this.organizations=[],$e(this,ce,!1)}set language(t){localStorage.setItem(A.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(A.LOCALSTORAGE_LANGUAGE_KEY)||X.DEFAULT_LANGUAGE}get contextType(){var t;if(this.contextId)return((t=this.person)==null?void 0:t.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(t){$e(this,ce,t),this.emit(X.EVENT_READY_UPDATE,t)}get ready(){return nt(this,ce)}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=Number(t),localStorage.setItem(A.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.person=t,this.organizations=t.organizations,this.userId=t.userId,this.restoreCurrentContext(),this.ready=!0}catch(t){M()(t)}}restoreCurrentContext(){const t=Number.parseInt(localStorage.getItem(A.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 Li()}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}}};ce=new WeakMap,X.DEFAULT_LANGUAGE="en",X.EVENT_CONTEXT_UPDATE="event:context-update",X.EVENT_READY_UPDATE="event:ready-update";let Ve=X;function Oi(e){return $().emit("metadata:read",{entity:e})}const Te=function(){const n=r.reactive({}),t=new Map;function o(u){return n[u]}async function i(u){if(t.has(u)&&await t.get(u),n[u])return;const s=await a(u);l(u,s)}function a(u){const s=Oi(u).finally(()=>{t.delete(u)});return t.set(u,s),s}function l(u,s){n[u]=s}return{state:n,initEntity:i,get:o,loadingFlags:t}}();class Ri 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 H{static login(n){return U(I.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...n,AppName:I.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 H.requestStepRegistrationProcess("StartRegistration",n)}static confirmPhoneRegistrationProcess(n){return H.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",n)}static confirmEmailRegistrationProcess(n){return H.requestStepRegistrationProcess("ConfirmEmailByRegistration",n)}static finishEmailRegistrationProcess(n){return H.requestStepRegistrationProcess("FinishRegistration",n)}static requestStepRegistrationProcess(n,t){return U(`${I.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)})}static startLoginProcess(n){return H.requestStepLoginProcess("StartLogin",n)}static loginWithPassword(n){return H.requestStepLoginProcess("LoginWithPassword",n)}static loginWithOtpCode(n){return H.requestStepLoginProcess("LoginWithOtpCode",n)}static requestStepLoginProcess(n,t){return U(`${I.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).then(H.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 U(`${I.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 U(`${I.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 U(`${I.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 U(`${I.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 $i{static readHistoryById(n,t){return U(`/close-api/audits/history/${n}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Bi{static getConfiguration(){return U("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(n){return await U(`/open-api/data/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Fi{static getDictionary(n){if(!n)throw new Error(`Can't get dictionary for ${n}.`);return U(`/open-api/internationalization/language/${n}`)}}class Di{static async upload(n,t){const o=new FormData;return o.append("file",n),U(`/close-api/files?entityName=${t}`,{method:"POST",body:o}).then(i=>(i.filename=n.name,i))}}var Kt=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(Kt||{}),Qt=(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))(Qt||{});function xi(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function B(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(xi(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(B.is(t,o)),n)},[]).join(" and ")}function he(e){return typeof e=="string"?`'${e}'`:`${e}`}B.includes=function(n,t){return`@${n} Contains ${he(t)}`};B.beginWith=function(n,t){return`@${n} BeginWith ${he(t)}`};B.notEq=function(n,t){return`@${n} nq ${he(t)}`};B.eq=function(n,t){return Array.isArray(t)?B.in(n,t):`@${n} eq ${he(t)}`};B.in=function(n,t){const o=t.map(he).join(", ");return`@${n} in (${o})`};B.notIn=function(n,t){return!Array.isArray(t)||t.length===0?"":B.and(...t.map(o=>B.notEq(n,o)))};B.and=function(...n){return n.filter(t=>typeof t!="string"||t.trim().length===0?!1:t).map(B.wrap).join(" and ")};B.wrap=function(n){return`(${n})`};B.is=function(n,t){return`@${n} is ${t}`};B.or=function(...n){return n.join(" or ")};function Ze(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=Ze(o)),n[i]=o,n},{})}var V=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(V||{});const G=new Ve,ge=new Ri;exports.ApplicationStatus=Qt;exports.Communication=Ni;exports.CoreError=ee;exports.DisplayListRow=Je;exports.EventBus=ge;exports.Filter=B;exports.Manager=G;exports.MetadataStore=Te;exports.ModalListDownload=Or;exports.NotificationSystem=Qe;exports.OBJECT_TYPE_NAME_FIELD=bt;exports.RecordOperation=Kt;exports.WidgetButton=Bn;exports.WidgetFastTable=Lr;exports.WidgetFastTableHeadCell=_t;exports.WidgetField=or;exports.WidgetIcon=pe;exports.WidgetImage=qn;exports.WidgetList=rr;exports.WidgetLoader=kt;exports.WidgetMultiButton=Mn;exports.WidgetSpinner=me;exports.WidgetTable=Et;exports.WidgetTablePanelFilterItem=Ct;exports.asyncProcess=Ee;exports.authService=H;exports.billingService=se;exports.catchUniversal=M;exports.config=kn;exports.configuration=I;exports.constants=A;exports.convertDDToDMS=ni;exports.convertDMSToDD=ti;exports.convertListConfig=Xt;exports.debounce=xr;exports.documentsService=on;exports.fileService=Di;exports.formatter=ue;exports.getCellName=de;exports.getCellValue=Ie;exports.getEntityLink=Ye;exports.getNamesFromListConfig=ze;exports.getUnitValue=Fe;exports.groupArrayByField=Br;exports.historyService=$i;exports.injectAction=Rt;exports.internationalizationService=Fi;exports.invitationService=rn;exports.openService=Bi;exports.parseError=qe;exports.parseTextByMarkdown=ei;exports.prettyDate=_e;exports.prettyDateWithTime=Tt;exports.prettyMoney=At;exports.prettyValueFieldByEntity=Mr;exports.request=U;exports.setupListRow=Ue;exports.staticLink=Yr;exports.t=te;exports.throttle=Pr;exports.universalEntityCount=Xr;exports.universalEntityCreate=Nt;exports.universalEntityDelete=Lt;exports.universalEntityRead=oe;exports.universalEntityUpdate=Ge;exports.universalHistoryRead=Hr;exports.universalListSettingRead=It;exports.universalMetadataFieldTreat=qr;exports.universalMetadataListRead=zr;exports.universalToolRead=Ot;exports.useActions=hi;exports.useCommunication=pi;exports.useEnter=vi;exports.useFormEntity=gi;exports.useListActiveRow=ii;exports.useListDownload=Jt;exports.useListEntity=si;exports.useListSearch=wi;exports.useListSelect=yi;exports.useManagerState=li;exports.useMetadata=Oe;exports.useSocket=$;exports.useUsageContext=Ke;exports.useVisibleItem=We;exports.useWizard=Ci;exports.uuidv4=Fr;exports.valuesToUpperCase=Ze;exports.wrapToolResponse=$t;
12
+ */const gt=function(e,n){return e in this.events||(this.events[e]=[]),this.events[e].push(n),this.off.bind(this,e,n)},mt=function(e,n){e in this.events&&this.events[e].forEach(t=>t(n))},ht=function(e,n){const t=this.events[e];if(!t)return;const o=t.indexOf(n);o!==-1&&t.splice(o,1)},vt=function(){this.events={}};class Z{constructor(){this.events={}}on(n,t){return gt.call(this,n,t)}emit(n,t){return mt.call(this,n,t)}off(n,t){return ht.call(this,n,t)}cleanEvents(){vt.call(this)}static on(n,t){return gt.call(Z,n,t)}static emit(n,t){return mt.call(Z,n,t)}static off(n,t){return ht.call(Z,n,t)}static cleanEvents(){vt.call(Z)}}Z.events={};class Ii extends Z{constructor(n){super(),this.name="Communication",this.read=()=>{},this.id=n}sendMessage(n){return ui(this.id,n)}static checkAndGenerate(n,t,o){return ci(n,t,o).then(i=>i.length===0?li(n,t,o):i[0])}}function Ni(){return $().emit("client:read",{})}var ue;const Q=class Q extends Z{constructor(){super(...arguments);rt(this,ue);this.type="front",this.organizations=[],$e(this,ue,!1)}set language(t){localStorage.setItem(A.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(A.LOCALSTORAGE_LANGUAGE_KEY)||Q.DEFAULT_LANGUAGE}get contextType(){var t;if(this.contextId)return((t=this.person)==null?void 0:t.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(t){$e(this,ue,t),this.emit(Q.EVENT_READY_UPDATE,t)}get ready(){return nt(this,ue)}onReady(t){return this.on(Q.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(Q.EVENT_CONTEXT_UPDATE,t)}setCurrentContext(t){if(this.contextId===t)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(t),localStorage.setItem(A.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(t)),this.emit(Q.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.person=t,this.organizations=t.organizations,this.userId=t.userId,this.restoreCurrentContext(),this.ready=!0}catch(t){G()(t)}}restoreCurrentContext(){const t=Number.parseInt(localStorage.getItem(A.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 Ni()}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}}};ue=new WeakMap,Q.DEFAULT_LANGUAGE="en",Q.EVENT_CONTEXT_UPDATE="event:context-update",Q.EVENT_READY_UPDATE="event:ready-update";let Ve=Q;function Li(e){return $().emit("metadata:read",{entity:e})}const Ae=function(){const n=r.reactive({}),t=new Map;function o(u){return n[u]}async function i(u){if(t.has(u)&&await t.get(u),n[u])return;const l=await a(u);s(u,l)}function a(u){const l=Li(u).finally(()=>{t.delete(u)});return t.set(u,l),l}function s(u,l){n[u]=l}return{state:n,initEntity:i,get:o,loadingFlags:t}}();class Oi extends Z{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 K{static login(n){return z(I.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...n,AppName:I.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 K.requestStepRegistrationProcess("StartRegistration",n)}static confirmPhoneRegistrationProcess(n){return K.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",n)}static confirmEmailRegistrationProcess(n){return K.requestStepRegistrationProcess("ConfirmEmailByRegistration",n)}static finishEmailRegistrationProcess(n){return K.requestStepRegistrationProcess("FinishRegistration",n)}static requestStepRegistrationProcess(n,t){return z(`${I.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)})}static startLoginProcess(n){return K.requestStepLoginProcess("StartLogin",n)}static loginWithPassword(n){return K.requestStepLoginProcess("LoginWithPassword",n)}static loginWithOtpCode(n){return K.requestStepLoginProcess("LoginWithOtpCode",n)}static requestStepLoginProcess(n,t){return z(`${I.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).then(K.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 z(`${I.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 z(`${I.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 z(`${I.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 z(`${I.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 Ri{static readHistoryById(n,t){return z(`/close-api/audits/history/${n}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class $i{static getConfiguration(){return z("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(n){return await z(`/open-api/data/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Bi{static getDictionary(n){if(!n)throw new Error(`Can't get dictionary for ${n}.`);return z(`/open-api/internationalization/language/${n}`)}}class Fi{static async upload(n,t){const o=new FormData;return o.append("file",n),z(`/close-api/files?entityName=${t}`,{method:"POST",body:o}).then(i=>(i.filename=n.name,i))}}var Jt=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(Jt||{}),Kt=(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))(Kt||{});function Di(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function B(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(Di(o)){let i=function(a){var s;return((s=a.match(/([^Z]*)/))==null?void 0:s[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(B.is(t,o)),n)},[]).join(" and ")}function ve(e){return typeof e=="string"?`'${e}'`:`${e}`}B.includes=function(n,t){return`@${n} Contains ${ve(t)}`};B.beginWith=function(n,t){return`@${n} BeginWith ${ve(t)}`};B.notEq=function(n,t){return`@${n} nq ${ve(t)}`};B.eq=function(n,t){return Array.isArray(t)?B.in(n,t):`@${n} eq ${ve(t)}`};B.in=function(n,t){const o=t.map(ve).join(", ");return`@${n} in (${o})`};B.notIn=function(n,t){return!Array.isArray(t)||t.length===0?"":B.and(...t.map(o=>B.notEq(n,o)))};B.and=function(...n){return n.filter(t=>typeof t!="string"||t.trim().length===0?!1:t).map(B.wrap).join(" and ")};B.wrap=function(n){return`(${n})`};B.is=function(n,t){return`@${n} is ${t}`};B.or=function(...n){return n.join(" or ")};function Ze(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=Ze(o)),n[i]=o,n},{})}var W=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(W||{});const Y=new Ve,me=new Oi;exports.ApplicationStatus=Kt;exports.Communication=Ii;exports.CoreError=te;exports.DisplayListRow=Je;exports.EventBus=me;exports.Filter=B;exports.Manager=Y;exports.MetadataStore=Ae;exports.ModalListDownload=Nr;exports.NotificationSystem=Qe;exports.OBJECT_TYPE_NAME_FIELD=bt;exports.RecordOperation=Jt;exports.WidgetButton=$n;exports.WidgetFastTable=Ir;exports.WidgetFastTableHeadCell=_t;exports.WidgetField=rr;exports.WidgetIcon=ge;exports.WidgetImage=Wn;exports.WidgetList=nr;exports.WidgetLoader=kt;exports.WidgetMultiButton=Vn;exports.WidgetSpinner=he;exports.WidgetTable=Et;exports.WidgetTablePanelFilterItem=Ct;exports.asyncProcess=ke;exports.authService=K;exports.billingService=le;exports.catchUniversal=G;exports.config=En;exports.configuration=I;exports.constants=A;exports.convertDDToDMS=ti;exports.convertDMSToDD=ei;exports.convertListConfig=Ht;exports.debounce=Fr;exports.documentsService=rn;exports.fileService=Fi;exports.formatter=fe;exports.getCellName=pe;exports.getCellValue=Ne;exports.getEntityLink=Ye;exports.getNamesFromListConfig=ze;exports.getUnitValue=Fe;exports.groupArrayByField=Rr;exports.historyService=Ri;exports.injectAction=Gr;exports.internationalizationService=Bi;exports.invitationService=nn;exports.openService=$i;exports.parseError=qe;exports.parseTextByMarkdown=Zo;exports.prettyDate=Ce;exports.prettyDateWithTime=Tt;exports.prettyMoney=At;exports.prettyValueFieldByEntity=Pr;exports.request=z;exports.setupListRow=Ue;exports.staticLink=Xr;exports.t=ne;exports.throttle=Dr;exports.universalEntityCount=Hr;exports.universalEntityCreate=Nt;exports.universalEntityDelete=Lt;exports.universalEntityRead=ie;exports.universalEntityUpdate=Ge;exports.universalHistoryRead=zr;exports.universalListSettingRead=It;exports.universalMetadataFieldTreat=Ur;exports.universalMetadataListRead=qr;exports.universalToolRead=Ot;exports.useActions=mi;exports.useCommunication=di;exports.useEnter=hi;exports.useFormEntity=pi;exports.useListActiveRow=oi;exports.useListDownload=Yt;exports.useListEntity=ai;exports.useListSearch=yi;exports.useListSelect=vi;exports.useManagerState=si;exports.useMetadata=Re;exports.useSocket=$;exports.useUsageContext=Ke;exports.useVisibleItem=We;exports.useWizard=_i;exports.uuidv4=$r;exports.valuesToUpperCase=Ze;exports.wrapToolResponse=Rt;
13
13
  //# sourceMappingURL=eservices-core.cjs.js.map