@ibiz-template/vue3-util 0.7.41-alpha.51 → 0.7.41-alpha.53
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/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +2 -1
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +2 -1
- package/package.json +4 -4
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-icon{--ibiz-icon-emoji-space:-3px}.ibiz-icon__emoji{position:relative;left:var(--ibiz-icon-emoji-space)}.ibiz-badge{--ibiz-badge-bg-color:var(--ibiz-color-danger);--ibiz-badge-height:18px;--ibiz-badge-border-radius:10px;display:inline-flex;align-items:center;justify-content:center;width:auto;height:var(--ibiz-badge-height);padding:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-small);line-height:normal;color:var(--ibiz-color-danger-text);white-space:nowrap;background-color:var(--ibiz-badge-bg-color);border:1px solid rgba(0,0,0,0);border-radius:var(--ibiz-badge-border-radius)}.ibiz-badge--danger{--ibiz-badge-bg-color:var(--ibiz-color-danger)}.ibiz-badge--success{--ibiz-badge-bg-color:var(--ibiz-color-success)}.ibiz-badge--warning{--ibiz-badge-bg-color:var(--ibiz-color-warning)}.ibiz-badge--info{--ibiz-badge-bg-color:var(--ibiz-color-info)}.ibiz-badge--primary{--ibiz-badge-bg-color:var(--ibiz-color-primary)}.ibiz-badge.is-mob{--ibiz-panel-badge-text-color:var(--ibiz-color-white);--ibiz-panel-badge-font-weight:600;--ibiz-panel-badge-height:1.125rem;--ibiz-panel-badge-border-radius:0.625rem;font-weight:var(--ibiz-panel-badge-font-weight);color:var(--ibiz-panel-badge-text-color)}.ibiz-control{--ibiz-control-base-scrollbar-width:0px;--ibiz-control-base-mask-text-color:var(--ibiz-color-primary-text);--ibiz-control-base-mask-background-color-blank:transparent;--ibiz-control-base-mask-background-color-mask:rgba(0, 0, 0, 0.5);width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}.ibiz-control.is-disabled{position:relative}.ibiz-control__mask-container{position:absolute;top:0;left:0;z-index:10;width:calc(100% - var(--ibiz-control-base-scrollbar-width));height:100%}.ibiz-control--blank{background-color:var(--ibiz-control-base-mask-background-color-blank)}.ibiz-control--mask{color:var(--ibiz-control-base-mask-text-color);background-color:var(--ibiz-control-base-mask-background-color-mask);display:flex;align-items:center;justify-content:center}.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-custom-render{width:100%;height:100%}.ibiz-signature-pad{width:100%;height:100%}.ibiz-signature-pad__container{width:100%;height:100%;background-color:var(--ibiz-color-bg-1)}.ibiz-code-list{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}.ibiz-view-dehtmlview>iframe{width:100%;height:100%;border:0}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-panel-container{--ibiz-panel-scroll:auto;width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow:hidden var(--ibiz-panel-scroll)}.ibiz-panel-container.is-hidden{display:none}.ibiz-nav-pos{width:100%;height:100%}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-multi-data-container-raw{width:100%;height:100%}.ibiz-panel-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-icon-padding-right:var(--ibiz-spacing-tight);--ibiz-panel-container-group-counter-padding-left:var(--ibiz-spacing-tight);--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group__caption--icon{padding-right:var(--ibiz-panel-container-group-icon-padding-right)}.ibiz-panel-container-group__counter{margin-left:var(--ibiz-panel-container-group-counter-padding-left)}.ibiz-panel-container-group.is-mob{--ibiz-panel-container-group-header-height:3rem;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base);--ibiz-panel-container-group-header-bg-color:var(--ibiz-color-bg-0);--ibiz-panel-container-group-content-padding:0.5rem 1rem;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-2);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-regular);--ibiz-panel-container-group-content-bg-color:var(--ibiz-color-bg-1);--ibiz-panel-container-group-caption-font-lineHeight:1rem}.ibiz-panel-container-group.is-mob .ibiz-panel-container-group__caption{line-height:var(--ibiz-panel-container-group-caption-font-lineHeight)}.ibiz-panel-container-group.is-mob .ibiz-panel-container-group-header{background-color:var(--ibiz-panel-container-group-header-bg-color);border-bottom:none}.ibiz-panel-container-group.is-mob .ibiz-panel-container-group-content{padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-header.is-is-mob .ibiz-panel-container-group-header__left{flex-grow:1;width:auto}.ibiz-panel-container-group-header.is-is-mob .ibiz-panel-container-group-header__right{flex-grow:1;width:auto}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content>.ibiz-row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}.ibiz-panel-field{--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);--ibiz-panel-field-icon-margin:6px;--ibiz-panel-field-error-font-size:var(--ibiz-font-size-small);--ibiz-panel-field-error-padding-top:var(--ibiz-spacing-super-tight);--ibiz-panel-field-error-color:var(--ibiz-color-danger);width:100%;height:100%;position:relative}.ibiz-panel-field__error{left:0;top:100%;line-height:1;font-size:var(--ibiz-panel-field-error-font-size);padding-top:var(--ibiz-panel-field-error-padding-top);position:absolute;color:var(--ibiz-panel-field-error-color)}.ibiz-panel-field.is-error .el-input__wrapper{box-shadow:0 0 0 1px var(--ibiz-panel-field-error-color) inset}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-field.is-mob{--ibiz-panel-field-icon-margin:0.375rem}.ibiz-panel-field.is-mob .ibiz-panel-field-content{line-height:var(--ibiz-editor-default-line-height)}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-single-data-container{width:100%;height:100%}.ibiz-panel-container-image{position:relative;width:100%;height:100%;background-repeat:no-repeat;background-position:center center}.ibiz-panel-container-image>.ibiz-row{height:100%;overflow:hidden auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-teleport-placeholder{width:auto;height:auto}.ibiz-teleport-placeholder>div:not(:last-child){display:none}.ibiz-panel-container-tabs{position:relative}.ibiz-panel-container-tabs .el-tabs{--el-tabs-header-height: 52px}.ibiz-panel-container-tabs .el-tabs__nav-wrap::after{display:none}.ibiz-panel-container-tabs::after{position:absolute;bottom:0;left:0;z-index:var(--el-index-normal);width:100%;height:"--ibiz-spacing-super-tight";content:"";background-color:var(--el-border-color-light)}.ibiz-panel-ctrl-view-page-caption.is-mob .ibiz-panel-ctrl-view-page-caption-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-view-page-caption-font-size);font-weight:var(--ibiz-view-page-caption-font-weight);line-height:var(--ibiz-view-page-caption-line-height);color:var(--ibiz-view-page-caption-color);text-align:var(--ibiz-view-page-caption-text-align)}.ibiz-auth-wxmp-qrcode{--ibiz-auth-wxmp-qrcode-caption-font-size:var(--ibiz-font-size-small);--ibiz-auth-wxmp-qrcode-mask-color:var(--ibiz-color-primary);--ibiz-auth-wxmp-qrcode-mask-icon-font-size:var(--ibiz-font-size-header-1);--ibiz-auth-wxmp-qrcode-mask-icon-hover-color:var(--ibiz-color-primary-hover);width:100%;height:100%}.ibiz-auth-wxmp-qrcode__content{position:relative;width:100%;height:100%}.ibiz-auth-wxmp-qrcode__qrcode{width:100%;height:100%;object-fit:contain}.ibiz-auth-wxmp-qrcode__caption{font-size:var(--ibiz-auth-wxmp-qrcode-caption-font-size);text-align:center}.ibiz-auth-wxmp-qrcode__mask{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--ibiz-auth-wxmp-qrcode-mask-color);background-color:hsla(0,0%,100%,.9)}.ibiz-auth-wxmp-qrcode__mask--icon{font-size:var(--ibiz-auth-wxmp-qrcode-mask-icon-font-size);cursor:pointer}.ibiz-auth-wxmp-qrcode__mask--icon:hover{color:var(--ibiz-auth-wxmp-qrcode-mask-icon-hover-color)}.ibiz-scroll-container{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ibiz-scroll-container.is-hidden{display:none}.ibiz-scroll-container-content{flex-grow:1;overflow:auto;display:flex}.ibiz-scroll-container-content__center{flex-grow:1;overflow:auto}.ibiz-scroll-container-content__center>.ibiz-scroll-container-item>.ibiz-col{flex:none}.ibiz-scroll-container-content__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}.ibiz-scroll-container-item{width:100%;height:100%;overflow:auto}.ibiz-scroll-container-item.is-hidden{display:none}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}.ibiz-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}
|
|
1
|
+
.ibiz-control{--ibiz-control-base-scrollbar-width:0px;--ibiz-control-base-mask-text-color:var(--ibiz-color-primary-text);--ibiz-control-base-mask-background-color-blank:transparent;--ibiz-control-base-mask-background-color-mask:rgba(0, 0, 0, 0.5);width:100%;height:100%}.ibiz-control__control-render{width:100%;height:100%}.ibiz-control.is-disabled{position:relative}.ibiz-control__mask-container{position:absolute;top:0;left:0;z-index:10;width:calc(100% - var(--ibiz-control-base-scrollbar-width));height:100%}.ibiz-control--blank{background-color:var(--ibiz-control-base-mask-background-color-blank)}.ibiz-control--mask{color:var(--ibiz-control-base-mask-text-color);background-color:var(--ibiz-control-base-mask-background-color-mask);display:flex;align-items:center;justify-content:center}.ibiz-icon{--ibiz-icon-emoji-space:-3px}.ibiz-icon__emoji{position:relative;left:var(--ibiz-icon-emoji-space)}.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-badge{--ibiz-badge-bg-color:var(--ibiz-color-danger);--ibiz-badge-height:18px;--ibiz-badge-border-radius:10px;display:inline-flex;align-items:center;justify-content:center;width:auto;height:var(--ibiz-badge-height);padding:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-small);line-height:normal;color:var(--ibiz-color-danger-text);white-space:nowrap;background-color:var(--ibiz-badge-bg-color);border:1px solid rgba(0,0,0,0);border-radius:var(--ibiz-badge-border-radius)}.ibiz-badge--danger{--ibiz-badge-bg-color:var(--ibiz-color-danger)}.ibiz-badge--success{--ibiz-badge-bg-color:var(--ibiz-color-success)}.ibiz-badge--warning{--ibiz-badge-bg-color:var(--ibiz-color-warning)}.ibiz-badge--info{--ibiz-badge-bg-color:var(--ibiz-color-info)}.ibiz-badge--primary{--ibiz-badge-bg-color:var(--ibiz-color-primary)}.ibiz-badge.is-mob{--ibiz-panel-badge-text-color:var(--ibiz-color-white);--ibiz-panel-badge-font-weight:600;--ibiz-panel-badge-height:1.125rem;--ibiz-panel-badge-border-radius:0.625rem;font-weight:var(--ibiz-panel-badge-font-weight);color:var(--ibiz-panel-badge-text-color)}.ibiz-custom-render{width:100%;height:100%}.ibiz-code-list{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-signature-pad{width:100%;height:100%}.ibiz-signature-pad__container{width:100%;height:100%;background-color:var(--ibiz-color-bg-1)}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-panel-container{--ibiz-panel-scroll:auto;width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow:hidden var(--ibiz-panel-scroll)}.ibiz-panel-container.is-hidden{display:none}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-panel-field{--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);--ibiz-panel-field-icon-margin:6px;--ibiz-panel-field-error-font-size:var(--ibiz-font-size-small);--ibiz-panel-field-error-padding-top:var(--ibiz-spacing-super-tight);--ibiz-panel-field-error-color:var(--ibiz-color-danger);width:100%;height:100%;position:relative}.ibiz-panel-field__error{left:0;top:100%;line-height:1;font-size:var(--ibiz-panel-field-error-font-size);padding-top:var(--ibiz-panel-field-error-padding-top);position:absolute;color:var(--ibiz-panel-field-error-color)}.ibiz-panel-field.is-error .el-input__wrapper{box-shadow:0 0 0 1px var(--ibiz-panel-field-error-color) inset}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-field.is-mob{--ibiz-panel-field-icon-margin:0.375rem}.ibiz-panel-field.is-mob .ibiz-panel-field-content{line-height:var(--ibiz-editor-default-line-height)}.ibiz-nav-pos{width:100%;height:100%}.ibiz-single-data-container{width:100%;height:100%}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-multi-data-container-raw{width:100%;height:100%}.ibiz-panel-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-icon-padding-right:var(--ibiz-spacing-tight);--ibiz-panel-container-group-counter-padding-left:var(--ibiz-spacing-tight);--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group__caption--icon{padding-right:var(--ibiz-panel-container-group-icon-padding-right)}.ibiz-panel-container-group__counter{margin-left:var(--ibiz-panel-container-group-counter-padding-left)}.ibiz-panel-container-group.is-mob{--ibiz-panel-container-group-header-height:3rem;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base);--ibiz-panel-container-group-header-bg-color:var(--ibiz-color-bg-0);--ibiz-panel-container-group-content-padding:0.5rem 1rem;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-2);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-regular);--ibiz-panel-container-group-content-bg-color:var(--ibiz-color-bg-1);--ibiz-panel-container-group-caption-font-lineHeight:1rem}.ibiz-panel-container-group.is-mob .ibiz-panel-container-group__caption{line-height:var(--ibiz-panel-container-group-caption-font-lineHeight)}.ibiz-panel-container-group.is-mob .ibiz-panel-container-group-header{background-color:var(--ibiz-panel-container-group-header-bg-color);border-bottom:none}.ibiz-panel-container-group.is-mob .ibiz-panel-container-group-content{padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-header.is-is-mob .ibiz-panel-container-group-header__left{flex-grow:1;width:auto}.ibiz-panel-container-group-header.is-is-mob .ibiz-panel-container-group-header__right{flex-grow:1;width:auto}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content>.ibiz-row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}.ibiz-panel-container-image{position:relative;width:100%;height:100%;background-repeat:no-repeat;background-position:center center}.ibiz-panel-container-image>.ibiz-row{height:100%;overflow:hidden auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-teleport-placeholder{width:auto;height:auto}.ibiz-teleport-placeholder>div:not(:last-child){display:none}.ibiz-panel-container-tabs{position:relative}.ibiz-panel-container-tabs .el-tabs{--el-tabs-header-height: 52px}.ibiz-panel-container-tabs .el-tabs__nav-wrap::after{display:none}.ibiz-panel-container-tabs::after{position:absolute;bottom:0;left:0;z-index:var(--el-index-normal);width:100%;height:"--ibiz-spacing-super-tight";content:"";background-color:var(--el-border-color-light)}.ibiz-panel-ctrl-view-page-caption.is-mob .ibiz-panel-ctrl-view-page-caption-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-view-page-caption-font-size);font-weight:var(--ibiz-view-page-caption-font-weight);line-height:var(--ibiz-view-page-caption-line-height);color:var(--ibiz-view-page-caption-color);text-align:var(--ibiz-view-page-caption-text-align)}.ibiz-auth-wxmp-qrcode{--ibiz-auth-wxmp-qrcode-caption-font-size:var(--ibiz-font-size-small);--ibiz-auth-wxmp-qrcode-mask-color:var(--ibiz-color-primary);--ibiz-auth-wxmp-qrcode-mask-icon-font-size:var(--ibiz-font-size-header-1);--ibiz-auth-wxmp-qrcode-mask-icon-hover-color:var(--ibiz-color-primary-hover);width:100%;height:100%}.ibiz-auth-wxmp-qrcode__content{position:relative;width:100%;height:100%}.ibiz-auth-wxmp-qrcode__qrcode{width:100%;height:100%;object-fit:contain}.ibiz-auth-wxmp-qrcode__caption{font-size:var(--ibiz-auth-wxmp-qrcode-caption-font-size);text-align:center}.ibiz-auth-wxmp-qrcode__mask{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:var(--ibiz-auth-wxmp-qrcode-mask-color);background-color:hsla(0,0%,100%,.9)}.ibiz-auth-wxmp-qrcode__mask--icon{font-size:var(--ibiz-auth-wxmp-qrcode-mask-icon-font-size);cursor:pointer}.ibiz-auth-wxmp-qrcode__mask--icon:hover{color:var(--ibiz-auth-wxmp-qrcode-mask-icon-hover-color)}.ibiz-view-dehtmlview>iframe{width:100%;height:100%;border:0}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}.ibiz-scroll-container-item{width:100%;height:100%;overflow:auto}.ibiz-scroll-container-item.is-hidden{display:none}.ibiz-scroll-container{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ibiz-scroll-container.is-hidden{display:none}.ibiz-scroll-container-content{flex-grow:1;overflow:auto;display:flex}.ibiz-scroll-container-content__center{flex-grow:1;overflow:auto}.ibiz-scroll-container-content__center>.ibiz-scroll-container-item>.ibiz-col{flex:none}.ibiz-scroll-container-content__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}.ibiz-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}
|
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["qx-util","vue","@ibiz-template/core","ramda","@ibiz-template/runtime","vue-router","qs","lodash-es","pinia"],function(t){"use strict";var e,n,o,i,a,s,r,l,c,d,u,h,p,m,v,g,f,y,w,b,C,P,I,D,E,x,O,N,S,A,T,z,R,_,L,k,M,B,j,V,U,W,F,q,G,$,H,K,X,Q,Y,J,Z,tt,et,nt,ot,it,at,st,rt,lt,ct,dt,ut,ht,pt,mt,vt,gt,ft,yt,wt,bt,Ct,Pt,It,Dt,Et,xt,Ot,Nt,St,At,Tt,zt,Rt,_t,Lt,kt,Mt,Bt,jt,Vt,Ut,Wt,Ft,qt,Gt,$t,Ht,Kt,Xt,Qt,Yt,Jt,Zt,te,ee,ne,oe,ie,ae,se,re,le;return{setters:[function(t){e=t.SyncSeriesHook,n=t.AsyncSeriesHook,o=t.isFunc,i=t.notNilEmpty,a=t.QXEvent,s=t.clearAll,r=t.createUUID},function(t){l=t.watch,c=t.onBeforeUnmount,d=t.createCommentVNode,u=t.getCurrentInstance,h=t.toRaw,p=t.isReactive,m=t.inject,v=t.reactive,g=t.onActivated,f=t.onDeactivated,y=t.ref,w=t.h,b=t.resolveComponent,C=t.provide,P=t.onMounted,I=t.onUnmounted,D=t.isRef,E=t.shallowRef,x=t.watchEffect,O=t.computed,N=t.defineComponent,S=t.createVNode,A=t.withDirectives,T=t.resolveDirective,z=t.nextTick,R=t.mergeProps,_=t.isVNode,L=t.createTextVNode,k=t.Teleport,M=t.renderSlot,B=t.onBeforeMount},function(t){j=t.onClickOutside,V=t.NOOP,U=t.listenJSEvent,W=t.Namespace,F=t.RuntimeError,q=t.isBase64Image,G=t.isBase64,$=t.base64ToStr,H=t.isSvg,K=t.fixJsonString,X=t.IBizContext,Q=t.ModelError,Y=t.RuntimeModelError,J=t.setAppCookie,Z=t.CoreConst,tt=t.clearAppCookie},function(t){et=t.isNil,nt=t.isNotNil,ot=t.clone,it=t.isEmpty,at=t.mergeLeft},function(e){st=e.MDControlTypes,rt=e.ViewType,lt=e.RouteConst,ct=e.getMatchResPath,dt=e.calcDeCodeNameById,ut=e.PredefinedControlRender,ht=e.ScriptFactory,pt=e.ViewController,mt=e.getControlProvider,vt=e.getErrorViewProvider,gt=e.calcDynaSysParams,ft=e.getViewProvider,yt=e.useCalcOrMode,wt=e.calcThresholdRange,bt=e.PanelContainerController,Ct=e.registerPanelItemProvider,Pt=e.PanelItemController,It=e.PanelItemState,Dt=e.Modal,Et=e.ViewMode,xt=e.OpenAppViewCommand,Ot=e.getEditorProvider,Nt=e.PanelItemEventName,St=e.calcDynaClass,At=e.getAllPanelField,Tt=e.isDataContainer,zt=e.PanelContainerState,Rt=e.PanelNotifyState,_t=e.getPanelItemProvider,Lt=e.convertNavData,kt=e.PanelData,Mt=e.execDELogicById,Bt=e.toLocalOpenWFRedirectView,jt=e.getControlsByView,Vt=e.getCtrlTeleportParams,Ut=e.AppDataUploadViewController,Wt=e.MDCustomViewController,Ft=e.registerViewProvider,qt=e.getDERedirectToView,Gt=e.HtmlViewController,$t=e.ViewLayoutPanelController,Ht=e.isSimpleDataContainer,Kt=e.registerControlProvider,Xt=e.ControlType,Qt=e.PanelController,Yt=e.RemotePluginItem,t({PanelContainerController:e.PanelContainerController,PanelContainerState:e.PanelContainerState})},function(t){Jt=t.useRoute,Zt=t.useRouter,te=t.RouterView},function(t){ee=t.default},function(t){ne=t.isElement,oe=t.isNumber,ie=t.throttle,ae=t.isObject,se=t.isString},function(t){re=t.defineStore,le=t.createPinia}],execute:function(){t({calcResRoutePath:De,computedAsync:function(t,e,n){let o;o=D(n)?{evaluating:n}:n||{};const{lazy:i=!1,flush:a="pre",evaluating:s,shallow:r=!0,onError:l=V}=o,c=E(!i),d=r?E(e):y(e);let u=0;if(x(async e=>{if(!c.value)return;u++;const n=u;let o=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const i=await t(t=>{e(()=>{s&&(s.value=!1),o||t()})});n===u&&(d.value=i)}catch(t){l(t)}finally{s&&n===u&&(s.value=!1),o=!0}},{flush:a}),i)return O(()=>(c.value=!0,d.value));return d},createOverlayView:Se,generateRoutePath:async function(t,e,n,o){var i;const a=we(e);let s=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(s=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&"DEFAULT"===ibiz.env.mobMenuShowMode&&(a.pathNodes[0]={viewName:"home"});let r=null==o?void 0:o.srfmenuitem;!r&&a.pathNodes.length>1&&(r=null==(i=a.pathNodes[1].params)?void 0:i.srfmenuitem);if(a.pathNodes.splice(s-1,a.pathNodes.length-s+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}Pe(n,a.pathNodes),e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:Ce(n),params:o}),2===s&&(await De(a,n,t.appDataEntityId,t.appId),Ie.includes(t.viewType))){const e=dt(t.appDataEntityId);delete a.pathNodes[0].context[e]}if(r&&a.pathNodes.length>1){const t=a.pathNodes[1].params||{};a.pathNodes[1].params={...t,srfmenuitem:r}}return{path:be(a)}},generateRoutePathByModal:async function(t,e,n,o){const i=we(e),a=i.pathNodes.findIndex(t=>t.viewName===lt.ROUTE_MODAL_TAG);-1!==a&&(i.pathNodes=i.pathNodes.slice(0,a));if(n.currentSrfNav){const t=i.pathNodes[i.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return Pe(n,i.pathNodes),i.pathNodes.push({viewName:"".concat(lt.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Ce(n),params:o}),{path:be(i)}},getArrayProps:ni,getAutoCompleteProps:Jo,getCascaderProps:oi,getCheckboxListProps:Mo,getCheckboxProps:Bo,getCodeProps:Zo,getColorPickerProps:ii,getDataPickerProps:jo,getDatePickerProps:Vo,getDateRangeProps:Uo,getDateRangeSelectEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,change:(t,e,n)=>!0}},getDateRangeSelectProps:Wo,getDrawerPlacement:function(t){return Ae[t]||"right"},getDropdownProps:ko,getEditorEmits:zo,getEditorProps:To,getGridArrayProps:function(){return{...ni(),...Ro()}},getGridAutoCompleteProps:function(){return{...Jo(),...Ro()}},getGridCascaderProps:function(){return{...oi(),...Ro()}},getGridCheckboxListProps:function(){return{...Mo(),...Ro()}},getGridCheckboxProps:function(){return{...Bo(),...Ro()}},getGridCodeProps:function(){return{...Zo(),...Ro()}},getGridColorPickerProps:function(){return{...ii(),...Ro()}},getGridDataPickerProps:function(){return{...jo(),...Ro()}},getGridDatePickerProps:function(){return{...Vo(),...Ro()}},getGridDateRangeProps:function(){return{...Uo(),...Ro()}},getGridDateRangeSelectProps:function(){return{...Ro(),...Wo()}},getGridDropdownProps:function(){return{...ko(),...Ro()}},getGridEditorCommonProps:Ro,getGridEditorEmits:function(){return{change:(t,e,n)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...ti(),...Ro()}},getGridInputIpProps:function(){return{...ai(),...Ro()}},getGridInputNumberProps:function(){return{...si(),...Ro()}},getGridInputProps:function(){return{..._o(),...Ro()}},getGridListBoxProps:function(){return{...Fo(),...Ro()}},getGridMapPickerProps:function(){return{...ri(),...Ro()}},getGridMarkDownProps:function(){return{...ei(),...Ro()}},getGridNumberRangeProps:function(){return{...qo(),...Ro()}},getGridRadioProps:function(){return{...Go(),...Ro()}},getGridRateProps:function(){return{...$o(),...Ro()}},getGridRawProps:function(){return{...Ho(),...Ro()}},getGridSliderProps:function(){return{...Ko(),...Ro()}},getGridSpanProps:function(){return{...Lo(),...Ro()}},getGridStepperProps:function(){return{...Xo(),...Ro()}},getGridSwitchProps:function(){return{...Qo(),...Ro()}},getGridUploadProps:function(){return{...Yo(),...Ro()}},getHtmlProps:ti,getInputIpProps:ai,getInputNumberProps:si,getInputProps:_o,getListBoxProps:Fo,getMapPickerProps:ri,getMarkDownProps:ei,getNestedRoutePath:Ee,getNumberRangeProps:qo,getOrigin:he,getOwnRouteContext:Ce,getRadioProps:Go,getRateProps:$o,getRawProps:Ho,getSliderProps:Ko,getSpanProps:Lo,getStepperProps:Xo,getSwitchProps:Qo,getUploadProps:Yo,isEmptyVNode:function(t){if(!Array.isArray(t))return t===me;return 1===t.length&&t[0]===me},onRouteChange:function(t,e){const n=Jt();if(!n)throw new F(ibiz.i18n.t("vue3Util.util.routeCorrectly"));l(()=>null==n?void 0:n.fullPath,()=>{const o=Ee(n,e);t({currentKey:o,fullPath:n.fullPath})},{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Se(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Se(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Se(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Se(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var o;const a=we(t,n);let s=a.pathNodes[e-1].viewName;if(!s)throw new F(ibiz.i18n.t("vue3Util.util.viewIdentifiers",{depth:e}));s===lt.ROUTE_MODAL_TAG&&(s=a.pathNodes[e].viewName);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const r=await ibiz.hub.config.view.get(s);if(!r)throw new F(ibiz.i18n.t("vue3Util.util.noFoundView",{viewCodeName:s}));const l={};(null==(o=ibiz.appData)?void 0:o.context)&&Object.assign(l,ibiz.appData.context);a.appContext&&Object.assign(l,a.appContext);if(1!==e)for(let t=0;t<e;t++){const n=a.pathNodes[t];i(n.context)&&Object.assign(l,n.context),t!==e-1||n.context&&!et(n.context.srfnavctrlid)||delete l.srfnavctrlid}const{params:c,srfnav:d}=a.pathNodes[e-1];return{viewConfig:r,context:l,params:c,srfnav:d}},renderString:function(t){if(et(t))return"";if("string"==typeof t)return t;if("object"==typeof t)return JSON.stringify(t);try{return t.toString()}catch(e){ibiz.log.error(t,ibiz.i18n.t("vue3Util.util.convertString"),e)}return""},route2routePath:we,routePath2string:be,shareCommonAncestor:Le,useAutoFocusBlur:function(t,e){return{useInFocusAndBlur:()=>{t.autoFocus||e("blur")},useInValueChange:()=>{t.autoFocus&&e("blur")}}},useClickOutside:de,useCodeListListen:function(t,e,n){let o;P(async()=>{if(t){const i=await ibiz.hub.getApp(e);o=await i.codeList.getCodeListInstance(t),o&&o.onChange(n)}}),I(()=>{o&&o.offChange(n)})},useControlController:ge,useControlPopoverzIndex:function(t){const{zIndex:e}=ze();t.state.zIndex=e.increment(),I(()=>{e.decrement()})},useController:function(t){t.force=pe()},useCtx:ve,useEventListener:fe,useFilterAttribute:function(t,e,n=["class","style"]){const o={};return Object.keys(t).forEach(i=>{e?e(i)&&(o[i]=t[i]):n.includes(i)||(o[i]=t[i])}),o},useFocusAndBlur:function(t,e){const n=y(),o=y(!1);let i;const a=()=>{o.value||ibiz.log.debug(ibiz.i18n.t("vue3Util.use.focusBlur.noFocus")),e(),i.stop(),o.value=!1};return fe(n,"click",e=>{o.value||(i=de(n,()=>{a()}),o.value=!0,t())},{capture:!0}),{componentRef:n,isFocus:o,doBlur:a,pause:()=>{i&&i.pause()},stop:()=>{i&&i.stop()}}},useForce:pe,useForceTogether:function(t,e){const n=e.force,o=pe();e.force=t=>{n(t),o()}},useLocalCacheKey:function(t,e,n,o="@",i=""){const a=Zt();return()=>{if(!a)return;const s=t.srfuserid;if(n=t.srfdefaulttoroutedepth||n){const t=we(a.currentRoute.value);if(s&&t.pathNodes[n-2]){t.pathNodes=t.pathNodes.slice(0,n-1),t.pathNodes.forEach(t=>{t.context&&delete t.context.srfnavctrlid});const i=be(t);return"".concat(e).concat(o).concat(s).concat(o).concat(i)}}return i?"".concat(e).concat(o).concat(s).concat(o).concat(i):void 0}},useMobCtx:function(){return m("ctx")},useNamespace:ye,usePopoverVisible:function(t,e){let n;const o=y(!1);return l(()=>t.value,i=>{i&&!n&&(n=U(window,"click",n=>{if(o.value&&t.value){Le(e(t.value),n.target)&&(o.value=!1)}},{capture:!0}))},{immediate:!0}),I(()=>{null==n||n()}),{popoverVisible:o,setPopoverVisible:t=>{o.value=t}}},usePopoverzIndex:function(){const t="popover_".concat(r());return{popoverid:t,setPopoverZIndex:e=>{const{zIndex:n}=ze(),o=document.getElementsByClassName(t),i=n.increment();if(o&&o.length>0&&e)for(let t=0;t<o.length;t++)o[t].style.setProperty(e,"".concat(i))}}},useProps:ue,usePropsWatch:function(t,e,n){const o=ue();Object.prototype.hasOwnProperty.call(o,t)&&(l(()=>o[t],(t,n)=>{e(he(t),he(n))},n),e(he(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=y(""));n.value=t.value;const o=new xe(e);return l(t,(t,e)=>{t!==e&&o.nextChange(()=>{n.value=t})}),n},useRouterQuery:function(){const t=Jt(),{query:e}=t;return e},useViewController:Re,useViewOperation:_e});class ce{}function de(t,e,n={}){let o=V,i=V,a=V;const s=()=>{o(),o=V,i=V,a=V};return l(t,(t,r)=>{if(t!==r)if(et(t))s();else{const s=j((null==t?void 0:t.$el)||t,e,n);o=s.stop,i=s.pause,a=s.proceed}},{immediate:!0}),c(()=>{o!==V&&s()}),{stop:()=>o(),pause:()=>i(),proceed:()=>a()}}function ue(){return u().proxy.$props}function he(t){return p(t)?h(t):t}function pe(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&o(e)&&t.$nextTick(()=>{e()})}}t("AppHooks",ce),ce.createApp=new e,ce.useComponent=new e,ce.appResorceInited=new n,ce.beforeInitApp=new n,ce.authedApp=new n,ce.initedApp=new n,ce.destoryApp=new n;const me=t("EmptyVNode",d("EmptyVNode"));function ve(){return m("ctx")}function ge(t,e){const n=ve(),o=ue();n.evt.emit("onForecast",o.modelData.name);const i=o.provider;let a;a=(null==i?void 0:i.createController)?i.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),-1!==st.indexOf(a.model.controlType)&&ibiz.util.record.add(a.ctrlId,a),function(t,e){l(()=>({context:t.context,params:t.params}),(t,n)=>{if(t===n)return;const o={...t};t.context===n.context&&delete o.context,t.params===n.params&&delete o.params,e.updateContextParams(o),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)})}(o,a),function(t,e,n=[]){const o=["context","params","modelData",...n];l(()=>{const e={};return Object.keys(t).forEach(n=>{o.includes(n)||(e[n]=t[n])}),e},(t,n)=>{const o={};Object.keys(t).forEach(e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])}),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.stateChange",{name:e.model.name}),o),Object.keys(o).forEach(t=>{void 0!==o[t]&&(e.state[t]=o[t])})},{immediate:!0})}(o,a,null==e?void 0:e.excludePropsKeys),a.state=v(a.state),g(()=>a.onActivated()),f(()=>a.onDeactivated()),a.force=pe();const s=u().proxy;return a.evt.onAll((t,e)=>{s.$emit(t.slice(2),e)}),s.$emit("controllerAppear",a),a.created(),c(()=>{a.destroyed(),-1!==st.indexOf(a.model.controlType)&&ibiz.util.record.remove(a.ctrlId)}),a}function fe(t,e,n,o={}){let i=V;return l(t,(t,a)=>{t!==a&&(et(t)?(i(),i=V):i=U((null==t?void 0:t.$el)||t,e,n,o))},{immediate:!0}),c(()=>{i!==V&&i()}),()=>{i()}}function ye(t){return new W(t,ibiz.env.namespace)}function we(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(lt.ROUTE_MODAL_TAG),"g"),""));const i=o.split("/"),a=[];for(let e=1;e<=n;e++){const n=i[2*e],o=t.params["params".concat(e)];let s,r,l;s=o&&o!==ibiz.env.routePlaceholder?ee.parse(o,{strictNullHandling:!0,delimiter:";",depth:8}):void 0,s&&(1===e?(r=s,s=void 0):(s.srfnavctx&&(r=JSON.parse(s.srfnavctx),delete s.srfnavctx),s.srfnav&&(l=s.srfnav,delete s.srfnav))),a.push({viewName:n,context:r,params:s,srfnav:l})}let s;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(s=ee.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:a}}function be(t){let e="";return t.appContext?e+="/".concat(ee.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach((t,n)=>{e+="/".concat(t.viewName,"/");let o={};if(0===n)i(t.context)&&(o=t.context);else{if(o=i(t.params)?t.params:{},i(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(o.srfnavctx=encodeURIComponent(e))}t.srfnav&&(o.srfnav=t.srfnav)}const a=ee.stringify(o,{delimiter:";",strictNullHandling:!0,skipNulls:!0});i(a)?e+=a:e+=ibiz.env.routePlaceholder}),e}function Ce(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];if(e.attributekeys){const n=e.attributekeys.split("|");n&&n.length>0&&n.forEach(n=>{nt(t[n])&&(e[n]=t[n])}),delete e.attributekeys}let o=!1;return Object.prototype.hasOwnProperty.call(e,"srfkeepnull")&&(o=!0===e.srfkeepnull||"true"===e.srfkeepnull,delete e.srfkeepnull),Object.keys(e).forEach(t=>{(n.includes(t)||!o&&et(e[t]))&&delete e[t]}),e}function Pe(t,e){let n=-1;e&&e.length>0&&(n=e.findIndex(t=>{var e;return!0===(null==(e=t.context)?void 0:e.srfreadonly)})),t.srfreadonly&&!t.getOwnContext().srfreadonly&&-1===n&&(t.srfreadonly=!0)}const Ie=t("excludeViewTypes",[rt.DE_GRID_VIEW,rt.DE_GRID_EXP_VIEW,rt.DE_LIST_VIEW,rt.DE_LIST_EXP_VIEW,rt.DE_DATA_VIEW,rt.DE_DATAVIEW_EXP_VIEW,rt.DE_CALENDAR_VIEW,rt.DE_CALENDAR_EXP_VIEW,rt.DE_CHART_VIEW,rt.DE_CHART_EXP_VIEW,rt.DE_KANBAN_VIEW]);async function De(t,e,n,o){if(n){const i=await ibiz.hub.getAppDataEntity(n,o);let a=ct(e,i);if(a||(a={path:"",keys:[i.codeName.toLowerCase()]}),a){const n=t.pathNodes[1].context,o={};a.keys.forEach(t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])}),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Ee(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=we(t);if(o.pathNodes.length<e)return t.path;o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e));const i=o.pathNodes[e-1];return n&&delete i.srfnav,!ibiz.env.isMob&&i.context&&delete i.context.srfnavctrlid,be(o)}class xe{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),l(()=>t.path,(t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}})}nextChange(t){t&&(this.timers.push(setTimeout(()=>{t();const e=this.callbacks.findIndex(e=>e===t);this.callbacks.splice(e,1)},this.wait)),this.callbacks.push(t))}}t("RouteListener",xe);const Oe=t("withInstall",(t,e)=>(t.install=t=>{e(t)},t));t("hasEmptyPanelRenderer",t=>{const e=null==t?void 0:t.model.controlRenders;return!(!e||0===e.length)&&!!e.find(t=>t.id===ut.EMPTYPANEL)});class Ne{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new a,this.init()}static createVueApp(t,e){throw new F(ibiz.i18n.t("vue3Util.util.noInjected"))}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");let i=document.body;ne(null==n?void 0:n.appendTo)&&(i=null==n?void 0:n.appendTo),i.appendChild(o);const a=Ne.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){i.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>w(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(o),this.vm=a}async present(){return this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise(t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)})}}t("OverlayContainer",Ne);function Se(t){return(e,n)=>{const o=b("IBizViewShell");return w(o,{...t,viewShellHooks:n,modal:e})}}t("OverlayPopoverContainer",class extends Ne{present(t){return this.modal.present(t)}});const Ae={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Te{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise(t=>{this.resolve=t})),this.promise.then(t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e,n={}){const o=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const i=e;if(this.map.has(i)){return this.map.get(i).onWillDismiss()}const a=new Te(o,i);return this.map.set(i,a),this.scheduledDestruction(a),a.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(window.clearTimeout(n.timeout),n.timeout=void 0,n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout(()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)},6e5)}}),t("useAppStore",re("appStore",()=>({appStore:v({})})));const ze=t("useUIStore",re("uiStore",()=>{const t=function(){const t=y(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}(),e=()=>ibiz.util.theme.getTheme().includes("dark")?"dark":"light",n=v({zIndex:t.zIndex,theme:e()});return ibiz.util.theme.evt.on("onChange",()=>{n.theme=e()}),{UIStore:n,zIndex:t}}));t("piniaInstance",le());function Re(t){const e=ue(),n=m("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let i;i=(null==o?void 0:o.createController)?o.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(i.id,i),function(t,e){l(()=>({context:t.context,params:t.params}),t=>{e.context.reset({},t.context),s(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)})}(e,i),function(t,e){l(()=>t.state?{...t.state}:{},(t,n)=>{const o={};Object.keys(t).forEach(e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])}),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.view.stateChange",{name:e.model.name}),o),Object.keys(o).forEach(t=>{e.state[t]=o[t]})},{immediate:!0})}(e,i),C("ctx",i.ctx),i.state=v(i.state),i.slotProps=v(i.slotProps),e.modal&&(i.modal=e.modal),g(()=>{i.onActivated(),ibiz.util.viewStack.active(i.id)}),f(()=>{i.onDeactivated(),ibiz.util.viewStack.deactivate(i.id)}),i.force=pe();const a=u().proxy;return i.evt.onAll((t,e)=>{a.$emit(t.slice(2),e)}),i.created(),c(()=>{i.destroyed(),ibiz.util.viewStack.remove(i.id)}),i}function _e(t){let e=[];P(()=>{const n=document.getElementById(t.id);n&&(e=["keydown","click"].map(e=>U(n,e,e=>{t.setOperateState("MANUAL")},{once:!0,capture:!0})))}),I(()=>{e&&e.length>0&&e.forEach(t=>{t()})})}function Le(t,e){if(!t||!e)return!1;if(t===e)return!0;const n=new Set;let o=t;for(;o;){n.add(o);const t=o.parentNode;o=!t||"BODY"!==t.nodeName&&"HTML"!==t.nodeName?t:null}for(o=e;o;){if(n.has(o))return!0;o=o.parentNode}return!1}const ke=t("IBizIcon",N({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=ye("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=O(()=>function(t){if(t){if(t.htmlStr)return S("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")||-1!==t.cssClass.indexOf("theme-icon")?S("i",{class:[e.b(),t.cssClass]},null):S("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return q(t.imagePath)?S("img",{class:e.b(),src:t.imagePath},null):G(t.imagePath)?S("div",{class:[e.b(),e.e("emoji")]},[$(t.imagePath)]):H(t.imagePath)?S("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?S("img",{class:e.b(),src:t.imagePath},null):S("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?S("img",{class:e.b(),src:t.imagePath},null):S("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return H(t.rawContent)?S("div",{class:e.b(),innerHTML:t.rawContent},null):S("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon));return()=>o.value}}));t("IBizRouterView",N({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;l(()=>t.manualKey,(t,e)=>{nt(t)&&t!==e&&(o=!0)});return{renderComp:(i,a)=>{if(!o)return n.vNode;if(o=!1,i){const o={...i.props};delete o.onVnodeUnmounted,delete o.ref;const a=w(i.type,{...o,...e,key:t.manualKey});return n.vNode=a,a}}}},render(){return S(b("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",N({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=ye("control"),{controlType:n,sysCss:o,codeName:i}=t.controller.model,a=n.toLowerCase(),s=null==o?void 0:o.cssName,r=t.controller.model,l=t.controller.model.controls,c=v({});!1===r.controlType.endsWith("EXPBAR")&&(et(r.width)||(r.width>0&&r.width<=1?c.width="".concat(100*r.width,"%"):c.width="".concat(r.width,"px")),et(r.height)||(r.height>0&&r.height<=1?c.width="".concat(100*r.height,"%"):c.height="".concat(r.height,"px")));const d=async(e,n)=>{e.stopPropagation();const o=e.target.getAttribute(n),i=e.target.getAttribute("data"),a=t.controller.context.clone(),s=e.target.getAttribute("context");s&&Object.assign(a,K(s));const r={...t.controller.params},l=e.target.getAttribute("params");l&&Object.assign(r,K(l)),o&&await ht.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:i?K(i):null},o)},u=O(()=>(n=>{var o,i;const a=r.controlRenders?r.controlRenders.filter(t=>!Object.values(ut).includes(t.id)):void 0;if(!a||0===a.length)return;const s=a[0];if("LAYOUTPANEL_MODEL"===s.renderType&&s.layoutPanelModel){const i=ht.execScriptFn({...t.controller.getEventArgs(),data:n},s.layoutPanelModel,{isAsync:!1});return S("div",{innerHTML:i,onClick:t=>d(t,"click"),onDblclick:t=>d(t,"dbclick"),class:[e.e("control-render"),e.e(null==(o=s.renderName)?void 0:o.toLowerCase())]},null)}return"LAYOUTPANEL"===s.renderType&&s.layoutPanel?S(b("iBizControlShell"),{class:[e.e("control-render"),e.e(null==(i=s.renderName)?void 0:i.toLowerCase())],data:n,params:t.controller.params,context:t.controller.context,modelData:s.layoutPanel},null):void 0})(t.controller.data||t.controller.items));return{ns:e,typeClass:a,sysCssName:s,inlineStyle:c,codeName:i,controls:l,customRender:u,disableMaskInfoRender:()=>{const n=r.controlRenders?r.controlRenders.find(t=>t.id===ut.DISABLEPANEL):void 0;if(!n)return S("div",{innerHTML:t.controller.state.maskOption.maskInfo||"",class:[e.e("disable-mask-text")]},null);if("LAYOUTPANEL_MODEL"===n.renderType&&n.layoutPanelModel){const o=ht.execScriptFn({...t.controller.getEventArgs()},n.layoutPanelModel,{isAsync:!1,singleRowReturn:!0});return S("div",{innerHTML:o,class:[e.e("disable-mask-text")]},null)}return"LAYOUTPANEL"===n.renderType&&n.layoutPanel?S(b("iBizControlShell"),{class:[e.e("disable-mask-text")],data:{},params:t.controller.params,context:t.controller.context,modelData:n.layoutPanel},null):void 0},onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:i,providers:a}=this.controller;let s=null;if(o.isCreated&&i){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},i=e[n];e[n]=i?()=>i(o):()=>{const e=b("IBizControlShell");return w(e,{modelData:t,...o})}});const n=a[i.name];s=w(b(n.component),{modelData:i,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return S("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName,this.ns.is("disabled",o.disabled)],style:this.inlineStyle},[s||this.customRender||(null==(n=(e=this.$slots).default)?void 0:n.call(e)),o.disabled&&S("div",{class:[this.ns.e("mask-container"),this.ns.m(o.maskOption.mode.toLowerCase())]},["MASK"===o.maskOption.mode&&this.disableMaskInfoRender()])])}})),t("IBizControlShell",N({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){const e=m("ctx");if(e)e.evt.emit("onForecast",t.modelData.name);else{const t={name:"AppView",id:"AppView",viewType:rt.DE_CUSTOM_VIEW,appId:ibiz.env.appId};C("ctx",new pt(t,X.create({})).ctx)}const n=y(!1),o=y(""),i=y();mt(t.modelData).then(t=>{t?i.value=t:o.value=ibiz.i18n.t("vue3Util.common.onFoundCorrespondingPart"),n.value=!0}).catch(t=>{ibiz.log.error(t),o.value=t.message,n.value=!0});return{ns:ye("control-shell"),isComplete:n,errMsg:o,provider:i}},render(){return this.isComplete&&this.provider?w(b(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):A(S("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[T("loading"),!this.isComplete]])}})),t("IBizViewShell",N({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String},ctx:{type:Object},viewShellHooks:{type:Object}},setup(t,{attrs:e}){const n=ye("view-shell"),o=y(!1),i=y(""),a=y(),s=y(),c=y(!0);t.ctx&&C("ctx",t.ctx);const d=y(t.context),u=y(t.params||{});let h="";l(()=>({context:t.context,params:t.params}),t=>{d.value=t.context,u.value=t.params?t.params:{}});let p;const m=t=>{const e=ot(t);return e.srfdatatype&&delete e.srfdatatype,JSON.stringify(e)},v=async()=>{try{if(await(async()=>{p=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId)})(),!p)throw new F(ibiz.i18n.t("vue3Util.common.noFoundViewModel"));if(c.value=await(async t=>{let e=!0;const{accessKey:n}=t;let{accUserMode:o}=t;const i=ibiz.auth.getAuthInfo();switch((et(o)||0===o)&&(o=ibiz.config.view.viewAccUserMode),o){case 1:i&&!i.isAnonymous&&(e=!1);break;case 2:(!i||i&&i.isAnonymous)&&(e=!1);break;case 4:i&&!i.isAnonymous&&n&&(await ibiz.hub.getApp(d.value.srfappid)).authority.calcByResCode(n)||(e=!1)}return e})(p),!c.value)return;if(1===p.dynaSysMode){const t=p.appDataEntityId;if(!t)throw new F(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic",{codeName:p.codeName}));const e=await gt(t,d.value,{viewParams:u.value,appId:p.appId});if(u.value.srfdatatype&&(e.srfdatatype=u.value.srfdatatype),u.value.srfwftag)e.srfwftag=u.value.srfwftag;else if(t&&p.enableWF&&e.srfkey){const n=et(d.value.srfsessionid)||it(d.value.srfsessionid),o=r();if(n){const e=ibiz.uiDomainManager.create(o,t);d.value.srfsessionid=e.id}const i=ibiz.hub.getApp(p.appId);d.value.srfappid||(d.value.srfappid=p.appId);const a=await i.deService.getService(d.value,t),s=await a.get(d.value,u.value||{});if(s.ok&&s.data){const{srfwftag:t,processdefinitionkey:n,taskdefinitionkey:o}=s.data;t&&(e.srfwftag=t),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW","DEMOBWFDYNAEDITVIEW3","DEMOBWFDYNAEDITVIEW"].includes(p.viewType)&&(et(u.value.processDefinitionKey)&&(u.value.processDefinitionKey=n),et(u.value.taskDefinitionKey)&&(u.value.taskDefinitionKey=o))}n&&(ibiz.uiDomainManager.destroy(o),d.value.srfsessionid="")}if(m(e)===h)return void setTimeout(()=>{o.value=!0});s.value=await ibiz.hub.loadAppView(p.appId,p.id,e),h=m(e)}else s.value=p;a.value=await ft(p)}catch(t){ibiz.log.error(t),i.value=t.message}finally{o.value=!0}};v();return{ns:n,errMsg:i,provider:a,isComplete:o,hasAuthority:c,viewModelData:s,redrawView:async t=>{o.value=!1;const{redrawData:n}=t,{isReloadModel:i}=n;Object.assign(d.value,n.context),Object.assign(u.value,n.params);const a=e.modal;a&&(a.hooks.preDismiss.clear(),a.hooks.shouldDismiss.clear(),a.hooks.beforeDismiss.clear()),i?await v():setTimeout(()=>{o.value=!0})},onCreated:e=>{t.viewShellHooks&&t.viewShellHooks.hooks.viewCreated.call(e)},curContext:d,curParams:u}},render(){if(this.isComplete&&this.provider&&this.hasAuthority)return w(b(this.provider.component),{context:this.curContext,params:this.curParams,modelData:ot(this.viewModelData),...this.$attrs,provider:this.provider,onRedrawView:this.redrawView,onCreated:this.onCreated},this.$slots);if(!this.hasAuthority){const t=vt("403");if(t)return"string"==typeof t.component?w(b(t.component)):w(t.component)}return A(S("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[T("loading"),!this.isComplete]])}})),t("IBizCodeList",N({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]},convertToCodeItemText:{type:Boolean,default:!0},valueFormat:{type:String},unitName:{type:String},showMode:{type:String,default:"DEFAULT"}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,o;const i=ye("code-list"),a=y([]),s=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",r=(null==(o=t.codeList)?void 0:o.valueSeparator)||",",c=O(()=>t.codeList&&t.codeList.orMode?t.codeList.orMode:"STR"),d=yt(c.value);l(a,t=>{let n="";t.length>0&&(n=t.map(t=>t.text).join(s)),e("infoTextChange",n)});const u=(e,n)=>{if(e){const{thresholdGroup:o}=t.codeList;if(o&&oe(Number(n))){const t=wt(e,Number(n));if(t)return t}const i=e.find(t=>t.value==n);if(i)return i;for(let t=0;t<e.length;t++){const o=u(e[t].children,n);if(o)return o}}};l([()=>t.codeListItems,()=>t.value],([e,n],[o,i])=>{if(et(n)||""===n)a.value=[];else{let o=[];const{getSelectArray:i}=d,s=i(n,t.codeList,e,r,t.codeList.codeItemValueNumber);s&&(o=s),a.value=o.map(n=>{const o=u(e,n);let i=n;if(t.convertToCodeItemText&&(null==o?void 0:o.text))i=o.text;else{const{valueFormat:e,unitName:n}=t;e&&(i=ibiz.util.text.format("".concat(i),e)),n&&(i+=n)}return{text:i,color:null==o?void 0:o.color,textCls:null==o?void 0:o.textCls,sysImage:null==o?void 0:o.sysImage}})}},{immediate:!0});const h=t.codeList.emptyText!==ibiz.i18n.t("vue3Util.common.undefined")&&t.codeList.emptyText?t.codeList.emptyText:ibiz.config.common.emptyText;return{items:a,ns:i,emptyText:h,textSeparator:s}},render(){return S("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map((t,e)=>[0!==e?this.textSeparator:null,S("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},["TEXT"!==this.showMode&&t.sysImage&&S(b("iBizIcon"),{icon:t.sysImage},null),"ICON"!==this.showMode&&t.text])])])}})),t("ControlLoadingPlaceholder",N({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(m("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",N({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"},max:{type:Number,default:99},counterMode:{type:Number}},setup:()=>({ns:ye("badge")}),render(){if((this.value||0===this.value)&&!(1===this.counterMode&&this.value<=0))return S("div",{class:[this.ns.b(),this.ns.m(this.type),this.ns.is("mob",ibiz.env.isMob)]},[this.value>this.max?"".concat(this.max,"+"):this.value])}})),t("IBizCustomRender",N({name:"IBizCustomRender",props:{controller:{type:Object,required:!0}},setup(t){const e=ye("custom-render"),n=async(e,n)=>{e.stopPropagation();const o=e.target.getAttribute(n),i=e.target.getAttribute("data"),a=t.controller.context.clone(),s=e.target.getAttribute("context");s&&Object.assign(a,K(s));const r={...t.controller.params},l=e.target.getAttribute("params");l&&Object.assign(r,K(l)),o&&await ht.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:i?K(i):null},o)};return{ns:e,getControlRender:()=>{var o,i,a;const s=null==(o=t.controller)?void 0:o.model.controlRenders;if(!s||0===s.length)return;const r=s.find(t=>t.id===ut.EMPTYPANEL);if(r){if("LAYOUTPANEL_MODEL"===r.renderType&&r.layoutPanelModel){const o=ht.execScriptFn({...t.controller.getEventArgs()},r.layoutPanelModel,{isAsync:!1});return S("div",{innerHTML:o,onClick:t=>n(t,"click"),onDblclick:t=>n(t,"dbclick"),class:[e.b(),e.e(null==(i=r.renderName)?void 0:i.toLowerCase())]},null)}return"LAYOUTPANEL"===r.renderType&&r.layoutPanel?S(b("iBizControlShell"),{class:[e.b(),e.e(null==(a=r.renderName)?void 0:a.toLowerCase())],params:t.controller.params,context:t.controller.context,modelData:r.layoutPanel},null):void 0}}}},render(){return this.getControlRender()}}));class Me{constructor(t,e,n,o){if(Number.isNaN(t)||Number.isNaN(e))throw new Error(ibiz.i18n.t("vue3Util.common.invalidPointCoordinates",{x:t,y:e}));this.x=+t,this.y=+e,this.pressure=n||0,this.time=o||Date.now()}distanceTo(t){return Math.sqrt((this.x-t.x)**2+(this.y-t.y)**2)}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class Be{constructor(t,e,n,o,i,a){this.startPoint=t,this.control2=e,this.control1=n,this.endPoint=o,this.startWidth=i,this.endWidth=a}static fromPoints(t,e){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,o=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new Be(t[1],n,o,t[2],e.start,e.end)}static calculateControlPoints(t,e,n){const o=t.x-e.x,i=t.y-e.y,a=e.x-n.x,s=e.y-n.y,r=(t.x+e.x)/2,l=(t.y+e.y)/2,c=(e.x+n.x)/2,d=(e.y+n.y)/2,u=Math.sqrt(o*o+i*i),h=Math.sqrt(a*a+s*s),p=u+h===0?0:h/(u+h),m=c+(r-c)*p,v=d+(l-d)*p,g=e.x-m,f=e.y-v;return{c1:new Me(r+g,l+f),c2:new Me(c+g,d+f)}}length(){let t,e,n=0;for(let o=0;o<=10;o+=1){const i=o/10,a=this.point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){const o=a-t,i=s-e;n+=Math.sqrt(o*o+i*i)}t=a,e=s}return n}point(t,e,n,o,i){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*o*(1-t)*t*t+i*t*t*t}}class je{constructor(t,e={}){var n,o,i;this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._isRedrawn=!1,this._oldFromDataURL="",this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||2,this.maxWidth=e.maxWidth||2,this.throttle=null!=(n=e.throttle)?n:16,this.minDistance=null!=(o=e.minDistance)?o:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!=(i=e.canvasContextOptions)?i:{},this._strokeMoveUpdate=this.throttle?ie(je.prototype._strokeUpdate,this.throttle):je.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._strokePointerId=void 0,this._oldFromDataURL=""}async fromDataURL(t,e={}){let n=t;return oe(e.rotation)&&0!==e.rotation&&(n=await this.rotateDataURL(n,e.rotation,"image/png")),new Promise((t,o)=>{const i=new Image,a=e.ratio||window.devicePixelRatio||1,s=e.width||this.canvas.width/a,r=e.height||this.canvas.height/a,l=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),i.onload=()=>{this._ctx.drawImage(i,l,c,s,r),t()},i.onerror=t=>{o(t)},i.crossOrigin="anonymous",i.src=n,this._oldFromDataURL=n,this._isEmpty=!1})}rotateDataURL(t,e=0,n="image/png",o){return new Promise((i,a)=>{const s=new Image;s.onload=()=>{const t=e*Math.PI/180,a=s.width,r=s.height,l=document.createElement("canvas"),c=l.getContext("2d");e%180==0?(l.width=a,l.height=r):(l.width=r,l.height=a),c.translate(l.width/2,l.height/2),c.rotate(t),c.drawImage(s,-a/2,-r/2),i(l.toDataURL(n,o))},s.onerror=a,s.crossOrigin="anonymous",s.src=t})}undoLastStep(){const t=[...this._data],e=this._oldFromDataURL;this.clear(),this._isRedrawn=!0,0!==t.length?(t.pop(),this.fromDataURL(e),this.fromData(t,{clear:!1}),this._isEmpty=t.length<=0):this._oldFromDataURL=""}getCurrentOrientation(){const{screen:t}=window,e=t.orientation||t.mozOrientation||t.msOrientation;let n=0;e&&(n=e.angle);const o=window.innerWidth>window.innerHeight;return{isLandscape:o,status:o?"横屏":"竖屏",angle:n,orientation:{0:"DEFAULT",90:"Rotated right","-90":"Rotated left",180:"Upside down"}["".concat(n)]||"未知 (".concat(n,"°)")}}toDataURL(t="image/png",e={}){return"image/svg+xml"===t?(ae(null==e?void 0:e.encoderOptions)&&(e.encoderOptions=void 0),"data:image/svg+xml;base64,".concat(btoa(this.toSVG(null==e?void 0:e.encoderOptions)))):this.toCanvasDataURL(t,e.encoderOptions,e.rotation)}toCanvasDataURL(t="image/png",e,n){if("number"!=typeof e&&(e=void 0),oe(n)&&0!==n){const o=n*Math.PI/180,i=document.createElement("canvas"),a=i.getContext("2d"),s=this.canvas.width,r=this.canvas.height;return n%180==0?(i.width=s,i.height=r):(i.width=r,i.height=s),a.translate(i.width/2,i.height/2),a.rotate(o),a.drawImage(this.canvas,-s/2,-r/2),i.toDataURL(t,e)}return this.canvas.toDataURL(t,e)}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!=(t=this.canvas.ownerDocument.defaultView)?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}isRedrawn(){return this._isRedrawn}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_handleMouseDown(t){this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))}_handleMouseMove(t){this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)}_handleMouseUp(t){this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))}_handleTouchStart(t){1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))}_handleTouchMove(t){1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))}_handleTouchEnd(t){0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t)))}_getPointerId(t){return(null==t?void 0:t.persistentDeviceId)||t.pointerId}_allowPointerId(t,e=!1){return void 0===this._strokePointerId?e:this._getPointerId(t)===this._strokePointerId}_handlePointerDown(t){!this._drawingStroke&&this._isLeftButtonPressed(t)&&this._allowPointerId(t,!0)&&(this._strokePointerId=this._getPointerId(t),t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))}_handlePointerMove(t){this._allowPointerId(t)&&(this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1))}_handlePointerUp(t){!this._isLeftButtonPressed(t)&&this._allowPointerId(t)&&(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove,{passive:!1}),e("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":e("touchmove",this._handleTouchMove,{passive:!1}),e("touchend",this._handleTouchEnd,{passive:!1});break;case"pointerdown":e("pointermove",this._handlePointerMove,{passive:!1}),e("pointerup",this._handlePointerUp,{passive:!1})}this._drawingStroke=!0;const n=this._getPointGroupOptions(),o={...n,points:[]};this._data.push(o),this._reset(n),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);const e=this._createPoint(t.x,t.y,t.pressure),n=this._data[this._data.length-1],o=n.points,i=o.length>0&&o[o.length-1],a=!!i&&e.distanceTo(i)<=this.minDistance,s=this._getPointGroupOptions(n);if(!i||!i||!a){const t=this._addPoint(e,s);i?t&&this._drawCurve(t,s):this._drawDot(e,s),o.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this._strokePointerId=void 0)}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(t,e,n){const o=this.canvas.getBoundingClientRect();return new Me(t-o.left,e-o.top,n,(new Date).getTime())}_addPoint(t,e){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],e),o=Be.fromPoints(n,t);return n.shift(),o}return null}_calculateCurveWidths(t,e,n){const o=n.velocityFilterWeight*e.velocityFrom(t)+(1-n.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(o,n),a={end:i,start:this._lastWidth};return this._lastVelocity=o,this._lastWidth=i,a}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,n){const o=this._ctx;o.moveTo(t,e),o.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1,this._isRedrawn=!0}_drawCurve(t,e){const n=this._ctx,o=t.endWidth-t.startWidth,i=2*Math.ceil(t.length());n.beginPath(),n.fillStyle=e.penColor;for(let n=0;n<i;n+=1){const a=n/i,s=a*a,r=s*a,l=1-a,c=l*l,d=c*l;let u=d*t.startPoint.x;u+=3*c*a*t.control1.x,u+=3*l*s*t.control2.x,u+=r*t.endPoint.x;let h=d*t.startPoint.y;h+=3*c*a*t.control1.y,h+=3*l*s*t.control2.y,h+=r*t.endPoint.y;const p=Math.min(t.startWidth+r*o,e.maxWidth);this._drawCurveSegment(u,h,p)}n.closePath(),n.fill()}_drawDot(t,e){const n=this._ctx,o=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;n.beginPath(),this._drawCurveSegment(t.x,t.y,o),n.closePath(),n.fillStyle=e.penColor,n.fill()}_fromData(t,e,n){for(const o of t){const{points:t}=o,i=this._getPointGroupOptions(o);if(t.length>1)for(let n=0;n<t.length;n+=1){const o=t[n],a=new Me(o.x,o.y,o.pressure,o.time);0===n&&this._reset(i);const s=this._addPoint(a,i);s&&e(s,i)}else this._reset(i),n(t[0],i)}}toSVG({includeBackgroundColor:t=!1}={}){const e=this._data,n=Math.max(window.devicePixelRatio||1,1),o=this.canvas.width/n,i=this.canvas.height/n,a=document.createElementNS("http://www.w3.org/2000/svg","svg");if(a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),a.setAttribute("viewBox","".concat(0," ").concat(0," ").concat(o," ").concat(i)),a.setAttribute("width",o.toString()),a.setAttribute("height",i.toString()),t&&this.backgroundColor){const t=document.createElement("rect");t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("fill",this.backgroundColor),a.appendChild(t)}return this._fromData(e,(t,{penColor:e})=>{const n=document.createElement("path");if(!(Number.isNaN(t.control1.x)||Number.isNaN(t.control1.y)||Number.isNaN(t.control2.x)||Number.isNaN(t.control2.y))){const o="M ".concat(t.startPoint.x.toFixed(3),",").concat(t.startPoint.y.toFixed(3)," ")+"C ".concat(t.control1.x.toFixed(3),",").concat(t.control1.y.toFixed(3)," ")+"".concat(t.control2.x.toFixed(3),",").concat(t.control2.y.toFixed(3)," ")+"".concat(t.endPoint.x.toFixed(3),",").concat(t.endPoint.y.toFixed(3));n.setAttribute("d",o),n.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),n.setAttribute("stroke",e),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),a.appendChild(n)}},(t,{penColor:e,dotSize:n,minWidth:o,maxWidth:i})=>{const s=document.createElement("circle"),r=n>0?n:(o+i)/2;s.setAttribute("r",r.toString()),s.setAttribute("cx",t.x.toString()),s.setAttribute("cy",t.y.toString()),s.setAttribute("fill",e),a.appendChild(s)}),a.outerHTML}blobToDataURL(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=()=>{e(o.result)},o.onerror=()=>{n(new Error("无法转换Blob为DataURL"))},o.readAsDataURL(t)})}loadImage(t,e){const n=new Image;n.onload=()=>e(),n.onerror=()=>e,n.src=t}}t("IBizSignaturePad",N({name:"IBizSignaturePad",props:{options:{type:Object}},setup(t){const e=ye("signature-pad"),n=y(),o=y(),i=y(),a=()=>{const e={};if(t.options){const{dotsize:n,minwidth:o,maxwidth:i,pencolor:a,velocityfilterweight:s,compositeoperation:r,mindistance:l,backgroundcolor:c,throttle:d,canvascontextoptions:u}=t.options;if(n&&Object.assign(e,{dotSize:Number(n)}),o&&Object.assign(e,{minWidth:Number(o)}),i&&Object.assign(e,{maxWidth:Number(i)}),s&&Object.assign(e,{velocityFilterWeight:Number(s)}),l&&Object.assign(e,{minDistance:Number(l)}),d&&Object.assign(e,{throttle:Number(d)}),a&&Object.assign(e,{penColor:String(a)}),r&&Object.assign(e,{compositeOperation:String(r)}),c&&Object.assign(e,{backgroundColor:String(c)}),u){let t=u;if(se(u))try{t=JSON.parse(u)}catch(e){ibiz.log.error(e),t=void 0}Object.assign(e,{canvasContextOptions:{...t}})}}return e},s=t=>{t.preventDefault()},r=t=>{z(()=>{const e=o.value,r=n.value;if(!e)return;const l=window.devicePixelRatio||1,c=r.getBoundingClientRect(),d=c.width<300?300:c.width,u=c.height<150?150:c.height;e.width=d*l,e.height=u*l,e.style.width="".concat(d,"px"),e.style.height="".concat(u,"px"),i.value=new je(e,{...a()});e.getContext("2d").scale(l,l),e.addEventListener("touchstart",s,{passive:!1}),e.addEventListener("touchmove",s,{passive:!1}),null==t||t()})},l=t=>r(t),c=()=>{i.value&&(i.value.off(),l())};return P(()=>{r(),window.addEventListener("resize",c)}),I(()=>{window.removeEventListener("resize",c)}),{ns:e,canvasRef:o,signaturePadRef:n,signaturePad:i,updateSignaturePad:l}},render(){return S("div",{class:this.ns.b(),ref:"signaturePadRef"},[S("div",{class:this.ns.e("container")},[S("canvas",{ref:"canvasRef"},null)])])}}));function Ve(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}const Ue=N({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(t){const e=ye("panel-container"),{id:n}=t.modelData,o=O(()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o});return{ns:e,classArr:o}},render(){var t,e,n;let o;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Ve(o=i.map(t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ve(t)?t:{default:()=>[t]}):t}))?o:{default:()=>[o]}),s=null==(n=this.$attrs)?void 0:n.attrs;if(s&&s.dynamictooltip){const t={...s.dynamictooltip};return delete t.content,S(b("el-tooltip"),R({placement:"right","popper-class":this.ns.e("dynamic-tooltip")},t),{default:()=>S("div",R({class:this.classArr,onClick:()=>{this.controller.onClick()}},this.$attrs),[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),content:()=>S("div",{class:this.ns.e("dynamic-tooltip-content"),innerHTML:s.dynamictooltip.content},null)})}return A(S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),[[T("loading"),this.controller.state.loading]])}});class We{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new bt(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Oe(Ue,function(t){t.component(Ue.name,Ue),Ct("CONTAINER",()=>new We),Ct("CONTAINER_DEFAULT",()=>new We)}));const Fe=N({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){m("ctx").evt.on("onRegister",(e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)});return{ns:ye("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),S("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?ibiz.i18n.t("vue3Util.panelComponent.noProvidedSlot",{id:this.modelData.id}):"")])}});class qe extends Pt{bindControl(t){this.control=t,t.evt.onAll((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})})}}t("PanelCtrlPosController",qe);class Ge{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new qe(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Oe(Fe,function(t){t.component(Fe.name,Fe),Ct("CTRLPOS",()=>new Ge)}));class $e extends bt{}function He(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}t("ScrollContainerItemController",$e);const Ke=t("ScrollContainerItem",N({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:$e,required:!0}},setup(t){const e=ye("scroll-container-item"),{id:n}=t.modelData,o=O(()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]);return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return A(S(b("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},He(n=o.map(t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},He(t)?t:{default:()=>[t]})):t}))?n:{default:()=>[n]}),[[T("loading"),this.controller.state.loading]])}}));class Xe{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new $e(t,e,n);return await o.init(),o}}class Qe extends bt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",Qe);const Ye=t("ScrollContainer",N({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:Qe,required:!0}},setup(t){const e=ye("scroll-container"),{id:n}=t.modelData,o=O(()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]);return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,i=null,a=null,s=null;const r={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach(t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,r.left={width:l};break;case"EAST":i=t,r.right={width:l};break;case"NORTH":o=t,r.top={height:c};break;case"SOUTH":a=t,r.bottom={height:c};break;case"CENTER":s=t;break;default:ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.unadaptedLayout",{layoutPos:e.modelData.layoutPos.layoutPos}))}});for(const t in r)(r[t].width||r[t].height)&&(r[t].flexShrink=0);return A(S("div",{class:this.classArr},[S("div",{class:[this.ns.e("header")],style:r.top},[o]),S("div",{class:[this.ns.b("content")]},[S("div",{class:this.ns.be("content","left"),style:r.left},[n]),S("div",{class:this.ns.be("content","center")},[s]),S("div",{class:this.ns.be("content","right"),style:r.right},[i])]),S("div",{class:[this.ns.e("footer")],style:r.bottom},[a])]),[[T("loading"),this.controller.state.loading]])}}));class Je{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new Qe(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Oe(Ye,function(t){t.component(Ye.name,Ye),t.component(Ke.name,Ke),Ct("CONTAINER_CONTAINER_SCROLL",()=>new Je),Ct("CONTAINER_CONTAINER_SCROLL_LEFT",()=>new Xe),Ct("CONTAINER_CONTAINER_SCROLL_HEADER",()=>new Xe),Ct("CONTAINER_CONTAINER_SCROLL_RIGHT",()=>new Xe),Ct("CONTAINER_CONTAINER_SCROLL_BOTTOM",()=>new Xe),Ct("CONTAINER_CONTAINER_SCROLL_MAIN",()=>new Xe)}));class Ze extends It{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={},this.isLoading=!1}}t("NavPosState",Ze);const tn=["is404","isRoutePushed"];class en extends Pt{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={},this.ignoreEmbedKey=!1}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find(t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map(t=>t.toLowerCase()),!0)),this.panel.evt.on("onControlEvent",t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}});const e=this.rawItemParams.expmode||this.panel.view.params.expmode,n=this.rawItemParams.ignoreembedkey||this.panel.view.params.ignoreembedkey||"";this.ignoreEmbedKey=Object.is(n.toLowerCase(),"true"),"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new Ze(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(at(this.state.navViewMsgs[e],t),tn.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)})):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new Dt({mode:this.routeDepth?Et.ROUTE:Et.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){this.panel.evt.emit("onPresetPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:"onViewCreated",presetParams:t}),ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Ee(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}async openViewByPath(t){var e,n,o,i;const a=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=a,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Ee(this.route,this.routeDepth,!1);return void((null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/error/404")):this.router.push("".concat(n,"/error/404")))}if(a===this.state.currentKey&&this.state.navViewMsgs[a].fullPath)(null==(n=t.modalOptions)?void 0:n.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else if(this.state.navViewMsgs[a].fullPath&&this.getExpItemIsCache(t))(null==(o=t.modalOptions)?void 0:o.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else{const e=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});(null==(i=this.rawItemParams)?void 0:i.routeattributekeys)&&(e.attributekeys=this.rawItemParams.routeattributekeys),this.getExpItemIsCache(t)&&this.state.cacheKeys.push(a),t.viewId&&(this.state.isLoading=!0,await ibiz.commands.execute(xt.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",modalOption:{replace:!this.state.currentKey,...t.modalOptions}}),this.state.isLoading=!1)}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;i(n)&&(e=n.reduce((t,e)=>(t[e.key.toLowerCase()]=e.value,t),{})),Object.assign(this.rawItemParams,e)}}function nn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}t("NavPosController",en);const on=N({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:en,required:!0}},setup(t){const e=t.controller,n=ye("nav-pos"),o=Zt(),i=Jt(),a=y(!1);if(e.setRouter(o),e.routeDepth){const t=Ee(i,e.routeDepth);l(()=>i.fullPath,()=>{const n=Ee(i,e.routeDepth);if(t===n&&i.matched.length>e.routeDepth){if(i.matched.length===e.routeDepth+1&&(a.value=!!i.name,a.value))return;e.onRouteChange(i)}},{immediate:!0})}return{ns:n,c:e,isPresetView:a,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:i,cache:a}=e;let s=null;if(e.routeOpen){if(this.isPresetView)return S(te,null,null);s=S(b("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?S(t,null,null):null;return a?S(b("keepAlive"),{include:o,max:30,isKey:!0},nn(e)?e:{default:()=>[e]}):e}})}else{const t=n&&i[n]?w(b("IBizViewShell"),{context:i[n].context,params:i[n].params,key:this.c.ignoreEmbedKey?void 0:n,viewId:i[n].viewId,onCreated:this.onViewCreated}):null;s=a?S(b("keepAlive"),{include:o,max:30,isKey:!0},nn(t)?t:{default:()=>[t]}):t}return S("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[s])}});class an{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new en(t,e,n);return await o.init(),o}}t("IBizNavPos",Oe(on,function(t){t.component(on.name,on),Ct("RAWITEM_NAV_POS",()=>new an)}));class sn extends It{constructor(){super(...arguments),this.error=null}}const rn=class t extends Pt{constructor(){super(...arguments),this.unitName=void 0}get valueFormat(){return this.model.valueFormat}get dataType(){}get context(){return this.panel.context}get params(){return this.panel.params}get data(){return this.dataParent.data}get value(){return this.data[this.model.id]}createState(){var t;return new sn(null==(t=this.parent)?void 0:t.state)}async validate(){var t;return this.state.visible&&this.state.required&&!this.value?(this.state.error=(null==(t=this.editor)?void 0:t.model.placeHolder)||ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty",{caption:this.model.caption}),!1):(this.state.error=null,!0)}async onInit(){var t,e;await super.onInit(),this.state.required=!this.model.allowEmpty,!0!==this.context.srfreadonly&&"true"!==this.context.srfreadonly&&(null==(t=this.model.editor)?void 0:t.readOnly)&&(this.state.readonly=(null==(e=this.model.editor)?void 0:e.readOnly)||!1),this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await Ot(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),await this.validate(),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.ENTER,event:t})}onClick(e){var n;if(ibiz.env.isMob){this.state.readonly||this.state.disabled||!(null==(n=this.editor)?void 0:n.model.editorType)||t.enableClickType.includes(this.editor.model.editorType)||null==e||e.stopPropagation()}super.onClick(e)}};rn.enableClickType=["SPAN","SPAN_LINK","RAW","MOB2DBARCODEREADER","FIELD_CAROUSEL_PICTURE","FIELD_IMAGE_PICTURE_ONE"];let ln=t("PanelFieldController",rn);const cn=N({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:ln,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=ye("panel-field"),n=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n),e.is("error",!!t.controller.state.error),e.is("mob",ibiz.env.isMob)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:this.ns.b("content"),readonly:this.controller.state.readonly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t),...this.attrs};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=b(this.controller.editorProvider.formEditor);t=w(n,{...e})}else t=S(b("not-supported-editor"),{modelData:this.modelData.editor},null)}return S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[t,this.controller.state.error&&S("div",{class:this.ns.e("error")},[this.controller.state.error])])}});class dn{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new ln(t,e,n);return await o.init(),o}}t("IBizPanelField",Oe(cn,function(t){t.component(cn.name,cn),Ct("FIELD",()=>new dn)}));class un extends Pt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}calcDynaClass(t){var e,n;if(this.model.dynaClass||(null==(e=this.model.rawItem)?void 0:e.dynaClass)){const e=this.model.dynaClass?St(this.model.dynaClass,t):[],o=(null==(n=this.model.rawItem)?void 0:n.dynaClass)?St(this.model.rawItem.dynaClass,t):[];this.state.class.containerDyna=[...e,...o]}if(this.model.labelDynaClass){const e=St(this.model.labelDynaClass,t);this.state.class.labelDyna=e}}}t("PanelRawItemController",un);const hn=N({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:un,required:!0}},setup(t){const e=ye("panel-rawitem"),n=t.controller,o=y(""),i=y(""),{rawItem:a}=t.modelData;a&&a.cssStyle&&(i.value=a.cssStyle);const s=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o});return l(()=>n.data,async t=>{if(t){const e=n.model.rawItem;if(!e)return;let i;const a={...t};"RAW"===e.contentType?i=e.caption:"HTML"===e.contentType&&(i=e.content),i&&e.templateMode&&(i=await ibiz.util.hbs.render(i.replace("//n","\n"),Object.assign(a,{data:{...t}}))),o.value=i}},{immediate:!0}),{ns:e,classArr:s,tempStyle:i,content:o}},render(){if(this.controller.state.visible)return S("div",{class:this.classArr,style:this.tempStyle,onClick:t=>this.controller.onClick(t)},[S(b("iBizRawItem"),{rawItem:this.modelData,content:this.content},null)])}});class pn{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new un(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Oe(hn,function(t){t.component(hn.name,hn),Ct("RAWITEM",()=>new pn),Ct("RAWITEM_STATIC_IMAGE",()=>new pn),Ct("RAWITEM_STATIC_LABEL",()=>new pn),Ct("RAWITEM_STATIC_TEXT",()=>new pn)}));class mn extends It{constructor(){super(...arguments),this.data={}}}class vn{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new mn,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const i=At(this.model).map(t=>t.id);o._evt.on("change",t=>{i.includes(t)&&this.childDataChangeNotify([t])})}get data(){return this.state.data}async validate(){return(await Promise.all(Object.values(this.panelItems).map(t=>t.validate()))).every(t=>t)}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var o,i;const a=this.parent.providers[t.id];if(!a)return;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!Tt(t)?await this.initChildrenController(t.panelItems,e,s):(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initChildrenController(t.panelTabPages,e,s)}))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach(e=>{e.dataChangeNotify(t)})}async panelStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{t.destroy()})}}class gn extends zt{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",gn);class fn extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new gn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map(async t=>{var e,n;const o=await _t(t,this.panel.model,this.panel.view.model);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!Tt(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))}))}computeNavParams(){const t=this.dataParent.data||{},{navigateContexts:e,navigateParams:n}=this.model,o=this.panel.context.clone();Object.assign(o,Lt(e,t,this.panel.context,this.panel.params));const i=Lt(n,t,this.panel.context,this.panel.params);return Object.assign(i,this.panel.params),{context:o,params:i}}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}childrenStateNotify(t){this.dataItems.forEach(e=>{e.panelStateNotify(t)})}async validate(){return(await Promise.all(this.dataItems.map(t=>t.validate()))).every(t=>t)}async setData(t){const e=At(this.model),n=t.map(t=>new kt(e,t));this.dataItems=n.map(t=>new vn(this.model,this.panel,this,t)),this.dataItems.length&&await Promise.all(this.dataItems.map(t=>t.init())),this.state.items=n,this.childrenStateNotify(Rt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:o}=this.computeNavParams(),i=await Mt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){super.destroy(),this.dataItems.forEach(t=>{t.destroy()})}}t("MultiDataContainerController",fn);const yn=N({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:fn,required:!0}},setup(t){const e=ye("multi-data-container"),{id:n}=t.modelData;l(()=>t.controller.state.items,()=>{t.controller.dataItems.forEach(t=>{t.state=v(t.state);Object.keys(t.panelItems).forEach(e=>{const n=t.panelItems[e];n.state=v(n.state)})})},{immediate:!0});const o=m("renderPanelItem"),i=O(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map((t,e)=>{const n=this.controller.dataItems[e];return S(b("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const o=n.panelItems[t.id];return S(b("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(i=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(i)&&!_(i)?e:{default:()=>[e]});var i})]}})}),A(S("div",{class:this.classArr},[t]),[[T("loading"),this.controller.state.loading]])}});class wn{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new fn(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Oe(yn,function(t){t.component(yn.name,yn),Ct("CONTAINER_CONTAINER_MULTIDATA",()=>new wn)}));class bn extends zt{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerRawState",bn);class Cn extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.items}createState(){var t;return new bn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var o,i;const a=await _t(t,e.model,e.view.model);if(!a)return;this.providers[t.id]=a;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!Tt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)}))}computeNavParams(){const{navigateContexts:t,navigateParams:e}=this.model,n=this.panel.context.clone();Object.assign(n,Lt(t,this.panel.params,this.panel.context));const o=Lt(e,this.panel.params,this.panel.context);return Object.assign(o,this.panel.params),{context:n,params:o}}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,n;null==(n=(e=this.data).destroy)||n.call(e),this.state.items=t,this.childrenStateNotify(Rt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:o}=this.computeNavParams(),i=await Mt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{var e;null==(e=t.destroy)||e.call(t)})}}t("MultiDataContainerRawController",Cn);const Pn=N({name:"IBizMultiDataContainerRaw",props:{modelData:{type:Object,required:!0},controller:{type:Cn,required:!0}},setup(t){const e=ye("multi-data-container-raw"),{id:n}=t.modelData;l(()=>t.controller.state.items,()=>{Object.keys(t.controller.panelItems).forEach(e=>{const n=t.controller.panelItems[e];n.state=v(n.state)})},{immediate:!0,deep:!0});const o=m("renderPanelItem"),i=O(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():S(b("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const n=this.controller.panelItems[t.id];return S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]});var o})]}}),A(S("div",{class:this.classArr},[t]),[[T("loading"),this.controller.state.loading]])}});class In{constructor(){this.component="IBizMultiDataContainerRaw"}async createController(t,e,n){const o=new Cn(t,e,n);return await o.init(),o}}t("IBizMultiDataContainerRaw",Oe(Pn,function(t){t.component(Pn.name,Pn),Ct("CONTAINER_CONTAINER_MULTIDATA_RAW",()=>new In)}));class Dn extends zt{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Dn);class En extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Dn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var o,i;const a=await _t(t,e.model,e.view.model);if(!a)return;this.providers[t.id]=a;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!Tt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)}))}computeNavParams(){const{navigateContexts:t,navigateParams:e}=this.model,n=this.panel.context.clone();Object.assign(n,Lt(t,this.panel.params,this.panel.context));const o=Lt(e,this.panel.params,this.panel.context);return Object.assign(o,this.panel.params),{context:n,params:o}}initContainerData(){const{dataSourceType:t,dataName:e,dataRegionType:n,scriptCode:o}=this.model;if("LOGINFORM"!==n)switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!o)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},o,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}else this.setLoginForm()}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,n;const o=At(this.model),i=o.map(t=>t.id),a=new kt(o,t);a._evt.on("change",t=>{i.includes(t)&&this.childDataChangeNotify([t])}),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=a,this.childrenStateNotify(Rt.LOAD)}setLoginForm(){this.setData({})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:o}=this.computeNavParams(),i=await Mt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}childDataChangeNotify(t){Object.values(this.panelItems).forEach(e=>{e.dataChangeNotify(t)})}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{t.destroy()})}}t("SingleDataContainerController",En);const xn=N({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:En,required:!0}},setup(t){const e=ye("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach(e=>{const n=t.controller.panelItems[e];n.state=v(n.state)});const o=m("renderPanelItem"),i=O(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():S(b("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const n=this.controller.panelItems[t.id];return S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]});var o})]}}),A(S("div",{class:this.classArr},[t]),[[T("loading"),this.controller.state.loading]])}});class On{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new En(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Oe(xn,function(t){t.component(xn.name,xn),Ct("CONTAINER_CONTAINER_SINGLEDATA",()=>new On)}));class Nn extends zt{}t("GridContainerState",Nn);class Sn extends bt{createState(){var t;return new Nn(null==(t=this.parent)?void 0:t.state)}}function An(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}t("GridContainerController",Sn);const Tn=N({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Sn,required:!0}},setup(t){const e=ye("grid-container"),{id:n}=t.modelData,o=O(()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}),i=O(()=>({...t.modelData.layout,layout:"TABLE_12COL"})),a=y(void 0),s=y(12);return{ns:e,classArr:o,layoutModel:i,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:s,adaptCols:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach(n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))});let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return A(S(b("iBizRow"),{class:this.classArr,layout:this.layoutModel},An(n=o.map(t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},An(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]}),[[T("loading"),this.controller.state.loading]])}});class zn{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Sn(t,e,n);return await o.init(),o}}t("IBizGridContainer",Oe(Tn,function(t){t.component(Tn.name,Tn),Ct("CONTAINER_CONTAINER_GRID",()=>new zn)}));class Rn extends zt{}t("PanelContainerImageState",Rn);class _n extends bt{createState(){var t;return new Rn(null==(t=this.parent)?void 0:t.state)}}function Ln(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}t("PanelContainerImageController",_n);const kn=N({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:_n,required:!0}},setup(t){const e=ye("panel-container-image"),{id:n}=t.modelData,o=O(()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}),i=O(()=>{const e=t.controller.model.sysImage,n={};let o="";if(null==e?void 0:e.rawContent)if(H(e.rawContent)){const t=e.rawContent.replace(/[\u4e00-\u9fff]/g,"");o="url(data:image/svg+xml;base64,".concat(btoa(t),")")}else o="url(".concat(e.rawContent,")");else(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")"));return o&&Object.assign(n,{backgroundImage:o}),n});return{ns:e,classArr:o,backgroundStyle:i}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],i=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Ln(n=o.map(t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ln(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]});return A(S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t),style:this.backgroundStyle},[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,i]),[[T("loading"),this.controller.state.loading]])}});class Mn{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new _n(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Oe(kn,function(t){t.component(kn.name,kn),Ct("CONTAINER_CONTAINER_IMAGE",()=>new Mn)}));class Bn extends zt{}t("PanelContainerGroupState",Bn);class jn extends bt{createState(){var t;return new Bn(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",jn);class Vn{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new jn(t,e,n);return await o.init(),o}}function Un(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}const Wn=N({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:jn,required:!0}},setup(t){const e=ye("panel-container-group"),n=y(!t.controller.defaultExpansion);return{ns:e,captionText:O(()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let i=n;return o&&(i=ibiz.i18n.t(o.lanResTag,n)),i}),isCollapse:n,changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)}}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible),this.ns.is("mob",ibiz.env.isMob)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Un(n=i.map(t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Un(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]});let s=null;return this.modelData.showCaption&&(s=S("div",{class:[this.ns.b("header"),this.ns.is("is-mob",ibiz.env.isMob)],onClick:this.changeCollapse},[S("div",{class:[this.ns.be("header","left")]},[S("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.modelData.sysImage&&S(ke,{class:this.ns.em("caption","icon"),icon:this.modelData.sysImage},null),this.captionText,this.modelData.counterId&&S("span",{class:this.ns.e("counter")},[L("("),this.controller.state.counterData[this.modelData.counterId],L(")")])])]),S("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?S("ion-icon",{name:"caret-forward-sharp"},null):S("ion-icon",{name:"caret-down-sharp"},null))])])),A(S("div",{class:o},[s,S("div",{class:[this.ns.b("content")]},[a])]),[[T("loading"),this.controller.state.loading]])}});t("IBizPanelContainerGroup",Oe(Wn,function(t){t.component(Wn.name,Wn),Ct("CONTAINER_CONTAINER_GROUP",()=>new Vn)}));function Fn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}const qn=N({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(t){const e=ye("panel-tab-page"),n=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return A(S(b("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Fn(n=o.map(t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return S(b("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Fn(t)?t:{default:()=>[t]})}))?n:{default:()=>[n]}),[[T("loading"),this.controller.state.loading]])}});class Gn{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new bt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Oe(qn,function(t){t.component(qn.name,qn),Ct("TABPAGE",()=>new Gn)}));class $n extends Pt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?ht.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const Hn=N({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:$n,required:!0}},setup(t){var e;const n=ye("panel-item-render"),o=ye("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:i}=t.modelData,a=O(()=>[n.b(),n.m(i),o.b(),n.is("hidden",!t.controller.state.visible)]),s=O(()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data));return{ns:n,classArr:a,htmlCode:s}},render(){return S("div",{class:this.classArr,innerHTML:this.htmlCode,onClick:t=>this.controller.onClick(t)},null)}});class Kn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new $n(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Oe(Hn,function(t){t.component(Hn.name,Hn),Ct("PREDEFINE_RENDER",()=>new Kn)}));const Xn=N({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ye("teleport-placeholder"),n=y(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const i=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:i,tempStyle:n}},render(){if(this.controller.state.visible)return S("div",{id:this.controller.state.teleportTag,class:this.classArr,style:this.tempStyle},null)}});class Qn extends It{constructor(){super(...arguments),this.teleportTag=""}}class Yn extends Pt{createState(){var t;return new Qn(null==(t=this.parent)?void 0:t.state)}async onInit(){var t,e;await super.onInit();const n=this.panel.view.model.codeName;let o="".concat(null==n?void 0:n.toLowerCase(),"-").concat(this.model.id);const i=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find(t=>"TeleportTag"===t.key);i&&i.value&&(o=i.value),ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.placeholderIdentifier",{viewCodeName:n,id:this.model.id}),o),this.state.teleportTag=o}}class Jn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const o=new Yn(t,e,n);return await o.init(),o}}t("TeleportPlaceholderProvider",Jn);t("IBizTeleportPlaceholder",Oe(Xn,function(t){t.component(Xn.name,Xn),Ct("RAWITEM_TELEPORT_PLACEHOLDER",()=>new Jn)}));const Zn=N({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup:()=>({ns:ye("panel-container-tabs")}),render(){return w(b("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class to{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const o=new bt(t,e,n);return await o.init(),o}}t("IBizPanelContainerTabs",Oe(Zn,function(t){t.component(Zn.name,Zn),Ct("CONTAINER_TABS",()=>new to)}));const eo=N({name:"IBizPanelCtrlViewPageCaption",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ye("panel-ctrl-view-page-caption"),n=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n),e.is("mob",ibiz.env.isMob)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:n}},render(){let t=null;return this.controller.data&&(t=S("span",{class:this.ns.b("content")},[this.controller.state.caption])),S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[t])}});class no extends Pt{async onInit(){await super.onInit(),this.state.caption=this.panel.view.model.caption||"",this.panel.view.evt.on("onViewInfoChange",({caption:t,dataInfo:e})=>{this.state.caption="".concat(this.panel.view.model.caption).concat(e?"-".concat(e):"")})}}class oo{constructor(){this.component="IBizPanelCtrlViewPageCaption"}async createController(t,e,n){const o=new no(t,e,n);return await o.init(),o}}t("IBizPanelCtrlViewPageCaption",Oe(eo,function(t){t.component(eo.name,eo),Ct("CTRLPOS_VIEW_PAGECAPTION",()=>new oo)}));const io=N({name:"IBizAuthWxmpQrcode",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ye("auth-wxmp-qrcode"),{state:n}=t.controller,o=Jt();t.controller.setRouter(o);const i=async()=>{await t.controller.loadQrcode()};return l(()=>n.visible,()=>{var t;n.visible&&(n.keepAlive&&!(null==(t=n.qrcode)?void 0:t.expirein)||!n.keepAlive)&&i()},{immediate:!0}),I(()=>{t.controller.destroy()}),{ns:e,loadQrcode:i}},render(){var t,e;return S("div",{class:this.ns.b()},[S("div",{class:this.ns.e("content")},[this.controller.state.qrcode&&S("img",{class:this.ns.e("qrcode"),src:null==(t=this.controller.state.qrcode)?void 0:t.url},null),!(null==(e=this.controller.state.qrcode)?void 0:e.expirein)&&S("div",{class:this.ns.e("mask")},[S("ion-icon",{title:ibiz.i18n.t("vue3Util.panelComponent.refresh"),name:"reload-outline",onClick:this.loadQrcode,class:this.ns.em("mask","icon")},null)])]),S("div",{class:this.ns.e("caption")},[this.controller.state.tips])])}});class ao extends It{}class so extends Pt{constructor(){super(...arguments),this.pollingTime=2,this.rawItemParams={}}createState(){var t;return new ao(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),this.handleRawItemParams(),this.initParams()}setRouter(t){this.route=t}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;i(n)&&(e=n.reduce((t,e)=>(t[e.key.toLowerCase()]=e.value,t),{})),Object.assign(this.rawItemParams,e)}initParams(){var t;this.pollingTime=(t=this.rawItemParams.pollingtime)&&isFinite(Number(t))?Number(this.rawItemParams.pollingtime):2,this.state.tips=this.model.caption||ibiz.i18n.t("vue3Util.panelComponent.wxQrcodeCaption")}async loadQrcode(){try{const t=await ibiz.net.get("/uaa/open/wxmp/createqrcode",{},{srfdcsystem:ibiz.env.dcSystem});t.ok&&t.data&&(this.state.qrcode=t.data,this.setTimer())}catch(t){ibiz.log.error(t.message)}}setTimer(){this.expirationTimer=setInterval(()=>{this.state.qrcode&&this.state.qrcode.expirein>0?this.state.qrcode.expirein-=1:clearInterval(this.expirationTimer)},1e3),this.pollingTimer=setInterval(async()=>{await this.pollingLogin()},1e3*this.pollingTime)}async pollingLogin(){try{if(this.state.qrcode&&this.state.qrcode.expirein>0){if(this.state.visible){const t=await ibiz.net.get("/uaa/open/wxmp/qrcode/".concat(this.state.qrcode.ticket),{},{srfdcsystem:ibiz.env.dcSystem}),{data:e,ok:n}=t;if(n&&(null==e?void 0:e.token)){clearInterval(this.pollingTimer);const t=30;J(Z.TOKEN_REMEMBER,"1",t),J(Z.TOKEN,e.token,t);const n=(new Date).getTime()+1e3*(e.expirein||7199);J(Z.TOKEN_EXPIRES,"".concat(n),t),e.refresh_token&&J(Z.REFRESH_TOKEN,e.refresh_token,t),tt(Z.IS_ANONYMOUS);const o=this.route.query.ru||"/";window.location.hash=o||"/",window.history.pushState({},""),window.location.reload()}}}else clearInterval(this.pollingTimer)}catch(t){ibiz.log.error(t.message)}}async destroy(){await super.destroy(),this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=void 0),this.expirationTimer&&(clearInterval(this.expirationTimer),this.expirationTimer=void 0)}}class ro{constructor(){this.component="IBizAuthWxmpQrcode"}async createController(t,e,n){const o=new so(t,e,n);return await o.init(),o}}t("IBizAuthWxmpQrcode",Oe(io,function(t){t.component(io.name,io),Ct("RAWITEM_AUTH_WXMP_QRCODE",()=>new ro)})),t("AppRedirectView",N({setup(){var t;const e=X.create((null==(t=ibiz.appData)?void 0:t.context)||{});I(()=>{e.destroy()});const{href:n}=window.location;P(()=>ibiz.util.hiddenAppLoading()),async function(){await Bt(e,n)}()},render:()=>S("div",null,[ibiz.i18n.t("vue3Util.view.redirectionProgress")])}));class lo{constructor(){this.component="IBizView"}}const co=N({name:"IBizView",props:{context:{type:Object},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(t,{slots:e}){const n=ye("view"),o=Re((...t)=>new pt(...t));_e(o);const i=jt(o.model),a=[],s=new Map,r=[];i.forEach(t=>{const{teleportFlag:e,teleportTag:n}=Vt(t);n||e?(a.push(t),s.set(t.id,n||"")):r.push(t)});const{viewType:l,sysCss:d,codeName:u}=o.model,h=l.toLowerCase(),p=null==d?void 0:d.cssName,m=O(()=>[n.b(),n.b(h),n.m(u),p,o.state.viewMessages.TOP?"has-top-message":"",o.state.viewMessages.BOTTOM?"has-bottom-message":"",o.state.presetClassList]),v=(t,e={})=>{const n=t.name||t.id;return{context:o.context,params:o.params,modelData:t,...o.slotProps[n]||{},...e}};let g;return P(()=>{z(async()=>{const t=document.getElementById(o.id),e=await ibiz.hub.config.view.get(o.model.id);t&&(null==e?void 0:e.waterMarkOption)&&(g=ibiz.util.watermark.mount(e.waterMarkOption,t,o.context,o.params,o.state.srfactiveviewdata||{}))})}),c(()=>{null==g||g()}),{c:o,ns:n,controls:r,teleportControls:a,viewClassNames:m,onLayoutPanelCreated:t=>{o.setLayoutPanel(t)},getCtrlProps:v,renderControl:(t,n={})=>{const i=t.name||t.id,a=v(t,n);if(e[i])return M(e,i,a);const s=o.providers[i],r=b((null==s?void 0:s.component)||"IBizControlShell");return s&&(a.provider=s),w(r,a)},getCtrlTeleportTag:t=>{var e,n;const i=s.get(t.id);if(i)return i;const a=null==(n=null==(e=o.parentView)?void 0:e.layoutPanel)?void 0:n.panelItems[t.name];return a?"#".concat(a.state.teleportTag):void 0},getControlStyle:()=>{const t={};return Object.assign(t,{display:o.state.hasError?"none":"initial"}),t}}},render(){var t,e;let n=null;if(this.c.state.isCreated)if(0===this.c.engines.length)n=S("span",{style:"color:red;"},[ibiz.i18n.t("vue3Util.view.viewType",{viewType:this.modelData.viewType})]);else{const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const n=t.name||t.id;e[n]=e=>this.renderControl(t,e)});const o=this.c.model.viewLayoutPanel,i=this.c.providers[o.name];n=w(b(i.component),{modelData:o,context:this.c.context,params:this.c.params,provider:i,container:this.c,style:this.getControlStyle(),onControllerAppear:this.onLayoutPanelCreated},e)}let o=null;this.c.state.isCreated&&(null==(e=this.teleportControls)?void 0:e.length)&&(o=this.teleportControls.map(t=>{let e;const n=this.getCtrlTeleportTag(t);return n?S("div",{style:this.getControlStyle()},[S(k,{to:n,disabled:!this.c.state.activated},(o=e=this.renderControl(t),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]}))]):(ibiz.log.error(ibiz.i18n.t("vue3Util.view.noTeleportTag",{name:t.name})),null);var o}));let i=null;if(this.c.state.hasError&&this.c.error.status){const t=vt(this.c.error.status);t&&("string"==typeof t.component&&(i=w(b(t.component))),i=w(t.component))}return A(S("div",{class:this.viewClassNames,id:this.c.id},[n,o,i]),[[T("loading"),this.c.state.isLoading]])}});class uo{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Ut(t,e,n,o)}}class ho{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Wt(t,e,n,o)}}t("IBizView",Oe(co,function(t){t.component(co.name,co),Ft("DEFAULT",()=>new lo),Ft("APPDATAUPLOADVIEW",()=>new uo),Ft("DEMDCUSTOMVIEW",()=>new ho)})),t("TodoRedirect",N({setup(){const t=Zt(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error(ibiz.i18n.t("vue3Util.view.insufficientRedirection"));const i=ee.parse(o,{delimiter:";"}),{apptype:a,todotype:s,todoid:r}=i,l={srfapptype:"pc",srfapp:""};a||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(r,"/getlinkurl"),l)).data.linkurl;a?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(s),t.push("/index".concat(e)))}()},render:()=>S("div",null,[ibiz.i18n.t("vue3Util.view.toDoList")])}));class po{constructor(){this.component="IBizPortalView"}}const mo=N({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=ye("view"),n=Re((...t)=>new pt(...t)),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:i,sysCss:a,codeName:s}=n.model,r=i.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l];return{c:n,ns:e,controls:o,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const i=n[e];if(i)return void(n[e]=()=>i({modelData:t,...o}));const a=this.c.providers[e];a&&(n[e]=()=>{const e=b(a.component);return w(e,{modelData:t,...o,provider:a})})}),n.dashboard&&(e=n.dashboard())}return S("div",{class:this.viewClassNames},[e])}}),vo=(t("IBizPortalView",Oe(mo,function(t){t.component(mo.name,mo),Ft(rt.APP_PORTAL_VIEW,()=>new po),Ft(rt.DE_PORTAL_VIEW,()=>new po),Ft(rt.DE_PORTAL_VIEW9,()=>new po)})),N({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},isEmbedCtrlNav:{type:Boolean,default:!1}},setup(t){const e=Re((...t)=>new pt(...t)),n=y(),o=y(),i=y();return e.evt.on("onCreated",()=>{qt(h(t.modelData),h(e.context),h(e.params)).then(async t=>{if("view"!==t.type)throw new F(ibiz.i18n.t("vue3Util.view.embeddedRedirectionView"));n.value=t.viewId,o.value=t.context,i.value=t.params})}),t.isEmbedCtrlNav&&l(()=>[e.context,e.params],()=>{qt(h(t.modelData),h(e.context),h(e.params)).then(async t=>{"view"===t.type&&(n.value=t.viewId,o.value=t.context)})},{deep:!0}),{c:e,toViewId:n,toViewContext:o,toViewParams:i}},render(){return this.toViewId?w(b("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):A(S("div",{style:"width: 100%; height: 100%;"},null),[[T("loading"),!this.toViewId]])}}));class go{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Oe(vo,function(t){t.component(vo.name,vo);const e=new go;Ft(rt.DE_REDIRECT_VIEW,()=>e)}));class fo{constructor(){this.component="IBizHtmlView"}}const yo=N({name:"IBizHtmlView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=ye("view"),n=Re((t,...e)=>new Gt(t,...e)),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:i,sysCss:a,codeName:s}=n.model,r=i.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l],d=y(!1);B(()=>{n.state.htmlUrl&&(d.value=!0)});return{c:n,ns:e,controls:o,viewClassNames:c,isLoading:d,onLoad:()=>{d.value=!1}}},render(){if(!this.c.state.isCreated)return;if(this.c.state.htmlUrl)return A(S("div",{class:this.viewClassNames},[S("iframe",{src:this.c.state.htmlUrl,onLoad:()=>this.onLoad()},null)]),[[T("loading"),this.isLoading]]);let t=null;const e=vt("404");return e&&("string"==typeof e.component&&(t=w(b(e.component))),t=w(e.component)),S("div",{class:this.viewClassNames},[t])}});t("IBizHtmlView",Oe(yo,function(t){t.component(yo.name,yo),Ft(rt.DE_HTML_VIEW,()=>new fo)}));const wo=N({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:{type:Object}},setup(t,{slots:e}){const n=ge((...e)=>new $t(...e,t.container)),o=ye("control-".concat(n.model.controlType.toLowerCase()));l(()=>t.data,t=>{t&&(n.setInputData(t),n.load())},{immediate:!0}),n.evt.on("onCreated",()=>{Object.keys(n.panelItems).forEach(t=>{const e=n.panelItems[t];e.state=v(e.state)})});const i=(t,o)=>{var a,s;if(t.hidden)return null;const{providers:r,panelItems:l}=o||n,c=r[t.id];if(!c)return S("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);if("CTRLPOS"!==t.itemType&&e[t.id])return M(e,t.id,{model:t,data:n.data,value:n.data[t.id]});const d=b(c.component);let u;if("CTRLPOS"===t.itemType&&e[t.id]){const n=l[t.id];u=n.parent&&Ht(n.parent.model)?()=>e[t.id]({isSimple:!0,data:n.data}):()=>e[t.id]()}else"TABPANEL"===t.itemType&&(null==(a=t.panelTabPages)?void 0:a.length)?u=()=>t.panelTabPages.map(t=>i(t,o)):Tt(t)?u=void 0:(null==(s=t.panelItems)?void 0:s.length)&&(u=()=>t.panelItems.map(t=>i(t,o)));let h="";t.cssStyle&&(h=t.cssStyle);const p=l[t.id],m=function(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach(t=>{t.attrName&&t.attrValue&&(o[t.attrName]=ht.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))}),o}(t,p);return m.dynamicstyle&&("object"==typeof m.dynamicstyle?h+=Object.entries(m.dynamicstyle).map(([t,e])=>"".concat(t,":").concat(e,";")).join(""):h+=m.dynamicstyle,delete m.dynamicstyle),w(d,{modelData:t,controller:p,key:t.id,style:h,attrs:m},u)};return C("renderPanelItem",i),{c:n,ns:o,renderPanelItem:i}},render(){const{state:t,model:e}=this.c;return S(b("iBizControlBase"),{controller:this.c},{default:()=>[S(b("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map(t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]});var o}))]}})]})}});class bo{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Oe(wo,function(t){t.component(wo.name,wo),Kt(Xt.VIEW_LAYOUT_PANEL,()=>new bo)}));function Co(t,e,n){var o,i;if(t.hidden)return;const{providers:a,panelItems:s}=e,r=a[t.id];if(!r)return S("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);const l=b(r.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map(t=>Co(t,e,n)):Tt(t)?c=void 0:(null==(i=t.panelItems)?void 0:i.length)&&(c=()=>t.panelItems.map(t=>Co(t,e,n)));let d="";t.cssStyle&&(d=t.cssStyle);const u=s[t.id],h=function(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach(t=>{t.attrName&&t.attrValue&&(o[t.attrName]=ht.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))}),o}(t,u);return h.dynamicstyle&&("object"==typeof h.dynamicstyle?d+=Object.entries(h.dynamicstyle).map(([t,e])=>"".concat(t,":").concat(e,";")).join(""):d+=h.dynamicstyle,delete h.dynamicstyle),w(l,{modelData:t,controller:u,key:t.id,style:d,attrs:h},c)}const Po=N({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:{type:Object},loadDefault:{type:Boolean,default:!0}},setup(t){const e=ge((...e)=>new Qt(...e,t.container)),n=ye("control-".concat(e.model.controlType.toLowerCase()));l(()=>t.data,t=>{t&&(e.setInputData(t),e.load())},{immediate:!0}),e.evt.on("onCreated",()=>{Object.keys(e.panelItems).forEach(t=>{const n=e.panelItems[t];n.state=v(n.state)})});const o=m("renderPanelItem");return C("renderPanelItem",o||Co),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return S(b("iBizControlBase"),{controller:this.c},{default:()=>[S(b("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map(t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=Co(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]});var o}))]}})]})}});class Io{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Oe(Po,function(t){t.component(Po.name,Po),Kt(Xt.PANEL,()=>new Io)}));function Do(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Eo(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function xo(t,e){for(var n,o="",i=0,a=-1,s=0,r=0;r<=t.length;++r){if(r<t.length)n=t.charCodeAt(r);else{if(47===n)break;n=47}if(47===n){if(a===r-1||1===s);else if(a!==r-1&&2===s){if(o.length<2||2!==i||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",i=0):i=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),a=r,s=0;continue}}else if(2===o.length||1===o.length){o="",i=0,a=r,s=0;continue}e&&(o.length>0?o+="/..":o="..",i=2)}else o.length>0?o+="/"+t.slice(a+1,r):o=t.slice(a+1,r),i=r-a-1;a=r,s=0}else 46===n&&-1!==s?++s:s=-1}return o}var Oo={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var i;o>=0?i=arguments[o]:(void 0===t&&(t=process.cwd()),i=t),Eo(i),0!==i.length&&(e=i+"/"+e,n=47===i.charCodeAt(0))}return e=xo(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Eo(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=xo(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Eo(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];Eo(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":Oo.normalize(t)},relative:function(t,e){if(Eo(t),Eo(e),t===e)return"";if((t=Oo.resolve(t))===(e=Oo.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,i=o-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var s=e.length-a,r=i<s?i:s,l=-1,c=0;c<=r;++c){if(c===r){if(s>r){if(47===e.charCodeAt(a+c))return e.slice(a+c+1);if(0===c)return e.slice(a+c)}else i>r&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var d=t.charCodeAt(n+c);if(d!==e.charCodeAt(a+c))break;47===d&&(l=c)}var u="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return u.length>0?u+e.slice(a+l):(a+=l,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(Eo(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');Eo(t);var n,o=0,i=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,r=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!a){o=n+1;break}}else-1===r&&(a=!1,r=n+1),s>=0&&(l===e.charCodeAt(s)?-1===--s&&(i=n):(s=-1,i=r))}return o===i?i=r:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){Eo(t);for(var e=-1,n=0,o=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var r=t.charCodeAt(s);if(47!==r)-1===o&&(i=!1,o=s+1),46===r?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=s+1;break}}return-1===e||-1===o||0===a||1===a&&e===o-1&&e===n+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){Eo(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),i=47===o;i?(e.root="/",n=1):n=0;for(var a=-1,s=0,r=-1,l=!0,c=t.length-1,d=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===r&&(l=!1,r=c+1),46===o?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){s=c+1;break}return-1===a||-1===r||0===d||1===d&&a===r-1&&a===s+1?-1!==r&&(e.base=e.name=0===s&&i?t.slice(1,r):t.slice(s,r)):(0===s&&i?(e.name=t.slice(1,a),e.base=t.slice(1,r)):(e.name=t.slice(s,a),e.base=t.slice(s,r)),e.ext=t.slice(a,r)),s>0?e.dir=t.slice(0,s-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Oo.posix=Oo;var No=Oo,So=Do(No);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some(e=>"string"==typeof e?t===e:e.test(t))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach(e=>{t.use(e.code,e.extraParams)})}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t,e={}){this.pluginCodes.push({code:t,extraParams:e}),ce.useComponent.callSync(null,t,e)}async loadPlugin(t,e=ibiz.env.appId){if(!0===t.runtimeObject){const n=t;if(n){const t=n.rtobjectName,o=n.rtobjectRepo,i=n.pluginParams||{};if(this.isIgnore(o))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(o)){const t=await this.loadQueue.get(o);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(n.rtobjectName,n.rtobjectRepo,e,{...i});this.loadQueue.set(o,t);return await t}catch(t){throw new Y(n,ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}finally{this.loadQueue.delete(o)}}}return!1}async loadPluginRef(t,e,n=ibiz.env.appId,o={}){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let i=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat("FULLCODE"===ibiz.env.runContainer&&n!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(n):ibiz.env.pluginBaseUrl,"/").concat(No.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));i=a.data}Object.assign(i,{appId:n,extraParams:o});const a=new Yt(t,e,i);if(a){await this.loadPluginExternal(a.config);try{return await this.loadScript(a),this.pluginCache.set(t,a),!0}catch(t){ibiz.log.error(t)}}return!1}async loadScript(t){const e=t.repo,{name:n,appId:o,system:i,styles:a=[],extraParams:s={}}=t.config;let r="";if(r=No.join(e,i),r){if(this.cache.has(r))return;const t="FULLCODE"===ibiz.env.runContainer&&o!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(o):ibiz.env.pluginBaseUrl;let i=null;const l=this.parseUrl(r,t),c=("string"==typeof a?[a]:a).map(n=>this.parseUrl(So.join(e,n),t));if(System.addImportMap({imports:{[n]:l},styles:{[n]:c}}),i=await System.import(n),!i)throw new F(ibiz.i18n.t("vue3Util.plugin.fileContentFormat"));if(!i.default)throw new F(ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad"));this.setPluginCode(i.default,s),this.cache.set(r,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(No.join(e,t));const{origin:o,pathname:i}=window.location;return i.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(i).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"],t.appId);if(e.packages){const n=e.packages;for(const e in n){const o=n[e],i=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==i.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));const a=i.data;Object.assign(a,{appId:t.appId}),await this.loadPluginExternal(a)}}System.addImportMap(e)}handleSystemImportMap(t,e){if(t){if(t.baseUrl||"FULLCODE"!==ibiz.env.runContainer||e===ibiz.env.appId||(t.baseUrl=ibiz.hub.microAppConfigCenter.getPluginBaseUrl(e)),t.packages){const e=t.packages;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]="string"==typeof o?this.parseUrl(o,t.baseUrl):o.map(e=>this.parseUrl(e,t.baseUrl))}}return t}return null}});class Ao{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function To(){return{value:String,controller:new Ao(Object),data:new Ao(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function zo(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}}function Ro(){return{hasError:{type:Boolean}}}function _o(){return{...To(),value:[String,Number]}}function Lo(){return{...To(),value:[String,Number,Object,Array]}}function ko(){return{...To(),value:[String,Number]}}function Mo(){return{...To(),value:[String,Number]}}function Bo(){return{...To(),value:[String,Number]}}function jo(){return{...To(),value:[String,Array,Object,Number]}}function Vo(){return{...To(),value:[String,Number]}}function Uo(){return{...To(),value:[String,Number]}}function Wo(){return{...To(),value:{type:Object}}}function Fo(){return{...To(),value:[String,Number]}}function qo(){return{...To(),value:[String,Number]}}function Go(){return{...To(),value:[String,Number]}}function $o(){return{...To(),value:[String,Number]}}function Ho(){return{...To(),value:[String,Number,Array]}}function Ko(){return{...To(),value:[String,Number]}}function Xo(){return{...To(),value:[String,Number]}}function Qo(){return{...To(),value:[String,Number]}}function Yo(){return{...To(),value:String}}function Jo(){return{...To(),value:[String,Number]}}function Zo(){return{...To(),value:String,language:{type:String},theme:{type:String}}}function ti(){return{...To(),value:String}}function ei(){return{...To(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function ni(){return{...To(),value:[Array,Array]}}function oi(){return{...To(),value:String}}function ii(){return{...To(),value:String}}function ai(){return{...To(),value:String}}function si(){return{...To(),value:Number}}function ri(){return{...To(),value:String}}t("RequiredProp",Ao);t("en",{vue3Util:{common:{undefined:"undefined",onFoundCorrespondingPart:"Undefined adapter with no corresponding part found",noFoundViewModel:"View model not found",noSupportLoadingDynamic:"{codeName}No entity, do not support loading dynamic models at this time",invalidPointCoordinates:"Invalid point coordinates: ({x}, {y})"},control:{unsupportedPanel:"Unsupported panel items: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"No data object name config",noSupportedDataSourceType:"The data source type {dataSourceType} is not supported",noConfiguredEntityLogic:"No entity logic config",noConfiguredEntity:"No entity config",noReturnValue:"The entity logic {appDELogicId} has no return value",noAttribute:"There is no {dataName} attribute in the global variable.",noConfiguredScript:"No javaScript config",noConfiguerdEntityBehanior:"No entity behavior config",sessionView:"The session to which the view is bound does not exist {dataName}",viewStateAttribute:"There is no {dataName} attribute in the view state",noImplementMethod:"Method not implemented.",noProvidedSlot:"No {id} slot provided",cannotEmpty:"{caption} cannot be empty",unadaptedLayout:"Unadapted layout placeholder {layoutPos}",placeholderIdentifier:"The placeholder identifier for panel member {id} of view {viewCodeName} is:",refresh:"Refresh",wxQrcodeCaption:"Please use wechat to scan the QR code to log in"},plugin:{failureConfigurationLoad:"Configuration load failure",failedRemotePluginLoad:"Remote Plugin failed to load, Remote Plugin did not find [default] Default Export",fileContentFormat:"Remote plugin failed to load, file not found or file content format is incorrect"},use:{control:{parameterChanges:"Context or view parameter changes for {id}:",stateChange:"Part [{name}] state change"},focusBlur:{noFocus:"No focus, no out-of-focus triggering"},view:{stateChange:"View [{name}] state change"}},util:{noInjected:"The createVueApp method is not injected.",convertString:"Failed to convert to string",viewIdentifiers:"View identifiers do not exist for {depth} level routes",noFoundView:"View not found {viewCodeName}",routeCorrectly:"Cannot get the route correctly, could be a dependency issue."},view:{redirectionProgress:"Redirection in progress",viewType:"View type {viewType} is not supported yet.",noTeleportTag:"No teleportTag was found for part {name}.",embeddedRedirectionView:"Embedded redirection view does not support url jumping",insufficientRedirection:"Insufficient redirection parameters to jump",toDoList:"To-Do List Redirection"}}}),t("zhCn",{vue3Util:{common:{undefined:"未定义",onFoundCorrespondingPart:"未定义未找到对应部件的适配器",noFoundViewModel:"未找到视图模型",noSupportLoadingDynamic:"{codeName}无实体,暂不支持加载动态模型",invalidPointCoordinates:"点坐标无效: ({x}, {y})"},control:{unsupportedPanel:"暂未支持的面板项: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"没有配置数据对象名称",noSupportedDataSourceType:"数据源类型{dataSourceType}暂未支持",noConfiguredEntityLogic:"没有配置实体逻辑",noConfiguredEntity:"没有配置实体",noReturnValue:"实体逻辑{appDELogicId}没有返回值",noAttribute:"全局变量里没有{dataName}属性",noConfiguredScript:"没有配置脚本代码",noConfiguerdEntityBehanior:"没有配置实体行为",sessionView:"绑定视图的会话不存在{dataName}",viewStateAttribute:"视图state里没有{dataName}属性",noImplementMethod:"未执行的方法",noProvidedSlot:"未提供{id}插槽",cannotEmpty:"{caption} 不能为空",unadaptedLayout:"未适配的布局占位{layoutPos}",placeholderIdentifier:"视图{viewCodeName}的面板成员{id}的占位标识是:",refresh:"刷新",wxQrcodeCaption:"请使用微信扫描二维码登录"},plugin:{failureConfigurationLoad:"配置加载失败",failedRemotePluginLoad:"远程插件加载失败, 远程插件未找到[default]默认导出",fileContentFormat:"远程插件加载失败, 未找到文件或文件内容格式不正确"},use:{control:{parameterChanges:"{id}的上下文或视图参数变更:",stateChange:"部件 [{name}] state 变更"},focusBlur:{noFocus:"没有聚焦,不触发失焦"},view:{stateChange:"视图 [{name}] state 变更"}},util:{noInjected:"没有注入createVueApp方法",convertString:"转换成字符串失败",viewIdentifiers:"第{depth}级路由不存在视图标识",noFoundView:"找不到视图{viewCodeName}",routeCorrectly:"无法正确获取route,可能是依赖问题"},view:{redirectionProgress:"重定向跳转中",viewType:"视图类型{viewType}暂未支持",noTeleportTag:"没有找到部件{name}的teleportTag",embeddedRedirectionView:"嵌入重定向视图不支持url跳转",insufficientRedirection:"重定向参数不足无法跳转",toDoList:"待办列表重定向"}}})}}});
|
|
1
|
+
System.register(["qx-util","vue","@ibiz-template/core","ramda","@ibiz-template/runtime","vue-router","qs","lodash-es","pinia"],function(t){"use strict";var e,n,o,i,a,s,r,l,c,d,u,h,p,m,v,g,f,y,w,b,C,P,I,D,E,x,O,N,S,A,T,z,R,_,L,k,M,B,j,V,U,W,F,q,G,$,H,K,X,Q,Y,J,Z,tt,et,nt,ot,it,at,st,rt,lt,ct,dt,ut,ht,pt,mt,vt,gt,ft,yt,wt,bt,Ct,Pt,It,Dt,Et,xt,Ot,Nt,St,At,Tt,zt,Rt,_t,Lt,kt,Mt,Bt,jt,Vt,Ut,Wt,Ft,qt,Gt,$t,Ht,Kt,Xt,Qt,Yt,Jt,Zt,te,ee,ne,oe,ie,ae,se,re,le;return{setters:[function(t){e=t.SyncSeriesHook,n=t.AsyncSeriesHook,o=t.isFunc,i=t.notNilEmpty,a=t.QXEvent,s=t.clearAll,r=t.createUUID},function(t){l=t.watch,c=t.onBeforeUnmount,d=t.createCommentVNode,u=t.getCurrentInstance,h=t.toRaw,p=t.isReactive,m=t.inject,v=t.reactive,g=t.onActivated,f=t.onDeactivated,y=t.ref,w=t.h,b=t.resolveComponent,C=t.provide,P=t.onMounted,I=t.onUnmounted,D=t.isRef,E=t.shallowRef,x=t.watchEffect,O=t.computed,N=t.defineComponent,S=t.createVNode,A=t.withDirectives,T=t.resolveDirective,z=t.nextTick,R=t.mergeProps,_=t.isVNode,L=t.createTextVNode,k=t.Teleport,M=t.renderSlot,B=t.onBeforeMount},function(t){j=t.onClickOutside,V=t.NOOP,U=t.listenJSEvent,W=t.Namespace,F=t.RuntimeError,q=t.isBase64Image,G=t.isBase64,$=t.base64ToStr,H=t.isSvg,K=t.fixJsonString,X=t.IBizContext,Q=t.ModelError,Y=t.RuntimeModelError,J=t.setAppCookie,Z=t.CoreConst,tt=t.clearAppCookie},function(t){et=t.isNil,nt=t.isNotNil,ot=t.clone,it=t.isEmpty,at=t.mergeLeft},function(e){st=e.MDControlTypes,rt=e.ViewType,lt=e.RouteConst,ct=e.getMatchResPath,dt=e.calcDeCodeNameById,ut=e.PredefinedControlRender,ht=e.ScriptFactory,pt=e.ViewController,mt=e.getControlProvider,vt=e.getErrorViewProvider,gt=e.calcDynaSysParams,ft=e.getViewProvider,yt=e.useCalcOrMode,wt=e.calcThresholdRange,bt=e.PanelContainerController,Ct=e.registerPanelItemProvider,Pt=e.PanelItemController,It=e.PanelItemState,Dt=e.Modal,Et=e.ViewMode,xt=e.OpenAppViewCommand,Ot=e.getEditorProvider,Nt=e.PanelItemEventName,St=e.calcDynaClass,At=e.getAllPanelField,Tt=e.isDataContainer,zt=e.PanelContainerState,Rt=e.PanelNotifyState,_t=e.getPanelItemProvider,Lt=e.convertNavData,kt=e.PanelData,Mt=e.execDELogicById,Bt=e.toLocalOpenWFRedirectView,jt=e.getControlsByView,Vt=e.getCtrlTeleportParams,Ut=e.AppDataUploadViewController,Wt=e.MDCustomViewController,Ft=e.registerViewProvider,qt=e.getDERedirectToView,Gt=e.HtmlViewController,$t=e.ViewLayoutPanelController,Ht=e.isSimpleDataContainer,Kt=e.registerControlProvider,Xt=e.ControlType,Qt=e.PanelController,Yt=e.RemotePluginItem,t({PanelContainerController:e.PanelContainerController,PanelContainerState:e.PanelContainerState})},function(t){Jt=t.useRoute,Zt=t.useRouter,te=t.RouterView},function(t){ee=t.default},function(t){ne=t.isElement,oe=t.isNumber,ie=t.throttle,ae=t.isObject,se=t.isString},function(t){re=t.defineStore,le=t.createPinia}],execute:function(){t({calcResRoutePath:De,computedAsync:function(t,e,n){let o;o=D(n)?{evaluating:n}:n||{};const{lazy:i=!1,flush:a="pre",evaluating:s,shallow:r=!0,onError:l=V}=o,c=E(!i),d=r?E(e):y(e);let u=0;if(x(async e=>{if(!c.value)return;u++;const n=u;let o=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const i=await t(t=>{e(()=>{s&&(s.value=!1),o||t()})});n===u&&(d.value=i)}catch(t){l(t)}finally{s&&n===u&&(s.value=!1),o=!0}},{flush:a}),i)return O(()=>(c.value=!0,d.value));return d},createOverlayView:Se,generateRoutePath:async function(t,e,n,o){var i;const a=we(e);let s=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(s=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&"DEFAULT"===ibiz.env.mobMenuShowMode&&(a.pathNodes[0]={viewName:"home"});let r=null==o?void 0:o.srfmenuitem;!r&&a.pathNodes.length>1&&(r=null==(i=a.pathNodes[1].params)?void 0:i.srfmenuitem);if(a.pathNodes.splice(s-1,a.pathNodes.length-s+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}Pe(n,a.pathNodes),e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:Ce(n),params:o}),2===s&&(await De(a,n,t.appDataEntityId,t.appId),Ie.includes(t.viewType))){const e=dt(t.appDataEntityId);delete a.pathNodes[0].context[e]}if(r&&a.pathNodes.length>1){const t=a.pathNodes[1].params||{};a.pathNodes[1].params={...t,srfmenuitem:r}}return{path:be(a)}},generateRoutePathByModal:async function(t,e,n,o){const i=we(e),a=i.pathNodes.findIndex(t=>t.viewName===lt.ROUTE_MODAL_TAG);-1!==a&&(i.pathNodes=i.pathNodes.slice(0,a));if(n.currentSrfNav){const t=i.pathNodes[i.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return Pe(n,i.pathNodes),i.pathNodes.push({viewName:"".concat(lt.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Ce(n),params:o}),{path:be(i)}},getArrayProps:ni,getAutoCompleteProps:Jo,getCascaderProps:oi,getCheckboxListProps:Mo,getCheckboxProps:Bo,getCodeProps:Zo,getColorPickerProps:ii,getDataPickerProps:jo,getDatePickerProps:Vo,getDateRangeProps:Uo,getDateRangeSelectEmits:function(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0,change:(t,e,n)=>!0}},getDateRangeSelectProps:Wo,getDrawerPlacement:function(t){return Ae[t]||"right"},getDropdownProps:ko,getEditorEmits:zo,getEditorProps:To,getGridArrayProps:function(){return{...ni(),...Ro()}},getGridAutoCompleteProps:function(){return{...Jo(),...Ro()}},getGridCascaderProps:function(){return{...oi(),...Ro()}},getGridCheckboxListProps:function(){return{...Mo(),...Ro()}},getGridCheckboxProps:function(){return{...Bo(),...Ro()}},getGridCodeProps:function(){return{...Zo(),...Ro()}},getGridColorPickerProps:function(){return{...ii(),...Ro()}},getGridDataPickerProps:function(){return{...jo(),...Ro()}},getGridDatePickerProps:function(){return{...Vo(),...Ro()}},getGridDateRangeProps:function(){return{...Uo(),...Ro()}},getGridDateRangeSelectProps:function(){return{...Ro(),...Wo()}},getGridDropdownProps:function(){return{...ko(),...Ro()}},getGridEditorCommonProps:Ro,getGridEditorEmits:function(){return{change:(t,e,n)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...ti(),...Ro()}},getGridInputIpProps:function(){return{...ai(),...Ro()}},getGridInputNumberProps:function(){return{...si(),...Ro()}},getGridInputProps:function(){return{..._o(),...Ro()}},getGridListBoxProps:function(){return{...Fo(),...Ro()}},getGridMapPickerProps:function(){return{...ri(),...Ro()}},getGridMarkDownProps:function(){return{...ei(),...Ro()}},getGridNumberRangeProps:function(){return{...qo(),...Ro()}},getGridRadioProps:function(){return{...Go(),...Ro()}},getGridRateProps:function(){return{...$o(),...Ro()}},getGridRawProps:function(){return{...Ho(),...Ro()}},getGridSliderProps:function(){return{...Ko(),...Ro()}},getGridSpanProps:function(){return{...Lo(),...Ro()}},getGridStepperProps:function(){return{...Xo(),...Ro()}},getGridSwitchProps:function(){return{...Qo(),...Ro()}},getGridUploadProps:function(){return{...Yo(),...Ro()}},getHtmlProps:ti,getInputIpProps:ai,getInputNumberProps:si,getInputProps:_o,getListBoxProps:Fo,getMapPickerProps:ri,getMarkDownProps:ei,getNestedRoutePath:Ee,getNumberRangeProps:qo,getOrigin:he,getOwnRouteContext:Ce,getRadioProps:Go,getRateProps:$o,getRawProps:Ho,getSliderProps:Ko,getSpanProps:Lo,getStepperProps:Xo,getSwitchProps:Qo,getUploadProps:Yo,isEmptyVNode:function(t){if(!Array.isArray(t))return t===me;return 1===t.length&&t[0]===me},onRouteChange:function(t,e){const n=Jt();if(!n)throw new F(ibiz.i18n.t("vue3Util.util.routeCorrectly"));l(()=>null==n?void 0:n.fullPath,()=>{const o=Ee(n,e);t({currentKey:o,fullPath:n.fullPath})},{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Se(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Se(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Se(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Se(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var o;const a=we(t,n);let s=a.pathNodes[e-1].viewName;if(!s)throw new F(ibiz.i18n.t("vue3Util.util.viewIdentifiers",{depth:e}));s===lt.ROUTE_MODAL_TAG&&(s=a.pathNodes[e].viewName);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const r=await ibiz.hub.config.view.get(s);if(!r)throw new F(ibiz.i18n.t("vue3Util.util.noFoundView",{viewCodeName:s}));const l={};(null==(o=ibiz.appData)?void 0:o.context)&&Object.assign(l,ibiz.appData.context);a.appContext&&Object.assign(l,a.appContext);if(1!==e)for(let t=0;t<e;t++){const n=a.pathNodes[t];i(n.context)&&Object.assign(l,n.context),t!==e-1||n.context&&!et(n.context.srfnavctrlid)||delete l.srfnavctrlid}const{params:c,srfnav:d}=a.pathNodes[e-1];return{viewConfig:r,context:l,params:c,srfnav:d}},renderString:function(t){if(et(t))return"";if("string"==typeof t)return t;if("object"==typeof t)return JSON.stringify(t);try{return t.toString()}catch(e){ibiz.log.error(t,ibiz.i18n.t("vue3Util.util.convertString"),e)}return""},route2routePath:we,routePath2string:be,shareCommonAncestor:Le,useAutoFocusBlur:function(t,e){return{useInFocusAndBlur:()=>{t.autoFocus||e("blur")},useInValueChange:()=>{t.autoFocus&&e("blur")}}},useClickOutside:de,useCodeListListen:function(t,e,n){let o;P(async()=>{if(t){const i=await ibiz.hub.getApp(e);o=await i.codeList.getCodeListInstance(t),o&&o.onChange(n)}}),I(()=>{o&&o.offChange(n)})},useControlController:ge,useControlPopoverzIndex:function(t){const{zIndex:e}=ze();t.state.zIndex=e.increment(),I(()=>{e.decrement()})},useController:function(t){t.force=pe()},useCtx:ve,useEventListener:fe,useFilterAttribute:function(t,e,n=["class","style"]){const o={};return Object.keys(t).forEach(i=>{e?e(i)&&(o[i]=t[i]):n.includes(i)||(o[i]=t[i])}),o},useFocusAndBlur:function(t,e){const n=y(),o=y(!1);let i;const a=()=>{o.value||ibiz.log.debug(ibiz.i18n.t("vue3Util.use.focusBlur.noFocus")),e(),i.stop(),o.value=!1};return fe(n,"click",e=>{o.value||(i=de(n,()=>{a()}),o.value=!0,t())},{capture:!0}),{componentRef:n,isFocus:o,doBlur:a,pause:()=>{i&&i.pause()},stop:()=>{i&&i.stop()}}},useForce:pe,useForceTogether:function(t,e){const n=e.force,o=pe();e.force=t=>{n(t),o()}},useLocalCacheKey:function(t,e,n,o="@",i=""){const a=Zt();return()=>{if(!a)return;const s=t.srfuserid;if(n=t.srfdefaulttoroutedepth||n){const t=we(a.currentRoute.value);if(s&&t.pathNodes[n-2]){t.pathNodes=t.pathNodes.slice(0,n-1),t.pathNodes.forEach(t=>{t.context&&delete t.context.srfnavctrlid});const i=be(t);return"".concat(e).concat(o).concat(s).concat(o).concat(i)}}return i?"".concat(e).concat(o).concat(s).concat(o).concat(i):void 0}},useMobCtx:function(){return m("ctx")},useNamespace:ye,usePopoverVisible:function(t,e){let n;const o=y(!1);return l(()=>t.value,i=>{i&&!n&&(n=U(window,"click",n=>{if(o.value&&t.value){Le(e(t.value),n.target)&&(o.value=!1)}},{capture:!0}))},{immediate:!0}),I(()=>{null==n||n()}),{popoverVisible:o,setPopoverVisible:t=>{o.value=t}}},usePopoverzIndex:function(){const t="popover_".concat(r());return{popoverid:t,setPopoverZIndex:e=>{const{zIndex:n}=ze(),o=document.getElementsByClassName(t),i=n.increment();if(o&&o.length>0&&e)for(let t=0;t<o.length;t++)o[t].style.setProperty(e,"".concat(i))}}},useProps:ue,usePropsWatch:function(t,e,n){const o=ue();Object.prototype.hasOwnProperty.call(o,t)&&(l(()=>o[t],(t,n)=>{e(he(t),he(n))},n),e(he(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=y(""));n.value=t.value;const o=new xe(e);return l(t,(t,e)=>{t!==e&&o.nextChange(()=>{n.value=t})}),n},useRouterQuery:function(){const t=Jt(),{query:e}=t;return e},useViewController:Re,useViewOperation:_e});class ce{}function de(t,e,n={}){let o=V,i=V,a=V;const s=()=>{o(),o=V,i=V,a=V};return l(t,(t,r)=>{if(t!==r)if(et(t))s();else{const s=j((null==t?void 0:t.$el)||t,e,n);o=s.stop,i=s.pause,a=s.proceed}},{immediate:!0}),c(()=>{o!==V&&s()}),{stop:()=>o(),pause:()=>i(),proceed:()=>a()}}function ue(){return u().proxy.$props}function he(t){return p(t)?h(t):t}function pe(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&o(e)&&t.$nextTick(()=>{e()})}}t("AppHooks",ce),ce.createApp=new e,ce.useComponent=new e,ce.appResorceInited=new n,ce.beforeInitApp=new n,ce.authedApp=new n,ce.initedApp=new n,ce.destoryApp=new n;const me=t("EmptyVNode",d("EmptyVNode"));function ve(){return m("ctx")}function ge(t,e){const n=ve(),o=ue();n.evt.emit("onForecast",o.modelData.name);const i=o.provider;let a;a=(null==i?void 0:i.createController)?i.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),-1!==st.indexOf(a.model.controlType)&&ibiz.util.record.add(a.ctrlId,a),function(t,e){l(()=>({context:t.context,params:t.params}),(t,n)=>{if(t===n)return;const o={...t};t.context===n.context&&delete o.context,t.params===n.params&&delete o.params,e.updateContextParams(o),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)})}(o,a),function(t,e,n=[]){const o=["context","params","modelData",...n];l(()=>{const e={};return Object.keys(t).forEach(n=>{o.includes(n)||(e[n]=t[n])}),e},(t,n)=>{const o={};Object.keys(t).forEach(e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])}),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.stateChange",{name:e.model.name}),o),Object.keys(o).forEach(t=>{void 0!==o[t]&&(e.state[t]=o[t])})},{immediate:!0})}(o,a,null==e?void 0:e.excludePropsKeys),a.state=v(a.state),g(()=>a.onActivated()),f(()=>a.onDeactivated()),a.force=pe();const s=u().proxy;return a.evt.onAll((t,e)=>{s.$emit(t.slice(2),e)}),s.$emit("controllerAppear",a),a.created(),c(()=>{a.destroyed(),-1!==st.indexOf(a.model.controlType)&&ibiz.util.record.remove(a.ctrlId)}),a}function fe(t,e,n,o={}){let i=V;return l(t,(t,a)=>{t!==a&&(et(t)?(i(),i=V):i=U((null==t?void 0:t.$el)||t,e,n,o))},{immediate:!0}),c(()=>{i!==V&&i()}),()=>{i()}}function ye(t){return new W(t,ibiz.env.namespace)}function we(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(lt.ROUTE_MODAL_TAG),"g"),""));const i=o.split("/"),a=[];for(let e=1;e<=n;e++){const n=i[2*e],o=t.params["params".concat(e)];let s,r,l;s=o&&o!==ibiz.env.routePlaceholder?ee.parse(o,{strictNullHandling:!0,delimiter:";",depth:8}):void 0,s&&(1===e?(r=s,s=void 0):(s.srfnavctx&&(r=JSON.parse(s.srfnavctx),delete s.srfnavctx),s.srfnav&&(l=s.srfnav,delete s.srfnav))),a.push({viewName:n,context:r,params:s,srfnav:l})}let s;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(s=ee.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:a}}function be(t){let e="";return t.appContext?e+="/".concat(ee.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach((t,n)=>{e+="/".concat(t.viewName,"/");let o={};if(0===n)i(t.context)&&(o=t.context);else{if(o=i(t.params)?t.params:{},i(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(o.srfnavctx=encodeURIComponent(e))}t.srfnav&&(o.srfnav=t.srfnav)}const a=ee.stringify(o,{delimiter:";",strictNullHandling:!0,skipNulls:!0});i(a)?e+=a:e+=ibiz.env.routePlaceholder}),e}function Ce(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];if(e.attributekeys){const n=e.attributekeys.split("|");n&&n.length>0&&n.forEach(n=>{nt(t[n])&&(e[n]=t[n])}),delete e.attributekeys}let o=!1;return Object.prototype.hasOwnProperty.call(e,"srfkeepnull")&&(o=!0===e.srfkeepnull||"true"===e.srfkeepnull,delete e.srfkeepnull),Object.keys(e).forEach(t=>{(n.includes(t)||!o&&et(e[t]))&&delete e[t]}),e}function Pe(t,e){let n=-1;e&&e.length>0&&(n=e.findIndex(t=>{var e;return!0===(null==(e=t.context)?void 0:e.srfreadonly)})),t.srfreadonly&&!t.getOwnContext().srfreadonly&&-1===n&&(t.srfreadonly=!0)}const Ie=t("excludeViewTypes",[rt.DE_GRID_VIEW,rt.DE_GRID_EXP_VIEW,rt.DE_LIST_VIEW,rt.DE_LIST_EXP_VIEW,rt.DE_DATA_VIEW,rt.DE_DATAVIEW_EXP_VIEW,rt.DE_CALENDAR_VIEW,rt.DE_CALENDAR_EXP_VIEW,rt.DE_CHART_VIEW,rt.DE_CHART_EXP_VIEW,rt.DE_KANBAN_VIEW]);async function De(t,e,n,o){if(n){const i=await ibiz.hub.getAppDataEntity(n,o);let a=ct(e,i);if(a||(a={path:"",keys:[i.codeName.toLowerCase()]}),a){const n=t.pathNodes[1].context,o={};a.keys.forEach(t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])}),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Ee(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=we(t);if(o.pathNodes.length<e)return t.path;o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e));const i=o.pathNodes[e-1];return n&&delete i.srfnav,!ibiz.env.isMob&&i.context&&delete i.context.srfnavctrlid,be(o)}class xe{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),l(()=>t.path,(t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}})}nextChange(t){t&&(this.timers.push(setTimeout(()=>{t();const e=this.callbacks.findIndex(e=>e===t);this.callbacks.splice(e,1)},this.wait)),this.callbacks.push(t))}}t("RouteListener",xe);const Oe=t("withInstall",(t,e)=>(t.install=t=>{e(t)},t));t("hasEmptyPanelRenderer",t=>{const e=null==t?void 0:t.model.controlRenders;return!(!e||0===e.length)&&!!e.find(t=>t.id===ut.EMPTYPANEL)});class Ne{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new a,this.init()}static createVueApp(t,e){throw new F(ibiz.i18n.t("vue3Util.util.noInjected"))}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");let i=document.body;ne(null==n?void 0:n.appendTo)&&(i=null==n?void 0:n.appendTo),i.appendChild(o);const a=Ne.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){i.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>w(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(o),this.vm=a}async present(){return this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise(t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)})}}t("OverlayContainer",Ne);function Se(t){return(e,n)=>{const o=b("IBizViewShell");return w(o,{...t,viewShellHooks:n,modal:e})}}t("OverlayPopoverContainer",class extends Ne{present(t){return this.modal.present(t)}});const Ae={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Te{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise(t=>{this.resolve=t})),this.promise.then(t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e,n={}){const o=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const i=e;if(this.map.has(i)){return this.map.get(i).onWillDismiss()}const a=new Te(o,i);return this.map.set(i,a),this.scheduledDestruction(a),a.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(window.clearTimeout(n.timeout),n.timeout=void 0,n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout(()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)},6e5)}}),t("useAppStore",re("appStore",()=>({appStore:v({})})));const ze=t("useUIStore",re("uiStore",()=>{const t=function(){const t=y(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}(),e=()=>ibiz.util.theme.getTheme().includes("dark")?"dark":"light",n=v({zIndex:t.zIndex,theme:e()});return ibiz.util.theme.evt.on("onChange",()=>{n.theme=e()}),{UIStore:n,zIndex:t}}));t("piniaInstance",le());function Re(t){const e=ue(),n=m("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let i;i=(null==o?void 0:o.createController)?o.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(i.id,i),function(t,e){l(()=>({context:t.context,params:t.params}),t=>{e.context.reset({},t.context),s(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)})}(e,i),function(t,e){l(()=>t.state?{...t.state}:{},(t,n)=>{const o={};Object.keys(t).forEach(e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])}),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.view.stateChange",{name:e.model.name}),o),Object.keys(o).forEach(t=>{e.state[t]=o[t]})},{immediate:!0})}(e,i),C("ctx",i.ctx),i.state=v(i.state),i.slotProps=v(i.slotProps),e.modal&&(i.modal=e.modal),g(()=>{i.onActivated(),ibiz.util.viewStack.active(i.id)}),f(()=>{i.onDeactivated(),ibiz.util.viewStack.deactivate(i.id)}),i.force=pe();const a=u().proxy;return i.evt.onAll((t,e)=>{a.$emit(t.slice(2),e)}),i.created(),c(()=>{i.destroyed(),ibiz.util.viewStack.remove(i.id)}),i}function _e(t){let e=[];P(()=>{const n=document.getElementById(t.id);n&&(e=["keydown","click"].map(e=>U(n,e,e=>{t.setOperateState("MANUAL")},{once:!0,capture:!0})))}),I(()=>{e&&e.length>0&&e.forEach(t=>{t()})})}function Le(t,e){if(!t||!e)return!1;if(t===e)return!0;const n=new Set;let o=t;for(;o;){n.add(o);const t=o.parentNode;o=!t||"BODY"!==t.nodeName&&"HTML"!==t.nodeName?t:null}for(o=e;o;){if(n.has(o))return!0;o=o.parentNode}return!1}const ke=t("IBizIcon",N({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=ye("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=O(()=>function(t){if(t){if(t.htmlStr)return S("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")||-1!==t.cssClass.indexOf("theme-icon")?S("i",{class:[e.b(),t.cssClass]},null):S("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return q(t.imagePath)?S("img",{class:e.b(),src:t.imagePath},null):G(t.imagePath)?S("div",{class:[e.b(),e.e("emoji")]},[$(t.imagePath)]):H(t.imagePath)?S("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?S("img",{class:e.b(),src:t.imagePath},null):S("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?S("img",{class:e.b(),src:t.imagePath},null):S("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return H(t.rawContent)?S("div",{class:e.b(),innerHTML:t.rawContent},null):S("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon));return()=>o.value}}));t("IBizRouterView",N({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;l(()=>t.manualKey,(t,e)=>{nt(t)&&t!==e&&(o=!0)});return{renderComp:(i,a)=>{if(!o)return n.vNode;if(o=!1,i){const o={...i.props};delete o.onVnodeUnmounted,delete o.ref;const a=w(i.type,{...o,...e,key:t.manualKey});return n.vNode=a,a}}}},render(){return S(b("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",N({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=ye("control"),{controlType:n,sysCss:o,codeName:i}=t.controller.model,a=n.toLowerCase(),s=null==o?void 0:o.cssName,r=t.controller.model,l=t.controller.model.controls,c=v({});!1===r.controlType.endsWith("EXPBAR")&&(et(r.width)||(r.width>0&&r.width<=1?c.width="".concat(100*r.width,"%"):c.width="".concat(r.width,"px")),et(r.height)||(r.height>0&&r.height<=1?c.width="".concat(100*r.height,"%"):c.height="".concat(r.height,"px")));const d=async(e,n)=>{e.stopPropagation();const o=e.target.getAttribute(n),i=e.target.getAttribute("data"),a=t.controller.context.clone(),s=e.target.getAttribute("context");s&&Object.assign(a,K(s));const r={...t.controller.params},l=e.target.getAttribute("params");l&&Object.assign(r,K(l)),o&&await ht.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:i?K(i):null},o)},u=O(()=>(n=>{var o,i;const a=r.controlRenders?r.controlRenders.filter(t=>!Object.values(ut).includes(t.id)):void 0;if(!a||0===a.length)return;const s=a[0];if("LAYOUTPANEL_MODEL"===s.renderType&&s.layoutPanelModel){const i=ht.execScriptFn({...t.controller.getEventArgs(),data:n},s.layoutPanelModel,{isAsync:!1});return S("div",{innerHTML:i,onClick:t=>d(t,"click"),onDblclick:t=>d(t,"dbclick"),class:[e.e("control-render"),e.e(null==(o=s.renderName)?void 0:o.toLowerCase())]},null)}return"LAYOUTPANEL"===s.renderType&&s.layoutPanel?S(b("iBizControlShell"),{class:[e.e("control-render"),e.e(null==(i=s.renderName)?void 0:i.toLowerCase())],data:n,params:t.controller.params,context:t.controller.context,modelData:s.layoutPanel},null):void 0})(t.controller.data||t.controller.items));return{ns:e,typeClass:a,sysCssName:s,inlineStyle:c,codeName:i,controls:l,customRender:u,disableMaskInfoRender:()=>{const n=r.controlRenders?r.controlRenders.find(t=>t.id===ut.DISABLEPANEL):void 0;if(!n)return S("div",{innerHTML:t.controller.state.maskOption.maskInfo||"",class:[e.e("disable-mask-text")]},null);if("LAYOUTPANEL_MODEL"===n.renderType&&n.layoutPanelModel){const o=ht.execScriptFn({...t.controller.getEventArgs()},n.layoutPanelModel,{isAsync:!1,singleRowReturn:!0});return S("div",{innerHTML:o,class:[e.e("disable-mask-text")]},null)}return"LAYOUTPANEL"===n.renderType&&n.layoutPanel?S(b("iBizControlShell"),{class:[e.e("disable-mask-text")],data:{},params:t.controller.params,context:t.controller.context,modelData:n.layoutPanel},null):void 0},onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:i,providers:a}=this.controller;let s=null;if(o.isCreated&&i){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},i=e[n];e[n]=i?()=>i(o):()=>{const e=b("IBizControlShell");return w(e,{modelData:t,...o})}});const n=a[i.name];s=w(b(n.component),{modelData:i,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return S("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName,this.ns.is("disabled",o.disabled)],style:this.inlineStyle},[s||this.customRender||(null==(n=(e=this.$slots).default)?void 0:n.call(e)),o.disabled&&S("div",{class:[this.ns.e("mask-container"),this.ns.m(o.maskOption.mode.toLowerCase())]},["MASK"===o.maskOption.mode&&this.disableMaskInfoRender()])])}})),t("IBizControlShell",N({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){const e=m("ctx");if(e)e.evt.emit("onForecast",t.modelData.name);else{const t={name:"AppView",id:"AppView",viewType:rt.DE_CUSTOM_VIEW,appId:ibiz.env.appId};C("ctx",new pt(t,X.create({})).ctx)}const n=y(!1),o=y(""),i=y();mt(t.modelData).then(t=>{t?i.value=t:o.value=ibiz.i18n.t("vue3Util.common.onFoundCorrespondingPart"),n.value=!0}).catch(t=>{ibiz.log.error(t),o.value=t.message,n.value=!0});return{ns:ye("control-shell"),isComplete:n,errMsg:o,provider:i}},render(){return this.isComplete&&this.provider?w(b(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):A(S("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[T("loading"),!this.isComplete]])}})),t("IBizViewShell",N({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String},ctx:{type:Object},viewShellHooks:{type:Object}},setup(t,{attrs:e}){const n=ye("view-shell"),o=y(!1),i=y(""),a=y(),s=y(),c=y(!0);t.ctx&&C("ctx",t.ctx);const d=y(t.context),u=y(t.params||{});let h="";l(()=>({context:t.context,params:t.params}),t=>{d.value=t.context,u.value=t.params?t.params:{}});let p;const m=t=>{const e=ot(t);return e.srfdatatype&&delete e.srfdatatype,JSON.stringify(e)},v=async()=>{try{if(await(async()=>{p=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId)})(),!p)throw new F(ibiz.i18n.t("vue3Util.common.noFoundViewModel"));if(c.value=await(async t=>{let e=!0;const{accessKey:n}=t;let{accUserMode:o}=t;const i=ibiz.auth.getAuthInfo();switch((et(o)||0===o)&&(o=ibiz.config.view.viewAccUserMode),o){case 1:i&&!i.isAnonymous&&(e=!1);break;case 2:(!i||i&&i.isAnonymous)&&(e=!1);break;case 4:i&&!i.isAnonymous&&n&&(await ibiz.hub.getApp(d.value.srfappid)).authority.calcByResCode(n)||(e=!1)}return e})(p),!c.value)return;if(1===p.dynaSysMode){const t=p.appDataEntityId;if(!t)throw new F(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic",{codeName:p.codeName}));const e=await gt(t,d.value,{viewParams:u.value,appId:p.appId});if(u.value.srfdatatype&&(e.srfdatatype=u.value.srfdatatype),u.value.srfwftag)e.srfwftag=u.value.srfwftag;else if(t&&p.enableWF&&e.srfkey){const n=et(d.value.srfsessionid)||it(d.value.srfsessionid),o=r();if(n){const e=ibiz.uiDomainManager.create(o,t);d.value.srfsessionid=e.id}const i=ibiz.hub.getApp(p.appId);d.value.srfappid||(d.value.srfappid=p.appId);const a=await i.deService.getService(d.value,t),s=await a.get(d.value,u.value||{});if(s.ok&&s.data){const{srfwftag:t,processdefinitionkey:n,taskdefinitionkey:o}=s.data;t&&(e.srfwftag=t),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW","DEMOBWFDYNAEDITVIEW3","DEMOBWFDYNAEDITVIEW"].includes(p.viewType)&&(et(u.value.processDefinitionKey)&&(u.value.processDefinitionKey=n),et(u.value.taskDefinitionKey)&&(u.value.taskDefinitionKey=o))}n&&(ibiz.uiDomainManager.destroy(o),d.value.srfsessionid="")}if(m(e)===h)return void setTimeout(()=>{o.value=!0});s.value=await ibiz.hub.loadAppView(p.appId,p.id,e),h=m(e)}else s.value=p;a.value=await ft(p)}catch(t){ibiz.log.error(t),i.value=t.message}finally{o.value=!0}};v();return{ns:n,errMsg:i,provider:a,isComplete:o,hasAuthority:c,viewModelData:s,redrawView:async t=>{o.value=!1;const{redrawData:n}=t,{isReloadModel:i}=n;Object.assign(d.value,n.context),Object.assign(u.value,n.params);const a=e.modal;a&&(a.hooks.preDismiss.clear(),a.hooks.shouldDismiss.clear(),a.hooks.beforeDismiss.clear()),i?await v():setTimeout(()=>{o.value=!0})},onCreated:e=>{t.viewShellHooks&&t.viewShellHooks.hooks.viewCreated.call(e)},curContext:d,curParams:u}},render(){if(this.isComplete&&this.provider&&this.hasAuthority)return w(b(this.provider.component),{context:this.curContext,params:this.curParams,modelData:ot(this.viewModelData),...this.$attrs,provider:this.provider,onRedrawView:this.redrawView,onCreated:this.onCreated},this.$slots);if(!this.hasAuthority){const t=vt("403");if(t)return"string"==typeof t.component?w(b(t.component)):w(t.component)}return A(S("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[T("loading"),!this.isComplete]])}})),t("IBizCodeList",N({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]},convertToCodeItemText:{type:Boolean,default:!0},valueFormat:{type:String},unitName:{type:String},showMode:{type:String,default:"DEFAULT"}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,o;const i=ye("code-list"),a=y([]),s=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",r=(null==(o=t.codeList)?void 0:o.valueSeparator)||",",c=O(()=>t.codeList&&t.codeList.orMode?t.codeList.orMode:"STR"),d=yt(c.value);l(a,t=>{let n="";t.length>0&&(n=t.map(t=>t.text).join(s)),e("infoTextChange",n)});const u=(e,n)=>{if(e){const{thresholdGroup:o}=t.codeList;if(o&&oe(Number(n))){const t=wt(e,Number(n));if(t)return t}const i=e.find(t=>t.value==n);if(i)return i;for(let t=0;t<e.length;t++){const o=u(e[t].children,n);if(o)return o}}};l([()=>t.codeListItems,()=>t.value],([e,n],[o,i])=>{if(et(n)||""===n)a.value=[];else{let o=[];const{getSelectArray:i}=d,s=i(n,t.codeList,e,r,t.codeList.codeItemValueNumber);s&&(o=s),a.value=o.map(n=>{const o=u(e,n);let i=n;if(t.convertToCodeItemText&&(null==o?void 0:o.text))i=o.text;else{const{valueFormat:e,unitName:n}=t;e&&(i=ibiz.util.text.format("".concat(i),e)),n&&(i+=n)}return{text:i,color:null==o?void 0:o.color,textCls:null==o?void 0:o.textCls,sysImage:null==o?void 0:o.sysImage}})}},{immediate:!0});const h=t.codeList.emptyText!==ibiz.i18n.t("vue3Util.common.undefined")&&t.codeList.emptyText?t.codeList.emptyText:ibiz.config.common.emptyText;return{items:a,ns:i,emptyText:h,textSeparator:s}},render(){return S("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map((t,e)=>[0!==e?this.textSeparator:null,S("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},["TEXT"!==this.showMode&&t.sysImage&&S(b("iBizIcon"),{icon:t.sysImage},null),"ICON"!==this.showMode&&t.text])])])}})),t("ControlLoadingPlaceholder",N({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(m("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",N({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"},max:{type:Number,default:99},counterMode:{type:Number}},setup:()=>({ns:ye("badge")}),render(){if((this.value||0===this.value)&&!(1===this.counterMode&&this.value<=0))return S("div",{class:[this.ns.b(),this.ns.m(this.type),this.ns.is("mob",ibiz.env.isMob)]},[this.value>this.max?"".concat(this.max,"+"):this.value])}})),t("IBizCustomRender",N({name:"IBizCustomRender",props:{controller:{type:Object,required:!0}},setup(t){const e=ye("custom-render"),n=async(e,n)=>{e.stopPropagation();const o=e.target.getAttribute(n),i=e.target.getAttribute("data"),a=t.controller.context.clone(),s=e.target.getAttribute("context");s&&Object.assign(a,K(s));const r={...t.controller.params},l=e.target.getAttribute("params");l&&Object.assign(r,K(l)),o&&await ht.asyncExecScriptFn({...t.controller.getEventArgs(),context:a,params:r,data:i?K(i):null},o)};return{ns:e,getControlRender:()=>{var o,i,a;const s=null==(o=t.controller)?void 0:o.model.controlRenders;if(!s||0===s.length)return;const r=s.find(t=>t.id===ut.EMPTYPANEL);if(r){if("LAYOUTPANEL_MODEL"===r.renderType&&r.layoutPanelModel){const o=ht.execScriptFn({...t.controller.getEventArgs()},r.layoutPanelModel,{isAsync:!1});return S("div",{innerHTML:o,onClick:t=>n(t,"click"),onDblclick:t=>n(t,"dbclick"),class:[e.b(),e.e(null==(i=r.renderName)?void 0:i.toLowerCase())]},null)}return"LAYOUTPANEL"===r.renderType&&r.layoutPanel?S(b("iBizControlShell"),{class:[e.b(),e.e(null==(a=r.renderName)?void 0:a.toLowerCase())],params:t.controller.params,context:t.controller.context,modelData:r.layoutPanel},null):void 0}}}},render(){return this.getControlRender()}}));class Me{constructor(t,e,n,o){if(Number.isNaN(t)||Number.isNaN(e))throw new Error(ibiz.i18n.t("vue3Util.common.invalidPointCoordinates",{x:t,y:e}));this.x=+t,this.y=+e,this.pressure=n||0,this.time=o||Date.now()}distanceTo(t){return Math.sqrt((this.x-t.x)**2+(this.y-t.y)**2)}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class Be{constructor(t,e,n,o,i,a){this.startPoint=t,this.control2=e,this.control1=n,this.endPoint=o,this.startWidth=i,this.endWidth=a}static fromPoints(t,e){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,o=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new Be(t[1],n,o,t[2],e.start,e.end)}static calculateControlPoints(t,e,n){const o=t.x-e.x,i=t.y-e.y,a=e.x-n.x,s=e.y-n.y,r=(t.x+e.x)/2,l=(t.y+e.y)/2,c=(e.x+n.x)/2,d=(e.y+n.y)/2,u=Math.sqrt(o*o+i*i),h=Math.sqrt(a*a+s*s),p=u+h===0?0:h/(u+h),m=c+(r-c)*p,v=d+(l-d)*p,g=e.x-m,f=e.y-v;return{c1:new Me(r+g,l+f),c2:new Me(c+g,d+f)}}length(){let t,e,n=0;for(let o=0;o<=10;o+=1){const i=o/10,a=this.point(i,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(i,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(o>0){const o=a-t,i=s-e;n+=Math.sqrt(o*o+i*i)}t=a,e=s}return n}point(t,e,n,o,i){return e*(1-t)*(1-t)*(1-t)+3*n*(1-t)*(1-t)*t+3*o*(1-t)*t*t+i*t*t*t}}class je{constructor(t,e={}){var n,o,i;this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._isRedrawn=!1,this._oldFromDataURL="",this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||2,this.maxWidth=e.maxWidth||2,this.throttle=null!=(n=e.throttle)?n:16,this.minDistance=null!=(o=e.minDistance)?o:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!=(i=e.canvasContextOptions)?i:{},this._strokeMoveUpdate=this.throttle?ie(je.prototype._strokeUpdate,this.throttle):je.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._strokePointerId=void 0,this._oldFromDataURL=""}async fromDataURL(t,e={}){let n=t;return oe(e.rotation)&&0!==e.rotation&&(n=await this.rotateDataURL(n,e.rotation,"image/png")),new Promise((t,o)=>{const i=new Image,a=e.ratio||window.devicePixelRatio||1,s=e.width||this.canvas.width/a,r=e.height||this.canvas.height/a,l=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),i.onload=()=>{this._ctx.drawImage(i,l,c,s,r),t()},i.onerror=t=>{o(t)},i.crossOrigin="anonymous",i.src=n,this._oldFromDataURL=n,this._isEmpty=!1})}rotateDataURL(t,e=0,n="image/png",o){return new Promise((i,a)=>{const s=new Image;s.onload=()=>{const t=e*Math.PI/180,a=s.width,r=s.height,l=document.createElement("canvas"),c=l.getContext("2d");e%180==0?(l.width=a,l.height=r):(l.width=r,l.height=a),c.translate(l.width/2,l.height/2),c.rotate(t),c.drawImage(s,-a/2,-r/2),i(l.toDataURL(n,o))},s.onerror=a,s.crossOrigin="anonymous",s.src=t})}undoLastStep(){const t=[...this._data],e=this._oldFromDataURL;this.clear(),this._isRedrawn=!0,0!==t.length?(t.pop(),this.fromDataURL(e),this.fromData(t,{clear:!1}),this._isEmpty=t.length<=0):this._oldFromDataURL=""}getCurrentOrientation(){const{screen:t}=window,e=t.orientation||t.mozOrientation||t.msOrientation;let n=0;e&&(n=e.angle);const o=window.innerWidth>window.innerHeight;return{isLandscape:o,status:o?"横屏":"竖屏",angle:n,orientation:{0:"DEFAULT",90:"Rotated right","-90":"Rotated left",180:"Upside down"}["".concat(n)]||"未知 (".concat(n,"°)")}}toDataURL(t="image/png",e={}){return"image/svg+xml"===t?(ae(null==e?void 0:e.encoderOptions)&&(e.encoderOptions=void 0),"data:image/svg+xml;base64,".concat(btoa(this.toSVG(null==e?void 0:e.encoderOptions)))):this.toCanvasDataURL(t,e.encoderOptions,e.rotation)}toCanvasDataURL(t="image/png",e,n){if("number"!=typeof e&&(e=void 0),oe(n)&&0!==n){const o=n*Math.PI/180,i=document.createElement("canvas"),a=i.getContext("2d"),s=this.canvas.width,r=this.canvas.height;return n%180==0?(i.width=s,i.height=r):(i.width=r,i.height=s),a.translate(i.width/2,i.height/2),a.rotate(o),a.drawImage(this.canvas,-s/2,-r/2),i.toDataURL(t,e)}return this.canvas.toDataURL(t,e)}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!=(t=this.canvas.ownerDocument.defaultView)?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}isRedrawn(){return this._isRedrawn}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_handleMouseDown(t){this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))}_handleMouseMove(t){this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)}_handleMouseUp(t){this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))}_handleTouchStart(t){1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))}_handleTouchMove(t){1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))}_handleTouchEnd(t){0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(t)))}_getPointerId(t){return(null==t?void 0:t.persistentDeviceId)||t.pointerId}_allowPointerId(t,e=!1){return void 0===this._strokePointerId?e:this._getPointerId(t)===this._strokePointerId}_handlePointerDown(t){!this._drawingStroke&&this._isLeftButtonPressed(t)&&this._allowPointerId(t,!0)&&(this._strokePointerId=this._getPointerId(t),t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))}_handlePointerMove(t){this._allowPointerId(t)&&(this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1))}_handlePointerUp(t){!this._isLeftButtonPressed(t)&&this._allowPointerId(t)&&(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove,{passive:!1}),e("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":e("touchmove",this._handleTouchMove,{passive:!1}),e("touchend",this._handleTouchEnd,{passive:!1});break;case"pointerdown":e("pointermove",this._handlePointerMove,{passive:!1}),e("pointerup",this._handlePointerUp,{passive:!1})}this._drawingStroke=!0;const n=this._getPointGroupOptions(),o={...n,points:[]};this._data.push(o),this._reset(n),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);const e=this._createPoint(t.x,t.y,t.pressure),n=this._data[this._data.length-1],o=n.points,i=o.length>0&&o[o.length-1],a=!!i&&e.distanceTo(i)<=this.minDistance,s=this._getPointGroupOptions(n);if(!i||!i||!a){const t=this._addPoint(e,s);i?t&&this._drawCurve(t,s):this._drawDot(e,s),o.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this._strokePointerId=void 0)}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(t,e,n){const o=this.canvas.getBoundingClientRect();return new Me(t-o.left,e-o.top,n,(new Date).getTime())}_addPoint(t,e){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],e),o=Be.fromPoints(n,t);return n.shift(),o}return null}_calculateCurveWidths(t,e,n){const o=n.velocityFilterWeight*e.velocityFrom(t)+(1-n.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(o,n),a={end:i,start:this._lastWidth};return this._lastVelocity=o,this._lastWidth=i,a}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,n){const o=this._ctx;o.moveTo(t,e),o.arc(t,e,n,0,2*Math.PI,!1),this._isEmpty=!1,this._isRedrawn=!0}_drawCurve(t,e){const n=this._ctx,o=t.endWidth-t.startWidth,i=2*Math.ceil(t.length());n.beginPath(),n.fillStyle=e.penColor;for(let n=0;n<i;n+=1){const a=n/i,s=a*a,r=s*a,l=1-a,c=l*l,d=c*l;let u=d*t.startPoint.x;u+=3*c*a*t.control1.x,u+=3*l*s*t.control2.x,u+=r*t.endPoint.x;let h=d*t.startPoint.y;h+=3*c*a*t.control1.y,h+=3*l*s*t.control2.y,h+=r*t.endPoint.y;const p=Math.min(t.startWidth+r*o,e.maxWidth);this._drawCurveSegment(u,h,p)}n.closePath(),n.fill()}_drawDot(t,e){const n=this._ctx,o=e.dotSize>0?e.dotSize:(e.minWidth+e.maxWidth)/2;n.beginPath(),this._drawCurveSegment(t.x,t.y,o),n.closePath(),n.fillStyle=e.penColor,n.fill()}_fromData(t,e,n){for(const o of t){const{points:t}=o,i=this._getPointGroupOptions(o);if(t.length>1)for(let n=0;n<t.length;n+=1){const o=t[n],a=new Me(o.x,o.y,o.pressure,o.time);0===n&&this._reset(i);const s=this._addPoint(a,i);s&&e(s,i)}else this._reset(i),n(t[0],i)}}toSVG({includeBackgroundColor:t=!1}={}){const e=this._data,n=Math.max(window.devicePixelRatio||1,1),o=this.canvas.width/n,i=this.canvas.height/n,a=document.createElementNS("http://www.w3.org/2000/svg","svg");if(a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),a.setAttribute("viewBox","".concat(0," ").concat(0," ").concat(o," ").concat(i)),a.setAttribute("width",o.toString()),a.setAttribute("height",i.toString()),t&&this.backgroundColor){const t=document.createElement("rect");t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("fill",this.backgroundColor),a.appendChild(t)}return this._fromData(e,(t,{penColor:e})=>{const n=document.createElement("path");if(!(Number.isNaN(t.control1.x)||Number.isNaN(t.control1.y)||Number.isNaN(t.control2.x)||Number.isNaN(t.control2.y))){const o="M ".concat(t.startPoint.x.toFixed(3),",").concat(t.startPoint.y.toFixed(3)," ")+"C ".concat(t.control1.x.toFixed(3),",").concat(t.control1.y.toFixed(3)," ")+"".concat(t.control2.x.toFixed(3),",").concat(t.control2.y.toFixed(3)," ")+"".concat(t.endPoint.x.toFixed(3),",").concat(t.endPoint.y.toFixed(3));n.setAttribute("d",o),n.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),n.setAttribute("stroke",e),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),a.appendChild(n)}},(t,{penColor:e,dotSize:n,minWidth:o,maxWidth:i})=>{const s=document.createElement("circle"),r=n>0?n:(o+i)/2;s.setAttribute("r",r.toString()),s.setAttribute("cx",t.x.toString()),s.setAttribute("cy",t.y.toString()),s.setAttribute("fill",e),a.appendChild(s)}),a.outerHTML}blobToDataURL(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=()=>{e(o.result)},o.onerror=()=>{n(new Error("无法转换Blob为DataURL"))},o.readAsDataURL(t)})}loadImage(t,e){const n=new Image;n.onload=()=>e(),n.onerror=()=>e,n.src=t}}t("IBizSignaturePad",N({name:"IBizSignaturePad",props:{options:{type:Object}},setup(t){const e=ye("signature-pad"),n=y(),o=y(),i=y(),a=()=>{const e={};if(t.options){const{dotsize:n,minwidth:o,maxwidth:i,pencolor:a,velocityfilterweight:s,compositeoperation:r,mindistance:l,backgroundcolor:c,throttle:d,canvascontextoptions:u}=t.options;if(n&&Object.assign(e,{dotSize:Number(n)}),o&&Object.assign(e,{minWidth:Number(o)}),i&&Object.assign(e,{maxWidth:Number(i)}),s&&Object.assign(e,{velocityFilterWeight:Number(s)}),l&&Object.assign(e,{minDistance:Number(l)}),d&&Object.assign(e,{throttle:Number(d)}),a&&Object.assign(e,{penColor:String(a)}),r&&Object.assign(e,{compositeOperation:String(r)}),c&&Object.assign(e,{backgroundColor:String(c)}),u){let t=u;if(se(u))try{t=JSON.parse(u)}catch(e){ibiz.log.error(e),t=void 0}Object.assign(e,{canvasContextOptions:{...t}})}}return e},s=t=>{t.preventDefault()},r=t=>{z(()=>{const e=o.value,r=n.value;if(!e)return;const l=window.devicePixelRatio||1,c=r.getBoundingClientRect(),d=c.width<300?300:c.width,u=c.height<150?150:c.height;e.width=d*l,e.height=u*l,e.style.width="".concat(d,"px"),e.style.height="".concat(u,"px"),i.value=new je(e,{...a()});e.getContext("2d").scale(l,l),e.addEventListener("touchstart",s,{passive:!1}),e.addEventListener("touchmove",s,{passive:!1}),null==t||t()})},l=t=>r(t),c=()=>{i.value&&(i.value.off(),l())};return P(()=>{r(),window.addEventListener("resize",c)}),I(()=>{window.removeEventListener("resize",c)}),{ns:e,canvasRef:o,signaturePadRef:n,signaturePad:i,updateSignaturePad:l}},render(){return S("div",{class:this.ns.b(),ref:"signaturePadRef"},[S("div",{class:this.ns.e("container")},[S("canvas",{ref:"canvasRef"},null)])])}}));function Ve(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}const Ue=N({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(t){const e=ye("panel-container"),{id:n}=t.modelData,o=O(()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o});return{ns:e,classArr:o}},render(){var t,e,n;let o;const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Ve(o=i.map(t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ve(t)?t:{default:()=>[t]}):t}))?o:{default:()=>[o]}),s=null==(n=this.$attrs)?void 0:n.attrs;if(s&&s.dynamictooltip){const t={...s.dynamictooltip};return delete t.content,S(b("el-tooltip"),R({placement:"right","popper-class":this.ns.e("dynamic-tooltip")},t),{default:()=>S("div",R({class:this.classArr,onClick:()=>{this.controller.onClick()}},this.$attrs),[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),content:()=>S("div",{class:this.ns.e("dynamic-tooltip-content"),innerHTML:s.dynamictooltip.content},null)})}return A(S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a]),[[T("loading"),this.controller.state.loading]])}});class We{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new bt(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Oe(Ue,function(t){t.component(Ue.name,Ue),Ct("CONTAINER",()=>new We),Ct("CONTAINER_DEFAULT",()=>new We)}));const Fe=N({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){m("ctx").evt.on("onRegister",(e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)});return{ns:ye("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),S("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?ibiz.i18n.t("vue3Util.panelComponent.noProvidedSlot",{id:this.modelData.id}):"")])}});class qe extends Pt{bindControl(t){this.control=t,t.evt.onAll((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})})}}t("PanelCtrlPosController",qe);class Ge{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new qe(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Oe(Fe,function(t){t.component(Fe.name,Fe),Ct("CTRLPOS",()=>new Ge)}));class $e extends bt{}function He(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}t("ScrollContainerItemController",$e);const Ke=t("ScrollContainerItem",N({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:$e,required:!0}},setup(t){const e=ye("scroll-container-item"),{id:n}=t.modelData,o=O(()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]);return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return A(S(b("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},He(n=o.map(t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},He(t)?t:{default:()=>[t]})):t}))?n:{default:()=>[n]}),[[T("loading"),this.controller.state.loading]])}}));class Xe{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new $e(t,e,n);return await o.init(),o}}class Qe extends bt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",Qe);const Ye=t("ScrollContainer",N({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:Qe,required:!0}},setup(t){const e=ye("scroll-container"),{id:n}=t.modelData,o=O(()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]);return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,i=null,a=null,s=null;const r={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach(t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,r.left={width:l};break;case"EAST":i=t,r.right={width:l};break;case"NORTH":o=t,r.top={height:c};break;case"SOUTH":a=t,r.bottom={height:c};break;case"CENTER":s=t;break;default:ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.unadaptedLayout",{layoutPos:e.modelData.layoutPos.layoutPos}))}});for(const t in r)(r[t].width||r[t].height)&&(r[t].flexShrink=0);return A(S("div",{class:this.classArr},[S("div",{class:[this.ns.e("header")],style:r.top},[o]),S("div",{class:[this.ns.b("content")]},[S("div",{class:this.ns.be("content","left"),style:r.left},[n]),S("div",{class:this.ns.be("content","center")},[s]),S("div",{class:this.ns.be("content","right"),style:r.right},[i])]),S("div",{class:[this.ns.e("footer")],style:r.bottom},[a])]),[[T("loading"),this.controller.state.loading]])}}));class Je{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new Qe(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Oe(Ye,function(t){t.component(Ye.name,Ye),t.component(Ke.name,Ke),Ct("CONTAINER_CONTAINER_SCROLL",()=>new Je),Ct("CONTAINER_CONTAINER_SCROLL_LEFT",()=>new Xe),Ct("CONTAINER_CONTAINER_SCROLL_HEADER",()=>new Xe),Ct("CONTAINER_CONTAINER_SCROLL_RIGHT",()=>new Xe),Ct("CONTAINER_CONTAINER_SCROLL_BOTTOM",()=>new Xe),Ct("CONTAINER_CONTAINER_SCROLL_MAIN",()=>new Xe)}));class Ze extends It{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={},this.isLoading=!1}}t("NavPosState",Ze);const tn=["is404","isRoutePushed"];class en extends Pt{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={},this.ignoreEmbedKey=!1}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find(t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map(t=>t.toLowerCase()),!0)),this.panel.evt.on("onControlEvent",t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}});const e=this.rawItemParams.expmode||this.panel.view.params.expmode,n=this.rawItemParams.ignoreembedkey||this.panel.view.params.ignoreembedkey||"";this.ignoreEmbedKey=Object.is(n.toLowerCase(),"true"),"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new Ze(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(at(this.state.navViewMsgs[e],t),tn.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)})):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new Dt({mode:this.routeDepth?Et.ROUTE:Et.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){this.panel.evt.emit("onPresetPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:"onViewCreated",presetParams:t}),ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Ee(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}async openViewByPath(t){var e,n,o,i;const a=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=a,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Ee(this.route,this.routeDepth,!1);return void((null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/error/404")):this.router.push("".concat(n,"/error/404")))}if(a===this.state.currentKey&&this.state.navViewMsgs[a].fullPath)(null==(n=t.modalOptions)?void 0:n.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else if(this.state.navViewMsgs[a].fullPath&&this.getExpItemIsCache(t))(null==(o=t.modalOptions)?void 0:o.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else{const e=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});(null==(i=this.rawItemParams)?void 0:i.routeattributekeys)&&(e.attributekeys=this.rawItemParams.routeattributekeys),this.getExpItemIsCache(t)&&this.state.cacheKeys.push(a),t.viewId&&(this.state.isLoading=!0,await ibiz.commands.execute(xt.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",modalOption:{replace:!this.state.currentKey,...t.modalOptions}}),this.state.isLoading=!1)}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;i(n)&&(e=n.reduce((t,e)=>(t[e.key.toLowerCase()]=e.value,t),{})),Object.assign(this.rawItemParams,e)}}function nn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}t("NavPosController",en);const on=N({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:en,required:!0}},setup(t){const e=t.controller,n=ye("nav-pos"),o=Zt(),i=Jt(),a=y(!1);if(e.setRouter(o),e.routeDepth){const t=Ee(i,e.routeDepth);l(()=>i.fullPath,()=>{const n=Ee(i,e.routeDepth);if(t===n&&i.matched.length>e.routeDepth){if(i.matched.length===e.routeDepth+1&&(a.value=!!i.name,a.value))return;e.onRouteChange(i)}},{immediate:!0})}return{ns:n,c:e,isPresetView:a,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:i,cache:a}=e;let s=null;if(e.routeOpen){if(this.isPresetView)return S(te,null,null);s=S(b("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?S(t,null,null):null;return a?S(b("keepAlive"),{include:o,max:30,isKey:!0},nn(e)?e:{default:()=>[e]}):e}})}else{const t=n&&i[n]?w(b("IBizViewShell"),{context:i[n].context,params:i[n].params,key:this.c.ignoreEmbedKey?void 0:n,viewId:i[n].viewId,onCreated:this.onViewCreated}):null;s=a?S(b("keepAlive"),{include:o,max:30,isKey:!0},nn(t)?t:{default:()=>[t]}):t}return S("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[s])}});class an{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new en(t,e,n);return await o.init(),o}}t("IBizNavPos",Oe(on,function(t){t.component(on.name,on),Ct("RAWITEM_NAV_POS",()=>new an)}));class sn extends It{constructor(){super(...arguments),this.error=null}}const rn=class t extends Pt{constructor(){super(...arguments),this.unitName=void 0}get valueFormat(){return this.model.valueFormat}get dataType(){}get context(){return this.panel.context}get params(){return this.panel.params}get data(){return this.dataParent.data}get value(){return this.data[this.model.id]}createState(){var t;return new sn(null==(t=this.parent)?void 0:t.state)}async validate(){var t;return this.state.visible&&this.state.required&&!this.value?(this.state.error=(null==(t=this.editor)?void 0:t.model.placeHolder)||ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty",{caption:this.model.caption}),!1):(this.state.error=null,!0)}async onInit(){var t,e;await super.onInit(),this.state.required=!this.model.allowEmpty,!0!==this.context.srfreadonly&&"true"!==this.context.srfreadonly&&(null==(t=this.model.editor)?void 0:t.readOnly)&&(this.state.readonly=(null==(e=this.model.editor)?void 0:e.readOnly)||!1),this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await Ot(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),await this.validate(),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:Nt.ENTER,event:t})}onClick(e){var n;if(ibiz.env.isMob){this.state.readonly||this.state.disabled||!(null==(n=this.editor)?void 0:n.model.editorType)||t.enableClickType.includes(this.editor.model.editorType)||null==e||e.stopPropagation()}super.onClick(e)}};rn.enableClickType=["SPAN","SPAN_LINK","RAW","MOB2DBARCODEREADER","FIELD_CAROUSEL_PICTURE","FIELD_IMAGE_PICTURE_ONE"];let ln=t("PanelFieldController",rn);const cn=N({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:ln,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=ye("panel-field"),n=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n),e.is("error",!!t.controller.state.error),e.is("mob",ibiz.env.isMob)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:this.ns.b("content"),readonly:this.controller.state.readonly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t),...this.attrs};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=b(this.controller.editorProvider.formEditor);t=w(n,{...e})}else t=S(b("not-supported-editor"),{modelData:this.modelData.editor},null)}return S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[t,this.controller.state.error&&S("div",{class:this.ns.e("error")},[this.controller.state.error])])}});class dn{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new ln(t,e,n);return await o.init(),o}}t("IBizPanelField",Oe(cn,function(t){t.component(cn.name,cn),Ct("FIELD",()=>new dn)}));class un extends Pt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}calcDynaClass(t){var e,n;if(this.model.dynaClass||(null==(e=this.model.rawItem)?void 0:e.dynaClass)){const e=this.model.dynaClass?St(this.model.dynaClass,t):[],o=(null==(n=this.model.rawItem)?void 0:n.dynaClass)?St(this.model.rawItem.dynaClass,t):[];this.state.class.containerDyna=[...e,...o]}if(this.model.labelDynaClass){const e=St(this.model.labelDynaClass,t);this.state.class.labelDyna=e}}}t("PanelRawItemController",un);const hn=N({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:un,required:!0}},setup(t){const e=ye("panel-rawitem"),n=t.controller,o=y(""),i=y(""),{rawItem:a}=t.modelData;a&&a.cssStyle&&(i.value=a.cssStyle);const s=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o});return l(()=>n.data,async t=>{if(t){const e=n.model.rawItem;if(!e)return;let i;const a={...t};"RAW"===e.contentType?i=e.caption:"HTML"===e.contentType&&(i=e.content),i&&e.templateMode&&(i=await ibiz.util.hbs.render(i.replace("//n","\n"),Object.assign(a,{data:{...t}}))),o.value=i}},{immediate:!0}),{ns:e,classArr:s,tempStyle:i,content:o}},render(){if(this.controller.state.visible)return S("div",{class:this.classArr,style:this.tempStyle,onClick:t=>this.controller.onClick(t)},[S(b("iBizRawItem"),{rawItem:this.modelData,content:this.content},null)])}});class pn{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new un(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Oe(hn,function(t){t.component(hn.name,hn),Ct("RAWITEM",()=>new pn),Ct("RAWITEM_STATIC_IMAGE",()=>new pn),Ct("RAWITEM_STATIC_LABEL",()=>new pn),Ct("RAWITEM_STATIC_TEXT",()=>new pn)}));class mn extends It{constructor(){super(...arguments),this.data={}}}class vn{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new mn,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const i=At(this.model).map(t=>t.id);o._evt.on("change",t=>{i.includes(t)&&this.childDataChangeNotify([t])})}get data(){return this.state.data}async validate(){return(await Promise.all(Object.values(this.panelItems).map(t=>t.validate()))).every(t=>t)}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var o,i;const a=this.parent.providers[t.id];if(!a)return;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!Tt(t)?await this.initChildrenController(t.panelItems,e,s):(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initChildrenController(t.panelTabPages,e,s)}))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach(e=>{e.dataChangeNotify(t)})}async panelStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{t.destroy()})}}class gn extends zt{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",gn);class fn extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new gn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map(async t=>{var e,n;const o=await _t(t,this.panel.model,this.panel.view.model);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!Tt(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))}))}computeNavParams(){const t=this.dataParent.data||{},{navigateContexts:e,navigateParams:n}=this.model,o=this.panel.context.clone();Object.assign(o,Lt(e,t,this.panel.context,this.panel.params));const i=Lt(n,t,this.panel.context,this.panel.params);return Object.assign(i,this.panel.params),{context:o,params:i}}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}childrenStateNotify(t){this.dataItems.forEach(e=>{e.panelStateNotify(t)})}async validate(){return(await Promise.all(this.dataItems.map(t=>t.validate()))).every(t=>t)}async setData(t){const e=At(this.model),n=t.map(t=>new kt(e,t));this.dataItems=n.map(t=>new vn(this.model,this.panel,this,t)),this.dataItems.length&&await Promise.all(this.dataItems.map(t=>t.init())),this.state.items=n,this.childrenStateNotify(Rt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:o}=this.computeNavParams(),i=await Mt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){super.destroy(),this.dataItems.forEach(t=>{t.destroy()})}}t("MultiDataContainerController",fn);const yn=N({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:fn,required:!0}},setup(t){const e=ye("multi-data-container"),{id:n}=t.modelData;l(()=>t.controller.state.items,()=>{t.controller.dataItems.forEach(t=>{t.state=v(t.state);Object.keys(t.panelItems).forEach(e=>{const n=t.panelItems[e];n.state=v(n.state)})})},{immediate:!0});const o=m("renderPanelItem"),i=O(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map((t,e)=>{const n=this.controller.dataItems[e];return S(b("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const o=n.panelItems[t.id];return S(b("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(i=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(i)&&!_(i)?e:{default:()=>[e]});var i})]}})}),A(S("div",{class:this.classArr},[t]),[[T("loading"),this.controller.state.loading]])}});class wn{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new fn(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Oe(yn,function(t){t.component(yn.name,yn),Ct("CONTAINER_CONTAINER_MULTIDATA",()=>new wn)}));class bn extends zt{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerRawState",bn);class Cn extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.items}createState(){var t;return new bn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var o,i;const a=await _t(t,e.model,e.view.model);if(!a)return;this.providers[t.id]=a;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!Tt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)}))}computeNavParams(){const{navigateContexts:t,navigateParams:e}=this.model,n=this.panel.context.clone();Object.assign(n,Lt(t,this.panel.params,this.panel.context));const o=Lt(e,this.panel.params,this.panel.context);return Object.assign(o,this.panel.params),{context:n,params:o}}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,n;null==(n=(e=this.data).destroy)||n.call(e),this.state.items=t,this.childrenStateNotify(Rt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:o}=this.computeNavParams(),i=await Mt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{var e;null==(e=t.destroy)||e.call(t)})}}t("MultiDataContainerRawController",Cn);const Pn=N({name:"IBizMultiDataContainerRaw",props:{modelData:{type:Object,required:!0},controller:{type:Cn,required:!0}},setup(t){const e=ye("multi-data-container-raw"),{id:n}=t.modelData;l(()=>t.controller.state.items,()=>{Object.keys(t.controller.panelItems).forEach(e=>{const n=t.controller.panelItems[e];n.state=v(n.state)})},{immediate:!0,deep:!0});const o=m("renderPanelItem"),i=O(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():S(b("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const n=this.controller.panelItems[t.id];return S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]});var o})]}}),A(S("div",{class:this.classArr},[t]),[[T("loading"),this.controller.state.loading]])}});class In{constructor(){this.component="IBizMultiDataContainerRaw"}async createController(t,e,n){const o=new Cn(t,e,n);return await o.init(),o}}t("IBizMultiDataContainerRaw",Oe(Pn,function(t){t.component(Pn.name,Pn),Ct("CONTAINER_CONTAINER_MULTIDATA_RAW",()=>new In)}));class Dn extends zt{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Dn);class En extends bt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Dn(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers()}async panelStateNotify(t){super.panelStateNotify(t),t===Rt.LOAD&&this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map(async t=>{var o,i;const a=await _t(t,e.model,e.view.model);if(!a)return;this.providers[t.id]=a;const s=await a.createController(t,e,n);this.panelItems[t.id]=s,(null==(o=t.panelItems)?void 0:o.length)&&!Tt(t)&&await this.initPanelItemControllers(t.panelItems,e,s),(null==(i=t.panelTabPages)?void 0:i.length)&&await this.initPanelItemControllers(t.panelTabPages,e,s)}))}computeNavParams(){const{navigateContexts:t,navigateParams:e}=this.model,n=this.panel.context.clone();Object.assign(n,Lt(t,this.panel.params,this.panel.context));const o=Lt(e,this.panel.params,this.panel.context);return Object.assign(o,this.panel.params),{context:n,params:o}}initContainerData(){const{dataSourceType:t,dataName:e,dataRegionType:n,scriptCode:o}=this.model;if("LOGINFORM"!==n)switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!o)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=ht.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},o,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new Q(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}else this.setLoginForm()}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,n;const o=At(this.model),i=o.map(t=>t.id),a=new kt(o,t);a._evt.on("change",t=>{i.includes(t)&&this.childDataChangeNotify([t])}),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=a,this.childrenStateNotify(Rt.LOAD)}setLoginForm(){this.setData({})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const{context:n,params:o}=this.computeNavParams(),i=await Mt(e,t,n,this.panel.data,o);if(!i)throw new F(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(i)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new Y(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),{context:o,params:i}=this.computeNavParams(),a=await n.deService.exec(e,t,o,void 0,i);a.ok&&a.data&&this.setData(a.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",()=>{n()})}childDataChangeNotify(t){Object.values(this.panelItems).forEach(e=>{e.dataChangeNotify(t)})}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach(t=>{t.destroy()})}}t("SingleDataContainerController",En);const xn=N({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:En,required:!0}},setup(t){const e=ye("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach(e=>{const n=t.controller.panelItems[e];n.state=v(n.state)});const o=m("renderPanelItem"),i=O(()=>[e.b(),e.m(n),...t.controller.containerClass]);return{ns:e,classArr:i,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():S(b("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map(t=>{let e;const n=this.controller.panelItems[t.id];return S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]});var o})]}}),A(S("div",{class:this.classArr},[t]),[[T("loading"),this.controller.state.loading]])}});class On{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new En(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Oe(xn,function(t){t.component(xn.name,xn),Ct("CONTAINER_CONTAINER_SINGLEDATA",()=>new On)}));class Nn extends zt{}t("GridContainerState",Nn);class Sn extends bt{createState(){var t;return new Nn(null==(t=this.parent)?void 0:t.state)}}function An(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}t("GridContainerController",Sn);const Tn=N({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Sn,required:!0}},setup(t){const e=ye("grid-container"),{id:n}=t.modelData,o=O(()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}),i=O(()=>({...t.modelData.layout,layout:"TABLE_12COL"})),a=y(void 0),s=y(12);return{ns:e,classArr:o,layoutModel:i,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:s,adaptCols:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach(n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))});let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return A(S(b("iBizRow"),{class:this.classArr,layout:this.layoutModel},An(n=o.map(t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},An(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]}),[[T("loading"),this.controller.state.loading]])}});class zn{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Sn(t,e,n);return await o.init(),o}}t("IBizGridContainer",Oe(Tn,function(t){t.component(Tn.name,Tn),Ct("CONTAINER_CONTAINER_GRID",()=>new zn)}));class Rn extends zt{}t("PanelContainerImageState",Rn);class _n extends bt{createState(){var t;return new Rn(null==(t=this.parent)?void 0:t.state)}}function Ln(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}t("PanelContainerImageController",_n);const kn=N({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:_n,required:!0}},setup(t){const e=ye("panel-container-image"),{id:n}=t.modelData,o=O(()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}),i=O(()=>{const e=t.controller.model.sysImage,n={};let o="";if(null==e?void 0:e.rawContent)if(H(e.rawContent)){const t=e.rawContent.replace(/[\u4e00-\u9fff]/g,"");o="url(data:image/svg+xml;base64,".concat(btoa(t),")")}else o="url(".concat(e.rawContent,")");else(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")"));return o&&Object.assign(n,{backgroundImage:o}),n});return{ns:e,classArr:o,backgroundStyle:i}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],i=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Ln(n=o.map(t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ln(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]});return A(S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t),style:this.backgroundStyle},[this.controller.model.cssStyle?S("style",{type:"text/css"},[this.controller.model.cssStyle]):null,i]),[[T("loading"),this.controller.state.loading]])}});class Mn{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new _n(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Oe(kn,function(t){t.component(kn.name,kn),Ct("CONTAINER_CONTAINER_IMAGE",()=>new Mn)}));class Bn extends zt{}t("PanelContainerGroupState",Bn);class jn extends bt{createState(){var t;return new Bn(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",jn);class Vn{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new jn(t,e,n);return await o.init(),o}}function Un(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}const Wn=N({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:jn,required:!0}},setup(t){const e=ye("panel-container-group"),n=y(!t.controller.defaultExpansion);return{ns:e,captionText:O(()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let i=n;return o&&(i=ibiz.i18n.t(o.lanResTag,n)),i}),isCollapse:n,changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)}}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible),this.ns.is("mob",ibiz.env.isMob)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const i=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=S(b("iBizRow"),{slot:"content",layout:this.modelData.layout},Un(n=i.map(t=>{const e=t.props;return e&&e.controller?S(b("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Un(t)?t:{default:()=>[t]}):t}))?n:{default:()=>[n]});let s=null;return this.modelData.showCaption&&(s=S("div",{class:[this.ns.b("header"),this.ns.is("is-mob",ibiz.env.isMob)],onClick:this.changeCollapse},[S("div",{class:[this.ns.be("header","left")]},[S("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.modelData.sysImage&&S(ke,{class:this.ns.em("caption","icon"),icon:this.modelData.sysImage},null),this.captionText,this.modelData.counterId&&S("span",{class:this.ns.e("counter")},[L("("),this.controller.state.counterData[this.modelData.counterId],L(")")])])]),S("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?S("ion-icon",{name:"caret-forward-sharp"},null):S("ion-icon",{name:"caret-down-sharp"},null))])])),A(S("div",{class:o},[s,S("div",{class:[this.ns.b("content")]},[a])]),[[T("loading"),this.controller.state.loading]])}});t("IBizPanelContainerGroup",Oe(Wn,function(t){t.component(Wn.name,Wn),Ct("CONTAINER_CONTAINER_GROUP",()=>new Vn)}));function Fn(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)}const qn=N({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(t){const e=ye("panel-tab-page"),n=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return A(S(b("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Fn(n=o.map(t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return S(b("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Fn(t)?t:{default:()=>[t]})}))?n:{default:()=>[n]}),[[T("loading"),this.controller.state.loading]])}});class Gn{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new bt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Oe(qn,function(t){t.component(qn.name,qn),Ct("TABPAGE",()=>new Gn)}));class $n extends Pt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?ht.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const Hn=N({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:$n,required:!0}},setup(t){var e;const n=ye("panel-item-render"),o=ye("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:i}=t.modelData,a=O(()=>[n.b(),n.m(i),o.b(),n.is("hidden",!t.controller.state.visible)]),s=O(()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data));return{ns:n,classArr:a,htmlCode:s}},render(){return S("div",{class:this.classArr,innerHTML:this.htmlCode,onClick:t=>this.controller.onClick(t)},null)}});class Kn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new $n(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Oe(Hn,function(t){t.component(Hn.name,Hn),Ct("PREDEFINE_RENDER",()=>new Kn)}));const Xn=N({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ye("teleport-placeholder"),n=y(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const i=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:i,tempStyle:n}},render(){if(this.controller.state.visible)return S("div",{id:this.controller.state.teleportTag,class:this.classArr,style:this.tempStyle},null)}});class Qn extends It{constructor(){super(...arguments),this.teleportTag=""}}class Yn extends Pt{createState(){var t;return new Qn(null==(t=this.parent)?void 0:t.state)}async onInit(){var t,e;await super.onInit();const n=this.panel.view.model.codeName;let o="".concat(null==n?void 0:n.toLowerCase(),"-").concat(this.model.id);const i=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find(t=>"TeleportTag"===t.key);i&&i.value&&(o=i.value),ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.placeholderIdentifier",{viewCodeName:n,id:this.model.id}),o),this.state.teleportTag=o}}class Jn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const o=new Yn(t,e,n);return await o.init(),o}}t("TeleportPlaceholderProvider",Jn);t("IBizTeleportPlaceholder",Oe(Xn,function(t){t.component(Xn.name,Xn),Ct("RAWITEM_TELEPORT_PLACEHOLDER",()=>new Jn)}));const Zn=N({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup:()=>({ns:ye("panel-container-tabs")}),render(){return w(b("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class to{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const o=new bt(t,e,n);return await o.init(),o}}t("IBizPanelContainerTabs",Oe(Zn,function(t){t.component(Zn.name,Zn),Ct("CONTAINER_TABS",()=>new to)}));const eo=N({name:"IBizPanelCtrlViewPageCaption",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ye("panel-ctrl-view-page-caption"),n=O(()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n),e.is("mob",ibiz.env.isMob)];return o.push(...t.controller.containerClass),o});return{ns:e,classArr:n}},render(){let t=null;return this.controller.data&&(t=S("span",{class:this.ns.b("content")},[this.controller.state.caption])),S("div",{class:this.classArr,onClick:t=>this.controller.onClick(t)},[t])}});class no extends Pt{async onInit(){await super.onInit(),this.state.caption=this.panel.view.model.caption||"",this.panel.view.evt.on("onViewInfoChange",({caption:t,dataInfo:e})=>{this.state.caption="".concat(this.panel.view.model.caption).concat(e?"-".concat(e):"")})}}class oo{constructor(){this.component="IBizPanelCtrlViewPageCaption"}async createController(t,e,n){const o=new no(t,e,n);return await o.init(),o}}t("IBizPanelCtrlViewPageCaption",Oe(eo,function(t){t.component(eo.name,eo),Ct("CTRLPOS_VIEW_PAGECAPTION",()=>new oo)}));const io=N({name:"IBizAuthWxmpQrcode",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=ye("auth-wxmp-qrcode"),{state:n}=t.controller,o=Jt();t.controller.setRouter(o);const i=async()=>{await t.controller.loadQrcode()};return l(()=>n.visible,()=>{var t;n.visible&&(n.keepAlive&&!(null==(t=n.qrcode)?void 0:t.expirein)||!n.keepAlive)&&i()},{immediate:!0}),I(()=>{t.controller.destroy()}),{ns:e,loadQrcode:i}},render(){var t,e;return S("div",{class:this.ns.b()},[S("div",{class:this.ns.e("content")},[this.controller.state.qrcode&&S("img",{class:this.ns.e("qrcode"),src:null==(t=this.controller.state.qrcode)?void 0:t.url},null),!(null==(e=this.controller.state.qrcode)?void 0:e.expirein)&&S("div",{class:this.ns.e("mask")},[S("ion-icon",{title:ibiz.i18n.t("vue3Util.panelComponent.refresh"),name:"reload-outline",onClick:this.loadQrcode,class:this.ns.em("mask","icon")},null)])]),S("div",{class:this.ns.e("caption")},[this.controller.state.tips])])}});class ao extends It{}class so extends Pt{constructor(){super(...arguments),this.pollingTime=2,this.rawItemParams={}}createState(){var t;return new ao(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),this.handleRawItemParams(),this.initParams()}setRouter(t){this.route=t}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;i(n)&&(e=n.reduce((t,e)=>(t[e.key.toLowerCase()]=e.value,t),{})),Object.assign(this.rawItemParams,e)}initParams(){var t;this.pollingTime=(t=this.rawItemParams.pollingtime)&&isFinite(Number(t))?Number(this.rawItemParams.pollingtime):2,this.state.tips=this.model.caption||ibiz.i18n.t("vue3Util.panelComponent.wxQrcodeCaption")}async loadQrcode(){try{const t=await ibiz.net.get("/uaa/open/wxmp/createqrcode",{},{srfdcsystem:ibiz.env.dcSystem});t.ok&&t.data&&(this.state.qrcode=t.data,this.setTimer())}catch(t){ibiz.log.error(t.message)}}setTimer(){this.expirationTimer=setInterval(()=>{this.state.qrcode&&this.state.qrcode.expirein>0?this.state.qrcode.expirein-=1:clearInterval(this.expirationTimer)},1e3),this.pollingTimer=setInterval(async()=>{await this.pollingLogin()},1e3*this.pollingTime)}async pollingLogin(){try{if(this.state.qrcode&&this.state.qrcode.expirein>0){if(this.state.visible){const t=await ibiz.net.get("/uaa/open/wxmp/qrcode/".concat(this.state.qrcode.ticket),{},{srfdcsystem:ibiz.env.dcSystem}),{data:e,ok:n}=t;if(n&&(null==e?void 0:e.token)){clearInterval(this.pollingTimer);const t=30;J(Z.TOKEN_REMEMBER,"1",t),J(Z.TOKEN,e.token,t);const n=(new Date).getTime()+1e3*(e.expirein||7199);J(Z.TOKEN_EXPIRES,"".concat(n),t),e.refresh_token&&J(Z.REFRESH_TOKEN,e.refresh_token,t),tt(Z.IS_ANONYMOUS);const o=this.route.query.ru||"/";window.location.hash=o||"/",window.history.pushState({},""),window.location.reload()}}}else clearInterval(this.pollingTimer)}catch(t){ibiz.log.error(t.message)}}async destroy(){await super.destroy(),this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=void 0),this.expirationTimer&&(clearInterval(this.expirationTimer),this.expirationTimer=void 0)}}class ro{constructor(){this.component="IBizAuthWxmpQrcode"}async createController(t,e,n){const o=new so(t,e,n);return await o.init(),o}}t("IBizAuthWxmpQrcode",Oe(io,function(t){t.component(io.name,io),Ct("RAWITEM_AUTH_WXMP_QRCODE",()=>new ro)})),t("AppRedirectView",N({setup(){var t;const e=X.create((null==(t=ibiz.appData)?void 0:t.context)||{});I(()=>{e.destroy()});const{href:n}=window.location;P(()=>ibiz.util.hiddenAppLoading()),async function(){await Bt(e,n)}()},render:()=>S("div",null,[ibiz.i18n.t("vue3Util.view.redirectionProgress")])}));class lo{constructor(){this.component="IBizView"}}const co=N({name:"IBizView",props:{context:{type:Object},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(t,{slots:e}){const n=ye("view"),o=Re((...t)=>new pt(...t));_e(o);const i=jt(o.model),a=[],s=new Map,r=[];i.forEach(t=>{const{teleportFlag:e,teleportTag:n}=Vt(t);n||e?(a.push(t),s.set(t.id,n||"")):r.push(t)});const{viewType:l,sysCss:d,codeName:u}=o.model,h=l.toLowerCase(),p=null==d?void 0:d.cssName,m=O(()=>[n.b(),n.b(h),n.m(u),p,o.state.viewMessages.TOP?"has-top-message":"",o.state.viewMessages.BOTTOM?"has-bottom-message":"",o.state.presetClassList]),v=(t,e={})=>{const n=t.name||t.id;return{context:o.context,params:o.params,modelData:t,...o.slotProps[n]||{},...e}};let g;return P(()=>{z(async()=>{const t=document.getElementById(o.id),e=await ibiz.hub.config.view.get(o.model.id);t&&(null==e?void 0:e.waterMarkOption)&&(g=ibiz.util.watermark.mount(e.waterMarkOption,t,o.context,o.params,o.state.srfactiveviewdata||{}))})}),c(()=>{null==g||g()}),{c:o,ns:n,controls:r,teleportControls:a,viewClassNames:m,onLayoutPanelCreated:t=>{o.setLayoutPanel(t)},getCtrlProps:v,renderControl:(t,n={})=>{const i=t.name||t.id,a=v(t,n);if(e[i])return M(e,i,a);const s=o.providers[i],r=b((null==s?void 0:s.component)||"IBizControlShell");return s&&(a.provider=s),w(r,a)},getCtrlTeleportTag:t=>{var e,n;const i=s.get(t.id);if(i)return i;const a=null==(n=null==(e=o.parentView)?void 0:e.layoutPanel)?void 0:n.panelItems[t.name];return a?"#".concat(a.state.teleportTag):void 0},getControlStyle:()=>{const t={};return Object.assign(t,{display:o.state.hasError?"none":"initial"}),t}}},render(){var t,e;let n=null;if(this.c.state.isCreated)if(0===this.c.engines.length)n=S("span",{style:"color:red;"},[ibiz.i18n.t("vue3Util.view.viewType",{viewType:this.modelData.viewType})]);else{const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const n=t.name||t.id;e[n]=e=>this.renderControl(t,e)});const o=this.c.model.viewLayoutPanel,i=this.c.providers[o.name];n=w(b(i.component),{modelData:o,context:this.c.context,params:this.c.params,provider:i,container:this.c,style:this.getControlStyle(),onControllerAppear:this.onLayoutPanelCreated},e)}let o=null;this.c.state.isCreated&&(null==(e=this.teleportControls)?void 0:e.length)&&(o=this.teleportControls.map(t=>{let e;const n=this.getCtrlTeleportTag(t);return n?S("div",{style:this.getControlStyle()},[S(k,{to:n,disabled:!this.c.state.activated},(o=e=this.renderControl(t),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]}))]):(ibiz.log.error(ibiz.i18n.t("vue3Util.view.noTeleportTag",{name:t.name})),null);var o}));let i=null;if(this.c.state.hasError&&this.c.error.status){const t=vt(this.c.error.status);t&&("string"==typeof t.component&&(i=w(b(t.component))),i=w(t.component))}return A(S("div",{class:this.viewClassNames,id:this.c.id},[n,o,i]),[[T("loading"),this.c.state.isLoading]])}});class uo{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Ut(t,e,n,o)}}class ho{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Wt(t,e,n,o)}}t("IBizView",Oe(co,function(t){t.component(co.name,co),Ft("DEFAULT",()=>new lo),Ft("APPDATAUPLOADVIEW",()=>new uo),Ft("DEMDCUSTOMVIEW",()=>new ho)})),t("TodoRedirect",N({setup(){const t=Zt(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error(ibiz.i18n.t("vue3Util.view.insufficientRedirection"));const i=ee.parse(o,{delimiter:";"}),{apptype:a,todotype:s,todoid:r}=i,l={srfapptype:"pc",srfapp:""};a||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(r,"/getlinkurl"),l)).data.linkurl;a?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(s),t.push("/index".concat(e)))}()},render:()=>S("div",null,[ibiz.i18n.t("vue3Util.view.toDoList")])}));class po{constructor(){this.component="IBizPortalView"}}const mo=N({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=ye("view"),n=Re((...t)=>new pt(...t)),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:i,sysCss:a,codeName:s}=n.model,r=i.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l];return{c:n,ns:e,controls:o,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach(t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const i=n[e];if(i)return void(n[e]=()=>i({modelData:t,...o}));const a=this.c.providers[e];a&&(n[e]=()=>{const e=b(a.component);return w(e,{modelData:t,...o,provider:a})})}),n.dashboard&&(e=n.dashboard())}return S("div",{class:this.viewClassNames},[e])}}),vo=(t("IBizPortalView",Oe(mo,function(t){t.component(mo.name,mo),Ft(rt.APP_PORTAL_VIEW,()=>new po),Ft(rt.DE_PORTAL_VIEW,()=>new po),Ft(rt.DE_PORTAL_VIEW9,()=>new po)})),N({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},isEmbedCtrlNav:{type:Boolean,default:!1}},setup(t){const e=Re((...t)=>new pt(...t)),n=y(),o=y(),i=y();return e.evt.on("onCreated",()=>{qt(h(t.modelData),h(e.context),h(e.params)).then(async t=>{if("view"!==t.type)throw new F(ibiz.i18n.t("vue3Util.view.embeddedRedirectionView"));n.value=t.viewId,o.value=t.context,i.value=t.params})}),t.isEmbedCtrlNav&&l(()=>[e.context,e.params],()=>{qt(h(t.modelData),h(e.context),h(e.params)).then(async t=>{"view"===t.type&&(n.value=t.viewId,o.value=t.context)})},{deep:!0}),{c:e,toViewId:n,toViewContext:o,toViewParams:i}},render(){return this.toViewId?w(b("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):A(S("div",{style:"width: 100%; height: 100%;"},null),[[T("loading"),!this.toViewId]])}}));class go{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Oe(vo,function(t){t.component(vo.name,vo);const e=new go;Ft(rt.DE_REDIRECT_VIEW,()=>e)}));class fo{constructor(){this.component="IBizHtmlView"}}const yo=N({name:"IBizHtmlView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=ye("view"),n=Re((t,...e)=>new Gt(t,...e)),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:i,sysCss:a,codeName:s}=n.model,r=i.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(r),e.m(s),l],d=y(!1);B(()=>{n.state.htmlUrl&&(d.value=!0)});return{c:n,ns:e,controls:o,viewClassNames:c,isLoading:d,onLoad:()=>{d.value=!1}}},render(){if(!this.c.state.isCreated)return;if(this.c.state.htmlUrl)return A(S("div",{class:this.viewClassNames},[S("iframe",{src:this.c.state.htmlUrl,onLoad:()=>this.onLoad()},null)]),[[T("loading"),this.isLoading]]);let t=null;const e=vt("404");return e&&("string"==typeof e.component&&(t=w(b(e.component))),t=w(e.component)),S("div",{class:this.viewClassNames},[t])}});t("IBizHtmlView",Oe(yo,function(t){t.component(yo.name,yo),Ft(rt.DE_HTML_VIEW,()=>new fo)}));const wo=N({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:{type:Object}},setup(t,{slots:e}){const n=ge((...e)=>new $t(...e,t.container)),o=ye("control-".concat(n.model.controlType.toLowerCase()));l(()=>t.data,t=>{t&&(n.setInputData(t),n.load())},{immediate:!0}),n.evt.on("onCreated",()=>{Object.keys(n.panelItems).forEach(t=>{const e=n.panelItems[t];e.state=v(e.state)})});const i=(t,o)=>{var a,s;if(t.hidden)return null;const{providers:r,panelItems:l}=o||n,c=r[t.id];if(!c)return S("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);if("CTRLPOS"!==t.itemType&&e[t.id])return M(e,t.id,{model:t,data:n.data,value:n.data[t.id],controller:l[t.id]});const d=b(c.component);let u;if("CTRLPOS"===t.itemType&&e[t.id]){const n=l[t.id];u=n.parent&&Ht(n.parent.model)?()=>e[t.id]({isSimple:!0,data:n.data}):()=>e[t.id]()}else"TABPANEL"===t.itemType&&(null==(a=t.panelTabPages)?void 0:a.length)?u=()=>t.panelTabPages.map(t=>i(t,o)):Tt(t)?u=void 0:(null==(s=t.panelItems)?void 0:s.length)&&(u=()=>t.panelItems.map(t=>i(t,o)));let h="";t.cssStyle&&(h=t.cssStyle);const p=l[t.id],m=function(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach(t=>{t.attrName&&t.attrValue&&(o[t.attrName]=ht.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))}),o}(t,p);return m.dynamicstyle&&("object"==typeof m.dynamicstyle?h+=Object.entries(m.dynamicstyle).map(([t,e])=>"".concat(t,":").concat(e,";")).join(""):h+=m.dynamicstyle,delete m.dynamicstyle),w(d,{modelData:t,controller:p,key:t.id,style:h,attrs:m},u)};return C("renderPanelItem",i),{c:n,ns:o,renderPanelItem:i}},render(){const{state:t,model:e}=this.c;return S(b("iBizControlBase"),{controller:this.c},{default:()=>[S(b("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map(t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]});var o}))]}})]})}});class bo{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Oe(wo,function(t){t.component(wo.name,wo),Kt(Xt.VIEW_LAYOUT_PANEL,()=>new bo)}));function Co(t,e,n){var o,i;if(t.hidden)return;const{providers:a,panelItems:s}=e,r=a[t.id];if(!r)return S("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);const l=b(r.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map(t=>Co(t,e,n)):Tt(t)?c=void 0:(null==(i=t.panelItems)?void 0:i.length)&&(c=()=>t.panelItems.map(t=>Co(t,e,n)));let d="";t.cssStyle&&(d=t.cssStyle);const u=s[t.id],h=function(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach(t=>{t.attrName&&t.attrValue&&(o[t.attrName]=ht.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))}),o}(t,u);return h.dynamicstyle&&("object"==typeof h.dynamicstyle?d+=Object.entries(h.dynamicstyle).map(([t,e])=>"".concat(t,":").concat(e,";")).join(""):d+=h.dynamicstyle,delete h.dynamicstyle),w(l,{modelData:t,controller:u,key:t.id,style:d,attrs:h},c)}const Po=N({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:{type:Object},loadDefault:{type:Boolean,default:!0}},setup(t){const e=ge((...e)=>new Qt(...e,t.container)),n=ye("control-".concat(e.model.controlType.toLowerCase()));l(()=>t.data,t=>{t&&(e.setInputData(t),e.load())},{immediate:!0}),e.evt.on("onCreated",()=>{Object.keys(e.panelItems).forEach(t=>{const n=e.panelItems[t];n.state=v(n.state)})});const o=m("renderPanelItem");return C("renderPanelItem",o||Co),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return S(b("iBizControlBase"),{controller:this.c},{default:()=>[S(b("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map(t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",S(b("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=Co(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!_(o)?e:{default:()=>[e]});var o}))]}})]})}});class Io{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Oe(Po,function(t){t.component(Po.name,Po),Kt(Xt.PANEL,()=>new Io)}));function Do(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Eo(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function xo(t,e){for(var n,o="",i=0,a=-1,s=0,r=0;r<=t.length;++r){if(r<t.length)n=t.charCodeAt(r);else{if(47===n)break;n=47}if(47===n){if(a===r-1||1===s);else if(a!==r-1&&2===s){if(o.length<2||2!==i||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",i=0):i=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),a=r,s=0;continue}}else if(2===o.length||1===o.length){o="",i=0,a=r,s=0;continue}e&&(o.length>0?o+="/..":o="..",i=2)}else o.length>0?o+="/"+t.slice(a+1,r):o=t.slice(a+1,r),i=r-a-1;a=r,s=0}else 46===n&&-1!==s?++s:s=-1}return o}var Oo={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var i;o>=0?i=arguments[o]:(void 0===t&&(t=process.cwd()),i=t),Eo(i),0!==i.length&&(e=i+"/"+e,n=47===i.charCodeAt(0))}return e=xo(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Eo(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=xo(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Eo(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];Eo(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":Oo.normalize(t)},relative:function(t,e){if(Eo(t),Eo(e),t===e)return"";if((t=Oo.resolve(t))===(e=Oo.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,i=o-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var s=e.length-a,r=i<s?i:s,l=-1,c=0;c<=r;++c){if(c===r){if(s>r){if(47===e.charCodeAt(a+c))return e.slice(a+c+1);if(0===c)return e.slice(a+c)}else i>r&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var d=t.charCodeAt(n+c);if(d!==e.charCodeAt(a+c))break;47===d&&(l=c)}var u="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===u.length?u+="..":u+="/..");return u.length>0?u+e.slice(a+l):(a+=l,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(Eo(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');Eo(t);var n,o=0,i=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,r=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!a){o=n+1;break}}else-1===r&&(a=!1,r=n+1),s>=0&&(l===e.charCodeAt(s)?-1===--s&&(i=n):(s=-1,i=r))}return o===i?i=r:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){Eo(t);for(var e=-1,n=0,o=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var r=t.charCodeAt(s);if(47!==r)-1===o&&(i=!1,o=s+1),46===r?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=s+1;break}}return-1===e||-1===o||0===a||1===a&&e===o-1&&e===n+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){Eo(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),i=47===o;i?(e.root="/",n=1):n=0;for(var a=-1,s=0,r=-1,l=!0,c=t.length-1,d=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===r&&(l=!1,r=c+1),46===o?-1===a?a=c:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){s=c+1;break}return-1===a||-1===r||0===d||1===d&&a===r-1&&a===s+1?-1!==r&&(e.base=e.name=0===s&&i?t.slice(1,r):t.slice(s,r)):(0===s&&i?(e.name=t.slice(1,a),e.base=t.slice(1,r)):(e.name=t.slice(s,a),e.base=t.slice(s,r)),e.ext=t.slice(a,r)),s>0?e.dir=t.slice(0,s-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Oo.posix=Oo;var No=Oo,So=Do(No);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some(e=>"string"==typeof e?t===e:e.test(t))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach(e=>{t.use(e.code,e.extraParams)})}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t,e={}){this.pluginCodes.push({code:t,extraParams:e}),ce.useComponent.callSync(null,t,e)}async loadPlugin(t,e=ibiz.env.appId){if(!0===t.runtimeObject){const n=t;if(n){const t=n.rtobjectName,o=n.rtobjectRepo,i=n.pluginParams||{};if(this.isIgnore(o))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(o)){const t=await this.loadQueue.get(o);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(n.rtobjectName,n.rtobjectRepo,e,{...i});this.loadQueue.set(o,t);return await t}catch(t){throw new Y(n,ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}finally{this.loadQueue.delete(o)}}}return!1}async loadPluginRef(t,e,n=ibiz.env.appId,o={}){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let i=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat("FULLCODE"===ibiz.env.runContainer&&n!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(n):ibiz.env.pluginBaseUrl,"/").concat(No.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));i=a.data}Object.assign(i,{appId:n,extraParams:o});const a=new Yt(t,e,i);if(a){await this.loadPluginExternal(a.config);try{return await this.loadScript(a),this.pluginCache.set(t,a),!0}catch(t){ibiz.log.error(t)}}return!1}async loadScript(t){const e=t.repo,{name:n,appId:o,system:i,styles:a=[],extraParams:s={}}=t.config;let r="";if(r=No.join(e,i),r){if(this.cache.has(r))return;const t="FULLCODE"===ibiz.env.runContainer&&o!==ibiz.env.appId?ibiz.hub.microAppConfigCenter.getPluginBaseUrl(o):ibiz.env.pluginBaseUrl;let i=null;const l=this.parseUrl(r,t),c=("string"==typeof a?[a]:a).map(n=>this.parseUrl(So.join(e,n),t));if(System.addImportMap({imports:{[n]:l},styles:{[n]:c}}),i=await System.import(n),!i)throw new F(ibiz.i18n.t("vue3Util.plugin.fileContentFormat"));if(!i.default)throw new F(ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad"));this.setPluginCode(i.default,s),this.cache.set(r,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(No.join(e,t));const{origin:o,pathname:i}=window.location;return i.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(i).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"],t.appId);if(e.packages){const n=e.packages;for(const e in n){const o=n[e],i=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==i.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));const a=i.data;Object.assign(a,{appId:t.appId}),await this.loadPluginExternal(a)}}System.addImportMap(e)}handleSystemImportMap(t,e){if(t){if(t.baseUrl||"FULLCODE"!==ibiz.env.runContainer||e===ibiz.env.appId||(t.baseUrl=ibiz.hub.microAppConfigCenter.getPluginBaseUrl(e)),t.packages){const e=t.packages;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]="string"==typeof o?this.parseUrl(o,t.baseUrl):o.map(e=>this.parseUrl(e,t.baseUrl))}}return t}return null}});class Ao{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function To(){return{value:String,controller:new Ao(Object),data:new Ao(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function zo(){return{change:(t,e,n)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}}function Ro(){return{hasError:{type:Boolean}}}function _o(){return{...To(),value:[String,Number]}}function Lo(){return{...To(),value:[String,Number,Object,Array]}}function ko(){return{...To(),value:[String,Number]}}function Mo(){return{...To(),value:[String,Number]}}function Bo(){return{...To(),value:[String,Number]}}function jo(){return{...To(),value:[String,Array,Object,Number]}}function Vo(){return{...To(),value:[String,Number]}}function Uo(){return{...To(),value:[String,Number]}}function Wo(){return{...To(),value:{type:Object}}}function Fo(){return{...To(),value:[String,Number]}}function qo(){return{...To(),value:[String,Number]}}function Go(){return{...To(),value:[String,Number]}}function $o(){return{...To(),value:[String,Number]}}function Ho(){return{...To(),value:[String,Number,Array]}}function Ko(){return{...To(),value:[String,Number]}}function Xo(){return{...To(),value:[String,Number]}}function Qo(){return{...To(),value:[String,Number]}}function Yo(){return{...To(),value:String}}function Jo(){return{...To(),value:[String,Number]}}function Zo(){return{...To(),value:String,language:{type:String},theme:{type:String}}}function ti(){return{...To(),value:String}}function ei(){return{...To(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function ni(){return{...To(),value:[Array,Array]}}function oi(){return{...To(),value:String}}function ii(){return{...To(),value:String}}function ai(){return{...To(),value:String}}function si(){return{...To(),value:Number}}function ri(){return{...To(),value:String}}t("RequiredProp",Ao);t("en",{vue3Util:{common:{undefined:"undefined",onFoundCorrespondingPart:"Undefined adapter with no corresponding part found",noFoundViewModel:"View model not found",noSupportLoadingDynamic:"{codeName}No entity, do not support loading dynamic models at this time",invalidPointCoordinates:"Invalid point coordinates: ({x}, {y})"},control:{unsupportedPanel:"Unsupported panel items: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"No data object name config",noSupportedDataSourceType:"The data source type {dataSourceType} is not supported",noConfiguredEntityLogic:"No entity logic config",noConfiguredEntity:"No entity config",noReturnValue:"The entity logic {appDELogicId} has no return value",noAttribute:"There is no {dataName} attribute in the global variable.",noConfiguredScript:"No javaScript config",noConfiguerdEntityBehanior:"No entity behavior config",sessionView:"The session to which the view is bound does not exist {dataName}",viewStateAttribute:"There is no {dataName} attribute in the view state",noImplementMethod:"Method not implemented.",noProvidedSlot:"No {id} slot provided",cannotEmpty:"{caption} cannot be empty",unadaptedLayout:"Unadapted layout placeholder {layoutPos}",placeholderIdentifier:"The placeholder identifier for panel member {id} of view {viewCodeName} is:",refresh:"Refresh",wxQrcodeCaption:"Please use wechat to scan the QR code to log in"},plugin:{failureConfigurationLoad:"Configuration load failure",failedRemotePluginLoad:"Remote Plugin failed to load, Remote Plugin did not find [default] Default Export",fileContentFormat:"Remote plugin failed to load, file not found or file content format is incorrect"},use:{control:{parameterChanges:"Context or view parameter changes for {id}:",stateChange:"Part [{name}] state change"},focusBlur:{noFocus:"No focus, no out-of-focus triggering"},view:{stateChange:"View [{name}] state change"}},util:{noInjected:"The createVueApp method is not injected.",convertString:"Failed to convert to string",viewIdentifiers:"View identifiers do not exist for {depth} level routes",noFoundView:"View not found {viewCodeName}",routeCorrectly:"Cannot get the route correctly, could be a dependency issue."},view:{redirectionProgress:"Redirection in progress",viewType:"View type {viewType} is not supported yet.",noTeleportTag:"No teleportTag was found for part {name}.",embeddedRedirectionView:"Embedded redirection view does not support url jumping",insufficientRedirection:"Insufficient redirection parameters to jump",toDoList:"To-Do List Redirection"}}}),t("zhCn",{vue3Util:{common:{undefined:"未定义",onFoundCorrespondingPart:"未定义未找到对应部件的适配器",noFoundViewModel:"未找到视图模型",noSupportLoadingDynamic:"{codeName}无实体,暂不支持加载动态模型",invalidPointCoordinates:"点坐标无效: ({x}, {y})"},control:{unsupportedPanel:"暂未支持的面板项: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"没有配置数据对象名称",noSupportedDataSourceType:"数据源类型{dataSourceType}暂未支持",noConfiguredEntityLogic:"没有配置实体逻辑",noConfiguredEntity:"没有配置实体",noReturnValue:"实体逻辑{appDELogicId}没有返回值",noAttribute:"全局变量里没有{dataName}属性",noConfiguredScript:"没有配置脚本代码",noConfiguerdEntityBehanior:"没有配置实体行为",sessionView:"绑定视图的会话不存在{dataName}",viewStateAttribute:"视图state里没有{dataName}属性",noImplementMethod:"未执行的方法",noProvidedSlot:"未提供{id}插槽",cannotEmpty:"{caption} 不能为空",unadaptedLayout:"未适配的布局占位{layoutPos}",placeholderIdentifier:"视图{viewCodeName}的面板成员{id}的占位标识是:",refresh:"刷新",wxQrcodeCaption:"请使用微信扫描二维码登录"},plugin:{failureConfigurationLoad:"配置加载失败",failedRemotePluginLoad:"远程插件加载失败, 远程插件未找到[default]默认导出",fileContentFormat:"远程插件加载失败, 未找到文件或文件内容格式不正确"},use:{control:{parameterChanges:"{id}的上下文或视图参数变更:",stateChange:"部件 [{name}] state 变更"},focusBlur:{noFocus:"没有聚焦,不触发失焦"},view:{stateChange:"视图 [{name}] state 变更"}},util:{noInjected:"没有注入createVueApp方法",convertString:"转换成字符串失败",viewIdentifiers:"第{depth}级路由不存在视图标识",noFoundView:"找不到视图{viewCodeName}",routeCorrectly:"无法正确获取route,可能是依赖问题"},view:{redirectionProgress:"重定向跳转中",viewType:"视图类型{viewType}暂未支持",noTeleportTag:"没有找到部件{name}的teleportTag",embeddedRedirectionView:"嵌入重定向视图不支持url跳转",insufficientRedirection:"重定向参数不足无法跳转",toDoList:"待办列表重定向"}}})}}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAKN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAIlB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AA0BhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;IAG/B;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;;iCAuCU,UAAU,YACX;QACR,SAAS,EAAE;YACT,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAC;SACnC,CAAC;QACF,UAAU,EAAE;YACV,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;SACrC,CAAC;KACH,KACA,KAAK,GAAG,IAAI;;IA3Ef;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;
|
|
1
|
+
{"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAKN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAIlB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AA0BhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;IAG/B;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;;iCAuCU,UAAU,YACX;QACR,SAAS,EAAE;YACT,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAC;SACnC,CAAC;QACF,UAAU,EAAE;YACV,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;SACrC,CAAC;KACH,KACA,KAAK,GAAG,IAAI;;IA3Ef;;OAEG;;;;;IAKH;;OAEG;;;;;IAEH;;;OAGG;;;;;IAEH;;;OAGG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;4EAiLL,CAAC"}
|
|
@@ -107,7 +107,8 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
107
107
|
return renderSlot(slots, panelItem.id, {
|
|
108
108
|
model: panelItem,
|
|
109
109
|
data: c.data,
|
|
110
|
-
value: c.data[panelItem.id]
|
|
110
|
+
value: c.data[panelItem.id],
|
|
111
|
+
controller: panelItems[panelItem.id]
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
114
|
const component = resolveComponent(provider.component);
|
|
@@ -109,7 +109,8 @@ const ViewLayoutPanelControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
109
109
|
return vue.renderSlot(slots, panelItem.id, {
|
|
110
110
|
model: panelItem,
|
|
111
111
|
data: c.data,
|
|
112
|
-
value: c.data[panelItem.id]
|
|
112
|
+
value: c.data[panelItem.id],
|
|
113
|
+
controller: panelItems[panelItem.id]
|
|
113
114
|
});
|
|
114
115
|
}
|
|
115
116
|
const component = vue.resolveComponent(provider.component);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.53",
|
|
4
4
|
"description": "通用组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@ibiz-template/cli": "^0.3.23",
|
|
40
|
-
"@ibiz-template/core": "^0.7.41-alpha.
|
|
41
|
-
"@ibiz-template/runtime": "^0.7.41-alpha.
|
|
40
|
+
"@ibiz-template/core": "^0.7.41-alpha.53",
|
|
41
|
+
"@ibiz-template/runtime": "^0.7.41-alpha.53",
|
|
42
42
|
"@ibiz-template/theme": "^0.7.39",
|
|
43
43
|
"@ibiz/model-core": "^0.1.84",
|
|
44
44
|
"@types/path-browserify": "^1.0.2",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"vue": "^3.3.8",
|
|
68
68
|
"vue-router": "^4.2.4"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "d4e59a58c76b99678211b97a0f7435ba75264d82"
|
|
71
71
|
}
|