ocpview-pro 0.1.17 → 0.1.19

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.
@@ -3,7 +3,7 @@ var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,
3
3
  * vuex v4.1.0
4
4
  * (c) 2022 Evan You
5
5
  * @license MIT
6
- */function xe(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Be(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Ee(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;ke(e,n,[],e._modules.root,!0),Se(e,n,t)}function Se(e,t,n){var i=e._state,o=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,a={},s={},l=c.effectScope(!0);l.run((function(){xe(r,(function(t,n){a[n]=function(e,t){return function(){return e(t)}}(t,e),s[n]=c.computed((function(){return a[n]()})),Object.defineProperty(e.getters,n,{get:function(){return s[n].value},enumerable:!0})}))})),e._state=c.reactive({data:t}),e._scope=l,e.strict&&function(e){c.watch((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),i&&n&&e._withCommit((function(){i.data=null})),o&&o.stop()}function ke(e,t,n,i,o){var r=!n.length,a=e._modules.getNamespace(n);if(i.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=i),!r&&!o){var s=De(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){s[l]=i.state}))}var c=i.context=function(e,t,n){var i=""===t,o={dispatch:i?e.dispatch:function(n,i,o){var r=Fe(n,i,o),a=r.payload,s=r.options,l=r.type;return s&&s.root||(l=t+l),e.dispatch(l,a)},commit:i?e.commit:function(n,i,o){var r=Fe(n,i,o),a=r.payload,s=r.options,l=r.type;s&&s.root||(l=t+l),e.commit(l,a,s)}};return Object.defineProperties(o,{getters:{get:i?function(){return e.getters}:function(){return _e(e,t)}},state:{get:function(){return De(e.state,n)}}}),o}(e,a,n);i.forEachMutation((function(t,n){!function(e,t,n,i){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,i.state,t)}))}(e,a+n,t,c)})),i.forEachAction((function(t,n){var i=t.root?n:a+n,o=t.handler||t;!function(e,t,n,i){(e._actions[t]||(e._actions[t]=[])).push((function(t){var o,r=n.call(e,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:e.getters,rootState:e.state},t);return(o=r)&&"function"==typeof o.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}(e,i,o,c)})),i.forEachGetter((function(t,n){!function(e,t,n,i){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(i.state,i.getters,e.state,e.getters)}}(e,a+n,t,c)})),i.forEachChild((function(i,r){ke(e,t,n.concat(r),i,o)}))}function _e(e,t){if(!e._makeLocalGettersCache[t]){var n={},i=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,i)===t){var r=o.slice(i);Object.defineProperty(n,r,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function De(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Fe(e,t,n){var i;return null!==(i=e)&&"object"==typeof i&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Oe="vuex:mutations",Te="vuex:actions",Ne="vuex",Ie=0;function Re(e,t){we({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:Oe,label:"Vuex Mutations",color:$e}),n.addTimelineLayer({id:Te,label:"Vuex Actions",color:$e}),n.addInspector({id:Ne,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===Ne)if(n.filter){var i=[];Pe(i,t._modules.root,n.filter,""),n.rootNodes=i}else n.rootNodes=[Ve(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===Ne){var i=n.nodeId;_e(t,i),n.state=function(e,t,n){t="root"===n?t:t[n];var i=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(i.length){var r=function(e){var t={};return Object.keys(e).forEach((function(n){var i=n.split("/");if(i.length>1){var o=t,r=i.pop();i.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[r]=Ue((function(){return e[n]}))}else t[n]=Ue((function(){return e[n]}))})),t}(t);o.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?Le(e):e,editable:!1,value:Ue((function(){return r[e]}))}}))}return o}((o=t._modules,(a=(r=i).split("/").filter((function(e){return e}))).reduce((function(e,t,n){var i=e[t];if(!i)throw new Error('Missing module "'+t+'" for path "'+r+'".');return n===a.length-1?i:i._children}),"root"===r?o:o.root._children)),"root"===i?t.getters:t._makeLocalGettersCache,i)}var o,r,a})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===Ne){var i=n.nodeId,o=n.path;"root"!==i&&(o=i.split("/").filter(Boolean).concat(o)),t._withCommit((function(){n.set(t._state.data,o,n.state.value)}))}})),t.subscribe((function(e,t){var i={};e.payload&&(i.payload=e.payload),i.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(Ne),n.sendInspectorState(Ne),n.addTimelineEvent({layerId:Oe,event:{time:Date.now(),title:e.type,data:i}})})),t.subscribeAction({before:function(e,t){var i={};e.payload&&(i.payload=e.payload),e._id=Ie++,e._time=Date.now(),i.state=t,n.addTimelineEvent({layerId:Te,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:i}})},after:function(e,t){var i={},o=Date.now()-e._time;i.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(i.payload=e.payload),i.state=t,n.addTimelineEvent({layerId:Te,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:i}})}})}))}var $e=8702998,Me={label:"namespaced",textColor:16777215,backgroundColor:6710886};function Le(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Ve(e,t){return{id:t||"root",label:Le(t),tags:e.namespaced?[Me]:[],children:Object.keys(e._children).map((function(n){return Ve(e._children[n],t+n+"/")}))}}function Pe(e,t,n,i){i.includes(n)&&e.push({id:i||"root",label:i.endsWith("/")?i.slice(0,i.length-1):i||"Root",tags:t.namespaced?[Me]:[]}),Object.keys(t._children).forEach((function(o){Pe(e,t._children[o],n,i+o+"/")}))}function Ue(e){try{return e()}catch(sV){return sV}}var Qe=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},He={namespaced:{configurable:!0}};He.namespaced.get=function(){return!!this._rawModule.namespaced},Qe.prototype.addChild=function(e,t){this._children[e]=t},Qe.prototype.removeChild=function(e){delete this._children[e]},Qe.prototype.getChild=function(e){return this._children[e]},Qe.prototype.hasChild=function(e){return e in this._children},Qe.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Qe.prototype.forEachChild=function(e){xe(this._children,e)},Qe.prototype.forEachGetter=function(e){this._rawModule.getters&&xe(this._rawModule.getters,e)},Qe.prototype.forEachAction=function(e){this._rawModule.actions&&xe(this._rawModule.actions,e)},Qe.prototype.forEachMutation=function(e){this._rawModule.mutations&&xe(this._rawModule.mutations,e)},Object.defineProperties(Qe.prototype,He);var je=function(e){this.register([],e,!1)};function ze(e,t,n){if(t.update(n),n.modules)for(var i in n.modules){if(!t.getChild(i))return;ze(e.concat(i),t.getChild(i),n.modules[i])}}je.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},je.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},je.prototype.update=function(e){ze([],this.root,e)},je.prototype.register=function(e,t,n){var i=this;void 0===n&&(n=!0);var o=new Qe(t,n);0===e.length?this.root=o:this.get(e.slice(0,-1)).addChild(e[e.length-1],o);t.modules&&xe(t.modules,(function(t,o){i.register(e.concat(o),t,n)}))},je.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],i=t.getChild(n);i&&i.runtime&&t.removeChild(n)},je.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Ke=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var i=e.strict;void 0===i&&(i=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new je(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var r=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(r,e,t)},this.commit=function(e,t,n){return s.call(r,e,t,n)},this.strict=i;var l=this._modules.root.state;ke(this,l,[],this._modules.root),Se(this,l),n.forEach((function(e){return e(t)}))},Ge={state:{configurable:!0}};Ke.prototype.install=function(e,t){e.provide(t||"store",this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&Re(e,this)},Ge.state.get=function(){return this._state.data},Ge.state.set=function(e){},Ke.prototype.commit=function(e,t,n){var i=this,o=Fe(e,t,n),r=o.type,a=o.payload,s={type:r,payload:a},l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,i.state)})))},Ke.prototype.dispatch=function(e,t){var n=this,i=Fe(e,t),o=i.type,r=i.payload,a={type:o,payload:r},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(sV){}var l=s.length>1?Promise.all(s.map((function(e){return e(r)}))):s[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(sV){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(sV){}t(e)}))}))}},Ke.prototype.subscribe=function(e,t){return Be(e,this._subscribers,t)},Ke.prototype.subscribeAction=function(e,t){return Be("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},Ke.prototype.watch=function(e,t,n){var i=this;return c.watch((function(){return e(i.state,i.getters)}),t,Object.assign({},n))},Ke.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Ke.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),ke(this,this.state,e,this._modules.get(e),n.preserveState),Se(this,this.state)},Ke.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete De(t.state,e.slice(0,-1))[e[e.length-1]]})),Ee(this)},Ke.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},Ke.prototype.hotUpdate=function(e){this._modules.update(e),Ee(this,!0)},Ke.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Ke.prototype,Ge);const qe={state:{clientHeight:window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,clientWidth:window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,mychartColor:{pie:["#FF8636","#028154","#FC635B","#FDBA4F","#436EFD","#7ACBBD","#6882FF","#819DE4"],bar:["#627AE1","#8CBBFF","#8CE8BB"],line:["#01332F","#627AE1","#ED6A4C"]},floorMap:{}},mutations:{setClientHeight(e){e.clientHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height},setClientWidth(e){e.clientWidth=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width},setMychartColor(e,t,n){let i=[];n&&n.forEach((e=>{e&&i.push(e)})),e.mychartColor[t]=i},setFloorMap(e,t){Object.assign(e.floorMap,t)}}};var We=new Ke({state:{},mutations:{},actions:{},modules:{app:qe}}),Ye=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n};var Xe=Ye({name:"ebutton",data:()=>({visible:!0,btn:{},colorStyle:{selected:"#2d8cf0",unselected:"#3f414d",disabled:"#c5c8ce"},mouseStyle:{usable:"cursor: pointer",disabled:"cursor:not-allowed"},iconStyle:{seletedSize:40,unseletedSize:30},divStyle:"cursor: pointer",disabled:!1,iconSize:30,fontStyle:"font-size: 10px;color:#3f414d",iconColor:"#3f414d"}),props:{config:{type:Object,default:null},amplify:{type:Boolean,default:!0},dynamic:{type:Boolean,default:!0},type:{type:String,default:""},size:{type:Number,default:30},color:{type:String,default:""},text:{type:String,default:""},fontsize:{type:String,default:"10px"},fontplacement:{validator:e=>_(e,["bottom","right"]),default:"bottom"}},created(){this.config?(this.btn=this.config,this.config.size&&(this.iconSize=this.config.size),this.config.color&&(this.iconColor=this.config.color)):(this.btn.iconcls=this.type,this.btn.text=this.text,this.iconSize=this.size,this.iconColor=this.color),this.setStyle("unselected")},methods:{doAction(e){this.disabled||this.$emit("click",e)},changeActive(){this.dynamic&&this.setStyle("selected")},removeActive(){this.dynamic&&this.setStyle("unselected")},setStyle(e){switch(e){case"selected":this.disabled||(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.selected,this.amplify&&(this.iconSize=this.iconStyle.seletedSize,this.iconColor=this.colorStyle.selected));break;case"unselected":this.disabled||(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.unselected,this.amplify&&(this.iconSize=this.iconStyle.unseletedSize,this.iconColor=this.colorStyle.unselected));break;case"disabled":this.disabled?(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.disabled,this.amplify&&(this.iconSize=this.iconStyle.unseletedSize,this.iconColor=this.colorStyle.disabled),this.divStyle=this.mouseStyle.disabled):(this.divStyle=this.mouseStyle.usable,this.setStyle("unselected"))}},setEnabled(e){this.disabled=e,this.setStyle("disabled")},setVisible(e){this.visible=e}}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("CommonIcon"),s=c.resolveComponent("Span"),l=c.resolveComponent("Col"),u=c.resolveComponent("Row");return o.visible?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(o.divStyle),onClick:t[0]||(t[0]=e=>r.doAction(o.btn.name)),onMouseover:t[1]||(t[1]=e=>r.changeActive(e)),onMouseout:t[2]||(t[2]=e=>r.removeActive(e))},[c.createVNode(u,{type:"flex",justify:"center"},{default:c.withCtx((()=>[c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(a,{type:o.btn.iconcls,size:o.iconSize,color:o.iconColor},null,8,["type","size","color"]),c.withDirectives(c.createVNode(s,{style:c.normalizeStyle(o.fontStyle)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.btn.text),1)])),_:1},8,["style"]),[[c.vShow,"right"===n.fontplacement&&void 0!==o.btn.text]])])),_:1})])),_:1}),c.withDirectives(c.createVNode(u,{type:"flex",justify:"center"},{default:c.withCtx((()=>[c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(s,{style:c.normalizeStyle(o.fontStyle)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.btn.text),1)])),_:1},8,["style"])])),_:1})])),_:1},512),[[c.vShow,"bottom"===n.fontplacement&&void 0!==o.btn.text]])],36)):c.createCommentVNode("",!0)}]]);const Je={name:"Toolbar",data:()=>({globalConfig:{moduleMethod:[]},btnList:[],myConfig:{spacing:16},modulecode:"",token:"",buttonSize:"default",btnShow:!0,showType:!0,visible:!0,showAddData:!1,showBatchAction:!1,vjustify:"center",defaultStatus:{N:["saveData"],V:["addData","editData","auditData","delData"],E:["addData","saveData","delData"],S:["addData","editData","auditData","delData","printData"],A:["addData","copyData","cancelData"],C:["addData","printData"],D:["addData"]},defaultRule:{billstatus:{Y:["addData","cancelData","printData"],N:["addData","editData","auditData","delData","printData"],C:["addData","printData"]}}}),props:{type:{validator:e=>_(e,["horizontal","vertical"]),default:"vertical"},config:{type:Object,default:()=>({})},amplify:{type:Boolean,default:!0},fontplacement:{validator:e=>_(e,["bottom","right"]),default:"right"},showback:{type:Boolean,default:!1},tooltype:{type:String,default:"form"},btntype:{validator:e=>_(e,["Button","Ebutton"]),default:"Ebutton"},moduleMethod:{type:Array,default:()=>[]},billmoduleid:{type:String,default:""},checkBtn:{type:Boolean,default:!1},row:{type:Object,default:()=>({})}},created(){this.init()},components:{Ebutton:Xe},methods:{init(){this.config&&(this.myConfig=Object.assign({},this.myConfig,this.config)),this.myConfig.items||(this.myConfig.items=[]),this.myConfig.buttonSize&&(this.buttonSize=this.myConfig.buttonSize),this.moduleMethod.length>0&&(this.globalConfig.moduleMethod=this.$Method.copy(this.moduleMethod)),this.filterBtn(),this.btnList.length>0?this.visible=!0:"batch"===this.tooltype?this.visible=this.showAddData:this.visible=!1,this.btnList.forEach((e=>{void 0===e.visible&&(e.visible=!0)}))},filterBtn(){this.checkBtn&&this.getModuleMethod(),this.filterBtnByToken()},getModuleMethod(){if(this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid")),this.billmoduleid&&(this.modulecode=this.billmoduleid),this.token=this.$Method.getUrlParam("token"),this.modulecode&&this.token){let e=this.getUserModuleMethod(this.modulecode);e&&(this.globalConfig.moduleMethod=e.modulemethod)}},filterBtnByToken(){let e=this.commonFilterBtn(),t=[],n=[],i=[];if(e.forEach((e=>{"addData"===e.name&&(this.showAddData=!0),"batch"===e.iconcls?i.push(e):"row"===e.iconcls?n.push(e):t.push(e)})),i.length>0&&(this.showBatchAction=!0),"batch"===this.tooltype)this.btnList=this.$Method.copy(i);else if("row"===this.tooltype)this.btnList=this.$Method.copy(n);else{if("right"===this.fontplacement&&(this.vjustify="start"),this.btnList=this.$Method.copy(t),this.isBillImport()){let e={};this.myConfig.importbtn&&"{}"!==JSON.stringify(this.myConfig.importbtn)?(e=Object.assign({},{iconcls:"_download",name:"downTemplate",text:this.$t("导入模版")},this.myConfig.backbtn),e.name="downTemplate"):e={iconcls:"_download",name:"downTemplate",text:this.$t("导入模版")},e.visible=!0,this.btnList.push(e)}if(this.showback){let e={};this.myConfig.backbtn&&"{}"!==JSON.stringify(this.myConfig.backbtn)?(e=Object.assign({},{iconcls:"_back",name:"back",text:this.$t("返回")},this.myConfig.backbtn),e.name="back"):e={iconcls:"_back",name:"back",text:this.$t("返回")},e.visible=!0,this.btnList.push(e)}this.initStatus()}},commonFilterBtn(){if(this.globalConfig.moduleMethod.length<=0)return this.myConfig.items;let e=[];this.globalConfig.moduleMethod.forEach((t=>{let n=this.myConfig.items.findIndex((e=>e.name===t.name));n>-1&&e.push(this.$Method.copy(this.myConfig.items[n]))}));let t=this.myConfig.items.findIndex((e=>"editRowForm"===e.name));return t>-1&&e.push(this.$Method.copy(this.myConfig.items[t])),e},initStatus(){this.myConfig.status?Object.keys(this.defaultStatus).forEach((e=>{void 0===this.myConfig.status[e]&&(this.myConfig.status[e]=[]);let t=this.myConfig.status[e].concat(this.defaultStatus[e]);this.myConfig.status[e]=this.uniqueArr(t)})):this.myConfig.status=this.$Method.copy(this.defaultStatus),this.myConfig.rule?Object.keys(this.defaultRule).forEach((e=>{this.myConfig.rule[e]&&Object.keys(this.defaultRule[e]).forEach((t=>{this.defaultStatus[e]?(void 0===this.myConfig.rule[e][t]&&(this.myConfig.rule[e][t]=[]),void 0===this.defaultStatus[e][t]&&(this.defaultStatus[e][t]=[])):(this.defaultStatus[e]={},this.defaultStatus[e][t]=[],void 0===this.myConfig.rule[e][t]&&(this.myConfig.rule[e][t]=[]));let n=this.myConfig.rule[e][t].concat(this.defaultStatus[e][t]);this.myConfig.rule[e][t]=this.uniqueArr(n)}))})):this.myConfig.rule=this.$Method.copy(this.defaultRule)},click(e){let t={};t.name=e,this.$emit("doAction",t)},changedStatusCommon(e){this.btnList.forEach((e=>{this.setReadOnly(e.name,!0)})),e||(e=[]),(e=e.concat(["back","downTemplate","editRowForm"])).forEach((e=>{this.setReadOnly(e,!1)}))},changedStatus(e){if(e){let t=this.myConfig.status[e];this.changedStatusCommon(t)}},isBillImport(){return this.btnList.some((e=>"billImport"===e.name))},gridChangedStatus(e,t){if(this.myConfig&&this.myConfig.rule&&this.myConfig.rule[e]){let n=this.myConfig.rule[e][t];this.changedStatusCommon(n)}},uniqueArr(e){let t=[];for(let n=0,i=e.length;n<i;n++){for(let t=n+1;t<i;t++)e[n]===e[t]&&(t=++n);t.push(e[n])}return t},action(e){let t={};t.name=e,this.$emit("doAction",t)},getType:e=>e.type?e.type:"text",setVisible(e,t,n){let i=this.btntype;if(n&&(i=n),"Ebutton"===i)this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setVisible(t);else{const n=this.btnList.findIndex((t=>t.name===e));if(n>-1){let e=this.$Method.copy(this.btnList[n]);e.visible=t,this.btnList.splice(n,1,e)}}},setReadOnly(e,t,n){let i=this.btntype;if(n&&(i=n),"Ebutton"===i)this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setEnabled(t);else{const n=this.btnList.findIndex((t=>t.name===e));if(n>-1){let e=this.$Method.copy(this.btnList[n]);e.disabled=t,this.btnList.splice(n,1,e)}}}},mounted(){let e=this;e.config.customInit&&e.config.customInit(e.row,e)}},Ze={key:0},et={key:0},tt={href:"javascript:void(0)"};var nt=Ye(Je,[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Ebutton"),s=c.resolveComponent("Button"),l=c.resolveComponent("Col"),u=c.resolveComponent("Row"),d=c.resolveComponent("CommonIcon"),h=c.resolveComponent("DropdownItem"),A=c.resolveComponent("DropdownMenu"),f=c.resolveComponent("Dropdown");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,["form"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[o.visible?(c.openBlock(),c.createElementBlock("div",Ze,["horizontal"===n.type?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"start",gutter:o.myConfig.spacing},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(l,{key:"btn_"+t},{default:c.withCtx((()=>["Ebutton"===n.btntype?(c.openBlock(),c.createBlock(a,{key:0,ref_for:!0,ref:e.name,config:e,onClick:r.click,amplify:n.amplify,fontplacement:n.fontplacement,dynamic:o.myConfig.btnDynamic},null,8,["config","onClick","amplify","fontplacement","dynamic"])):c.createCommentVNode("",!0),"Button"===n.btntype?(c.openBlock(),c.createBlock(s,{key:1,ref_for:!0,ref:e.name,onClick:t=>r.action(e.name),icon:e.iconcls,type:e.type,size:o.buttonSize,disabled:e.disabled},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["onClick","icon","type","size","disabled"])):c.createCommentVNode("",!0)])),_:2},1024)),[[c.vShow,e.visible]]))),128))])),_:1},8,["gutter"])):c.createCommentVNode("",!0),"vertical"===n.type?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(o.btnList,((e,t)=>(c.openBlock(),c.createBlock(u,{type:"flex",justify:o.vjustify,key:"btn_"+t,style:{"margin-top":"5px"}},{default:c.withCtx((()=>["Ebutton"===n.btntype?(c.openBlock(),c.createBlock(a,{key:0,ref_for:!0,ref:e.name,config:e,onClick:r.click,amplify:n.amplify,fontplacement:n.fontplacement,dynamic:o.myConfig.btnDynamic},null,8,["config","onClick","amplify","fontplacement","dynamic"])):c.createCommentVNode("",!0),"Button"===n.btntype?c.withDirectives((c.openBlock(),c.createBlock(s,{key:1,ref_for:!0,ref:e.name,onClick:t=>r.action(e.name),icon:e.iconcls,type:e.type,size:o.buttonSize},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["onClick","icon","type","size"])),[[c.vShow,e.visible]]):c.createCommentVNode("",!0)])),_:2},1032,["justify"])))),128)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),"row"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[o.visible?(c.openBlock(),c.createElementBlock("div",et,[o.showType?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"center",gutter:8},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(l,{key:"btn_"+t},{default:c.withCtx((()=>[!0===o.myConfig.icon?(c.openBlock(),c.createBlock(s,{key:0,size:"small",type:r.getType(e),icon:e.icon,"custom-icon":e.customIcon,onClick:t=>r.action(e.name)},null,8,["type","icon","custom-icon","onClick"])):(c.openBlock(),c.createBlock(s,{key:1,size:"small",type:r.getType(e),onClick:t=>r.action(e.name)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["type","onClick"]))])),_:2},1024)),[[c.vShow,e.visible]]))),128))])),_:1})):c.createCommentVNode("",!0),o.showType?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(f,{key:1,onOnClick:r.action},{list:c.withCtx((()=>[c.createVNode(A,null,{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(h,{key:"btndropdown_"+t,name:e.name},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["name"])),[[c.vShow,e.visible]]))),128))])),_:1})])),default:c.withCtx((()=>[c.createElementVNode("a",tt,[c.createTextVNode(c.toDisplayString(e.$t("操作"))+" ",1),c.createVNode(d,{type:"ios-arrow-down"})])])),_:1},8,["onOnClick"]))])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),"batch"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[o.visible?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"end",gutter:8},{default:c.withCtx((()=>[o.showAddData?(c.openBlock(),c.createBlock(l,{key:0},{default:c.withCtx((()=>[c.createVNode(s,{icon:"ios-add",onClick:t[0]||(t[0]=e=>r.action("addData"))},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.$t("新建")),1)])),_:1})])),_:1})):c.createCommentVNode("",!0),c.createVNode(l,null,{default:c.withCtx((()=>[o.showBatchAction?(c.openBlock(),c.createBlock(f,{key:0,onOnClick:r.action},{list:c.withCtx((()=>[c.createVNode(A,null,{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(h,{key:"dropbtn_"+t,name:e.name},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["name"])),[[c.vShow,e.visible]]))),128))])),_:1})])),default:c.withCtx((()=>[c.createVNode(s,null,{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.$t("批量操作"))+" ",1),c.createVNode(d,{type:"ios-arrow-down"})])),_:1})])),_:1},8,["onOnClick"])):c.createCommentVNode("",!0)])),_:1})])),_:1})):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)],512)),[[c.vShow,o.btnShow]])}]]),it={name:"size",data:()=>({calHeight:1,calWidth:1,adjustHeight:0,adjustWidth:0}),computed:{clientHeight(){return this.$Store.state.app.clientHeight},clientWidth(){return this.$Store.state.app.clientWidth},currentHeight(){let e=this.clientHeight;return this.calHeight&&(Number(this.calHeight)<=1?(e*=Number(this.calHeight),e=Number(e.toFixed(0))):e=this.calHeight),this.adjustHeight&&(e-=Number(this.adjustHeight)),e},currentWidth(){let e=this.clientWidth;return this.calWidth&&(Number(this.calWidth)<=1?(e*=Number(this.calWidth),e=Number(e.toFixed(1))):e=this.calWidth),this.adjustWidth&&(e-=Number(this.adjustWidth)),e}},methods:{setCalHeight(e){this.calHeight=e},setAdjustHeight(e){this.adjustHeight=e},setCalWidth(e){this.calWidth=e},setAdjustWidth(e){this.adjustWidth=e},setSizeConfig(e){e.height&&this.setCalHeight(e.height),e.width&&this.setCalWidth(e.width),e.adjustHeight&&this.setAdjustHeight(e.adjustHeight),e.adjustWidth&&this.setAdjustWidth(e.adjustWidth)}}};const ot={mixins:[it],data:()=>({globalConfig:{label:"",name:"",readOnly:!1,visible:!0,size:"default",valueChanged:"",placeholder:null,place:"",required:!1},myConfig:{},value:"",oldValue:"",hackReset:!0,showTooltip:!1,isEnter:!1}),props:{config:{type:Object,default:()=>{}},fatherValue:{type:[String,Number,Array],default:""},readOnly:{type:Boolean,default:!1}},created(){this.init()},methods:{init(){this.myConfig=Object.assign({},this.globalConfig,this.myConfig),this.config&&(this.myConfig=Object.assign({},this.myConfig,this.config)),this.customInit&&this.customInit()},_fatherValueToValue(e){return this.fatherValueToValue?this.fatherValueToValue(e):e},_valueToFatherValue(){let e=this.value;if(this.valueToFatherValue)return this.valueToFatherValue();{let t={};return t.value=e,t}},keyDown(e){let t=e+"KeyDown";this[t]&&this[t]()},enterKeyDown(){this.customEnterKeyDown&&this.customEnterKeyDown();let e=this;this.$nextTick((()=>{let t={};t.controlName=e.myConfig.name,e.myConfig.sname&&(t.controlName=e.myConfig.sname),t.name="enterKeyDown",e.$emit("doAction",t)}))},setFatherValue(e){let t=!0,n=this._valueToFatherValue();n.name=this.myConfig.name,this.myConfig.valueChanged&&(n.value!==this.oldValue||n.svalue!==this.oldSvalue||n.evalue!==this.oldEvalue?(t=this.myConfig.valueChanged(n),void 0===t&&(t=!0)):t=!1),t?(this.setFatherValueSuccess?this.setFatherValueSuccess(n):this.$emit("inputValue",n),this.$nextTick((()=>{this.isEnter&&(this.customEnterKeyDown?this.customEnterKeyDown(e):this.$parent.enterKeyDown&&this.$parent.enterKeyDown(),this.isEnter=!1)}))):this.setFatherValueFail?this.setFatherValueFail(e):this.$nextTick((()=>{this.value=this.oldValue}))},_setFatherValue(e){e||0===e||(e=this.myConfig.defaultValue),this.value=e,this.setFatherValue()},setPro(e){this.setCustomPro&&(e=this.setCustomPro(e)),e&&(this.myConfig=Object.assign({},this.myConfig,e))},setReadOnly(e){let t={};t.readOnly=e,!1===t.readOnly?!0!==this.config.readOnly&&this.setPro(t):this.setPro(t)},getPro(e){return this.myConfig[e]}},watch:{fatherValue:{handler(e){this.value=this._fatherValueToValue(e),this.oldValue=this.value,this.watchCustomFatherValue&&this.watchCustomFatherValue()},immediate:!0}}};var rt=Ye({name:"combobox",extends:ot,data:()=>({myConfig:{data:[],valueField:"code",textField:"name",maxTagCount:2,codeWithName:!0,defaultValue:"",filterable:!1,clearable:!0,readOnly:!1,showOptionGroup:!1,multiSelect:!1,editData:[],showNullItem:!1,filterData:null,transfer:!1}}),methods:{fatherValueToValue(e){return this.myConfig.multiSelect?e:e+""},watchCustomFatherValue(){let e={},t=!1;this.myConfig.multiSelect||""!==this.value?e.value=this.value:this.myConfig.showNullItem||1!==this.myConfig.data.length||(this.myConfig.required&&(this.myConfig.showOptionGroup?1===this.myConfig.data[0].data.length&&(this.value=this.myConfig.data[0].data[0][this.myConfig.valueField],t=!0):(this.value=this.myConfig.data[0][this.myConfig.valueField],t=!0)),e.value=this.value),this.oldValue=this.value,t&&this.$nextTick((()=>{e.name=this.myConfig.name,this.$emit("inputValue",e)}))},setPro(e){this.setCustomPro&&(e=this.setCustomPro(e)),e&&(this.myConfig=Object.assign({},this.myConfig,e))},isOptionShow(e){return!!this.myConfig.readOnly||e.visible},setCustomPro(e){return void 0!==e.data&&e.data.length>0&&(this.editData=[],this.myConfig.showOptionGroup?e.forEach((e=>{this.$Method.copy(e).data=[],e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e.label=e[this.myConfig.textField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)}))})):e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e.label=e[this.myConfig.textField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)}))),e},customInit(){this.editData=[],this.myConfig.data&&this.myConfig.data.length>0&&(this.myConfig.showOptionGroup?this.myConfig.data.forEach((e=>{let t=this.$Method.copy(e);t.data=[],e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e[this.myConfig.textField]?e.label=e[this.myConfig.textField]:e.label=e[this.myConfig.valueField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)})),this.editData.push(t)})):this.myConfig.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e[this.myConfig.textField]?e.label=e[this.myConfig.textField]:e.label=e[this.myConfig.valueField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)})))},onOpenChange(e){this.config.onOpenChange&&this.config.onOpenChange(e)},doDictGroupKey(e){if(!this.config.dictgroupkey)return!0;let t=this.config.dictgroupkey.split(",");if(e.dgroup){return t.findIndex((t=>t===e.dgroup))>-1}return!0},setFocus(e){e?(this.$refs.myControl.$refs.reference.focus(),this.$refs.myControl.isFocused=!0):(this.$refs.myControl.$refs.reference.blur(),this.$refs.myControl.isFocused=!1)}}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Option"),s=c.resolveComponent("OptionGroup"),l=c.resolveComponent("Select");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,[c.createVNode(l,{ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),transfer:o.myConfig.transfer,multiple:o.myConfig.multiSelect,"max-tag-count":o.myConfig.maxTagCount,size:o.myConfig.size,disabled:o.myConfig.readOnly,clearable:o.myConfig.clearable,onOnChange:e._setFatherValue,filterable:o.myConfig.filterable,placeholder:o.myConfig.placeholder,onOnOpenChange:r.onOpenChange},{default:c.withCtx((()=>[o.myConfig.showOptionGroup?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(o.myConfig.data,((e,t)=>(c.openBlock(),c.createBlock(s,{label:e.label,key:"option_"+t},{default:c.withCtx((()=>[o.myConfig.readOnly?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(e.data,(e=>(c.openBlock(),c.createBlock(a,{value:e[o.myConfig.valueField],key:e[o.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(e.data,(e=>c.withDirectives((c.openBlock(),c.createBlock(a,{value:e[o.myConfig.valueField],key:e[o.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])),[[c.vShow,e.visible]]))),128))])),_:2},1032,["label"])))),128)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[o.myConfig.readOnly?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(o.myConfig.data,(e=>(c.openBlock(),c.createBlock(a,{value:e[o.myConfig.valueField],key:e[o.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(o.myConfig.data,(e=>c.withDirectives((c.openBlock(),c.createBlock(a,{value:e[o.myConfig.valueField],key:e[o.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])),[[c.vShow,e.visible]]))),128))],64))])),_:1},8,["modelValue","transfer","multiple","max-tag-count","size","disabled","clearable","onOnChange","filterable","placeholder","onOnOpenChange"])],512)),[[c.vShow,o.myConfig.visible]])}]]),at={name:"formpcompro",data:()=>({}),props:{config:{type:Object,default:null},dictData:{type:Object,default:null}},methods:{}};const st={name:"baseform",mixins:[at],data:()=>({form:{},oldForm:{},initForm:{},items:[],formRules:{},updateConfig:[],errorFlag:!1,style:"",myConfig:{lineNum:1,itemSpan:8,labelWidth:80,labelPosition:"right",showLabel:!0,inline:!0,isFull:!0}}),methods:{initFormItemCol(e){let t=this.myConfig.itemSpan,n=this.items[e];return"Divider"===n.type?t=24:void 0!==n.colNum&&(t=Number(n.colNum)>Number(this.myConfig.lineNum)?this.myConfig.itemSpan*Number(this.myConfig.lineNum):this.myConfig.itemSpan*Number(n.colNum)),t>24&&(t=24),t},initFormItem(e){if(e.status=!0,e.valueChanged&&(e.valueChanged=this.valueChanged),e.searchBefore&&(e.searchBefore=this.searchBefore),e.setDataBefore&&(e.setDataBefore=this.setDataBefore),e.onAddTag&&(e.onAddTag=this.onAddTag),e.onDelTag&&(e.onDelTag=this.onDelTag),e.onSearch&&(e.onSearch=this.onSearch),e.onLinkTo&&(e.onLinkTo=this.onLinkTo),this.dictData){let t="";e.dictkey&&(t=e.dictkey),e.customDictkey&&(t=e.customDictkey),t&&void 0===e.data&&(e.data=this.dictData[t])}return this.setFormItemCommonPro(e),e},init(){let e=this.$Method.copy(this.config);this.myConfig=Object.assign({},this.myConfig,e);let t=24/Number(this.myConfig.lineNum);this.myConfig.itemSpan=Number(t.toFixed(0)),24===this.myConfig.itemSpan&&(this.myConfig.inline=!1),this.initForm={},this.myConfig.items&&this.myConfig.items.forEach((e=>{let t=this.initFormItem(e);this.items.push(t)})),this.customInit&&this.customInit(),Object.assign(this.form,this.initForm),Object.assign(this.oldForm,this.form)},setData(e){e&&(this.$refs.form.resetFields(),"I"===e.flag?this.form=Object.assign({},this.initForm,e):(this.items.forEach((t=>{t.name&&void 0===e[t.name]&&(e[t.name]=""),t.sname&&void 0===e[t.sname]&&(e[t.sname]=""),t.ename&&void 0===e[t.ename]&&(e[t.ename]=""),t.textName&&void 0===e[t.textName]&&(e[t.textName]="")})),this.form=Object.assign({},{},e)),this.oldForm=this.$Method.copy(this.form))},isChange(){return JSON.stringify(this.form)!==JSON.stringify(this.oldForm)||!(!this.form.flag||"I"!==this.form.flag&&"U"!==this.form.flag)},input(e){let t={};e.name&&(t[e.name]=e.value),e.textName&&(t[e.textName]=e.text),e.sname&&(t[e.sname]=e.svalue),e.ename&&(t[e.ename]=e.evalue),this.form=Object.assign({},this.form,t),this.$emit("inputValue",e)},validatorIsNull(e,t,n){this.isArrayFn(this.form[e.field])?0===this.form[e.field].length?n(new Error("")):n():this.form[e.field]||0===this.form[e.field]?n():n(new Error(""))},isArrayFn:e=>"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e),GetConfigIndex(e){return this.config.items.findIndex((t=>t.name===e||t.sname===e||t.ename===e))},valueChanged(e){if(e.form=this.$Method.copy(this.form),e.formObject=this,e.sname){return this.config.items.find((t=>t.sname===e.sname)).valueChanged(e)}return this.config.items.find((t=>t.name===e.name)).valueChanged(e)},searchBefore(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.myConfig.name)).searchBefore(e)},onAddTag(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onAddTag(e)},onDelTag(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onDelTag(e)},onSearch(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onSearch(e)},onLinkTo(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onLinkTo(e)},setDataBefore(e,t){let n={};n.data=e,n.form=this.$Method.copy(this.form),n.formObject=this;return this.config.items.find((e=>e.name===t.myConfig.name)).setDataBefore(n,t)},checkValidate(){this.$refs.form[0]?this.$refs.form.forEach((e=>{e.validate?this.errorFlag=!1:this.errorFlag=!0})):this.$refs.form.validate((e=>{this.errorFlag=!e}))},isError(){return this.errorFlag},getTrigger(e){let t="blur";switch(e&&(e=e.toLowerCase()),e){case"combobox":case"tagbox":case"daterangebox":t="change"}return t},getValue(e){return this.form[e]},setValue(e,t){let n={};n[e]=void 0===t?"":t,this.form=Object.assign({},this.form,n)},setValues(e){for(let t in e)void 0===e[t]&&(e[t]="");this.form=Object.assign({},this.form,e)},setFormReadOnly(e){if(!this.myConfig.items||0===this.myConfig.items.length)return!1;this.myConfig.items.forEach((t=>{let n="";if(t.name?n=t.name:t.sname&&(n=t.sname),e)this.setReadOnly(n,e);else if(this.myConfig.cellbeginedit){let t={};t.name=n,t.form=this.$Method.copy(this.form),this.myConfig.cellbeginedit(t)?this.setReadOnly(n,e):this.setReadOnly(n,!e)}else this.setReadOnly(n,e)}))},setPro(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setPro(t)},getPro(e,t){if(this.$refs[e]&&this.$refs[e][0])return this.$refs[e][0].getPro(t)},setReadOnly(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setReadOnly&&this.$refs[e][0].setReadOnly(t)},getData(){const e=this.$Method.copy(this.form);return this.doDetialItem(e)},doDetialItem(e){return this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.forEach((t=>{if("PopTagBox"===t.type){let n=[],i=this.oldForm[t.name],o=this.$Method.copy(e[t.name]);i&&i.length>0&&i.forEach((e=>{if(e.ph_key)if(o&&o.length>0){let t=o.findIndex((t=>t.ph_key===e.ph_key));if(t>-1)o.splice(t,1);else{let t=this.$Method.copy(e);t.flag="D",n.push(t)}}else{let t=this.$Method.copy(e);t.flag="D",n.push(t)}})),o&&o.length>0&&o.forEach((e=>{e.flag="I",n.push(e)})),e[t.name]=n}})),e},setCommonRequired(e,t,n){let i="";if(n.ename&&(i=n.ename),i&&(void 0===this.formRules[i]?!0===t&&(this.formRules[i]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(n.type)}]):t||delete this.formRules[i]),void 0===this.formRules[e]){if(!0===t)return this.formRules[e]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(n.type)}],!0}else if(!t)return delete this.formRules[e],!0;return!1},setRequired(e,t){let n=!1;const i=this.items.findIndex((t=>t.name===e||t.sname===e));if(i>-1&&(n=this.setCommonRequired(e,t,this.items[i]),n)){let e=Object.assign({},this.items[i],{required:t,status:!1});this.items.splice(i,1,e),this.$nextTick((()=>{this.items[i].status=!0}))}},updateCommonConfig(e,t){let n={},i=this.items.findIndex((t=>t.name===e||t.sname===e));if(i>-1){let o=!1;for(let e in t)if(t[e]!==this.items[i][e]){o=!0;break}if(o){t.status=!1,n.index=i,n.name=e;let o=this.$Method.copy(this.items[i]);n.config=Object.assign({},o,t),this.setCommonRequired(e,t.required,n.config)}}return n},updateItemConfig(e,t){let n=this.updateCommonConfig(e,t);if(n&&n.index>-1){let e=[];e.push(n),this.updateConfigReset(0,e)}},updateConfigReset(e,t){let n=t[e].index;this.items.splice(n,1,t[e].config),e+1<t.length?this.$nextTick((()=>{this.items[n].status=!0,this.$nextTick((()=>{this.$refs[t[e].name]&&this.$refs[t[e].name].length>0&&this.$refs[t[e].name][0].reset(),this.updateConfigReset(e+1,t)}))})):this.$nextTick((()=>{this.items[n].status=!0,this.$nextTick((()=>{this.$refs[t[e].name]&&this.$refs[t[e].name].length>0&&this.$refs[t[e].name][0].reset()}))}))},updateItemsConfig(e){let t=[];e&&(e.forEach((e=>{let n=this.updateCommonConfig(e.name,e);n&&n.index>-1&&t.push(n)})),t.length>0&&this.updateConfigReset(0,t))},clearData(){this.$refs.form.resetFields(),this.form=Object.assign({},{},this.initForm),this.oldForm=this.$Method.copy(this.form)},getFormItemStyle(e){let t={},n=this.myConfig.isFull;if(void 0!==e.isFull&&(n=e.isFull),n)t.width="100%";else{let e=this.myConfig.labelWidth+100;t["min-width"]=e+"px"}return void 0!==e.style&&(t=Object.assign({},t,e.style)),t},setFormItemCommonPro(e){void 0===e.isFull&&(e.isFull=!0),e.name&&this.setFormItemValue(e.name,e,!0),e.sname&&this.setFormItemValue(e.sname,e,!0),e.ename&&this.setFormItemValue(e.ename,e,!0),e.textName&&this.setFormItemValue(e.textName,e,!1)},setFormItemValue(e,t,n){if(void 0!==t.defaultValue)this.initForm[e]=t.defaultValue;else if("NumberBox"===t.type||"NumberRangeBox"===t.type){let n="";void 0!==t.min&&(n=t.min),void 0!==t.smin&&(n=t.smin),void 0===t.smin&&void 0!==t.emin&&(n=t.emin),this.initForm[e]=n,t.defaultValue=n,!1===t.boundaryValue&&(this.initForm[e]="",t.defaultValue="")}else"PopTagBox"===t.type?this.initForm[e]=[]:this.initForm[e]="";n&&(t.required?void 0===this.formRules[e]&&(this.formRules[e]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(t.type)}]):delete this.formRules[e])},doAction(e){this[e.name]&&this[e.name](e)},enterKeyDown(e){let t=this.findNextItems(e.controlName);this.setFoucs(e.controlName,!1),this.$nextTick((()=>{let e=this;setTimeout((()=>{e.setFoucs(t,!0)}),200)}))},setFoucs(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setFocus&&this.$refs[e][0].setFocus(t)},setHideDividerValue(e){this.$refs.hidedivider&&this.$refs.hidedivider[0]&&this.$refs.hidedivider[0].setHide(e)},findNextItems(e){let t="",n="",i=!1;return this.myConfig.items.some((o=>{let r=o.name;if(o.sname&&(r=o.sname),"wRichTextBox"!==o.type&&"RichTextBox"!==o.type&&"PictureBox"!==o.type&&"VideoBox"!==o.type&&this.$refs[r]&&this.$refs[r][0]&&!1!==this.$refs[r][0].getPro("visible")&&!0!==this.$refs[r][0].getPro("readOnly")&&(t||(t=r),i))return n=r,!0;e===r&&(i=!0)})),n||(n=t),n}}},lt={extends:st,data:()=>({editIndex:-1,editKey:""}),created(){this.init()},props:{valueData:{type:Object,default:()=>({})},vstyle:{type:String,default:""},showRowAction:{type:Boolean,default:!1}},methods:{customInit(){this.form=Object.assign({},this.form,this.valueData),this.style=this.vstyle},keyDownEvent(){this.cancelCellEditing()},formatValue(e,t,n){return this.$Method.formatValue(e,t,n)},EditCell(e){if(e.readOnly)return this.editKey="",void this.cancelCellEditing();if(this.showRowAction)this.cancelCellEditing();else if(this.editKey!==e.name)if(this.config.cellbeginedit){let t={};if(t.index=this.editIndex,t.column=e,t.row=this.valueData,this.config.cellbeginedit){if(!this.config.cellbeginedit(t))return void this.cancelCellEditing();this.editKey=e.name}}else this.editKey=e.name},addRowInfo(e,t){e.rowinfo={},e.rowinfo.column=t,e.rowinfo.index=this.editIndex,e.rowinfo.row=this.valueData,e.rowinfo.gridObject=this.config.getGridObject(),e.rowinfo.formObject=this},valueChanged(e){const t=this.config.items.find((t=>t.name===e.name));return this.addRowInfo(e,t),t.valueChanged(e)},searchBefore(e){const t=this.config.items.find((t=>t.name===e.config.name));return this.addRowInfo(e,t),t.searchBefore(e)},setDataBefore(e,t){const n=this.config.items.find((e=>e.name===t.myConfig.name));let i={};return i.data=e,this.addRowInfo(i,n),n.setDataBefore(i,t)},setEditIndex(e){this.editIndex=e},getEditIndex(){return this.editIndex},cancelCellEditing(){this.editKey=""}},watch:{valueData:{handler(e){this.form=Object.assign({},this.form,e)},deep:!0,immediate:!0}}},ct={key:0,style:{color:"#348eed"}},ut={key:1},dt=["onClick"];var ht=Ye(lt,[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("ControlBox"),s=c.resolveComponent("ShowText"),l=c.resolveComponent("FormItem"),u=c.resolveComponent("Col"),d=c.resolveComponent("Row"),h=c.resolveComponent("Form");return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(e.style)},[c.createVNode(h,{ref:"form",model:e.form,rules:e.formRules,"label-width":e.myConfig.labelWidth,inline:e.myConfig.inline,id:e.myConfig.name,onKeydown:c.withKeys(c.withModifiers(r.keyDownEvent,["prevent"]),["enter"])},{default:c.withCtx((()=>[c.createVNode(d,{type:"flex",justify:"start"},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.items,((t,n)=>c.withDirectives((c.openBlock(),c.createBlock(u,{key:"form_"+n,span:e.initFormItemCol(n),style:c.normalizeStyle({height:t.height})},{default:c.withCtx((()=>[c.createVNode(l,{label:t.label?e.$t(t.label):t.label,prop:t.name||t.sname,style:{width:"100%"},"show-message":!1},{label:c.withCtx((()=>[!0===t.required?(c.openBlock(),c.createElementBlock("span",ct,c.toDisplayString(t.label?e.$t(t.label):t.label),1)):(c.openBlock(),c.createElementBlock("span",ut,c.toDisplayString(t.label?e.$t(t.label):t.label),1))])),default:c.withCtx((()=>[c.createElementVNode("div",{onClick:e=>r.EditCell(t),style:{width:"100%",height:"100%"}},[o.editKey===t.name?(c.openBlock(),c.createBlock(a,{key:0,config:t,valueData:e.form,onInputValue:e.input,style:{width:"100%"},editIndex:o.editIndex},null,8,["config","valueData","onInputValue","editIndex"])):(c.openBlock(),c.createBlock(s,{key:1,style:{display:"inline-block",height:"32px","line-height":"32px"},label:r.formatValue(e.form[t.name],e.form,t),contentAlign:"left"},null,8,["label"]))],8,dt)])),_:2},1032,["label","prop"])])),_:2},1032,["span","style"])),[[c.vShow,!1!==t.visible]]))),128))])),_:1})])),_:1},8,["model","rules","label-width","inline","id","onKeydown"])],4)}]]);const At={mixins:[it],data(){return{globalConfig:{cellbeginedit:"",showHeader:!0,showIndex:!0,showStripe:!1,showBorder:!0,showCheckBox:!1,showCondition:!1,checkByHighlight:!0,readOnly:!1,showPage:!0,tableSize:"default",pageSize:null,pageShowElevator:!0,pageShowTotal:!0,pageShowSizer:!0,height:null,manualLoad:!0,multiSelect:!1,operFixedFlag:!0,gridType:"viewGrid",dynamicHeight:!1,generalOrientation:!1,showSummary:!1,showSumGroup:!1,sumText:this.$t("合计"),pageSizeNum:"",adjustHeight:0,items:[],pageConfig:{page_no:1,page_size:100,total_results:0,pageSizeList:[20,50,100,200,500,1e3]},moduleMethod:[],headClassName:""},tempData:[],data:[],addData:[],delData:[],columns:[],checkInfo:[],checkAddInfo:[],expand:{},dictkey:"",currentDictData:{},editRowIndex:"",editRowFlag:!0,loading:!1,conditionSearchParam:{},showRowAction:!1,modulecode:"",myToolConfig:{},showMoreBtn:!1,initData:[],showDelRow:!1,showCondition:!0,delRowAction:[{iconcls:"row",name:"delRow",text:this.$t("删除"),type:"text"}],operFixedFlag:!0,editIndex:-1,editKey:"",newRow:{},summaryColumn:[],total_summary:{},extraHeight:0,outsideHeight:0,tableColumns:[],soltTableColumns:[],sumGroupNum:0,culPage:1}},props:{config:{type:Object,default:()=>({})},dictData:{type:Object,default:null},toolConfig:{type:Object,default:()=>({})},isPop:{type:Boolean,default:!1}},created(){this.init(),this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid"))},computed:{makeTableColumns(){return this.initColumn()},tableHeight(){if(this.myConfig.dynamicHeight)return null;{let e=this.currentHeight;return this.extraHeight&&(e-=Number(this.extraHeight)),this.outsideHeight&&(e-=Number(this.outsideHeight)),this.myConfig.showSummary&&(e-=50),e}},tableMaxHeight(){if(this.myConfig.dynamicHeight){let e=this.currentHeight-this.extraHeight-this.outsideHeight;return this.myConfig.showSummary&&(e-=50),e}return null}},methods:{init(){if(this.myConfig=Object.assign({},this.globalConfig,this.myConfig),this.config){let e=this.$Method.copy(this.config);for(let t in e)if("pageConfig"===t)for(let n in e[t])this.myConfig.pageConfig[n]=e[t][n];else this.myConfig[t]=e[t]}if(this.dictData?this.currentDictData=this.dictData:this.currentDictData=[],void 0!==this.myConfig.showDelRow&&(this.showDelRow=this.myConfig.showDelRow),void 0!==this.myConfig.showCondition&&(this.showCondition=this.myConfig.showCondition),this.myToolConfig=this.$Method.copy(this.toolConfig),!this.isPop){let e=0;this.myToolConfig.items&&this.myToolConfig.items.forEach((t=>{"row"===t.iconcls&&e++})),this.showMoreBtn=e>2,this.showRowAction=e>0,this.showRowAction&&(this.myConfig.showCheckBox||this.myConfig.multiSelect&&(this.myConfig.showCheckBox=!0))}this.operFixedFlag=this.myConfig.operFixedFlag,this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.some((e=>{if(!0===e.resizable)return this.myConfig.showBorder=!0,!0})),this.setSizeConfig(this.myConfig),this.customInit&&this.customInit()},initCheckColumn(e){if(this.myConfig.showCheckBox){let t={type:"selection",align:"center",key:"selection",width:40};t.multiSelect=this.myConfig.multiSelect,e.push(t)}},isToolBar(e){let t=!1;return this.myToolConfig&&this.myToolConfig.items&&this.myToolConfig.items.some((n=>{if(n.iconcls===e)return t=!0,!0})),t},initIndexColumn(e){if(this.myConfig.showIndex)if(this.myConfig.showSumGroup){let e={label:this.$t("行号"),name:"sumindex",type:"TextBox",align:"center",width:45};"sumindex"!==this.myConfig.items[0].name&&this.myConfig.items.splice(0,0,e)}else{let t={type:"index",key:"index",width:45};t.title=this.$t("行号"),t.align="center",void 0!==this.myConfig.headClassName&&(t.className=this.myConfig.headClassName),t.indexMethod=this.indexRender,void 0!==this.myConfig.indexConfig&&Object.assign(t,this.myConfig.indexConfig),e.push(t)}},initOperColumn(e){if(this.showRowAction||this.showDelRow){let t={};t.title=this.$t("操作"),void 0!==this.myConfig.headClassName&&(t.className=this.myConfig.headClassName),t.key="action",t.render=this.actionRender,this.operFixedFlag&&(t.fixed="right"),t.width=120,1===this.myToolConfig.items.length&&(t.width=80),t.align="center",this.customInitOperColumn?this.customInitOperColumn(t,e):e.push(t)}},onColumnWidthResize(e,t,n){let i={};i.newWidth=e,i.oldWidth=t,i.column=n,this.$emit("onColumnWidthResize",i)},initExpandColumn(e){this.expand.items=[];let t=[];for(let n=0;n<e.length;n++)!0===e[n].isExpand?this.expand.items.push(e[n]):t.push(e[n]);if(this.expand.items.length>0){let n={type:"expand",width:50,render:this.expandRendel};const i=t.findIndex((e=>"index"===e.type));if(i>-1)t.splice(i+1,0,n);else{const e=t.findIndex((e=>"selection"===e.type));e>-1?t.splice(e+1,0,n):t.splice(0,0,n)}e=t}},initColumn(){let e={},t=[],n=[];if(!this.myConfig.items||0===this.myConfig.items.length)return n;this.initCheckColumn(n),this.initOperColumn(n),this.initIndexColumn(n);const i=this.myConfig.items.length;for(let r=0;r<i;r++)!1!==this.myConfig.items[r].visible?this.initCommonColumn(this.myConfig.items[r],n,t,e):void 0!==this.myConfig.items[r].defaultValue&&(this.myConfig.items[r].name&&(e[this.myConfig.items[r].name]=this.myConfig.items[r].defaultValue),this.myConfig.items[r].sname&&(e[this.myConfig.items[r].sname]=this.myConfig.items[r].defaultValue),this.myConfig.items[r].ename&&(e[this.myConfig.items[r].ename]=this.myConfig.items[r].defaultValue));this.initExpandColumn(n);let o={};return o.columns=n,o.newRow=e,o.summaryColumn=t,o},initCommonColumn(e,t,n,i){let o=this.$Method.copy(e);if(o.contentAlign||(o.contentAlign=o.align),o.title=o.label?this.$t(o.label):o.label,o.headClassName?o.className=o.headClassName:void 0!==this.myConfig.headClassName&&(o.className=this.myConfig.headClassName),e.children&&e.children.length>0){o.children=[];for(let t=0;t<e.children.length;t++)this.initCommonColumn(e.children[t],o.children,n,i);t.push(o)}else o=this.initColumnConfig(o,n,i),t.push(o)},initColumnConfig(e,t,n){let i="";return e.type&&(i=e.type.toLowerCase()),e.key=e.name,Number(e.width)?e.width=Number(e.width):delete e.width,this.setColumnPro(e,i,t,n),"render"!==i&&void 0===e.render&&this.setCustomColumn&&this.setCustomColumn(e),"checkbox"!==i&&"picturebox"!==i&&"videobox"!==i||(e.render=this.commonRendel,"picturebox"===i&&(void 0===e.height&&(e.height=40),e.isGrid=!0),"videobox"===i&&void 0===e.height&&(e.height=60),this.myConfig.readOnly?e.readOnly=!0:!0!==e.readOnly&&(e.readOnly=!1)),e.required&&(e.className||(e.className="efuture-grid-head-required")),e.valueChanged&&(e.valueChanged=this.valueChanged),e.searchBefore&&(e.searchBefore=this.searchBefore),e.setDataBefore&&(e.setDataBefore=this.setDataBefore),e.onLinkTo&&(e.onLinkTo=this.onLinkTo),"timepicbox"!==i&&"datebox"!==i&&"daterangebox"!==i&&"colorbox"!==i&&"combobox"!==i||(e.transfer=!0),e},setColumn(e){let t=this.$Method.copy(this.myConfig.items[e]);t.title=t.label?this.$t(t.label):t.label;let n="";t.type&&(n=t.type.toLowerCase()),n&&(t.key=t.name,Number(t.width)?t.width=Number(t.width):delete t.width,this.setColumnPro(t,n),"render"!==n&&void 0===t.render&&this.setCustomColumn&&this.setCustomColumn(t),"checkbox"!==n&&"picturebox"!==n&&"videobox"!==n||(t.render=this.commonRendel,"picturebox"===n&&void 0===t.height&&(t.height=40),"videobox"===n&&void 0===t.height&&(t.height=60),this.myConfig.readOnly?t.readOnly=!0:t.readOnly=!1),t.required&&(t.className||(t.className="efuture-grid-head-required")),t.contentAlign||t.align||(t.contentAlign=t.align),this.myConfig.items[e].valueChanged&&(t.valueChanged=this.valueChanged),this.myConfig.items[e].searchBefore&&(t.searchBefore=this.searchBefore),this.myConfig.items[e].setDataBefore&&(t.setDataBefore=this.setDataBefore),this.myConfig.items[e].onLinkTo&&(t.onLinkTo=this.onLinkTo),void 0===t.formatValue&&void 0!==this.myConfig.formatValue&&(t.formatValue=this.myConfig.formatValue),this.columns.push(t))},setColumnPro(e,t,n,i){if(e.place="grid",!0===e.sortable?e.sortable="custom":"default"===e.sortable&&(e.sortable=!0),"numberbox"===t?(e.contentAlign||(e.contentAlign="right"),e.align||(e.align="right"),e.summary&&void 0!==n&&n.push(e.name)):"datebox"===t||"checkbox"===t||"picturebox"===t||"videobox"===t?this.myConfig.generalOrientation&&"datebox"===t?(e.contentAlign||(e.contentAlign="left"),e.align||(e.align="left")):(e.contentAlign||(e.contentAlign="center"),e.align||(e.align="center")):(e.contentAlign||(e.contentAlign="left"),e.align||(e.align="left")),"combobox"===t&&void 0===e.data){let t=e.dictkey;e.customDictkey&&(t=e.customDictkey),e.data=this.currentDictData[t]}if(void 0!==e.defaultValue)i[e.name]=e.defaultValue;else if("numberbox"===t||"numberrangebox"===t){let t="";void 0!==e.min&&(t=e.min),void 0!==e.smin&&(t=e.smin),void 0===e.smin&&void 0!==e.emin&&(t=e.emin),e.defaultValue=t,void 0!==i&&(i[e.name]=t,!1===e.boundaryValue&&(i[e.name]="",e.defaultValue=""))}else void 0!==i&&("poptagbox"===e.type?i[e.name]=[]:i[e.name]="")},expandRendel(e,t){return e("div",[e(c.resolveComponent("ExpandRow"),{config:this.expand,valueData:t.row,vstyle:"margin-right: 120px",showRowAction:!1,onInputValue:e=>{this.editIndex=t.index,this.input(e)}})])},indexRender(e,t){let n=t+1;return this.myConfig.showPage&&(n+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size),this.myConfig.indexMethod?this.myConfig.indexMethod(e,n):n},actionRender(e,t){return e("div",[e(c.resolveComponent("Toolbar"),{config:this.myToolConfig,tooltype:"row",moduleMethod:this.globalConfig.moduleMethod,row:t.row,onDoAction:e=>{e.rowinfo=t,"editRowForm"===e.name?this.initRowForm&&this.initRowForm(e):"delRow"===e.name?this.delRow&&this.delRow(t.index):this.$emit("doAction",e)}})])},remove(e){let t=this.data.findIndex((t=>t._customIndex===e));if(-1===t&&(t=e),t>-1){if(void 0===this.data[t].flag||"U"===this.data[t].flag){this.data[t].flag="D";const e=this.$Method.copy(this.data[t]);this.delData.push(e)}this.data.splice(t,1)}this.customRemove&&this.customRemove(t)},setEdit(e){this.editRowIndex===e?this.editRowIndex=null:this.editRowIndex=e},dbclick(e){this.$emit("dbclick",e)},click(e){this.$emit("rowclick",e),this.$emit("click",e)},setData(e){this.data=[],this.data=e,this.initData=this.$Method.copy(this.data),this.delData=[],this.checkInfo=[],this.cancelCellEditing&&this.cancelCellEditing()},getData(){return this.$Method.copy(this.data)},clearData(){this.editIndex=-1,this.editKey="",this.data=[],this.delData=[],this.initData=[],this.checkInfo=[],this.addData=[],this.checkAddInfo=[],this.conditionSearchParam={},this.myConfig.pageConfig.page_no=1,this.myConfig.pageConfig.total_results=0,this.columnWidth={},this.customClearData&&this.customClearData()},updataRow(e,t){let n=Object.assign({},this.data[e],t);this.data.splice(e,1,n),this.tempData.splice(e,1,n)},getModuleMethod(){if(this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid")),this.token=this.$Method.getUrlParam("token"),this.modulecode&&this.token){let e=this.getUserModuleMethod();e&&(this.globalConfig.moduleMethod=e.modulemethod)}},getSelection(){return this.$refs.table.getSelection()},input(e){let t=this.editIndex;if(-1===t){if(void 0===e.editIndex)return;t=e.editIndex}let n={};if(void 0!==e.value&&(n[e.name]=e.value),void 0!==e.text&&(n[e.textName]=e.text),void 0!==e.svalue&&(n[e.sname]=e.svalue),void 0!==e.evalue&&(n[e.ename]=e.evalue),void 0===this.data[t].flag&&(n.flag="U"),e.customRows&&e.customRows.length>0){let t=this;e.customRows.forEach((e=>{if(void 0!==e.changeIndex){let n=Object.assign({},t.data[e.changeIndex],e);void 0===t.data[e.changeIndex].flag&&(n.flag="U"),t.data.splice(e.changeIndex,1,n)}})),e.customRows.forEach((e=>{if(void 0===e.changeIndex){let n=Object.assign({},{},e);n.flag="I",t.data.push(n)}}))}else{let e=Object.assign({},this.data[t],n);this.$nextTick((()=>{this.data.splice(t,1,e)}))}},updateColPro(e,t){const n=this.myConfig.items.findIndex((t=>e===t.name));if(n>-1){let e=Object.assign({},this.myConfig.items[n],t);this.myConfig.items.splice(n,1,e)}},setRowCheck(e,t){if(this.myConfig.multiSelect){if(e>-1){let n=Object.assign({},this.data[e],{});n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t),this.myConfig.onSetRowCheckBefore?this.myConfig.onSetRowCheckBefore(e,t)&&this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)})):this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}}else{let n=this.$Method.copy(this.data);n.forEach(((n,i)=>{i===e?this.myConfig.onSetRowCheckBefore?this.myConfig.onSetRowCheckBefore(e,t)&&(n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t)):(n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t)):(n._checked=!1,n._highlight=!1)})),this.$nextTick((()=>{this.data=n}))}},setAllRowCheck(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._checked=e,this.myConfig.checkByHighlight&&(t._highlight=e)})),this.$nextTick((()=>{this.data=t}))},setRowDisabled(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._disabled=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}},setAllRowDisabled(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._disabled=e})),this.$nextTick((()=>{this.data=t}))},setRowHighlight(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._highlight=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}},setAllRowHighlight(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._highlight=e})),this.$nextTick((()=>{this.data=t}))},commonRendel(e,t){return e("div",[e(c.resolveComponent("ControlBox"),{config:t.column,valueData:t.row,readOnly:"D"===t.row.flag,autofocus:this.editIndex===t.index&&this.editKey===t.column.key,onInputValue:e=>{this.editIndex=t.index,this.editKey=t.column.key,this.input(e)},onDoAction:e=>{this.doAction(e)}})])},setExtraHeight(){let e=0;this.$refs.head&&(e=this.$refs.head.offsetHeight),this.$refs.page&&(e+=this.$refs.page.offsetHeight),this.extraHeight=e},setOutsideHeight(e){this.outsideHeight=e},getSoltTableColumns(e,t){if(e)if(e instanceof Array)e.forEach((e=>{this.getSoltTableColumns(e,t)}));else if(e.children&&e.children.length>0)e.children.forEach((e=>{this.getSoltTableColumns(e,t)}));else{let n=Object.assign({},e);"action"!==n.key&&"actionbtn"!==n.key&&t.push(n)}},findColumnConfig(e,t){if(e){if(t instanceof Array){let n=!1,i={};return t.some((t=>{let o=this.findColumnConfig(e,t);if(o)return n=!0,i=o,!0})),!!n&&i}if(t.children&&t.children.length>0){let n=!1,i={};return t.children.some((t=>{let o=this.findColumnConfig(e,t);if(o)return n=!0,i=o,!0})),!!n&&i}return e===t.name&&t}},openHelp(){window.open(this.curHelpUrl)},initScrollLeft(){this.$refs.table&&this.$refs.table.$refs.body&&(this.$refs.table.$refs.body.scrollLeft=0)}},watch:{data(e){this.tempData=D(e)},makeTableColumns(e){this.total_summary={},this.newRow=D(e.newRow),this.summaryColumn=D(e.summaryColumn),this.tableColumns=D(e.columns);let t=[];this.getSoltTableColumns(e.columns,t),this.soltTableColumns=t}},mounted(){}},ft={name:"viewgridbase",extends:At,data(){return{myConfig:{resources:"",method:"",response:"",searchParam:null,readOnly:!0,multiSelect:!0,bindSearchParam:"ph_key",showAll:!1,exportMethod:"exportExcel",separator:"::",exportType:"2",overrideData:"",headStyle:"padding-bottom: 10px;padding-top: 10px;",multiSelectGrid:!1,multiGridCol:11,multiGridTitle:this.$t("已选择"),gridTitle:this.$t("待选择"),highLightRow:!0,dynamicColumnFlag:!1,dynameicColumnConfig:{groupColumns:[],dynameicColumnName:"",dynameicColumnValue:"",dynameicColumnValueTitle:"",dynameicColumnValuePro:{},dynameicColumnSumLable:this.$t("动态合计")}},multiGridCol:11,gridCol:11,editRowFlag:!1,singleData:{},searchBeforeSearchParam:{},order_field:"",order_direction:"",rightActive:!1,leftActive:!1,multiSelectData:[],multiTableColumns:[],dynamicColumnItems:[],tempMultiSelectData:[],multiSoltTableColumns:[],showHelpBtn:!1}},computed:{makeTableColumns(){return this.myConfig.dynamicColumnFlag?[]:this.initColumn()}},methods:{customInit(){this.isPop&&(this.myConfig.showCheckBox||this.myConfig.multiSelect&&(this.myConfig.showCheckBox=!0),this.myConfig.multiGridCol&&(this.multiGridCol=Number(this.myConfig.multiGridCol),this.gridCol=22-this.multiGridCol),this.myConfig.tableSize="small",this.myConfig.headStyle="",this.myConfig.showBorder=!1,this.myConfig.headStyle="",this.myConfig.pageSize="small",void 0===this.myConfig.height&&(this.myConfig.height=360),this.myConfig.pageSizeNum||(this.myConfig.pageConfig.page_size=50)),this.myConfig.pageSizeNum&&(this.myConfig.pageConfig.page_size=Number(this.myConfig.pageSizeNum)),this.myConfig.items.forEach((e=>{void 0===e.resizable&&(e.resizable=!0),e.width||e.minWidth||(e.minWidth=60)})),this.myConfig.multiSelectGrid&&(this.multiTableColumns=this.multiInitColumn()),"billGrid"===this.myConfig.gridType&&this.getModuleMethod(),this.myConfig.dynamicColumnFlag&&(this.myConfig.showPage=!1);this.curHelpUrl=this.OmdUrl.getCurHelpUrl(this),this.curHelpUrl?this.showHelpBtn=!0:this.showHelpBtn=!1},conditionAction(e){let t=[];switch(e.action){case"condition_search":e.para&&(this.conditionSearchParam=this.$Method.copy(e.para)),this.refurbish();break;case"condition_clear":this.conditionSearchParam={};break;case"condition_ok":this.myConfig.multiSelect?t=this.getSelection():this.singleData.currentRow&&t.push(this.singleData.currentRow),0===t.length?this.alert(this.$t("请选择")):(e.rows=t,this.$emit("conditionAction",e));break;case"condition_cancel":this.$emit("conditionAction",e)}},getSearchParam(e,t){let n=Object.assign({},this.myConfig.searchParam,this.searchBeforeSearchParam);if(n||(n={}),"report"===this.myConfig.response)n=Object.assign({},n,this.conditionSearchParam);else{let e={};for(let t in n)if(this.conditionSearchParam[t]){e[t]={$and:[]};let i={};i[t]=n[t],e[t].$and.push(i);let o={};o[t]=this.conditionSearchParam[t],e[t].$and.push(o)}n=Object.assign({},n,this.conditionSearchParam);for(let t in e)n.$and=this.$Method.copy(e[t].$and),delete n[t]}return this.myConfig.showPage&&(t?this.myConfig.pageConfig.page_no?n.page_no=this.myConfig.pageConfig.page_no:n.page_no=1:(this.myConfig.pageConfig.page_no=1,n.page_no=1,this.culPage=1),n.page_size=this.myConfig.pageConfig.page_size),this.order_field&&(n.order_field=this.order_field,this.order_direction&&(n.order_direction=this.order_direction)),e&&(n=Object.assign({},n,e)),this.myConfig.dynamicColumnFlag||this.summaryColumn&&this.summaryColumn.length>0&&(n.summary_fld=this.summaryColumn.join(",")),this.myConfig.showSumGroup&&(n.sumgroups=this.myConfig.sumgroups),this.myConfig.overrideSearchParam?this.myConfig.overrideSearchParam(n):n},setWhereParam(e){this.conditionSearchParam=this.$Method.copy(e)},refurbish(e,t){this.loading=!0;let n=this;this.singleData={},n.data=[],n.asyncPost(n.myConfig.resources,n.myConfig.method,n.getSearchParam(e,t),(function(e){n.dynamicInitData=e,n.myConfig.dynamicColumnFlag?n.makeDynamicColumn():n.refurbishSucceedDefault(),n.loading=!1}),(function(e){n.loading=!1,n.$nextTick((()=>{setTimeout((()=>{n.alert(e,null,2)}),1e3)}))}))},changePage(e){let t=this.myConfig.pageConfig.page_no;this.myConfig.refurbishCheck?this.myConfig.refurbishCheck(e,t,this.callBackChangePage):(this.myConfig.pageConfig.page_no=e,this.refurbish(null,!0))},refurbishSucceedDefault(){if(this.sumGroupNum=0,this.dynamicInitData&&this.dynamicInitData[this.myConfig.response]){this.myConfig.showAll&&this.myConfig.rowAll&&this.dynamicInitData[this.myConfig.response].splice(0,0,this.myConfig.rowAll);let e=[];e=this.myConfig.overrideData?this.myConfig.overrideData(this.dynamicInitData[this.myConfig.response]):this.dynamicInitData[this.myConfig.response],this.dynamicInitData.sumgroups&&(e=this.doSumgroups(e,this.dynamicInitData.sumgroups)),this.data=e,this.tempData=this.$Method.copy(e)}void 0!==this.dynamicInitData.total_results&&(this.myConfig.pageConfig.total_results=Number(this.dynamicInitData.total_results)),void 0!==this.dynamicInitData.total_summary?(this.total_summary=Object.assign({},{},this.dynamicInitData.total_summary),this.myConfig.showSummary||Object.assign(this.myConfig,{showSummary:!0})):this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1})},callBackChangePage(e,t,n){e?(this.myConfig.pageConfig.page_no=t,this.refurbish(null,!0)):this.$nextTick((()=>{this.myConfig.pageConfig.page_no=n,this.myConfig.showPage=!1,this.myConfig=Object.assign({},this.myConfig),this.$nextTick((()=>{this.myConfig.showPage=!0,this.myConfig=Object.assign({},this.myConfig)}))}))},callBackChangePageSize(e,t,n){e?(this.myConfig.pageConfig.page_size=t,this.refurbish(null,!0)):this.$nextTick((()=>{this.myConfig.pageConfig.page_size=n,this.myConfig.showPage=!1,this.myConfig=Object.assign({},this.myConfig),this.$nextTick((()=>{this.myConfig.showPage=!0,this.myConfig=Object.assign({},this.myConfig)}))}))},changePageSize(e){let t=this.myConfig.pageConfig.page_size;this.myConfig.refurbishCheck?this.myConfig.refurbishCheck(e,t,this.callBackChangePageSize):(this.myConfig.pageConfig.page_size=e,this.data&&this.data.length>0&&this.refurbish(null,!0))},sortChagne(e){this.order_field="",this.order_direction="";let t=[],n=[];if("normal"!==e.order){let i=t.findIndex((t=>t===e.key));i>-1?n.splice(i,1,e.order):(t.push(e.key),n.push(e.order))}t.length>0&&(this.order_field=t.join(),this.order_direction=n.join()),this.data&&this.data.length>0&&this.refurbish()},onCurrentChange(e,t){this.singleData={},this.singleData.currentRow=e,this.singleData.oldCurrentRow=t,this.myConfig.onSingleChange&&this.myConfig.onSingleChange(),this.myConfig.showCheckBox&&(this.myConfig.onSetRowCheck?this.myConfig.onSetRowCheck(e._customIndex,!0):this.setRowCheck(e._customIndex,!0))},onSelect(e,t){this.myConfig.onSelect&&this.myConfig.onSelect(e,t)},onSelectCancel(e,t){this.myConfig.onSelectCancel&&this.myConfig.onSelectCancel(e,t)},OnSelectionChange(e){this.$nextTick((()=>{this.myConfig.onSelectionChange&&this.myConfig.onSelectionChange(e),e&&e.length>0?this.leftActive=!0:this.leftActive=!1;let t=this.$Method.copy(this.data),n=!1;t.forEach(((t,i)=>{n=!1,e.forEach((e=>{if(i===e._customIndex)return n=!0,!0})),t._checked=n})),this.data=t,this.tempData=this.$Method.copy(t)}))},OnMultiSelectionChange(e){this.$nextTick((()=>{let t=this.$Method.copy(this.tempMultiSelectData),n=!1;t.forEach(((t,i)=>{n=!1,e.forEach((e=>{if(i===e._customIndex)return n=!0,!0})),t._checked=n})),this.tempMultiSelectData=t,e&&e.length>0?this.rightActive=!0:this.rightActive=!1}))},removeRow(e){this.data.splice(e,1)},doBatchAction(e){if("addData"!==e.name){let t=this.getSelection();if(0===t.length)return void this.alert(this.$t("请至少选择一行"));e.data=t}this.$emit("doAction",e)},add(){let e={name:"addData"};this.$emit("doAction",e)},setSearchBeforeSearchParam(e){this.searchBeforeSearchParam=Object.assign({},{},e)},clearSearchBeforeSearchParam(){this.searchBeforeSearchParam={}},popValueChanged(e){let t=[],n=this,i=Object.assign({},n.getSearchParam(),e);return n.synchroPost(n.myConfig.resources,n.myConfig.method,i,(function(e){e&&e[n.myConfig.response]&&(t=e[n.myConfig.response])}),null),t},getTotalCount(){let e="";return void 0!==this.myConfig.pageConfig.total_results&&(e=this.myConfig.pageConfig.total_results),e},export(e,t){if(0==this.data.length)return void this.alert(this.$t("请先查询数据"));let n=this.getSearchParam();this.OmdUrl.maxRowNum&&(n.maxrownum=this.OmdUrl.maxRowNum),this.OmdUrl.maxDataNum&&(n.maxdatanum=this.OmdUrl.maxDataNum);let i=this.getModulecode();i&&(n.modulecode=i);let o={dictdata:{}};n.fields=this.$Method.getGridField(this.myConfig.items,this.myConfig.separator,this.dictData,o.dictdata),n.fields||(n.fields="");let r=this.getTotalCount();r&&(n.fields+=",totalCount"+this.myConfig.separator+r),i&&(n.fields+=",modulecode"+this.myConfig.separator+i);let a=this.myConfig.exportMethod;e&&(a="asyncExport");let s=this.myConfig.resources.replace("rest",a),l=this;const c=this.zip(JSON.stringify(o.dictdata));n.dictdata=encodeURIComponent(c),e?this.asyncExport(s,this.myConfig.method,n,t):this.doExportExcel(s,this.myConfig.method,n,this.myConfig.exportType,l)},zip(e){let t=d.gzip(e,{to:"string"});return btoa(t)},asyncExport(e,t,n,i){this.synchroPost(e,t,n,(function(e){"1"===e.flag&&(i?i():this.alert(this.$t("文件正在生成,请稍后")))}),null)},initAsynExportConfig(e,t,n){for(let i=0;i<e.length;i++){let o=this.$Method.copy(e[i]),r=o.label;if(!1!==o.visible&&!1!==o.isExport&&(o.name&&(o.label=t+(r?this.$t(r):r),n.push(o)),o.children)){let e=t+"("+(r?this.$t(r):r)+")";this.initAsynExportConfig(o.children,e,n)}}},setRowHighlight(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._highlight=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n),this.myConfig.multiSelect||(this.singleData.currentRow=this.$Method.copy(this.data[e]))}))}},getSelection(){return!1===this.myConfig.multiSelect?this.singleData.currentRow?[this.singleData.currentRow]:[]:this.myConfig.multiSelectGrid?this.$Method.copy(this.multiSelectData):this.$refs.table.getSelection()},setSelection(e){this.myConfig.multiSelectGrid&&(this.multiSelectData=[],this.$nextTick((()=>{this.multiSelectData=e,this.tempMultiSelectData=this.$Method.copy(this.multiSelectData)})))},moveToLeft(){let e=this.$refs.multiSelectTable.getSelection();e&&e.length>0&&e.forEach((e=>{let t=this.multiSelectData.findIndex((t=>t[this.myConfig.responseId]===e[this.myConfig.responseId]));t>-1&&this.multiSelectData.splice(t,1)})),this.tempMultiSelectData=this.$Method.copy(this.multiSelectData),this.rightActive=!1},moveToRight(){let e=this.$refs.table.getSelection();e&&e.length>0&&e.forEach((e=>{if(this.myConfig.multiCheck)this.myConfig.multiCheck(this.multiSelectData,e)&&(delete e._customIndex,delete e._checked,this.multiSelectData.push(e));else{-1===this.multiSelectData.findIndex((t=>t[this.myConfig.responseId]===e[this.myConfig.responseId]))&&(delete e._customIndex,delete e._checked,this.multiSelectData.push(e))}})),this.tempMultiSelectData=this.$Method.copy(this.multiSelectData)},multiInitColumn(){let e=[],t=this.myConfig.items;if(this.myConfig.multiItems&&(t=this.myConfig.multiItems),!t||0===t.length)return e;this.initCheckColumn(e),this.initMultiIndexColumn(e);const n=t.length;for(let o=0;o<n;o++)!1!==t[o].visible&&this.initCommonColumn(t[o],e);this.initExpandColumn(e),this.initOperColumn(e);let i=[];return this.getSoltTableColumns(e,i),this.multiSoltTableColumns=i,e},customClearData(){this.multiSelectData=[],this.rightActive=!1,this.leftActive=!1,this.myConfig.dynamicColumnFlag&&(this.tableColumns=[],this.soltTableColumns=[],this.newRow={},this.total_summary={},this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1}))},clearCondition(){this.$refs.condition&&this.$refs.condition.clear&&this.$refs.condition.clear()},clearCurrentRow(){this.$refs.table&&this.$refs.table.clearCurrentRow()},delRow(e){this.data.splice(e,1),this.tempData=this.data},updataRow(e,t){let n=Object.assign({},this.data[e],t);this.data.splice(e,1,n),this.tempData=this.data},initMultiIndexColumn(e){let t={type:"index",key:"index",width:45};t.title=this.$t("行号"),t.align="center",e.push(t)},makeDynamicColumn(){let e=[];if(this.tableColumns=[],this.soltTableColumns=[],this.total_summary={},this.dynamicInitData&&this.dynamicInitData[this.myConfig.response]){e=this.$Method.copy(this.dynamicInitData[this.myConfig.response]);let t=[];t=this.$Method.copy(this.myConfig.dynameicColumnConfig.groupColumns);let n=[];this.myConfig.dynameicColumnConfig.dynameicColumnName&&(n=this.myConfig.dynameicColumnConfig.dynameicColumnName.split(","));let i=[];this.myConfig.dynameicColumnConfig.dynameicColumnValue&&(i=this.myConfig.dynameicColumnConfig.dynameicColumnValue.split(","));let o=[];this.myConfig.dynameicColumnConfig.dynameicColumnValueTitle&&(o=this.myConfig.dynameicColumnConfig.dynameicColumnValueTitle.split(","));let r=[];n.forEach((e=>{let t={};t.name=e,r.push(t)}));let a={},s={},l=0;e.forEach((e=>{let o="";t.forEach((t=>{o=o+e[t]+"-"})),o&&(o=o.substring(0,o.length-1));let c="",u="";n.forEach(((t,i)=>{c=c+e[t]+"-",r[i][e[t]]||(r[i][e[t]]={},r[i][e[t]].fatherId=u,r[i][e[t]].label=e[t]),u=e[t],i===n.length-1&&(r[i][e[t]].id=c.substring(0,c.length-1))})),c&&(c=c.substring(0,c.length-1)),a[o]||(a[o]={},a[o].data={},t.forEach((t=>{a[o].data[t]=e[t]})),a[o].columns={}),a[o].columns[c]||(i.length>1?(a[o].columns[c]={},i.forEach((t=>{a[o].columns[c][t]=e[t]}))):a[o].columns[c]=e[this.myConfig.dynameicColumnConfig.dynameicColumnValue]),s[c]||(s[c]={},s[c].name="dy_col_"+l,i.length>1?(s[c].sum={},i.forEach((t=>{s[c].sum[t]=e[t]}))):s[c].sum=0,l++),i.length>1?i.forEach((t=>{s[c].sum[t]=Number(s[c].sum[t])+Number(e[t])})):s[c].sum=Number(s[c].sum)+Number(e[this.myConfig.dynameicColumnConfig.dynameicColumnValue])}));let c=[];for(let e in a){let t={};Object.assign(t,a[e].data);let n=0;for(let o in s)i.length>1?void 0!==a[e].columns[o]?i.forEach((i=>{let r=s[o].name+"_"+i;t[r]=a[e].columns[o][i],n+=Number(t[r])})):i.forEach((e=>{let i=s[o].name+"_"+e;t[i]=0,n+=Number(t[i])})):void 0!==a[e].columns[o]?(t[s[o].name]=a[e].columns[o],n+=Number(t[s[o].name])):(t[s[o].name]=0,n+=Number(t[s[o].name]));t.dynamic_sum=n,c.push(t)}let u=[];this.makeDynamicColumnConfig(r,0,"",u,s,i,o);let d={};this.myConfig.dynameicColumnConfig.dynameicColumnSumLable?d.label=this.myConfig.dynameicColumnConfig.dynameicColumnSumLable:d.label=this.$t("动态合计"),d.type="NumberBox",d.contentAlign="right",d.summary=!0,d.name="dynamic_sum";let h=this.$Method.getTextWidth(d.label);d.width=h,Object.assign(d,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro),u.push(d);let A=this.myConfig.items.concat(u);this.dynamicColumnConfig=this.$Method.copy(A),this.initDynamicColumn(A);let f={},p=0;for(let e in s)i.length>1?i.forEach((t=>{let n=s[e].name+"_"+t;f[n]=s[e].sum[t],p+=Number(s[e].sum[t])})):(f[s[e].name]=s[e].sum,p+=Number(s[e].sum));f.dynamic_sum=p;let g=[];this.summaryColumn.forEach((e=>{void 0===f[e]&&g.push(e)})),g.length>0&&c.forEach((e=>{g.forEach((t=>{f[t]||(f[t]=0),f[t]=f[t]+Number(e[t])}))})),this.data=c,this.tempData=this.$Method.copy(c),this.total_summary=Object.assign({},{},f),this.myConfig.showSummary||Object.assign(this.myConfig,{showSummary:!0})}else this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1})},initDynamicColumn(e){let t={},n=[],i=[];this.initCheckColumn(i),this.initOperColumn(i),this.initIndexColumn(i);const o=e.length;for(let a=0;a<o;a++)!1!==e[a].visible?this.initCommonColumn(e[a],i,n,t):void 0!==e[a].defaultValue&&(e[a].name&&(t[e[a].name]=e[a].defaultValue),e[a].sname&&(t[e[a].sname]=e[a].defaultValue),e[a].ename&&(t[e[a].ename]=e[a].defaultValue));this.total_summary={},this.newRow=D(t),n.push("dynamic_sum"),this.summaryColumn=D(n),this.tableColumns=D(i);let r=[];this.getSoltTableColumns(i,r),this.soltTableColumns=r,this.dynamicColumnItems=e},makeDynamicColumnConfig(e,t,n,i,o,r,a){let s=e[t];if(t===e.length-1)for(let l in s){if("name"===l)continue;let e={};if(e.label=s[l].label,r.length>1)e.align="center",e.children=[],r.forEach(((t,n)=>{let i={type:"NumberBox",align:"center",contentAlign:"right",summary:!0};Object.assign(i,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro),i.label=a[n]?this.$t(a[n]):a[n];let r=this.$Method.getTextWidth(i.label);i.width=r,i.name=o[s[l].id].name+"_"+t,e.children.push(i)}));else{e.type="NumberBox",e.align="center",e.contentAlign="right",e.summary=!0;let t=this.$Method.getTextWidth(e.label);e.width=t,o[s[l].id]&&(e.name=o[s[l].id].name),Object.assign(e,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro)}n?s[l].fatherId===n&&(i.push(e),i.sort(((e,t)=>e>t))):(i.push(e),i.sort(((e,t)=>e>t)))}else for(let l in s){if("name"===l)continue;let c={};c.label=s[l].label,c.align="center",n?s[l].fatherId===n&&(c.children=[],this.makeDynamicColumnConfig(e,t+1,l,c.children,o,r,a),i.push(c),i.sort(((e,t)=>e>t))):(c.children=[],this.makeDynamicColumnConfig(e,t+1,l,c.children,o,r,a),i.push(c),i.sort(((e,t)=>e>t)))}},handleSummary({columns:e}){let t={};for(let o in this.newRow)t[o]={key:o,value:""};e.findIndex((e=>"index"===e.type))>-1&&(t.index={key:"index",value:""}),e.findIndex((e=>"selection"===e.type))>-1&&(t.selection={key:"selection",value:""});let n=[];n=this.myConfig.dynamicColumnFlag?this.dynamicColumnItems:this.config.items;for(let o in this.total_summary){let e={};if(this.findItemByName(n,o,e),e.name){let n=this.total_summary[o];void 0!==e.format&&(n=this.$Method.formatNumber(n,e.format,e.notzero)),t[o]={key:o,value:n}}}let i=this.findFirst(e);return t[i]={key:i,value:this.myConfig.sumText},this.myConfig.customSummary?this.myConfig.customSummary(t):t},findFirst(e){let t="";return e.some((e=>{if("selection"!==e.key&&"index"!==e.key&&"sumindex"!==e.key)return t=e.name,!0})),t},findItemByName(e,t,n){if(e instanceof Array){let i=!1;return e.some((e=>{if(e.children&&e.children.length>0){if(i=this.findItemByName(e.children,t,n),i)return!0}else if(e.name&&e.name===t)return Object.assign(n,e),i=!0,!0})),i}return!(!e.name||e.name!==t)&&(Object.assign(n,e),!0)},dynamicExportExcel(){let e=[];this.myConfig.dynameicColumnConfig.dynameicColumnName&&(e=this.myConfig.dynameicColumnConfig.dynameicColumnName.split(","));let t=e.length,n=this.$Method.getUrlParam("modulecode");n||(n=this.$Method.getUrlParam("billmoduleid"));let i=this.$Method.formatDate(new Date,"yyyyMMddhhmmss")+this.$t("({count}条).xlsx",{count:this.data.length});n&&(i=n+"_"+i);let o=this.$Method.copy(this.data);this.dynamicColumnConfig.forEach((e=>{if("ComboBox"===e.type){let t="code",n="name";e.valueField&&(t=column.valueField),e.textField&&(n=column.textField),o.forEach((i=>{if(i[e.name]&&e.data){let o=e.data.findIndex((n=>n[t]===i[e.name]));o>-1&&(!1===e.codeWithName?i[e.name]=e.data[o][n]:i[e.name]="["+e.data[o][t]+"]"+e.data[o][n])}}))}}));let r=[];this.initAsynExportConfig(this.dynamicColumnConfig,"",r),this.$Method.exportExcelStyle(r,o,t,i)},formatValue(e,t){let n="",i=this.$Method.copy(this.tempData[e]);t.name&&(n=i[t.name]);let o=t,r=this.$Method.formatValue(n,i,o),a={};return a.value=n,a.row=i,a.config=o,a.valueFormat=r,t.formatValue?t.formatValue(a):this.myConfig.formatValue?this.myConfig.formatValue(a):r},formatMulValue(e,t){let n="",i=this.$Method.copy(this.tempMultiSelectData[e]);t.name&&(n=i[t.name]);let o=t;return this.$Method.formatValue(n,i,o)},setCustomColumn(e){e.slot=e.key},onLinkTo(e){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),t.onLinkTo(e)},addRowInfo(e,t){let n=e.rowIndex;e.rowinfo={},e.rowinfo.column=t,e.rowinfo.index=n,n>-1&&(e.rowinfo.row=this.data[n]);e.rowinfo.gridObject=this},doSumgroups(e,t){let n=[];if(t.forEach((t=>{if(t.data&&t.data.length>0){let i=t.group.split(","),o="",r="";e.forEach(((e,a)=>{if(r="",i.forEach((t=>{r+=e[t]})),o||(o=r),o!==r){let e=t.data.find((e=>{let t="";return i.forEach((n=>{t+=e[n]})),t===o})),s={};if(s.index=a,s.sum=e,t.showgroup){let e=t.showgroup.split(",");s.showgroup=e}s.group=i,n.push(s),o=r}}))}})),n.length>0){let t=[];return e.forEach(((e,i)=>{let o=i+1;this.myConfig.showPage&&(o+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size),e.sumindex=o+"";let r=n.find((e=>e.index===i));r?(this.myConfig.customSummaryGroup&&(r=this.myConfig.customSummaryGroup(r)),r.showgroup&&r.group.forEach((e=>{-1===r.showgroup.findIndex((t=>e===t))&&(r.sum[e]="")})),r.sum.sumindex="",t.push(r.sum),t.push(e)):t.push(e)})),t}return e}},mounted(){this.observer=E.default(),this.$refs.head&&this.observer.listenTo(this.$refs.head,this.setExtraHeight),this.$refs.page&&this.observer.listenTo(this.$refs.page,this.setExtraHeight)},beforeUnmount(){this.$refs.head&&this.observer.removeListener(this.$refs.head,this.setExtraHeight),this.$refs.page&&this.observer.removeListener(this.$refs.page,this.setExtraHeight)}},pt={ref:"head"},gt={key:0},mt={key:0},yt={ref:"page",name:"page"},vt={key:0,style:{background:"#eee","padding-top":"5px"}},Ct=["textContent"],bt=["textContent"],wt={ref:"page",name:"page"},xt={key:0},Bt={key:1,ref:"page",style:{background:"#eee","padding-top":"5px"}};var Et=Ye({name:"viewgrid",extends:ft,mounted(){}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("ConditionBox"),s=c.resolveComponent("Col"),l=c.resolveComponent("Toolbar"),u=c.resolveComponent("CommonIcon"),d=c.resolveComponent("Tooltip"),h=c.resolveComponent("Row"),A=c.resolveComponent("ShowText"),f=c.resolveComponent("Table"),p=c.resolveComponent("Page"),g=c.resolveComponent("Card"),m=c.resolveComponent("Button");return c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",pt,[e.$slots.header?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(e.myConfig.headStyle)},[c.renderSlot(e.$slots,"header")],4)):(c.openBlock(),c.createElementBlock("div",{key:1,style:c.normalizeStyle(e.myConfig.headStyle)},[e.showCondition?(c.openBlock(),c.createElementBlock("div",gt,["billGrid"===e.myConfig.gridType?(c.openBlock(),c.createBlock(h,{key:0,gutter:4},{default:c.withCtx((()=>[c.createVNode(s,{span:"18"},{default:c.withCtx((()=>[c.createVNode(a,{ref:"condition",config:e.myConfig,onConditionAction:e.conditionAction,dictData:e.dictData,modelType:"billSearch"},null,8,["config","onConditionAction","dictData"])])),_:1}),c.createVNode(s,{span:"6"},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",gutter:8},{default:c.withCtx((()=>[c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(l,{config:e.myToolConfig,onDoAction:e.doBatchAction,tooltype:"batch",moduleMethod:e.globalConfig.moduleMethod},null,8,["config","onDoAction","moduleMethod"])])),_:1}),e.showHelpBtn?(c.openBlock(),c.createBlock(s,{key:0},{default:c.withCtx((()=>[c.createElementVNode("a",{href:"#",onClick:t[0]||(t[0]=c.withModifiers(((...t)=>e.openHelp&&e.openHelp(...t)),["prevent"]))},[c.createVNode(d,{content:e.$t("帮助中心"),placement:"left"},{default:c.withCtx((()=>[c.createVNode(u,{size:"32",color:"#2d8cf0",type:"md-help-circle"})])),_:1},8,["content"])])])),_:1})):c.createCommentVNode("",!0),e.modulecode?(c.openBlock(),c.createBlock(s,{key:1},{default:c.withCtx((()=>[c.createVNode(d,{content:e.modulecode,placement:"left"},{default:c.withCtx((()=>[c.createVNode(u,{size:"32",color:"#2d8cf0",type:"ios-information-circle-outline"})])),_:1},8,["content"])])),_:1})):c.createCommentVNode("",!0)])),_:1})])),_:1})])),_:1})):(c.openBlock(),c.createBlock(h,{key:1},{default:c.withCtx((()=>[c.createVNode(s,{span:"24"},{default:c.withCtx((()=>[c.createVNode(a,{ref:"condition",config:e.myConfig,onConditionAction:e.conditionAction,dictData:e.dictData,isPop:e.isPop},null,8,["config","onConditionAction","dictData","isPop"])])),_:1})])),_:1}))])):c.createCommentVNode("",!0)],4))],512),e.myConfig.multiSelectGrid?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(h,{type:"flex",justify:"center",align:"middle"},{default:c.withCtx((()=>[c.createVNode(s,{span:e.gridCol},{default:c.withCtx((()=>[c.createVNode(g,{padding:0,bordered:!1},{title:c.withCtx((()=>[c.createElementVNode("span",{textContent:c.toDisplayString(e.myConfig.gridTitle)},null,8,Ct)])),default:c.withCtx((()=>[c.createVNode(f,{ref:"table","row-class-name":e.myConfig.rowClassName,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary,loading:e.loading,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.tableColumns,data:e.tempData,onOnSortChange:e.sortChagne,onOnCurrentChange:e.onCurrentChange,"highlight-row":e.myConfig.highLightRow,onOnRowDblclick:e.dbclick,onOnSelect:e.onSelect,onOnSelectCancel:e.onSelectCancel,onOnSelectionChange:e.OnSelectionChange,onOnRowClick:e.click,onOnColumnWidthResize:e.onColumnWidthResize},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatValue(n,t),contentAlign:t.contentAlign,rowIndex:n},null,8,["label","contentAlign","rowIndex"])]))})))]),1032,["row-class-name","show-summary","summary-method","loading","size","stripe","border","height","max-height","show-header","columns","data","onOnSortChange","onOnCurrentChange","highlight-row","onOnRowDblclick","onOnSelect","onOnSelectCancel","onOnSelectionChange","onOnRowClick","onOnColumnWidthResize"])])),_:1})])),_:1},8,["span"]),c.createVNode(s,{span:"2"},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"center",align:"middle",style:{padding:"5px"}},{default:c.withCtx((()=>[c.createVNode(d,{content:e.$t("删除"),placement:"left"},{default:c.withCtx((()=>[c.createVNode(m,{type:"primary",size:"small",icon:"ios-arrow-back",disabled:!e.rightActive,onClick:e.moveToLeft},null,8,["disabled","onClick"])])),_:1},8,["content"])])),_:1}),c.createVNode(h,{type:"flex",justify:"center",align:"middle",style:{padding:"5px"}},{default:c.withCtx((()=>[c.createVNode(d,{content:e.$t("添加"),placement:"right"},{default:c.withCtx((()=>[c.createVNode(m,{type:"primary",size:"small",icon:"ios-arrow-forward",disabled:!e.leftActive,onClick:e.moveToRight},null,8,["disabled","onClick"])])),_:1},8,["content"])])),_:1})])),_:1}),c.createVNode(s,{span:e.multiGridCol},{default:c.withCtx((()=>[c.createVNode(g,{padding:0,bordered:!1},{title:c.withCtx((()=>[c.createElementVNode("span",{textContent:c.toDisplayString(e.myConfig.multiGridTitle)},null,8,bt)])),default:c.withCtx((()=>[c.createVNode(f,{ref:"multiSelectTable","row-class-name":e.myConfig.rowClassName,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.multiTableColumns,data:e.tempMultiSelectData,"highlight-row":e.myConfig.highLightRow,onOnSelectionChange:e.OnMultiSelectionChange},c.createSlots({_:2},[c.renderList(e.multiSoltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatMulValue(n,t),contentAlign:t.contentAlign},null,8,["label","contentAlign"])]))})))]),1032,["row-class-name","size","stripe","border","height","max-height","show-header","columns","data","highlight-row","onOnSelectionChange"])])),_:1})])),_:1},8,["span"])])),_:1}),c.createElementVNode("div",wt,[e.$slots.footer?(c.openBlock(),c.createElementBlock("div",xt,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0),e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Bt,[c.createVNode(g,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"start",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(p,{modelValue:e.culPage,"onUpdate:modelValue":t[2]||(t[2]=t=>e.culPage=t),total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["modelValue","total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)],512)],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(f,{ref:"table","row-class-name":e.myConfig.rowClassName,loading:e.loading,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.tableColumns,data:e.tempData,onOnSortChange:e.sortChagne,onOnCurrentChange:e.onCurrentChange,"highlight-row":e.myConfig.highLightRow,onOnRowDblclick:e.dbclick,onOnSelect:e.onSelect,onOnSelectCancel:e.onSelectCancel,onOnSelectionChange:e.OnSelectionChange,onOnRowClick:e.click,onOnColumnWidthResize:e.onColumnWidthResize},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatValue(n,t),contentAlign:t.contentAlign,rowIndex:n},null,8,["label","contentAlign","rowIndex"])]))})))]),1032,["row-class-name","loading","show-summary","summary-method","size","stripe","border","height","max-height","show-header","columns","data","onOnSortChange","onOnCurrentChange","highlight-row","onOnRowDblclick","onOnSelect","onOnSelectCancel","onOnSelectionChange","onOnRowClick","onOnColumnWidthResize"]),e.$slots.footer?(c.openBlock(),c.createElementBlock("div",mt,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0),c.createElementVNode("div",yt,[e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",vt,[c.createVNode(g,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(p,{modelValue:e.culPage,"onUpdate:modelValue":t[1]||(t[1]=t=>e.culPage=t),total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["modelValue","total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})])):c.createCommentVNode("",!0)],512)],64))])}]]);const St={name:"editgridbase",extends:At,data:()=>({myConfig:{resources:"",method:"",response:"",searchParam:null,readOnly:!1,showIndex:!0,showCheckBox:!0,multiSelect:!0,addRowBefore:"",name:"",editItemMaxNum:8,lineNum:4,labelWidth:100,showAddBtn:!0,showDelBatchBtn:!0,showZoom:!1,delBatchBtnName:"删除",addBtnName:"新增",editBtnName:"编辑",cancelBtnName:"放弃",showPage:!1},showAddBtn:!0,showDelBatchBtn:!0,showDelBtn:!0,showZoom:!1,delBatchBtnName:"删除",addBtnName:"新增",showEditRowForm:!1,defaultRow:{},editItemNum:0,rowAction:[{iconcls:"row",name:"editRowForm",text:"编辑"}],openChange:!1,focusIndex:null,focusKey:null}),created(){this.myConfig.delBatchBtnName=this.$t("删除"),this.myConfig.addBtnName=this.$t("新增"),this.myConfig.editBtnName=this.$t("编辑"),this.myConfig.cancelBtnName=this.$t("放弃"),this.delBatchBtnName=this.$t("删除"),this.addBtnName=this.$t("新增"),this.rowAction[0].text=this.$t("编辑")},computed:{colKeys(){return this.soltTableColumns.map((e=>e.key))}},methods:{customInit(){this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.forEach((e=>{!1!==e.visible&&this.editItemNum++})),this.editItemNum>Number(this.myConfig.editItemMaxNum)?(this.showRowAction=!0,this.myToolConfig.items=this.$Method.copy(this.rowAction),this.editRowFlag=!1):(this.toolConfig.items=[],this.showRowAction=!1,this.editRowFlag=!0),this.showDelRow&&(this.myToolConfig.items||(this.myToolConfig.items=[]),this.myToolConfig.items=this.myToolConfig.items.concat(this.delRowAction)),void 0!==this.myConfig.showAddBtn&&(this.showAddBtn=this.myConfig.showAddBtn),void 0!==this.myConfig.showAddBtn&&(this.showAddBtn=this.myConfig.showAddBtn),void 0!==this.myConfig.addBtnName&&(this.addBtnName=this.myConfig.addBtnName),void 0!==this.myConfig.showDelBatchBtn&&(this.showDelBatchBtn=this.myConfig.showDelBatchBtn),void 0!==this.myConfig.showZoom&&(this.showZoom=this.myConfig.showZoom),this.myConfig.showPage&&(this.myConfig.indexMethod=this.customIndexMethod,this.myConfig.pageSizeNum?this.myConfig.pageConfig.page_size=Number(this.myConfig.pageSizeNum):this.myConfig.pageConfig.page_size=20),this.customInit2&&this.customInit2(),this.myConfig.getGridObject=this.getGridObject},getGridObject(){return this},conditionAction(e){let t=[];switch(e.action){case"condition_search":e.para&&(this.conditionSearchParam=this.$Method.copy(e.para)),this.refurbish();break;case"condition_clear":this.conditionSearchParam={};break;case"condition_ok":this.myConfig.multiSelect?t=this.getSelection():this.singleData.currentRow&&t.push(this.singleData.currentRow),0===t.length?this.alert(this.$t("请选择")):(e.action="viewgrid_ok",e.rows=t,this.$emit("viewGridAction",e));break;case"condition_cancel":e.action="viewgrid_cancel",this.$emit("viewGridAction",e)}},addRow(e){if(this.checkIsEdit&&!this.checkIsEdit())return;this.myConfig.readOnly&&this.setReadOnly(!1);let t=null;if(this.myConfig.addRowBefore){let e={};if(e.name=this.myConfig.name,e.grid=this.$refs.table,t=this.myConfig.addRowBefore(e),!1===t)return}t&&!0!==t||(t={}),e&&(t=Object.assign({},t,e)),this.initScrollLeft(),this.cancelCellEditing(),this.$nextTick((()=>{t.flag="I";let e=Object.assign({},this.newRow,t);this.data.push(e);let n={name:"editGrid"};n.gridname=this.myConfig.name,this.$emit("doAction",n)}))},setPro(e){e&&(this.myConfig=Object.assign({},this.myConfig,e))},setReadOnly(e){let t={};t.readOnly=e,!1!==this.config.showCheckBox&&(t.readOnly?t.showCheckBox=!1:t.showCheckBox=!0),this.cancelCellEditing(),this.setPro(t)},delBatchRow(){this.delCommonRow(null)},delRow(e){this.delCommonRow(e)},delCommonRow(e){let t=null,n=this;if(this.myConfig.delRowBefore){let n={};if(n.name=this.myConfig.name,n.grid=this.$refs.table,n.index=e,t=this.myConfig.delRowBefore(n),!1===t)return}if(this.cancelCellEditing(),e||0===e)this.remove(e);else{let e=this.getSelection();const t=e.length;for(let n=0;n<t;n++)this.remove(e[n]._customIndex,!0)}if(this.myConfig.delRowAfter){let e={};e.name=this.myConfig.name,e.grid=n,this.$nextTick((()=>{this.myConfig.delRowAfter(e)}))}},updataRow(e,t){let n=this.getData();if(this.myConfig.showPage){let i=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,o=i+this.myConfig.pageConfig.page_size,r=n[e],a=!0;if(e>=i&&e<o&&(a=!1),void 0===r.flag&&(t.flag="U"),t=Object.assign({},r,t),a)if("I"===r.flag){let n=this.getAddIndex(e);n>-1&&this.data.splice(this.getAddCurlIndex(n),1,t)}else this.initData.splice(e,1,t);else{let n=e-i;this.data.splice(n,1,t)}}else void 0===n[e].flag&&(t.flag="U"),t=Object.assign({},n[e],t),this.data.splice(e,1,t);this.showEditRowForm&&this.$refs.rowForm&&e===this.$refs.rowForm.getEditIndex()&&this.$refs.rowForm.setData(t)},updateRow(e,t){this.updataRow(e,t)},initRowForm(e){"D"!==e.rowinfo.row.flag&&(this.showEditRowForm=!0,this.$refs.rowForm.setEditIndex(e.rowinfo.index),this.$refs.rowForm.setData(e.rowinfo.row))},OnSelectionChange(e){this.myConfig.onSelectionChange&&this.myConfig.onSelectionChange(e);let t=this.$Method.copy(this.data),n=!1;t.forEach(((t,i)=>{n=!1,e.forEach((e=>{if(i===e._customIndex)return n=!0,!0})),t._checked=n})),this.data=t},customInitOperColumn(e,t){if(!0!==this.myConfig.readOnly)if(!1===this.showDelRow){let n=this.myToolConfig.items.findIndex((e=>"delRow"===e.name));n>-1&&this.myToolConfig.items.splice(n,1),this.myToolConfig.items.length>0&&t.push(e)}else t.push(e)},editRow(){let e=this.$refs.rowForm.getData();this.$refs.rowForm.cancelCellEditing(),this.updateRow(this.$refs.rowForm.getEditIndex(),e)},getChangeData(){let e=[],t=this.getData();return t.length>0&&t.forEach((t=>{void 0!==t.flag&&e.push(t)})),this.myConfig.showPage?e:this.delData.concat(e)},isChange(){return this.getChangeData().length>0},setShowAddBtn(e){this.showAddBtn=e},setShowDelBatchBtn(e){this.showDelBatchBtn=e},setCustomColumn(e){e.slot=e.key},addRowInfo(e,t){let n=this.editIndex;e.rowinfo={},e.rowinfo.column=t,-1===n&&(n=this.oldEditIndex),e.rowinfo.index=n,n>-1&&(e.rowinfo.row=this.$Method.copy(this.data[n]));e.rowinfo.gridObject=this},valueChanged(e){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),t.valueChanged(e)},onLinkTo(e){if(this.myConfig.readOnly){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),e.rowinfo.index=e.rowIndex,e.rowIndex>-1&&(e.rowinfo.row=this.$Method.copy(this.data[e.rowIndex])),t.onLinkTo(e)}},searchBefore(e){const t=this.findColumnConfig(e.myConfig.name,this.myConfig.items);return this.addRowInfo(e,t),t.searchBefore(e)},setDataBefore(e,t){const n=this.findColumnConfig(t.myConfig.name,this.myConfig.items);let i={};return i.data=e,i.tabname=this.myConfig.name,this.addRowInfo(i,n),n.setDataBefore(i,t)},cancelCellEditing(){let e="cell_"+this.editIndex+"_"+this.editKey;this.$refs[e]&&this.$refs[e].setFocus&&this.$refs[e].setFocus(!1);let t=this;this.$nextTick((()=>{t.editKey="",t.oldEditIndex=this.editIndex,t.editIndex=-1}))},IsCellError(e,t){let n="",i=this.$Method.copy(this.data[e]);if("D"===i.flag)n="efutre-del-row";else if(!0===t.required&&!i[t.name]&&0!==i[t.name]){let o=e;this.myConfig.showPage?"I"===i.flag?(o=this.getAddIndex(e,!0),this.checkAddInfo.length>o&&this.checkAddInfo[o][t.key]&&(n="efuture-grid-cell-error")):(o+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,this.checkInfo.length>o&&this.checkInfo[o][t.key]&&(n="efuture-grid-cell-error")):this.checkInfo.length>o&&this.checkInfo[o][t.key]&&(n="efuture-grid-cell-error")}return n||(n="efuture-grid-cell"),n},EditCell(e,t){if(this.myConfig.readOnly)return void this.cancelCellEditing();if(t.readOnly)return void this.cancelCellEditing();let n=this.getCurRow(e);if(!(this.myConfig.showPage&&"D"===n.flag||this.editIndex===e&&this.editKey===t.key))if(this.myConfig.cellbeginedit){let i={};if(i.index=e,i.column=t,i.tabname=this.myConfig.name,i.row=n,!this.myConfig.cellbeginedit(i))return void this.cancelCellEditing();this.editIndex=e,this.editKey=t.key,this.setcheckInfo(e,t.key)}else this.editIndex=e,this.editKey=t.key,this.setcheckInfo(e,t.key)},setEditGridFocus(e,t){this.focusIndex=e,this.focusKey=t,this.editIndex=e,this.editKey=t,this.focusCell(e,t)},focusCell(e,t){this.$nextTick((()=>{const n=this.$refs.table.$el,i=`div[cell-row="${e}"][cell-col="${t}"]`;let o=n.querySelector(i);if(o){const e=n.querySelectorAll(".ivu-table-column-selected");0!=e.length&&e.forEach((e=>{e.classList.remove("ivu-table-column-selected")}));const t=o.closest("td");t&&(t.classList.add("ivu-table-column-selected"),t.scrollIntoView({behavior:"smooth",block:"nearest"}))}}))},handleKeydown(e){if(null===this.focusIndex||null===this.focusKey)return;const t=this.colKeys.findIndex((e=>e==this.focusKey));this.focusKey=this.colKeys[t];let n=this.focusIndex,i=t,o="cell_"+this.editIndex+"_"+this.editKey;const{key:r}=e;if("ArrowUp"==r&&(this.focusIndex>0&&n--,this.extEditStatus()),"ArrowDown"==r&&(this.focusIndex<this.data.length-1&&n++,this.extEditStatus()),"ArrowLeft"==r&&(t>1&&i--,this.extEditStatus()),"ArrowRight"==r&&(t<this.colKeys.length-1&&i++,this.extEditStatus()),"Enter"==r&&t<this.colKeys.length-1&&i++,this.setEditGridFocus(n,this.colKeys[i]),this.myConfig.readOnly)this.handleOut();else if(this.$refs[o]&&this.$refs[o].autofocus)return!0;e.preventDefault()},extEditStatus(){if(!this.myConfig.readOnly){let e="cell_"+this.editIndex+"_"+this.editKey;this.$refs[e]&&this.$refs[e].setFocus&&this.$refs[e].setFocus(!1);let t=this;this.$nextTick((()=>{t.editKey="",t.oldEditIndex=this.editIndex}))}},setcheckInfo(e,t){let n=e,i=this.getCurRow(e);this.myConfig.showPage?(n+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,"I"===i.flag?this.setCheckCommonInfo(this.checkAddInfo,this.getAddIndex(e,!0),t):this.setCheckCommonInfo(this.checkInfo,n,t)):this.setCheckCommonInfo(this.checkInfo,n,t)},setCheckCommonInfo(e,t,n){if(e.length>t)this.checkInfo[t][n]=!0;else{let n=e.length;for(let i=0;i<t-n+1;i++)e.push({})}e[t][n]=!0},formatValue(e,t){let n="",i=this.$Method.copy(this.data[e]);t.name&&(n=i[t.name]);let o=t;if(t.updateCellConfig){let n={};n.index=e,n.column=t,n.row=this.$Method.copy(this.data[e]),o=t.updateCellConfig(n)}let r=this.$Method.formatValue(n,i,o),a={};return a.value=n,a.row=i,a.config=o,a.valueFormat=r,t.formatValue?t.formatValue(a):this.myConfig.formatValue?this.myConfig.formatValue(a):r},getCellConfig(e,t){const n=this.findColumnConfig(t.name,this.myConfig.items);if(n.updateCellConfig){let i={};i.index=e,i.column=t,i.row=this.$Method.copy(this.data[e]);let o=n.updateCellConfig(i);return o.onOpenChange=this.onOpenChange,o.place="grid",o}return t.onOpenChange=this.onOpenChange,t.place="grid",t},onOpenChange(e){this.openChange=e},getCurRow(e){return this.$Method.copy(this.data[e])},handleOut(){this.editKey&&(this.openChange||this.cancelCellEditing())},checkValidate(){this.cancelCellEditing();let e=!1,t=this.getData();if(t.length>0){let n=[];this.soltTableColumns.some((e=>{(e.name||e.sname)&&!1!==e.visible&&!0===e.required&&(e.name&&n.push(e.name),e.sname&&n.push(e.sname),e.ename&&n.push(e.ename))}));let i=-1;t.forEach(((t,o)=>{"I"===t.flag&&i++,"D"!==t.flag&&n.forEach((n=>{t[n]||0===t[n]||(e||(e=!0),this.myConfig.showPage&&"I"===t.flag?this.setCheckCommonInfo(this.checkAddInfo,i,n):this.setCheckCommonInfo(this.checkInfo,o,n))}))}))}return e},setShowBtn(e){this.showBtn=e},doAction(e){this[e.name]&&this[e.name](e)},enterKeyDown(){let e=this.findNextItems(this.editIndex,this.editKey);e&&(this.editIndex=e.editIndex,this.editKey=e.editKey,this.setcheckInfo(e.editIndex,e.editKey))},findNextItems(e,t){let n=this.soltTableColumns.findIndex((e=>e.name===t||e.sname===t)),i=n+1;if(!(n>-1))return null;if(i>=this.soltTableColumns.length)if(e+1>=this.data.length)e=this.findNextRow(0),i=0,"selection"!==this.soltTableColumns[0].type&&"index"!==this.soltTableColumns[0].type||i++,"index"===this.soltTableColumns[1].type&&i++;else{let t=e+1;e=this.findNextRow(t),i=0,"selection"!==this.soltTableColumns[0].type&&"index"!==this.soltTableColumns[0].type||i++,"index"===this.soltTableColumns[1].type&&i++}let o=this.soltTableColumns[i],r=this.getCellConfig(e,o),a=r.name;if(r.sname&&(a=r.sname),!0===r.readOnly||!1===r.visible||"PictureBox"===r.type||"VideoBox"===r.type||"RichTextBox"===r.type||"wRichTextBox"===r.type||"selection"===r.type||"index"===r.type)return this.findNextItems(e,a);if(this.myConfig.cellbeginedit){let t={};if(t.index=e,t.column=r,t.tabname=this.myConfig.name,t.row=this.$Method.copy(this.data[e]),this.myConfig.cellbeginedit(t)){let t={};return t.editIndex=e,t.editKey=a,t}return this.findNextItems(e,a)}{let t={};return t.editIndex=e,t.editKey=a,t}},customIndexMethod:(e,t)=>"I"===e.flag?"+":t,findNextRow(e){let t=e;return this.myConfig.showPage&&this.data.some(((n,i)=>{if(i>=e&&"D"!==n.flag)return t=i,!0})),t},rowClassName:e=>"D"===e.flag?"efutre-del-row":"",getCellClass(e){let t=this.getCurRow(e);return t&&"D"===t.flag?"efutre-del-row":""},changePageSize(e){this.saveCurlData(this.myConfig.pageConfig.page_no,this.initData),this.myConfig.pageConfig.page_no=1,this.data=this.fillData(this.myConfig.pageConfig.page_no,e),this.myConfig.pageConfig.page_size=e,this.cancelCellEditing()},changePage(e){this.saveCurlData(this.myConfig.pageConfig.page_no,this.initData),this.data=this.fillData(e,this.myConfig.pageConfig.page_size),this.myConfig.pageConfig.page_no=e,this.cancelCellEditing()},customClearData(){this.initScrollLeft()},saveCurlData(e,t){let n=[];this.data.forEach(((i,o)=>{let r=(e-1)*this.myConfig.pageConfig.page_size+o;"U"===i.flag||"D"===i.flag?t.splice(r,1,i):"I"===i.flag&&n.push(i)})),this.addData=n},setData(e){e||(e=[]),this.myConfig.showPage?(this.initData=this.$Method.copy(e),this.myConfig.pageConfig.page_no=1,this.myConfig.pageConfig.total_results=e.length,this.data=this.fillData(this.myConfig.pageConfig.page_no,this.myConfig.pageConfig.page_size)):(this.data=e,this.initData=this.$Method.copy(this.data)),this.addData=[],this.delData=[],this.checkInfo=[],this.initScrollLeft(),this.cancelCellEditing()},fillData(e,t){let n=[],i=(e-1)*t,o=i+t;o>this.myConfig.pageConfig.total_results&&(o=this.myConfig.pageConfig.total_results);for(var r=i,a=o;r<a;r++){var s=this.initData[r];s&&n.push(s)}return this.addData.forEach((e=>{n.push(e)})),n},getData(){if(this.myConfig.showPage){let e=this.$Method.copy(this.initData);return this.saveCurlData(this.myConfig.pageConfig.page_no,e),this.addData.forEach((t=>{e.push(t)})),e}return this.$Method.copy(this.data)},remove(e,t){let n=e;if(t){let t=this.data.findIndex((t=>t._customIndex===e));t>-1&&(n=t)}let i=this.getData();if(n>-1)if(void 0===i[n].flag||"U"===i[n].flag){let t=this.$Method.copy(i[n]);if(t.flag="D",this.myConfig.showPage){let i=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,o=i+this.myConfig.pageConfig.page_size,r=n;e>=i&&e<o?(r=e-i,this.data.splice(r,1,t)):this.initData.splice(r,1,t)}else this.delData.push(t),this.data.splice(n,1)}else if("I"===i[n].flag)if(this.myConfig.showPage){let e=this.getAddIndex(n);e>-1&&(this.checkAddInfo.splice(e,1),this.data.splice(this.getAddCurlIndex(e),1))}else this.data.splice(n,1),this.checkInfo.splice(n,1);this.initScrollLeft()},getAddIndex(e,t){let n=-1,i=[];return i=t?this.data:this.getData(),i.some(((t,i)=>{if("I"===t.flag&&n++,i===e)return!0})),n},getAddCurlIndex(e){let t=-1,n=-1;return this.data.some(((i,o)=>{if("I"===i.flag&&t++,t===e)return n=o,!0})),n},setSummary(e,t,n){if(e.children)e.children.forEach((e=>{this.setSummary(e,t.sums)}));else{const i=e.key;if(e.summary){const o=t.map((e=>Number(e[i])));if(o.every((e=>isNaN(e))))n[i]={key:i,value:"N/A"};else{const t=o.reduce(((e,t)=>{const n=Number(t);return isNaN(n)?e:e+t}),0);n[i]={key:i,value:this.$Method.formatNumber(t,e.format,e.notzero),countValue:t}}}else n[i]={key:i,value:""}}},handleSummary({columns:e,data:t}){const n={};e.forEach((e=>{this.setSummary(e,t,n)}));let i=this.findFirst(e);return n[i]={key:i,value:this.myConfig.sumText},this.myConfig.customSummary?this.myConfig.customSummary(n):n},findFirst(e){let t="";return e.some((e=>{if("selection"!==e.key&&"index"!==e.key)return t=e.name,!0})),t}}},kt=["id"],_t={key:0},Dt=["onClick"],Ft={key:0,ref:"page",style:{background:"#eee","padding-top":"5px",width:"100%"}};var Ot=Ye({name:"editgrid",extends:St,mounted(){this.$refs.card&&this.$refs.card.$el&&(this.$refs.card.$el.onmouseleave=()=>{})}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Button"),s=c.resolveComponent("Col"),l=c.resolveComponent("Row"),u=c.resolveComponent("ControlBox"),d=c.resolveComponent("ShowText"),h=c.resolveComponent("Table"),A=c.resolveComponent("Page"),f=c.resolveComponent("Card"),p=c.resolveComponent("ExpandRow"),g=c.resolveComponent("Modal");return c.openBlock(),c.createElementBlock("div",{ref:"card",id:e.config.name,style:{padding:"5px"}},[e.$slots.header?(c.openBlock(),c.createElementBlock("div",_t,[c.renderSlot(e.$slots,"header")])):c.withDirectives((c.openBlock(),c.createBlock(l,{key:1,type:"flex",justify:"start",gutter:4},{default:c.withCtx((()=>[c.withDirectives(c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(a,{icon:"ios-add",size:"small",onClick:e.addRow},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.addBtnName),1)])),_:1},8,["onClick"])])),_:1},512),[[c.vShow,e.showAddBtn]]),c.withDirectives(c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(a,{icon:"ios-remove",size:"small",onClick:e.delBatchRow},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.delBatchBtnName),1)])),_:1},8,["onClick"])])),_:1},512),[[c.vShow,e.showDelBatchBtn]])])),_:1},512)),[[c.vShow,!e.myConfig.readOnly]]),c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(h,{ref:"table",style:{"margin-top":"5px"},"row-class-name":e.rowClassName,loading:e.loading,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,maxHeight:e.tableMaxHeight,"show-header":e.myConfig.showHeader,onOnSelectionChange:e.OnSelectionChange,columns:e.tableColumns,data:e.data,onOnColumnWidthResize:e.onColumnWidthResize,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createElementVNode("div",{onClick:i=>e.EditCell(n,t)},[e.editIndex===n&&e.editKey===t.key?(c.openBlock(),c.createBlock(u,{key:0,autofocus:!0,config:e.getCellConfig(n,t),valueData:e.getCurRow(n),onInputValue:e.input,editIndex:n,onDoAction:e.doAction},null,8,["config","valueData","onInputValue","editIndex","onDoAction"])):(c.openBlock(),c.createBlock(d,{key:1,label:e.formatValue(n,t),contentAlign:t.contentAlign,class:c.normalizeClass(e.IsCellError(n,t))},null,8,["label","contentAlign","class"]))],8,Dt)]))})))]),1032,["row-class-name","loading","size","stripe","border","height","maxHeight","show-header","onOnSelectionChange","columns","data","onOnColumnWidthResize","show-summary","summary-method"]),e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Ft,[c.createVNode(f,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(l,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(A,{total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)])),_:1}),e.editRowFlag?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(g,{key:2,modelValue:e.showEditRowForm,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showEditRowForm=t),width:"90%",title:e.$t("编辑"),onOnOk:e.editRow},{default:c.withCtx((()=>[c.createElementVNode("div",null,[c.createVNode(p,{ref:"rowForm",config:e.myConfig,dictData:e.dictData},null,8,["config","dictData"])])])),_:1},8,["modelValue","title","onOnOk"]))],8,kt)}]]);const Tt=["textContent"],Nt={key:1},It={key:4,style:{"margin-left":"10px"}},Rt=["onClick"],Mt={key:0,ref:"page",style:{background:"#eee","padding-top":"5px",width:"100%"}};var Lt=Ye({name:"editgridcard",extends:St,data(){return{myConfig:{addBtnType:"2",hide:!0,titleType:1,bordered:!0,disHover:!1,operFixedFlag:!1},btnReadOnly:!1,showBtn:!0,cardPadding:0,cardStyle:"",showGrid:!0,showTitle:!0,editFlag:!1,pStyle:"",iconStyle:"",showDelRow:!0,rowAction:[],delRowAction:[{iconcls:"row",icon:"ios-trash",name:"delRow",text:this.$t("删除"),size:"20",type:"text"}]}},computed:{titleClass(){return`efuture-title-font-${this.myConfig.titleType}`},headClass(){return this.showGrid?`efuture-card-head-title-${this.myConfig.titleType}`:`efuture-card-head-title-${this.myConfig.titleType} efuture-card-head-title-nobottom`},extraClass(){return`efuture-card-extra-title-${this.myConfig.titleType}`}},methods:{customInit2(){this.myConfig.hide&&(this.pStyle="cursor:pointer",this.iconStyle="transform: rotate(90deg)"),1!==this.myConfig.titleType?(void 0===this.config.hide&&(this.myConfig.hide=!1),void 0===this.config.bordered&&(this.myConfig.bordered=!1),void 0===this.config.disHover&&(this.myConfig.disHover=!0)):(void 0===this.config.hide&&(this.myConfig.hide=!0),void 0===this.config.bordered&&(this.myConfig.bordered=!0),void 0===this.config.disHover&&(this.myConfig.disHover=!1)),void 0!==this.myConfig.showTitle&&(this.showTitle=this.myConfig.showTitle),void 0!==this.myConfig.showBtn&&(this.showBtn=this.myConfig.showBtn),void 0!==this.myConfig.showAddBtn&&(this.showBtn=this.myConfig.showAddBtn),this.myToolConfig.icon=!0,this.setTitleStyle()},toggle(){this.myConfig.hide&&(this.showGrid=!this.showGrid,this.setTitleStyle())},setShowGrid(e){this.showGrid=e,this.setTitleStyle()},setTitleStyle(){this.showGrid?(this.iconStyle="transform: rotate(90deg)",this.cardPadding=5*Number(this.myConfig.titleType),this.cardStyle="padding-left:"+this.cardPadding+"px;padding-right:"+this.cardPadding+"px;padding-bottom: 10px;"):(this.iconStyle="",this.cardPadding=0,this.cardStyle="")},editGrid(){if(this.checkIsEdit()){this.setReadOnly(!1);let e={name:"editGrid"};e.gridname=this.myConfig.name,this.$emit("doAction",e)}},cancelGrid(){this.setData(this.initData),this.setReadOnly(!0);let e={name:"cancelGrid"};e.gridname=this.myConfig.name,this.$emit("doAction",e)},checkIsEdit(){let e=!0;return this.myConfig.editObjectBefore&&(e=this.myConfig.editObjectBefore(this.myConfig.name)),e},setBtnType(e){let t={};t.addBtnType=e,this.setPro(t)},setBtnReadOnly(e){this.btnReadOnly=e}},mounted(){this.$refs.card&&this.$refs.card.$el&&(this.$refs.card.$el.onmouseleave=()=>{this.handleOut()})}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Icon"),s=c.resolveComponent("ControlBox"),l=c.resolveComponent("ShowText"),u=c.resolveComponent("Table"),d=c.resolveComponent("Page"),h=c.resolveComponent("Row"),A=c.resolveComponent("Card"),f=c.resolveComponent("Button");return c.openBlock(),c.createBlock(A,{ref:"card",padding:0,bordered:o.myConfig.bordered,"dis-hover":o.myConfig.disHover,headClass:r.headClass,extraClass:r.extraClass},c.createSlots({extra:c.withCtx((()=>[o.showBtn&&o.myConfig.readOnly&&"3"===o.myConfig.addBtnType&&!o.btnReadOnly?(c.openBlock(),c.createElementBlock("a",{key:0,href:"#",onClick:t[1]||(t[1]=c.withModifiers(((...e)=>r.editGrid&&r.editGrid(...e)),["prevent"]))},c.toDisplayString(o.myConfig.editBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&o.myConfig.readOnly&&"3"===o.myConfig.addBtnType&&o.btnReadOnly?(c.openBlock(),c.createElementBlock("span",Nt,c.toDisplayString(o.myConfig.editBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&!o.myConfig.readOnly&&"3"===o.myConfig.addBtnType?(c.openBlock(),c.createElementBlock("a",{key:2,href:"#",onClick:t[2]||(t[2]=c.withModifiers(((...e)=>r.cancelGrid&&r.cancelGrid(...e)),["prevent"]))},c.toDisplayString(o.myConfig.cancelBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&"3"===o.myConfig.addBtnType&&!o.btnReadOnly?(c.openBlock(),c.createElementBlock("a",{key:3,style:{"margin-left":"10px"},href:"#",onClick:t[3]||(t[3]=c.withModifiers(((...t)=>e.addRow&&e.addRow(...t)),["prevent"]))},c.toDisplayString(o.myConfig.addBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&"3"===o.myConfig.addBtnType&&o.btnReadOnly?(c.openBlock(),c.createElementBlock("span",It,c.toDisplayString(o.myConfig.addBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&!o.myConfig.readOnly&&"1"===o.myConfig.addBtnType?(c.openBlock(),c.createElementBlock("a",{key:5,href:"#",onClick:t[4]||(t[4]=c.withModifiers(((...t)=>e.addRow&&e.addRow(...t)),["prevent"]))},c.toDisplayString(o.myConfig.addBtnName),1)):c.createCommentVNode("",!0)])),default:c.withCtx((()=>[c.withDirectives(c.createElementVNode("div",{style:c.normalizeStyle(o.cardStyle)},[c.createVNode(h,null,{default:c.withCtx((()=>[c.createVNode(u,{ref:"table",loading:e.loading,size:o.myConfig.tableSize,"row-class-name":e.rowClassName,stripe:o.myConfig.showStripe,border:o.myConfig.showBorder,height:e.tableHeight,maxHeight:e.tableMaxHeight,"show-header":o.myConfig.showHeader,columns:e.tableColumns,onOnSelectionChange:e.OnSelectionChange,data:e.data,onOnColumnWidthResize:e.onColumnWidthResize,"show-summary":o.myConfig.showSummary,"summary-method":e.handleSummary},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createElementVNode("div",{onClick:i=>e.EditCell(n,t),class:"ivu-table-cell"},[e.editIndex===n&&e.editKey===t.key?(c.openBlock(),c.createBlock(s,{key:0,config:e.getCellConfig(n,t),autofocus:!0,valueData:e.getCurRow(n),onInputValue:e.input,editIndex:n,onDoAction:e.doAction},null,8,["config","valueData","onInputValue","editIndex","onDoAction"])):(c.openBlock(),c.createBlock(l,{key:1,style:{display:"inline-block"},label:e.formatValue(n,t),contentAlign:t.contentAlign,class:c.normalizeClass(e.IsCellError(n,t))},null,8,["label","contentAlign","class"]))],8,Rt)]))})))]),1032,["loading","size","row-class-name","stripe","border","height","maxHeight","show-header","columns","onOnSelectionChange","data","onOnColumnWidthResize","show-summary","summary-method"]),o.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Mt,[c.createVNode(A,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(d,{total:o.myConfig.pageConfig.total_results,size:o.myConfig.pageSize,current:o.myConfig.pageConfig.page_no,"page-size":o.myConfig.pageConfig.page_size,"page-size-opts":o.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":o.myConfig.pageShowTotal,"show-elevator":o.myConfig.pageShowElevator,"show-sizer":o.myConfig.pageShowSizer},null,8,["total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)])),_:1}),o.showBtn&&!o.myConfig.readOnly&&"2"===o.myConfig.addBtnType?(c.openBlock(),c.createBlock(h,{key:0,type:"flex",justify:"center",style:{"margin-top":"10px","margin-bottom":"10px"}},{default:c.withCtx((()=>[c.createVNode(f,{type:"default",style:{"background-color":"#f8f8f9"},onClick:e.addRow,long:""},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.myConfig.addBtnName),1)])),_:1},8,["onClick"])])),_:1})):c.createCommentVNode("",!0)],4),[[c.vShow,o.showGrid]])])),_:2},[o.showTitle?{name:"title",fn:c.withCtx((()=>[c.createElementVNode("p",{style:c.normalizeStyle(o.pStyle),onClick:t[0]||(t[0]=(...e)=>r.toggle&&r.toggle(...e))},[c.createElementVNode("span",{class:c.normalizeClass(r.titleClass),textContent:c.toDisplayString(o.myConfig.title?e.$t(o.myConfig.title):o.myConfig.title)},null,10,Tt),o.myConfig.hide?(c.openBlock(),c.createBlock(a,{key:0,class:"efuture-title-icon",style:c.normalizeStyle(o.iconStyle),type:"ios-arrow-forward"},null,8,["style"])):c.createCommentVNode("",!0)],4)])),key:"0"}:void 0]),1032,["bordered","dis-hover","headClass","extraClass"])}]]);const Vt={name:"textbox",extends:ot,components:{},data:()=>({myConfig:{maxLength:null,vtype:"text",defaultValue:"",rows:3,clearable:!1,appendWidth:80,search:!1,allowInput:!0,showAppend:!1,notSpecial:!1,maskToggle:!1},passwordFlag:!1,maskVisible:!1}),computed:{isMaskMode(){return"mask"===this.myConfig.vtype},inputType(){return this.isMaskMode?"text":this.myConfig.vtype}},methods:{toggleMask(){this.maskVisible=!this.maskVisible},keyUp(e){this.myConfig.notSpecial&&(e.target.value=e.target.value.replace(/[`~!@$%^&*()_\-+=<>?:"{}|,\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g,""))},customInit(){"password"===this.myConfig.vtype?(this.passwordFlag=!0,void 0!==this.myConfig.passwordFlag&&(this.passwordFlag=this.myConfig.passwordFlag)):this.passwordFlag=!1},_enterSetFatherValue(){"textarea"!==this.myConfig.vtype&&(this.isEnter=!0),this.setFatherValue()},search(){if(this.myConfig.onSearch&&!0!==this.myConfig.readOnly){let e=this,t={};t.control=e,t.name=this.myConfig.name,this.myConfig.onSearch(t)}},appendClick(){this.myConfig.onAppend&&this.myConfig.onAppend()},setFocus(e){e?this.$refs.myControl.focus():this.$refs.myControl.blur()}}};var Pt=Ye(Vt,[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Icon"),s=c.resolveComponent("Button"),l=c.resolveComponent("Input");return c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["textbox-wrapper",{"textbox-mask":r.isMaskMode,"textbox-mask-visible":r.isMaskMode&&o.maskVisible}])},[c.createVNode(l,{ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),size:o.myConfig.size,type:r.inputType,password:o.passwordFlag,rows:o.myConfig.rows,placeholder:o.myConfig.placeholder,maxlength:o.myConfig.maxLength,disabled:o.myConfig.readOnly,clearable:o.myConfig.clearable,readonly:!o.myConfig.allowInput,onKeydown:c.withKeys(c.withModifiers(r._enterSetFatherValue,["stop"]),["enter"]),onKeyup:r.keyUp,onOnBlur:e.setFatherValue,search:o.myConfig.search,onOnSearch:r.search},c.createSlots({_:2},[r.isMaskMode&&o.myConfig.maskToggle?{name:"suffix",fn:c.withCtx((()=>[c.createVNode(a,{type:o.maskVisible?"md-eye-off":"md-eye",onClick:c.withModifiers(r.toggleMask,["stop"]),style:{cursor:"pointer","font-size":"16px"}},null,8,["type","onClick"])])),key:"0"}:void 0,o.myConfig.showAppend?{name:"append",fn:c.withCtx((()=>[c.createVNode(s,{size:o.myConfig.size,type:"primary",disabled:o.myConfig.readOnly,onClick:r.appendClick},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.myConfig.appendText),1)])),_:1},8,["size","disabled","onClick"])])),key:"1"}:void 0]),1032,["modelValue","size","type","password","rows","placeholder","maxlength","disabled","clearable","readonly","onKeydown","onKeyup","onOnBlur","search","onOnSearch"])],2)),[[c.vShow,o.myConfig.visible]])}],["__scopeId","data-v-63864133"]]);const Ut={name:"uploadbox",data:()=>({defaultList:[],fileSize:20480,myConfig:{},uploadUrl:"",disabled:!1}),props:{config:{type:Object,default:null},headers:{type:Object,default:null},readOnly:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!0}},computed:{uploadClass(){return this.disabled?"efuture-upload-disabled":""}},created(){var e,t;this.myConfig=Object.assign({},this.myConfig,this.config),void 0!==this.myConfig.fileSize&&(this.fileSize=1024*Number(this.myConfig.fileSize)),(null==(t=null==(e=null==this?void 0:this.OmdUrl)?void 0:e.portalConfig)?void 0:t.appendixsize)&&(this.fileSize=1024*Number(this.OmdUrl.portalConfig.appendixsize),this.myConfig.fileSize=Number(this.OmdUrl.portalConfig.appendixsize)),this.uploadUrl=this.myConfig.uploadfile},methods:{handleSuccess(e,t){if(e.data&&e.data.length>0)if(e.data[0].filekey)t.filekey=e.data[0].filekey;else if(e.data[0].fileKey)t.filekey=e.data[0].fileKey;else if(void 0!==e.data[0].url){let n=e.data[0].url.split("/");t.filekey=n[n.length-1]}this.$emit("success",e)},handleFormatError(e){let t=this.myConfig.fileType.join(",");this.alert(this.$t("文件[{name}]的格式不正确,请上传格式为({type})的文件",{name:e.name,type:t}))},handleMaxSize(e){let t="",n=Number(this.myConfig.fileSize);if(n>1024){t=(n/1024).toFixed(2)+"G"}else if(n<1){t=(1024*n).toFixed(2)+"K"}else t=n+"M";this.alert(this.$t("文件[{name}]的文件大小不允许超过{error}",{name:e.name,error:t}))},handleBeforeUpload(){if(this.myConfig.multiSelect)return!0;{const e=this.$refs.upload.fileList.length<this.myConfig.fileNum;return e||this.alert(this.$t("上传的文件数量过多,请先删除部分已上传文件再上传")),e}},delFile(e){const t=this.$refs.upload.fileList.findIndex((t=>t.filekey===e));t>-1&&this.$refs.upload.fileList.splice(t,1)},onClick(){let e=!0;return this.$parent.$parent.$parent.checkPara&&(e=this.$parent.$parent.$parent.checkPara()),e&&this.config.onOpenChange&&this.config.onOpenChange(!0),e&&this.$refs.upload.$refs&&this.$refs.upload.$refs.input&&this.$refs.upload.$refs.input.click(),e},clearData(){this.$refs.upload.clearFiles()}},watch:{config:{handler(e){this.readOnly||e.readOnly?this.disabled=!0:this.disabled=!1},deep:!0,immediate:!0},readOnly(e){e||this.config.readOnly?this.disabled=!0:this.disabled=!1}}};var Qt=Ye(Ut,[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Upload");return c.openBlock(),c.createBlock(a,{ref:"upload","show-upload-list":!1,"default-file-list":o.defaultList,"on-success":r.handleSuccess,format:o.myConfig.fileType,disabled:o.disabled,"max-size":o.fileSize,data:n.headers,"on-format-error":r.handleFormatError,"on-exceeded-size":r.handleMaxSize,"before-upload":r.handleBeforeUpload,multiple:n.multiSelect,type:"drag",class:c.normalizeClass(r.uploadClass),action:o.uploadUrl},{default:c.withCtx((()=>[c.renderSlot(e.$slots,"btn")])),_:3},8,["default-file-list","on-success","format","disabled","max-size","data","on-format-error","on-exceeded-size","before-upload","multiple","class","action"])}]]),Ht="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zt={exports:{}},Kt=-1;function Gt(e,t,n,i,o){if(e===t)return e?[[0,e]]:[];if(null!=n){var r=function(e,t,n){var i="number"==typeof n?{index:n,length:0}:n.oldRange,o="number"==typeof n?null:n.newRange,r=e.length,a=t.length;if(0===i.length&&(null===o||0===o.length)){var s=i.index,l=e.slice(0,s),c=e.slice(s),u=o?o.index:null,d=s+a-r;if((null===u||u===d)&&!(d<0||d>a)){var h=t.slice(0,d);if((p=t.slice(d))===c){var A=Math.min(s,d);if((m=l.slice(0,A))===(v=h.slice(0,A)))return cn(m,l.slice(A),h.slice(A),c)}}if(null===u||u===s){var f=s,p=(h=t.slice(0,f),t.slice(f));if(h===l){var g=Math.min(r-f,a-f);if((y=c.slice(c.length-g))===(C=p.slice(p.length-g)))return cn(l,c.slice(0,c.length-g),p.slice(0,p.length-g),y)}}}if(i.length>0&&o&&0===o.length){var m=e.slice(0,i.index),y=e.slice(i.index+i.length);if(!(a<(A=m.length)+(g=y.length))){var v=t.slice(0,A),C=t.slice(a-g);if(m===v&&y===C)return cn(m,e.slice(A,r-g),t.slice(A,a-g),y)}}return null}(e,t,n);if(r)return r}var a=Wt(e,t),s=e.substring(0,a);a=Xt(e=e.substring(a),t=t.substring(a));var l=e.substring(e.length-a),c=function(e,t){var n;if(!e)return[[1,t]];if(!t)return[[Kt,e]];var i=e.length>t.length?e:t,o=e.length>t.length?t:e,r=i.indexOf(o);if(-1!==r)return n=[[1,i.substring(0,r)],[0,o],[1,i.substring(r+o.length)]],e.length>t.length&&(n[0][0]=n[2][0]=Kt),n;if(1===o.length)return[[Kt,e],[1,t]];var a=function(e,t){var n=e.length>t.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length<n.length)return null;function o(e,t,n){for(var i,o,r,a,s=e.substring(n,n+Math.floor(e.length/4)),l=-1,c="";-1!==(l=t.indexOf(s,l+1));){var u=Wt(e.substring(n),t.substring(l)),d=Xt(e.substring(0,n),t.substring(0,l));c.length<d+u&&(c=t.substring(l-d,l)+t.substring(l,l+u),i=e.substring(0,n-d),o=e.substring(n+u),r=t.substring(0,l-d),a=t.substring(l+u))}return 2*c.length>=e.length?[i,o,r,a,c]:null}var r,a,s,l,c,u=o(n,i,Math.ceil(n.length/4)),d=o(n,i,Math.ceil(n.length/2));if(!u&&!d)return null;r=d?u&&u[4].length>d[4].length?u:d:u;e.length>t.length?(a=r[0],s=r[1],l=r[2],c=r[3]):(l=r[0],c=r[1],a=r[2],s=r[3]);var h=r[4];return[a,s,l,c,h]}(e,t);if(a){var s=a[0],l=a[1],c=a[2],u=a[3],d=a[4],h=Gt(s,c),A=Gt(l,u);return h.concat([[0,d]],A)}return function(e,t){for(var n=e.length,i=t.length,o=Math.ceil((n+i)/2),r=o,a=2*o,s=new Array(a),l=new Array(a),c=0;c<a;c++)s[c]=-1,l[c]=-1;s[r+1]=0,l[r+1]=0;for(var u=n-i,d=u%2!=0,h=0,A=0,f=0,p=0,g=0;g<o;g++){for(var m=-g+h;m<=g-A;m+=2){for(var y=r+m,v=(B=m===-g||m!==g&&s[y-1]<s[y+1]?s[y+1]:s[y-1]+1)-m;B<n&&v<i&&e.charAt(B)===t.charAt(v);)B++,v++;if(s[y]=B,B>n)A+=2;else if(v>i)h+=2;else if(d){if((w=r+u-m)>=0&&w<a&&-1!==l[w])if(B>=(b=n-l[w]))return qt(e,t,B,v)}}for(var C=-g+f;C<=g-p;C+=2){for(var b,w=r+C,x=(b=C===-g||C!==g&&l[w-1]<l[w+1]?l[w+1]:l[w-1]+1)-C;b<n&&x<i&&e.charAt(n-b-1)===t.charAt(i-x-1);)b++,x++;if(l[w]=b,b>n)p+=2;else if(x>i)f+=2;else if(!d){if((y=r+u-C)>=0&&y<a&&-1!==s[y]){var B;v=r+(B=s[y])-y;if(B>=(b=n-b))return qt(e,t,B,v)}}}}return[[Kt,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-a),t=t.substring(0,t.length-a));return s&&c.unshift([0,s]),l&&c.push([0,l]),on(c,o),i&&function(e){var t=!1,n=[],i=0,o=null,r=0,a=0,s=0,l=0,c=0;for(;r<e.length;)0==e[r][0]?(n[i++]=r,a=l,s=c,l=0,c=0,o=e[r][1]):(1==e[r][0]?l+=e[r][1].length:c+=e[r][1].length,o&&o.length<=Math.max(a,s)&&o.length<=Math.max(l,c)&&(e.splice(n[i-1],0,[Kt,o]),e[n[i-1]+1][0]=1,i--,r=--i>0?n[i-1]:-1,a=0,s=0,l=0,c=0,o=null,t=!0)),r++;t&&on(e);(function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),i=t.charAt(0),o=n.match(Jt),r=i.match(Jt),a=o&&n.match(Zt),s=r&&i.match(Zt),l=a&&n.match(en),c=s&&i.match(en),u=l&&e.match(tn),d=c&&t.match(nn);return u||d?5:l||c?4:o&&!a&&s?3:a||s?2:o||r?1:0}var n=1;for(;n<e.length-1;){if(0==e[n-1][0]&&0==e[n+1][0]){var i=e[n-1][1],o=e[n][1],r=e[n+1][1],a=Xt(i,o);if(a){var s=o.substring(o.length-a);i=i.substring(0,i.length-a),o=s+o.substring(0,o.length-a),r=s+r}for(var l=i,c=o,u=r,d=t(i,o)+t(o,r);o.charAt(0)===r.charAt(0);){i+=o.charAt(0),o=o.substring(1)+r.charAt(0),r=r.substring(1);var h=t(i,o)+t(o,r);h>=d&&(d=h,l=i,c=o,u=r)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}})(e),r=1;for(;r<e.length;){if(e[r-1][0]==Kt&&1==e[r][0]){var u=e[r-1][1],d=e[r][1],h=Yt(u,d),A=Yt(d,u);h>=A?(h>=u.length/2||h>=d.length/2)&&(e.splice(r,0,[0,d.substring(0,h)]),e[r-1][1]=u.substring(0,u.length-h),e[r+1][1]=d.substring(h),r++):(A>=u.length/2||A>=d.length/2)&&(e.splice(r,0,[0,u.substring(0,A)]),e[r-1][0]=1,e[r-1][1]=d.substring(0,d.length-A),e[r+1][0]=Kt,e[r+1][1]=u.substring(A),r++),r++}r++}}(c),c}function qt(e,t,n,i){var o=e.substring(0,n),r=t.substring(0,i),a=e.substring(n),s=t.substring(i),l=Gt(o,r),c=Gt(a,s);return l.concat(c)}function Wt(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,i=Math.min(e.length,t.length),o=i,r=0;n<o;)e.substring(r,o)==t.substring(r,o)?r=n=o:i=o,o=Math.floor((i-n)/2+n);return rn(e.charCodeAt(o-1))&&o--,o}function Yt(e,t){var n=e.length,i=t.length;if(0==n||0==i)return 0;n>i?e=e.substring(n-i):n<i&&(t=t.substring(0,n));var o=Math.min(n,i);if(e==t)return o;for(var r=0,a=1;;){var s=e.substring(o-a),l=t.indexOf(s);if(-1==l)return r;a+=l,0!=l&&e.substring(o-a)!=t.substring(0,a)||(r=a,a++)}}function Xt(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,i=Math.min(e.length,t.length),o=i,r=0;n<o;)e.substring(e.length-o,e.length-r)==t.substring(t.length-o,t.length-r)?r=n=o:i=o,o=Math.floor((i-n)/2+n);return an(e.charCodeAt(e.length-o))&&o--,o}var Jt=/[^a-zA-Z0-9]/,Zt=/\s/,en=/[\r\n]/,tn=/\n\r?\n$/,nn=/^\r?\n\r?\n/;function on(e,t){e.push([0,""]);for(var n,i=0,o=0,r=0,a="",s="";i<e.length;)if(i<e.length-1&&!e[i][1])e.splice(i,1);else switch(e[i][0]){case 1:r++,s+=e[i][1],i++;break;case Kt:o++,a+=e[i][1],i++;break;case 0:var l=i-r-o-1;if(t){if(l>=0&&ln(e[l][1])){var c=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),a=c+a,s=c+s,!e[l][1]){e.splice(l,1),i--;var u=l-1;e[u]&&1===e[u][0]&&(r++,s=e[u][1]+s,u--),e[u]&&e[u][0]===Kt&&(o++,a=e[u][1]+a,u--),l=u}}if(sn(e[i][1])){c=e[i][1].charAt(0);e[i][1]=e[i][1].slice(1),a+=c,s+=c}}if(i<e.length-1&&!e[i][1]){e.splice(i,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(0!==(n=Wt(s,a))&&(l>=0?e[l][1]+=s.substring(0,n):(e.splice(0,0,[0,s.substring(0,n)]),i++),s=s.substring(n),a=a.substring(n)),0!==(n=Xt(s,a))&&(e[i][1]=s.substring(s.length-n)+e[i][1],s=s.substring(0,s.length-n),a=a.substring(0,a.length-n)));var d=r+o;0===a.length&&0===s.length?(e.splice(i-d,d),i-=d):0===a.length?(e.splice(i-d,d,[1,s]),i=i-d+1):0===s.length?(e.splice(i-d,d,[Kt,a]),i=i-d+1):(e.splice(i-d,d,[Kt,a],[1,s]),i=i-d+2)}0!==i&&0===e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,r=0,o=0,a="",s=""}""===e[e.length-1][1]&&e.pop();var h=!1;for(i=1;i<e.length-1;)0===e[i-1][0]&&0===e[i+1][0]&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)===e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),h=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),h=!0)),i++;h&&on(e,t)}function rn(e){return e>=55296&&e<=56319}function an(e){return e>=56320&&e<=57343}function sn(e){return an(e.charCodeAt(0))}function ln(e){return rn(e.charCodeAt(e.length-1))}function cn(e,t,n,i){return ln(e)||sn(i)?null:function(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}([[0,e],[Kt,t],[1,n],[0,i]])}function un(e,t,n,i){return Gt(e,t,n,i,!0)}un.INSERT=1,un.DELETE=Kt,un.EQUAL=0;var dn=un,hn={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",r="[object Boolean]",a="[object Date]",s="[object Function]",l="[object GeneratorFunction]",c="[object Map]",u="[object Number]",d="[object Object]",h="[object Promise]",A="[object RegExp]",f="[object Set]",p="[object String]",g="[object Symbol]",m="[object WeakMap]",y="[object ArrayBuffer]",v="[object DataView]",C="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",x="[object Int16Array]",B="[object Int32Array]",E="[object Uint8Array]",S="[object Uint8ClampedArray]",k="[object Uint16Array]",_="[object Uint32Array]",D=/\w*$/,F=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,T={};T[o]=T["[object Array]"]=T[y]=T[v]=T[r]=T[a]=T[C]=T[b]=T[w]=T[x]=T[B]=T[c]=T[u]=T[d]=T[A]=T[f]=T[p]=T[g]=T[E]=T[S]=T[k]=T[_]=!0,T["[object Error]"]=T[s]=T[m]=!1;var N="object"==typeof Ht&&Ht&&Ht.Object===Object&&Ht,I="object"==typeof self&&self&&self.Object===Object&&self,R=N||I||Function("return this")(),$=t&&!t.nodeType&&t,M=$&&e&&!e.nodeType&&e,L=M&&M.exports===$;function V(e,t){return e.set(t[0],t[1]),e}function P(e,t){return e.add(t),e}function U(e,t,n,i){var o=-1,r=e?e.length:0;for(i&&r&&(n=e[++o]);++o<r;)n=t(n,e[o],o,e);return n}function Q(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(sV){}return t}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function j(e,t){return function(n){return e(t(n))}}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var K,G=Array.prototype,q=Function.prototype,W=Object.prototype,Y=R["__core-js_shared__"],X=(K=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",J=q.toString,Z=W.hasOwnProperty,ee=W.toString,te=RegExp("^"+J.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=L?R.Buffer:void 0,ie=R.Symbol,oe=R.Uint8Array,re=j(Object.getPrototypeOf,Object),ae=Object.create,se=W.propertyIsEnumerable,le=G.splice,ce=Object.getOwnPropertySymbols,ue=ne?ne.isBuffer:void 0,de=j(Object.keys,Object),he=Me(R,"DataView"),Ae=Me(R,"Map"),fe=Me(R,"Promise"),pe=Me(R,"Set"),ge=Me(R,"WeakMap"),me=Me(Object,"create"),ye=Qe(he),ve=Qe(Ae),Ce=Qe(fe),be=Qe(pe),we=Qe(ge),xe=ie?ie.prototype:void 0,Be=xe?xe.valueOf:void 0;function Ee(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function _e(e){this.__data__=new Se(e)}function De(e,t){var n=je(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&ze(e)}(e)&&Z.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var a in e)!t&&!Z.call(e,a)||r&&("length"==a||Pe(a,i))||n.push(a);return n}function Fe(e,t,n){var i=e[t];Z.call(e,t)&&He(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function Oe(e,t){for(var n=e.length;n--;)if(He(e[n][0],t))return n;return-1}function Te(e,t,n,i,h,m,F){var O;if(i&&(O=m?i(e,h,m,F):i(e)),void 0!==O)return O;if(!qe(e))return e;var N=je(e);if(N){if(O=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&Z.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,O)}else{var I=Ve(e),R=I==s||I==l;if(Ke(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(I==d||I==o||R&&!m){if(Q(e))return m?e:{};if(O=function(e){return"function"!=typeof e.constructor||Ue(e)?{}:(t=re(e),qe(t)?ae(t):{});var t}(R?{}:e),!t)return function(e,t){return Re(e,Le(e),t)}(e,function(e,t){return e&&Re(t,We(t),e)}(O,e))}else{if(!T[I])return m?e:{};O=function(e,t,n,i){var o=e.constructor;switch(t){case y:return Ie(e);case r:case a:return new o(+e);case v:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case C:case b:case w:case x:case B:case E:case S:case k:case _:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case c:return function(e,t,n){return U(t?n(H(e),!0):H(e),V,new e.constructor)}(e,i,n);case u:case p:return new o(e);case A:return function(e){var t=new e.constructor(e.source,D.exec(e));return t.lastIndex=e.lastIndex,t}(e);case f:return function(e,t,n){return U(t?n(z(e),!0):z(e),P,new e.constructor)}(e,i,n);case g:return s=e,Be?Object(Be.call(s)):{}}var s}(e,I,Te,t)}}F||(F=new _e);var $=F.get(e);if($)return $;if(F.set(e,O),!N)var M=n?function(e){return function(e,t,n){var i=t(e);return je(e)?i:function(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}(i,n(e))}(e,We,Le)}(e):We(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(M||e,(function(o,r){M&&(o=e[r=o]),Fe(O,r,Te(o,t,n,i,r,e,F))})),O}function Ne(e){return!(!qe(e)||(t=e,X&&X in t))&&(Ge(e)||Q(e)?te:F).test(Qe(e));var t}function Ie(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,n,i){n||(n={});for(var o=-1,r=t.length;++o<r;){var a=t[o],s=i?i(n[a],e[a],a,n,e):void 0;Fe(n,a,void 0===s?e[a]:s)}return n}function $e(e,t){var n,i,o=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ne(n)?n:void 0}Ee.prototype.clear=function(){this.__data__=me?me(null):{}},Ee.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ee.prototype.get=function(e){var t=this.__data__;if(me){var i=t[e];return i===n?void 0:i}return Z.call(t,e)?t[e]:void 0},Ee.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Z.call(t,e)},Ee.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():le.call(t,n,1),!0)},Se.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Oe(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,i=Oe(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new Ee,map:new(Ae||Se),string:new Ee}},ke.prototype.delete=function(e){return $e(this,e).delete(e)},ke.prototype.get=function(e){return $e(this,e).get(e)},ke.prototype.has=function(e){return $e(this,e).has(e)},ke.prototype.set=function(e,t){return $e(this,e).set(e,t),this},_e.prototype.clear=function(){this.__data__=new Se},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var i=n.__data__;if(!Ae||i.length<199)return i.push([e,t]),this;n=this.__data__=new ke(i)}return n.set(e,t),this};var Le=ce?j(ce,Object):function(){return[]},Ve=function(e){return ee.call(e)};function Pe(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||W)}function Qe(e){if(null!=e){try{return J.call(e)}catch(sV){}try{return e+""}catch(sV){}}return""}function He(e,t){return e===t||e!=e&&t!=t}(he&&Ve(new he(new ArrayBuffer(1)))!=v||Ae&&Ve(new Ae)!=c||fe&&Ve(fe.resolve())!=h||pe&&Ve(new pe)!=f||ge&&Ve(new ge)!=m)&&(Ve=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,i=n?Qe(n):void 0;if(i)switch(i){case ye:return v;case ve:return c;case Ce:return h;case be:return f;case we:return m}return t});var je=Array.isArray;function ze(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!Ge(e)}var Ke=ue||function(){return!1};function Ge(e){var t=qe(e)?ee.call(e):"";return t==s||t==l}function qe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function We(e){return ze(e)?De(e):function(e){if(!Ue(e))return de(e);var t=[];for(var n in Object(e))Z.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}}(hn,hn.exports);var An={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",r="[object Array]",a="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",h="[object Object]",A="[object Promise]",f="[object RegExp]",p="[object Set]",g="[object String]",m="[object Symbol]",y="[object WeakMap]",v="[object ArrayBuffer]",C="[object DataView]",b=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[o]=x[r]=x[v]=x[a]=x[C]=x[s]=x[l]=x[c]=x[u]=x[d]=x[h]=x[f]=x[p]=x[g]=x[y]=!1;var B="object"==typeof Ht&&Ht&&Ht.Object===Object&&Ht,E="object"==typeof self&&self&&self.Object===Object&&self,S=B||E||Function("return this")(),k=t&&!t.nodeType&&t,_=k&&e&&!e.nodeType&&e,D=_&&_.exports===k,F=D&&B.process,O=function(){try{return F&&F.binding&&F.binding("util")}catch(sV){}}(),T=O&&O.isTypedArray;function N(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var $,M,L,V=Array.prototype,P=Function.prototype,U=Object.prototype,Q=S["__core-js_shared__"],H=P.toString,j=U.hasOwnProperty,z=($=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",K=U.toString,G=RegExp("^"+H.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=D?S.Buffer:void 0,W=S.Symbol,Y=S.Uint8Array,X=U.propertyIsEnumerable,J=V.splice,Z=W?W.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=q?q.isBuffer:void 0,ne=(M=Object.keys,L=Object,function(e){return M(L(e))}),ie=Oe(S,"DataView"),oe=Oe(S,"Map"),re=Oe(S,"Promise"),ae=Oe(S,"Set"),se=Oe(S,"WeakMap"),le=Oe(Object,"create"),ce=Re(ie),ue=Re(oe),de=Re(re),he=Re(ae),Ae=Re(se),fe=W?W.prototype:void 0,pe=fe?fe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function Ce(e){var t=this.__data__=new me(e);this.size=t.size}function be(e,t){var n=Le(e),i=!n&&Me(e),o=!n&&!i&&Ve(e),r=!n&&!i&&!o&&je(e),a=n||i||o||r,s=a?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=s.length;for(var c in e)!t&&!j.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ie(c,l))||s.push(c);return s}function we(e,t){for(var n=e.length;n--;)if($e(e[n][0],t))return n;return-1}function xe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=j.call(e,Z),n=e[Z];try{e[Z]=void 0;var i=!0}catch(sV){}var o=K.call(e);i&&(t?e[Z]=n:delete e[Z]);return o}(e):function(e){return K.call(e)}(e)}function Be(e){return He(e)&&xe(e)==o}function Ee(e,t,n,i,c){return e===t||(null==e||null==t||!He(e)&&!He(t)?e!=e&&t!=t:function(e,t,n,i,c,A){var y=Le(e),b=Le(t),w=y?r:Ne(e),x=b?r:Ne(t),B=(w=w==o?h:w)==h,E=(x=x==o?h:x)==h,S=w==x;if(S&&Ve(e)){if(!Ve(t))return!1;y=!0,B=!1}if(S&&!B)return A||(A=new Ce),y||je(e)?_e(e,t,n,i,c,A):function(e,t,n,i,o,r,c){switch(n){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v:return!(e.byteLength!=t.byteLength||!r(new Y(e),new Y(t)));case a:case s:case d:return $e(+e,+t);case l:return e.name==t.name&&e.message==t.message;case f:case g:return e==t+"";case u:var h=I;case p:var A=1&i;if(h||(h=R),e.size!=t.size&&!A)return!1;var y=c.get(e);if(y)return y==t;i|=2,c.set(e,t);var b=_e(h(e),h(t),i,o,r,c);return c.delete(e),b;case m:if(pe)return pe.call(e)==pe.call(t)}return!1}(e,t,w,n,i,c,A);if(!(1&n)){var k=B&&j.call(e,"__wrapped__"),_=E&&j.call(t,"__wrapped__");if(k||_){var D=k?e.value():e,F=_?t.value():t;return A||(A=new Ce),c(D,F,n,i,A)}}if(!S)return!1;return A||(A=new Ce),function(e,t,n,i,o,r){var a=1&n,s=De(e),l=s.length,c=De(t).length;if(l!=c&&!a)return!1;var u=l;for(;u--;){var d=s[u];if(!(a?d in t:j.call(t,d)))return!1}var h=r.get(e);if(h&&r.get(t))return h==t;var A=!0;r.set(e,t),r.set(t,e);var f=a;for(;++u<l;){var p=e[d=s[u]],g=t[d];if(i)var m=a?i(g,p,d,t,e,r):i(p,g,d,e,t,r);if(!(void 0===m?p===g||o(p,g,n,i,r):m)){A=!1;break}f||(f="constructor"==d)}if(A&&!f){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(A=!1)}return r.delete(e),r.delete(t),A}(e,t,n,i,c,A)}(e,t,n,i,Ee,c))}function Se(e){return!(!Qe(e)||function(e){return!!z&&z in e}(e))&&(Pe(e)?G:b).test(Re(e))}function ke(e){if(n=(t=e)&&t.constructor,i="function"==typeof n&&n.prototype||U,t!==i)return ne(e);var t,n,i,o=[];for(var r in Object(e))j.call(e,r)&&"constructor"!=r&&o.push(r);return o}function _e(e,t,n,i,o,r){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=r.get(e);if(c&&r.get(t))return c==t;var u=-1,d=!0,h=2&n?new ve:void 0;for(r.set(e,t),r.set(t,e);++u<s;){var A=e[u],f=t[u];if(i)var p=a?i(f,A,u,t,e,r):i(A,f,u,e,t,r);if(void 0!==p){if(p)continue;d=!1;break}if(h){if(!N(t,(function(e,t){if(a=t,!h.has(a)&&(A===e||o(A,e,n,i,r)))return h.push(t);var a}))){d=!1;break}}else if(A!==f&&!o(A,f,n,i,r)){d=!1;break}}return r.delete(e),r.delete(t),d}function De(e){return function(e,t,n){var i=t(e);return Le(e)?i:function(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}(i,n(e))}(e,ze,Te)}function Fe(e,t){var n,i,o=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Se(n)?n:void 0}ge.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(le){var i=t[e];return i===n?void 0:i}return j.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:j.call(t,e)},ge.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=le&&void 0===t?n:t,this},me.prototype.clear=function(){this.__data__=[],this.size=0},me.prototype.delete=function(e){var t=this.__data__,n=we(t,e);return!(n<0)&&(n==t.length-1?t.pop():J.call(t,n,1),--this.size,!0)},me.prototype.get=function(e){var t=this.__data__,n=we(t,e);return n<0?void 0:t[n][1]},me.prototype.has=function(e){return we(this.__data__,e)>-1},me.prototype.set=function(e,t){var n=this.__data__,i=we(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||me),string:new ge}},ye.prototype.delete=function(e){var t=Fe(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Fe(this,e).get(e)},ye.prototype.has=function(e){return Fe(this,e).has(e)},ye.prototype.set=function(e,t){var n=Fe(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},ve.prototype.add=ve.prototype.push=function(e){return this.__data__.set(e,n),this},ve.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new me,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof me){var i=n.__data__;if(!oe||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(i)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n<i;){var a=e[n];t(a,n,e)&&(r[o++]=a)}return r}(ee(e),(function(t){return X.call(e,t)})))}:function(){return[]},Ne=xe;function Ie(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Re(e){if(null!=e){try{return H.call(e)}catch(sV){}try{return e+""}catch(sV){}}return""}function $e(e,t){return e===t||e!=e&&t!=t}(ie&&Ne(new ie(new ArrayBuffer(1)))!=C||oe&&Ne(new oe)!=u||re&&Ne(re.resolve())!=A||ae&&Ne(new ae)!=p||se&&Ne(new se)!=y)&&(Ne=function(e){var t=xe(e),n=t==h?e.constructor:void 0,i=n?Re(n):"";if(i)switch(i){case ce:return C;case ue:return u;case de:return A;case he:return p;case Ae:return y}return t});var Me=Be(function(){return arguments}())?Be:function(e){return He(e)&&j.call(e,"callee")&&!X.call(e,"callee")},Le=Array.isArray;var Ve=te||function(){return!1};function Pe(e){if(!Qe(e))return!1;var t=xe(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ue(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var je=T?function(e){return function(t){return e(t)}}(T):function(e){return He(e)&&Ue(e.length)&&!!x[xe(e)]};function ze(e){return null!=(t=e)&&Ue(t.length)&&!Pe(t)?be(e):ke(e);var t}e.exports=function(e,t){return Ee(e,t)}}(An,An.exports);var fn={};Object.defineProperty(fn,"__esModule",{value:!0});const pn=hn.exports,gn=An.exports;var mn,yn;(yn=mn||(mn={})).compose=function(e={},t={},n=!1){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});let i=pn(t);n||(i=Object.keys(i).reduce(((e,t)=>(null!=i[t]&&(e[t]=i[t]),e)),{}));for(const o in e)void 0!==e[o]&&void 0===t[o]&&(i[o]=e[o]);return Object.keys(i).length>0?i:void 0},yn.diff=function(e={},t={}){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});const n=Object.keys(e).concat(Object.keys(t)).reduce(((n,i)=>(gn(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n)),{});return Object.keys(n).length>0?n:void 0},yn.invert=function(e={},t={}){e=e||{};const n=Object.keys(t).reduce(((n,i)=>(t[i]!==e[i]&&void 0!==e[i]&&(n[i]=t[i]),n)),{});return Object.keys(e).reduce(((n,i)=>(e[i]!==t[i]&&void 0===t[i]&&(n[i]=null),n)),n)},yn.transform=function(e,t,n=!1){if("object"!=typeof e)return t;if("object"!=typeof t)return;if(!n)return t;const i=Object.keys(t).reduce(((n,i)=>(void 0===e[i]&&(n[i]=t[i]),n)),{});return Object.keys(i).length>0?i:void 0},fn.default=mn;var vn,Cn={};Object.defineProperty(Cn,"__esModule",{value:!0}),(vn||(vn={})).length=function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"object"==typeof e.retain&&null!==e.retain?1:"string"==typeof e.insert?e.insert.length:1},Cn.default=vn;var bn={};Object.defineProperty(bn,"__esModule",{value:!0});const wn=Cn;bn.default=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const t=this.ops[this.index];if(t){const n=this.offset,i=wn.default.length(t);if(e>=i-n?(e=i-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};{const i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"object"==typeof t.retain&&null!==t.retain?i.retain=t.retain:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?wn.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?"number"==typeof e.delete?"delete":"number"==typeof e.retain||"object"==typeof e.retain&&null!==e.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const e=this.offset,t=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(i)}}return[]}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=dn,i=hn.exports,o=An.exports,r=fn;t.AttributeMap=r.default;const a=Cn;t.Op=a.default;const s=bn;t.OpIterator=s.default;const l=String.fromCharCode(0),c=(e,t)=>{if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);const n=Object.keys(e)[0];if(!n||n!==Object.keys(t)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(t)[0]}`);return[n,e[n],t[n]]};class u{constructor(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}static registerEmbed(e,t){this.handlers[e]=t}static unregisterEmbed(e){delete this.handlers[e]}static getHandler(e){const t=this.handlers[e];if(!t)throw new Error(`no handlers for embed type "${e}"`);return t}insert(e,t){const n={};return"string"==typeof e&&0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))}delete(e){return e<=0?this:this.push({delete:e})}retain(e,t){if("number"==typeof e&&e<=0)return this;const n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)}push(e){let t=this.ops.length,n=this.ops[t-1];if(e=i(e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,n=this.ops[t-1],"object"!=typeof n))return this.ops.unshift(e),this;if(o(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this}chop(){const e=this.ops[this.ops.length-1];return e&&"number"==typeof e.retain&&!e.attributes&&this.ops.pop(),this}filter(e){return this.ops.filter(e)}forEach(e){this.ops.forEach(e)}map(e){return this.ops.map(e)}partition(e){const t=[],n=[];return this.forEach((i=>{(e(i)?t:n).push(i)})),[t,n]}reduce(e,t){return this.ops.reduce(e,t)}changeLength(){return this.reduce(((e,t)=>t.insert?e+a.default.length(t):t.delete?e-t.delete:e),0)}length(){return this.reduce(((e,t)=>e+a.default.length(t)),0)}slice(e=0,t=1/0){const n=[],i=new s.default(this.ops);let o=0;for(;o<t&&i.hasNext();){let r;o<e?r=i.next(e-o):(r=i.next(t-o),n.push(r)),o+=a.default.length(r)}return new u(n)}compose(e){const t=new s.default(this.ops),n=new s.default(e.ops),i=[],a=n.peek();if(null!=a&&"number"==typeof a.retain&&null==a.attributes){let e=a.retain;for(;"insert"===t.peekType()&&t.peekLength()<=e;)e-=t.peekLength(),i.push(t.next());a.retain-e>0&&n.next(a.retain-e)}const l=new u(i);for(;t.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===t.peekType())l.push(t.next());else{const e=Math.min(t.peekLength(),n.peekLength()),i=t.next(e),a=n.next(e);if(a.retain){const s={};if("number"==typeof i.retain)s.retain="number"==typeof a.retain?e:a.retain;else if("number"==typeof a.retain)null==i.retain?s.insert=i.insert:s.retain=i.retain;else{const e=null==i.retain?"insert":"retain",[t,n,o]=c(i[e],a.retain),r=u.getHandler(t);s[e]={[t]:r.compose(n,o,"retain"===e)}}const d=r.default.compose(i.attributes,a.attributes,"number"==typeof i.retain);if(d&&(s.attributes=d),l.push(s),!n.hasNext()&&o(l.ops[l.ops.length-1],s)){const e=new u(t.rest());return l.concat(e).chop()}}else"number"==typeof a.delete&&("number"==typeof i.retain||"object"==typeof i.retain&&null!==i.retain)&&l.push(a)}return l.chop()}concat(e){const t=new u(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t}diff(e,t){if(this.ops===e.ops)return new u;const i=[this,e].map((t=>t.map((n=>{if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join(""))),a=new u,c=n(i[0],i[1],t,!0),d=new s.default(this.ops),h=new s.default(e.ops);return c.forEach((e=>{let t=e[1].length;for(;t>0;){let i=0;switch(e[0]){case n.INSERT:i=Math.min(h.peekLength(),t),a.push(h.next(i));break;case n.DELETE:i=Math.min(t,d.peekLength()),d.next(i),a.delete(i);break;case n.EQUAL:i=Math.min(d.peekLength(),h.peekLength(),t);const e=d.next(i),s=h.next(i);o(e.insert,s.insert)?a.retain(i,r.default.diff(e.attributes,s.attributes)):a.push(s).delete(i)}t-=i}})),a.chop()}eachLine(e,t="\n"){const n=new s.default(this.ops);let i=new u,o=0;for(;n.hasNext();){if("insert"!==n.peekType())return;const r=n.peek(),s=a.default.length(r)-n.peekLength(),l="string"==typeof r.insert?r.insert.indexOf(t,s)-s:-1;if(l<0)i.push(n.next());else if(l>0)i.push(n.next(l));else{if(!1===e(i,n.next(1).attributes||{},o))return;o+=1,i=new u}}i.length()>0&&e(i,{},o)}invert(e){const t=new u;return this.reduce(((n,i)=>{if(i.insert)t.delete(a.default.length(i));else{if("number"==typeof i.retain&&null==i.attributes)return t.retain(i.retain),n+i.retain;if(i.delete||"number"==typeof i.retain){const o=i.delete||i.retain;return e.slice(n,n+o).forEach((e=>{i.delete?t.push(e):i.retain&&i.attributes&&t.retain(a.default.length(e),r.default.invert(i.attributes,e.attributes))})),n+o}if("object"==typeof i.retain&&null!==i.retain){const o=e.slice(n,n+1),a=new s.default(o.ops).next(),[l,d,h]=c(i.retain,a.insert),A=u.getHandler(l);return t.retain({[l]:A.invert(d,h)},r.default.invert(i.attributes,a.attributes)),n+1}}return n}),0),t.chop()}transform(e,t=!1){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);const n=e,i=new s.default(this.ops),o=new s.default(n.ops),l=new u;for(;i.hasNext()||o.hasNext();)if("insert"!==i.peekType()||!t&&"insert"===o.peekType())if("insert"===o.peekType())l.push(o.next());else{const e=Math.min(i.peekLength(),o.peekLength()),n=i.next(e),a=o.next(e);if(n.delete)continue;if(a.delete)l.push(a);else{const i=n.retain,o=a.retain;let s="object"==typeof o&&null!==o?o:e;if("object"==typeof i&&null!==i&&"object"==typeof o&&null!==o){const e=Object.keys(i)[0];if(e===Object.keys(o)[0]){const n=u.getHandler(e);n&&(s={[e]:n.transform(i[e],o[e],t)})}}l.retain(s,r.default.transform(n.attributes,a.attributes,t))}}else l.retain(a.default.length(i.next()));return l.chop()}transformPosition(e,t=!1){t=!!t;const n=new s.default(this.ops);let i=0;for(;n.hasNext()&&i<=e;){const o=n.peekLength(),r=n.peekType();n.next(),"delete"!==r?("insert"===r&&(i<e||!t)&&(e+=o),i+=o):e-=Math.min(o,e-i)}return e}}u.Op=a.default,u.OpIterator=s.default,u.AttributeMap=r.default,u.handlers={},t.default=u,e.exports=u,e.exports.default=u}(zt,zt.exports);var xn=jt(zt.exports);
6
+ */function xe(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Be(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Ee(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;ke(e,n,[],e._modules.root,!0),Se(e,n,t)}function Se(e,t,n){var i=e._state,o=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,a={},s={},l=c.effectScope(!0);l.run((function(){xe(r,(function(t,n){a[n]=function(e,t){return function(){return e(t)}}(t,e),s[n]=c.computed((function(){return a[n]()})),Object.defineProperty(e.getters,n,{get:function(){return s[n].value},enumerable:!0})}))})),e._state=c.reactive({data:t}),e._scope=l,e.strict&&function(e){c.watch((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),i&&n&&e._withCommit((function(){i.data=null})),o&&o.stop()}function ke(e,t,n,i,o){var r=!n.length,a=e._modules.getNamespace(n);if(i.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=i),!r&&!o){var s=De(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){s[l]=i.state}))}var c=i.context=function(e,t,n){var i=""===t,o={dispatch:i?e.dispatch:function(n,i,o){var r=Fe(n,i,o),a=r.payload,s=r.options,l=r.type;return s&&s.root||(l=t+l),e.dispatch(l,a)},commit:i?e.commit:function(n,i,o){var r=Fe(n,i,o),a=r.payload,s=r.options,l=r.type;s&&s.root||(l=t+l),e.commit(l,a,s)}};return Object.defineProperties(o,{getters:{get:i?function(){return e.getters}:function(){return _e(e,t)}},state:{get:function(){return De(e.state,n)}}}),o}(e,a,n);i.forEachMutation((function(t,n){!function(e,t,n,i){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,i.state,t)}))}(e,a+n,t,c)})),i.forEachAction((function(t,n){var i=t.root?n:a+n,o=t.handler||t;!function(e,t,n,i){(e._actions[t]||(e._actions[t]=[])).push((function(t){var o,r=n.call(e,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:e.getters,rootState:e.state},t);return(o=r)&&"function"==typeof o.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}(e,i,o,c)})),i.forEachGetter((function(t,n){!function(e,t,n,i){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(i.state,i.getters,e.state,e.getters)}}(e,a+n,t,c)})),i.forEachChild((function(i,r){ke(e,t,n.concat(r),i,o)}))}function _e(e,t){if(!e._makeLocalGettersCache[t]){var n={},i=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,i)===t){var r=o.slice(i);Object.defineProperty(n,r,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function De(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Fe(e,t,n){var i;return null!==(i=e)&&"object"==typeof i&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Oe="vuex:mutations",Te="vuex:actions",Ne="vuex",Ie=0;function Re(e,t){we({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:Oe,label:"Vuex Mutations",color:$e}),n.addTimelineLayer({id:Te,label:"Vuex Actions",color:$e}),n.addInspector({id:Ne,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===Ne)if(n.filter){var i=[];Pe(i,t._modules.root,n.filter,""),n.rootNodes=i}else n.rootNodes=[Ve(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===Ne){var i=n.nodeId;_e(t,i),n.state=function(e,t,n){t="root"===n?t:t[n];var i=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(i.length){var r=function(e){var t={};return Object.keys(e).forEach((function(n){var i=n.split("/");if(i.length>1){var o=t,r=i.pop();i.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[r]=Ue((function(){return e[n]}))}else t[n]=Ue((function(){return e[n]}))})),t}(t);o.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?Le(e):e,editable:!1,value:Ue((function(){return r[e]}))}}))}return o}((o=t._modules,(a=(r=i).split("/").filter((function(e){return e}))).reduce((function(e,t,n){var i=e[t];if(!i)throw new Error('Missing module "'+t+'" for path "'+r+'".');return n===a.length-1?i:i._children}),"root"===r?o:o.root._children)),"root"===i?t.getters:t._makeLocalGettersCache,i)}var o,r,a})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===Ne){var i=n.nodeId,o=n.path;"root"!==i&&(o=i.split("/").filter(Boolean).concat(o)),t._withCommit((function(){n.set(t._state.data,o,n.state.value)}))}})),t.subscribe((function(e,t){var i={};e.payload&&(i.payload=e.payload),i.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(Ne),n.sendInspectorState(Ne),n.addTimelineEvent({layerId:Oe,event:{time:Date.now(),title:e.type,data:i}})})),t.subscribeAction({before:function(e,t){var i={};e.payload&&(i.payload=e.payload),e._id=Ie++,e._time=Date.now(),i.state=t,n.addTimelineEvent({layerId:Te,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:i}})},after:function(e,t){var i={},o=Date.now()-e._time;i.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(i.payload=e.payload),i.state=t,n.addTimelineEvent({layerId:Te,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:i}})}})}))}var $e=8702998,Me={label:"namespaced",textColor:16777215,backgroundColor:6710886};function Le(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Ve(e,t){return{id:t||"root",label:Le(t),tags:e.namespaced?[Me]:[],children:Object.keys(e._children).map((function(n){return Ve(e._children[n],t+n+"/")}))}}function Pe(e,t,n,i){i.includes(n)&&e.push({id:i||"root",label:i.endsWith("/")?i.slice(0,i.length-1):i||"Root",tags:t.namespaced?[Me]:[]}),Object.keys(t._children).forEach((function(o){Pe(e,t._children[o],n,i+o+"/")}))}function Ue(e){try{return e()}catch(sV){return sV}}var Qe=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},He={namespaced:{configurable:!0}};He.namespaced.get=function(){return!!this._rawModule.namespaced},Qe.prototype.addChild=function(e,t){this._children[e]=t},Qe.prototype.removeChild=function(e){delete this._children[e]},Qe.prototype.getChild=function(e){return this._children[e]},Qe.prototype.hasChild=function(e){return e in this._children},Qe.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Qe.prototype.forEachChild=function(e){xe(this._children,e)},Qe.prototype.forEachGetter=function(e){this._rawModule.getters&&xe(this._rawModule.getters,e)},Qe.prototype.forEachAction=function(e){this._rawModule.actions&&xe(this._rawModule.actions,e)},Qe.prototype.forEachMutation=function(e){this._rawModule.mutations&&xe(this._rawModule.mutations,e)},Object.defineProperties(Qe.prototype,He);var je=function(e){this.register([],e,!1)};function ze(e,t,n){if(t.update(n),n.modules)for(var i in n.modules){if(!t.getChild(i))return;ze(e.concat(i),t.getChild(i),n.modules[i])}}je.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},je.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},je.prototype.update=function(e){ze([],this.root,e)},je.prototype.register=function(e,t,n){var i=this;void 0===n&&(n=!0);var o=new Qe(t,n);0===e.length?this.root=o:this.get(e.slice(0,-1)).addChild(e[e.length-1],o);t.modules&&xe(t.modules,(function(t,o){i.register(e.concat(o),t,n)}))},je.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],i=t.getChild(n);i&&i.runtime&&t.removeChild(n)},je.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Ke=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var i=e.strict;void 0===i&&(i=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new je(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var r=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(r,e,t)},this.commit=function(e,t,n){return s.call(r,e,t,n)},this.strict=i;var l=this._modules.root.state;ke(this,l,[],this._modules.root),Se(this,l),n.forEach((function(e){return e(t)}))},Ge={state:{configurable:!0}};Ke.prototype.install=function(e,t){e.provide(t||"store",this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&Re(e,this)},Ge.state.get=function(){return this._state.data},Ge.state.set=function(e){},Ke.prototype.commit=function(e,t,n){var i=this,o=Fe(e,t,n),r=o.type,a=o.payload,s={type:r,payload:a},l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,i.state)})))},Ke.prototype.dispatch=function(e,t){var n=this,i=Fe(e,t),o=i.type,r=i.payload,a={type:o,payload:r},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(sV){}var l=s.length>1?Promise.all(s.map((function(e){return e(r)}))):s[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(sV){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(sV){}t(e)}))}))}},Ke.prototype.subscribe=function(e,t){return Be(e,this._subscribers,t)},Ke.prototype.subscribeAction=function(e,t){return Be("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},Ke.prototype.watch=function(e,t,n){var i=this;return c.watch((function(){return e(i.state,i.getters)}),t,Object.assign({},n))},Ke.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Ke.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),ke(this,this.state,e,this._modules.get(e),n.preserveState),Se(this,this.state)},Ke.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete De(t.state,e.slice(0,-1))[e[e.length-1]]})),Ee(this)},Ke.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},Ke.prototype.hotUpdate=function(e){this._modules.update(e),Ee(this,!0)},Ke.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Ke.prototype,Ge);const qe={state:{clientHeight:window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,clientWidth:window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,mychartColor:{pie:["#FF8636","#028154","#FC635B","#FDBA4F","#436EFD","#7ACBBD","#6882FF","#819DE4"],bar:["#627AE1","#8CBBFF","#8CE8BB"],line:["#01332F","#627AE1","#ED6A4C"]},floorMap:{}},mutations:{setClientHeight(e){e.clientHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height},setClientWidth(e){e.clientWidth=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width},setMychartColor(e,t,n){let i=[];n&&n.forEach((e=>{e&&i.push(e)})),e.mychartColor[t]=i},setFloorMap(e,t){Object.assign(e.floorMap,t)}}};var We=new Ke({state:{},mutations:{},actions:{},modules:{app:qe}}),Ye=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n};var Xe=Ye({name:"ebutton",data:()=>({visible:!0,btn:{},colorStyle:{selected:"#2d8cf0",unselected:"#3f414d",disabled:"#c5c8ce"},mouseStyle:{usable:"cursor: pointer",disabled:"cursor:not-allowed"},iconStyle:{seletedSize:40,unseletedSize:30},divStyle:"cursor: pointer",disabled:!1,iconSize:30,fontStyle:"font-size: 10px;color:#3f414d",iconColor:"#3f414d"}),props:{config:{type:Object,default:null},amplify:{type:Boolean,default:!0},dynamic:{type:Boolean,default:!0},type:{type:String,default:""},size:{type:Number,default:30},color:{type:String,default:""},text:{type:String,default:""},fontsize:{type:String,default:"10px"},fontplacement:{validator:e=>_(e,["bottom","right"]),default:"bottom"}},created(){this.config?(this.btn=this.config,this.config.size&&(this.iconSize=this.config.size),this.config.color&&(this.iconColor=this.config.color)):(this.btn.iconcls=this.type,this.btn.text=this.text,this.iconSize=this.size,this.iconColor=this.color),this.setStyle("unselected")},methods:{doAction(e){this.disabled||this.$emit("click",e)},changeActive(){this.dynamic&&this.setStyle("selected")},removeActive(){this.dynamic&&this.setStyle("unselected")},setStyle(e){switch(e){case"selected":this.disabled||(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.selected,this.amplify&&(this.iconSize=this.iconStyle.seletedSize,this.iconColor=this.colorStyle.selected));break;case"unselected":this.disabled||(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.unselected,this.amplify&&(this.iconSize=this.iconStyle.unseletedSize,this.iconColor=this.colorStyle.unselected));break;case"disabled":this.disabled?(this.fontStyle="font-size: "+this.fontsize+";color:"+this.colorStyle.disabled,this.amplify&&(this.iconSize=this.iconStyle.unseletedSize,this.iconColor=this.colorStyle.disabled),this.divStyle=this.mouseStyle.disabled):(this.divStyle=this.mouseStyle.usable,this.setStyle("unselected"))}},setEnabled(e){this.disabled=e,this.setStyle("disabled")},setVisible(e){this.visible=e}}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("CommonIcon"),s=c.resolveComponent("Span"),l=c.resolveComponent("Col"),u=c.resolveComponent("Row");return o.visible?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(o.divStyle),onClick:t[0]||(t[0]=e=>r.doAction(o.btn.name)),onMouseover:t[1]||(t[1]=e=>r.changeActive(e)),onMouseout:t[2]||(t[2]=e=>r.removeActive(e))},[c.createVNode(u,{type:"flex",justify:"center"},{default:c.withCtx((()=>[c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(a,{type:o.btn.iconcls,size:o.iconSize,color:o.iconColor},null,8,["type","size","color"]),c.withDirectives(c.createVNode(s,{style:c.normalizeStyle(o.fontStyle)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.btn.text),1)])),_:1},8,["style"]),[[c.vShow,"right"===n.fontplacement&&void 0!==o.btn.text]])])),_:1})])),_:1}),c.withDirectives(c.createVNode(u,{type:"flex",justify:"center"},{default:c.withCtx((()=>[c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(s,{style:c.normalizeStyle(o.fontStyle)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.btn.text),1)])),_:1},8,["style"])])),_:1})])),_:1},512),[[c.vShow,"bottom"===n.fontplacement&&void 0!==o.btn.text]])],36)):c.createCommentVNode("",!0)}]]);const Je={name:"Toolbar",data:()=>({globalConfig:{moduleMethod:[]},btnList:[],myConfig:{spacing:16},modulecode:"",token:"",buttonSize:"default",btnShow:!0,showType:!0,visible:!0,showAddData:!1,showBatchAction:!1,vjustify:"center",defaultStatus:{N:["saveData"],V:["addData","editData","auditData","delData"],E:["addData","saveData","delData"],S:["addData","editData","auditData","delData","printData"],A:["addData","copyData","cancelData"],C:["addData","printData"],D:["addData"]},defaultRule:{billstatus:{Y:["addData","cancelData","printData"],N:["addData","editData","auditData","delData","printData"],C:["addData","printData"]}}}),props:{type:{validator:e=>_(e,["horizontal","vertical"]),default:"vertical"},config:{type:Object,default:()=>({})},amplify:{type:Boolean,default:!0},fontplacement:{validator:e=>_(e,["bottom","right"]),default:"right"},showback:{type:Boolean,default:!1},tooltype:{type:String,default:"form"},btntype:{validator:e=>_(e,["Button","Ebutton"]),default:"Ebutton"},moduleMethod:{type:Array,default:()=>[]},billmoduleid:{type:String,default:""},checkBtn:{type:Boolean,default:!1},row:{type:Object,default:()=>({})}},created(){this.init()},components:{Ebutton:Xe},methods:{init(){this.config&&(this.myConfig=Object.assign({},this.myConfig,this.config)),this.myConfig.items||(this.myConfig.items=[]),this.myConfig.buttonSize&&(this.buttonSize=this.myConfig.buttonSize),this.moduleMethod.length>0&&(this.globalConfig.moduleMethod=this.$Method.copy(this.moduleMethod)),this.filterBtn(),this.btnList.length>0?this.visible=!0:"batch"===this.tooltype?this.visible=this.showAddData:this.visible=!1,this.btnList.forEach((e=>{void 0===e.visible&&(e.visible=!0)}))},filterBtn(){this.checkBtn&&this.getModuleMethod(),this.filterBtnByToken()},getModuleMethod(){if(this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid")),this.billmoduleid&&(this.modulecode=this.billmoduleid),this.token=this.$Method.getUrlParam("token"),this.modulecode&&this.token){let e=this.getUserModuleMethod(this.modulecode);e&&(this.globalConfig.moduleMethod=e.modulemethod)}},filterBtnByToken(){let e=this.commonFilterBtn(),t=[],n=[],i=[];if(e.forEach((e=>{"addData"===e.name&&(this.showAddData=!0),"batch"===e.iconcls?i.push(e):"row"===e.iconcls?n.push(e):t.push(e)})),i.length>0&&(this.showBatchAction=!0),"batch"===this.tooltype)this.btnList=this.$Method.copy(i);else if("row"===this.tooltype)this.btnList=this.$Method.copy(n);else{if("right"===this.fontplacement&&(this.vjustify="start"),this.btnList=this.$Method.copy(t),this.isBillImport()){let e={};this.myConfig.importbtn&&"{}"!==JSON.stringify(this.myConfig.importbtn)?(e=Object.assign({},{iconcls:"_download",name:"downTemplate",text:this.$t("导入模版")},this.myConfig.backbtn),e.name="downTemplate"):e={iconcls:"_download",name:"downTemplate",text:this.$t("导入模版")},e.visible=!0,this.btnList.push(e)}if(this.showback){let e={};this.myConfig.backbtn&&"{}"!==JSON.stringify(this.myConfig.backbtn)?(e=Object.assign({},{iconcls:"_back",name:"back",text:this.$t("返回")},this.myConfig.backbtn),e.name="back"):e={iconcls:"_back",name:"back",text:this.$t("返回")},e.visible=!0,this.btnList.push(e)}this.initStatus()}},commonFilterBtn(){if(this.globalConfig.moduleMethod.length<=0)return this.myConfig.items;let e=[];this.globalConfig.moduleMethod.forEach((t=>{let n=this.myConfig.items.findIndex((e=>e.name===t.name));n>-1&&e.push(this.$Method.copy(this.myConfig.items[n]))}));let t=this.myConfig.items.findIndex((e=>"editRowForm"===e.name));return t>-1&&e.push(this.$Method.copy(this.myConfig.items[t])),e},initStatus(){this.myConfig.status?Object.keys(this.defaultStatus).forEach((e=>{void 0===this.myConfig.status[e]&&(this.myConfig.status[e]=[]);let t=this.myConfig.status[e].concat(this.defaultStatus[e]);this.myConfig.status[e]=this.uniqueArr(t)})):this.myConfig.status=this.$Method.copy(this.defaultStatus),this.myConfig.rule?Object.keys(this.defaultRule).forEach((e=>{this.myConfig.rule[e]&&Object.keys(this.defaultRule[e]).forEach((t=>{this.defaultStatus[e]?(void 0===this.myConfig.rule[e][t]&&(this.myConfig.rule[e][t]=[]),void 0===this.defaultStatus[e][t]&&(this.defaultStatus[e][t]=[])):(this.defaultStatus[e]={},this.defaultStatus[e][t]=[],void 0===this.myConfig.rule[e][t]&&(this.myConfig.rule[e][t]=[]));let n=this.myConfig.rule[e][t].concat(this.defaultStatus[e][t]);this.myConfig.rule[e][t]=this.uniqueArr(n)}))})):this.myConfig.rule=this.$Method.copy(this.defaultRule)},click(e){let t={};t.name=e,this.$emit("doAction",t)},changedStatusCommon(e){this.btnList.forEach((e=>{this.setReadOnly(e.name,!0)})),e||(e=[]),(e=e.concat(["back","downTemplate","editRowForm"])).forEach((e=>{this.setReadOnly(e,!1)}))},changedStatus(e){if(e){let t=this.myConfig.status[e];this.changedStatusCommon(t)}},isBillImport(){return this.btnList.some((e=>"billImport"===e.name))},gridChangedStatus(e,t){if(this.myConfig&&this.myConfig.rule&&this.myConfig.rule[e]){let n=this.myConfig.rule[e][t];this.changedStatusCommon(n)}},uniqueArr(e){let t=[];for(let n=0,i=e.length;n<i;n++){for(let t=n+1;t<i;t++)e[n]===e[t]&&(t=++n);t.push(e[n])}return t},action(e){let t={};t.name=e,this.$emit("doAction",t)},getType:e=>e.type?e.type:"text",setVisible(e,t,n){let i=this.btntype;if(n&&(i=n),"Ebutton"===i)this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setVisible(t);else{const n=this.btnList.findIndex((t=>t.name===e));if(n>-1){let e=this.$Method.copy(this.btnList[n]);e.visible=t,this.btnList.splice(n,1,e)}}},setReadOnly(e,t,n){let i=this.btntype;if(n&&(i=n),"Ebutton"===i)this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setEnabled(t);else{const n=this.btnList.findIndex((t=>t.name===e));if(n>-1){let e=this.$Method.copy(this.btnList[n]);e.disabled=t,this.btnList.splice(n,1,e)}}}},mounted(){let e=this;e.config.customInit&&e.config.customInit(e.row,e)}},Ze={key:0},et={key:0},tt={href:"javascript:void(0)"};var nt=Ye(Je,[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Ebutton"),s=c.resolveComponent("Button"),l=c.resolveComponent("Col"),u=c.resolveComponent("Row"),d=c.resolveComponent("CommonIcon"),h=c.resolveComponent("DropdownItem"),A=c.resolveComponent("DropdownMenu"),f=c.resolveComponent("Dropdown");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,["form"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[o.visible?(c.openBlock(),c.createElementBlock("div",Ze,["horizontal"===n.type?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"start",gutter:o.myConfig.spacing},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(l,{key:"btn_"+t},{default:c.withCtx((()=>["Ebutton"===n.btntype?(c.openBlock(),c.createBlock(a,{key:0,ref_for:!0,ref:e.name,config:e,onClick:r.click,amplify:n.amplify,fontplacement:n.fontplacement,dynamic:o.myConfig.btnDynamic},null,8,["config","onClick","amplify","fontplacement","dynamic"])):c.createCommentVNode("",!0),"Button"===n.btntype?(c.openBlock(),c.createBlock(s,{key:1,ref_for:!0,ref:e.name,onClick:t=>r.action(e.name),icon:e.iconcls,type:e.type,size:o.buttonSize,disabled:e.disabled},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["onClick","icon","type","size","disabled"])):c.createCommentVNode("",!0)])),_:2},1024)),[[c.vShow,e.visible]]))),128))])),_:1},8,["gutter"])):c.createCommentVNode("",!0),"vertical"===n.type?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(o.btnList,((e,t)=>(c.openBlock(),c.createBlock(u,{type:"flex",justify:o.vjustify,key:"btn_"+t,style:{"margin-top":"5px"}},{default:c.withCtx((()=>["Ebutton"===n.btntype?(c.openBlock(),c.createBlock(a,{key:0,ref_for:!0,ref:e.name,config:e,onClick:r.click,amplify:n.amplify,fontplacement:n.fontplacement,dynamic:o.myConfig.btnDynamic},null,8,["config","onClick","amplify","fontplacement","dynamic"])):c.createCommentVNode("",!0),"Button"===n.btntype?c.withDirectives((c.openBlock(),c.createBlock(s,{key:1,ref_for:!0,ref:e.name,onClick:t=>r.action(e.name),icon:e.iconcls,type:e.type,size:o.buttonSize},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["onClick","icon","type","size"])),[[c.vShow,e.visible]]):c.createCommentVNode("",!0)])),_:2},1032,["justify"])))),128)):c.createCommentVNode("",!0)])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),"row"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[o.visible?(c.openBlock(),c.createElementBlock("div",et,[o.showType?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"center",gutter:8},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(l,{key:"btn_"+t},{default:c.withCtx((()=>[!0===o.myConfig.icon?(c.openBlock(),c.createBlock(s,{key:0,size:"small",type:r.getType(e),icon:e.icon,"custom-icon":e.customIcon,onClick:t=>r.action(e.name)},null,8,["type","icon","custom-icon","onClick"])):(c.openBlock(),c.createBlock(s,{key:1,size:"small",type:r.getType(e),onClick:t=>r.action(e.name)},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["type","onClick"]))])),_:2},1024)),[[c.vShow,e.visible]]))),128))])),_:1})):c.createCommentVNode("",!0),o.showType?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(f,{key:1,onOnClick:r.action},{list:c.withCtx((()=>[c.createVNode(A,null,{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(h,{key:"btndropdown_"+t,name:e.name},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["name"])),[[c.vShow,e.visible]]))),128))])),_:1})])),default:c.withCtx((()=>[c.createElementVNode("a",tt,[c.createTextVNode(c.toDisplayString(e.$t("操作"))+" ",1),c.createVNode(d,{type:"ios-arrow-down"})])])),_:1},8,["onOnClick"]))])):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0),"batch"===n.tooltype?(c.openBlock(),c.createElementBlock(c.Fragment,{key:2},[o.visible?(c.openBlock(),c.createBlock(u,{key:0,type:"flex",justify:"end",gutter:8},{default:c.withCtx((()=>[o.showAddData?(c.openBlock(),c.createBlock(l,{key:0},{default:c.withCtx((()=>[c.createVNode(s,{icon:"ios-add",onClick:t[0]||(t[0]=e=>r.action("addData"))},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.$t("新建")),1)])),_:1})])),_:1})):c.createCommentVNode("",!0),c.createVNode(l,null,{default:c.withCtx((()=>[o.showBatchAction?(c.openBlock(),c.createBlock(f,{key:0,onOnClick:r.action},{list:c.withCtx((()=>[c.createVNode(A,null,{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.btnList,((e,t)=>c.withDirectives((c.openBlock(),c.createBlock(h,{key:"dropbtn_"+t,name:e.name},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.text),1)])),_:2},1032,["name"])),[[c.vShow,e.visible]]))),128))])),_:1})])),default:c.withCtx((()=>[c.createVNode(s,null,{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.$t("批量操作"))+" ",1),c.createVNode(d,{type:"ios-arrow-down"})])),_:1})])),_:1},8,["onOnClick"])):c.createCommentVNode("",!0)])),_:1})])),_:1})):c.createCommentVNode("",!0)],64)):c.createCommentVNode("",!0)],512)),[[c.vShow,o.btnShow]])}]]),it={name:"size",data:()=>({calHeight:1,calWidth:1,adjustHeight:0,adjustWidth:0}),computed:{clientHeight(){return this.$Store.state.app.clientHeight},clientWidth(){return this.$Store.state.app.clientWidth},currentHeight(){let e=this.clientHeight;return this.calHeight&&(Number(this.calHeight)<=1?(e*=Number(this.calHeight),e=Number(e.toFixed(0))):e=this.calHeight),this.adjustHeight&&(e-=Number(this.adjustHeight)),e},currentWidth(){let e=this.clientWidth;return this.calWidth&&(Number(this.calWidth)<=1?(e*=Number(this.calWidth),e=Number(e.toFixed(1))):e=this.calWidth),this.adjustWidth&&(e-=Number(this.adjustWidth)),e}},methods:{setCalHeight(e){this.calHeight=e},setAdjustHeight(e){this.adjustHeight=e},setCalWidth(e){this.calWidth=e},setAdjustWidth(e){this.adjustWidth=e},setSizeConfig(e){e.height&&this.setCalHeight(e.height),e.width&&this.setCalWidth(e.width),e.adjustHeight&&this.setAdjustHeight(e.adjustHeight),e.adjustWidth&&this.setAdjustWidth(e.adjustWidth)}}};const ot={mixins:[it],data:()=>({globalConfig:{label:"",name:"",readOnly:!1,visible:!0,size:"default",valueChanged:"",placeholder:null,place:"",required:!1},myConfig:{},value:"",oldValue:"",hackReset:!0,showTooltip:!1,isEnter:!1}),props:{config:{type:Object,default:()=>{}},fatherValue:{type:[String,Number,Array],default:""},readOnly:{type:Boolean,default:!1}},created(){this.init()},methods:{init(){this.myConfig=Object.assign({},this.globalConfig,this.myConfig),this.config&&(this.myConfig=Object.assign({},this.myConfig,this.config)),this.customInit&&this.customInit()},_fatherValueToValue(e){return this.fatherValueToValue?this.fatherValueToValue(e):e},_valueToFatherValue(){let e=this.value;if(this.valueToFatherValue)return this.valueToFatherValue();{let t={};return t.value=e,t}},keyDown(e){let t=e+"KeyDown";this[t]&&this[t]()},enterKeyDown(){this.customEnterKeyDown&&this.customEnterKeyDown();let e=this;this.$nextTick((()=>{let t={};t.controlName=e.myConfig.name,e.myConfig.sname&&(t.controlName=e.myConfig.sname),t.name="enterKeyDown",e.$emit("doAction",t)}))},setFatherValue(e){let t=!0,n=this._valueToFatherValue();n.name=this.myConfig.name,this.myConfig.valueChanged&&(n.value!==this.oldValue||n.svalue!==this.oldSvalue||n.evalue!==this.oldEvalue?(t=this.myConfig.valueChanged(n),void 0===t&&(t=!0)):t=!1),t?(this.setFatherValueSuccess?this.setFatherValueSuccess(n):this.$emit("inputValue",n),this.$nextTick((()=>{this.isEnter&&(this.customEnterKeyDown?this.customEnterKeyDown(e):this.$parent.enterKeyDown&&this.$parent.enterKeyDown(),this.isEnter=!1)}))):this.setFatherValueFail?this.setFatherValueFail(e):this.$nextTick((()=>{this.value=this.oldValue}))},_setFatherValue(e){e||0===e||(e=this.myConfig.defaultValue),this.value=e,this.setFatherValue()},setPro(e){this.setCustomPro&&(e=this.setCustomPro(e)),e&&(this.myConfig=Object.assign({},this.myConfig,e))},setReadOnly(e){let t={};t.readOnly=e,!1===t.readOnly?!0!==this.config.readOnly&&this.setPro(t):this.setPro(t)},getPro(e){return this.myConfig[e]}},watch:{fatherValue:{handler(e){this.value=this._fatherValueToValue(e),this.oldValue=this.value,this.watchCustomFatherValue&&this.watchCustomFatherValue()},immediate:!0}}};var rt=Ye({name:"combobox",extends:ot,data:()=>({myConfig:{data:[],valueField:"code",textField:"name",maxTagCount:2,codeWithName:!0,defaultValue:"",filterable:!1,clearable:!0,readOnly:!1,showOptionGroup:!1,multiSelect:!1,editData:[],showNullItem:!1,filterData:null,transfer:!1}}),methods:{fatherValueToValue(e){return this.myConfig.multiSelect?e:e+""},watchCustomFatherValue(){let e={},t=!1;this.myConfig.multiSelect||""!==this.value?e.value=this.value:this.myConfig.showNullItem||1!==this.myConfig.data.length||(this.myConfig.required&&(this.myConfig.showOptionGroup?1===this.myConfig.data[0].data.length&&(this.value=this.myConfig.data[0].data[0][this.myConfig.valueField],t=!0):(this.value=this.myConfig.data[0][this.myConfig.valueField],t=!0)),e.value=this.value),this.oldValue=this.value,t&&this.$nextTick((()=>{e.name=this.myConfig.name,this.$emit("inputValue",e)}))},setPro(e){this.setCustomPro&&(e=this.setCustomPro(e)),e&&(this.myConfig=Object.assign({},this.myConfig,e))},isOptionShow(e){return!!this.myConfig.readOnly||e.visible},setCustomPro(e){return void 0!==e.data&&e.data.length>0&&(this.editData=[],this.myConfig.showOptionGroup?e.forEach((e=>{this.$Method.copy(e).data=[],e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e.label=e[this.myConfig.textField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)}))})):e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e.label=e[this.myConfig.textField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)}))),e},customInit(){this.editData=[],this.myConfig.data&&this.myConfig.data.length>0&&(this.myConfig.showOptionGroup?this.myConfig.data.forEach((e=>{let t=this.$Method.copy(e);t.data=[],e.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e[this.myConfig.textField]?e.label=e[this.myConfig.textField]:e.label=e[this.myConfig.valueField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)})),this.editData.push(t)})):this.myConfig.data.forEach((e=>{this.myConfig.codeWithName?e.label="["+e[this.myConfig.valueField]+"]"+e[this.myConfig.textField]:e[this.myConfig.textField]?e.label=e[this.myConfig.textField]:e.label=e[this.myConfig.valueField],this.myConfig.filterData?e.visible=this.myConfig.filterData(e):e.visible=this.doDictGroupKey(e)})))},onOpenChange(e){this.config.onOpenChange&&this.config.onOpenChange(e)},doDictGroupKey(e){if(!this.config.dictgroupkey)return!0;let t=this.config.dictgroupkey.split(",");if(e.dgroup){return t.findIndex((t=>t===e.dgroup))>-1}return!0},setFocus(e){e?(this.$refs.myControl.$refs.reference.focus(),this.$refs.myControl.isFocused=!0):(this.$refs.myControl.$refs.reference.blur(),this.$refs.myControl.isFocused=!1)}}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Option"),s=c.resolveComponent("OptionGroup"),l=c.resolveComponent("Select");return c.withDirectives((c.openBlock(),c.createElementBlock("div",null,[c.createVNode(l,{ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),transfer:o.myConfig.transfer,multiple:o.myConfig.multiSelect,"max-tag-count":o.myConfig.maxTagCount,size:o.myConfig.size,disabled:o.myConfig.readOnly,clearable:o.myConfig.clearable,onOnChange:e._setFatherValue,filterable:o.myConfig.filterable,placeholder:o.myConfig.placeholder,onOnOpenChange:r.onOpenChange},{default:c.withCtx((()=>[o.myConfig.showOptionGroup?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(o.myConfig.data,((e,t)=>(c.openBlock(),c.createBlock(s,{label:e.label,key:"option_"+t},{default:c.withCtx((()=>[o.myConfig.readOnly?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(e.data,(e=>(c.openBlock(),c.createBlock(a,{value:e[o.myConfig.valueField],key:e[o.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(e.data,(e=>c.withDirectives((c.openBlock(),c.createBlock(a,{value:e[o.myConfig.valueField],key:e[o.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])),[[c.vShow,e.visible]]))),128))])),_:2},1032,["label"])))),128)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[o.myConfig.readOnly?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(o.myConfig.data,(e=>(c.openBlock(),c.createBlock(a,{value:e[o.myConfig.valueField],key:e[o.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])))),128)):(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:1},c.renderList(o.myConfig.data,(e=>c.withDirectives((c.openBlock(),c.createBlock(a,{value:e[o.myConfig.valueField],key:e[o.myConfig.valueField]},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.label),1)])),_:2},1032,["value"])),[[c.vShow,e.visible]]))),128))],64))])),_:1},8,["modelValue","transfer","multiple","max-tag-count","size","disabled","clearable","onOnChange","filterable","placeholder","onOnOpenChange"])],512)),[[c.vShow,o.myConfig.visible]])}]]),at={name:"formpcompro",data:()=>({}),props:{config:{type:Object,default:null},dictData:{type:Object,default:null}},methods:{}};const st={name:"baseform",mixins:[at],data:()=>({form:{},oldForm:{},initForm:{},items:[],formRules:{},updateConfig:[],errorFlag:!1,style:"",myConfig:{lineNum:1,itemSpan:8,labelWidth:80,labelPosition:"right",showLabel:!0,inline:!0,isFull:!0}}),methods:{initFormItemCol(e){let t=this.myConfig.itemSpan,n=this.items[e];return"Divider"===n.type?t=24:void 0!==n.colNum&&(t=Number(n.colNum)>Number(this.myConfig.lineNum)?this.myConfig.itemSpan*Number(this.myConfig.lineNum):this.myConfig.itemSpan*Number(n.colNum)),t>24&&(t=24),t},initFormItem(e){if(e.status=!0,e.valueChanged&&(e.valueChanged=this.valueChanged),e.searchBefore&&(e.searchBefore=this.searchBefore),e.setDataBefore&&(e.setDataBefore=this.setDataBefore),e.onAddTag&&(e.onAddTag=this.onAddTag),e.onDelTag&&(e.onDelTag=this.onDelTag),e.onSearch&&(e.onSearch=this.onSearch),e.onLinkTo&&(e.onLinkTo=this.onLinkTo),this.dictData){let t="";e.dictkey&&(t=e.dictkey),e.customDictkey&&(t=e.customDictkey),t&&void 0===e.data&&(e.data=this.dictData[t])}return this.setFormItemCommonPro(e),e},init(){let e=this.$Method.copy(this.config);this.myConfig=Object.assign({},this.myConfig,e);let t=24/Number(this.myConfig.lineNum);this.myConfig.itemSpan=Number(t.toFixed(0)),24===this.myConfig.itemSpan&&(this.myConfig.inline=!1),this.initForm={},this.myConfig.items&&this.myConfig.items.forEach((e=>{let t=this.initFormItem(e);this.items.push(t)})),this.customInit&&this.customInit(),Object.assign(this.form,this.initForm),Object.assign(this.oldForm,this.form)},setData(e){e&&(this.$refs.form.resetFields(),"I"===e.flag?this.form=Object.assign({},this.initForm,e):(this.items.forEach((t=>{t.name&&void 0===e[t.name]&&(e[t.name]=""),t.sname&&void 0===e[t.sname]&&(e[t.sname]=""),t.ename&&void 0===e[t.ename]&&(e[t.ename]=""),t.textName&&void 0===e[t.textName]&&(e[t.textName]="")})),this.form=Object.assign({},{},e)),this.oldForm=this.$Method.copy(this.form))},isChange(){return JSON.stringify(this.form)!==JSON.stringify(this.oldForm)||!(!this.form.flag||"I"!==this.form.flag&&"U"!==this.form.flag)},input(e){let t={};e.name&&(t[e.name]=e.value),e.textName&&(t[e.textName]=e.text),e.sname&&(t[e.sname]=e.svalue),e.ename&&(t[e.ename]=e.evalue),this.form=Object.assign({},this.form,t),this.$emit("inputValue",e)},validatorIsNull(e,t,n){this.isArrayFn(this.form[e.field])?0===this.form[e.field].length?n(new Error("")):n():this.form[e.field]||0===this.form[e.field]?n():n(new Error(""))},isArrayFn:e=>"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e),GetConfigIndex(e){return this.config.items.findIndex((t=>t.name===e||t.sname===e||t.ename===e))},valueChanged(e){if(e.form=this.$Method.copy(this.form),e.formObject=this,e.sname){return this.config.items.find((t=>t.sname===e.sname)).valueChanged(e)}return this.config.items.find((t=>t.name===e.name)).valueChanged(e)},searchBefore(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.myConfig.name)).searchBefore(e)},onAddTag(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onAddTag(e)},onDelTag(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onDelTag(e)},onSearch(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onSearch(e)},onLinkTo(e){e.form=this.$Method.copy(this.form),e.formObject=this;return this.config.items.find((t=>t.name===e.name)).onLinkTo(e)},setDataBefore(e,t){let n={};n.data=e,n.form=this.$Method.copy(this.form),n.formObject=this;return this.config.items.find((e=>e.name===t.myConfig.name)).setDataBefore(n,t)},checkValidate(){this.$refs.form[0]?this.$refs.form.forEach((e=>{e.validate?this.errorFlag=!1:this.errorFlag=!0})):this.$refs.form.validate((e=>{this.errorFlag=!e}))},isError(){return this.errorFlag},getTrigger(e){let t="blur";switch(e&&(e=e.toLowerCase()),e){case"combobox":case"tagbox":case"daterangebox":t="change"}return t},getValue(e){return this.form[e]},setValue(e,t){let n={};n[e]=void 0===t?"":t,this.form=Object.assign({},this.form,n)},setValues(e){for(let t in e)void 0===e[t]&&(e[t]="");this.form=Object.assign({},this.form,e)},setFormReadOnly(e){if(!this.myConfig.items||0===this.myConfig.items.length)return!1;this.myConfig.items.forEach((t=>{let n="";if(t.name?n=t.name:t.sname&&(n=t.sname),e)this.setReadOnly(n,e);else if(this.myConfig.cellbeginedit){let t={};t.name=n,t.form=this.$Method.copy(this.form),this.myConfig.cellbeginedit(t)?this.setReadOnly(n,e):this.setReadOnly(n,!e)}else this.setReadOnly(n,e)}))},setPro(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setPro(t)},getPro(e,t){if(this.$refs[e]&&this.$refs[e][0])return this.$refs[e][0].getPro(t)},setReadOnly(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setReadOnly&&this.$refs[e][0].setReadOnly(t)},getData(){const e=this.$Method.copy(this.form);return this.doDetialItem(e)},doDetialItem(e){return this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.forEach((t=>{if("PopTagBox"===t.type){let n=[],i=this.oldForm[t.name],o=this.$Method.copy(e[t.name]);i&&i.length>0&&i.forEach((e=>{if(e.ph_key)if(o&&o.length>0){let t=o.findIndex((t=>t.ph_key===e.ph_key));if(t>-1)o.splice(t,1);else{let t=this.$Method.copy(e);t.flag="D",n.push(t)}}else{let t=this.$Method.copy(e);t.flag="D",n.push(t)}})),o&&o.length>0&&o.forEach((e=>{e.flag="I",n.push(e)})),e[t.name]=n}})),e},setCommonRequired(e,t,n){let i="";if(n.ename&&(i=n.ename),i&&(void 0===this.formRules[i]?!0===t&&(this.formRules[i]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(n.type)}]):t||delete this.formRules[i]),void 0===this.formRules[e]){if(!0===t)return this.formRules[e]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(n.type)}],!0}else if(!t)return delete this.formRules[e],!0;return!1},setRequired(e,t){let n=!1;const i=this.items.findIndex((t=>t.name===e||t.sname===e));if(i>-1&&(n=this.setCommonRequired(e,t,this.items[i]),n)){let e=Object.assign({},this.items[i],{required:t,status:!1});this.items.splice(i,1,e),this.$nextTick((()=>{this.items[i].status=!0}))}},updateCommonConfig(e,t){let n={},i=this.items.findIndex((t=>t.name===e||t.sname===e));if(i>-1){let o=!1;for(let e in t)if(t[e]!==this.items[i][e]){o=!0;break}if(o){t.status=!1,n.index=i,n.name=e;let o=this.$Method.copy(this.items[i]);n.config=Object.assign({},o,t),this.setCommonRequired(e,t.required,n.config)}}return n},updateItemConfig(e,t){let n=this.updateCommonConfig(e,t);if(n&&n.index>-1){let e=[];e.push(n),this.updateConfigReset(0,e)}},updateConfigReset(e,t){let n=t[e].index;this.items.splice(n,1,t[e].config),e+1<t.length?this.$nextTick((()=>{this.items[n].status=!0,this.$nextTick((()=>{this.$refs[t[e].name]&&this.$refs[t[e].name].length>0&&this.$refs[t[e].name][0].reset(),this.updateConfigReset(e+1,t)}))})):this.$nextTick((()=>{this.items[n].status=!0,this.$nextTick((()=>{this.$refs[t[e].name]&&this.$refs[t[e].name].length>0&&this.$refs[t[e].name][0].reset()}))}))},updateItemsConfig(e){let t=[];e&&(e.forEach((e=>{let n=this.updateCommonConfig(e.name,e);n&&n.index>-1&&t.push(n)})),t.length>0&&this.updateConfigReset(0,t))},clearData(){this.$refs.form.resetFields(),this.form=Object.assign({},{},this.initForm),this.oldForm=this.$Method.copy(this.form)},getFormItemStyle(e){let t={},n=this.myConfig.isFull;if(void 0!==e.isFull&&(n=e.isFull),n)t.width="100%";else{let e=this.myConfig.labelWidth+100;t["min-width"]=e+"px"}return void 0!==e.style&&(t=Object.assign({},t,e.style)),t},setFormItemCommonPro(e){void 0===e.isFull&&(e.isFull=!0),e.name&&this.setFormItemValue(e.name,e,!0),e.sname&&this.setFormItemValue(e.sname,e,!0),e.ename&&this.setFormItemValue(e.ename,e,!0),e.textName&&this.setFormItemValue(e.textName,e,!1)},setFormItemValue(e,t,n){if(void 0!==t.defaultValue)this.initForm[e]=t.defaultValue;else if("NumberBox"===t.type||"NumberRangeBox"===t.type){let n="";void 0!==t.min&&(n=t.min),void 0!==t.smin&&(n=t.smin),void 0===t.smin&&void 0!==t.emin&&(n=t.emin),this.initForm[e]=n,t.defaultValue=n,!1===t.boundaryValue&&(this.initForm[e]="",t.defaultValue="")}else"PopTagBox"===t.type?this.initForm[e]=[]:this.initForm[e]="";n&&(t.required?void 0===this.formRules[e]&&(this.formRules[e]=[{required:!0,validator:this.validatorIsNull,trigger:this.getTrigger(t.type)}]):delete this.formRules[e])},doAction(e){this[e.name]&&this[e.name](e)},enterKeyDown(e){let t=this.findNextItems(e.controlName);this.setFoucs(e.controlName,!1),this.$nextTick((()=>{let e=this;setTimeout((()=>{e.setFoucs(t,!0)}),200)}))},setFoucs(e,t){this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].setFocus&&this.$refs[e][0].setFocus(t)},setHideDividerValue(e){this.$refs.hidedivider&&this.$refs.hidedivider[0]&&this.$refs.hidedivider[0].setHide(e)},findNextItems(e){let t="",n="",i=!1;return this.myConfig.items.some((o=>{let r=o.name;if(o.sname&&(r=o.sname),"wRichTextBox"!==o.type&&"RichTextBox"!==o.type&&"PictureBox"!==o.type&&"VideoBox"!==o.type&&this.$refs[r]&&this.$refs[r][0]&&!1!==this.$refs[r][0].getPro("visible")&&!0!==this.$refs[r][0].getPro("readOnly")&&(t||(t=r),i))return n=r,!0;e===r&&(i=!0)})),n||(n=t),n}}},lt={extends:st,data:()=>({editIndex:-1,editKey:""}),created(){this.init()},props:{valueData:{type:Object,default:()=>({})},vstyle:{type:String,default:""},showRowAction:{type:Boolean,default:!1}},methods:{customInit(){this.form=Object.assign({},this.form,this.valueData),this.style=this.vstyle},keyDownEvent(){this.cancelCellEditing()},formatValue(e,t,n){return this.$Method.formatValue(e,t,n)},EditCell(e){if(e.readOnly)return this.editKey="",void this.cancelCellEditing();if(this.showRowAction)this.cancelCellEditing();else if(this.editKey!==e.name)if(this.config.cellbeginedit){let t={};if(t.index=this.editIndex,t.column=e,t.row=this.valueData,this.config.cellbeginedit){if(!this.config.cellbeginedit(t))return void this.cancelCellEditing();this.editKey=e.name}}else this.editKey=e.name},addRowInfo(e,t){e.rowinfo={},e.rowinfo.column=t,e.rowinfo.index=this.editIndex,e.rowinfo.row=this.valueData,e.rowinfo.gridObject=this.config.getGridObject(),e.rowinfo.formObject=this},valueChanged(e){const t=this.config.items.find((t=>t.name===e.name));return this.addRowInfo(e,t),t.valueChanged(e)},searchBefore(e){const t=this.config.items.find((t=>t.name===e.config.name));return this.addRowInfo(e,t),t.searchBefore(e)},setDataBefore(e,t){const n=this.config.items.find((e=>e.name===t.myConfig.name));let i={};return i.data=e,this.addRowInfo(i,n),n.setDataBefore(i,t)},setEditIndex(e){this.editIndex=e},getEditIndex(){return this.editIndex},cancelCellEditing(){this.editKey=""}},watch:{valueData:{handler(e){this.form=Object.assign({},this.form,e)},deep:!0,immediate:!0}}},ct={key:0,style:{color:"#348eed"}},ut={key:1},dt=["onClick"];var ht=Ye(lt,[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("ControlBox"),s=c.resolveComponent("ShowText"),l=c.resolveComponent("FormItem"),u=c.resolveComponent("Col"),d=c.resolveComponent("Row"),h=c.resolveComponent("Form");return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(e.style)},[c.createVNode(h,{ref:"form",model:e.form,rules:e.formRules,"label-width":e.myConfig.labelWidth,inline:e.myConfig.inline,id:e.myConfig.name,onKeydown:c.withKeys(c.withModifiers(r.keyDownEvent,["prevent"]),["enter"])},{default:c.withCtx((()=>[c.createVNode(d,{type:"flex",justify:"start"},{default:c.withCtx((()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.items,((t,n)=>c.withDirectives((c.openBlock(),c.createBlock(u,{key:"form_"+n,span:e.initFormItemCol(n),style:c.normalizeStyle({height:t.height})},{default:c.withCtx((()=>[c.createVNode(l,{label:t.label?e.$t(t.label):t.label,prop:t.name||t.sname,style:{width:"100%"},"show-message":!1},{label:c.withCtx((()=>[!0===t.required?(c.openBlock(),c.createElementBlock("span",ct,c.toDisplayString(t.label?e.$t(t.label):t.label),1)):(c.openBlock(),c.createElementBlock("span",ut,c.toDisplayString(t.label?e.$t(t.label):t.label),1))])),default:c.withCtx((()=>[c.createElementVNode("div",{onClick:e=>r.EditCell(t),style:{width:"100%",height:"100%"}},[o.editKey===t.name?(c.openBlock(),c.createBlock(a,{key:0,config:t,valueData:e.form,onInputValue:e.input,style:{width:"100%"},editIndex:o.editIndex},null,8,["config","valueData","onInputValue","editIndex"])):(c.openBlock(),c.createBlock(s,{key:1,style:{display:"inline-block",height:"32px","line-height":"32px"},label:r.formatValue(e.form[t.name],e.form,t),contentAlign:"left"},null,8,["label"]))],8,dt)])),_:2},1032,["label","prop"])])),_:2},1032,["span","style"])),[[c.vShow,!1!==t.visible]]))),128))])),_:1})])),_:1},8,["model","rules","label-width","inline","id","onKeydown"])],4)}]]);const At={mixins:[it],data(){return{globalConfig:{cellbeginedit:"",showHeader:!0,showIndex:!0,showStripe:!1,showBorder:!0,showCheckBox:!1,showCondition:!1,checkByHighlight:!0,readOnly:!1,showPage:!0,tableSize:"default",pageSize:null,pageShowElevator:!0,pageShowTotal:!0,pageShowSizer:!0,height:null,manualLoad:!0,multiSelect:!1,operFixedFlag:!0,gridType:"viewGrid",dynamicHeight:!1,generalOrientation:!1,showSummary:!1,showSumGroup:!1,sumText:this.$t("合计"),pageSizeNum:"",adjustHeight:0,items:[],pageConfig:{page_no:1,page_size:100,total_results:0,pageSizeList:[20,50,100,200,500,1e3]},moduleMethod:[],headClassName:""},tempData:[],data:[],addData:[],delData:[],columns:[],checkInfo:[],checkAddInfo:[],expand:{},dictkey:"",currentDictData:{},editRowIndex:"",editRowFlag:!0,loading:!1,conditionSearchParam:{},showRowAction:!1,modulecode:"",myToolConfig:{},showMoreBtn:!1,initData:[],showDelRow:!1,showCondition:!0,delRowAction:[{iconcls:"row",name:"delRow",text:this.$t("删除"),type:"text"}],operFixedFlag:!0,editIndex:-1,editKey:"",newRow:{},summaryColumn:[],total_summary:{},extraHeight:0,outsideHeight:0,tableColumns:[],soltTableColumns:[],sumGroupNum:0,culPage:1}},props:{config:{type:Object,default:()=>({})},dictData:{type:Object,default:null},toolConfig:{type:Object,default:()=>({})},isPop:{type:Boolean,default:!1}},created(){this.init(),this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid"))},computed:{makeTableColumns(){return this.initColumn()},tableHeight(){if(this.myConfig.dynamicHeight)return null;{let e=this.currentHeight;return this.extraHeight&&(e-=Number(this.extraHeight)),this.outsideHeight&&(e-=Number(this.outsideHeight)),this.myConfig.showSummary&&(e-=50),e}},tableMaxHeight(){if(this.myConfig.dynamicHeight){let e=this.currentHeight-this.extraHeight-this.outsideHeight;return this.myConfig.showSummary&&(e-=50),e}return null}},methods:{init(){if(this.myConfig=Object.assign({},this.globalConfig,this.myConfig),this.config){let e=this.$Method.copy(this.config);for(let t in e)if("pageConfig"===t)for(let n in e[t])this.myConfig.pageConfig[n]=e[t][n];else this.myConfig[t]=e[t]}if(this.dictData?this.currentDictData=this.dictData:this.currentDictData=[],void 0!==this.myConfig.showDelRow&&(this.showDelRow=this.myConfig.showDelRow),void 0!==this.myConfig.showCondition&&(this.showCondition=this.myConfig.showCondition),this.myToolConfig=this.$Method.copy(this.toolConfig),!this.isPop){let e=0;this.myToolConfig.items&&this.myToolConfig.items.forEach((t=>{"row"===t.iconcls&&e++})),this.showMoreBtn=e>2,this.showRowAction=e>0,this.showRowAction&&(this.myConfig.showCheckBox||this.myConfig.multiSelect&&(this.myConfig.showCheckBox=!0))}this.operFixedFlag=this.myConfig.operFixedFlag,this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.some((e=>{if(!0===e.resizable)return this.myConfig.showBorder=!0,!0})),this.setSizeConfig(this.myConfig),this.customInit&&this.customInit()},initCheckColumn(e){if(this.myConfig.showCheckBox){let t={type:"selection",align:"center",key:"selection",width:40};t.multiSelect=this.myConfig.multiSelect,e.push(t)}},isToolBar(e){let t=!1;return this.myToolConfig&&this.myToolConfig.items&&this.myToolConfig.items.some((n=>{if(n.iconcls===e)return t=!0,!0})),t},initIndexColumn(e){if(this.myConfig.showIndex)if(this.myConfig.showSumGroup){let e={label:this.$t("行号"),name:"sumindex",type:"TextBox",align:"center",width:45};"sumindex"!==this.myConfig.items[0].name&&this.myConfig.items.splice(0,0,e)}else{let t={type:"index",key:"index",width:45};t.title=this.$t("行号"),t.align="center",void 0!==this.myConfig.headClassName&&(t.className=this.myConfig.headClassName),t.indexMethod=this.indexRender,void 0!==this.myConfig.indexConfig&&Object.assign(t,this.myConfig.indexConfig),e.push(t)}},initOperColumn(e){if(this.showRowAction||this.showDelRow){let t={};t.title=this.$t("操作"),void 0!==this.myConfig.headClassName&&(t.className=this.myConfig.headClassName),t.key="action",t.render=this.actionRender,this.operFixedFlag&&(t.fixed="right"),t.width=120,1===this.myToolConfig.items.length&&(t.width=80),t.align="center",this.customInitOperColumn?this.customInitOperColumn(t,e):e.push(t)}},onColumnWidthResize(e,t,n){let i={};i.newWidth=e,i.oldWidth=t,i.column=n,this.$emit("onColumnWidthResize",i)},initExpandColumn(e){this.expand.items=[];let t=[];for(let n=0;n<e.length;n++)!0===e[n].isExpand?this.expand.items.push(e[n]):t.push(e[n]);if(this.expand.items.length>0){let n={type:"expand",width:50,render:this.expandRendel};const i=t.findIndex((e=>"index"===e.type));if(i>-1)t.splice(i+1,0,n);else{const e=t.findIndex((e=>"selection"===e.type));e>-1?t.splice(e+1,0,n):t.splice(0,0,n)}e=t}},initColumn(){let e={},t=[],n=[];if(!this.myConfig.items||0===this.myConfig.items.length)return n;this.initCheckColumn(n),this.initOperColumn(n),this.initIndexColumn(n);const i=this.myConfig.items.length;for(let r=0;r<i;r++)!1!==this.myConfig.items[r].visible?this.initCommonColumn(this.myConfig.items[r],n,t,e):void 0!==this.myConfig.items[r].defaultValue&&(this.myConfig.items[r].name&&(e[this.myConfig.items[r].name]=this.myConfig.items[r].defaultValue),this.myConfig.items[r].sname&&(e[this.myConfig.items[r].sname]=this.myConfig.items[r].defaultValue),this.myConfig.items[r].ename&&(e[this.myConfig.items[r].ename]=this.myConfig.items[r].defaultValue));this.initExpandColumn(n);let o={};return o.columns=n,o.newRow=e,o.summaryColumn=t,o},initCommonColumn(e,t,n,i){let o=this.$Method.copy(e);if(o.contentAlign||(o.contentAlign=o.align),o.title=o.label?this.$t(o.label):o.label,o.headClassName?o.className=o.headClassName:void 0!==this.myConfig.headClassName&&(o.className=this.myConfig.headClassName),e.children&&e.children.length>0){o.children=[];for(let t=0;t<e.children.length;t++)this.initCommonColumn(e.children[t],o.children,n,i);t.push(o)}else o=this.initColumnConfig(o,n,i),t.push(o)},initColumnConfig(e,t,n){let i="";return e.type&&(i=e.type.toLowerCase()),e.key=e.name,Number(e.width)?e.width=Number(e.width):delete e.width,this.setColumnPro(e,i,t,n),"render"!==i&&void 0===e.render&&this.setCustomColumn&&this.setCustomColumn(e),"checkbox"!==i&&"picturebox"!==i&&"videobox"!==i||(e.render=this.commonRendel,"picturebox"===i&&(void 0===e.height&&(e.height=40),e.isGrid=!0),"videobox"===i&&void 0===e.height&&(e.height=60),this.myConfig.readOnly?e.readOnly=!0:!0!==e.readOnly&&(e.readOnly=!1)),e.required&&(e.className||(e.className="efuture-grid-head-required")),e.valueChanged&&(e.valueChanged=this.valueChanged),e.searchBefore&&(e.searchBefore=this.searchBefore),e.setDataBefore&&(e.setDataBefore=this.setDataBefore),e.onLinkTo&&(e.onLinkTo=this.onLinkTo),"timepicbox"!==i&&"datebox"!==i&&"daterangebox"!==i&&"colorbox"!==i&&"combobox"!==i||(e.transfer=!0),e},setColumn(e){let t=this.$Method.copy(this.myConfig.items[e]);t.title=t.label?this.$t(t.label):t.label;let n="";t.type&&(n=t.type.toLowerCase()),n&&(t.key=t.name,Number(t.width)?t.width=Number(t.width):delete t.width,this.setColumnPro(t,n),"render"!==n&&void 0===t.render&&this.setCustomColumn&&this.setCustomColumn(t),"checkbox"!==n&&"picturebox"!==n&&"videobox"!==n||(t.render=this.commonRendel,"picturebox"===n&&void 0===t.height&&(t.height=40),"videobox"===n&&void 0===t.height&&(t.height=60),this.myConfig.readOnly?t.readOnly=!0:t.readOnly=!1),t.required&&(t.className||(t.className="efuture-grid-head-required")),t.contentAlign||t.align||(t.contentAlign=t.align),this.myConfig.items[e].valueChanged&&(t.valueChanged=this.valueChanged),this.myConfig.items[e].searchBefore&&(t.searchBefore=this.searchBefore),this.myConfig.items[e].setDataBefore&&(t.setDataBefore=this.setDataBefore),this.myConfig.items[e].onLinkTo&&(t.onLinkTo=this.onLinkTo),void 0===t.formatValue&&void 0!==this.myConfig.formatValue&&(t.formatValue=this.myConfig.formatValue),this.columns.push(t))},setColumnPro(e,t,n,i){if(e.place="grid",!0===e.sortable?e.sortable="custom":"default"===e.sortable&&(e.sortable=!0),"numberbox"===t?(e.contentAlign||(e.contentAlign="right"),e.align||(e.align="right"),e.summary&&void 0!==n&&n.push(e.name)):"datebox"===t||"checkbox"===t||"picturebox"===t||"videobox"===t?this.myConfig.generalOrientation&&"datebox"===t?(e.contentAlign||(e.contentAlign="left"),e.align||(e.align="left")):(e.contentAlign||(e.contentAlign="center"),e.align||(e.align="center")):(e.contentAlign||(e.contentAlign="left"),e.align||(e.align="left")),"combobox"===t&&void 0===e.data){let t=e.dictkey;e.customDictkey&&(t=e.customDictkey),e.data=this.currentDictData[t]}if(void 0!==e.defaultValue)i[e.name]=e.defaultValue;else if("numberbox"===t||"numberrangebox"===t){let t="";void 0!==e.min&&(t=e.min),void 0!==e.smin&&(t=e.smin),void 0===e.smin&&void 0!==e.emin&&(t=e.emin),e.defaultValue=t,void 0!==i&&(i[e.name]=t,!1===e.boundaryValue&&(i[e.name]="",e.defaultValue=""))}else void 0!==i&&("poptagbox"===e.type?i[e.name]=[]:i[e.name]="")},expandRendel(e,t){return e("div",[e(c.resolveComponent("ExpandRow"),{config:this.expand,valueData:t.row,vstyle:"margin-right: 120px",showRowAction:!1,onInputValue:e=>{this.editIndex=t.index,this.input(e)}})])},indexRender(e,t){let n=t+1;return this.myConfig.showPage&&(n+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size),this.myConfig.indexMethod?this.myConfig.indexMethod(e,n):n},actionRender(e,t){return e("div",[e(c.resolveComponent("Toolbar"),{config:this.myToolConfig,tooltype:"row",moduleMethod:this.globalConfig.moduleMethod,row:t.row,onDoAction:e=>{e.rowinfo=t,"editRowForm"===e.name?this.initRowForm&&this.initRowForm(e):"delRow"===e.name?this.delRow&&this.delRow(t.index):this.$emit("doAction",e)}})])},remove(e){let t=this.data.findIndex((t=>t._customIndex===e));if(-1===t&&(t=e),t>-1){if(void 0===this.data[t].flag||"U"===this.data[t].flag){this.data[t].flag="D";const e=this.$Method.copy(this.data[t]);this.delData.push(e)}this.data.splice(t,1)}this.customRemove&&this.customRemove(t)},setEdit(e){this.editRowIndex===e?this.editRowIndex=null:this.editRowIndex=e},dbclick(e){this.$emit("dbclick",e)},click(e){this.$emit("rowclick",e),this.$emit("click",e)},setData(e){this.data=[],this.data=e,this.initData=this.$Method.copy(this.data),this.delData=[],this.checkInfo=[],this.cancelCellEditing&&this.cancelCellEditing()},getData(){return this.$Method.copy(this.data)},clearData(){this.editIndex=-1,this.editKey="",this.data=[],this.delData=[],this.initData=[],this.checkInfo=[],this.addData=[],this.checkAddInfo=[],this.conditionSearchParam={},this.myConfig.pageConfig.page_no=1,this.myConfig.pageConfig.total_results=0,this.columnWidth={},this.customClearData&&this.customClearData()},updataRow(e,t){let n=Object.assign({},this.data[e],t);this.data.splice(e,1,n),this.tempData.splice(e,1,n)},getModuleMethod(){if(this.modulecode=this.$Method.getUrlParam("modulecode"),this.modulecode||(this.modulecode=this.$Method.getUrlParam("billmoduleid")),this.token=this.$Method.getUrlParam("token"),this.modulecode&&this.token){let e=this.getUserModuleMethod();e&&(this.globalConfig.moduleMethod=e.modulemethod)}},getSelection(){return this.$refs.table.getSelection()},input(e){let t=this.editIndex;if(-1===t){if(void 0===e.editIndex)return;t=e.editIndex}let n={};if(void 0!==e.value&&(n[e.name]=e.value),void 0!==e.text&&(n[e.textName]=e.text),void 0!==e.svalue&&(n[e.sname]=e.svalue),void 0!==e.evalue&&(n[e.ename]=e.evalue),void 0===this.data[t].flag&&(n.flag="U"),e.customRows&&e.customRows.length>0){let t=this;e.customRows.forEach((e=>{if(void 0!==e.changeIndex){let n=Object.assign({},t.data[e.changeIndex],e);void 0===t.data[e.changeIndex].flag&&(n.flag="U"),t.data.splice(e.changeIndex,1,n)}})),e.customRows.forEach((e=>{if(void 0===e.changeIndex){let n=Object.assign({},{},e);n.flag="I",t.data.push(n)}}))}else{let e=Object.assign({},this.data[t],n);this.$nextTick((()=>{this.data.splice(t,1,e)}))}},updateColPro(e,t){const n=this.myConfig.items.findIndex((t=>e===t.name));if(n>-1){let e=Object.assign({},this.myConfig.items[n],t);this.myConfig.items.splice(n,1,e)}},setRowCheck(e,t){if(this.myConfig.multiSelect){if(e>-1){let n=Object.assign({},this.data[e],{});n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t),this.myConfig.onSetRowCheckBefore?this.myConfig.onSetRowCheckBefore(e,t)&&this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)})):this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}}else{let n=this.$Method.copy(this.data);n.forEach(((n,i)=>{i===e?this.myConfig.onSetRowCheckBefore?this.myConfig.onSetRowCheckBefore(e,t)&&(n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t)):(n._checked=t,this.myConfig.checkByHighlight&&(n._highlight=t)):(n._checked=!1,n._highlight=!1)})),this.$nextTick((()=>{this.data=n}))}},setAllRowCheck(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._checked=e,this.myConfig.checkByHighlight&&(t._highlight=e)})),this.$nextTick((()=>{this.data=t}))},setRowDisabled(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._disabled=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}},setAllRowDisabled(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._disabled=e})),this.$nextTick((()=>{this.data=t}))},setRowHighlight(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._highlight=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n)}))}},setAllRowHighlight(e){let t=this.$Method.copy(this.data);t.forEach((t=>{t._highlight=e})),this.$nextTick((()=>{this.data=t}))},commonRendel(e,t){return e("div",[e(c.resolveComponent("ControlBox"),{config:t.column,valueData:t.row,readOnly:"D"===t.row.flag,autofocus:this.editIndex===t.index&&this.editKey===t.column.key,onInputValue:e=>{this.editIndex=t.index,this.editKey=t.column.key,this.input(e)},onDoAction:e=>{this.doAction(e)}})])},setExtraHeight(){let e=0;this.$refs.head&&(e=this.$refs.head.offsetHeight),this.$refs.page&&(e+=this.$refs.page.offsetHeight),this.extraHeight=e},setOutsideHeight(e){this.outsideHeight=e},getSoltTableColumns(e,t){if(e)if(e instanceof Array)e.forEach((e=>{this.getSoltTableColumns(e,t)}));else if(e.children&&e.children.length>0)e.children.forEach((e=>{this.getSoltTableColumns(e,t)}));else{let n=Object.assign({},e);"action"!==n.key&&"actionbtn"!==n.key&&t.push(n)}},findColumnConfig(e,t){if(e){if(t instanceof Array){let n=!1,i={};return t.some((t=>{let o=this.findColumnConfig(e,t);if(o)return n=!0,i=o,!0})),!!n&&i}if(t.children&&t.children.length>0){let n=!1,i={};return t.children.some((t=>{let o=this.findColumnConfig(e,t);if(o)return n=!0,i=o,!0})),!!n&&i}return e===t.name&&t}},openHelp(){window.open(this.curHelpUrl)},initScrollLeft(){this.$refs.table&&this.$refs.table.$refs.body&&(this.$refs.table.$refs.body.scrollLeft=0)}},watch:{data(e){this.tempData=D(e)},makeTableColumns(e){this.total_summary={},this.newRow=D(e.newRow),this.summaryColumn=D(e.summaryColumn),this.tableColumns=D(e.columns);let t=[];this.getSoltTableColumns(e.columns,t),this.soltTableColumns=t}},mounted(){}},ft={name:"viewgridbase",extends:At,data(){return{myConfig:{resources:"",method:"",response:"",searchParam:null,readOnly:!0,multiSelect:!0,bindSearchParam:"ph_key",showAll:!1,exportMethod:"exportExcel",separator:"::",exportType:"2",overrideData:"",headStyle:"padding-bottom: 10px;padding-top: 10px;",multiSelectGrid:!1,multiGridCol:11,multiGridTitle:this.$t("已选择"),gridTitle:this.$t("待选择"),highLightRow:!0,dynamicColumnFlag:!1,dynameicColumnConfig:{groupColumns:[],dynameicColumnName:"",dynameicColumnValue:"",dynameicColumnValueTitle:"",dynameicColumnValuePro:{},dynameicColumnSumLable:this.$t("动态合计")}},multiGridCol:11,gridCol:11,editRowFlag:!1,singleData:{},searchBeforeSearchParam:{},order_field:"",order_direction:"",rightActive:!1,leftActive:!1,multiSelectData:[],multiTableColumns:[],dynamicColumnItems:[],tempMultiSelectData:[],multiSoltTableColumns:[],showHelpBtn:!1}},computed:{makeTableColumns(){return this.myConfig.dynamicColumnFlag?[]:this.initColumn()}},methods:{customInit(){this.isPop&&(this.myConfig.showCheckBox||this.myConfig.multiSelect&&(this.myConfig.showCheckBox=!0),this.myConfig.multiGridCol&&(this.multiGridCol=Number(this.myConfig.multiGridCol),this.gridCol=22-this.multiGridCol),this.myConfig.tableSize="small",this.myConfig.headStyle="",this.myConfig.showBorder=!1,this.myConfig.headStyle="",this.myConfig.pageSize="small",void 0===this.myConfig.height&&(this.myConfig.height=360),this.myConfig.pageSizeNum||(this.myConfig.pageConfig.page_size=50)),this.myConfig.pageSizeNum&&(this.myConfig.pageConfig.page_size=Number(this.myConfig.pageSizeNum)),this.myConfig.items.forEach((e=>{void 0===e.resizable&&(e.resizable=!0),e.width||e.minWidth||(e.minWidth=60)})),this.myConfig.multiSelectGrid&&(this.multiTableColumns=this.multiInitColumn()),"billGrid"===this.myConfig.gridType&&this.getModuleMethod(),this.myConfig.dynamicColumnFlag&&(this.myConfig.showPage=!1);this.curHelpUrl=this.OmdUrl.getCurHelpUrl(this),this.curHelpUrl?this.showHelpBtn=!0:this.showHelpBtn=!1},conditionAction(e){let t=[];switch(e.action){case"condition_search":e.para&&(this.conditionSearchParam=this.$Method.copy(e.para)),this.refurbish();break;case"condition_clear":this.conditionSearchParam={};break;case"condition_ok":this.myConfig.multiSelect?t=this.getSelection():this.singleData.currentRow&&t.push(this.singleData.currentRow),0===t.length?this.alert(this.$t("请选择")):(e.rows=t,this.$emit("conditionAction",e));break;case"condition_cancel":this.$emit("conditionAction",e)}},getSearchParam(e,t){let n=Object.assign({},this.myConfig.searchParam,this.searchBeforeSearchParam);if(n||(n={}),"report"===this.myConfig.response)n=Object.assign({},n,this.conditionSearchParam);else{let e={};for(let t in n)if(this.conditionSearchParam[t]){e[t]={$and:[]};let i={};i[t]=n[t],e[t].$and.push(i);let o={};o[t]=this.conditionSearchParam[t],e[t].$and.push(o)}n=Object.assign({},n,this.conditionSearchParam);for(let t in e)n.$and=this.$Method.copy(e[t].$and),delete n[t]}return this.myConfig.showPage&&(t?this.myConfig.pageConfig.page_no?n.page_no=this.myConfig.pageConfig.page_no:n.page_no=1:(this.myConfig.pageConfig.page_no=1,n.page_no=1,this.culPage=1),n.page_size=this.myConfig.pageConfig.page_size),this.order_field&&(n.order_field=this.order_field,this.order_direction&&(n.order_direction=this.order_direction)),e&&(n=Object.assign({},n,e)),this.myConfig.dynamicColumnFlag||this.summaryColumn&&this.summaryColumn.length>0&&(n.summary_fld=this.summaryColumn.join(",")),this.myConfig.showSumGroup&&(n.sumgroups=this.myConfig.sumgroups),this.myConfig.overrideSearchParam?this.myConfig.overrideSearchParam(n):n},setWhereParam(e){this.conditionSearchParam=this.$Method.copy(e)},refurbish(e,t){this.loading=!0;let n=this;this.singleData={},n.data=[],n.asyncPost(n.myConfig.resources,n.myConfig.method,n.getSearchParam(e,t),(function(e){n.dynamicInitData=e,n.myConfig.dynamicColumnFlag?n.makeDynamicColumn():n.refurbishSucceedDefault(),n.loading=!1}),(function(e){n.loading=!1,n.$nextTick((()=>{setTimeout((()=>{n.alert(e,null,2)}),1e3)}))}))},changePage(e){let t=this.myConfig.pageConfig.page_no;this.myConfig.refurbishCheck?this.myConfig.refurbishCheck(e,t,this.callBackChangePage):(this.myConfig.pageConfig.page_no=e,this.refurbish(null,!0))},refurbishSucceedDefault(){if(this.sumGroupNum=0,this.dynamicInitData&&this.dynamicInitData[this.myConfig.response]){this.myConfig.showAll&&this.myConfig.rowAll&&this.dynamicInitData[this.myConfig.response].splice(0,0,this.myConfig.rowAll);let e=[];e=this.myConfig.overrideData?this.myConfig.overrideData(this.dynamicInitData[this.myConfig.response]):this.dynamicInitData[this.myConfig.response],this.dynamicInitData.sumgroups&&(e=this.doSumgroups(e,this.dynamicInitData.sumgroups)),this.data=e,this.tempData=this.$Method.copy(e)}void 0!==this.dynamicInitData.total_results&&(this.myConfig.pageConfig.total_results=Number(this.dynamicInitData.total_results)),void 0!==this.dynamicInitData.total_summary?(this.total_summary=Object.assign({},{},this.dynamicInitData.total_summary),this.myConfig.showSummary||Object.assign(this.myConfig,{showSummary:!0})):this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1})},callBackChangePage(e,t,n){e?(this.myConfig.pageConfig.page_no=t,this.refurbish(null,!0)):this.$nextTick((()=>{this.myConfig.pageConfig.page_no=n,this.myConfig.showPage=!1,this.myConfig=Object.assign({},this.myConfig),this.$nextTick((()=>{this.myConfig.showPage=!0,this.myConfig=Object.assign({},this.myConfig)}))}))},callBackChangePageSize(e,t,n){e?(this.myConfig.pageConfig.page_size=t,this.refurbish(null,!0)):this.$nextTick((()=>{this.myConfig.pageConfig.page_size=n,this.myConfig.showPage=!1,this.myConfig=Object.assign({},this.myConfig),this.$nextTick((()=>{this.myConfig.showPage=!0,this.myConfig=Object.assign({},this.myConfig)}))}))},changePageSize(e){let t=this.myConfig.pageConfig.page_size;this.myConfig.refurbishCheck?this.myConfig.refurbishCheck(e,t,this.callBackChangePageSize):(this.myConfig.pageConfig.page_size=e,this.data&&this.data.length>0&&this.refurbish(null,!0))},sortChagne(e){this.order_field="",this.order_direction="";let t=[],n=[];if("normal"!==e.order){let i=t.findIndex((t=>t===e.key));i>-1?n.splice(i,1,e.order):(t.push(e.key),n.push(e.order))}t.length>0&&(this.order_field=t.join(),this.order_direction=n.join()),this.data&&this.data.length>0&&this.refurbish()},onCurrentChange(e,t){this.singleData={},this.singleData.currentRow=e,this.singleData.oldCurrentRow=t,this.myConfig.onSingleChange&&this.myConfig.onSingleChange(),this.myConfig.showCheckBox&&(this.myConfig.onSetRowCheck?this.myConfig.onSetRowCheck(e._customIndex,!0):this.setRowCheck(e._customIndex,!0))},onSelect(e,t){this.myConfig.onSelect&&this.myConfig.onSelect(e,t)},onSelectCancel(e,t){this.myConfig.onSelectCancel&&this.myConfig.onSelectCancel(e,t)},OnSelectionChange(e){this.$nextTick((()=>{this.myConfig.onSelectionChange&&this.myConfig.onSelectionChange(e),e&&e.length>0?this.leftActive=!0:this.leftActive=!1;let t=this.$Method.copy(this.data),n=!1;t.forEach(((t,i)=>{n=!1,e.forEach((e=>{if(i===e._customIndex)return n=!0,!0})),t._checked=n})),this.data=t,this.tempData=this.$Method.copy(t)}))},OnMultiSelectionChange(e){this.$nextTick((()=>{let t=this.$Method.copy(this.tempMultiSelectData),n=!1;t.forEach(((t,i)=>{n=!1,e.forEach((e=>{if(i===e._customIndex)return n=!0,!0})),t._checked=n})),this.tempMultiSelectData=t,e&&e.length>0?this.rightActive=!0:this.rightActive=!1}))},removeRow(e){this.data.splice(e,1)},doBatchAction(e){if("addData"!==e.name){let t=this.getSelection();if(0===t.length)return void this.alert(this.$t("请至少选择一行"));e.data=t}this.$emit("doAction",e)},add(){let e={name:"addData"};this.$emit("doAction",e)},setSearchBeforeSearchParam(e){this.searchBeforeSearchParam=Object.assign({},{},e)},clearSearchBeforeSearchParam(){this.searchBeforeSearchParam={}},popValueChanged(e){let t=[],n=this,i=Object.assign({},n.getSearchParam(),e);return n.synchroPost(n.myConfig.resources,n.myConfig.method,i,(function(e){e&&e[n.myConfig.response]&&(t=e[n.myConfig.response])}),null),t},getTotalCount(){let e="";return void 0!==this.myConfig.pageConfig.total_results&&(e=this.myConfig.pageConfig.total_results),e},export(e,t){if(0==this.data.length)return void this.alert(this.$t("请先查询数据"));let n=this.getSearchParam();this.OmdUrl.maxRowNum&&(n.maxrownum=this.OmdUrl.maxRowNum),this.OmdUrl.maxDataNum&&(n.maxdatanum=this.OmdUrl.maxDataNum);let i=this.getModulecode();i&&(n.modulecode=i);let o={dictdata:{}};n.fields=this.$Method.getGridField(this.myConfig.items,this.myConfig.separator,this.dictData,o.dictdata),n.fields||(n.fields="");let r=this.getTotalCount();r&&(n.fields+=",totalCount"+this.myConfig.separator+r),i&&(n.fields+=",modulecode"+this.myConfig.separator+i);let a=this.myConfig.exportMethod;e&&(a="asyncExport");let s=this.myConfig.resources.replace("rest",a),l=this;const c=this.zip(JSON.stringify(o.dictdata));n.dictdata=encodeURIComponent(c),e?this.asyncExport(s,this.myConfig.method,n,t):this.doExportExcel(s,this.myConfig.method,n,this.myConfig.exportType,l)},zip(e){let t=d.gzip(e,{to:"string"});return btoa(t)},asyncExport(e,t,n,i){this.synchroPost(e,t,n,(function(e){"1"===e.flag&&(i?i():this.alert(this.$t("文件正在生成,请稍后")))}),null)},initAsynExportConfig(e,t,n){for(let i=0;i<e.length;i++){let o=this.$Method.copy(e[i]),r=o.label;if(!1!==o.visible&&!1!==o.isExport&&(o.name&&(o.label=t+(r?this.$t(r):r),n.push(o)),o.children)){let e=t+"("+(r?this.$t(r):r)+")";this.initAsynExportConfig(o.children,e,n)}}},setRowHighlight(e,t){if(e>-1){let n=Object.assign({},this.data[e],{});n._highlight=t,this.$nextTick((()=>{this.data.splice(e,1,n),this.tempData.splice(e,1,n),this.myConfig.multiSelect||(this.singleData.currentRow=this.$Method.copy(this.data[e]))}))}},getSelection(){return!1===this.myConfig.multiSelect?this.singleData.currentRow?[this.singleData.currentRow]:[]:this.myConfig.multiSelectGrid?this.$Method.copy(this.multiSelectData):this.$refs.table.getSelection()},setSelection(e){this.myConfig.multiSelectGrid&&(this.multiSelectData=[],this.$nextTick((()=>{this.multiSelectData=e,this.tempMultiSelectData=this.$Method.copy(this.multiSelectData)})))},moveToLeft(){let e=this.$refs.multiSelectTable.getSelection();e&&e.length>0&&e.forEach((e=>{let t=this.multiSelectData.findIndex((t=>t[this.myConfig.responseId]===e[this.myConfig.responseId]));t>-1&&this.multiSelectData.splice(t,1)})),this.tempMultiSelectData=this.$Method.copy(this.multiSelectData),this.rightActive=!1},moveToRight(){let e=this.$refs.table.getSelection();e&&e.length>0&&e.forEach((e=>{if(this.myConfig.multiCheck)this.myConfig.multiCheck(this.multiSelectData,e)&&(delete e._customIndex,delete e._checked,this.multiSelectData.push(e));else{-1===this.multiSelectData.findIndex((t=>t[this.myConfig.responseId]===e[this.myConfig.responseId]))&&(delete e._customIndex,delete e._checked,this.multiSelectData.push(e))}})),this.tempMultiSelectData=this.$Method.copy(this.multiSelectData)},multiInitColumn(){let e=[],t=this.myConfig.items;if(this.myConfig.multiItems&&(t=this.myConfig.multiItems),!t||0===t.length)return e;this.initCheckColumn(e),this.initMultiIndexColumn(e);const n=t.length;for(let o=0;o<n;o++)!1!==t[o].visible&&this.initCommonColumn(t[o],e);this.initExpandColumn(e),this.initOperColumn(e);let i=[];return this.getSoltTableColumns(e,i),this.multiSoltTableColumns=i,e},customClearData(){this.multiSelectData=[],this.rightActive=!1,this.leftActive=!1,this.myConfig.dynamicColumnFlag&&(this.tableColumns=[],this.soltTableColumns=[],this.newRow={},this.total_summary={},this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1}))},clearCondition(){this.$refs.condition&&this.$refs.condition.clear&&this.$refs.condition.clear()},clearCurrentRow(){this.$refs.table&&this.$refs.table.clearCurrentRow()},delRow(e){this.data.splice(e,1),this.tempData=this.data},updataRow(e,t){let n=Object.assign({},this.data[e],t);this.data.splice(e,1,n),this.tempData=this.data},initMultiIndexColumn(e){let t={type:"index",key:"index",width:45};t.title=this.$t("行号"),t.align="center",e.push(t)},makeDynamicColumn(){let e=[];if(this.tableColumns=[],this.soltTableColumns=[],this.total_summary={},this.dynamicInitData&&this.dynamicInitData[this.myConfig.response]){e=this.$Method.copy(this.dynamicInitData[this.myConfig.response]);let t=[];t=this.$Method.copy(this.myConfig.dynameicColumnConfig.groupColumns);let n=[];this.myConfig.dynameicColumnConfig.dynameicColumnName&&(n=this.myConfig.dynameicColumnConfig.dynameicColumnName.split(","));let i=[];this.myConfig.dynameicColumnConfig.dynameicColumnValue&&(i=this.myConfig.dynameicColumnConfig.dynameicColumnValue.split(","));let o=[];this.myConfig.dynameicColumnConfig.dynameicColumnValueTitle&&(o=this.myConfig.dynameicColumnConfig.dynameicColumnValueTitle.split(","));let r=[];n.forEach((e=>{let t={};t.name=e,r.push(t)}));let a={},s={},l=0;e.forEach((e=>{let o="";t.forEach((t=>{o=o+e[t]+"-"})),o&&(o=o.substring(0,o.length-1));let c="",u="";n.forEach(((t,i)=>{c=c+e[t]+"-",r[i][e[t]]||(r[i][e[t]]={},r[i][e[t]].fatherId=u,r[i][e[t]].label=e[t]),u=e[t],i===n.length-1&&(r[i][e[t]].id=c.substring(0,c.length-1))})),c&&(c=c.substring(0,c.length-1)),a[o]||(a[o]={},a[o].data={},t.forEach((t=>{a[o].data[t]=e[t]})),a[o].columns={}),a[o].columns[c]||(i.length>1?(a[o].columns[c]={},i.forEach((t=>{a[o].columns[c][t]=e[t]}))):a[o].columns[c]=e[this.myConfig.dynameicColumnConfig.dynameicColumnValue]),s[c]||(s[c]={},s[c].name="dy_col_"+l,i.length>1?(s[c].sum={},i.forEach((t=>{s[c].sum[t]=e[t]}))):s[c].sum=0,l++),i.length>1?i.forEach((t=>{s[c].sum[t]=Number(s[c].sum[t])+Number(e[t])})):s[c].sum=Number(s[c].sum)+Number(e[this.myConfig.dynameicColumnConfig.dynameicColumnValue])}));let c=[];for(let e in a){let t={};Object.assign(t,a[e].data);let n=0;for(let o in s)i.length>1?void 0!==a[e].columns[o]?i.forEach((i=>{let r=s[o].name+"_"+i;t[r]=a[e].columns[o][i],n+=Number(t[r])})):i.forEach((e=>{let i=s[o].name+"_"+e;t[i]=0,n+=Number(t[i])})):void 0!==a[e].columns[o]?(t[s[o].name]=a[e].columns[o],n+=Number(t[s[o].name])):(t[s[o].name]=0,n+=Number(t[s[o].name]));t.dynamic_sum=n,c.push(t)}let u=[];this.makeDynamicColumnConfig(r,0,"",u,s,i,o);let d={};this.myConfig.dynameicColumnConfig.dynameicColumnSumLable?d.label=this.myConfig.dynameicColumnConfig.dynameicColumnSumLable:d.label=this.$t("动态合计"),d.type="NumberBox",d.contentAlign="right",d.summary=!0,d.name="dynamic_sum";let h=this.$Method.getTextWidth(d.label);d.width=h,Object.assign(d,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro),u.push(d);let A=this.myConfig.items.concat(u);this.dynamicColumnConfig=this.$Method.copy(A),this.initDynamicColumn(A);let f={},p=0;for(let e in s)i.length>1?i.forEach((t=>{let n=s[e].name+"_"+t;f[n]=s[e].sum[t],p+=Number(s[e].sum[t])})):(f[s[e].name]=s[e].sum,p+=Number(s[e].sum));f.dynamic_sum=p;let g=[];this.summaryColumn.forEach((e=>{void 0===f[e]&&g.push(e)})),g.length>0&&c.forEach((e=>{g.forEach((t=>{f[t]||(f[t]=0),f[t]=f[t]+Number(e[t])}))})),this.data=c,this.tempData=this.$Method.copy(c),this.total_summary=Object.assign({},{},f),this.myConfig.showSummary||Object.assign(this.myConfig,{showSummary:!0})}else this.myConfig.showSummary&&Object.assign(this.myConfig,{showSummary:!1})},initDynamicColumn(e){let t={},n=[],i=[];this.initCheckColumn(i),this.initOperColumn(i),this.initIndexColumn(i);const o=e.length;for(let a=0;a<o;a++)!1!==e[a].visible?this.initCommonColumn(e[a],i,n,t):void 0!==e[a].defaultValue&&(e[a].name&&(t[e[a].name]=e[a].defaultValue),e[a].sname&&(t[e[a].sname]=e[a].defaultValue),e[a].ename&&(t[e[a].ename]=e[a].defaultValue));this.total_summary={},this.newRow=D(t),n.push("dynamic_sum"),this.summaryColumn=D(n),this.tableColumns=D(i);let r=[];this.getSoltTableColumns(i,r),this.soltTableColumns=r,this.dynamicColumnItems=e},makeDynamicColumnConfig(e,t,n,i,o,r,a){let s=e[t];if(t===e.length-1)for(let l in s){if("name"===l)continue;let e={};if(e.label=s[l].label,r.length>1)e.align="center",e.children=[],r.forEach(((t,n)=>{let i={type:"NumberBox",align:"center",contentAlign:"right",summary:!0};Object.assign(i,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro),i.label=a[n]?this.$t(a[n]):a[n];let r=this.$Method.getTextWidth(i.label);i.width=r,i.name=o[s[l].id].name+"_"+t,e.children.push(i)}));else{e.type="NumberBox",e.align="center",e.contentAlign="right",e.summary=!0;let t=this.$Method.getTextWidth(e.label);e.width=t,o[s[l].id]&&(e.name=o[s[l].id].name),Object.assign(e,this.myConfig.dynameicColumnConfig.dynameicColumnValuePro)}n?s[l].fatherId===n&&(i.push(e),i.sort(((e,t)=>e>t))):(i.push(e),i.sort(((e,t)=>e>t)))}else for(let l in s){if("name"===l)continue;let c={};c.label=s[l].label,c.align="center",n?s[l].fatherId===n&&(c.children=[],this.makeDynamicColumnConfig(e,t+1,l,c.children,o,r,a),i.push(c),i.sort(((e,t)=>e>t))):(c.children=[],this.makeDynamicColumnConfig(e,t+1,l,c.children,o,r,a),i.push(c),i.sort(((e,t)=>e>t)))}},handleSummary({columns:e}){let t={};for(let o in this.newRow)t[o]={key:o,value:""};e.findIndex((e=>"index"===e.type))>-1&&(t.index={key:"index",value:""}),e.findIndex((e=>"selection"===e.type))>-1&&(t.selection={key:"selection",value:""});let n=[];n=this.myConfig.dynamicColumnFlag?this.dynamicColumnItems:this.config.items;for(let o in this.total_summary){let e={};if(this.findItemByName(n,o,e),e.name){let n=this.total_summary[o];void 0!==e.format&&(n=this.$Method.formatNumber(n,e.format,e.notzero)),t[o]={key:o,value:n}}}let i=this.findFirst(e);return t[i]={key:i,value:this.myConfig.sumText},this.myConfig.customSummary?this.myConfig.customSummary(t):t},findFirst(e){let t="";return e.some((e=>{if("selection"!==e.key&&"index"!==e.key&&"sumindex"!==e.key)return t=e.name,!0})),t},findItemByName(e,t,n){if(e instanceof Array){let i=!1;return e.some((e=>{if(e.children&&e.children.length>0){if(i=this.findItemByName(e.children,t,n),i)return!0}else if(e.name&&e.name===t)return Object.assign(n,e),i=!0,!0})),i}return!(!e.name||e.name!==t)&&(Object.assign(n,e),!0)},dynamicExportExcel(){let e=[];this.myConfig.dynameicColumnConfig.dynameicColumnName&&(e=this.myConfig.dynameicColumnConfig.dynameicColumnName.split(","));let t=e.length,n=this.$Method.getUrlParam("modulecode");n||(n=this.$Method.getUrlParam("billmoduleid"));let i=this.$Method.formatDate(new Date,"yyyyMMddhhmmss")+this.$t("({count}条).xlsx",{count:this.data.length});n&&(i=n+"_"+i);let o=this.$Method.copy(this.data);this.dynamicColumnConfig.forEach((e=>{if("ComboBox"===e.type){let t="code",n="name";e.valueField&&(t=column.valueField),e.textField&&(n=column.textField),o.forEach((i=>{if(i[e.name]&&e.data){let o=e.data.findIndex((n=>n[t]===i[e.name]));o>-1&&(!1===e.codeWithName?i[e.name]=e.data[o][n]:i[e.name]="["+e.data[o][t]+"]"+e.data[o][n])}}))}}));let r=[];this.initAsynExportConfig(this.dynamicColumnConfig,"",r),this.$Method.exportExcelStyle(r,o,t,i)},formatValue(e,t){let n="",i=this.$Method.copy(this.tempData[e]);t.name&&(n=i[t.name]);let o=t,r=this.$Method.formatValue(n,i,o),a={};return a.value=n,a.row=i,a.config=o,a.valueFormat=r,t.formatValue?t.formatValue(a):this.myConfig.formatValue?this.myConfig.formatValue(a):r},formatMulValue(e,t){let n="",i=this.$Method.copy(this.tempMultiSelectData[e]);t.name&&(n=i[t.name]);let o=t;return this.$Method.formatValue(n,i,o)},setCustomColumn(e){e.slot=e.key},onLinkTo(e){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),t.onLinkTo(e)},addRowInfo(e,t){let n=e.rowIndex;e.rowinfo={},e.rowinfo.column=t,e.rowinfo.index=n,n>-1&&(e.rowinfo.row=this.data[n]);e.rowinfo.gridObject=this},doSumgroups(e,t){let n=[];if(t.forEach((t=>{if(t.data&&t.data.length>0){let i=t.group.split(","),o="",r="";e.forEach(((e,a)=>{if(r="",i.forEach((t=>{r+=e[t]})),o||(o=r),o!==r){let e=t.data.find((e=>{let t="";return i.forEach((n=>{t+=e[n]})),t===o})),s={};if(s.index=a,s.sum=e,t.showgroup){let e=t.showgroup.split(",");s.showgroup=e}s.group=i,n.push(s),o=r}}))}})),n.length>0){let t=[];return e.forEach(((e,i)=>{let o=i+1;this.myConfig.showPage&&(o+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size),e.sumindex=o+"";let r=n.find((e=>e.index===i));r?(this.myConfig.customSummaryGroup&&(r=this.myConfig.customSummaryGroup(r)),r.showgroup&&r.group.forEach((e=>{-1===r.showgroup.findIndex((t=>e===t))&&(r.sum[e]="")})),r.sum.sumindex="",t.push(r.sum),t.push(e)):t.push(e)})),t}return e}},mounted(){this.observer=E.default(),this.$refs.head&&this.observer.listenTo(this.$refs.head,this.setExtraHeight),this.$refs.page&&this.observer.listenTo(this.$refs.page,this.setExtraHeight)},beforeUnmount(){this.$refs.head&&this.observer.removeListener(this.$refs.head,this.setExtraHeight),this.$refs.page&&this.observer.removeListener(this.$refs.page,this.setExtraHeight)}},pt={ref:"head"},gt={key:0},mt={key:0},yt={ref:"page",name:"page"},vt={key:0,style:{background:"#eee","padding-top":"5px"}},Ct=["textContent"],bt=["textContent"],wt={ref:"page",name:"page"},xt={key:0},Bt={key:1,ref:"page",style:{background:"#eee","padding-top":"5px"}};var Et=Ye({name:"viewgrid",extends:ft,mounted(){}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("ConditionBox"),s=c.resolveComponent("Col"),l=c.resolveComponent("Toolbar"),u=c.resolveComponent("CommonIcon"),d=c.resolveComponent("Tooltip"),h=c.resolveComponent("Row"),A=c.resolveComponent("ShowText"),f=c.resolveComponent("Table"),p=c.resolveComponent("Page"),g=c.resolveComponent("Card"),m=c.resolveComponent("Button");return c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("div",pt,[e.$slots.header?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(e.myConfig.headStyle)},[c.renderSlot(e.$slots,"header")],4)):(c.openBlock(),c.createElementBlock("div",{key:1,style:c.normalizeStyle(e.myConfig.headStyle)},[e.showCondition?(c.openBlock(),c.createElementBlock("div",gt,["billGrid"===e.myConfig.gridType?(c.openBlock(),c.createBlock(h,{key:0,gutter:4},{default:c.withCtx((()=>[c.createVNode(s,{span:"18"},{default:c.withCtx((()=>[c.createVNode(a,{ref:"condition",config:e.myConfig,onConditionAction:e.conditionAction,dictData:e.dictData,modelType:"billSearch"},null,8,["config","onConditionAction","dictData"])])),_:1}),c.createVNode(s,{span:"6"},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",gutter:8},{default:c.withCtx((()=>[c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(l,{config:e.myToolConfig,onDoAction:e.doBatchAction,tooltype:"batch",moduleMethod:e.globalConfig.moduleMethod},null,8,["config","onDoAction","moduleMethod"])])),_:1}),e.showHelpBtn?(c.openBlock(),c.createBlock(s,{key:0},{default:c.withCtx((()=>[c.createElementVNode("a",{href:"#",onClick:t[0]||(t[0]=c.withModifiers(((...t)=>e.openHelp&&e.openHelp(...t)),["prevent"]))},[c.createVNode(d,{content:e.$t("帮助中心"),placement:"left"},{default:c.withCtx((()=>[c.createVNode(u,{size:"32",color:"#2d8cf0",type:"md-help-circle"})])),_:1},8,["content"])])])),_:1})):c.createCommentVNode("",!0),e.modulecode?(c.openBlock(),c.createBlock(s,{key:1},{default:c.withCtx((()=>[c.createVNode(d,{content:e.modulecode,placement:"left"},{default:c.withCtx((()=>[c.createVNode(u,{size:"32",color:"#2d8cf0",type:"ios-information-circle-outline"})])),_:1},8,["content"])])),_:1})):c.createCommentVNode("",!0)])),_:1})])),_:1})])),_:1})):(c.openBlock(),c.createBlock(h,{key:1},{default:c.withCtx((()=>[c.createVNode(s,{span:"24"},{default:c.withCtx((()=>[c.createVNode(a,{ref:"condition",config:e.myConfig,onConditionAction:e.conditionAction,dictData:e.dictData,isPop:e.isPop},null,8,["config","onConditionAction","dictData","isPop"])])),_:1})])),_:1}))])):c.createCommentVNode("",!0)],4))],512),e.myConfig.multiSelectGrid?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(h,{type:"flex",justify:"center",align:"middle"},{default:c.withCtx((()=>[c.createVNode(s,{span:e.gridCol},{default:c.withCtx((()=>[c.createVNode(g,{padding:0,bordered:!1},{title:c.withCtx((()=>[c.createElementVNode("span",{textContent:c.toDisplayString(e.myConfig.gridTitle)},null,8,Ct)])),default:c.withCtx((()=>[c.createVNode(f,{ref:"table","row-class-name":e.myConfig.rowClassName,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary,loading:e.loading,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.tableColumns,data:e.tempData,onOnSortChange:e.sortChagne,onOnCurrentChange:e.onCurrentChange,"highlight-row":e.myConfig.highLightRow,onOnRowDblclick:e.dbclick,onOnSelect:e.onSelect,onOnSelectCancel:e.onSelectCancel,onOnSelectionChange:e.OnSelectionChange,onOnRowClick:e.click,onOnColumnWidthResize:e.onColumnWidthResize},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatValue(n,t),contentAlign:t.contentAlign,rowIndex:n},null,8,["label","contentAlign","rowIndex"])]))})))]),1032,["row-class-name","show-summary","summary-method","loading","size","stripe","border","height","max-height","show-header","columns","data","onOnSortChange","onOnCurrentChange","highlight-row","onOnRowDblclick","onOnSelect","onOnSelectCancel","onOnSelectionChange","onOnRowClick","onOnColumnWidthResize"])])),_:1})])),_:1},8,["span"]),c.createVNode(s,{span:"2"},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"center",align:"middle",style:{padding:"5px"}},{default:c.withCtx((()=>[c.createVNode(d,{content:e.$t("删除"),placement:"left"},{default:c.withCtx((()=>[c.createVNode(m,{type:"primary",size:"small",icon:"ios-arrow-back",disabled:!e.rightActive,onClick:e.moveToLeft},null,8,["disabled","onClick"])])),_:1},8,["content"])])),_:1}),c.createVNode(h,{type:"flex",justify:"center",align:"middle",style:{padding:"5px"}},{default:c.withCtx((()=>[c.createVNode(d,{content:e.$t("添加"),placement:"right"},{default:c.withCtx((()=>[c.createVNode(m,{type:"primary",size:"small",icon:"ios-arrow-forward",disabled:!e.leftActive,onClick:e.moveToRight},null,8,["disabled","onClick"])])),_:1},8,["content"])])),_:1})])),_:1}),c.createVNode(s,{span:e.multiGridCol},{default:c.withCtx((()=>[c.createVNode(g,{padding:0,bordered:!1},{title:c.withCtx((()=>[c.createElementVNode("span",{textContent:c.toDisplayString(e.myConfig.multiGridTitle)},null,8,bt)])),default:c.withCtx((()=>[c.createVNode(f,{ref:"multiSelectTable","row-class-name":e.myConfig.rowClassName,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.multiTableColumns,data:e.tempMultiSelectData,"highlight-row":e.myConfig.highLightRow,onOnSelectionChange:e.OnMultiSelectionChange},c.createSlots({_:2},[c.renderList(e.multiSoltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatMulValue(n,t),contentAlign:t.contentAlign},null,8,["label","contentAlign"])]))})))]),1032,["row-class-name","size","stripe","border","height","max-height","show-header","columns","data","highlight-row","onOnSelectionChange"])])),_:1})])),_:1},8,["span"])])),_:1}),c.createElementVNode("div",wt,[e.$slots.footer?(c.openBlock(),c.createElementBlock("div",xt,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0),e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Bt,[c.createVNode(g,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"start",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(p,{modelValue:e.culPage,"onUpdate:modelValue":t[2]||(t[2]=t=>e.culPage=t),total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["modelValue","total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)],512)],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(f,{ref:"table","row-class-name":e.myConfig.rowClassName,loading:e.loading,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,"max-height":e.tableMaxHeight,"show-header":e.myConfig.showHeader,columns:e.tableColumns,data:e.tempData,onOnSortChange:e.sortChagne,onOnCurrentChange:e.onCurrentChange,"highlight-row":e.myConfig.highLightRow,onOnRowDblclick:e.dbclick,onOnSelect:e.onSelect,onOnSelectCancel:e.onSelectCancel,onOnSelectionChange:e.OnSelectionChange,onOnRowClick:e.click,onOnColumnWidthResize:e.onColumnWidthResize},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createVNode(A,{label:e.formatValue(n,t),contentAlign:t.contentAlign,rowIndex:n},null,8,["label","contentAlign","rowIndex"])]))})))]),1032,["row-class-name","loading","show-summary","summary-method","size","stripe","border","height","max-height","show-header","columns","data","onOnSortChange","onOnCurrentChange","highlight-row","onOnRowDblclick","onOnSelect","onOnSelectCancel","onOnSelectionChange","onOnRowClick","onOnColumnWidthResize"]),e.$slots.footer?(c.openBlock(),c.createElementBlock("div",mt,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0),c.createElementVNode("div",yt,[e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",vt,[c.createVNode(g,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(p,{modelValue:e.culPage,"onUpdate:modelValue":t[1]||(t[1]=t=>e.culPage=t),total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["modelValue","total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})])):c.createCommentVNode("",!0)],512)],64))])}]]);const St={name:"editgridbase",extends:At,data:()=>({myConfig:{resources:"",method:"",response:"",searchParam:null,readOnly:!1,showIndex:!0,showCheckBox:!0,multiSelect:!0,addRowBefore:"",name:"",editItemMaxNum:8,lineNum:4,labelWidth:100,showAddBtn:!0,showDelBatchBtn:!0,showZoom:!1,delBatchBtnName:"删除",addBtnName:"新增",editBtnName:"编辑",cancelBtnName:"放弃",showPage:!1},showAddBtn:!0,showDelBatchBtn:!0,showDelBtn:!0,showZoom:!1,delBatchBtnName:"删除",addBtnName:"新增",showEditRowForm:!1,defaultRow:{},editItemNum:0,rowAction:[{iconcls:"row",name:"editRowForm",text:"编辑"}],openChange:!1,focusIndex:null,focusKey:null}),created(){this.myConfig.delBatchBtnName=this.$t("删除"),this.myConfig.addBtnName=this.$t("新增"),this.myConfig.editBtnName=this.$t("编辑"),this.myConfig.cancelBtnName=this.$t("放弃"),this.delBatchBtnName=this.$t("删除"),this.addBtnName=this.$t("新增"),this.rowAction[0].text=this.$t("编辑")},computed:{colKeys(){return this.soltTableColumns.map((e=>e.key))}},methods:{customInit(){this.myConfig.items&&this.myConfig.items.length>0&&this.myConfig.items.forEach((e=>{!1!==e.visible&&this.editItemNum++})),this.editItemNum>Number(this.myConfig.editItemMaxNum)?(this.showRowAction=!0,this.myToolConfig.items=this.$Method.copy(this.rowAction),this.editRowFlag=!1):(this.toolConfig.items=[],this.showRowAction=!1,this.editRowFlag=!0),this.showDelRow&&(this.myToolConfig.items||(this.myToolConfig.items=[]),this.myToolConfig.items=this.myToolConfig.items.concat(this.delRowAction)),void 0!==this.myConfig.showAddBtn&&(this.showAddBtn=this.myConfig.showAddBtn),void 0!==this.myConfig.showAddBtn&&(this.showAddBtn=this.myConfig.showAddBtn),void 0!==this.myConfig.addBtnName&&(this.addBtnName=this.myConfig.addBtnName),void 0!==this.myConfig.showDelBatchBtn&&(this.showDelBatchBtn=this.myConfig.showDelBatchBtn),void 0!==this.myConfig.showZoom&&(this.showZoom=this.myConfig.showZoom),this.myConfig.showPage&&(this.myConfig.indexMethod=this.customIndexMethod,this.myConfig.pageSizeNum?this.myConfig.pageConfig.page_size=Number(this.myConfig.pageSizeNum):this.myConfig.pageConfig.page_size=20),this.customInit2&&this.customInit2(),this.myConfig.getGridObject=this.getGridObject},getGridObject(){return this},conditionAction(e){let t=[];switch(e.action){case"condition_search":e.para&&(this.conditionSearchParam=this.$Method.copy(e.para)),this.refurbish();break;case"condition_clear":this.conditionSearchParam={};break;case"condition_ok":this.myConfig.multiSelect?t=this.getSelection():this.singleData.currentRow&&t.push(this.singleData.currentRow),0===t.length?this.alert(this.$t("请选择")):(e.action="viewgrid_ok",e.rows=t,this.$emit("viewGridAction",e));break;case"condition_cancel":e.action="viewgrid_cancel",this.$emit("viewGridAction",e)}},addRow(e){if(this.checkIsEdit&&!this.checkIsEdit())return;this.myConfig.readOnly&&this.setReadOnly(!1);let t=null;if(this.myConfig.addRowBefore){let e={};if(e.name=this.myConfig.name,e.grid=this.$refs.table,t=this.myConfig.addRowBefore(e),!1===t)return}t&&!0!==t||(t={}),e&&(t=Object.assign({},t,e)),this.initScrollLeft(),this.cancelCellEditing(),this.$nextTick((()=>{t.flag="I";let e=Object.assign({},this.newRow,t);this.data.push(e);let n={name:"editGrid"};n.gridname=this.myConfig.name,this.$emit("doAction",n)}))},setPro(e){e&&(this.myConfig=Object.assign({},this.myConfig,e))},setReadOnly(e){let t={};t.readOnly=e,!1!==this.config.showCheckBox&&(t.readOnly?t.showCheckBox=!1:t.showCheckBox=!0),this.cancelCellEditing(),this.setPro(t)},delBatchRow(){this.delCommonRow(null)},delRow(e){this.delCommonRow(e)},delCommonRow(e){let t=null,n=this;if(this.myConfig.delRowBefore){let n={};if(n.name=this.myConfig.name,n.grid=this.$refs.table,n.index=e,t=this.myConfig.delRowBefore(n),!1===t)return}if(this.cancelCellEditing(),e||0===e)this.remove(e);else{let e=this.getSelection();const t=e.length;for(let n=0;n<t;n++)this.remove(e[n]._customIndex,!0)}if(this.myConfig.delRowAfter){let e={};e.name=this.myConfig.name,e.grid=n,this.$nextTick((()=>{this.myConfig.delRowAfter(e)}))}},updataRow(e,t){let n=this.getData();if(this.myConfig.showPage){let i=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,o=i+this.myConfig.pageConfig.page_size,r=n[e],a=!0;if(e>=i&&e<o&&(a=!1),void 0===r.flag&&(t.flag="U"),t=Object.assign({},r,t),a)if("I"===r.flag){let n=this.getAddIndex(e);n>-1&&this.data.splice(this.getAddCurlIndex(n),1,t)}else this.initData.splice(e,1,t);else{let n=e-i;this.data.splice(n,1,t)}}else void 0===n[e].flag&&(t.flag="U"),t=Object.assign({},n[e],t),this.data.splice(e,1,t);this.showEditRowForm&&this.$refs.rowForm&&e===this.$refs.rowForm.getEditIndex()&&this.$refs.rowForm.setData(t)},updateRow(e,t){this.updataRow(e,t)},initRowForm(e){"D"!==e.rowinfo.row.flag&&(this.showEditRowForm=!0,this.$refs.rowForm.setEditIndex(e.rowinfo.index),this.$refs.rowForm.setData(e.rowinfo.row))},OnSelectionChange(e){this.myConfig.onSelectionChange&&this.myConfig.onSelectionChange(e);let t=this.$Method.copy(this.data),n=!1;t.forEach(((t,i)=>{n=!1,e.forEach((e=>{if(i===e._customIndex)return n=!0,!0})),t._checked=n})),this.data=t},customInitOperColumn(e,t){if(!0!==this.myConfig.readOnly)if(!1===this.showDelRow){let n=this.myToolConfig.items.findIndex((e=>"delRow"===e.name));n>-1&&this.myToolConfig.items.splice(n,1),this.myToolConfig.items.length>0&&t.push(e)}else t.push(e)},editRow(){let e=this.$refs.rowForm.getData();this.$refs.rowForm.cancelCellEditing(),this.updateRow(this.$refs.rowForm.getEditIndex(),e)},getChangeData(){let e=[],t=this.getData();return t.length>0&&t.forEach((t=>{void 0!==t.flag&&e.push(t)})),this.myConfig.showPage?e:this.delData.concat(e)},isChange(){return this.getChangeData().length>0},setShowAddBtn(e){this.showAddBtn=e},setShowDelBatchBtn(e){this.showDelBatchBtn=e},setCustomColumn(e){e.slot=e.key},addRowInfo(e,t){let n=this.editIndex;e.rowinfo={},e.rowinfo.column=t,-1===n&&(n=this.oldEditIndex),e.rowinfo.index=n,n>-1&&(e.rowinfo.row=this.$Method.copy(this.data[n]));e.rowinfo.gridObject=this},valueChanged(e){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),t.valueChanged(e)},onLinkTo(e){if(this.myConfig.readOnly){const t=this.findColumnConfig(e.name,this.myConfig.items);return this.addRowInfo(e,t),e.rowinfo.index=e.rowIndex,e.rowIndex>-1&&(e.rowinfo.row=this.$Method.copy(this.data[e.rowIndex])),t.onLinkTo(e)}},searchBefore(e){const t=this.findColumnConfig(e.myConfig.name,this.myConfig.items);return this.addRowInfo(e,t),t.searchBefore(e)},setDataBefore(e,t){const n=this.findColumnConfig(t.myConfig.name,this.myConfig.items);let i={};return i.data=e,i.tabname=this.myConfig.name,this.addRowInfo(i,n),n.setDataBefore(i,t)},cancelCellEditing(){let e="cell_"+this.editIndex+"_"+this.editKey;this.$refs[e]&&this.$refs[e].setFocus&&this.$refs[e].setFocus(!1);let t=this;this.$nextTick((()=>{t.editKey="",t.oldEditIndex=this.editIndex,t.editIndex=-1}))},IsCellError(e,t){let n="",i=this.$Method.copy(this.data[e]);if("D"===i.flag)n="efutre-del-row";else if(!0===t.required&&!i[t.name]&&0!==i[t.name]){let o=e;this.myConfig.showPage?"I"===i.flag?(o=this.getAddIndex(e,!0),this.checkAddInfo.length>o&&this.checkAddInfo[o][t.key]&&(n="efuture-grid-cell-error")):(o+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,this.checkInfo.length>o&&this.checkInfo[o][t.key]&&(n="efuture-grid-cell-error")):this.checkInfo.length>o&&this.checkInfo[o][t.key]&&(n="efuture-grid-cell-error")}return n||(n="efuture-grid-cell"),n},EditCell(e,t){if(this.myConfig.readOnly)return void this.cancelCellEditing();if(t.readOnly)return void this.cancelCellEditing();let n=this.getCurRow(e);if(!(this.myConfig.showPage&&"D"===n.flag||this.editIndex===e&&this.editKey===t.key))if(this.myConfig.cellbeginedit){let i={};if(i.index=e,i.column=t,i.tabname=this.myConfig.name,i.row=n,!this.myConfig.cellbeginedit(i))return void this.cancelCellEditing();this.editIndex=e,this.editKey=t.key,this.setcheckInfo(e,t.key)}else this.editIndex=e,this.editKey=t.key,this.setcheckInfo(e,t.key)},setEditGridFocus(e,t){this.focusIndex=e,this.focusKey=t,this.editIndex=e,this.editKey=t,this.focusCell(e,t)},focusCell(e,t){this.$nextTick((()=>{const n=this.$refs.table.$el,i=`div[cell-row="${e}"][cell-col="${t}"]`;let o=n.querySelector(i);if(o){const e=n.querySelectorAll(".ivu-table-column-selected");0!=e.length&&e.forEach((e=>{e.classList.remove("ivu-table-column-selected")}));const t=o.closest("td");t&&(t.classList.add("ivu-table-column-selected"),t.scrollIntoView({behavior:"smooth",block:"nearest"}))}}))},handleKeydown(e){if(null===this.focusIndex||null===this.focusKey)return;const t=this.colKeys.findIndex((e=>e==this.focusKey));this.focusKey=this.colKeys[t];let n=this.focusIndex,i=t,o="cell_"+this.editIndex+"_"+this.editKey;const{key:r}=e;if("ArrowUp"==r&&(this.focusIndex>0&&n--,this.extEditStatus()),"ArrowDown"==r&&(this.focusIndex<this.data.length-1&&n++,this.extEditStatus()),"ArrowLeft"==r&&(t>1&&i--,this.extEditStatus()),"ArrowRight"==r&&(t<this.colKeys.length-1&&i++,this.extEditStatus()),"Enter"==r&&t<this.colKeys.length-1&&i++,this.setEditGridFocus(n,this.colKeys[i]),this.myConfig.readOnly)this.handleOut();else if(this.$refs[o]&&this.$refs[o].autofocus)return!0;e.preventDefault()},extEditStatus(){if(!this.myConfig.readOnly){let e="cell_"+this.editIndex+"_"+this.editKey;this.$refs[e]&&this.$refs[e].setFocus&&this.$refs[e].setFocus(!1);let t=this;this.$nextTick((()=>{t.editKey="",t.oldEditIndex=this.editIndex}))}},setcheckInfo(e,t){let n=e,i=this.getCurRow(e);this.myConfig.showPage?(n+=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,"I"===i.flag?this.setCheckCommonInfo(this.checkAddInfo,this.getAddIndex(e,!0),t):this.setCheckCommonInfo(this.checkInfo,n,t)):this.setCheckCommonInfo(this.checkInfo,n,t)},setCheckCommonInfo(e,t,n){if(e.length>t)this.checkInfo[t][n]=!0;else{let n=e.length;for(let i=0;i<t-n+1;i++)e.push({})}e[t][n]=!0},formatValue(e,t){let n="",i=this.$Method.copy(this.data[e]);t.name&&(n=i[t.name]);let o=t;if(t.updateCellConfig){let n={};n.index=e,n.column=t,n.row=this.$Method.copy(this.data[e]),o=t.updateCellConfig(n)}let r=this.$Method.formatValue(n,i,o),a={};return a.value=n,a.row=i,a.config=o,a.valueFormat=r,t.formatValue?t.formatValue(a):this.myConfig.formatValue?this.myConfig.formatValue(a):r},getCellConfig(e,t){const n=this.findColumnConfig(t.name,this.myConfig.items);if(n.updateCellConfig){let i={};i.index=e,i.column=t,i.row=this.$Method.copy(this.data[e]);let o=n.updateCellConfig(i);return o.onOpenChange=this.onOpenChange,o.place="grid",o}return t.onOpenChange=this.onOpenChange,t.place="grid",t},onOpenChange(e){this.openChange=e},getCurRow(e){return this.$Method.copy(this.data[e])},handleOut(){this.editKey&&(this.openChange||this.cancelCellEditing())},checkValidate(){this.cancelCellEditing();let e=!1,t=this.getData();if(t.length>0){let n=[];this.soltTableColumns.some((e=>{(e.name||e.sname)&&!1!==e.visible&&!0===e.required&&(e.name&&n.push(e.name),e.sname&&n.push(e.sname),e.ename&&n.push(e.ename))}));let i=-1;t.forEach(((t,o)=>{"I"===t.flag&&i++,"D"!==t.flag&&n.forEach((n=>{t[n]||0===t[n]||(e||(e=!0),this.myConfig.showPage&&"I"===t.flag?this.setCheckCommonInfo(this.checkAddInfo,i,n):this.setCheckCommonInfo(this.checkInfo,o,n))}))}))}return e},setShowBtn(e){this.showBtn=e},doAction(e){this[e.name]&&this[e.name](e)},enterKeyDown(){let e=this.findNextItems(this.editIndex,this.editKey);e&&(this.editIndex=e.editIndex,this.editKey=e.editKey,this.setcheckInfo(e.editIndex,e.editKey))},findNextItems(e,t){let n=this.soltTableColumns.findIndex((e=>e.name===t||e.sname===t)),i=n+1;if(!(n>-1))return null;if(i>=this.soltTableColumns.length)if(e+1>=this.data.length)e=this.findNextRow(0),i=0,"selection"!==this.soltTableColumns[0].type&&"index"!==this.soltTableColumns[0].type||i++,"index"===this.soltTableColumns[1].type&&i++;else{let t=e+1;e=this.findNextRow(t),i=0,"selection"!==this.soltTableColumns[0].type&&"index"!==this.soltTableColumns[0].type||i++,"index"===this.soltTableColumns[1].type&&i++}let o=this.soltTableColumns[i],r=this.getCellConfig(e,o),a=r.name;if(r.sname&&(a=r.sname),!0===r.readOnly||!1===r.visible||"PictureBox"===r.type||"VideoBox"===r.type||"RichTextBox"===r.type||"wRichTextBox"===r.type||"selection"===r.type||"index"===r.type)return this.findNextItems(e,a);if(this.myConfig.cellbeginedit){let t={};if(t.index=e,t.column=r,t.tabname=this.myConfig.name,t.row=this.$Method.copy(this.data[e]),this.myConfig.cellbeginedit(t)){let t={};return t.editIndex=e,t.editKey=a,t}return this.findNextItems(e,a)}{let t={};return t.editIndex=e,t.editKey=a,t}},customIndexMethod:(e,t)=>"I"===e.flag?"+":t,findNextRow(e){let t=e;return this.myConfig.showPage&&this.data.some(((n,i)=>{if(i>=e&&"D"!==n.flag)return t=i,!0})),t},rowClassName:e=>"D"===e.flag?"efutre-del-row":"",getCellClass(e){let t=this.getCurRow(e);return t&&"D"===t.flag?"efutre-del-row":""},changePageSize(e){this.saveCurlData(this.myConfig.pageConfig.page_no,this.initData),this.myConfig.pageConfig.page_no=1,this.data=this.fillData(this.myConfig.pageConfig.page_no,e),this.myConfig.pageConfig.page_size=e,this.cancelCellEditing()},changePage(e){this.saveCurlData(this.myConfig.pageConfig.page_no,this.initData),this.data=this.fillData(e,this.myConfig.pageConfig.page_size),this.myConfig.pageConfig.page_no=e,this.cancelCellEditing()},customClearData(){this.initScrollLeft()},saveCurlData(e,t){let n=[];this.data.forEach(((i,o)=>{let r=(e-1)*this.myConfig.pageConfig.page_size+o;"U"===i.flag||"D"===i.flag?t.splice(r,1,i):"I"===i.flag&&n.push(i)})),this.addData=n},setData(e){e||(e=[]),this.myConfig.showPage?(this.initData=this.$Method.copy(e),this.myConfig.pageConfig.page_no=1,this.myConfig.pageConfig.total_results=e.length,this.data=this.fillData(this.myConfig.pageConfig.page_no,this.myConfig.pageConfig.page_size)):(this.data=e,this.initData=this.$Method.copy(this.data)),this.addData=[],this.delData=[],this.checkInfo=[],this.initScrollLeft(),this.cancelCellEditing()},fillData(e,t){let n=[],i=(e-1)*t,o=i+t;o>this.myConfig.pageConfig.total_results&&(o=this.myConfig.pageConfig.total_results);for(var r=i,a=o;r<a;r++){var s=this.initData[r];s&&n.push(s)}return this.addData.forEach((e=>{n.push(e)})),n},getData(){if(this.myConfig.showPage){let e=this.$Method.copy(this.initData);return this.saveCurlData(this.myConfig.pageConfig.page_no,e),this.addData.forEach((t=>{e.push(t)})),e}return this.$Method.copy(this.data)},remove(e,t){let n=e;if(t){let t=this.data.findIndex((t=>t._customIndex===e));t>-1&&(n=t)}let i=this.getData();if(n>-1)if(void 0===i[n].flag||"U"===i[n].flag){let t=this.$Method.copy(i[n]);if(t.flag="D",this.myConfig.showPage){let i=(this.myConfig.pageConfig.page_no-1)*this.myConfig.pageConfig.page_size,o=i+this.myConfig.pageConfig.page_size,r=n;e>=i&&e<o?(r=e-i,this.data.splice(r,1,t)):this.initData.splice(r,1,t)}else this.delData.push(t),this.data.splice(n,1)}else if("I"===i[n].flag)if(this.myConfig.showPage){let e=this.getAddIndex(n);e>-1&&(this.checkAddInfo.splice(e,1),this.data.splice(this.getAddCurlIndex(e),1))}else this.data.splice(n,1),this.checkInfo.splice(n,1);this.initScrollLeft()},getAddIndex(e,t){let n=-1,i=[];return i=t?this.data:this.getData(),i.some(((t,i)=>{if("I"===t.flag&&n++,i===e)return!0})),n},getAddCurlIndex(e){let t=-1,n=-1;return this.data.some(((i,o)=>{if("I"===i.flag&&t++,t===e)return n=o,!0})),n},setSummary(e,t,n){if(e.children)e.children.forEach((e=>{this.setSummary(e,t.sums)}));else{const i=e.key;if(e.summary){const o=t.map((e=>Number(e[i])));if(o.every((e=>isNaN(e))))n[i]={key:i,value:"N/A"};else{const t=o.reduce(((e,t)=>{const n=Number(t);return isNaN(n)?e:e+t}),0);n[i]={key:i,value:this.$Method.formatNumber(t,e.format,e.notzero),countValue:t}}}else n[i]={key:i,value:""}}},handleSummary({columns:e,data:t}){const n={};e.forEach((e=>{this.setSummary(e,t,n)}));let i=this.findFirst(e);return n[i]={key:i,value:this.myConfig.sumText},this.myConfig.customSummary?this.myConfig.customSummary(n):n},findFirst(e){let t="";return e.some((e=>{if("selection"!==e.key&&"index"!==e.key)return t=e.name,!0})),t}}},kt=["id"],_t={key:0},Dt=["onClick"],Ft={key:0,ref:"page",style:{background:"#eee","padding-top":"5px",width:"100%"}};var Ot=Ye({name:"editgrid",extends:St,mounted(){this.$refs.card&&this.$refs.card.$el&&(this.$refs.card.$el.onmouseleave=()=>{})}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Button"),s=c.resolveComponent("Col"),l=c.resolveComponent("Row"),u=c.resolveComponent("ControlBox"),d=c.resolveComponent("ShowText"),h=c.resolveComponent("Table"),A=c.resolveComponent("Page"),f=c.resolveComponent("Card"),p=c.resolveComponent("ExpandRow"),g=c.resolveComponent("Modal");return c.openBlock(),c.createElementBlock("div",{ref:"card",id:e.config.name,style:{padding:"5px"}},[e.$slots.header?(c.openBlock(),c.createElementBlock("div",_t,[c.renderSlot(e.$slots,"header")])):c.withDirectives((c.openBlock(),c.createBlock(l,{key:1,type:"flex",justify:"start",gutter:4},{default:c.withCtx((()=>[c.withDirectives(c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(a,{icon:"ios-add",size:"small",onClick:e.addRow},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.addBtnName),1)])),_:1},8,["onClick"])])),_:1},512),[[c.vShow,e.showAddBtn]]),c.withDirectives(c.createVNode(s,null,{default:c.withCtx((()=>[c.createVNode(a,{icon:"ios-remove",size:"small",onClick:e.delBatchRow},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(e.delBatchBtnName),1)])),_:1},8,["onClick"])])),_:1},512),[[c.vShow,e.showDelBatchBtn]])])),_:1},512)),[[c.vShow,!e.myConfig.readOnly]]),c.createVNode(l,null,{default:c.withCtx((()=>[c.createVNode(h,{ref:"table",style:{"margin-top":"5px"},"row-class-name":e.rowClassName,loading:e.loading,size:e.myConfig.tableSize,stripe:e.myConfig.showStripe,border:e.myConfig.showBorder,height:e.tableHeight,maxHeight:e.tableMaxHeight,"show-header":e.myConfig.showHeader,onOnSelectionChange:e.OnSelectionChange,columns:e.tableColumns,data:e.data,onOnColumnWidthResize:e.onColumnWidthResize,"show-summary":e.myConfig.showSummary,"summary-method":e.handleSummary},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createElementVNode("div",{onClick:i=>e.EditCell(n,t)},[e.editIndex===n&&e.editKey===t.key?(c.openBlock(),c.createBlock(u,{key:0,autofocus:!0,config:e.getCellConfig(n,t),valueData:e.getCurRow(n),onInputValue:e.input,editIndex:n,onDoAction:e.doAction},null,8,["config","valueData","onInputValue","editIndex","onDoAction"])):(c.openBlock(),c.createBlock(d,{key:1,label:e.formatValue(n,t),contentAlign:t.contentAlign,class:c.normalizeClass(e.IsCellError(n,t))},null,8,["label","contentAlign","class"]))],8,Dt)]))})))]),1032,["row-class-name","loading","size","stripe","border","height","maxHeight","show-header","onOnSelectionChange","columns","data","onOnColumnWidthResize","show-summary","summary-method"]),e.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Ft,[c.createVNode(f,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(l,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(A,{total:e.myConfig.pageConfig.total_results,size:e.myConfig.pageSize,current:e.myConfig.pageConfig.page_no,"page-size":e.myConfig.pageConfig.page_size,"page-size-opts":e.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":e.myConfig.pageShowTotal,"show-elevator":e.myConfig.pageShowElevator,"show-sizer":e.myConfig.pageShowSizer},null,8,["total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)])),_:1}),e.editRowFlag?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(g,{key:2,modelValue:e.showEditRowForm,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showEditRowForm=t),width:"90%",title:e.$t("编辑"),onOnOk:e.editRow},{default:c.withCtx((()=>[c.createElementVNode("div",null,[c.createVNode(p,{ref:"rowForm",config:e.myConfig,dictData:e.dictData},null,8,["config","dictData"])])])),_:1},8,["modelValue","title","onOnOk"]))],8,kt)}]]);const Tt=["textContent"],Nt={key:1},It={key:4,style:{"margin-left":"10px"}},Rt=["onClick"],Mt={key:0,ref:"page",style:{background:"#eee","padding-top":"5px",width:"100%"}};var Lt=Ye({name:"editgridcard",extends:St,data(){return{myConfig:{addBtnType:"2",hide:!0,titleType:1,bordered:!0,disHover:!1,operFixedFlag:!1},btnReadOnly:!1,showBtn:!0,cardPadding:0,cardStyle:"",showGrid:!0,showTitle:!0,editFlag:!1,pStyle:"",iconStyle:"",showDelRow:!0,rowAction:[],delRowAction:[{iconcls:"row",icon:"ios-trash",name:"delRow",text:this.$t("删除"),size:"20",type:"text"}]}},computed:{titleClass(){return`efuture-title-font-${this.myConfig.titleType}`},headClass(){return this.showGrid?`efuture-card-head-title-${this.myConfig.titleType}`:`efuture-card-head-title-${this.myConfig.titleType} efuture-card-head-title-nobottom`},extraClass(){return`efuture-card-extra-title-${this.myConfig.titleType}`}},methods:{customInit2(){this.myConfig.hide&&(this.pStyle="cursor:pointer",this.iconStyle="transform: rotate(90deg)"),1!==this.myConfig.titleType?(void 0===this.config.hide&&(this.myConfig.hide=!1),void 0===this.config.bordered&&(this.myConfig.bordered=!1),void 0===this.config.disHover&&(this.myConfig.disHover=!0)):(void 0===this.config.hide&&(this.myConfig.hide=!0),void 0===this.config.bordered&&(this.myConfig.bordered=!0),void 0===this.config.disHover&&(this.myConfig.disHover=!1)),void 0!==this.myConfig.showTitle&&(this.showTitle=this.myConfig.showTitle),void 0!==this.myConfig.showBtn&&(this.showBtn=this.myConfig.showBtn),void 0!==this.myConfig.showAddBtn&&(this.showBtn=this.myConfig.showAddBtn),this.myToolConfig.icon=!0,this.setTitleStyle()},toggle(){this.myConfig.hide&&(this.showGrid=!this.showGrid,this.setTitleStyle())},setShowGrid(e){this.showGrid=e,this.setTitleStyle()},setTitleStyle(){this.showGrid?(this.iconStyle="transform: rotate(90deg)",this.cardPadding=5*Number(this.myConfig.titleType),this.cardStyle="padding-left:"+this.cardPadding+"px;padding-right:"+this.cardPadding+"px;padding-bottom: 10px;"):(this.iconStyle="",this.cardPadding=0,this.cardStyle="")},editGrid(){if(this.checkIsEdit()){this.setReadOnly(!1);let e={name:"editGrid"};e.gridname=this.myConfig.name,this.$emit("doAction",e)}},cancelGrid(){this.setData(this.initData),this.setReadOnly(!0);let e={name:"cancelGrid"};e.gridname=this.myConfig.name,this.$emit("doAction",e)},checkIsEdit(){let e=!0;return this.myConfig.editObjectBefore&&(e=this.myConfig.editObjectBefore(this.myConfig.name)),e},setBtnType(e){let t={};t.addBtnType=e,this.setPro(t)},setBtnReadOnly(e){this.btnReadOnly=e}},mounted(){this.$refs.card&&this.$refs.card.$el&&(this.$refs.card.$el.onmouseleave=()=>{this.handleOut()})}},[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Icon"),s=c.resolveComponent("ControlBox"),l=c.resolveComponent("ShowText"),u=c.resolveComponent("Table"),d=c.resolveComponent("Page"),h=c.resolveComponent("Row"),A=c.resolveComponent("Card"),f=c.resolveComponent("Button");return c.openBlock(),c.createBlock(A,{ref:"card",padding:0,bordered:o.myConfig.bordered,"dis-hover":o.myConfig.disHover,headClass:r.headClass,extraClass:r.extraClass},c.createSlots({extra:c.withCtx((()=>[o.showBtn&&o.myConfig.readOnly&&"3"===o.myConfig.addBtnType&&!o.btnReadOnly?(c.openBlock(),c.createElementBlock("a",{key:0,href:"#",onClick:t[1]||(t[1]=c.withModifiers(((...e)=>r.editGrid&&r.editGrid(...e)),["prevent"]))},c.toDisplayString(o.myConfig.editBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&o.myConfig.readOnly&&"3"===o.myConfig.addBtnType&&o.btnReadOnly?(c.openBlock(),c.createElementBlock("span",Nt,c.toDisplayString(o.myConfig.editBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&!o.myConfig.readOnly&&"3"===o.myConfig.addBtnType?(c.openBlock(),c.createElementBlock("a",{key:2,href:"#",onClick:t[2]||(t[2]=c.withModifiers(((...e)=>r.cancelGrid&&r.cancelGrid(...e)),["prevent"]))},c.toDisplayString(o.myConfig.cancelBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&"3"===o.myConfig.addBtnType&&!o.btnReadOnly?(c.openBlock(),c.createElementBlock("a",{key:3,style:{"margin-left":"10px"},href:"#",onClick:t[3]||(t[3]=c.withModifiers(((...t)=>e.addRow&&e.addRow(...t)),["prevent"]))},c.toDisplayString(o.myConfig.addBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&"3"===o.myConfig.addBtnType&&o.btnReadOnly?(c.openBlock(),c.createElementBlock("span",It,c.toDisplayString(o.myConfig.addBtnName),1)):c.createCommentVNode("",!0),o.showBtn&&!o.myConfig.readOnly&&"1"===o.myConfig.addBtnType?(c.openBlock(),c.createElementBlock("a",{key:5,href:"#",onClick:t[4]||(t[4]=c.withModifiers(((...t)=>e.addRow&&e.addRow(...t)),["prevent"]))},c.toDisplayString(o.myConfig.addBtnName),1)):c.createCommentVNode("",!0)])),default:c.withCtx((()=>[c.withDirectives(c.createElementVNode("div",{style:c.normalizeStyle(o.cardStyle)},[c.createVNode(h,null,{default:c.withCtx((()=>[c.createVNode(u,{ref:"table",loading:e.loading,size:o.myConfig.tableSize,"row-class-name":e.rowClassName,stripe:o.myConfig.showStripe,border:o.myConfig.showBorder,height:e.tableHeight,maxHeight:e.tableMaxHeight,"show-header":o.myConfig.showHeader,columns:e.tableColumns,onOnSelectionChange:e.OnSelectionChange,data:e.data,onOnColumnWidthResize:e.onColumnWidthResize,"show-summary":o.myConfig.showSummary,"summary-method":e.handleSummary},c.createSlots({_:2},[c.renderList(e.soltTableColumns,(t=>({name:t.key,fn:c.withCtx((({index:n})=>[c.createElementVNode("div",{onClick:i=>e.EditCell(n,t),class:"ivu-table-cell"},[e.editIndex===n&&e.editKey===t.key?(c.openBlock(),c.createBlock(s,{key:0,config:e.getCellConfig(n,t),autofocus:!0,valueData:e.getCurRow(n),onInputValue:e.input,editIndex:n,onDoAction:e.doAction},null,8,["config","valueData","onInputValue","editIndex","onDoAction"])):(c.openBlock(),c.createBlock(l,{key:1,style:{display:"inline-block"},label:e.formatValue(n,t),contentAlign:t.contentAlign,class:c.normalizeClass(e.IsCellError(n,t))},null,8,["label","contentAlign","class"]))],8,Rt)]))})))]),1032,["loading","size","row-class-name","stripe","border","height","maxHeight","show-header","columns","onOnSelectionChange","data","onOnColumnWidthResize","show-summary","summary-method"]),o.myConfig.showPage?(c.openBlock(),c.createElementBlock("div",Mt,[c.createVNode(A,{bordered:!1,padding:0,"dis-hover":!0,style:{"border-radius":"0px"}},{default:c.withCtx((()=>[c.createVNode(h,{type:"flex",justify:"end",style:{padding:"5px","padding-right":"10px"}},{default:c.withCtx((()=>[c.createVNode(d,{total:o.myConfig.pageConfig.total_results,size:o.myConfig.pageSize,current:o.myConfig.pageConfig.page_no,"page-size":o.myConfig.pageConfig.page_size,"page-size-opts":o.myConfig.pageConfig.pageSizeList,onOnPageSizeChange:e.changePageSize,onOnChange:e.changePage,"show-total":o.myConfig.pageShowTotal,"show-elevator":o.myConfig.pageShowElevator,"show-sizer":o.myConfig.pageShowSizer},null,8,["total","size","current","page-size","page-size-opts","onOnPageSizeChange","onOnChange","show-total","show-elevator","show-sizer"])])),_:1})])),_:1})],512)):c.createCommentVNode("",!0)])),_:1}),o.showBtn&&!o.myConfig.readOnly&&"2"===o.myConfig.addBtnType?(c.openBlock(),c.createBlock(h,{key:0,type:"flex",justify:"center",style:{"margin-top":"10px","margin-bottom":"10px"}},{default:c.withCtx((()=>[c.createVNode(f,{type:"default",style:{"background-color":"#f8f8f9"},onClick:e.addRow,long:""},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.myConfig.addBtnName),1)])),_:1},8,["onClick"])])),_:1})):c.createCommentVNode("",!0)],4),[[c.vShow,o.showGrid]])])),_:2},[o.showTitle?{name:"title",fn:c.withCtx((()=>[c.createElementVNode("p",{style:c.normalizeStyle(o.pStyle),onClick:t[0]||(t[0]=(...e)=>r.toggle&&r.toggle(...e))},[c.createElementVNode("span",{class:c.normalizeClass(r.titleClass),textContent:c.toDisplayString(o.myConfig.title?e.$t(o.myConfig.title):o.myConfig.title)},null,10,Tt),o.myConfig.hide?(c.openBlock(),c.createBlock(a,{key:0,class:"efuture-title-icon",style:c.normalizeStyle(o.iconStyle),type:"ios-arrow-forward"},null,8,["style"])):c.createCommentVNode("",!0)],4)])),key:"0"}:void 0]),1032,["bordered","dis-hover","headClass","extraClass"])}]]);const Vt={name:"textbox",extends:ot,components:{},data:()=>({myConfig:{maxLength:null,vtype:"text",defaultValue:"",rows:3,clearable:!1,appendWidth:80,search:!1,allowInput:!0,showAppend:!1,notSpecial:!1,maskToggle:!1},passwordFlag:!1,maskVisible:!1}),computed:{isMaskMode(){return"mask"===this.myConfig.vtype},inputType(){return this.isMaskMode?"text":this.myConfig.vtype}},mounted(){this.isMaskMode&&this.$nextTick((()=>{this.hardenMaskInput()}))},updated(){this.isMaskMode&&this.$nextTick((()=>{this.hardenMaskInput()}))},methods:{hardenMaskInput(){const e=this.$refs.myControl;if(!e||!e.$el)return;const t=e.$el.querySelector?e.$el.querySelector("input"):null;t&&("text"!==t.type&&t.setAttribute("type","text"),t.setAttribute("autocomplete","off"),t.setAttribute("name","mask-field"),t.setAttribute("data-lpignore","true"),t.setAttribute("data-1p-ignore","true"),t.setAttribute("data-form-type","other"))},toggleMask(){this.maskVisible=!this.maskVisible},keyUp(e){this.myConfig.notSpecial&&(e.target.value=e.target.value.replace(/[`~!@$%^&*()_+=<>?:"{}|,\/;'\\[\]·~!@¥%……&*()+={}|《》?:“”【】、;‘’,。、-]/g,""))},customInit(){"password"===this.myConfig.vtype?(this.passwordFlag=!0,void 0!==this.myConfig.passwordFlag&&(this.passwordFlag=this.myConfig.passwordFlag)):this.passwordFlag=!1},_enterSetFatherValue(){"textarea"!==this.myConfig.vtype&&(this.isEnter=!0),this.setFatherValue()},search(){if(this.myConfig.onSearch&&!0!==this.myConfig.readOnly){let e=this,t={};t.control=e,t.name=this.myConfig.name,this.myConfig.onSearch(t)}},appendClick(){this.myConfig.onAppend&&this.myConfig.onAppend()},setFocus(e){e?this.$refs.myControl.focus():this.$refs.myControl.blur()}}};var Pt=Ye(Vt,[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Icon"),s=c.resolveComponent("Button"),l=c.resolveComponent("Input");return c.withDirectives((c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["textbox-wrapper",{"textbox-mask":r.isMaskMode,"textbox-mask-visible":r.isMaskMode&&o.maskVisible}])},[r.isMaskMode?(c.openBlock(),c.createElementBlock("form",{key:0,autocomplete:"off",onSubmit:t[1]||(t[1]=c.withModifiers((()=>{}),["prevent"])),style:{margin:"0",padding:"0"}},[t[3]||(t[3]=c.createElementVNode("input",{type:"text",name:"username",autocomplete:"off",tabindex:"-1","aria-hidden":"true",style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:"0"}},null,-1)),t[4]||(t[4]=c.createElementVNode("input",{type:"password",name:"password",autocomplete:"off",tabindex:"-1","aria-hidden":"true",style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:"0"}},null,-1)),c.createVNode(l,{ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[0]||(t[0]=t=>e.value=t),size:o.myConfig.size,type:r.inputType,password:o.passwordFlag,autocomplete:"off",name:"mask-field","data-lpignore":"true","data-1p-ignore":"true","data-form-type":"other",role:"textbox",rows:o.myConfig.rows,placeholder:o.myConfig.placeholder,maxlength:o.myConfig.maxLength,disabled:o.myConfig.readOnly,clearable:o.myConfig.clearable,readonly:!o.myConfig.allowInput,onKeydown:c.withKeys(c.withModifiers(r._enterSetFatherValue,["stop"]),["enter"]),onKeyup:r.keyUp,onOnBlur:e.setFatherValue,search:o.myConfig.search,onOnSearch:r.search},c.createSlots({_:2},[o.myConfig.maskToggle?{name:"suffix",fn:c.withCtx((()=>[c.createVNode(a,{type:o.maskVisible?"md-eye-off":"md-eye",onClick:c.withModifiers(r.toggleMask,["stop"]),style:{cursor:"pointer","font-size":"16px"}},null,8,["type","onClick"])])),key:"0"}:void 0,o.myConfig.showAppend?{name:"append",fn:c.withCtx((()=>[c.createVNode(s,{size:o.myConfig.size,type:"primary",disabled:o.myConfig.readOnly,onClick:r.appendClick},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.myConfig.appendText),1)])),_:1},8,["size","disabled","onClick"])])),key:"1"}:void 0]),1032,["modelValue","size","type","password","rows","placeholder","maxlength","disabled","clearable","readonly","onKeydown","onKeyup","onOnBlur","search","onOnSearch"])],32)):(c.openBlock(),c.createBlock(l,{key:1,ref:"myControl",modelValue:e.value,"onUpdate:modelValue":t[2]||(t[2]=t=>e.value=t),size:o.myConfig.size,type:r.inputType,password:o.passwordFlag,rows:o.myConfig.rows,placeholder:o.myConfig.placeholder,maxlength:o.myConfig.maxLength,disabled:o.myConfig.readOnly,clearable:o.myConfig.clearable,readonly:!o.myConfig.allowInput,onKeydown:c.withKeys(c.withModifiers(r._enterSetFatherValue,["stop"]),["enter"]),onKeyup:r.keyUp,onOnBlur:e.setFatherValue,search:o.myConfig.search,onOnSearch:r.search},c.createSlots({_:2},[o.myConfig.showAppend?{name:"append",fn:c.withCtx((()=>[c.createVNode(s,{size:o.myConfig.size,type:"primary",disabled:o.myConfig.readOnly,onClick:r.appendClick},{default:c.withCtx((()=>[c.createTextVNode(c.toDisplayString(o.myConfig.appendText),1)])),_:1},8,["size","disabled","onClick"])])),key:"0"}:void 0]),1032,["modelValue","size","type","password","rows","placeholder","maxlength","disabled","clearable","readonly","onKeydown","onKeyup","onOnBlur","search","onOnSearch"]))],2)),[[c.vShow,o.myConfig.visible]])}],["__scopeId","data-v-0fec4f11"]]);const Ut={name:"uploadbox",data:()=>({defaultList:[],fileSize:20480,myConfig:{},uploadUrl:"",disabled:!1}),props:{config:{type:Object,default:null},headers:{type:Object,default:null},readOnly:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!0}},computed:{uploadClass(){return this.disabled?"efuture-upload-disabled":""}},created(){var e,t;this.myConfig=Object.assign({},this.myConfig,this.config),void 0!==this.myConfig.fileSize&&(this.fileSize=1024*Number(this.myConfig.fileSize)),(null==(t=null==(e=null==this?void 0:this.OmdUrl)?void 0:e.portalConfig)?void 0:t.appendixsize)&&(this.fileSize=1024*Number(this.OmdUrl.portalConfig.appendixsize),this.myConfig.fileSize=Number(this.OmdUrl.portalConfig.appendixsize)),this.uploadUrl=this.myConfig.uploadfile},methods:{handleSuccess(e,t){if(e.data&&e.data.length>0)if(e.data[0].filekey)t.filekey=e.data[0].filekey;else if(e.data[0].fileKey)t.filekey=e.data[0].fileKey;else if(void 0!==e.data[0].url){let n=e.data[0].url.split("/");t.filekey=n[n.length-1]}this.$emit("success",e)},handleFormatError(e){let t=this.myConfig.fileType.join(",");this.alert(this.$t("文件[{name}]的格式不正确,请上传格式为({type})的文件",{name:e.name,type:t}))},handleMaxSize(e){let t="",n=Number(this.myConfig.fileSize);if(n>1024){t=(n/1024).toFixed(2)+"G"}else if(n<1){t=(1024*n).toFixed(2)+"K"}else t=n+"M";this.alert(this.$t("文件[{name}]的文件大小不允许超过{error}",{name:e.name,error:t}))},handleBeforeUpload(){if(this.myConfig.multiSelect)return!0;{const e=this.$refs.upload.fileList.length<this.myConfig.fileNum;return e||this.alert(this.$t("上传的文件数量过多,请先删除部分已上传文件再上传")),e}},delFile(e){const t=this.$refs.upload.fileList.findIndex((t=>t.filekey===e));t>-1&&this.$refs.upload.fileList.splice(t,1)},onClick(){let e=!0;return this.$parent.$parent.$parent.checkPara&&(e=this.$parent.$parent.$parent.checkPara()),e&&this.config.onOpenChange&&this.config.onOpenChange(!0),e&&this.$refs.upload.$refs&&this.$refs.upload.$refs.input&&this.$refs.upload.$refs.input.click(),e},clearData(){this.$refs.upload.clearFiles()}},watch:{config:{handler(e){this.readOnly||e.readOnly?this.disabled=!0:this.disabled=!1},deep:!0,immediate:!0},readOnly(e){e||this.config.readOnly?this.disabled=!0:this.disabled=!1}}};var Qt=Ye(Ut,[["render",function(e,t,n,i,o,r){const a=c.resolveComponent("Upload");return c.openBlock(),c.createBlock(a,{ref:"upload","show-upload-list":!1,"default-file-list":o.defaultList,"on-success":r.handleSuccess,format:o.myConfig.fileType,disabled:o.disabled,"max-size":o.fileSize,data:n.headers,"on-format-error":r.handleFormatError,"on-exceeded-size":r.handleMaxSize,"before-upload":r.handleBeforeUpload,multiple:n.multiSelect,type:"drag",class:c.normalizeClass(r.uploadClass),action:o.uploadUrl},{default:c.withCtx((()=>[c.renderSlot(e.$slots,"btn")])),_:3},8,["default-file-list","on-success","format","disabled","max-size","data","on-format-error","on-exceeded-size","before-upload","multiple","class","action"])}]]),Ht="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zt={exports:{}},Kt=-1;function Gt(e,t,n,i,o){if(e===t)return e?[[0,e]]:[];if(null!=n){var r=function(e,t,n){var i="number"==typeof n?{index:n,length:0}:n.oldRange,o="number"==typeof n?null:n.newRange,r=e.length,a=t.length;if(0===i.length&&(null===o||0===o.length)){var s=i.index,l=e.slice(0,s),c=e.slice(s),u=o?o.index:null,d=s+a-r;if((null===u||u===d)&&!(d<0||d>a)){var h=t.slice(0,d);if((p=t.slice(d))===c){var A=Math.min(s,d);if((m=l.slice(0,A))===(v=h.slice(0,A)))return cn(m,l.slice(A),h.slice(A),c)}}if(null===u||u===s){var f=s,p=(h=t.slice(0,f),t.slice(f));if(h===l){var g=Math.min(r-f,a-f);if((y=c.slice(c.length-g))===(C=p.slice(p.length-g)))return cn(l,c.slice(0,c.length-g),p.slice(0,p.length-g),y)}}}if(i.length>0&&o&&0===o.length){var m=e.slice(0,i.index),y=e.slice(i.index+i.length);if(!(a<(A=m.length)+(g=y.length))){var v=t.slice(0,A),C=t.slice(a-g);if(m===v&&y===C)return cn(m,e.slice(A,r-g),t.slice(A,a-g),y)}}return null}(e,t,n);if(r)return r}var a=Wt(e,t),s=e.substring(0,a);a=Xt(e=e.substring(a),t=t.substring(a));var l=e.substring(e.length-a),c=function(e,t){var n;if(!e)return[[1,t]];if(!t)return[[Kt,e]];var i=e.length>t.length?e:t,o=e.length>t.length?t:e,r=i.indexOf(o);if(-1!==r)return n=[[1,i.substring(0,r)],[0,o],[1,i.substring(r+o.length)]],e.length>t.length&&(n[0][0]=n[2][0]=Kt),n;if(1===o.length)return[[Kt,e],[1,t]];var a=function(e,t){var n=e.length>t.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length<n.length)return null;function o(e,t,n){for(var i,o,r,a,s=e.substring(n,n+Math.floor(e.length/4)),l=-1,c="";-1!==(l=t.indexOf(s,l+1));){var u=Wt(e.substring(n),t.substring(l)),d=Xt(e.substring(0,n),t.substring(0,l));c.length<d+u&&(c=t.substring(l-d,l)+t.substring(l,l+u),i=e.substring(0,n-d),o=e.substring(n+u),r=t.substring(0,l-d),a=t.substring(l+u))}return 2*c.length>=e.length?[i,o,r,a,c]:null}var r,a,s,l,c,u=o(n,i,Math.ceil(n.length/4)),d=o(n,i,Math.ceil(n.length/2));if(!u&&!d)return null;r=d?u&&u[4].length>d[4].length?u:d:u;e.length>t.length?(a=r[0],s=r[1],l=r[2],c=r[3]):(l=r[0],c=r[1],a=r[2],s=r[3]);var h=r[4];return[a,s,l,c,h]}(e,t);if(a){var s=a[0],l=a[1],c=a[2],u=a[3],d=a[4],h=Gt(s,c),A=Gt(l,u);return h.concat([[0,d]],A)}return function(e,t){for(var n=e.length,i=t.length,o=Math.ceil((n+i)/2),r=o,a=2*o,s=new Array(a),l=new Array(a),c=0;c<a;c++)s[c]=-1,l[c]=-1;s[r+1]=0,l[r+1]=0;for(var u=n-i,d=u%2!=0,h=0,A=0,f=0,p=0,g=0;g<o;g++){for(var m=-g+h;m<=g-A;m+=2){for(var y=r+m,v=(B=m===-g||m!==g&&s[y-1]<s[y+1]?s[y+1]:s[y-1]+1)-m;B<n&&v<i&&e.charAt(B)===t.charAt(v);)B++,v++;if(s[y]=B,B>n)A+=2;else if(v>i)h+=2;else if(d){if((w=r+u-m)>=0&&w<a&&-1!==l[w])if(B>=(b=n-l[w]))return qt(e,t,B,v)}}for(var C=-g+f;C<=g-p;C+=2){for(var b,w=r+C,x=(b=C===-g||C!==g&&l[w-1]<l[w+1]?l[w+1]:l[w-1]+1)-C;b<n&&x<i&&e.charAt(n-b-1)===t.charAt(i-x-1);)b++,x++;if(l[w]=b,b>n)p+=2;else if(x>i)f+=2;else if(!d){if((y=r+u-C)>=0&&y<a&&-1!==s[y]){var B;v=r+(B=s[y])-y;if(B>=(b=n-b))return qt(e,t,B,v)}}}}return[[Kt,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-a),t=t.substring(0,t.length-a));return s&&c.unshift([0,s]),l&&c.push([0,l]),on(c,o),i&&function(e){var t=!1,n=[],i=0,o=null,r=0,a=0,s=0,l=0,c=0;for(;r<e.length;)0==e[r][0]?(n[i++]=r,a=l,s=c,l=0,c=0,o=e[r][1]):(1==e[r][0]?l+=e[r][1].length:c+=e[r][1].length,o&&o.length<=Math.max(a,s)&&o.length<=Math.max(l,c)&&(e.splice(n[i-1],0,[Kt,o]),e[n[i-1]+1][0]=1,i--,r=--i>0?n[i-1]:-1,a=0,s=0,l=0,c=0,o=null,t=!0)),r++;t&&on(e);(function(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),i=t.charAt(0),o=n.match(Jt),r=i.match(Jt),a=o&&n.match(Zt),s=r&&i.match(Zt),l=a&&n.match(en),c=s&&i.match(en),u=l&&e.match(tn),d=c&&t.match(nn);return u||d?5:l||c?4:o&&!a&&s?3:a||s?2:o||r?1:0}var n=1;for(;n<e.length-1;){if(0==e[n-1][0]&&0==e[n+1][0]){var i=e[n-1][1],o=e[n][1],r=e[n+1][1],a=Xt(i,o);if(a){var s=o.substring(o.length-a);i=i.substring(0,i.length-a),o=s+o.substring(0,o.length-a),r=s+r}for(var l=i,c=o,u=r,d=t(i,o)+t(o,r);o.charAt(0)===r.charAt(0);){i+=o.charAt(0),o=o.substring(1)+r.charAt(0),r=r.substring(1);var h=t(i,o)+t(o,r);h>=d&&(d=h,l=i,c=o,u=r)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=c,u?e[n+1][1]=u:(e.splice(n+1,1),n--))}n++}})(e),r=1;for(;r<e.length;){if(e[r-1][0]==Kt&&1==e[r][0]){var u=e[r-1][1],d=e[r][1],h=Yt(u,d),A=Yt(d,u);h>=A?(h>=u.length/2||h>=d.length/2)&&(e.splice(r,0,[0,d.substring(0,h)]),e[r-1][1]=u.substring(0,u.length-h),e[r+1][1]=d.substring(h),r++):(A>=u.length/2||A>=d.length/2)&&(e.splice(r,0,[0,u.substring(0,A)]),e[r-1][0]=1,e[r-1][1]=d.substring(0,d.length-A),e[r+1][0]=Kt,e[r+1][1]=u.substring(A),r++),r++}r++}}(c),c}function qt(e,t,n,i){var o=e.substring(0,n),r=t.substring(0,i),a=e.substring(n),s=t.substring(i),l=Gt(o,r),c=Gt(a,s);return l.concat(c)}function Wt(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,i=Math.min(e.length,t.length),o=i,r=0;n<o;)e.substring(r,o)==t.substring(r,o)?r=n=o:i=o,o=Math.floor((i-n)/2+n);return rn(e.charCodeAt(o-1))&&o--,o}function Yt(e,t){var n=e.length,i=t.length;if(0==n||0==i)return 0;n>i?e=e.substring(n-i):n<i&&(t=t.substring(0,n));var o=Math.min(n,i);if(e==t)return o;for(var r=0,a=1;;){var s=e.substring(o-a),l=t.indexOf(s);if(-1==l)return r;a+=l,0!=l&&e.substring(o-a)!=t.substring(0,a)||(r=a,a++)}}function Xt(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,i=Math.min(e.length,t.length),o=i,r=0;n<o;)e.substring(e.length-o,e.length-r)==t.substring(t.length-o,t.length-r)?r=n=o:i=o,o=Math.floor((i-n)/2+n);return an(e.charCodeAt(e.length-o))&&o--,o}var Jt=/[^a-zA-Z0-9]/,Zt=/\s/,en=/[\r\n]/,tn=/\n\r?\n$/,nn=/^\r?\n\r?\n/;function on(e,t){e.push([0,""]);for(var n,i=0,o=0,r=0,a="",s="";i<e.length;)if(i<e.length-1&&!e[i][1])e.splice(i,1);else switch(e[i][0]){case 1:r++,s+=e[i][1],i++;break;case Kt:o++,a+=e[i][1],i++;break;case 0:var l=i-r-o-1;if(t){if(l>=0&&ln(e[l][1])){var c=e[l][1].slice(-1);if(e[l][1]=e[l][1].slice(0,-1),a=c+a,s=c+s,!e[l][1]){e.splice(l,1),i--;var u=l-1;e[u]&&1===e[u][0]&&(r++,s=e[u][1]+s,u--),e[u]&&e[u][0]===Kt&&(o++,a=e[u][1]+a,u--),l=u}}if(sn(e[i][1])){c=e[i][1].charAt(0);e[i][1]=e[i][1].slice(1),a+=c,s+=c}}if(i<e.length-1&&!e[i][1]){e.splice(i,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(0!==(n=Wt(s,a))&&(l>=0?e[l][1]+=s.substring(0,n):(e.splice(0,0,[0,s.substring(0,n)]),i++),s=s.substring(n),a=a.substring(n)),0!==(n=Xt(s,a))&&(e[i][1]=s.substring(s.length-n)+e[i][1],s=s.substring(0,s.length-n),a=a.substring(0,a.length-n)));var d=r+o;0===a.length&&0===s.length?(e.splice(i-d,d),i-=d):0===a.length?(e.splice(i-d,d,[1,s]),i=i-d+1):0===s.length?(e.splice(i-d,d,[Kt,a]),i=i-d+1):(e.splice(i-d,d,[Kt,a],[1,s]),i=i-d+2)}0!==i&&0===e[i-1][0]?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,r=0,o=0,a="",s=""}""===e[e.length-1][1]&&e.pop();var h=!1;for(i=1;i<e.length-1;)0===e[i-1][0]&&0===e[i+1][0]&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)===e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),h=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),h=!0)),i++;h&&on(e,t)}function rn(e){return e>=55296&&e<=56319}function an(e){return e>=56320&&e<=57343}function sn(e){return an(e.charCodeAt(0))}function ln(e){return rn(e.charCodeAt(e.length-1))}function cn(e,t,n,i){return ln(e)||sn(i)?null:function(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}([[0,e],[Kt,t],[1,n],[0,i]])}function un(e,t,n,i){return Gt(e,t,n,i,!0)}un.INSERT=1,un.DELETE=Kt,un.EQUAL=0;var dn=un,hn={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",r="[object Boolean]",a="[object Date]",s="[object Function]",l="[object GeneratorFunction]",c="[object Map]",u="[object Number]",d="[object Object]",h="[object Promise]",A="[object RegExp]",f="[object Set]",p="[object String]",g="[object Symbol]",m="[object WeakMap]",y="[object ArrayBuffer]",v="[object DataView]",C="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",x="[object Int16Array]",B="[object Int32Array]",E="[object Uint8Array]",S="[object Uint8ClampedArray]",k="[object Uint16Array]",_="[object Uint32Array]",D=/\w*$/,F=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,T={};T[o]=T["[object Array]"]=T[y]=T[v]=T[r]=T[a]=T[C]=T[b]=T[w]=T[x]=T[B]=T[c]=T[u]=T[d]=T[A]=T[f]=T[p]=T[g]=T[E]=T[S]=T[k]=T[_]=!0,T["[object Error]"]=T[s]=T[m]=!1;var N="object"==typeof Ht&&Ht&&Ht.Object===Object&&Ht,I="object"==typeof self&&self&&self.Object===Object&&self,R=N||I||Function("return this")(),$=t&&!t.nodeType&&t,M=$&&e&&!e.nodeType&&e,L=M&&M.exports===$;function V(e,t){return e.set(t[0],t[1]),e}function P(e,t){return e.add(t),e}function U(e,t,n,i){var o=-1,r=e?e.length:0;for(i&&r&&(n=e[++o]);++o<r;)n=t(n,e[o],o,e);return n}function Q(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(sV){}return t}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function j(e,t){return function(n){return e(t(n))}}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var K,G=Array.prototype,q=Function.prototype,W=Object.prototype,Y=R["__core-js_shared__"],X=(K=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+K:"",J=q.toString,Z=W.hasOwnProperty,ee=W.toString,te=RegExp("^"+J.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=L?R.Buffer:void 0,ie=R.Symbol,oe=R.Uint8Array,re=j(Object.getPrototypeOf,Object),ae=Object.create,se=W.propertyIsEnumerable,le=G.splice,ce=Object.getOwnPropertySymbols,ue=ne?ne.isBuffer:void 0,de=j(Object.keys,Object),he=Me(R,"DataView"),Ae=Me(R,"Map"),fe=Me(R,"Promise"),pe=Me(R,"Set"),ge=Me(R,"WeakMap"),me=Me(Object,"create"),ye=Qe(he),ve=Qe(Ae),Ce=Qe(fe),be=Qe(pe),we=Qe(ge),xe=ie?ie.prototype:void 0,Be=xe?xe.valueOf:void 0;function Ee(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function _e(e){this.__data__=new Se(e)}function De(e,t){var n=je(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&ze(e)}(e)&&Z.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var a in e)!t&&!Z.call(e,a)||r&&("length"==a||Pe(a,i))||n.push(a);return n}function Fe(e,t,n){var i=e[t];Z.call(e,t)&&He(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function Oe(e,t){for(var n=e.length;n--;)if(He(e[n][0],t))return n;return-1}function Te(e,t,n,i,h,m,F){var O;if(i&&(O=m?i(e,h,m,F):i(e)),void 0!==O)return O;if(!qe(e))return e;var N=je(e);if(N){if(O=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&Z.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,O)}else{var I=Ve(e),R=I==s||I==l;if(Ke(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(I==d||I==o||R&&!m){if(Q(e))return m?e:{};if(O=function(e){return"function"!=typeof e.constructor||Ue(e)?{}:(t=re(e),qe(t)?ae(t):{});var t}(R?{}:e),!t)return function(e,t){return Re(e,Le(e),t)}(e,function(e,t){return e&&Re(t,We(t),e)}(O,e))}else{if(!T[I])return m?e:{};O=function(e,t,n,i){var o=e.constructor;switch(t){case y:return Ie(e);case r:case a:return new o(+e);case v:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case C:case b:case w:case x:case B:case E:case S:case k:case _:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case c:return function(e,t,n){return U(t?n(H(e),!0):H(e),V,new e.constructor)}(e,i,n);case u:case p:return new o(e);case A:return function(e){var t=new e.constructor(e.source,D.exec(e));return t.lastIndex=e.lastIndex,t}(e);case f:return function(e,t,n){return U(t?n(z(e),!0):z(e),P,new e.constructor)}(e,i,n);case g:return s=e,Be?Object(Be.call(s)):{}}var s}(e,I,Te,t)}}F||(F=new _e);var $=F.get(e);if($)return $;if(F.set(e,O),!N)var M=n?function(e){return function(e,t,n){var i=t(e);return je(e)?i:function(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}(i,n(e))}(e,We,Le)}(e):We(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(M||e,(function(o,r){M&&(o=e[r=o]),Fe(O,r,Te(o,t,n,i,r,e,F))})),O}function Ne(e){return!(!qe(e)||(t=e,X&&X in t))&&(Ge(e)||Q(e)?te:F).test(Qe(e));var t}function Ie(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,n,i){n||(n={});for(var o=-1,r=t.length;++o<r;){var a=t[o],s=i?i(n[a],e[a],a,n,e):void 0;Fe(n,a,void 0===s?e[a]:s)}return n}function $e(e,t){var n,i,o=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ne(n)?n:void 0}Ee.prototype.clear=function(){this.__data__=me?me(null):{}},Ee.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ee.prototype.get=function(e){var t=this.__data__;if(me){var i=t[e];return i===n?void 0:i}return Z.call(t,e)?t[e]:void 0},Ee.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Z.call(t,e)},Ee.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():le.call(t,n,1),!0)},Se.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Oe(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,i=Oe(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new Ee,map:new(Ae||Se),string:new Ee}},ke.prototype.delete=function(e){return $e(this,e).delete(e)},ke.prototype.get=function(e){return $e(this,e).get(e)},ke.prototype.has=function(e){return $e(this,e).has(e)},ke.prototype.set=function(e,t){return $e(this,e).set(e,t),this},_e.prototype.clear=function(){this.__data__=new Se},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var i=n.__data__;if(!Ae||i.length<199)return i.push([e,t]),this;n=this.__data__=new ke(i)}return n.set(e,t),this};var Le=ce?j(ce,Object):function(){return[]},Ve=function(e){return ee.call(e)};function Pe(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||W)}function Qe(e){if(null!=e){try{return J.call(e)}catch(sV){}try{return e+""}catch(sV){}}return""}function He(e,t){return e===t||e!=e&&t!=t}(he&&Ve(new he(new ArrayBuffer(1)))!=v||Ae&&Ve(new Ae)!=c||fe&&Ve(fe.resolve())!=h||pe&&Ve(new pe)!=f||ge&&Ve(new ge)!=m)&&(Ve=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,i=n?Qe(n):void 0;if(i)switch(i){case ye:return v;case ve:return c;case Ce:return h;case be:return f;case we:return m}return t});var je=Array.isArray;function ze(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}(e.length)&&!Ge(e)}var Ke=ue||function(){return!1};function Ge(e){var t=qe(e)?ee.call(e):"";return t==s||t==l}function qe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function We(e){return ze(e)?De(e):function(e){if(!Ue(e))return de(e);var t=[];for(var n in Object(e))Z.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}}(hn,hn.exports);var An={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",r="[object Array]",a="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",h="[object Object]",A="[object Promise]",f="[object RegExp]",p="[object Set]",g="[object String]",m="[object Symbol]",y="[object WeakMap]",v="[object ArrayBuffer]",C="[object DataView]",b=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,x={};x["[object Float32Array]"]=x["[object Float64Array]"]=x["[object Int8Array]"]=x["[object Int16Array]"]=x["[object Int32Array]"]=x["[object Uint8Array]"]=x["[object Uint8ClampedArray]"]=x["[object Uint16Array]"]=x["[object Uint32Array]"]=!0,x[o]=x[r]=x[v]=x[a]=x[C]=x[s]=x[l]=x[c]=x[u]=x[d]=x[h]=x[f]=x[p]=x[g]=x[y]=!1;var B="object"==typeof Ht&&Ht&&Ht.Object===Object&&Ht,E="object"==typeof self&&self&&self.Object===Object&&self,S=B||E||Function("return this")(),k=t&&!t.nodeType&&t,_=k&&e&&!e.nodeType&&e,D=_&&_.exports===k,F=D&&B.process,O=function(){try{return F&&F.binding&&F.binding("util")}catch(sV){}}(),T=O&&O.isTypedArray;function N(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var $,M,L,V=Array.prototype,P=Function.prototype,U=Object.prototype,Q=S["__core-js_shared__"],H=P.toString,j=U.hasOwnProperty,z=($=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",K=U.toString,G=RegExp("^"+H.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=D?S.Buffer:void 0,W=S.Symbol,Y=S.Uint8Array,X=U.propertyIsEnumerable,J=V.splice,Z=W?W.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=q?q.isBuffer:void 0,ne=(M=Object.keys,L=Object,function(e){return M(L(e))}),ie=Oe(S,"DataView"),oe=Oe(S,"Map"),re=Oe(S,"Promise"),ae=Oe(S,"Set"),se=Oe(S,"WeakMap"),le=Oe(Object,"create"),ce=Re(ie),ue=Re(oe),de=Re(re),he=Re(ae),Ae=Re(se),fe=W?W.prototype:void 0,pe=fe?fe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function me(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ye;++t<n;)this.add(e[t])}function Ce(e){var t=this.__data__=new me(e);this.size=t.size}function be(e,t){var n=Le(e),i=!n&&Me(e),o=!n&&!i&&Ve(e),r=!n&&!i&&!o&&je(e),a=n||i||o||r,s=a?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],l=s.length;for(var c in e)!t&&!j.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ie(c,l))||s.push(c);return s}function we(e,t){for(var n=e.length;n--;)if($e(e[n][0],t))return n;return-1}function xe(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=j.call(e,Z),n=e[Z];try{e[Z]=void 0;var i=!0}catch(sV){}var o=K.call(e);i&&(t?e[Z]=n:delete e[Z]);return o}(e):function(e){return K.call(e)}(e)}function Be(e){return He(e)&&xe(e)==o}function Ee(e,t,n,i,c){return e===t||(null==e||null==t||!He(e)&&!He(t)?e!=e&&t!=t:function(e,t,n,i,c,A){var y=Le(e),b=Le(t),w=y?r:Ne(e),x=b?r:Ne(t),B=(w=w==o?h:w)==h,E=(x=x==o?h:x)==h,S=w==x;if(S&&Ve(e)){if(!Ve(t))return!1;y=!0,B=!1}if(S&&!B)return A||(A=new Ce),y||je(e)?_e(e,t,n,i,c,A):function(e,t,n,i,o,r,c){switch(n){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v:return!(e.byteLength!=t.byteLength||!r(new Y(e),new Y(t)));case a:case s:case d:return $e(+e,+t);case l:return e.name==t.name&&e.message==t.message;case f:case g:return e==t+"";case u:var h=I;case p:var A=1&i;if(h||(h=R),e.size!=t.size&&!A)return!1;var y=c.get(e);if(y)return y==t;i|=2,c.set(e,t);var b=_e(h(e),h(t),i,o,r,c);return c.delete(e),b;case m:if(pe)return pe.call(e)==pe.call(t)}return!1}(e,t,w,n,i,c,A);if(!(1&n)){var k=B&&j.call(e,"__wrapped__"),_=E&&j.call(t,"__wrapped__");if(k||_){var D=k?e.value():e,F=_?t.value():t;return A||(A=new Ce),c(D,F,n,i,A)}}if(!S)return!1;return A||(A=new Ce),function(e,t,n,i,o,r){var a=1&n,s=De(e),l=s.length,c=De(t).length;if(l!=c&&!a)return!1;var u=l;for(;u--;){var d=s[u];if(!(a?d in t:j.call(t,d)))return!1}var h=r.get(e);if(h&&r.get(t))return h==t;var A=!0;r.set(e,t),r.set(t,e);var f=a;for(;++u<l;){var p=e[d=s[u]],g=t[d];if(i)var m=a?i(g,p,d,t,e,r):i(p,g,d,e,t,r);if(!(void 0===m?p===g||o(p,g,n,i,r):m)){A=!1;break}f||(f="constructor"==d)}if(A&&!f){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(A=!1)}return r.delete(e),r.delete(t),A}(e,t,n,i,c,A)}(e,t,n,i,Ee,c))}function Se(e){return!(!Qe(e)||function(e){return!!z&&z in e}(e))&&(Pe(e)?G:b).test(Re(e))}function ke(e){if(n=(t=e)&&t.constructor,i="function"==typeof n&&n.prototype||U,t!==i)return ne(e);var t,n,i,o=[];for(var r in Object(e))j.call(e,r)&&"constructor"!=r&&o.push(r);return o}function _e(e,t,n,i,o,r){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=r.get(e);if(c&&r.get(t))return c==t;var u=-1,d=!0,h=2&n?new ve:void 0;for(r.set(e,t),r.set(t,e);++u<s;){var A=e[u],f=t[u];if(i)var p=a?i(f,A,u,t,e,r):i(A,f,u,e,t,r);if(void 0!==p){if(p)continue;d=!1;break}if(h){if(!N(t,(function(e,t){if(a=t,!h.has(a)&&(A===e||o(A,e,n,i,r)))return h.push(t);var a}))){d=!1;break}}else if(A!==f&&!o(A,f,n,i,r)){d=!1;break}}return r.delete(e),r.delete(t),d}function De(e){return function(e,t,n){var i=t(e);return Le(e)?i:function(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}(i,n(e))}(e,ze,Te)}function Fe(e,t){var n,i,o=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Se(n)?n:void 0}ge.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(le){var i=t[e];return i===n?void 0:i}return j.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:j.call(t,e)},ge.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=le&&void 0===t?n:t,this},me.prototype.clear=function(){this.__data__=[],this.size=0},me.prototype.delete=function(e){var t=this.__data__,n=we(t,e);return!(n<0)&&(n==t.length-1?t.pop():J.call(t,n,1),--this.size,!0)},me.prototype.get=function(e){var t=this.__data__,n=we(t,e);return n<0?void 0:t[n][1]},me.prototype.has=function(e){return we(this.__data__,e)>-1},me.prototype.set=function(e,t){var n=this.__data__,i=we(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ye.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||me),string:new ge}},ye.prototype.delete=function(e){var t=Fe(this,e).delete(e);return this.size-=t?1:0,t},ye.prototype.get=function(e){return Fe(this,e).get(e)},ye.prototype.has=function(e){return Fe(this,e).has(e)},ye.prototype.set=function(e,t){var n=Fe(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},ve.prototype.add=ve.prototype.push=function(e){return this.__data__.set(e,n),this},ve.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new me,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof me){var i=n.__data__;if(!oe||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ye(i)}return n.set(e,t),this.size=n.size,this};var Te=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n<i;){var a=e[n];t(a,n,e)&&(r[o++]=a)}return r}(ee(e),(function(t){return X.call(e,t)})))}:function(){return[]},Ne=xe;function Ie(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Re(e){if(null!=e){try{return H.call(e)}catch(sV){}try{return e+""}catch(sV){}}return""}function $e(e,t){return e===t||e!=e&&t!=t}(ie&&Ne(new ie(new ArrayBuffer(1)))!=C||oe&&Ne(new oe)!=u||re&&Ne(re.resolve())!=A||ae&&Ne(new ae)!=p||se&&Ne(new se)!=y)&&(Ne=function(e){var t=xe(e),n=t==h?e.constructor:void 0,i=n?Re(n):"";if(i)switch(i){case ce:return C;case ue:return u;case de:return A;case he:return p;case Ae:return y}return t});var Me=Be(function(){return arguments}())?Be:function(e){return He(e)&&j.call(e,"callee")&&!X.call(e,"callee")},Le=Array.isArray;var Ve=te||function(){return!1};function Pe(e){if(!Qe(e))return!1;var t=xe(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ue(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Qe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var je=T?function(e){return function(t){return e(t)}}(T):function(e){return He(e)&&Ue(e.length)&&!!x[xe(e)]};function ze(e){return null!=(t=e)&&Ue(t.length)&&!Pe(t)?be(e):ke(e);var t}e.exports=function(e,t){return Ee(e,t)}}(An,An.exports);var fn={};Object.defineProperty(fn,"__esModule",{value:!0});const pn=hn.exports,gn=An.exports;var mn,yn;(yn=mn||(mn={})).compose=function(e={},t={},n=!1){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});let i=pn(t);n||(i=Object.keys(i).reduce(((e,t)=>(null!=i[t]&&(e[t]=i[t]),e)),{}));for(const o in e)void 0!==e[o]&&void 0===t[o]&&(i[o]=e[o]);return Object.keys(i).length>0?i:void 0},yn.diff=function(e={},t={}){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});const n=Object.keys(e).concat(Object.keys(t)).reduce(((n,i)=>(gn(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n)),{});return Object.keys(n).length>0?n:void 0},yn.invert=function(e={},t={}){e=e||{};const n=Object.keys(t).reduce(((n,i)=>(t[i]!==e[i]&&void 0!==e[i]&&(n[i]=t[i]),n)),{});return Object.keys(e).reduce(((n,i)=>(e[i]!==t[i]&&void 0===t[i]&&(n[i]=null),n)),n)},yn.transform=function(e,t,n=!1){if("object"!=typeof e)return t;if("object"!=typeof t)return;if(!n)return t;const i=Object.keys(t).reduce(((n,i)=>(void 0===e[i]&&(n[i]=t[i]),n)),{});return Object.keys(i).length>0?i:void 0},fn.default=mn;var vn,Cn={};Object.defineProperty(Cn,"__esModule",{value:!0}),(vn||(vn={})).length=function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"object"==typeof e.retain&&null!==e.retain?1:"string"==typeof e.insert?e.insert.length:1},Cn.default=vn;var bn={};Object.defineProperty(bn,"__esModule",{value:!0});const wn=Cn;bn.default=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const t=this.ops[this.index];if(t){const n=this.offset,i=wn.default.length(t);if(e>=i-n?(e=i-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};{const i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"object"==typeof t.retain&&null!==t.retain?i.retain=t.retain:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?wn.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?"number"==typeof e.delete?"delete":"number"==typeof e.retain||"object"==typeof e.retain&&null!==e.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const e=this.offset,t=this.index,n=this.next(),i=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(i)}}return[]}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const n=dn,i=hn.exports,o=An.exports,r=fn;t.AttributeMap=r.default;const a=Cn;t.Op=a.default;const s=bn;t.OpIterator=s.default;const l=String.fromCharCode(0),c=(e,t)=>{if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);const n=Object.keys(e)[0];if(!n||n!==Object.keys(t)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(t)[0]}`);return[n,e[n],t[n]]};class u{constructor(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}static registerEmbed(e,t){this.handlers[e]=t}static unregisterEmbed(e){delete this.handlers[e]}static getHandler(e){const t=this.handlers[e];if(!t)throw new Error(`no handlers for embed type "${e}"`);return t}insert(e,t){const n={};return"string"==typeof e&&0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))}delete(e){return e<=0?this:this.push({delete:e})}retain(e,t){if("number"==typeof e&&e<=0)return this;const n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)}push(e){let t=this.ops.length,n=this.ops[t-1];if(e=i(e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,n=this.ops[t-1],"object"!=typeof n))return this.ops.unshift(e),this;if(o(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this}chop(){const e=this.ops[this.ops.length-1];return e&&"number"==typeof e.retain&&!e.attributes&&this.ops.pop(),this}filter(e){return this.ops.filter(e)}forEach(e){this.ops.forEach(e)}map(e){return this.ops.map(e)}partition(e){const t=[],n=[];return this.forEach((i=>{(e(i)?t:n).push(i)})),[t,n]}reduce(e,t){return this.ops.reduce(e,t)}changeLength(){return this.reduce(((e,t)=>t.insert?e+a.default.length(t):t.delete?e-t.delete:e),0)}length(){return this.reduce(((e,t)=>e+a.default.length(t)),0)}slice(e=0,t=1/0){const n=[],i=new s.default(this.ops);let o=0;for(;o<t&&i.hasNext();){let r;o<e?r=i.next(e-o):(r=i.next(t-o),n.push(r)),o+=a.default.length(r)}return new u(n)}compose(e){const t=new s.default(this.ops),n=new s.default(e.ops),i=[],a=n.peek();if(null!=a&&"number"==typeof a.retain&&null==a.attributes){let e=a.retain;for(;"insert"===t.peekType()&&t.peekLength()<=e;)e-=t.peekLength(),i.push(t.next());a.retain-e>0&&n.next(a.retain-e)}const l=new u(i);for(;t.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===t.peekType())l.push(t.next());else{const e=Math.min(t.peekLength(),n.peekLength()),i=t.next(e),a=n.next(e);if(a.retain){const s={};if("number"==typeof i.retain)s.retain="number"==typeof a.retain?e:a.retain;else if("number"==typeof a.retain)null==i.retain?s.insert=i.insert:s.retain=i.retain;else{const e=null==i.retain?"insert":"retain",[t,n,o]=c(i[e],a.retain),r=u.getHandler(t);s[e]={[t]:r.compose(n,o,"retain"===e)}}const d=r.default.compose(i.attributes,a.attributes,"number"==typeof i.retain);if(d&&(s.attributes=d),l.push(s),!n.hasNext()&&o(l.ops[l.ops.length-1],s)){const e=new u(t.rest());return l.concat(e).chop()}}else"number"==typeof a.delete&&("number"==typeof i.retain||"object"==typeof i.retain&&null!==i.retain)&&l.push(a)}return l.chop()}concat(e){const t=new u(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t}diff(e,t){if(this.ops===e.ops)return new u;const i=[this,e].map((t=>t.map((n=>{if(null!=n.insert)return"string"==typeof n.insert?n.insert:l;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join(""))),a=new u,c=n(i[0],i[1],t,!0),d=new s.default(this.ops),h=new s.default(e.ops);return c.forEach((e=>{let t=e[1].length;for(;t>0;){let i=0;switch(e[0]){case n.INSERT:i=Math.min(h.peekLength(),t),a.push(h.next(i));break;case n.DELETE:i=Math.min(t,d.peekLength()),d.next(i),a.delete(i);break;case n.EQUAL:i=Math.min(d.peekLength(),h.peekLength(),t);const e=d.next(i),s=h.next(i);o(e.insert,s.insert)?a.retain(i,r.default.diff(e.attributes,s.attributes)):a.push(s).delete(i)}t-=i}})),a.chop()}eachLine(e,t="\n"){const n=new s.default(this.ops);let i=new u,o=0;for(;n.hasNext();){if("insert"!==n.peekType())return;const r=n.peek(),s=a.default.length(r)-n.peekLength(),l="string"==typeof r.insert?r.insert.indexOf(t,s)-s:-1;if(l<0)i.push(n.next());else if(l>0)i.push(n.next(l));else{if(!1===e(i,n.next(1).attributes||{},o))return;o+=1,i=new u}}i.length()>0&&e(i,{},o)}invert(e){const t=new u;return this.reduce(((n,i)=>{if(i.insert)t.delete(a.default.length(i));else{if("number"==typeof i.retain&&null==i.attributes)return t.retain(i.retain),n+i.retain;if(i.delete||"number"==typeof i.retain){const o=i.delete||i.retain;return e.slice(n,n+o).forEach((e=>{i.delete?t.push(e):i.retain&&i.attributes&&t.retain(a.default.length(e),r.default.invert(i.attributes,e.attributes))})),n+o}if("object"==typeof i.retain&&null!==i.retain){const o=e.slice(n,n+1),a=new s.default(o.ops).next(),[l,d,h]=c(i.retain,a.insert),A=u.getHandler(l);return t.retain({[l]:A.invert(d,h)},r.default.invert(i.attributes,a.attributes)),n+1}}return n}),0),t.chop()}transform(e,t=!1){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);const n=e,i=new s.default(this.ops),o=new s.default(n.ops),l=new u;for(;i.hasNext()||o.hasNext();)if("insert"!==i.peekType()||!t&&"insert"===o.peekType())if("insert"===o.peekType())l.push(o.next());else{const e=Math.min(i.peekLength(),o.peekLength()),n=i.next(e),a=o.next(e);if(n.delete)continue;if(a.delete)l.push(a);else{const i=n.retain,o=a.retain;let s="object"==typeof o&&null!==o?o:e;if("object"==typeof i&&null!==i&&"object"==typeof o&&null!==o){const e=Object.keys(i)[0];if(e===Object.keys(o)[0]){const n=u.getHandler(e);n&&(s={[e]:n.transform(i[e],o[e],t)})}}l.retain(s,r.default.transform(n.attributes,a.attributes,t))}}else l.retain(a.default.length(i.next()));return l.chop()}transformPosition(e,t=!1){t=!!t;const n=new s.default(this.ops);let i=0;for(;n.hasNext()&&i<=e;){const o=n.peekLength(),r=n.peekType();n.next(),"delete"!==r?("insert"===r&&(i<e||!t)&&(e+=o),i+=o):e-=Math.min(o,e-i)}return e}}u.Op=a.default,u.OpIterator=s.default,u.AttributeMap=r.default,u.handlers={},t.default=u,e.exports=u,e.exports.default=u}(zt,zt.exports);var xn=jt(zt.exports);
7
7
  /*!
8
8
  * VueQuill @vueup/vue-quill v1.5.3
9
9
  * https://vueup.github.io/vue-quill/