eservices-core 1.3.215 → 1.3.217
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.
- package/dist/eservices-core.cjs.js +7 -7
- package/dist/eservices-core.es.js +1174 -1116
- package/dist/eservices-core.umd.js +8 -8
- package/dist/frontend/core/index.d.ts +2 -2
- package/dist/frontend/src/hooks/use-actions.d.ts +2 -2
- package/dist/frontend/src/index.d.ts +2 -2
- package/dist/frontend/src/methods/wrap-tool-response.d.ts +1 -1
- package/dist/frontend/src/types/action-type.d.ts +2 -3
- package/dist/frontend/src/types/list-type.d.ts +19 -0
- package/package.json +1 -1
|
@@ -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)}')),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)}.widget-fast-table-tools[data-v-bca968f1]{display:flex;gap:15px}')),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.
|
|
3
|
+
* eservices-core v1.3.217
|
|
4
4
|
* (c) 2024 ESERVICES
|
|
5
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),Me=require("vue-router"),
|
|
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 ce(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 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 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 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]):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 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 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))]))}}),W=(e,n)=>{const t=e.__vccOpts||e;for(const[o,i]of n)t[o]=i;return t},un=W(cn,[["__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 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 Ne(e,n){const t=pe(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=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 pn=1,gn=5e3,mn="static-folder",wt="request-error",bt="Distinguisher",S={LIST_ACTIVE_NEW:"list-active-new",DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",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[S.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=W(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=Re(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=W(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))}},ge=W(_n,[["__scopeId","data-v-8a72b45f"]]),Cn=Ie(Le("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=Ne(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(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: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(Ne(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:w=>u(l(m),w),onActivate:w=>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]=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(S).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))}}),he=W(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(he,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"default",{},void 0,!0)]))}}),Bn=W($n,[["__scopeId","data-v-450dc564"]]),Fn={class:"widget-multi-button-wrap position_relative cursor_pointer"},xn={class:"widget-multi-button-body grid"},Dn=["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",xn,[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,Dn))),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(he),{key:0,class:"widget-multi-button-side-spinner"})):l.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)]))}}),Mn=W(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(he,{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=W(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(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),Yn])]))}}),Kn=W(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 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 v(m){return m===null?!1:m.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(h){var ae;function w(x){return x.screenX+E-V}const g=i.value,y=[...g.children].filter(x=>x.localName==="th"),E=((ae=g.offsetParent)==null?void 0:ae.scrollLeft)||0,T=y.map(x=>x.clientWidth),F=v(h.target),V=g.getBoundingClientRect().left,k=w(h),_=c(T,k),A=T.slice(0,_).reduce((x,B)=>x+B,0),b=k-A,C=g.offsetWidth,O=y[_].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",C),console.log("Start Position",k),console.log("Position From",_),console.log("Start Position",_),console.log("Global offset (Отступ самой таблицы от края экрана)",V),console.log("Del",b),console.groupEnd(),a.value.innerText=y[_].textContent||"",a.value.style.display="grid",a.value.style.width=O+"px",a.value.style.cursor="grabbing",p(A),d(O),document.addEventListener("pointermove",K,{passive:!0}),document.addEventListener("pointerup",X);function X(x){if(console.group("END"),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",X),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 B=x.screenX+E-V;console.log("ENP Position",B);const P=f(T,B);if(console.log(_,"->",P),P!==_){const G=t.config[_],se=t.config;se.splice(_,1),se.splice(P,0,G),l(se)}else{const G=t.config[_].name;u(G)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function K(x){if(F){const G=w(x)-k+O;d(G);return}let B=x.screenX+E-V-b;B<0&&(B=0),B+O>C&&(B=C-O),p(B)}})});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=W(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(S.VISIBLE_ITEM_PROVIDE_NAME,{show(l){t[l]=!0},hide(l){t[l]=!1},remove(l){delete t[l]}});const o=r.inject(S.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){o==null||o.show(n)},hide(){o==null||o.hide(n)},remove(){o==null||o.remove(n)}},visibleItems:t}}const or=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=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,((w=I.fieldParamsHandler)==null?void 0:w.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])||S.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=W(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(he,{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]=w=>o("update:values",w)),onReadProcess:u},null,40,["field-metadata","values"])):r.createCommentVNode("",!0)],512),[[r.vShow,f.value]])],512)}}}),Ct=W(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(pe)(u)],"onUpdate:values":f=>i(r.unref(pe)(u),f)},null,8,["entity","filter-item","values","onUpdate:values"])}),128))]))}}),kr=W(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(){H.openModal(S.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={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}){var A;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();Re(t.entity);const{state:c,update:f}=Ke(t.entity,{masterEntities:t.masterEntities||[]}),p=(t.actions||((A=a.value)==null?void 0:A.actions)||[]).map(b=>Rt(b)),d=r.computed(()=>a.value?Xt(t.entity,a.value.config):[]),v=r.computed(()=>{var b;return((b=a.value)==null?void 0:b.displayItem)||Je.inline}),m=r.computed(()=>{var b;return((b=a.value)==null?void 0:b.newItem)||v.value}),h=ke(async()=>{try{await g.call(),await f()}catch(b){const{message:C}=qe(b);l.value=C}});s instanceof D.Form&&s.subscribe({read:h.call.bind(null),name:t.entity,type:"table"}),r.onMounted(()=>{w.call(),h.call()});const w=ke(async function(){const C=t.entity;a.value=await It(C,t.mark)}),g=ke(async function(){var O,X,K;const C=t.entity;l.value=null,w.promise&&await w.promise,i.value=(await oe(C,{customFilters:((O=a.value)==null?void 0:O.customFilters)||[],fields:ze(d.value).join(" "),order:((X=a.value)==null?void 0:X.order)||[],filter:$.and($(k.value),$(t.binding||{}),$(((K=a.value)==null?void 0:K.prefilters)||{}))})).map(ni)});async function y(b){var O;if(b===null)return u.value=null;const C=b==null?void 0:b.Id;if(!C&&((O=a.value)!=null&&O.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=b||S.LIST_ACTIVE_NEW;v.value==="modal"?(await H.promptModal("form",{entity:t.entity,id:C}),await g.call()):u.value=S.LIST_ACTIVE_NEW}const{controller:E}=We();r.watch(()=>c.value,b=>{b&&(b.canRead?E.show():E.hide())},{immediate:!0}),r.onUnmounted(()=>E.remove());const T={icon:"reload",label:"Reload",process:h};let F=[me.on("affected-entity",b=>{b.name===t.entity&&g.call()}),me.on("display-entity",async b=>{b.name===t.entity&&(g.promise&&await g.promise,u.value=i.value.find(C=>C.Id===b.id)||null)})];r.onUnmounted(()=>F.map(b=>b()));function V(b){var x;function C(B){return Array.isArray(B)?C(B[0]):typeof B!="string"?null:B}const O=C(b);if(!O)return;const X=((x=a.value)==null?void 0:x.order)||[];(B=>{if(a.value)return a.value.order=B,!0})(X[0]!==O?[O,"asc"]:X[1]==="desc"?[]:[O,"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||w.wait||g.wait);return(b,C)=>{var K,ae,x,B;const O=r.resolveComponent("widget-button"),X=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",Cr,[(K=a.value)!=null&&K.label&&!b.hideLabel?(r.openBlock(),r.createElementBlock("p",Tr,r.toDisplayString((ae=a.value)==null?void 0:ae.label),1)):r.createCommentVNode("",!0),r.createElementVNode("div",Ar,[m.value==="form"||(x=r.unref(c))!=null&&x.canCreate?(r.openBlock(),r.createBlock(O,{key:0,onClick:y,type:"primary",label:"Add New"})):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(p).filter(P=>!!P.value),P=>{var G,se;return r.openBlock(),r.createBlock(O,{click:(G=P.value)==null?void 0:G.callback,type:"primary",label:(se=P.value)==null?void 0:se.label},null,8,["click","label"])}),256)),r.createVNode(_r,{settings:a.value},null,8,["settings"]),r.createCommentVNode("",!0),r.createVNode(O,{label:T.label,icon:T.icon,loading:_.value,onClick:C[0]||(C[0]=()=>T.process.call())},null,8,["label","icon","loading"])]),r.createElementVNode("div",Sr,[r.createVNode(kr,{entity:b.entity,"filters-config":((B=a.value)==null?void 0:B.filters)||[],filters:k.value,"onUpdate:filters":C[1]||(C[1]=P=>k.value=P)},null,8,["entity","filters-config","filters"]),r.createVNode(r.unref(Et),{config:d.value,array:i.value,"active-row":u.value,"onUpdate:activeRow":y,onOrder:V,class:"table"},{"head-cell":r.withCtx(P=>{var G;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(b.$slots["head-cell"]?b.$slots["head-cell"]:_t),r.mergeProps({label:P.label},P,{onOrder:V,order:((G=a.value)==null?void 0:G.order)||[]}),null,16,["label","order"]))]}),default:r.withCtx(()=>{var P;return[r.createVNode(X,{entity:b.entity,id:(P=u.value)==null?void 0:P.Id,"master-entities":b.masterEntities||void 0,binding:b.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"])])])}}}),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:l}=Jt(n.settings);return H.onBeforeModalClose(a),r.onMounted(l),r.watch(()=>o.finished,()=>{i(),H.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(H.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 Zt.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(S.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 j(e="error"){return function(n){const{message:t,children:o}=qe(n);Qe.add(e,t,{children:o})}}function oe(e,n={}){return R().emit("entity:read",{...n,entity:e})}function Ge(e,n){return R().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 S.DEFAULT_ERROR_MESSAGE}})}function U(e,n={}){return z.isFront&&(n.headers||(n.headers={}),n.headers["Context-Id"]=z.contextId),n.redirect="manual",fetch(e,n).then(t=>t.type==="opaqueredirect"?void window.location.reload():t).catch(()=>{throw new Error(S.DEFAULT_ERROR_MESSAGE)}).then(t=>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 xr(e,n){let t=!1;return(...o)=>{if(!t)return t=!0,setTimeout(()=>t=!1,n),e(...o)}}const Dr=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 Dr('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,n,t),t}}const ne=Ie(Le("use-socket"));function R(){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 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=>{w(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()},S.DELAY_SOCKET_RECONNECT);function u(){return{safeQueue:a,requestId:e,handlers:o,socketInstance:n}}function s(g){const y=[...o.values()];ne("Handlers array length is %d. Response event: %s. Request id: %d",o.size,g.event,g.requestId),y.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(y=>{y.guaranteedAnswer&&y.serializeString&&a.add(y.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 y;try{if(Vr(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}(y=E==null?void 0:E.data)!=null&&y.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,y){h({event:g,callback:y})}function d(g,y){h({event:g,callback:y,once:!0})}function v(){return n&&(n==null?void 0:n.readyState)===1}function m(g,y,E){const T=++e,F=JSON.stringify({requestId:T,event:g,data:y,contextId:z.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((V,k)=>{h({event:g,requestId:T,once:!0,guaranteedAnswer:!0,serializeString:F,callback:(_,A)=>{if(ne("Promise was resolve with next data:",_),jr(A))return void k(_);E&&E(_,A),V(_)},timeToLive:S.TIME_TO_LIVE_SOCKET_REQUEST})})}function h(g){const y={timeToLive:0,...g,created:new Date().getTime()};o.add(y)}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 R().emit("list-setting:read",{entity:e,mark:n})}function Ur(e,n){return R().emit("metadata-field:treat",{entity:e,fieldName:n})}function Nt(e,n){return R().emit("entity:create",{...n,entity:e})}function Lt(e,n){return R().emit("entity:delete",{...n,entity:e})}function Wr(e,n){return R().emit("usage-context:read",{...n,entity:e})}function Ot(e={}){return R().emit("tool:read",e)}function qr(){return R().emit("metadata-list:read",{})}function Rt(e,n={},t={}){const o=r.inject(S.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:n,a=typeof n=="string"?t:n;return r.computed(()=>{var s;const 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 Gr(e){return R().emit("history:read",e)}function zr(e,n){return R().emit("entity:count",{...n,entity:e})}function Hr(e){return`/${mn}/${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=Xr;fe.replaceRecordOperation=Yr;function Xr(e,n){return typeof e!="boolean"?"":e?n[1]:n[0]}function Yr(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Jr(e={}){return R().emit("tool:execute",e)}const Kr=Ie(Le("wrap-tool-response"));function $t(e,n){return e.handleConfirmation===void 0&&(e.handleConfirmation=eo),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=no),e.handleCloseForm===void 0&&(e.handleCloseForm=ro),e.handleValidationResult===void 0&&(e.handleValidationResult=to),{...n,label:n.title,callback(){var i;const t=typeof e.values=="function"?e.values(n,e):e.values,o=()=>Jr({name:n.name,values:t,usageContext:n.usageContext}).then(async a=>{var l,u;if(!Qr(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(j("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 Qr(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function Zr(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 eo(e,n){const t=Zr(e.confirmation);if(!H.getComponentFromStore(S.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await H.promptModal(S.MODAL_CONFIRM,{message:t}))return n()}function to(e,n){const t=S.MODAL_VALIDATION_EFFECT;if(!H.getComponentFromStore(t))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{H.pushModal(t,n)})}function no(e,n,t){var s;function o(c){return c!==null&&typeof c=="object"&&typeof c.read=="function"}function i(c,f){c&&(Kr("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)))}me.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){me.emit("display-entity",{id:u,name:n.name}),I.getEntityLink&&a.push(I.getEntityLink(n.name,u));return}i(l,n.name)}function ro(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 oo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe={exports:{}},L={},De={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 io(e,n,t){}function ao(e,n,t){}var so=/javascript\s*\:/img;function lo(e,n){return so.test(n)?"":n}ie.whiteList=Bt();ie.getDefaultWhiteList=Bt;ie.onAttr=io;ie.onIgnoreAttr=ao;ie.safeAttrValue=lo;var co={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=co;function uo(e,n){e=de.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,o=!1,i=0,a=0,l="";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)),v=de.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 de.trim(l)}var fo=uo,we=ie,po=fo;function lt(e){return e==null}function go(e){var n={};for(var t in e)n[t]=e[t];return n}function Ft(e){e=go(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}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=po(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 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 mo=Ft;(function(e,n){var t=ie,o=mo;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)})(De,De.exports);var He=De.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}},ho=He.FilterCSS,vo=He.getDefaultWhiteList,Te=Xe;function xt(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var Dt=new ho;function yo(e,n,t){}function wo(e,n,t){}function bo(e,n,t){}function Eo(e,n,t){}function Pt(e){return e.replace(_o,"<").replace(Co,">")}function ko(e,n,t,o){if(t=qt(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=Gt(t),t}var _o=/</g,Co=/>/g,To=/"/g,Ao=/"/g,So=/&#([a-zA-Z0-9]*);?/gim,Io=/:?/gim,No=/&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 Vt(e){return e.replace(To,""")}function Mt(e){return e.replace(Ao,'"')}function jt(e){return e.replace(So,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(Io,":").replace(No," ")}function Wt(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 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 Lo(){return""}function Oo(e,n){typeof n!="function"&&(n=function(){});var t=!Array.isArray(e);function o(l){return t?!0:Te.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 Te.forEach(i,function(c){u+=l.slice(s,c[0]),s=c[1]}),u+=l.slice(s),u}}}function Ro(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 $o(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=xt();L.getDefaultWhiteList=xt;L.onTag=yo;L.onIgnoreTag=wo;L.onTagAttr=bo;L.onIgnoreTagAttr=Eo;L.safeAttrValue=ko;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=Lo;L.StripTagBody=Oo;L.stripCommentTag=Ro;L.stripBlankChar=$o;L.attributeWrapSign='"';L.cssFilter=Dt;L.getDefaultCSSWhiteList=vo;var Oe={},Z=Xe;function Bo(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 Fo(e){return e.slice(0,2)==="</"}function xo(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=Bo(f),o+=n(a,o.length,c,f,Fo(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 Do=/[^a-zA-Z0-9\\_:.-]/gim;function Po(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(Do,"").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:Mo(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=Vo(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=jo(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 Vo(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="="?n:-1}}function Mo(e,n){for(;n<e.length;n++){var t=e[n];if(t!==" ")return t==="'"||t==='"'?n:-1}}function jo(e,n){for(;n>0;n--){var t=e[n];if(t!==" ")return t==="="?n:-1}}function Uo(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function ft(e){return Uo(e)?e.substr(1,e.length-2):e}Oe.parseTag=xo;Oe.parseAttr=Po;var Wo=He.FilterCSS,q=L,zt=Oe,qo=zt.parseTag,Go=zt.parseAttr,_e=Xe;function Ee(e){return e==null}function zo(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 Ho(e){var n={};for(var t in e)n[t]=e[t];return n}function Xo(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=Ho(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=q.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Xo(e.whiteList||e.allowList):e.whiteList=q.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":q.attributeWrapSign,e.onTag=e.onTag||q.onTag,e.onTagAttr=e.onTagAttr||q.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||q.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||q.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||q.safeAttrValue,e.escapeHtml=e.escapeHtml||q.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Wo(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=q.stripBlankChar(e)),t.allowCommentTag||(e=q.stripCommentTag(e));var d=!1;t.stripIgnoreTagBody&&(d=q.StripTagBody(t.stripIgnoreTagBody,a),a=d.onIgnoreTag);var v=qo(e,function(m,h,w,g,y){var E={sourcePosition:m,position:h,isClosing:y,isWhite:Object.prototype.hasOwnProperty.call(o,w)},T=i(w,g,E);if(!Ee(T))return T;if(E.isWhite){if(E.isClosing)return"</"+w+">";var F=zo(g),V=o[w],k=Go(F.html,function(_,A){var b=_e.indexOf(V,_)!==-1,C=l(w,_,A,b);return Ee(C)?b?(A=s(w,_,A,p),A?_+"="+f+A+f:_):(C=u(w,_,A,b),Ee(C)?void 0:C):C});return g="<"+w,k&&(g+=" "+k),F.closing&&(g+=" /"),g+=">",g}else return T=a(w,g,E),Ee(T)?c(g):T},c);return d&&(v=d.remove(v)),v};var Yo=Ht;(function(e,n){var t=L,o=Oe,i=Yo;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)})(xe,xe.exports);var Jo=xe.exports;const Ko=oo(Jo);function Qo(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>'),Ko(e)}function Zo(e,n,t,o){let i=e+n/60+t/3600;return(o=="S"||o=="W")&&(i=i*-1),i}function ei(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=>H.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=>{H.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 l=i.name[0],u=a[l];return u?Ye(dt(i,a),u):null},i.value=(a,l)=>l[i.name[1]]),ti(i,i.type,i.presentation),I.listConvertCellConfigHandler&&I.listConvertCellConfigHandler(e,i),i))}function ti(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[S.TABLE_MOCK_FIELD]}function ni(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[S.TABLE_MOCK_FIELD]=n):e[S.TABLE_MOCK_FIELD]=e.Id,e)}var Je=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(Je||{});function ri(){const e=r.ref(null);function n(t){e.value=t}return{activeRow:e,activateRow:n}}function oi(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 ii(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,_)=>oi(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(A=>(u+=A.length,A))}function d(k,_){var b;return typeof k.Version=="number"?k.Version:(b=l.find(C=>C.Id===_))==null?void 0:b.Version}function v(k,_){const A=l.findIndex(b=>b.Id===k);if(A===-1)throw new Error(`Can't found item with Id ${k}`);l.splice(A,1,_)}function m(k){const _=l.findIndex(A=>A.Id===k);if(_===-1)throw new Error(`Can't found item with Id ${k}`);l.splice(_,1)}async function h(k,_){try{const A=T(),b=d(_,k);delete _.Version,await Ge(e,{id:k,values:_,version:b,masterEntities:f()});const C=await oe(e,{fields:A.fields||"",id:k});v(k,C)}catch(A){j()(A)}}async function w(k,_={}){try{const A=T(),b=d(_,k);delete _.Version,await Lt(e,{id:k,version:b,masterEntities:f()}),m(k)}catch(A){j()(A)}}async function g(k){try{await Nt(e,{values:k,masterEntities:f()}),await F()}catch(_){j()(_)}}let y;async function E(){s.value=!0;try{y!=null&&y.signal&&!y.signal.aborted&&y.abort();let k=y=new AbortController,_=0;const b=T().limit||0;if(i.value&&!b){console.warn("Using textSearch assumes the use of limit.");return}await Yt(()=>(b>0?_<b:!0)&&!o&&!k.signal.aborted,async()=>{const C=await p();k.signal.aborted||(l.push(...C),_+=C.filter(O=>c(O,i.value)).length,(C.length<b||b===0)&&(o=!0))})}catch(k){j()(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){j()(k)}}function V(){if(y)return y.abort();s.value=!1}return{array:l,updateById:h,next:E,reload:F,wait:s,create:g,deleteById:w,textSearch:i,filteredArray:a,abort:V}}function ai(){function e(){return{organizations:z.organizations,currentContextId:z.contextId,person:z.person,context:z.context,contextType:z.contextType,userId:z.userId}}const n=r.reactive(e());return z.onupdateContext(()=>{Object.assign(n,e())}),n}function si(e,n,t){return R().emit("communication:create",{entityName:e,entityCatalogId:n,targetCode:t})}function li(e,n,t){return R().emit("communication:read",{entityName:e,entityCatalogId:n,targetCode:t})}function ci(e,n){return R().emit("communication-message:create",{communicationId:e,text:n})}function ui(e){return R().emit("communication-message:read",{communicationId:e})}function fi(e){const n=D.Form.getParentForm(),t=r.reactive([]);return n&&n.subscribe(e),e.read=()=>ui(e.id).then(o=>(t.splice(0,t.length,...o),o)),{array:t}}function di(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(j())},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 j()(i),i})};function t(){return typeof n=="function"?n():n}}function Re(e){if(!e)return r.inject(S.PROVIDE_NAME_METADATA);Ae.initEntity(e);const n=r.computed(()=>Ae.state[e]);return r.provide(S.PROVIDE_NAME_METADATA,n),n}function Ke(e,n={}){if(!e)return r.inject(S.PROVIDE_NAME_USAGE_CONTEXT);const t=r.ref(null);return r.provide(S.PROVIDE_NAME_USAGE_CONTEXT,t),{state:t,update:async function(){t.value=await Wr(e,pi(n||{}))}}}function pi(e){return typeof e=="function"?e():e}function gi(e){if(!e)return r.inject(S.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(S.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(j("error")).finally(()=>n.value=!1)}return{actions:o,update:a,loading:r.readonly(n)}}function mi(e){function n(t){t.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",n)}),r.onUnmounted(()=>{document.removeEventListener("keypress",n)})}function hi(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 vi(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 R().emit("wizard:configuration",{process:n,entity:t})}static async startProcess(n,t){return R().emit("wizard:start",{process:n,entity:t})}static async runStep(n,t,o,i,a){return R().emit("wizard:step",{process:n,entity:t,stepName:o,token:i,values:a})}}function yi(e){return e.statusName===M.Completed}function wi(e){return[M.FinalStepWithConfirmation,M.NextStepWithConfirmation].includes(e.statusName)}function bi(e){return e.statusName===M.ValidationError}function Ei(e){return e.statusName===M.Undefined}function ki(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(y=>p(i,y)));function p(y,E){return y.find(T=>T.name===E)||null}async function d(y){var E;if(Ei(y)){await t.onDisplayDataSet(y);return}if(!(wi(y)&&!await t.onDisplayDataSet(y))){if(bi(y))return void t.onValidation(y.validationResults);h(y),await r.nextTick();{const T=((E=p(i,l.value))==null?void 0:E.fields)||[];if([M.FinalStep,M.NextStep,M.FinalStepWithConfirmation,M.NextStepWithConfirmation].includes(y.statusName)&&(!T.length||_i(T,t.presets)))return g(t.presets||{})}yi(y)&&t.onCompleted(y)}}async function v(){try{await m(),await w()}catch(y){j("error")(y)}}function m(){return a.value="Loading process information.",Be.getStartConfig(n,e).then(y=>(s.value={label:y.processTitle,info:y.processInfo,icon:y.processIcon},i=y.steps.map(E=>{const T=E.frontendEntity.rootObject,F=Object.fromEntries(E.frontendEntity.objectTypes.map(V=>[V.name,V.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(y){return[M.FinalStepWithConfirmation,M.NextStepWithConfirmation,M.NextStep,M.Completed,M.FinalStep].includes(y.statusName)?(o=y.token,l.value=y.nextStepName):console.log("Saving is not completed:",y),y}function w(){return a.value="Starting process",Be.startProcess(n,e).then(d).catch(j("error")).finally(()=>{a.value=null})}function g(y={}){const E=l.value;return!o||!E?Promise.reject("Not step or token."):(a.value="Waiting for result...",Be.runStep(n,e,E,o,y).then(d).then(T=>(c[c.length-1]!==E&&c.push(E),T)).catch(j("error")).finally(()=>{a.value=!1}))}return{initialize:v,loading:a,currentStepConfig:u,currentStepName:l,arrayPassedSteps:f,arrayProcessStepName:c,processInfo:s,next:g}}function _i(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 Ci(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 Ti(e){return e.limit||(e.limit=150),e}function Jt(e,n={}){const{limit:t}=Ti(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 w=typeof h!="string"?String(h):h;return w=w.replace(/"/g,'""'),w.search(/("|,|\n)/g)>=0&&(w='"'+w+'"'),w}function p(){return oe(a,{fields:ze(l).join(" "),limit:t,offset:c.offset,order:i,filter:$(o||{}),customFilters:u.map(h=>{var w;return Ci(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,"+s.join(`\r
|
|
8
|
-
`),
|
|
5
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),Me=require("vue-router"),x=require("jenesius-vue-form"),Qt=require("date-and-time"),Se=require("debug"),H=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 Q=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 se(e,n={}){return n.redirect="manual",fetch(e,n).then(t=>t.type==="opaqueredirect"?void window.location.replace("/auth"):t).catch(()=>{throw Q.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 se("/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 se("/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 se("/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 ae{static url(){return"close-api/billing"}static getBillingMetadata(n){return fetch(`/${ae.url()}/calculator/${n}`)}static calculate(n,t){return se(`/${ae.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]):Q.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 se(`/${ae.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:n,returnURL:t})})}static applyOnlinePayment(n){return se(`/${ae.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"},vt=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||vt),(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))]))}}),j=(e,n)=>{const t=e.__vccOpts||e;for(const[o,i]of n)t[o]=i;return t},cn=j(ln,[["__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 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"),x.utils.getPropFromObject(n,o))}),e}function Be(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 fn(e.value,n);let o=t?x.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=Be(e.unitValue)(o)),e.unit&&(o=Be(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=ce(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 Ne(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,f)=>{const l=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",mn,[r.createVNode(r.unref(x.FormField),{type:"text",modelValue:i.value,"onUpdate:modelValue":f[0]||(f[0]=c=>i.value=c)},null,8,["modelValue"]),r.createVNode(l,{onClick:a,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(Z)("Apply")),1)]),_:1})])}}}),yn=j(hn,[["__scopeId","data-v-800b3803"]]),vn={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=Le(t.fieldMetadata.entity),a=c=>(t.values||[]).includes(c),s=n;function f(c){const u=t.values||[];return u.includes(c)?s("update:values",u.filter(p=>p!==c)):s("update:values",[...u,c])}async function l(){var p;if(!((p=t.fieldMetadata)!=null&&p.entity)||!i.value)return;const c=i.value.fieldNameForLabel,u=i.value.fieldNameForIdentification;s("readProcess","start"),o.value=await re(t.fieldMetadata.entity,{fields:[c,u].join(" "),order:[c,"asc"]}).then(d=>(s("readProcess","end"),d.map(h=>({label:h[c],value:h[u]}))))}return r.watch(()=>i.value,l,{immediate:!0}),(c,u)=>(r.openBlock(),r.createElementBlock("div",vn,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,p=>(r.openBlock(),r.createBlock(r.unref(x.FormField),{class:"widget-filter-enum-item",key:p.value,onClick:()=>f(p.value),type:"single-checkbox","model-value":a(p.value),label:p.label},null,8,["onClick","model-value","label"]))),128))]))}}),bn=j(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:yn,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))}},pe=j(kn,[["__scopeId","data-v-8a72b45f"]]),_n=Se(Ne("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=Ie(e,o);const a={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function s(u){a.onClick.push(()=>u(o,e,t))}function f(u){Array.isArray(u)?a.class.push(...u):a.class.push(u)}const l=[],c=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(f(`widget-table-cell_${e.type}`),e.type){case"multi-select":{c.push(r.h(x.FormField,{type:"single-checkbox",modelValue:n.selected})),s(ot.bind(null,t,!0));break}case"select":{c.push(r.h(x.FormField,{type:"single-radio",modelValue:n.selected})),s(ot.bind(null,t,!1));break}}if(e.onClick&&s(e.onClick),e.link)try{const u=e.link(o);if(u){const p=r.h(Me.RouterLink,{to:u});c.push(p),f("widget-table-cell_link")}}catch(u){_n("Can't add router link",u)}if(e.href&&(c.push(r.h("a",{href:e.href(o),target:"_blank"})),f("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 u=e.icon(o);u!==null&&c.push(r.h(pe,{name:u}))}return e.class&&(typeof e.class=="function"?f(e.class(o)):f(e.class)),I.listCellHandler&&I.listCellHandler(e,o,{cellNodeChildren:c,addClass:f,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 f(d,h=!0){if(!t.selectedRows)return;if(!h)return o(at,t.selectedRows.includes(d)?[]:[d]);const g=[...t.selectedRows],w=g.indexOf(d);return w===-1?g.push(d):g.splice(w,1),o(at,g)}function l(d){o(Nn,d)}function c(d){o("save",d),o("update:activeRow",null)}const u=r.computed(()=>t.shortcut?t.config.filter(d=>d.name?!!t.array.find(g=>![null,""].includes(Ie(d,g))):!0):t.config),p=r.computed(()=>t.useMockField?t.array.filter(pt):t.array);return(d,h)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",In,[r.createElementVNode("thead",null,[r.createVNode(cn,{config:u.value,onOrder:h[0]||(h[0]=g=>d.$emit("order",g))},{default:r.withCtx(g=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(d.$slots["head-cell"]||vt),r.normalizeProps(r.guardReactiveProps(g)),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.value,(g,w)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:w},[r.createVNode(An,{config:u.value,values:g,selected:d.selectedRows.includes(s(g)),onSelect:v=>f(s(g),v),onActivate:v=>l(s(g)),class:r.normalizeClass(d.classCallback?d.classCallback(g):"")},null,8,["config","values","selected","onSelect","onActivate","class"]),a.value&&d.activeRow===s(g)?(r.openBlock(),r.createBlock(it,{key:0,component:a.value,"row-length":d.config.length,values:g,onClose:h[1]||(h[1]=v=>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":u.value.length,onClose:h[2]||(h[2]=g=>o("update:activeRow",null)),onSave:c,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])])]))}}),Rn=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(Rn,[["__scopeId","data-v-0ef9ae88"]]),Ln={class:"widget-button"},On=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(n,t)=>(r.openBlock(),r.createElementBlock("button",Ln,[n.wait?(r.openBlock(),r.createBlock(me,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"default",{},void 0,!0)]))}}),$n=j(On,[["__scopeId","data-v-450dc564"]]),Fn={class:"widget-multi-button-wrap position_relative cursor_pointer"},Bn={class:"widget-multi-button-body grid"},xn=["onClick"],Dn={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,f)=>(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",Bn,[s.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:f[0]||(f[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:u=>{i(l.callback),a(!1)}},r.toDisplayString(l.label),9,xn))),128))]),r.createElementVNode("div",Dn,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",t.active?"widget-multi-button-side_active":null]),onClick:f[1]||(f[1]=l=>a())},[t.wait?(r.openBlock(),r.createBlock(r.unref(me),{key:0,class:"widget-multi-button-side-spinner"})):s.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)]))}}),Vn=j(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(me,{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=j(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(x.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(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),Xn])]))}}),Jn=j(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(g,w){let v=-1;do v++,w-=g[v];while(w>0&&v<g.length);return v}function u(g,w){let v=0;for(;w>0&&w>g[v]&&v<g.length;)w-=g[v],v++;return console.log(w,v),v>0?v:0}function p(g){try{a.value.style.insetInlineStart=g+"px"}catch(w){console.log(w)}}function d(g){try{a.value.style.width=g+"px",a.value.style.minWidth=g+"px",a.value.style.maxWidth=g+"px"}catch(w){console.log(w)}}function h(g){return g===null?!1:g.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(w){var J;function v(L){return L.screenX+E-D}const m=i.value,y=[...m.children].filter(L=>L.localName==="th"),E=((J=m.offsetParent)==null?void 0:J.scrollLeft)||0,T=y.map(L=>L.clientWidth),B=h(w.target),D=m.getBoundingClientRect().left,k=v(w),_=c(T,k),b=T.slice(0,_).reduce((L,F)=>L+F,0),C=k-b,S=m.offsetWidth,P=y[_].clientWidth;if(t.config[_].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",w.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 (Отступ самой таблицы от края экрана)",D),console.log("Del",C),console.groupEnd(),a.value.innerText=y[_].textContent||"",a.value.style.display="grid",a.value.style.width=P+"px",a.value.style.cursor="grabbing",p(b),d(P),document.addEventListener("pointermove",ie,{passive:!0}),document.addEventListener("pointerup",X);function X(L){if(console.group("END"),document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",X),B&&(t.config[_].width=a.value.style.width,t.config[_].minWidth=a.value.style.width,t.config[_].maxWidth=a.value.style.width,s(t.config)),!B){const F=L.screenX+E-D;console.log("ENP Position",F);const ee=u(T,F);if(console.log(_,"->",ee),ee!==_){const ue=t.config[_],Oe=t.config;Oe.splice(_,1),Oe.splice(ee,0,ue),s(Oe)}else{const ue=t.config[_].name;f(ue)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function ie(L){if(B){const ue=v(L)-k+P;d(ue);return}let F=L.screenX+E-D-C;F<0&&(F=0),F+P>S&&(F=S-P),p(F)}})});function s(c){o("update:config",c)}function f(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 u=t.order.length===1||t.order[1]==="asc"?"asc":"desc";l([c,u==="asc"?"desc":"asc"])}function l(c){o("update:order",c)}return(c,u)=>(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:h=>f(p.name),onSelect:u[0]||(u[0]=h=>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=j(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 u=[...t.selectedRows],p=u.indexOf(l);p===-1?u.push(l):u==null||u.splice(p,1),s(u)}}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 f(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:f},[r.createElementVNode("table",Zn,[r.createElementVNode("thead",null,[r.createVNode(Qn,{onSelect:c[0]||(c[0]=u=>a()),"onUpdate:order":c[1]||(c[1]=u=>o("update:order",u)),"onUpdate:config":c[2]||(c[2]=u=>o("update:config",u)),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,(u,p)=>{var d;return r.openBlock(),r.createBlock(Gn,{key:p,class:"widget-list-row",values:u,config:l.config,selected:(d=l.selectedRows)==null?void 0:d.includes(u),onSelect:h=>i(u,h)},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=Le(),o=Ke(),i=r.computed(()=>{var w,v;const d=l.value,h=c(d),g={type:h,disabled:!((w=f.value)!=null&&w.canSet),label:n.label};return d&&Object.assign(g,{suffix:h==="number"?d.valueUnit:void 0,required:s.includes(h||"")?!1:d.required,label:n.label||d.displayName}),Object.assign(g,((v=I.fieldParamsHandler)==null?void 0:v.call(I,d,f.value,g))||{}),g}),a=["MultiText","MultiWideText"],s=["switch","single-checkbox","single-radio"],f=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 u=r.computed(()=>{var d;return((d=f.value)==null?void 0:d.canGet)===!0}),{controller:p}=We();return r.watch(()=>u.value,d=>d?p.show():p.hide(),{immediate:!0}),r.onUnmounted(()=>p.remove()),(d,h)=>u.value?(r.openBlock(),r.createBlock(r.unref(x.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=j(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))}}),yr={class:"widget-filter-item-popup"},vr=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 h=t.filterItem;return h.entity?"Entity":h.type?h.type:null});function f(h){l.value=h==="start"}const l=r.ref(!1),c=r.computed(()=>Array.isArray(t.values)||typeof t.values=="string"?t.values.length>0:!!t.values),u=r.ref(!1);let p=null;function d(h=!u.value){u.value=h,!u.value&&p?(p(),p=null):a.value&&(p=x.utils.clickOutside(a.value,d.bind(null,!1)))}return(h,g)=>{var w;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:g[0]||(g[0]=()=>d())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":c.value}])},r.toDisplayString(h.filterItem.label||"--"),3),l.value?(r.openBlock(),r.createBlock(me,{key:0})):(r.openBlock(),r.createBlock(hr,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":u.value})},null,8,["class"]))]),r.withDirectives(r.createElementVNode("div",yr,[s.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((w=r.unref(i))==null?void 0:w[s.value]),{key:0,"field-metadata":h.filterItem,values:h.values,"onUpdate:values":g[1]||(g[1]=v=>o("update:values",v)),onReadProcess:f},null,40,["field-metadata","values"])):r.createCommentVNode("",!0)],512),[[r.vShow,u.value]])],512)}}}),Ct=j(vr,[["__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,(f,l)=>{var c;return r.openBlock(),r.createBlock(Ct,{key:l,entity:a.entity,"filter-item":f,values:(c=a.filters)==null?void 0:c[r.unref(de)(f)],"onUpdate:values":u=>i(r.unref(de)(f),u)},null,8,["entity","filter-item","values","onUpdate:values"])}),128))]))}}),Er=j(br,[["__scopeId","data-v-f1534314"]]),kr={class:"widget-fast-table-tools"},_r=r.defineComponent({__name:"widget-fast-table-tools",props:{listSettings:{},loading:{type:Boolean},selectedRows:{},metadata:{}},emits:["reload"],setup(e,{emit:n}){const t=e,o=n,i=[{name:"settings",label:"Settings",icon:"list-settings",buttonStyle:"default",callback:()=>null},{name:"download",label:"Save as CSV",icon:"list-download",buttonStyle:"default",callback:()=>null},{name:"reload",label:"Reload",icon:"reload",buttonStyle:"default",callback:()=>o("reload")}],a=i.map(u=>u.name),s=r.inject(A.PROVIDE_NAME_ACTIONS,[]),f=r.computed(()=>{var g;const u=t.listSettings;if(!u)return[];const p=((g=s==null?void 0:s.actions)==null?void 0:g.value)||[];return(Array.isArray(u.tools)?u.tools:[{buttonStyle:"default",name:"*"}]).reduce((w,v)=>{if(v.name==="*")w.push(...i);else if(a.includes(v.name)){const m=i.find(y=>y.name===v.name);m&&w.push(m)}else{const m=p.find(y=>y.name===v.name);m&&w.push({name:v.name,label:m.title,icon:v.icon,buttonStyle:v.buttonStyle,callback:()=>Promise.resolve().then(()=>{l[v.name]=!0}).then(()=>c(m)).finally(()=>{l[v.name]=!1})})}return w},[])}),l=r.reactive({});function c(u){var h;const p=(h=u.action.parameters.find(g=>g.dataTypeName==="IntegerArray"))==null?void 0:h.name,d={};return p&&(d[p]=t.selectedRows.map(g=>{if(!(typeof g=="object"&&g!==null))return null;const w=t.metadata.fieldNameForIdentification;return w===void 0?null:g[w]})),u.callback(d)}return(u,p)=>{const d=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",kr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.value,h=>(r.openBlock(),r.createBlock(d,{label:h.label,title:h.name,icon:h.icon,type:h.buttonStyle,loading:h.name==="reload"?u.loading:l[h.name],onClick:h.callback},null,8,["label","title","icon","type","loading","onClick"]))),256))])}}}),Cr=j(_r,[["__scopeId","data-v-bca968f1"]]),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),s=r.ref(null),f=r.ref(null),l=x.Form.getParentForm(),c=r.ref(),u=Le(t.entity),{state:p,update:d}=Ke(t.entity,{masterEntities:t.masterEntities||[]}),h=r.computed(()=>a.value?Ht(t.entity,a.value.config):[]),g=r.computed(()=>{var b;return((b=a.value)==null?void 0:b.displayItem)||Je.inline}),w=r.computed(()=>{var b;return((b=a.value)==null?void 0:b.newItem)||g.value}),v=Ee(async()=>{try{await y.call(),await d()}catch(b){const{message:C}=qe(b);s.value=C}});l instanceof x.Form&&l.subscribe({read:v.call.bind(null),name:t.entity,type:"table"}),r.onMounted(()=>{m.call(),v.call()});const m=Ee(async function(){const C=t.entity;a.value=await It(C,t.mark)}),y=Ee(async function(){var S,P,X;const C=t.entity;s.value=null,m.promise&&await m.promise,i.value=(await re(C,{customFilters:((S=a.value)==null?void 0:S.customFilters)||[],fields:ze(h.value).join(" "),order:((P=a.value)==null?void 0:P.order)||[],filter:$.and($(k.value),$(t.binding||{}),$(((X=a.value)==null?void 0:X.prefilters)||{}))})).map(oi)});async function E(b){var S;if(b===null)return f.value=null;const C=b==null?void 0:b.Id;if(!C&&((S=a.value)!=null&&S.linkNew))return o.push(a.value.linkNew);if(g.value==="form")return o.push(Ye(t.entity,C));if(g.value==="inline")return f.value=b||A.LIST_ACTIVE_NEW;g.value==="modal"?(await H.promptModal("form",{entity:t.entity,id:C}),await y.call()):f.value=A.LIST_ACTIVE_NEW}const{controller:T}=We();r.watch(()=>p.value,b=>{b&&(b.canRead?T.show():T.hide())},{immediate:!0}),r.onUnmounted(()=>T.remove());let B=[ge.on("affected-entity",b=>{b.name===t.entity&&y.call()}),ge.on("display-entity",async b=>{b.name===t.entity&&(y.promise&&await y.promise,f.value=i.value.find(C=>C.Id===b.id)||null)})];r.onUnmounted(()=>B.map(b=>b()));function D(b){var J;function C(L){return Array.isArray(L)?C(L[0]):typeof L!="string"?null:L}const S=C(b);if(!S)return;const P=((J=a.value)==null?void 0:J.order)||[];(L=>{if(a.value)return a.value.order=L,!0})(P[0]!==S?[S,"asc"]:P[1]==="desc"?[]:[S,"desc"])&&y.call()}const k=r.ref({});r.watch(()=>k.value,()=>y.call()),n({listSettings:a,array:i,config:h});const _=r.computed(()=>v.wait||m.wait||y.wait);return(b,C)=>{var X,ie,J,L;const S=r.resolveComponent("widget-button"),P=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",Tr,[(X=a.value)!=null&&X.label&&!b.hideLabel?(r.openBlock(),r.createElementBlock("p",Ar,r.toDisplayString((ie=a.value)==null?void 0:ie.label),1)):r.createCommentVNode("",!0),a.value&&r.unref(u)?(r.openBlock(),r.createBlock(Cr,{key:1,metadata:r.unref(u),"list-settings":a.value,loading:_.value,"selected-rows":c.value,onReload:r.unref(v).call},null,8,["metadata","list-settings","loading","selected-rows","onReload"])):r.createCommentVNode("",!0),r.createElementVNode("div",Sr,[w.value==="form"||(J=r.unref(p))!=null&&J.canCreate?(r.openBlock(),r.createBlock(S,{key:0,onClick:E,type:"primary",label:"Add New"})):r.createCommentVNode("",!0)]),r.createElementVNode("div",Ir,[r.createVNode(Er,{entity:b.entity,"filters-config":((L=a.value)==null?void 0:L.filters)||[],filters:k.value,"onUpdate:filters":C[0]||(C[0]=F=>k.value=F)},null,8,["entity","filters-config","filters"]),r.createVNode(r.unref(Et),{config:h.value,array:i.value,"active-row":f.value,"onUpdate:activeRow":E,onOrder:D,class:"table",selectedRows:c.value,"onUpdate:selectedRows":C[2]||(C[2]=F=>c.value=F)},{"head-cell":r.withCtx(F=>{var ee;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(b.$slots["head-cell"]?b.$slots["head-cell"]:_t),r.mergeProps({label:F.label},F,{onOrder:D,order:((ee=a.value)==null?void 0:ee.order)||[]}),null,16,["label","order"]))]}),default:r.withCtx(()=>{var F;return[r.createVNode(P,{entity:b.entity,id:(F=f.value)==null?void 0:F.Id,"master-entities":b.masterEntities||void 0,binding:b.binding,onFormUpdate:C[1]||(C[1]=()=>{f.value=null,r.unref(y).call()})},null,8,["entity","id","master-entities","binding"])]}),_:1},8,["config","array","active-row","selectedRows"])])])}}}),Rr=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 H.onBeforeModalClose(a),r.onMounted(s),r.watch(()=>o.finished,()=>{i(),H.popModal()}),(f,l)=>{const c=r.resolveComponent("widget-button"),u=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(u,null,{footer:r.withCtx(()=>[r.createVNode(c,{onClick:l[0]||(l[0]=p=>{r.unref(i)(),r.unref(H.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(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 Qt.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"?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 M(e="error"){return function(n){const{message:t,children:o}=qe(n);Qe.add(e,t,{children:o})}}function re(e,n={}){return O().emit("entity:read",{...n,entity:e})}function Ge(e,n){return O().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 $r(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 Br(e){return e.text().then(n=>{try{return JSON.parse(n)}catch{return A.DEFAULT_ERROR_MESSAGE}})}function U(e,n={}){return q.isFront&&(n.headers||(n.headers={}),n.headers["Context-Id"]=q.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 xr(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 Pr=Se(Ne("pretty-value-field-by-entity"));function Vr(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 Pr('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,n,t),t}}const te=Se(Ne("use-socket"));function O(){return jr}function Mr(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const jr=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 m=new Uint8Array(1);m[0]=dn,n.send(m)}setInterval(()=>{Array.from(o).forEach(m=>{v(m)&&(te("Handler for event %s requestId %d was expired",m.event,m.requestId),m.requestId?l({requestId:m.requestId,event:wt,data:{message:Q.RequestTookToLong().message}}):o.delete(m))})},1e3),setInterval(()=>{(!n||n.readyState===3)&&c()},A.DELAY_SOCKET_RECONNECT);function f(){return{safeQueue:a,requestId:e,handlers:o,socketInstance:n}}function l(m){const y=[...o.values()];te("Handlers array length is %d. Response event: %s. Request id: %d",o.size,m.event,m.requestId),y.forEach(E=>{const T=m.requestId;(E.requestId&&E.requestId===T||!E.requestId&&E.event===m.event)&&(te("Find appropriated handler: %d, event: %s",e,E.event),E.callback(m.data,m),E.once&&(o.delete(E),te("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(m){te("Connection to server was stopped: %d %s",m.code,m.reason),Array.from(o).forEach(y=>{y.guaranteedAnswer&&y.serializeString&&a.add(y.serializeString)})},n.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(m=>{u(m),a.delete(m)})},n.onerror=function(m){console.warn(m)},n.onmessage=m=>{var y;try{if(Mr(m.data)){s();return}const E=JSON.parse(m.data);if(!St(E)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(E);return}(y=E==null?void 0:E.data)!=null&&y.refresh&&location.reload(),l(E)}catch(E){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(E)}}}function u(m){n.send(m)}function p(m,y){w({event:m,callback:y})}function d(m,y){w({event:m,callback:y,once:!0})}function h(){return n&&(n==null?void 0:n.readyState)===1}function g(m,y,E){const T=++e,B=JSON.stringify({requestId:T,event:m,data:y,contextId:q.contextId,url:I.socketURLHandler?I.socketURLHandler():window.location.href});return h()?u(B):(a.add(B),te("Socket is not connected. Message was send to save-queue")),new Promise((D,k)=>{w({event:m,requestId:T,once:!0,guaranteedAnswer:!0,serializeString:B,callback:(_,b)=>{if(te("Promise was resolve with next data:",_),Ur(b))return void k(_);E&&E(_,b),D(_)},timeToLive:A.TIME_TO_LIVE_SOCKET_REQUEST})})}function w(m){const y={timeToLive:0,...m,created:new Date().getTime()};o.add(y)}function v(m){return m.timeToLive===0||typeof m.timeToLive!="number"?!1:new Date().getTime()-m.created>m.timeToLive}return{get socket(){return n},on:p,once:d,emit:g,initialization(m){t=m},getDevInfo:f}}(),Ur=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 O().emit("list-setting:read",{entity:e,mark:n})}function Wr(e,n){return O().emit("metadata-field:treat",{entity:e,fieldName:n})}function Nt(e,n){return O().emit("entity:create",{...n,entity:e})}function Rt(e,n){return O().emit("entity:delete",{...n,entity:e})}function qr(e,n){return O().emit("usage-context:read",{...n,entity:e})}function Lt(e={}){return O().emit("tool:read",e)}function Gr(){return O().emit("metadata-list:read",{})}function zr(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 f=((typeof e=="string"?(l=o==null?void 0:o.actions)==null?void 0:l.value:r.unref(e))||[]).find(c=>c.name===i);return f?{...f,...a}:null})}function Hr(e){return O().emit("history:read",e)}function Xr(e,n){return O().emit("entity:count",{...n,entity:e})}function Yr(e){return`/${gn}/${e}`}function ce(e){return{exec(n,t){switch(e.name){case"replace-boolean":return ce.replaceBoolean(n,e.values);case"replace-record-operation":return ce.replaceRecordOperation(n)}}}}ce.replaceBoolean=Jr;ce.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 O().emit("tool:execute",e)}const Zr=Se(Ne("wrap-tool-response"));function Ot(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(t={}){var a;const o=typeof e.values=="function"?e.values(n,e):e.values,i=()=>Qr({name:n.name,values:{...o,...t},usageContext:n.usageContext}).then(async s=>{var f,l;if(!eo(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=(f=s.validationEffect)==null?void 0:f.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 u;return(u=e.handleAffectedEntity)==null?void 0:u.call(e,n,c,e)}),n.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(n,e),s}).catch(M("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 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(!H.getComponentFromStore(A.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await H.promptModal(A.MODAL_CONFIRM,{message:t}))return n()}function ro(e,n){const t=A.MODAL_VALIDATION_EFFECT;if(!H.getComponentFromStore(t))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{H.pushModal(t,n)})}function oo(e,n,t){var l;function o(c){return c!==null&&typeof c=="object"&&typeof c.read=="function"}function i(c,u){c&&(Zr("Affected Entity %s. Find form with name %s.",u,c.name),c.name===u&&o(c)&&c.read(),c instanceof x.Form&&c.dependencies.forEach(p=>i(p,u)))}ge.emit("affected-entity",n);const{router:a,form:s}=t,f=(l=n.primaryKey)==null?void 0:l.Id;if(a&&n&&n.name===e.redirectEntity){ge.emit("display-entity",{id:f,name:n.name}),I.getEntityLink&&a.push(I.getEntityLink(n.name,f));return}i(s,n.name)}function io(e,n){const{router:t}=n;t&&e.closeHostForm&&t.back()}let ne={};function Z(e,...n){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let t=x.utils.getPropFromObject((this==null?void 0:this.vocabulary)||ne,e);if(typeof t=="string")return st(t,n);const o=x.utils.getPropFromObject(ne==null?void 0:ne.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}Z.setGlobalVocabulary=function(e){ne=e};Z.getScope=function(e){const n=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),Z.bind({vocabulary:x.utils.getPropFromObject(ne,n.toLowerCase())})};Z.setVocabulary=function(e){return typeof e=="string"&&(e=x.utils.getPropFromObject(ne,e)),Z.bind({vocabulary:e})};function ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe={exports:{}},R={},De={exports:{}},oe={};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 so(e,n,t){}function lo(e,n,t){}var co=/javascript\s*\:/img;function uo(e,n){return co.test(n)?"":n}oe.whiteList=$t();oe.getDefaultWhiteList=$t;oe.onAttr=so;oe.onIgnoreAttr=lo;oe.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,s="";function f(){if(!o){var u=fe.trim(e.slice(i,a)),p=u.indexOf(":");if(p!==-1){var d=fe.trim(u.slice(0,p)),h=fe.trim(u.slice(p+1));if(d){var g=n(i,s.length,d,h,u);g&&(s+=g+"; ")}}}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||f():l===`
|
|
7
|
+
`&&f()}return fe.trim(s)}var go=po,ve=oe,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||ve.whiteList,e.onAttr=e.onAttr||ve.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||ve.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||ve.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,s=t.safeAttrValue,f=mo(e,function(l,c,u,p,d){var h=o[u],g=!1;if(h===!0?g=h:typeof h=="function"?g=h(p):h instanceof RegExp&&(g=h.test(p)),g!==!0&&(g=!1),p=s(u,p),!!p){var w={position:c,sourcePosition:l,source:d,isWhite:g};if(g){var v=i(u,p,w);return lt(v)?u+":"+p:v}else{var v=a(u,p,w);if(!lt(v))return v}}});return f};var yo=Ft;(function(e,n){var t=oe,o=yo;function i(s,f){var l=new o(f);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)})(De,De.exports);var He=De.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,wo=He.getDefaultWhiteList,Ce=Xe;function Bt(){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 vo;function bo(e,n,t){}function Eo(e,n,t){}function ko(e,n,t){}function _o(e,n,t){}function Dt(e){return e.replace(To,"<").replace(Ao,">")}function Co(e,n,t,o){if(t=Wt(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=qt(t),t}var To=/</g,Ao=/>/g,So=/"/g,Io=/"/g,No=/&#([a-zA-Z0-9]*);?/gim,Ro=/:?/gim,Lo=/&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 Pt(e){return e.replace(So,""")}function Vt(e){return e.replace(Io,'"')}function Mt(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 jt(e){return e.replace(Ro,":").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 Ce.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=Dt(e),e}function Oo(){return""}function $o(e,n){typeof n!="function"&&(n=function(){});var t=!Array.isArray(e);function o(s){return t?!0:Ce.indexOf(e,s)!==-1}var i=[],a=!1;return{onIgnoreTag:function(s,f,l){if(o(s))if(l.isClosing){var c="[/removed]",u=l.position+c.length;return i.push([a!==!1?a:l.position,u]),a=!1,c}else return a||(a=l.position),"[removed]";else return n(s,f,l)},remove:function(s){var f="",l=0;return Ce.forEach(i,function(c){f+=s.slice(l,c[0]),l=c[1]}),f+=s.slice(l),f}}}function Fo(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("")}R.whiteList=Bt();R.getDefaultWhiteList=Bt;R.onTag=bo;R.onIgnoreTag=Eo;R.onTagAttr=ko;R.onIgnoreTagAttr=_o;R.safeAttrValue=Co;R.escapeHtml=Dt;R.escapeQuote=Pt;R.unescapeQuote=Vt;R.escapeHtmlEntities=Mt;R.escapeDangerHtml5Entities=jt;R.clearNonPrintableCharacter=Ut;R.friendlyAttrValue=Wt;R.escapeAttrValue=qt;R.onIgnoreTagStripAll=Oo;R.StripTagBody=$o;R.stripCommentTag=Fo;R.stripBlankChar=Bo;R.attributeWrapSign='"';R.cssFilter=xt;R.getDefaultCSSWhiteList=wo;var Re={},K=Xe;function xo(e){var n=K.spaceIndex(e),t;return n===-1?t=e.slice(1,-1):t=e.slice(1,n+1),t=K.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 Po(e,n,t){var o="",i=0,a=!1,s=!1,f=0,l=e.length,c="",u="";e:for(f=0;f<l;f++){var p=e.charAt(f);if(a===!1){if(p==="<"){a=f;continue}}else if(s===!1){if(p==="<"){o+=t(e.slice(i,f)),a=f,i=f;continue}if(p===">"||f===l-1){o+=t(e.slice(i,a)),u=e.slice(a,f+1),c=xo(u),o+=n(a,o.length,c,u,Do(u)),i=f+1,a=!1;continue}if(p==='"'||p==="'")for(var d=1,h=e.charAt(f-d);h.trim()===""||h==="=";){if(h==="="){s=p;continue e}h=e.charAt(f-++d)}}else if(p===s){s=!1;continue}}return i<l&&(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,s=e.length;function f(d,h){if(d=K.trim(d),d=d.replace(Vo,"").toLowerCase(),!(d.length<1)){var g=n(d,h||"");g&&i.push(g)}}for(var l=0;l<s;l++){var c=e.charAt(l),u,p;if(a===!1&&c==="="){a=e.slice(t,l),t=l+1,o=e.charAt(t)==='"'||e.charAt(t)==="'"?t:Uo(e,l+1);continue}if(a!==!1&&l===o){if(p=e.indexOf(c,l+1),p===-1)break;u=K.trim(e.slice(o+1,p)),f(a,u),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=jo(e,l),p===-1){u=K.trim(e.slice(t,l)),f(u),a=!1,t=l+1;continue}else{l=p-1;continue}else if(p=Wo(e,l-1),p===-1){u=K.trim(e.slice(t,l)),u=ft(u),f(a,u),a=!1,t=l+1;continue}else continue}return t<e.length&&(a===!1?f(e.slice(t)):f(a,ft(K.trim(e.slice(t))))),K.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}Re.parseTag=Po;Re.parseAttr=Mo;var Go=He.FilterCSS,W=R,Gt=Re,zo=Gt.parseTag,Ho=Gt.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 zt(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))}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,f=t.onIgnoreTagAttr,l=t.safeAttrValue,c=t.escapeHtml,u=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 h=zo(e,function(g,w,v,m,y){var E={sourcePosition:g,position:w,isClosing:y,isWhite:Object.prototype.hasOwnProperty.call(o,v)},T=i(v,m,E);if(!be(T))return T;if(E.isWhite){if(E.isClosing)return"</"+v+">";var B=Xo(m),D=o[v],k=Ho(B.html,function(_,b){var C=ke.indexOf(D,_)!==-1,S=s(v,_,b,C);return be(S)?C?(b=l(v,_,b,p),b?_+"="+u+b+u:_):(S=f(v,_,b,C),be(S)?void 0:S):S});return m="<"+v,k&&(m+=" "+k),B.closing&&(m+=" /"),m+=">",m}else return T=a(v,m,E),be(T)?c(m):T},c);return d&&(h=d.remove(h)),h};var Ko=zt;(function(e,n){var t=R,o=Re,i=Ko;function a(f,l){var c=new i(l);return c.process(f)}n=e.exports=a,n.filterXSS=a,n.FilterXSS=i,function(){for(var f in t)n[f]=t[f];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)})(xe,xe.exports);var Qo=xe.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 Ht(e,n,t){const o=Z.getScope(e.toLowerCase());return n.map(i=>(typeof i.label=="string"&&(i.label=o(i.label)),i.type==="history"&&(i.onClick=a=>H.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=>{H.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 s=i.name[0],f=a[s];return f?Ye(dt(i,a),f):null},i.value=(a,s)=>s[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 Xt(e,n){e()&&(await n(),await Xt(e,n))}function si(e,n,t={}){let o=!1;const i=r.ref(""),a=r.computed(()=>s.filter(k=>c(k,i.value))),s=r.reactive([]);let f=0;const l=r.ref(!1);let c=(t==null?void 0:t.filterSearchFn)||((k,_)=>ai(k,_));function u(){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=f,(t.request||re)(e,k).then(b=>(f+=b.length,b))}function d(k,_){var C;return typeof k.Version=="number"?k.Version:(C=s.find(S=>S.Id===_))==null?void 0:C.Version}function h(k,_){const b=s.findIndex(C=>C.Id===k);if(b===-1)throw new Error(`Can't found item with Id ${k}`);s.splice(b,1,_)}function g(k){const _=s.findIndex(b=>b.Id===k);if(_===-1)throw new Error(`Can't found item with Id ${k}`);s.splice(_,1)}async function w(k,_){try{const b=T(),C=d(_,k);delete _.Version,await Ge(e,{id:k,values:_,version:C,masterEntities:u()});const S=await re(e,{fields:b.fields||"",id:k});h(k,S)}catch(b){M()(b)}}async function v(k,_={}){try{const b=T(),C=d(_,k);delete _.Version,await Rt(e,{id:k,version:C,masterEntities:u()}),g(k)}catch(b){M()(b)}}async function m(k){try{await Nt(e,{values:k,masterEntities:u()}),await B()}catch(_){M()(_)}}let y;async function E(){l.value=!0;try{y!=null&&y.signal&&!y.signal.aborted&&y.abort();let k=y=new AbortController,_=0;const C=T().limit||0;if(i.value&&!C){console.warn("Using textSearch assumes the use of limit.");return}await Xt(()=>(C>0?_<C:!0)&&!o&&!k.signal.aborted,async()=>{const S=await p();k.signal.aborted||(s.push(...S),_+=S.filter(P=>c(P,i.value)).length,(S.length<C||C===0)&&(o=!0))})}catch(k){M()(k)}l.value=!1}function T(){return typeof n=="function"?n():n}async function B(){try{f=0,o=!1,s.splice(0,s.length),await E()}catch(k){M()(k)}}function D(){if(y)return y.abort();l.value=!1}return{array:s,updateById:w,next:E,reload:B,wait:l,create:m,deleteById:v,textSearch:i,filteredArray:a,abort:D}}function li(){function e(){return{organizations:q.organizations,currentContextId:q.contextId,person:q.person,context:q.context,contextType:q.contextType,userId:q.userId}}const n=r.reactive(e());return q.onupdateContext(()=>{Object.assign(n,e())}),n}function ci(e,n,t){return O().emit("communication:create",{entityName:e,entityCatalogId:n,targetCode:t})}function ui(e,n,t){return O().emit("communication:read",{entityName:e,entityCatalogId:n,targetCode:t})}function fi(e,n){return O().emit("communication-message:create",{communicationId:e,text:n})}function di(e){return O().emit("communication-message:read",{communicationId:e})}function pi(e){const n=x.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 Q.EntityWithoutName(e);return re(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 Q.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 Le(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 qr(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(s=>Ot(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 Lt({masterEntities:e==null?void 0:e.masterEntities,id:s==null?void 0:s.id,entity:s==null?void 0:s.name}).then(f=>t.splice(0,0,...f)).catch(M("error")).finally(()=>n.value=!1)}return{actions:o,update:a,loading:r.readonly(n)}}function yi(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(u=>u===l);c!==-1&&t.splice(c,1)},f=r.computed(()=>{const l=r.unref(e);return t.length===l.length&&l.length!==0});return[t,o,f,a,s]}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 Fe{static async getStartConfig(n,t){return O().emit("wizard:configuration",{process:n,entity:t})}static async startProcess(n,t){return O().emit("wizard:start",{process:n,entity:t})}static async runStep(n,t,o,i,a){return O().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),s=r.ref(null),f=r.computed(()=>p(i,s.value)),l=r.ref(null),c=r.reactive([]),u=r.computed(()=>c.map(y=>p(i,y)));function p(y,E){return y.find(T=>T.name===E)||null}async function d(y){var E;if(_i(y)){await t.onDisplayDataSet(y);return}if(!(Ei(y)&&!await t.onDisplayDataSet(y))){if(ki(y))return void t.onValidation(y.validationResults);w(y),await r.nextTick();{const T=((E=p(i,s.value))==null?void 0:E.fields)||[];if([V.FinalStep,V.NextStep,V.FinalStepWithConfirmation,V.NextStepWithConfirmation].includes(y.statusName)&&(!T.length||Ti(T,t.presets)))return m(t.presets||{})}bi(y)&&t.onCompleted(y)}}async function h(){try{await g(),await v()}catch(y){M("error")(y)}}function g(){return a.value="Loading process information.",Fe.getStartConfig(n,e).then(y=>(l.value={label:y.processTitle,info:y.processInfo,icon:y.processIcon},i=y.steps.map(E=>{const T=E.frontendEntity.rootObject,B=Object.fromEntries(E.frontendEntity.objectTypes.map(D=>[D.name,D.properties]));return{label:E.title,name:E.stepName,number:E.number,rootObjectName:T,objectTypes:B,fields:B[T],buttonCaption:E.buttonCaption}}))).finally(()=>{a.value=!1})}function w(y){return[V.FinalStepWithConfirmation,V.NextStepWithConfirmation,V.NextStep,V.Completed,V.FinalStep].includes(y.statusName)?(o=y.token,s.value=y.nextStepName):console.log("Saving is not completed:",y),y}function v(){return a.value="Starting process",Fe.startProcess(n,e).then(d).catch(M("error")).finally(()=>{a.value=null})}function m(y={}){const E=s.value;return!o||!E?Promise.reject("Not step or token."):(a.value="Waiting for result...",Fe.runStep(n,e,E,o,y).then(d).then(T=>(c[c.length-1]!==E&&c.push(E),T)).catch(M("error")).finally(()=>{a.value=!1}))}return{initialize:h,loading:a,currentStepConfig:f,currentStepName:s,arrayPassedSteps:u,arrayProcessStepName:c,processInfo:l,next:m}}function Ti(e,n){for(let t=0;t<e.length;t++){const o=e[t];if(!x.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 Yt(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,s=e.config,f=e.customFilters||[],l=[s.map(w=>u(w.label)).join(",")],c=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function u(w){w===null&&(w=""),w===void 0&&(w="-");let v=typeof w!="string"?String(w):w;return v=v.replace(/"/g,'""'),v.search(/("|,|\n)/g)>=0&&(v='"'+v+'"'),v}function p(){return re(a,{fields:ze(s).join(" "),limit:t,offset:c.offset,order:i,filter:$(o||{}),customFilters:f.map(w=>{var v;return Ai(w,(v=n.customFiltersData)==null?void 0:v[typeof w=="string"?w:w.name])})}).then(w=>(c.offset+=t,w))}function d(){const w="data:text/csv;charset=utf-8,"+l.join(`\r
|
|
8
|
+
`),v=encodeURI(w),m=document.createElement("a");m.setAttribute("href",v),m.setAttribute("download",`${a}.csv`),document.body.appendChild(m),m.click()}function h(){c.rejected=!0}async function g(){return p().then(w=>{const v=w.map(m=>s.map(y=>u(Ie(y,m))).join(","));return l.push(...v),c.count=l.length,w.length}).then(w=>{if(w!==t&&(c.finished=!0),w===t&&!c.rejected)return g()})}return{downloadFile:d,reject:h,state:c,start:g}}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;/*!
|
|
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 Q{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(Q,n,t)}static emit(n,t){return mt.call(Q,n,t)}static off(n,t){return ht.call(Q,n,t)}static cleanEvents(){vt.call(Q)}}Q.events={};class Si extends Q{constructor(n){super(),this.name="Communication",this.read=()=>{},this.id=n}sendMessage(n){return ci(this.id,n)}static checkAndGenerate(n,t,o){return li(n,t,o).then(i=>i.length===0?si(n,t,o):i[0])}}function Ii(){return R().emit("client:read",{})}var ue;const J=class J extends Q{constructor(){super(...arguments);rt(this,ue);this.type="front",this.organizations=[],$e(this,ue,!1)}set language(t){localStorage.setItem(S.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(S.LOCALSTORAGE_LANGUAGE_KEY)||J.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(J.EVENT_READY_UPDATE,t)}get ready(){return nt(this,ue)}onReady(t){return this.on(J.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(J.EVENT_CONTEXT_UPDATE,t)}setCurrentContext(t){if(this.contextId===t)return console.warn("[application-manager] The current context has already been installed.");this.contextId=Number(t),localStorage.setItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(t)),this.emit(J.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){j()(t)}}restoreCurrentContext(){const t=Number.parseInt(localStorage.getItem(S.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(t)&&this.validateContextId(Number(t)))this.setCurrentContext(t);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return Ii()}validateContextId(t){var 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,J.DEFAULT_LANGUAGE="en",J.EVENT_CONTEXT_UPDATE="event:context-update",J.EVENT_READY_UPDATE="event:ready-update";let Ve=J;function Ni(e){return R().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 s=await a(u);l(u,s)}function a(u){const s=Ni(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 Li extends Q{on(n,t){return super.on(n,t)}emit(n,t){console.log("[event-bus] emit",n,t),super.emit(n,t)}off(n,t){super.off(n,t)}}class Y{static login(n){return 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 Y.requestStepRegistrationProcess("StartRegistration",n)}static confirmPhoneRegistrationProcess(n){return Y.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",n)}static confirmEmailRegistrationProcess(n){return Y.requestStepRegistrationProcess("ConfirmEmailByRegistration",n)}static finishEmailRegistrationProcess(n){return Y.requestStepRegistrationProcess("FinishRegistration",n)}static requestStepRegistrationProcess(n,t){return U(`${I.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)})}static startLoginProcess(n){return Y.requestStepLoginProcess("StartLogin",n)}static loginWithPassword(n){return Y.requestStepLoginProcess("LoginWithPassword",n)}static loginWithOtpCode(n){return Y.requestStepLoginProcess("LoginWithOtpCode",n)}static requestStepLoginProcess(n,t){return U(`${I.identityServerURL}/api/Authenticate/${n}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)}).then(Y.parseLoginProcessAnswer)}static parseLoginProcessAnswer(n){if(n.statusCode>3)throw Error(n.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return n}static startPasswordReset(n,t){return 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 Oi{static readHistoryById(n,t){return U(`/close-api/audits/history/${n}/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Ri{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 $i{static getDictionary(n){if(!n)throw new Error(`Can't get dictionary for ${n}.`);return U(`/open-api/internationalization/language/${n}`)}}class Bi{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 Fi(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function $(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(Fi(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($.is(t,o)),n)},[]).join(" and ")}function ve(e){return typeof e=="string"?`'${e}'`:`${e}`}$.includes=function(n,t){return`@${n} Contains ${ve(t)}`};$.beginWith=function(n,t){return`@${n} BeginWith ${ve(t)}`};$.notEq=function(n,t){return`@${n} nq ${ve(t)}`};$.eq=function(n,t){return Array.isArray(t)?$.in(n,t):`@${n} eq ${ve(t)}`};$.in=function(n,t){const o=t.map(ve).join(", ");return`@${n} in (${o})`};$.notIn=function(n,t){return!Array.isArray(t)||t.length===0?"":$.and(...t.map(o=>$.notEq(n,o)))};$.and=function(...n){return n.filter(t=>typeof t!="string"||t.trim().length===0?!1:t).map($.wrap).join(" and ")};$.wrap=function(n){return`(${n})`};$.is=function(n,t){return`@${n} is ${t}`};$.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 M=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(M||{});const z=new Ve,me=new Li;exports.ApplicationStatus=Qt;exports.Communication=Si;exports.CoreError=ee;exports.DisplayListRow=Je;exports.EventBus=me;exports.Filter=$;exports.Manager=z;exports.MetadataStore=Ae;exports.ModalListDownload=Nr;exports.NotificationSystem=Qe;exports.OBJECT_TYPE_NAME_FIELD=bt;exports.RecordOperation=Kt;exports.WidgetButton=Bn;exports.WidgetFastTable=Ir;exports.WidgetFastTableHeadCell=_t;exports.WidgetField=or;exports.WidgetIcon=ge;exports.WidgetImage=qn;exports.WidgetList=rr;exports.WidgetLoader=kt;exports.WidgetMultiButton=Mn;exports.WidgetSpinner=he;exports.WidgetTable=Et;exports.WidgetTablePanelFilterItem=Ct;exports.asyncProcess=ke;exports.authService=Y;exports.billingService=le;exports.catchUniversal=j;exports.config=kn;exports.configuration=I;exports.constants=S;exports.convertDDToDMS=ei;exports.convertDMSToDD=Zo;exports.convertListConfig=Xt;exports.debounce=Fr;exports.documentsService=on;exports.fileService=Bi;exports.formatter=fe;exports.getCellName=pe;exports.getCellValue=Ne;exports.getEntityLink=Ye;exports.getNamesFromListConfig=ze;exports.getUnitValue=Fe;exports.groupArrayByField=Rr;exports.historyService=Oi;exports.injectAction=Rt;exports.internationalizationService=$i;exports.invitationService=rn;exports.openService=Ri;exports.parseError=qe;exports.parseTextByMarkdown=Qo;exports.prettyDate=Ce;exports.prettyDateWithTime=Tt;exports.prettyMoney=At;exports.prettyValueFieldByEntity=Pr;exports.request=U;exports.setupListRow=Ue;exports.staticLink=Hr;exports.t=te;exports.throttle=xr;exports.universalEntityCount=zr;exports.universalEntityCreate=Nt;exports.universalEntityDelete=Lt;exports.universalEntityRead=oe;exports.universalEntityUpdate=Ge;exports.universalHistoryRead=Gr;exports.universalListSettingRead=It;exports.universalMetadataFieldTreat=Ur;exports.universalMetadataListRead=qr;exports.universalToolRead=Ot;exports.useActions=gi;exports.useCommunication=fi;exports.useEnter=mi;exports.useFormEntity=di;exports.useListActiveRow=ri;exports.useListDownload=Jt;exports.useListEntity=ii;exports.useListSearch=vi;exports.useListSelect=hi;exports.useManagerState=ai;exports.useMetadata=Re;exports.useSocket=R;exports.useUsageContext=Ke;exports.useVisibleItem=We;exports.useWizard=ki;exports.uuidv4=$r;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)},yt=function(){this.events={}};class Y{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(){yt.call(this)}static on(n,t){return gt.call(Y,n,t)}static emit(n,t){return mt.call(Y,n,t)}static off(n,t){return ht.call(Y,n,t)}static cleanEvents(){yt.call(Y)}}Y.events={};class Ni extends Y{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 Ri(){return O().emit("client:read",{})}var le;const z=class z extends Y{constructor(){super(...arguments);rt(this,le);this.type="front",this.organizations=[],$e(this,le,!1)}set language(t){localStorage.setItem(A.LOCALSTORAGE_LANGUAGE_KEY,t)}get language(){return localStorage.getItem(A.LOCALSTORAGE_LANGUAGE_KEY)||z.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,le,t),this.emit(z.EVENT_READY_UPDATE,t)}get ready(){return nt(this,le)}onReady(t){return this.on(z.EVENT_READY_UPDATE,t)}onupdateContext(t){return this.on(z.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(z.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 Ri()}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}}};le=new WeakMap,z.DEFAULT_LANGUAGE="en",z.EVENT_CONTEXT_UPDATE="event:context-update",z.EVENT_READY_UPDATE="event:ready-update";let Ve=z;function Li(e){return O().emit("metadata:read",{entity:e})}const Te=function(){const n=r.reactive({}),t=new Map;function o(f){return n[f]}async function i(f){if(t.has(f)&&await t.get(f),n[f])return;const l=await a(f);s(f,l)}function a(f){const l=Li(f).finally(()=>{t.delete(f)});return t.set(f,l),l}function s(f,l){n[f]=l}return{state:n,initEntity:i,get:o,loadingFlags:t}}();class Oi extends Y{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 G{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 G.requestStepRegistrationProcess("StartRegistration",n)}static confirmPhoneRegistrationProcess(n){return G.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",n)}static confirmEmailRegistrationProcess(n){return G.requestStepRegistrationProcess("ConfirmEmailByRegistration",n)}static finishEmailRegistrationProcess(n){return G.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 G.requestStepLoginProcess("StartLogin",n)}static loginWithPassword(n){return G.requestStepLoginProcess("LoginWithPassword",n)}static loginWithOtpCode(n){return G.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(G.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 Fi{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 Bi{static getDictionary(n){if(!n)throw new Error(`Can't get dictionary for ${n}.`);return U(`/open-api/internationalization/language/${n}`)}}class xi{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 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 $(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($.is(t,o)),n)},[]).join(" and ")}function he(e){return typeof e=="string"?`'${e}'`:`${e}`}$.includes=function(n,t){return`@${n} Contains ${he(t)}`};$.beginWith=function(n,t){return`@${n} BeginWith ${he(t)}`};$.notEq=function(n,t){return`@${n} nq ${he(t)}`};$.eq=function(n,t){return Array.isArray(t)?$.in(n,t):`@${n} eq ${he(t)}`};$.in=function(n,t){const o=t.map(he).join(", ");return`@${n} in (${o})`};$.notIn=function(n,t){return!Array.isArray(t)||t.length===0?"":$.and(...t.map(o=>$.notEq(n,o)))};$.and=function(...n){return n.filter(t=>typeof t!="string"||t.trim().length===0?!1:t).map($.wrap).join(" and ")};$.wrap=function(n){return`(${n})`};$.is=function(n,t){return`@${n} is ${t}`};$.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 q=new Ve,ge=new Oi;exports.ApplicationStatus=Kt;exports.Communication=Ni;exports.CoreError=Q;exports.DisplayListRow=Je;exports.EventBus=ge;exports.Filter=$;exports.Manager=q;exports.MetadataStore=Te;exports.ModalListDownload=Rr;exports.NotificationSystem=Qe;exports.OBJECT_TYPE_NAME_FIELD=bt;exports.RecordOperation=Jt;exports.WidgetButton=$n;exports.WidgetFastTable=Nr;exports.WidgetFastTableHeadCell=_t;exports.WidgetField=rr;exports.WidgetIcon=pe;exports.WidgetImage=Wn;exports.WidgetList=nr;exports.WidgetLoader=kt;exports.WidgetMultiButton=Vn;exports.WidgetSpinner=me;exports.WidgetTable=Et;exports.WidgetTablePanelFilterItem=Ct;exports.asyncProcess=Ee;exports.authService=G;exports.billingService=ae;exports.catchUniversal=M;exports.config=En;exports.configuration=I;exports.constants=A;exports.convertDDToDMS=ni;exports.convertDMSToDD=ti;exports.convertListConfig=Ht;exports.debounce=xr;exports.documentsService=rn;exports.fileService=xi;exports.formatter=ce;exports.getCellName=de;exports.getCellValue=Ie;exports.getEntityLink=Ye;exports.getNamesFromListConfig=ze;exports.getUnitValue=Be;exports.groupArrayByField=$r;exports.historyService=$i;exports.injectAction=zr;exports.internationalizationService=Bi;exports.invitationService=nn;exports.openService=Fi;exports.parseError=qe;exports.parseTextByMarkdown=ei;exports.prettyDate=_e;exports.prettyDateWithTime=Tt;exports.prettyMoney=At;exports.prettyValueFieldByEntity=Vr;exports.request=U;exports.setupListRow=Ue;exports.staticLink=Yr;exports.t=Z;exports.throttle=Dr;exports.universalEntityCount=Xr;exports.universalEntityCreate=Nt;exports.universalEntityDelete=Rt;exports.universalEntityRead=re;exports.universalEntityUpdate=Ge;exports.universalHistoryRead=Hr;exports.universalListSettingRead=It;exports.universalMetadataFieldTreat=Wr;exports.universalMetadataListRead=Gr;exports.universalToolRead=Lt;exports.useActions=hi;exports.useCommunication=pi;exports.useEnter=yi;exports.useFormEntity=gi;exports.useListActiveRow=ii;exports.useListDownload=Yt;exports.useListEntity=si;exports.useListSearch=wi;exports.useListSelect=vi;exports.useManagerState=li;exports.useMetadata=Le;exports.useSocket=O;exports.useUsageContext=Ke;exports.useVisibleItem=We;exports.useWizard=Ci;exports.uuidv4=Fr;exports.valuesToUpperCase=Ze;exports.wrapToolResponse=Ot;
|
|
13
13
|
//# sourceMappingURL=eservices-core.cjs.js.map
|