"59:function(e,t,n){\"use strict\";n.r(t);var r=function(){var e=this.$createElement,t=this._self._c||e;return t(\"div\",{class:[\"el-cascader-panel\",this.border&&\"is-bordered\"],on:{keydown:this.handleKeyDown}},this._l(this.menus,(function(e,n){return t(\"cascader-menu\",{key:n,ref:\"menu\",refInFor:!0,attrs:{index:n,nodes:e}})})),1)};r._withStripped=!0;var i=n(26),o=n.n(i),a=n(14),s=n.n(a),u=n(18),l=n.n(u),c=n(51),d=n.n(c),f=n(3),h=function(e){return e.stopPropagation()},p={inject:[\"panel\"],components:{ElCheckbox:l.a,ElRadio:d.a},props:{node:{required:!0},nodeId:String},computed:{config:function(){return this.panel.config},isLeaf:function(){return this.node.isLeaf},isDisabled:function(){return this.node.isDisabled},checkedValue:function(){return this.panel.checkedValue},isChecked:function(){return this.node.isSameNode(this.checkedValue)},inActivePath:function(){return this.isInPath(this.panel.activePath)},inCheckedPath:function(){var e=this;return!!this.config.checkStrictly&&this.panel.checkedNodePaths.some((function(t){return e.isInPath(t)}))},value:function(){return this.node.getValueByOption()}},methods:{handleExpand:function(){var e=this,t=this.panel,n=this.node,r=this.isDisabled,i=this.config,o=i.multiple;!i.checkStrictly&&r||n.loading||(i.lazy&&!n.loaded?t.lazyLoad(n,(function(){var t=e.isLeaf;if(t||e.handleExpand(),o){var r=!!t&&n.checked;e.handleMultiCheckChange(r)}})):t.handleExpand(n))},handleCheckChange:function(){var e=this.panel,t=this.value,n=this.node;e.handleCheckChange(t),e.handleExpand(n)},handleMultiCheckChange:function(e){this.node.doCheck(e),this.panel.calculateMultiCheckedValue()},isInPath:function(e){var t=this.node;return(e[t.level-1]||{}).uid===t.uid},renderPrefix:function(e){var t=this.isLeaf,n=this.isChecked,r=this.config,i=r.checkStrictly;return r.multiple?this.renderCheckbox(e):i?this.renderRadio(e):t&&n?this.renderCheckIcon(e):null},renderPostfix:function(e){var t=this.node,n=this.isLeaf;return t.loading?this.renderLoadingIcon(e):n?null:this.renderExpandIcon(e)},renderCheckbox:function(e){var t=this.node,n=this.config,r=this.isDisabled,i={on:{change:this.handleMultiCheckChange},nativeOn:{}};return n.checkStrictly&&(i.nativeOn.click=h),e(\"el-checkbox\",o()([{attrs:{value:t.checked,indeterminate:t.indeterminate,disabled:r}},i]))},renderRadio:function(e){var t=this.checkedValue,n=this.value,r=this.isDisabled;return Object(f.isEqual)(n,t)&&(n=t),e(\"el-radio\",{attrs:{value:t,label:n,disabled:r},on:{change:this.handleCheckChange},nativeOn:{click:h}},[e(\"span\")])},renderCheckIcon:function(e){return e(\"i\",{class:\"el-icon-check el-cascader-node__prefix\"})},renderLoadingIcon:function(e){return e(\"i\",{class:\"el-icon-loading el-cascader-node__postfix\"})},renderExpandIcon:function(e){return e(\"i\",{class:\"el-icon-arrow-right el-cascader-node__postfix\"})},renderContent:function(e){var t=this.panel,n=this.node,r=t.renderLabelFn;return e(\"span\",{class:\"el-cascader-node__label\"},[(r?r({node:n,data:n.data}):null)||n.label])}},render:function(e){var t=this,n=this.inActivePath,r=this.inCheckedPath,i=this.isChecked,a=this.isLeaf,s=this.isDisabled,u=this.config,l=this.nodeId,c=u.expandTrigger,d=u.checkStrictly,f=u.multiple,h=!d&&s,p={on:{}};return\"click\"===c?p.on.click=this.handleExpand:(p.on.mouseenter=function(e){t.handleExpand(),t.$emit(\"expand\",e)},p.on.focus=function(e){t.handleExpand(),t.$emit(\"expand\",e)}),!a||s||d||f||(p.on.click=this.handleCheckChange),e(\"li\",o()([{attrs:{role:\"menuitem\",id:l,\"aria-expanded\":n,tabindex:h?null:-1},class:{\"el-cascader-node\":!0,\"is-selectable\":d,\"in-active-path\":n,\"in-checked-path\":r,\"is-active\":i,\"is-disabled\":h}},p]),[this.renderPrefix(e),this.renderContent(e),this.renderPostfix(e)])}},m=n(0),y=Object(m.a)(p,void 0,void 0,!1,null,null,null);y.options.__file=\"packages/cascader-panel/src/cascader-node.vue\";var g=y.exports,v=n(6),_={name:\"ElCascaderMenu\",mixins:[n.n(v).a],inject:[\"panel\"],components:{ElScrollbar:s.a,CascaderNode:g},props:{nodes:{type:Array,required:!0},index:Number},data:function(){return{activeNode:null,hoverTimer:null,id:Object(f.generateId)()}},computed:{isEmpty:function(){return!this.nodes.length},menuId:function(){return\"cascader-menu-\"+this.id+\"-\"+this.index}},methods:{handleExpand:function(e){this.activeNode=e.target},handleMouseMove:function(e){var t=this.activeNode,n=this.hoverTimer,r=this.$refs.hoverZone;if(t&&r)if(t.contains(e.target)){clearTimeout(n);var i=this.$el.getBoundingClientRect().left,o=e.clientX-i,a=this.$el,s=a.offsetWidth,u=a.offsetHeight,l=t.offsetTop,c=l+t.offsetHeight;r.innerHTML='\\n \\n \\n '}else n||(this.hoverTimer=setTimeout(this.clearHoverZone,this.panel.config.hoverThreshold))},clearHoverZone:function(){var e=this.$refs.hoverZone;e&&(e.innerHTML=\"\")},renderEmptyText:function(e){return e(\"div\",{class:\"el-cascader-menu__empty-text\"},[this.t(\"el.cascader.noData\")])},renderNodeList:function(e){var t=this.menuId,n=this.panel.isHoverMenu,r={on:{}};n&&(r.on.expand=this.handleExpand);var i=this.nodes.map((function(n,i){var a=n.hasChildren;return e(\"cascader-node\",o()([{key:n.uid,attrs:{node:n,\"node-id\":t+\"-\"+i,\"aria-haspopup\":a,\"aria-owns\":a?t:null}},r]))}));return[].concat(i,[n?e(\"svg\",{ref:\"hoverZone\",class:\"el-cascader-menu__hover-zone\"}):null])}},render:function(e){var t=this.isEmpty,n=this.menuId,r={nativeOn:{}};return this.panel.isHoverMenu&&(r.nativeOn.mousemove=this.handleMouseMove),e(\"el-scrollbar\",o()([{attrs:{tag:\"ul\",role:\"menu\",id:n,\"wrap-class\":\"el-cascader-menu__wrap\",\"view-class\":{\"el-cascader-menu__list\":!0,\"is-empty\":t}},class:\"el-cascader-menu\"},r]),[t?this.renderEmptyText(e):this.renderNodeList(e)])}},b=Object(m.a)(_,void 0,void 0,!1,null,null,null);b.options.__file=\"packages/cascader-panel/src/cascader-menu.vue\";var M=b.exports,w=n(21),D=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1?r-1:0),o=1;o0},e.prototype.syncCheckState=function(e){var t=this.getValueByOption(),n=this.isSameNode(e,t);this.doCheck(n)},e.prototype.doCheck=function(e){this.checked!==e&&(this.config.checkStrictly?this.checked=e:(this.broadcast(\"check\",e),this.setCheckState(e),this.emit(\"check\")))},D(e,[{key:\"isDisabled\",get:function(){var e=this.data,t=this.parent,n=this.config,r=n.disabled,i=n.checkStrictly;return e[r]||!i&&t&&t.isDisabled}},{key:\"isLeaf\",get:function(){var e=this.data,t=this.loaded,n=this.hasChildren,r=this.children,i=this.config,o=i.lazy,a=i.leaf;if(o){var s=Object(w.isDef)(e[a])?e[a]:!!t&&!r.length;return this.hasChildren=!s,s}return!n}}]),e}(),j=function e(t,n){return t.reduce((function(t,r){return r.isLeaf?t.push(r):(!n&&t.push(r),t=t.concat(e(r.children,n))),t}),[])},T=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,e),this.config=n,this.initNodes(t)}return e.prototype.initNodes=function(e){var t=this;e=Object(f.coerceTruthyValueToArray)(e),this.nodes=e.map((function(e){return new N(e,t.config)})),this.flattedNodes=this.getFlattedNodes(!1,!1),this.leafNodes=this.getFlattedNodes(!0,!1)},e.prototype.appendNode=function(e,t){var n=new N(e,this.config,t);(t?t.children:this.nodes).push(n)},e.prototype.appendNodes=function(e,t){var n=this;(e=Object(f.coerceTruthyValueToArray)(e)).forEach((function(e){return n.appendNode(e,t)}))},e.prototype.getNodes=function(){return this.nodes},e.prototype.getFlattedNodes=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e?this.leafNodes:this.flattedNodes;return t?n:j(this.nodes,e)},e.prototype.getNodeByValue=function(e){if(e){var t=this.getFlattedNodes(!1,!this.config.lazy).filter((function(t){return Object(f.valueEquals)(t.path,e)||t.value===e}));return t&&t.length?t[0]:null}return null},e}(),k=n(9),O=n.n(k),L=n(32),S=n.n(L),I=n(31),C=n.n(I),E=Object.assign||function(e){for(var t=1;t0){var u=n.store.getNodeByValue(o);u.data[s]||n.lazyLoad(u,(function(){n.handleExpand(u)})),n.loadCount===n.checkedValue.length&&n.$parent.computePresentText()}}t&&t(r)}))},calculateMultiCheckedValue:function(){this.checkedValue=this.getCheckedNodes(this.leafOnly).map((function(e){return e.getValueByOption()}))},scrollIntoView:function(){this.$isServer||(this.$refs.menu||[]).forEach((function(e){var t=e.$el;if(t){var n=t.querySelector(\".el-scrollbar__wrap\"),r=t.querySelector(\".el-cascader-node.is-active\")||t.querySelector(\".el-cascader-node.in-active-path\");C()(n,r)}}))},getNodeByValue:function(e){return this.store.getNodeByValue(e)},getFlattedNodes:function(e){var t=!this.config.lazy;return this.store.getFlattedNodes(e,t)},getCheckedNodes:function(e){var t=this.checkedValue;return this.multiple?this.getFlattedNodes(e).filter((function(e){return e.checked})):Object(f.isEmpty)(t)?[]:[this.getNodeByValue(t)]},clearCheckedNodes:function(){var e=this.config,t=this.leafOnly,n=e.multiple,r=e.emitPath;n?(this.getCheckedNodes(t).filter((function(e){return!e.isDisabled})).forEach((function(e){return e.doCheck(!1)})),this.calculateMultiCheckedValue()):this.checkedValue=r?[]:null}}},F=Object(m.a)(Q,r,[],!1,null,null,null);F.options.__file=\"packages/cascader-panel/src/cascader-panel.vue\";var R=F.exports;R.install=function(e){e.component(R.name,R)},t.default=R}";