@polyv/iar-vote-ui 2.1.0-rc-20260312.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +1 -1
- package/index.es.js +2 -2
- package/index.umd.js +1 -1
- package/package.json +1 -1
- package/vote-list-popup.cjs.js +1 -1
- package/vote-list-popup.es.js +2 -2
- package/vote-list-popup.umd.js +1 -1
- package/vote-list.cjs.js +1 -1
- package/vote-list.es.js +2 -2
- package/vote-list.umd.js +1 -1
- package/vote-pendant.cjs.js +1 -1
- package/vote-pendant.es.js +2 -2
- package/vote-pendant.umd.js +1 -1
- package/vote-rule-popup.cjs.js +1 -1
- package/vote-rule-popup.es.js +2 -2
- package/vote-rule-popup.umd.js +1 -1
package/index.cjs.js
CHANGED
|
@@ -1004,4 +1004,4 @@ ${Ji(r)}`),o}})}function e0(e){const t=Object.keys(e),r=t.filter(i=>{var n;retur
|
|
|
1004
1004
|
enabled: column.columnProps.ellipsis,
|
|
1005
1005
|
content: cellText,
|
|
1006
1006
|
onlyTextEllipsis: true,
|
|
1007
|
-
}`}],staticClass:"pwc-table-body-cell__content"},[e._v(" "+e._s(r.cellText)+" ")])],2)},jM=[],NM=$($M,FM,jM);const UM=NM.exports,WM=e=>{const{rowIndex:t,rowData:r,renderRowKey:o}=e,{tableProps:i,allColumnList:n}=Me(),{hoverStatus:a}=ci(),s=c.computed(()=>n.value.find(u=>u.columnProps.type==="expand")),l=c.computed(()=>{const u=[];if(i.rowClassName){const d=Ld(i.rowClassName,{rowIndex:t.value,rowData:r.value});u.push(...d)}return i.hoverRow&&a.value.rowIndex===t.value&&u.push("is-hover-row"),s.value&&s.value.getExpandVisible(o.value)&&u.push("is-expanded-row"),u}),p=c.computed(()=>{const u={};if(i.rowStyle){const d=Pd(i.rowStyle,{rowIndex:t.value,rowData:r.value});Object.assign(u,d)}return u});return{rowClass:l,rowStyle:p}},HM=c.defineComponent({__name:"table-body-row",props:xd(),setup(e){const t=e,{leftColumnListInstance:r,centerColumnListInstance:o,rightColumnListInstance:i}=Me(),{columnList:n}=r,{columnList:a}=o,{columnList:s}=i,l=cM({props:t}),{rowClass:p,rowStyle:u}=WM(l);return{__sfc:!0,props:t,leftColumnListInstance:r,centerColumnListInstance:o,rightColumnListInstance:i,leftColumnList:n,centerColumnList:a,rightColumnList:s,rowResult:l,rowClass:p,rowStyle:u,TableBodyCell:UM}}});var ZM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("tr",{staticClass:"pwc-table-row",class:r.rowClass,style:r.rowStyle},[e._l(r.leftColumnList,function(o){return t(r.TableBodyCell,{key:`left-column-${o.columnId}`,attrs:{column:o}})}),e._l(r.centerColumnList,function(o){return t(r.TableBodyCell,{key:`center-column-${o.columnId}`,attrs:{column:o}})}),e._l(r.rightColumnList,function(o){return t(r.TableBodyCell,{key:`right-column-${o.columnId}`,attrs:{column:o}})})],2)},YM=[],qM=$(HM,ZM,YM);const GM=qM.exports,XM=c.defineComponent({__name:"table-body-row-expand",props:xd(),setup(e){const t=e,{allColumnList:r,wrapWidth:o}=Me(),i=c.computed(()=>r.value.find(a=>a.columnProps.type==="expand"));function n(){if(i.value)return i.value.getCellRenderSlot({rowData:t.rowData,rowIndex:t.rowIndex,columnIndex:i.value.getColumnIndex(),cellData:null})}return{__sfc:!0,props:t,allColumnList:r,wrapWidth:o,expandColumn:i,expandColumnRenderSlotFunc:n,renderSlot:It}}});var KM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.expandColumn&&r.expandColumn.canShowExpand({rowData:e.rowData,rowIndex:e.rowIndex})&&r.expandColumn.getExpandVisible(r.props.renderRowKey)?t("tr",{staticClass:"pwc-table-row-expand"},[t("td",{staticClass:"pwc-table-row-expand__cell",attrs:{colspan:r.allColumnList.length}},[t(r.renderSlot,{staticClass:"pwc-table-row-expand__cell__content",style:{width:`${r.wrapWidth}px`},attrs:{"slot-func":r.expandColumnRenderSlotFunc}})],1)]):e._e()},JM=[],eA=$(XM,KM,JM);const tA=eA.exports,rA=c.defineComponent({__name:"table-body",setup(e){const{allColumnWidth:t,tableProps:r,wrapWidth:o}=Me(),{bodyWrapRef:i,bodyRef:n}=li(),{renderData:a,isEmptyData:s}=wn(),{getRenderRowKey:l}=Es(),p=c.computed(()=>{const u={};return r.height&&(u.height=`${r.height}px`),r.maxHeight&&(u.maxHeight=`${r.maxHeight}px`),u});return{__sfc:!0,allColumnWidth:t,tableProps:r,wrapWidth:o,bodyWrapRef:i,bodyRef:n,renderData:a,isEmptyData:s,getRenderRowKey:l,bodyWrapStyle:p,TableColgroup:yd,TableBodyRow:GM,TableBodyRowExpand:tA,PwcEmpty:un}}});var oA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"bodyWrapRef",staticClass:"pwc-table-body-wrap",style:r.bodyWrapStyle},[r.isEmptyData?t("div",{staticClass:"pwc-table-body__empty",style:{width:`${r.wrapWidth}px`}},[t(r.PwcEmpty,{attrs:{type:"box"}})],1):e._e(),t("table",{ref:"bodyRef",staticClass:"pwc-table-body",style:{width:`${r.allColumnWidth}px`},attrs:{cellpadding:"0",cellspacing:"0",border:"0"}},[t(r.TableColgroup),e._l(r.renderData,function(o,i){return[t(r.TableBodyRow,{attrs:{"render-row-key":r.getRenderRowKey(o,i),"row-data":o,"row-index":i}}),t(r.TableBodyRowExpand,{attrs:{"render-row-key":r.getRenderRowKey(o,i),"row-data":o,"row-index":i}})]})],2)])},iA=[],nA=$(rA,oA,iA);const aA=nA.exports,sA=["multiple","single","index","operation","tags","expand"],lA=["left","right"],cA=["left","center","right"],pA=c.defineComponent({__name:"table-fixed-shadow",props:{position:g.oneOf(cA).isRequired},setup(e){const t=e,{leftColumnListInstance:r,rightColumnListInstance:o}=Me(),{scrollXPosition:i,hasHorizontalScroll:n}=Ts(),{headerWrapSize:a,bodyWrapSize:s}=li(),{isEmptyData:l}=wn(),p=c.computed(()=>{if(l.value)return!0;switch(t.position){case"left":return r.columnWidthTotal.value===0||i.value==="start";case"right":return o.columnWidthTotal.value===0||i.value==="end"}return!1}),u=c.computed(()=>{const d={height:`${a.value.height+s.value.height}px`};return t.position==="left"?d.left=`${r.columnWidthTotal.value}px`:d.right=`${o.columnWidthTotal.value}px`,d});return{__sfc:!0,props:t,leftColumnListInstance:r,rightColumnListInstance:o,scrollXPosition:i,hasHorizontalScroll:n,headerWrapSize:a,bodyWrapSize:s,isEmptyData:l,shadowHidden:p,shadowStyle:u}}});var uA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return!r.shadowHidden&&r.hasHorizontalScroll?t("div",{staticClass:"pwc-table-fixed-shadow",class:{"is-left":e.position==="left","is-right":e.position==="right"},style:r.shadowStyle}):e._e()},dA=[],fA=$(pA,uA,dA);const mA=fA.exports,hA=()=>({column:g.object().isRequired}),Td=Symbol("table-header-cell-inject-key"),gA=e=>{const{props:t}=e,r=c.ref();return c.provide(Td,{headerCellRef:r,column:t.column}),{headerCellRef:r,column:t.column}},Ed=()=>c.inject(Td),vA=c.defineComponent({__name:"header-cell-multiple",setup(e){const{renderData:t}=wn(),{column:r}=Ed(),{inModelValue:o,multipleIsDisabled:i,removeModelValue:n,getColumnModelValue:a,deleteRowData:s}=Sd(r),l=c.computed(()=>{const d=t.value;for(let m=0;m<d.length;m++){const f=d[m];if(o(f))return!0}return!1}),p=c.computed(()=>{const d=t.value;for(let m=0;m<d.length;m++){const f=d[m];if(!o(f)&&!i(f,m))return!1}return!0});function u(){const d=t.value,m=a();if(p.value)for(let f=0;f<d.length;f++){const w=d[f];o(w)&&!i(w,f)&&s(m,w)}else for(let f=0;f<d.length&&!(m.length>=r.columnProps.multipleMax);f++){const w=d[f];!o(w)&&!i(w,f)&&m.push(w)}r.updateModelValue([...m])}return{__sfc:!0,renderData:t,column:r,inModelValue:o,multipleIsDisabled:i,removeModelValue:n,getColumnModelValue:a,deleteRowData:s,indeterminate:l,isChecked:p,toggleMultiple:u,PwcCheckbox:oi}}});var wA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.PwcCheckbox,{attrs:{indeterminate:r.indeterminate,checked:r.isChecked},on:{change:r.toggleMultiple}})},bA=[],_A=$(vA,wA,bA);const yA=_A.exports,xA=c.defineComponent({__name:"header-cell-sort",setup(e){const{tableSortOrder:t}=ci(),{column:r,headerCellRef:o}=Ed(),i=c.computed(()=>r.isCurrentSort());return se(o,"click",()=>{const n=r.toggleSortOrder();r.changeSortOrder(n)}),{__sfc:!0,tableSortOrder:t,column:r,headerCellRef:o,isCurrentSort:i}}});var CA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.column.getColumnSortName()?t("div",{staticClass:"pwc-table-header-cell__sort"},[t("div",{staticClass:"pwc-table-header-cell__sort-asc",class:{"is-current":r.isCurrentSort&&r.tableSortOrder==="ascending"},on:{click:function(o){return o.stopPropagation(),r.column.changeSortOrder("ascending")}}}),t("div",{staticClass:"pwc-table-header-cell__sort-desc",class:{"is-current":r.isCurrentSort&&r.tableSortOrder==="descending"},on:{click:function(o){return o.stopPropagation(),r.column.changeSortOrder("descending")}}})]):e._e()},SA=[],kA=$(xA,CA,SA);const LA=kA.exports,PA=e=>{const{column:t}=e,{tableProps:r}=Me();return{headerCellClass:c.computed(()=>{const o=[];switch(t.columnProps.type){case"multiple":o.push("is-multiple-column");break;case"single":o.push("is-single-column");break;case"index":o.push("is-index-column");break;case"operation":o.push("is-operation-column");break}return t.columnProps.sortable&&o.push("is-sortable"),r.highlightSorted&&t.isCurrentSort()&&o.push("is-highlight-sorted"),o})}},TA=c.defineComponent({__name:"table-header-cell",props:hA(),setup(e){const t=e,{$t:r}=ie(),{tableProps:o}=Me(),i=gA({props:t}),{headerCellRef:n}=i,{headerCellClass:a}=PA(i),s=c.computed(()=>{let l="";const p=t.column;return p.columnProps.type==="operation"&&(l=r("table.operation")),p.columnProps.type==="tags"&&(l=r("table.tags")),p.columnProps.type==="index"&&(l=r("table.index")),p.columnProps.type==="single"&&(l=r("table.single")),p.columnProps.title&&(l=p.columnProps.title),l});return{__sfc:!0,props:t,$t:r,tableProps:o,cellResult:i,headerCellRef:n,headerCellClass:a,headerTitle:s,PwcIconQuestionCircleOutline:qo,vTooltip:xt,renderSlot:It,HeaderCellMultiple:yA,HeaderCellSort:LA}}});var EA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("th",{ref:"headerCellRef",staticClass:"pwc-table-header-cell",class:r.headerCellClass,style:G(V({},e.column.getStickyStyle()),{background:r.tableProps.headerBgColor})},[t("div",{staticClass:"pwc-table-header-cell__content"},[e.column.columnProps.type==="multiple"?[t(r.HeaderCellMultiple,{attrs:{column:e.column}})]:e.column.hasSlots("header")?[t(r.renderSlot,{attrs:{"slot-func":e.column.getHeaderRenderSlot}})]:[e._v(" "+e._s(r.headerTitle)+" ")],e.column.columnProps.headerTips?t(r.PwcIconQuestionCircleOutline,{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.column.columnProps.headerTips,expression:"column.columnProps.headerTips"}],staticClass:"pwc-table-header-cell__tips"}):e._e(),e.column.columnProps.sortable?[t(r.HeaderCellSort)]:e._e()],2)])},QA=[],IA=$(TA,EA,QA);const MA=IA.exports,AA=()=>{const{originalColumnListInstance:e}=Me(),t=o=>{const i=[];return o.forEach(n=>{const a=n.getChildrenColumns();i.push(n),a.length>0&&i.push(...t(a))}),i},r=()=>{let o=1;const i=(a,s)=>{s&&(a.level=s.level+1,o<a.level&&(o=a.level));const l=a.getChildrenColumns();if(l.length>0){let p=0;l.forEach(u=>{i(u,a),p+=u.getColSpan()}),a.setColSpan(p)}else a.setColSpan(1)};e.columnList.value.forEach(a=>{a.level=1,i(a,void 0)});const n=[];for(let a=0;a<o;a++)n.push([]);return t(e.columnList.value).forEach(a=>{a.getChildrenColumns().length===0?a.setRowSpan(o-a.level+1):a.setRowSpan(1),n[a.level-1].push(a)}),n};return{headerStructure:c.computed(()=>r())}},zA=c.defineComponent({__name:"table-header",setup(e){const{tableProps:t,allColumnWidth:r}=Me(),{headerWrapRef:o}=li(),{headerStructure:i}=AA();return{__sfc:!0,tableProps:t,allColumnWidth:r,headerWrapRef:o,headerStructure:i,TableColgroup:yd,TableHeaderCell:MA}}});var DA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"headerWrapRef",staticClass:"pwc-table-header-wrap",class:{"is-sticky":r.tableProps.headerSticky},style:{background:r.tableProps.headerBgColor}},[t("table",{staticClass:"pwc-table-header",style:{width:`${r.allColumnWidth}px`},attrs:{cellpadding:"0",cellspacing:"0",border:"0"}},[t(r.TableColgroup),t("thead",e._l(r.headerStructure,function(o,i){return t("tr",{key:`header-row-${i}`,staticClass:"pwc-table-header__row"},e._l(o,function(n){return t(r.TableHeaderCell,{key:`header-column-${n.columnId}`,attrs:{column:n,rowspan:n.getRowSpan(),colspan:n.getColSpan()}})}),1)}),0)],1)])},OA=[],RA=$(zA,DA,OA);const VA=RA.exports,BA=c.defineComponent({__name:"horizontal-scrollbar",setup(e){const{allColumnWidth:t}=Me(),{horizontalScrollbarRef:r,bodyWrapSize:o}=li(),{hasHorizontalScroll:i}=Ts();return{__sfc:!0,allColumnWidth:t,horizontalScrollbarRef:r,bodyWrapSize:o,hasHorizontalScroll:i}}});var $A=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.hasHorizontalScroll?t("div",{staticClass:"pwc-table-horizontal-scrollbar"},[t("div",{ref:"horizontalScrollbarRef",staticClass:"pwc-table-horizontal-scrollbar__container",style:{width:`${r.bodyWrapSize.width}px`}},[t("div",{style:{width:`${r.allColumnWidth}px`}})])]):e._e()},FA=[],jA=$(BA,$A,FA);const NA=jA.exports,UA=c.defineComponent({__name:"vertical-scrollbar",setup(e){const{headerWrapSize:t,bodyWrapSize:r,bodySize:o,verticalScrollbarRef:i}=li(),{tableProps:n}=Me(),{hasVerticalScroll:a}=Ts(),s=c.computed(()=>({height:`${t.value.height+r.value.height}px`}));return{__sfc:!0,headerWrapSize:t,bodyWrapSize:r,bodySize:o,verticalScrollbarRef:i,tableProps:n,hasVerticalScroll:a,verticalScrollbarStyle:s}}});var WA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.hasVerticalScroll?t("div",{staticClass:"pwc-table-vertical-scrollbar",style:r.verticalScrollbarStyle},[t("div",{staticClass:"pwc-table-vertical-scrollbar__header",style:{background:r.tableProps.headerBgColor,height:`${r.headerWrapSize.height}px`}}),t("div",{staticClass:"pwc-table-vertical-scrollbar__body"},[t("div",{ref:"verticalScrollbarRef",staticClass:"pwc-table-vertical-scrollbar__container"},[t("div",{style:{height:`${r.bodySize.height}px`}})])])]):e._e()},HA=[],ZA=$(UA,WA,HA);const YA=ZA.exports,qA=c.defineComponent({__name:"table-pagination",setup(e){const{tableEmit:t,tableProps:r}=Me(),{paginationModelValue:o}=gd(),i=c.computed(()=>{const a={hideOnSinglePage:!0};return typeof r.pagination=="boolean"?a:V(V({},a),r.pagination)});function n(a){t("page-change",a)}return{__sfc:!0,tableEmit:t,tableProps:r,paginationModelValue:o,paginationProps:i,onPaginationChange:n,PwcPagination:qu}}});var GA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.PwcPagination,e._b({staticClass:"pwc-table__pagination",on:{change:r.onPaginationChange},model:{value:r.paginationModelValue,callback:function(o){r.paginationModelValue=o},expression:"paginationModelValue"}},"pwc-pagination",r.paginationProps,!1))},XA=[],KA=$(qA,GA,XA);const JA=KA.exports,ez=()=>({data:g.oneOfType([Object,Array]).def([]),headerHeight:g.number.def(48),headerBgColor:g.looseString,headerSticky:g.bool.def(!1),footerSticky:g.bool.def(!1),footerBgColor:g.looseString,height:g.looseNumber,maxHeight:g.looseNumber,flexHeight:g.bool.def(!1),hoverRow:g.bool.def(!0),hoverColumn:g.bool.def(!1),rowKey:g.oneOfType([String,Function]),rowClassName:g.oneOfType([Function,Array,String]),rowStyle:g.oneOfType([Function,Object]),cellClassName:g.oneOfType([Function,Array,String]),cellStyle:g.oneOfType([Function,Object]),pagination:g.oneOfType([Object,Boolean]).def(!1),sort:g.object(),highlightSorted:g.bool.def(!0),border:g.bool.def(!1)}),tz=()=>({"page-change":W(),"sort-change":W()}),rz=()=>({[g.modelValueKey]:g.any,type:g.oneOf(sA),title:g.looseString,prop:g.looseString,width:g.oneOfType([Number,String]),minWidth:g.oneOfType([Number,String]),fixed:g.oneOf(lA),multipleMax:g.number.def(1/0),multipleDisabled:g.func(),singleDisabled:g.func(),headerTips:g.string,sortable:g.bool.def(!1),sortName:g.looseString,ellipsis:g.bool.def(!1),formatter:g.oneOfType([Object,Function,String]),showExpand:g.func(),emptyText:g.oneOfType([String,Boolean]).def(!1)}),oz=()=>V({},he()),iz=e=>{const{props:t}=e,r=$g();return{footerClass:c.computed(()=>{const o=[];return t.footerSticky&&o.push("is-sticky"),r&&o.push("is-in-popup"),o})}},nz=c.defineComponent({__name:"table",props:ez(),emits:tz(),setup(e,{emit:t}){const r=e,{wrapRef:o,hasHorizontalScroll:i,hasVerticalScroll:n}=iM({props:r,emit:t}),{footerClass:a}=iz({props:r});return{__sfc:!0,props:r,emit:t,wrapRef:o,hasHorizontalScroll:i,hasVerticalScroll:n,footerClass:a,TableBody:aA,TableFixedShadow:mA,TableHeader:VA,HorizontalScrollbar:NA,VerticalScrollbar:YA,TablePagination:JA}}});var az=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"wrapRef",staticClass:"pwc-table",class:{"is-border-table":e.border,"is-flex-height":e.flexHeight,"has-horizontal-scroll":r.hasHorizontalScroll,"has-vertical-scroll":r.hasVerticalScroll}},[t("div",{staticClass:"pwc-table__hidden-column"},[e._t("default")],2),t("div",{staticClass:"pwc-table__content"},[t("div",{staticClass:"pwc-table__inner"},[t(r.TableHeader),t(r.TableBody),t(r.TableFixedShadow,{attrs:{position:"left"}}),t(r.TableFixedShadow,{attrs:{position:"right"}})],1),t(r.HorizontalScrollbar),t(r.VerticalScrollbar)],1),e.pagination?t("div",{staticClass:"pwc-table__footer",class:r.footerClass},[e.pagination?t(r.TablePagination):e._e()],1):e._e()])},sz=[],lz=$(nz,az,sz);const cz=lz.exports,Oc=Symbol("COLUMN_CHILDREN_PROVIDE_KEY");function Rc(e){const t=c.ref(e);function r(i){t.value=i}function o(){return t.value}return{target:t,set:r,get:o}}const pz=e=>{const t=c.ref([]);function r(p){t.value.push(p)}e.addChildrenColumn=r;function o(){return t.value}e.getChildrenColumns=o;const{set:i,get:n}=Rc(0);e.setColSpan=i,e.getColSpan=n;const{set:a,get:s}=Rc(0);e.setRowSpan=a,e.getRowSpan=s,c.provide(Oc,{addChildrenColumn:r,getChildrenColumns:o,level:1,setColSpan:i,getColSpan:n,setRowSpan:a,getRowSpan:s});const l=c.inject(Oc,void 0);return l&&l.addChildrenColumn(e),{childrenColumnList:t,isChildrenColmn:!!l}},uz=e=>{const t=c.ref(-1);function r(i){t.value=i}function o(){return t.value}return e.setColumnIndex=r,e.getColumnIndex=o,{setColumnIndex:r,getColumnIndex:o}},dz=e=>{const t=c.useSlots();function r(s){return!!t[s]}function o(){return{renderWidth:e.getRenderWidth(),columnIndex:e.getColumnIndex()}}function i(){if(t.header)return t.header(o())}function n(s){return s||{rowData:{},rowIndex:-1,columnIndex:-1,cellData:void 0}}function a(s){if(t.default)return t.default(s)}return e.hasSlots=r,e.getHeaderRenderSlot=i,e.getCellRenderSlot=a,{hasSlots:r,getHeaderSlotData:o,getCellSlotData:n}},fz=e=>{const{columnProps:t}=e,{isEmptyData:r}=wn(),o=c.computed(()=>r.value?!1:t.fixed==="left"||t.fixed==="right");function i(){return o.value}const n=c.ref(-1);function a(l){n.value=l}function s(){const l={};if(o.value&&n.value!==-1){switch(t.fixed){case"left":l.left=`${n.value}px`;break;case"right":l.right=`${n.value}px`;break}l.position="sticky",l.zIndex="3"}return l}return e.getStickyStatus=i,e.setStickyPosition=a,e.getStickyStyle=s,{getStickyStatus:i,setStickyPosition:a,getStickyStyle:s}},mz=e=>{const t=c.ref(100);function r(i){t.value=i}function o(){return t.value}return e.setRenderWidth=r,e.getRenderWidth=o,{setRenderWidth:r,getRenderWidth:o}},hz=e=>{const{columnProps:t}=e,{tableSortName:r,tableSortOrder:o}=ci(),{tableEmit:i}=Me(),n=c.computed(()=>t.sortName||t.prop);function a(){return n.value}e.getColumnSortName=a;function s(){return r.value===n.value&&!!n.value}e.isCurrentSort=s;function l(d){if(n.value&&!(r.value===n.value&&o.value===d)){if(!d){i("sort-change",void 0);return}i("sort-change",{sortName:n.value,sortOrder:d})}}e.changeSortOrder=l;const p=["ascending","descending",void 0];function u(){if(!o.value)return p[0];if(r.value!==n.value)return o.value;const d=p.indexOf(o.value);return p[d+1>p.length?0:d+1]}e.toggleSortOrder=u},gz=e=>{const t=c.ref({});function r(){return e.hasSlots("default")}function o(s){return r()?e.columnProps.showExpand?e.columnProps.showExpand(s):!0:!1}function i(s){const l=!t.value[s];t.value=G(V({},t.value),{[s]:l})}function n(s){var l;return(l=t.value[s])!=null?l:!1}function a(s){delete t.value[s]}return e.hasExpandSlot=r,e.canShowExpand=o,e.getExpandVisible=n,e.toggleExpand=i,e.removeExpandRecord=a,{hasExpandSlot:r,getExpandVisible:n,toggleExpand:i}},vz=e=>{const{props:t}=e,{centerColumnListInstance:r,leftColumnListInstance:o,rightColumnListInstance:i,originalColumnListInstance:n}=Me(),{getModelValue:a,updateModelValue:s}=de(t),l={columnId:Xt(8),columnProps:t,getModelValue:a,updateModelValue:s};mz(l),uz(l),fz(l),hz(l);const{getHeaderSlotData:p,getCellSlotData:u}=dz(l);gz(l);const{childrenColumnList:d,isChildrenColmn:m}=pz(l);return c.onMounted(()=>{if(m||n.addColumn(l),d.value.length===0)switch(t.fixed){case"left":o.addColumn(l);break;case"right":i.addColumn(l);break;default:r.addColumn(l);break}}),c.onBeforeUnmount(()=>{if(d.value.length===0)switch(t.fixed){case"left":o.removeColumn(l);break;case"right":i.removeColumn(l);break;default:r.removeColumn(l);break}}),{getHeaderSlotData:p,getCellSlotData:u}},wz=c.defineComponent({__name:"table-column",props:rz(),emits:oz(),setup(e){const t=e,{getCellSlotData:r,getHeaderSlotData:o}=vz({props:t});return{__sfc:!0,props:t,getCellSlotData:r,getHeaderSlotData:o}}});var bz=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"pwc-table-column"},[e._e(),e._e(),e._t("column")],2)},_z=[],yz=$(wz,bz,_z);const xz=yz.exports;ee("PwcTable",cz);ee("PwcTableColumn",xz);const Cz=["line","rounded","text"],Sz=()=>({[g.modelValueKey]:g.oneOfType([String,Number,Symbol]),type:g.oneOf(Cz).def("line"),expand:g.bool.def(!1),lazyLoad:g.bool.def(!1)}),kz=()=>G(V({},he()),{change:W()}),Lz=()=>({name:g.oneOfType([String,Number]),extra:g.looseString,disabled:g.bool.def(!1),title:g.looseString,lazyLoad:g.looseBool}),Qs=Symbol("tabs-inject-key"),Pz=c.defineComponent({__name:"tab-nav",setup(e){const{tabPanes:t,tabsProps:r,setCurrentTab:o}=c.inject(Qs),{$t:i}=ie(),n=c.ref(),a=c.ref(!1),{visible:s,toggle:l}=zt();function p(){return H(this,null,function*(){if(yield c.nextTick(),!n.value||ce)return;const d=n.value.querySelector(".pwc-tab-nav__item");if(!d)return;const m=d.clientHeight;n.value.clientHeight>=m*1.5||n.value.scrollWidth>n.value.clientWidth?a.value=!0:a.value=!1})}c.watch(()=>t.value.length,()=>{p()},{immediate:!0});function u(d){d.paneProps.disabled||o(d.getPaneName())}return{__sfc:!0,tabPanes:t,tabsProps:r,setCurrentTab:o,$t:i,listRef:n,isMoreItem:a,isExpanded:s,toggle:l,computeIsMoreItem:p,onClickItem:u,PwcIconDown:Zo,PwcIconUp:r1,renderSlot:It}}});var Tz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"pwc-tab-nav",class:[`is-type-${r.tabsProps.type}`]},[t("div",{ref:"listRef",staticClass:"pwc-tab-nav__list",class:{"is-hide":r.tabsProps.expand&&!r.isExpanded}},e._l(r.tabPanes,function(o){return t("div",{key:o.paneId,staticClass:"pwc-tab-nav__item",class:{"is-active":o.getIsActive(),"is-disabled":o.paneProps.disabled},on:{click:function(i){return r.onClickItem(o)}}},[o.hasSlot("title")?t(r.renderSlot,{staticClass:"pwc-tab-nav__item__title",attrs:{"slot-func":o.getTitleRenderSlot}}):t("span",[e._v(e._s(o.paneProps.title))]),o.hasSlot("extra")?t(r.renderSlot,{staticClass:"pwc-tab-nav__item__extra",attrs:{"slot-func":o.getExtraRenderSlot}}):e._e(),o.paneProps.extra?t("span",{staticClass:"pwc-tab-nav__item__extra"},[e._v(" "+e._s(o.paneProps.extra)+" ")]):e._e()],1)}),0),t("div",{staticClass:"pwc-tab-nav__right"},[r.tabsProps.expand&&r.isMoreItem?t("div",{staticClass:"pwc-tab-nav__expand",on:{click:r.toggle}},[t("span",[e._v(e._s(r.isExpanded?r.$t("tabs.collapse"):r.$t("tabs.more")))]),r.isExpanded?t(r.PwcIconUp):t(r.PwcIconDown)],1):e._e()])])},Ez=[],Qz=$(Pz,Tz,Ez);const Iz=Qz.exports,Mz=c.defineComponent({__name:"tabs",props:Sz(),emits:kz(),setup(e,{emit:t}){const r=e,o=c.ref(),i=c.ref(),{modelValue:n,updateModelValue:a}=de(r,{outSideUpdate:w=>{o.value=w}}),s=c.ref([]);function l(w){if(!s.value.includes(w)){if(typeof o.value>"u")if(typeof n.value>"u"){const h=w.getPaneName();u(h,!1)}else u(n.value,!1);s.value.push(w)}}function p(w){s.value=s.value.filter(h=>h!==w)}function u(w,h=!0){o.value!==w&&(o.value=w,a(w),h&&t("change",w))}const d=c.ref(0);function m(){return H(this,null,function*(){var b;yield c.nextTick();const w=((b=i.value)==null?void 0:b.querySelectorAll("[data-pane-name]"))||[];let h=0;for(let v=0;v<w.length;v++)if(w[v].getAttribute("data-is-active")==="true"){h=v*100;break}d.value=h})}c.watch(()=>o.value,()=>{m()});const f={tabsProps:r,currentTab:o,tabPanes:s,setCurrentTab:u,addTabPane:l,removeTabPane:p};return c.provide(Qs,f),{__sfc:!0,props:r,emits:t,currentTab:o,tabsRef:i,modelValue:n,updateModelValue:a,tabPanes:s,addTabPane:l,removeTabPane:p,setCurrentTab:u,offsetPercent:d,getTabsOffset:m,injectData:f,TabNav:Iz}}});var Az=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"tabsRef",staticClass:"pwc-tabs"},[t(r.TabNav),t("div",{staticClass:"pwc-tabs__content"},[t("div",{staticClass:"pwc-tabs__list",style:{marginLeft:`-${r.offsetPercent}%`}},[e._t("default")],2)])],1)},zz=[],Dz=$(Mz,Az,zz);const Oz=Dz.exports,Rz=c.defineComponent({__name:"tab-pane",props:Lz(),setup(e){const t=e,r=Xt(8),o=c.inject(Qs),{hasSlot:i,slotRender:n}=Pe(),a=c.computed(()=>t.name||r),s=c.computed(()=>o.currentTab.value===a.value);function l(){return n("title",{isActive:s.value})}const p=c.computed(()=>{var f;return(f=t.lazyLoad)!=null?f:o.tabsProps.lazyLoad}),u=c.ref(!1);c.watch(s,()=>{s.value&&(u.value=!0)});const d=c.computed(()=>p.value?u.value:!0),m={paneId:r,paneProps:t,getPaneName:()=>a.value,getIsActive:()=>s.value,hasSlot:i,getTitleRenderSlot:l,getExtraRenderSlot:()=>n("extra")};return c.onBeforeMount(()=>{o.addTabPane(m)}),{__sfc:!0,props:t,paneId:r,tabsInject:o,hasSlot:i,slotRender:n,tabPaneName:a,isActive:s,getTitleRenderSlot:l,isLazyLoad:p,isFirstRender:u,canRender:d,tabPaneInstance:m}}});var Vz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"pwc-tab-pane",class:{"is-active":r.isActive},attrs:{"data-pane-name":r.tabPaneName,"data-is-active":r.isActive}},[r.canRender?t("div",{staticClass:"pwc-tab-pane__content"},[e._t("default")],2):e._e()])},Bz=[],$z=$(Rz,Vz,Bz);const Fz=$z.exports;ee("PwcTabs",Oz);ee("PwcTabPane",Fz);const jz={option:"Voting Options",rule:"Rules",ruleTitle:"Rule Description",success:"Vote successful",voted:"You have already voted",voteFailed:"Vote failed",voteLimit:"Vote limit reached",count:"votes",entrance:"Vote",listTitle:"Vote Activity",noRule:"No rules",status:{voting:"Voting",ended:"Ended"},button:{vote:"Vote",voted:"Voted",notVoted:"Not Voted"}},Nz={vote:jz},Uz={option:"投票オプション",rule:"ルール",ruleTitle:"ルール説明",success:"投票成功",voted:"すでに投票済みです",voteFailed:"投票失敗",voteLimit:"投票回数が上限に達しました",count:"票",entrance:"投票",listTitle:"投票活動",noRule:"ルールなし",status:{voting:"投票中",ended:"終了"},button:{vote:"投票",voted:"投票済み",notVoted:"未投票"}},Wz={vote:Uz},Hz={option:"투표 옵션",rule:"규칙",ruleTitle:"규칙 설명",success:"투표 성공",voted:"이미 투표했습니다",voteFailed:"투표 실패",voteLimit:"투표 횟수가 소진되었습니다",count:"표",entrance:"투표",listTitle:"투표 활동",noRule:"규칙 없음",status:{voting:"투표 중",ended:"종료"},button:{vote:"투표",voted:"투표함",notVoted:"미투표"}},Zz={vote:Hz},Yz={option:"Варианты голосования",rule:"Правила",ruleTitle:"Описание правил",success:"Голосование успешно",voted:"Вы уже проголосовали",voteFailed:"Голосование не удалось",voteLimit:"Лимит голосований исчерпан",count:"голосов",entrance:"Голосование",listTitle:"Активность голосования",noRule:"Нет правил",status:{voting:"Голосование",ended:"Завершено"},button:{vote:"Голосовать",voted:"Проголосовано",notVoted:"Не проголосовано"}},qz={vote:Yz},Gz={option:"投票选项",rule:"规则",ruleTitle:"规则说明",success:"投票成功",voted:"你之前已经投过票",voteFailed:"投票失败",voteLimit:"投票次数已用完",count:"票",entrance:"投票",listTitle:"投票活动",noRule:"暂无规则",status:{voting:"投票中",ended:"已结束"},button:{vote:"投票",voted:"已投票",notVoted:"未投票"}},Xz={vote:Gz},Kz={option:"投票選項",rule:"規則",ruleTitle:"規則說明",success:"投票成功",voted:"你之前已經投過票",voteFailed:"投票失敗",voteLimit:"投票次數已用完",count:"票",entrance:"投票",listTitle:"投票活動",noRule:"暫無規則",status:{voting:"投票中",ended:"已結束"},button:{vote:"投票",voted:"已投票",notVoted:"未投票"}},Jz={vote:Kz},{useI18n:Vt}=d1({zh_CN:Xz,zh_TW:Jz,en:Nz,ja:Wz,ko:Zz,ru:qz}),eD=()=>({status:g.oneOf(["Y","N"]).def("Y"),isVoted:g.bool.isRequired,disabled:g.bool.def(!1),hasVoteList:g.bool.def(!1)}),tD=()=>({click:W()}),rD=e=>{const{props:t,emit:r}=e,{$t:o}=Vt(),i=c.computed(()=>t.isVoted?"voted":t.status==="N"?"not-voted":t.disabled?"disabled":"vote"),n={vote:o("vote.button.vote"),voted:o("vote.button.voted"),"not-voted":o("vote.button.notVoted"),disabled:o("vote.button.vote")},a=c.computed(()=>n[i.value]);function s(){i.value==="vote"&&r("click")}return{buttonType:i,buttonText:a,handleClick:s}},oD=c.defineComponent({__name:"vote-button",props:eD(),emits:tD(),setup(e,{emit:t}){const r=e,{buttonType:o,buttonText:i,handleClick:n}=rD({props:r,emit:t});return{__sfc:!0,props:r,emit:t,buttonType:o,buttonText:i,handleClick:n,PwcButton:ot}}});function nr(e,t,r,o,i,n,a,s){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),n&&(l._scopeId="data-v-"+n),{exports:e,options:l}}var iD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-button",class:{"plv-iar-vote-button--no-pointer":o.props.hasVoteList}},[o.buttonType==="vote"?r(o.PwcButton,{staticClass:"plv-iar-vote-button__btn",attrs:{size:"mini",disabled:o.props.disabled},on:{click:o.handleClick}},[t._v(" "+t._s(o.buttonText)+" ")]):o.buttonType==="not-voted"||o.buttonType==="disabled"?r(o.PwcButton,{staticClass:"plv-iar-vote-button__btn",attrs:{size:"mini",disabled:""}},[t._v(" "+t._s(o.buttonText)+" ")]):r(o.PwcButton,{staticClass:"plv-iar-vote-button__text",attrs:{size:"mini",disabled:o.props.status==="N"||o.props.disabled}},[t._v(" "+t._s(o.buttonText)+" ")])],1)},nD=[],aD=nr(oD,iD,nD,!1,null,"6ba928d5");const Qd=aD.exports,sD=()=>({status:g.oneOf(["Y","N"]).def("Y")}),lD=()=>({}),cD=e=>{const{props:t}=e,{$t:r}=Vt();return{statusText:c.computed(()=>t.status==="Y"?r("vote.status.voting"):r("vote.status.ended"))}},pD=c.defineComponent({__name:"vote-status",props:sD(),emits:lD(),setup(e,{emit:t}){const r=e,{statusText:o}=cD({props:r});return{__sfc:!0,props:r,emit:t,statusText:o}}});var uD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-status",class:{"plv-iar-vote-status--voting":t.status==="Y","plv-iar-vote-status--ended":t.status==="N"}},[t._v(" "+t._s(o.statusText)+" ")])},dD=[],fD=nr(pD,uD,dD,!1,null,"c99114e4");const Id=fD.exports,Md=()=>({voteData:g.object().isRequired,votedList:g.array().def([]),layout:g.oneOf(["single","double"]).def("single"),clickable:g.bool.def(!0),hasVoteList:g.bool.def(!1)}),Ad=()=>({"to-vote":W()}),zd=e=>{const{props:t,emit:r,itemRef:o}=e,i=c.ref({gridRowEnd:"auto"}),n=c.computed(()=>t.votedList.includes(t.voteData.id)),a=c.computed(()=>!t.clickable);function s(){a.value||r("to-vote",t.voteData.id)}return{isVoted:n,isDisabled:a,gridRowEndStyle:i,handleVote:s}},mD=c.defineComponent({__name:"vote-item-single",props:Md(),emits:Ad(),setup(e,{emit:t}){const r=e,{$t:o}=Vt(),{isVoted:i,isDisabled:n,handleVote:a}=zd({props:r,emit:t});return{__sfc:!0,$t:o,props:r,emit:t,isVoted:i,isDisabled:n,handleVote:a,VoteButton:Qd,VoteStatus:Id}}});var hD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-list-item plv-iar-vote-list-item-layout-single",class:{"plv-iar-vote-list-item-image":!!t.voteData.voteCoverImage,"plv-iar-vote-list-item-no-image":!t.voteData.voteCoverImage}},[t.voteData.voteCoverImage?[r("div",{staticClass:"plv-iar-vote-list-item-bg"},[r("div",{staticClass:"plv-iar-vote-list-item-bg-image",style:{backgroundImage:`url(${t.voteData.voteCoverImage})`}}),r("div",{staticClass:"plv-iar-vote-list-item-bg-mask"})])]:t._e(),r("div",{staticClass:"plv-iar-vote-list-item-content"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-content-info-left-top-item",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-content-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1),r("div",{staticClass:"plv-iar-vote-list-item-content-info-name"},[t._v(t._s(t.voteData.name))])]),r(o.VoteButton,{attrs:{status:t.voteData.status,"is-voted":o.isVoted,disabled:o.isDisabled,"has-vote-list":o.props.hasVoteList},on:{click:o.handleVote}})],1)],2)},gD=[],vD=nr(mD,hD,gD,!1,null,"d0e638ec");const wD=vD.exports,bD=c.defineComponent({__name:"vote-item-double",props:Md(),emits:Ad(),setup(e,{expose:t,emit:r}){const o=e,{$t:i}=Vt(),n=c.ref(),{isVoted:a,isDisabled:s,gridRowEndStyle:l,handleVote:p}=zd({props:o,emit:r,itemRef:n});let u=null;const d=12;function m(h=d){if(!n.value)return;const b=n.value.offsetHeight;if(b>0){const v=Math.ceil(b/h);l.value={gridRowEnd:`span ${v}`}}}function f(){n.value&&(u&&(u.disconnect(),u=null),u=new ep(()=>{m(d)}),u.observe(n.value),m(d))}function w(){u&&(u.disconnect(),u=null)}return c.watch(n,h=>{w(),h&&f()},{immediate:!0}),c.onBeforeUnmount(()=>{w()}),t({calculateGridRowEnd:m,itemRef:n}),{__sfc:!0,$t:i,props:o,emit:r,itemRef:n,isVoted:a,isDisabled:s,gridRowEndStyle:l,handleVote:p,resizeObserver:u,GAP:d,calculateGridRowEnd:m,setupResizeObserver:f,cleanupResizeObserver:w,VoteButton:Qd,VoteStatus:Id}}});var _D=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{ref:"itemRef",staticClass:"plv-iar-vote-list-item plv-iar-vote-list-item-layout-double",style:o.gridRowEndStyle},[r("div",{staticClass:"plv-iar-vote-list-item-content-container"},[t.voteData.voteCoverImage?[r("div",{staticClass:"plv-iar-vote-list-item-image",style:{backgroundImage:`url(${t.voteData.voteCoverImage})`}},[r("div",{staticClass:"plv-iar-vote-list-item-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-image-status",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1)])]:t._e(),r("div",{staticClass:"plv-iar-vote-list-item-content"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info"},[t.voteData.voteCoverImage?t._e():r("div",{staticClass:"plv-iar-vote-list-item-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-info-left-top-item",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1),r("div",{staticClass:"plv-iar-vote-list-item-content-info-name"},[t._v(t._s(t.voteData.name))])]),r(o.VoteButton,{attrs:{status:t.voteData.status,"is-voted":o.isVoted,disabled:o.isDisabled,"has-vote-list":o.props.hasVoteList},on:{click:o.handleVote}})],1)],2)])},yD=[],xD=nr(bD,_D,yD,!1,null,"214a02c3");const CD=xD.exports,$o={OpenVote:"OpenVote",OpenVoteRule:"OpenVoteRule"};function SD(e){const{state:t,onShow:r,onGetVoteList:o}=e,{list:i,curVotedList:n,cacheVotedList:a,voteCount:s,isForceHideResult:l,isForceShowResult:p,findVoteById:u}=t;function d(y){n.value=y.curVotedList}function m(y){const _=y.voteData.id,C=u(_)[0];C!==-1&&i.value.splice(C,1);const x=n.value.findIndex(E=>E===_);x!==-1&&n.value.splice(x,1);const S=a.value.findIndex(E=>E===_);S!==-1&&a.value.splice(S,1);const L=y.voteData.voteOrder||0;let k=i.value.length;for(let E=0;E<i.value.length;E++)if((i.value[E].voteOrder||0)>=L){k=E;break}p.value&&(y.voteData.showVoteCount=!0,y.voteData.voteCount=0),i.value.splice(k,0,y.voteData),r()}function f(y){const _=u(y.id)[1];_&&(_.status="N")}function w(y){s.value=y.voteCount,y.list.forEach(_=>{const C=u(_.id)[1];C&&(C.showVoteCount=!l.value,C.voteCount=_.times)})}function h(){i.value.splice(0,i.value.length)}function b(y){const _=u(y.id)[0];_!==-1&&i.value.splice(_,1)}function v(y){const _=Math.floor(Math.random()*3e3);setTimeout(()=>{o()},_)}return{updateVotedList:d,onVoteStart:m,onVoteStop:f,onVoteResult:w,onVoteDeleteAll:h,onVoteDelete:b,onVoteChangeOrder:v}}function kD(e){const{voteTarget:t,state:r,onShowEntrance:o}=e,{list:i,curVotedList:n,cacheVotedList:a,isVotedWithLimit:s,voteCount:l,isForceHideResult:p,findVoteById:u}=r,{toast:d}=At(),{$t:m}=Vt(),{trackEvent:f}=PI((t==null?void 0:t.interactionCore)||{});function w(){return H(this,null,function*(){t&&(n.value=t.getVotedList())})}function h(){return H(this,null,function*(){if(!t)return;const C=yield t.getVoteList();if(C&&C.code===200&&C.data){i.value=C.data.list,i.value.length>0&&o(!0);const x=t.getCachedVoteResult();x&&x.forEach(S=>{const L=u(S.id)[1];L&&(L.showVoteCount=!p.value,L.voteCount=S.times)})}})}const b=rs(h,1e3);function v(C){return H(this,null,function*(){if(t&&a.value.indexOf(C)===-1){a.value.push(C);const x=yield t.toVote(C);if(x.code===200)t.pushVotedList(C),d.success(m("vote.success"));else if(x.code===506)d.info(m("vote.voted")),t.pushVotedList(C);else{x.code===501?(s.value=!0,d.error(m("vote.voteLimit"))):d.error(x.message||m("vote.voteFailed"));const S=a.value.indexOf(C);S!==-1&&a.value.splice(S,1)}y()}})}function y(){t&&f({event_id:"click_vote_widget",event_type:"click",spec_attrs:{timestamp:Date.now()}})}function _(){t&&t.interactionCore.getSocket().then(C=>{C&&C.on("connect",()=>{b()})})}return{getVotedList:w,getVoteList:b,toVote:v,setupSocketListener:_}}function LD(e){const{resultShowType:t}=e,r=c.ref([]),o=c.ref([]),i=c.ref([]),n=c.ref(!1),a=c.ref(0),s=c.computed(()=>o.value.length),l=c.computed(()=>t===3&&a.value===0&&i.value.length===0),p=c.computed(()=>t===2||t===3&&(a.value>0||o.value.length>0));function u(d){const m=r.value.findIndex(f=>f.id===d);return[m,r.value[m]]}return{list:r,curVotedList:o,cacheVotedList:i,isVotedWithLimit:n,voteCount:a,isForceHideResult:l,isForceShowResult:p,votedCount:s,findVoteById:u}}const PD=()=>({voteTarget:g.object(),layout:g.oneOf(["single","double"]).def("single"),voteList:g.array(),maxVote:g.number.def(0),showHeader:g.bool.def(!0),showRule:g.bool.def(!0),resultShowType:g.number.def(0)}),TD=()=>({"to-show":()=>!0,"to-hide":()=>!0,"show-entrance":W()}),ED=e=>{var v,y,_,C,x,S,L;const{props:t,emit:r}=e,{getEmitter:o}=er(),{voteTarget:i={}}=t,n=LD({resultShowType:t.resultShowType}),a=kD({voteTarget:i,state:n,onShowEntrance:k=>r("show-entrance",k)}),{updateVotedList:s,onVoteStart:l,onVoteStop:p,onVoteResult:u,onVoteDeleteAll:d,onVoteDelete:m,onVoteChangeOrder:f}=SD({state:n,onShow:()=>r("to-show"),onGetVoteList:()=>a.getVoteList()});function w(){o().emit($o.OpenVoteRule)}function h(k){if(n.curVotedList.value.indexOf(k)!==-1||n.isVotedWithLimit.value)return!1;const P=Number(t.maxVote)||0;return P>0?n.votedCount.value<P:!0}function b(){t.voteList&&t.voteList.length>0||(a.setupSocketListener(),a.getVoteList(),a.getVotedList())}return TI(i.eventEmitter,{[(v=i.VoteEvent)==null?void 0:v.UpdateVotedList]:s,[(y=i.VoteEvent)==null?void 0:y.Start]:l,[(_=i.VoteEvent)==null?void 0:_.Stop]:p,[(C=i.VoteEvent)==null?void 0:C.VoteResult]:u,[(x=i.VoteEvent)==null?void 0:x.DeleteAll]:d,[(S=i.VoteEvent)==null?void 0:S.Delete]:m,[(L=i.VoteEvent)==null?void 0:L.UpdateVoteOrder]:f}),c.onMounted(()=>{t.voteTarget&&b()}),c.watch(()=>t.voteTarget,k=>{k&&b()},{immediate:!0}),c.watch(()=>t.voteList,k=>{k!=null&&(n.list.value=[...k])},{immediate:!0,deep:!0}),{list:n.list,curVotedList:n.curVotedList,handleToVote:a.toVote,handleRule:w,isItemClickable:h}},QD=c.defineComponent({__name:"vote-list",props:PD(),emits:TD(),setup(e,{emit:t}){const r=e,{$t:o}=Vt(),{list:i,curVotedList:n,handleToVote:a,handleRule:s,isItemClickable:l}=ED({props:r,emit:t});return{__sfc:!0,$t:o,props:r,emit:t,list:i,curVotedList:n,handleToVote:a,handleRule:s,isItemClickable:l,PwcEmpty:un,VoteItemSingle:wD,VoteItemDouble:CD}}});var ID=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote"},[o.list.length?r("div",{staticClass:"plv-iar-vote__container"},[t.showHeader?r("div",{staticClass:"plv-iar-vote__container__header"},[r("span",[t._v(t._s(o.$t("vote.option")))]),o.props.showRule?r("span",{class:{"plv-iar-vote__container__header__rule--no-pointer":o.props.voteList&&o.props.voteList.length>0},on:{click:o.handleRule}},[t._v(t._s(o.$t("vote.rule")))]):t._e()]):t._e(),r("div",{staticClass:"plv-iar-vote__list",class:{"plv-iar-vote__list--single":t.layout==="single","plv-iar-vote__list--double":t.layout==="double"}},t._l(o.list,function(i){return r(t.layout==="single"?o.VoteItemSingle:o.VoteItemDouble,{key:i.id,tag:"component",attrs:{"vote-data":i,"voted-list":o.curVotedList,clickable:o.isItemClickable(i.id),"has-vote-list":!!(o.props.voteList&&o.props.voteList.length>0)},on:{"to-vote":o.handleToVote}})}),1)]):r("div",{staticClass:"plv-iar-vote__no-data"},[r(o.PwcEmpty)],1)])},MD=[],AD=nr(QD,ID,MD,!1,null,null);const Dd=AD.exports,zD="data:image/png;base64,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",DD=()=>({voteTarget:g.object(),isFullScreen:g.bool.def(!1),iconUrl:g.string.def(""),beforeClickInterrupt:g.func()}),OD=()=>({"open-vote":W()}),RD=e=>{const{props:t}=e,{getEmitter:r}=er();function o(){return H(this,null,function*(){t.beforeClickInterrupt&&Ga(t.beforeClickInterrupt)&&(yield t.beforeClickInterrupt())||r().emit($o.OpenVote)})}return{pendantIconUrl:c.computed(()=>t.iconUrl||zD),onClickPendant:o}},VD=c.defineComponent({__name:"vote-pendant",props:DD(),emits:OD(),setup(e,{emit:t}){const r=e,{$t:o}=Vt(),{onClickPendant:i,pendantIconUrl:n}=RD({props:r}),a=c.computed(()=>({backgroundImage:`url(${n.value})`}));return{__sfc:!0,props:r,emit:t,$t:o,onClickPendant:i,pendantIconUrl:n,pendantStyle:a}}});var BD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return t.voteTarget&&!t.isFullScreen?r("div",{staticClass:"plv-iar-vote-pendant",style:o.pendantStyle,on:{click:o.onClickPendant}},[r("div",{staticClass:"plv-iar-vote-pendant__text"},[t._v(" "+t._s(o.$t("vote.entrance"))+" ")])]):t._e()},$D=[],FD=nr(VD,BD,$D,!1,null,null);const jD=FD.exports,ND=()=>({voteTarget:g.object(),popupConfig:g.object(),layout:g.oneOf(["single","double"]).def("single"),maxVote:g.number.def(0),showRule:g.bool.def(!0),resultShowType:g.number.def(0)}),UD=e=>{const{voteListRef:t}=e,r=c.ref(!1),o=c.ref(),{getEmitter:i}=er();function n(){r.value=!0,c.nextTick(()=>{o.value&&o.value.resetScroll()})}c.watch(r,p=>{p&&c.nextTick(()=>{var u;(u=t==null?void 0:t.value)!=null&&u.recalculateGridRowEnds&&t.value.recalculateGridRowEnds()})});function a(){r.value=!1}function s(){i().emit($o.OpenVoteRule)}return Gt($o.OpenVote,n),{instance:{open:n,close:a},visible:r,popupRef:o,handleToRule:s}},WD=c.defineComponent({__name:"vote-list-popup",props:ND(),setup(e,{expose:t}){const r=e,{$t:o}=Vt(),i=c.ref(),{instance:n,visible:a,popupRef:s,handleToRule:l}=UD({voteListRef:i});return t(n),{__sfc:!0,props:r,$t:o,voteListRef:i,instance:n,visible:a,popupRef:s,handleToRule:l,PwcPopup:dt,VoteListComponent:Dd}}});var HD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r(o.PwcPopup,{ref:"popupRef",staticClass:"plv-iar-vote-list-popup",attrs:{title:o.$t("vote.listTitle"),"popup-config":t.popupConfig,closeable:!1,"body-height-percent":.65,background:"#F7F8Fa"},scopedSlots:t._u([{key:"header-right",fn:function(){return[t.showRule?r("span",{staticClass:"plv-iar-vote-list-popup__rule",on:{click:o.handleToRule}},[t._v(" "+t._s(o.$t("vote.rule"))+" ")]):t._e()]},proxy:!0}]),model:{value:o.visible,callback:function(i){o.visible=i},expression:"visible"}},[r("div",{staticClass:"plv-iar-vote-list-popup__content"},[r(o.VoteListComponent,{ref:"voteListRef",attrs:{"vote-target":t.voteTarget,layout:t.layout,"max-vote":t.maxVote,"show-header":!1,"show-rule":t.showRule,"result-show-type":t.resultShowType},on:{"to-rule":o.handleToRule}})],1)])},ZD=[],YD=nr(WD,HD,ZD,!1,null,null);const qD=YD.exports,GD=()=>({ruleText:g.string.def(""),popupConfig:g.object()}),XD=e=>{const t=c.ref(!1),r=c.ref();function o(){t.value=!0,c.nextTick(()=>{r.value&&r.value.resetScroll()})}function i(){t.value=!1}return Gt($o.OpenVoteRule,o),{instance:{open:o,close:i},visible:t,popupRef:r,close:i}},KD=c.defineComponent({__name:"vote-rule-popup",props:GD(),setup(e,{expose:t}){const r=e,{$t:o}=Vt(),{isMobile:i}=Se(),{instance:n,visible:a,popupRef:s}=XD();return t(n),{__sfc:!0,props:r,$t:o,isMobile:i,instance:n,visible:a,popupRef:s,PwcPopup:dt}}});var JD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r(o.PwcPopup,{ref:"popupRef",staticClass:"plv-iar-vote-rule-popup",attrs:{title:o.$t("vote.ruleTitle"),"popup-config":t.popupConfig,backable:o.isMobile,background:o.isMobile?"#F7F8Fa":void 0,"body-height-percent":o.isMobile?.65:void 0},model:{value:o.visible,callback:function(i){o.visible=i},expression:"visible"}},[r("div",{staticClass:"plv-iar-vote-rule-popup__content"},[t.ruleText?r("div",{staticClass:"plv-iar-vote-rule-popup__text",domProps:{innerHTML:t._s(t.ruleText)}}):r("div",{staticClass:"plv-iar-vote-rule-popup__empty"},[t._v(" "+t._s(o.$t("vote.noRule"))+" ")])])])},eO=[],tO=nr(KD,JD,eO,!1,null,null);const rO=tO.exports;exports.VoteList=Dd;exports.VoteListPopup=qD;exports.VotePendant=jD;exports.VoteRulePopup=rO;console.log("%c@polyv/iar-vote-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[version: 2.1.0-rc-20260312.1]","[buildTime: 2026-03-11 10:13:16]");
|
|
1007
|
+
}`}],staticClass:"pwc-table-body-cell__content"},[e._v(" "+e._s(r.cellText)+" ")])],2)},jM=[],NM=$($M,FM,jM);const UM=NM.exports,WM=e=>{const{rowIndex:t,rowData:r,renderRowKey:o}=e,{tableProps:i,allColumnList:n}=Me(),{hoverStatus:a}=ci(),s=c.computed(()=>n.value.find(u=>u.columnProps.type==="expand")),l=c.computed(()=>{const u=[];if(i.rowClassName){const d=Ld(i.rowClassName,{rowIndex:t.value,rowData:r.value});u.push(...d)}return i.hoverRow&&a.value.rowIndex===t.value&&u.push("is-hover-row"),s.value&&s.value.getExpandVisible(o.value)&&u.push("is-expanded-row"),u}),p=c.computed(()=>{const u={};if(i.rowStyle){const d=Pd(i.rowStyle,{rowIndex:t.value,rowData:r.value});Object.assign(u,d)}return u});return{rowClass:l,rowStyle:p}},HM=c.defineComponent({__name:"table-body-row",props:xd(),setup(e){const t=e,{leftColumnListInstance:r,centerColumnListInstance:o,rightColumnListInstance:i}=Me(),{columnList:n}=r,{columnList:a}=o,{columnList:s}=i,l=cM({props:t}),{rowClass:p,rowStyle:u}=WM(l);return{__sfc:!0,props:t,leftColumnListInstance:r,centerColumnListInstance:o,rightColumnListInstance:i,leftColumnList:n,centerColumnList:a,rightColumnList:s,rowResult:l,rowClass:p,rowStyle:u,TableBodyCell:UM}}});var ZM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("tr",{staticClass:"pwc-table-row",class:r.rowClass,style:r.rowStyle},[e._l(r.leftColumnList,function(o){return t(r.TableBodyCell,{key:`left-column-${o.columnId}`,attrs:{column:o}})}),e._l(r.centerColumnList,function(o){return t(r.TableBodyCell,{key:`center-column-${o.columnId}`,attrs:{column:o}})}),e._l(r.rightColumnList,function(o){return t(r.TableBodyCell,{key:`right-column-${o.columnId}`,attrs:{column:o}})})],2)},YM=[],qM=$(HM,ZM,YM);const GM=qM.exports,XM=c.defineComponent({__name:"table-body-row-expand",props:xd(),setup(e){const t=e,{allColumnList:r,wrapWidth:o}=Me(),i=c.computed(()=>r.value.find(a=>a.columnProps.type==="expand"));function n(){if(i.value)return i.value.getCellRenderSlot({rowData:t.rowData,rowIndex:t.rowIndex,columnIndex:i.value.getColumnIndex(),cellData:null})}return{__sfc:!0,props:t,allColumnList:r,wrapWidth:o,expandColumn:i,expandColumnRenderSlotFunc:n,renderSlot:It}}});var KM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.expandColumn&&r.expandColumn.canShowExpand({rowData:e.rowData,rowIndex:e.rowIndex})&&r.expandColumn.getExpandVisible(r.props.renderRowKey)?t("tr",{staticClass:"pwc-table-row-expand"},[t("td",{staticClass:"pwc-table-row-expand__cell",attrs:{colspan:r.allColumnList.length}},[t(r.renderSlot,{staticClass:"pwc-table-row-expand__cell__content",style:{width:`${r.wrapWidth}px`},attrs:{"slot-func":r.expandColumnRenderSlotFunc}})],1)]):e._e()},JM=[],eA=$(XM,KM,JM);const tA=eA.exports,rA=c.defineComponent({__name:"table-body",setup(e){const{allColumnWidth:t,tableProps:r,wrapWidth:o}=Me(),{bodyWrapRef:i,bodyRef:n}=li(),{renderData:a,isEmptyData:s}=wn(),{getRenderRowKey:l}=Es(),p=c.computed(()=>{const u={};return r.height&&(u.height=`${r.height}px`),r.maxHeight&&(u.maxHeight=`${r.maxHeight}px`),u});return{__sfc:!0,allColumnWidth:t,tableProps:r,wrapWidth:o,bodyWrapRef:i,bodyRef:n,renderData:a,isEmptyData:s,getRenderRowKey:l,bodyWrapStyle:p,TableColgroup:yd,TableBodyRow:GM,TableBodyRowExpand:tA,PwcEmpty:un}}});var oA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"bodyWrapRef",staticClass:"pwc-table-body-wrap",style:r.bodyWrapStyle},[r.isEmptyData?t("div",{staticClass:"pwc-table-body__empty",style:{width:`${r.wrapWidth}px`}},[t(r.PwcEmpty,{attrs:{type:"box"}})],1):e._e(),t("table",{ref:"bodyRef",staticClass:"pwc-table-body",style:{width:`${r.allColumnWidth}px`},attrs:{cellpadding:"0",cellspacing:"0",border:"0"}},[t(r.TableColgroup),e._l(r.renderData,function(o,i){return[t(r.TableBodyRow,{attrs:{"render-row-key":r.getRenderRowKey(o,i),"row-data":o,"row-index":i}}),t(r.TableBodyRowExpand,{attrs:{"render-row-key":r.getRenderRowKey(o,i),"row-data":o,"row-index":i}})]})],2)])},iA=[],nA=$(rA,oA,iA);const aA=nA.exports,sA=["multiple","single","index","operation","tags","expand"],lA=["left","right"],cA=["left","center","right"],pA=c.defineComponent({__name:"table-fixed-shadow",props:{position:g.oneOf(cA).isRequired},setup(e){const t=e,{leftColumnListInstance:r,rightColumnListInstance:o}=Me(),{scrollXPosition:i,hasHorizontalScroll:n}=Ts(),{headerWrapSize:a,bodyWrapSize:s}=li(),{isEmptyData:l}=wn(),p=c.computed(()=>{if(l.value)return!0;switch(t.position){case"left":return r.columnWidthTotal.value===0||i.value==="start";case"right":return o.columnWidthTotal.value===0||i.value==="end"}return!1}),u=c.computed(()=>{const d={height:`${a.value.height+s.value.height}px`};return t.position==="left"?d.left=`${r.columnWidthTotal.value}px`:d.right=`${o.columnWidthTotal.value}px`,d});return{__sfc:!0,props:t,leftColumnListInstance:r,rightColumnListInstance:o,scrollXPosition:i,hasHorizontalScroll:n,headerWrapSize:a,bodyWrapSize:s,isEmptyData:l,shadowHidden:p,shadowStyle:u}}});var uA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return!r.shadowHidden&&r.hasHorizontalScroll?t("div",{staticClass:"pwc-table-fixed-shadow",class:{"is-left":e.position==="left","is-right":e.position==="right"},style:r.shadowStyle}):e._e()},dA=[],fA=$(pA,uA,dA);const mA=fA.exports,hA=()=>({column:g.object().isRequired}),Td=Symbol("table-header-cell-inject-key"),gA=e=>{const{props:t}=e,r=c.ref();return c.provide(Td,{headerCellRef:r,column:t.column}),{headerCellRef:r,column:t.column}},Ed=()=>c.inject(Td),vA=c.defineComponent({__name:"header-cell-multiple",setup(e){const{renderData:t}=wn(),{column:r}=Ed(),{inModelValue:o,multipleIsDisabled:i,removeModelValue:n,getColumnModelValue:a,deleteRowData:s}=Sd(r),l=c.computed(()=>{const d=t.value;for(let m=0;m<d.length;m++){const f=d[m];if(o(f))return!0}return!1}),p=c.computed(()=>{const d=t.value;for(let m=0;m<d.length;m++){const f=d[m];if(!o(f)&&!i(f,m))return!1}return!0});function u(){const d=t.value,m=a();if(p.value)for(let f=0;f<d.length;f++){const w=d[f];o(w)&&!i(w,f)&&s(m,w)}else for(let f=0;f<d.length&&!(m.length>=r.columnProps.multipleMax);f++){const w=d[f];!o(w)&&!i(w,f)&&m.push(w)}r.updateModelValue([...m])}return{__sfc:!0,renderData:t,column:r,inModelValue:o,multipleIsDisabled:i,removeModelValue:n,getColumnModelValue:a,deleteRowData:s,indeterminate:l,isChecked:p,toggleMultiple:u,PwcCheckbox:oi}}});var wA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.PwcCheckbox,{attrs:{indeterminate:r.indeterminate,checked:r.isChecked},on:{change:r.toggleMultiple}})},bA=[],_A=$(vA,wA,bA);const yA=_A.exports,xA=c.defineComponent({__name:"header-cell-sort",setup(e){const{tableSortOrder:t}=ci(),{column:r,headerCellRef:o}=Ed(),i=c.computed(()=>r.isCurrentSort());return se(o,"click",()=>{const n=r.toggleSortOrder();r.changeSortOrder(n)}),{__sfc:!0,tableSortOrder:t,column:r,headerCellRef:o,isCurrentSort:i}}});var CA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.column.getColumnSortName()?t("div",{staticClass:"pwc-table-header-cell__sort"},[t("div",{staticClass:"pwc-table-header-cell__sort-asc",class:{"is-current":r.isCurrentSort&&r.tableSortOrder==="ascending"},on:{click:function(o){return o.stopPropagation(),r.column.changeSortOrder("ascending")}}}),t("div",{staticClass:"pwc-table-header-cell__sort-desc",class:{"is-current":r.isCurrentSort&&r.tableSortOrder==="descending"},on:{click:function(o){return o.stopPropagation(),r.column.changeSortOrder("descending")}}})]):e._e()},SA=[],kA=$(xA,CA,SA);const LA=kA.exports,PA=e=>{const{column:t}=e,{tableProps:r}=Me();return{headerCellClass:c.computed(()=>{const o=[];switch(t.columnProps.type){case"multiple":o.push("is-multiple-column");break;case"single":o.push("is-single-column");break;case"index":o.push("is-index-column");break;case"operation":o.push("is-operation-column");break}return t.columnProps.sortable&&o.push("is-sortable"),r.highlightSorted&&t.isCurrentSort()&&o.push("is-highlight-sorted"),o})}},TA=c.defineComponent({__name:"table-header-cell",props:hA(),setup(e){const t=e,{$t:r}=ie(),{tableProps:o}=Me(),i=gA({props:t}),{headerCellRef:n}=i,{headerCellClass:a}=PA(i),s=c.computed(()=>{let l="";const p=t.column;return p.columnProps.type==="operation"&&(l=r("table.operation")),p.columnProps.type==="tags"&&(l=r("table.tags")),p.columnProps.type==="index"&&(l=r("table.index")),p.columnProps.type==="single"&&(l=r("table.single")),p.columnProps.title&&(l=p.columnProps.title),l});return{__sfc:!0,props:t,$t:r,tableProps:o,cellResult:i,headerCellRef:n,headerCellClass:a,headerTitle:s,PwcIconQuestionCircleOutline:qo,vTooltip:xt,renderSlot:It,HeaderCellMultiple:yA,HeaderCellSort:LA}}});var EA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("th",{ref:"headerCellRef",staticClass:"pwc-table-header-cell",class:r.headerCellClass,style:G(V({},e.column.getStickyStyle()),{background:r.tableProps.headerBgColor})},[t("div",{staticClass:"pwc-table-header-cell__content"},[e.column.columnProps.type==="multiple"?[t(r.HeaderCellMultiple,{attrs:{column:e.column}})]:e.column.hasSlots("header")?[t(r.renderSlot,{attrs:{"slot-func":e.column.getHeaderRenderSlot}})]:[e._v(" "+e._s(r.headerTitle)+" ")],e.column.columnProps.headerTips?t(r.PwcIconQuestionCircleOutline,{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.column.columnProps.headerTips,expression:"column.columnProps.headerTips"}],staticClass:"pwc-table-header-cell__tips"}):e._e(),e.column.columnProps.sortable?[t(r.HeaderCellSort)]:e._e()],2)])},QA=[],IA=$(TA,EA,QA);const MA=IA.exports,AA=()=>{const{originalColumnListInstance:e}=Me(),t=o=>{const i=[];return o.forEach(n=>{const a=n.getChildrenColumns();i.push(n),a.length>0&&i.push(...t(a))}),i},r=()=>{let o=1;const i=(a,s)=>{s&&(a.level=s.level+1,o<a.level&&(o=a.level));const l=a.getChildrenColumns();if(l.length>0){let p=0;l.forEach(u=>{i(u,a),p+=u.getColSpan()}),a.setColSpan(p)}else a.setColSpan(1)};e.columnList.value.forEach(a=>{a.level=1,i(a,void 0)});const n=[];for(let a=0;a<o;a++)n.push([]);return t(e.columnList.value).forEach(a=>{a.getChildrenColumns().length===0?a.setRowSpan(o-a.level+1):a.setRowSpan(1),n[a.level-1].push(a)}),n};return{headerStructure:c.computed(()=>r())}},zA=c.defineComponent({__name:"table-header",setup(e){const{tableProps:t,allColumnWidth:r}=Me(),{headerWrapRef:o}=li(),{headerStructure:i}=AA();return{__sfc:!0,tableProps:t,allColumnWidth:r,headerWrapRef:o,headerStructure:i,TableColgroup:yd,TableHeaderCell:MA}}});var DA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"headerWrapRef",staticClass:"pwc-table-header-wrap",class:{"is-sticky":r.tableProps.headerSticky},style:{background:r.tableProps.headerBgColor}},[t("table",{staticClass:"pwc-table-header",style:{width:`${r.allColumnWidth}px`},attrs:{cellpadding:"0",cellspacing:"0",border:"0"}},[t(r.TableColgroup),t("thead",e._l(r.headerStructure,function(o,i){return t("tr",{key:`header-row-${i}`,staticClass:"pwc-table-header__row"},e._l(o,function(n){return t(r.TableHeaderCell,{key:`header-column-${n.columnId}`,attrs:{column:n,rowspan:n.getRowSpan(),colspan:n.getColSpan()}})}),1)}),0)],1)])},OA=[],RA=$(zA,DA,OA);const VA=RA.exports,BA=c.defineComponent({__name:"horizontal-scrollbar",setup(e){const{allColumnWidth:t}=Me(),{horizontalScrollbarRef:r,bodyWrapSize:o}=li(),{hasHorizontalScroll:i}=Ts();return{__sfc:!0,allColumnWidth:t,horizontalScrollbarRef:r,bodyWrapSize:o,hasHorizontalScroll:i}}});var $A=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.hasHorizontalScroll?t("div",{staticClass:"pwc-table-horizontal-scrollbar"},[t("div",{ref:"horizontalScrollbarRef",staticClass:"pwc-table-horizontal-scrollbar__container",style:{width:`${r.bodyWrapSize.width}px`}},[t("div",{style:{width:`${r.allColumnWidth}px`}})])]):e._e()},FA=[],jA=$(BA,$A,FA);const NA=jA.exports,UA=c.defineComponent({__name:"vertical-scrollbar",setup(e){const{headerWrapSize:t,bodyWrapSize:r,bodySize:o,verticalScrollbarRef:i}=li(),{tableProps:n}=Me(),{hasVerticalScroll:a}=Ts(),s=c.computed(()=>({height:`${t.value.height+r.value.height}px`}));return{__sfc:!0,headerWrapSize:t,bodyWrapSize:r,bodySize:o,verticalScrollbarRef:i,tableProps:n,hasVerticalScroll:a,verticalScrollbarStyle:s}}});var WA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.hasVerticalScroll?t("div",{staticClass:"pwc-table-vertical-scrollbar",style:r.verticalScrollbarStyle},[t("div",{staticClass:"pwc-table-vertical-scrollbar__header",style:{background:r.tableProps.headerBgColor,height:`${r.headerWrapSize.height}px`}}),t("div",{staticClass:"pwc-table-vertical-scrollbar__body"},[t("div",{ref:"verticalScrollbarRef",staticClass:"pwc-table-vertical-scrollbar__container"},[t("div",{style:{height:`${r.bodySize.height}px`}})])])]):e._e()},HA=[],ZA=$(UA,WA,HA);const YA=ZA.exports,qA=c.defineComponent({__name:"table-pagination",setup(e){const{tableEmit:t,tableProps:r}=Me(),{paginationModelValue:o}=gd(),i=c.computed(()=>{const a={hideOnSinglePage:!0};return typeof r.pagination=="boolean"?a:V(V({},a),r.pagination)});function n(a){t("page-change",a)}return{__sfc:!0,tableEmit:t,tableProps:r,paginationModelValue:o,paginationProps:i,onPaginationChange:n,PwcPagination:qu}}});var GA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.PwcPagination,e._b({staticClass:"pwc-table__pagination",on:{change:r.onPaginationChange},model:{value:r.paginationModelValue,callback:function(o){r.paginationModelValue=o},expression:"paginationModelValue"}},"pwc-pagination",r.paginationProps,!1))},XA=[],KA=$(qA,GA,XA);const JA=KA.exports,ez=()=>({data:g.oneOfType([Object,Array]).def([]),headerHeight:g.number.def(48),headerBgColor:g.looseString,headerSticky:g.bool.def(!1),footerSticky:g.bool.def(!1),footerBgColor:g.looseString,height:g.looseNumber,maxHeight:g.looseNumber,flexHeight:g.bool.def(!1),hoverRow:g.bool.def(!0),hoverColumn:g.bool.def(!1),rowKey:g.oneOfType([String,Function]),rowClassName:g.oneOfType([Function,Array,String]),rowStyle:g.oneOfType([Function,Object]),cellClassName:g.oneOfType([Function,Array,String]),cellStyle:g.oneOfType([Function,Object]),pagination:g.oneOfType([Object,Boolean]).def(!1),sort:g.object(),highlightSorted:g.bool.def(!0),border:g.bool.def(!1)}),tz=()=>({"page-change":W(),"sort-change":W()}),rz=()=>({[g.modelValueKey]:g.any,type:g.oneOf(sA),title:g.looseString,prop:g.looseString,width:g.oneOfType([Number,String]),minWidth:g.oneOfType([Number,String]),fixed:g.oneOf(lA),multipleMax:g.number.def(1/0),multipleDisabled:g.func(),singleDisabled:g.func(),headerTips:g.string,sortable:g.bool.def(!1),sortName:g.looseString,ellipsis:g.bool.def(!1),formatter:g.oneOfType([Object,Function,String]),showExpand:g.func(),emptyText:g.oneOfType([String,Boolean]).def(!1)}),oz=()=>V({},he()),iz=e=>{const{props:t}=e,r=$g();return{footerClass:c.computed(()=>{const o=[];return t.footerSticky&&o.push("is-sticky"),r&&o.push("is-in-popup"),o})}},nz=c.defineComponent({__name:"table",props:ez(),emits:tz(),setup(e,{emit:t}){const r=e,{wrapRef:o,hasHorizontalScroll:i,hasVerticalScroll:n}=iM({props:r,emit:t}),{footerClass:a}=iz({props:r});return{__sfc:!0,props:r,emit:t,wrapRef:o,hasHorizontalScroll:i,hasVerticalScroll:n,footerClass:a,TableBody:aA,TableFixedShadow:mA,TableHeader:VA,HorizontalScrollbar:NA,VerticalScrollbar:YA,TablePagination:JA}}});var az=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"wrapRef",staticClass:"pwc-table",class:{"is-border-table":e.border,"is-flex-height":e.flexHeight,"has-horizontal-scroll":r.hasHorizontalScroll,"has-vertical-scroll":r.hasVerticalScroll}},[t("div",{staticClass:"pwc-table__hidden-column"},[e._t("default")],2),t("div",{staticClass:"pwc-table__content"},[t("div",{staticClass:"pwc-table__inner"},[t(r.TableHeader),t(r.TableBody),t(r.TableFixedShadow,{attrs:{position:"left"}}),t(r.TableFixedShadow,{attrs:{position:"right"}})],1),t(r.HorizontalScrollbar),t(r.VerticalScrollbar)],1),e.pagination?t("div",{staticClass:"pwc-table__footer",class:r.footerClass},[e.pagination?t(r.TablePagination):e._e()],1):e._e()])},sz=[],lz=$(nz,az,sz);const cz=lz.exports,Oc=Symbol("COLUMN_CHILDREN_PROVIDE_KEY");function Rc(e){const t=c.ref(e);function r(i){t.value=i}function o(){return t.value}return{target:t,set:r,get:o}}const pz=e=>{const t=c.ref([]);function r(p){t.value.push(p)}e.addChildrenColumn=r;function o(){return t.value}e.getChildrenColumns=o;const{set:i,get:n}=Rc(0);e.setColSpan=i,e.getColSpan=n;const{set:a,get:s}=Rc(0);e.setRowSpan=a,e.getRowSpan=s,c.provide(Oc,{addChildrenColumn:r,getChildrenColumns:o,level:1,setColSpan:i,getColSpan:n,setRowSpan:a,getRowSpan:s});const l=c.inject(Oc,void 0);return l&&l.addChildrenColumn(e),{childrenColumnList:t,isChildrenColmn:!!l}},uz=e=>{const t=c.ref(-1);function r(i){t.value=i}function o(){return t.value}return e.setColumnIndex=r,e.getColumnIndex=o,{setColumnIndex:r,getColumnIndex:o}},dz=e=>{const t=c.useSlots();function r(s){return!!t[s]}function o(){return{renderWidth:e.getRenderWidth(),columnIndex:e.getColumnIndex()}}function i(){if(t.header)return t.header(o())}function n(s){return s||{rowData:{},rowIndex:-1,columnIndex:-1,cellData:void 0}}function a(s){if(t.default)return t.default(s)}return e.hasSlots=r,e.getHeaderRenderSlot=i,e.getCellRenderSlot=a,{hasSlots:r,getHeaderSlotData:o,getCellSlotData:n}},fz=e=>{const{columnProps:t}=e,{isEmptyData:r}=wn(),o=c.computed(()=>r.value?!1:t.fixed==="left"||t.fixed==="right");function i(){return o.value}const n=c.ref(-1);function a(l){n.value=l}function s(){const l={};if(o.value&&n.value!==-1){switch(t.fixed){case"left":l.left=`${n.value}px`;break;case"right":l.right=`${n.value}px`;break}l.position="sticky",l.zIndex="3"}return l}return e.getStickyStatus=i,e.setStickyPosition=a,e.getStickyStyle=s,{getStickyStatus:i,setStickyPosition:a,getStickyStyle:s}},mz=e=>{const t=c.ref(100);function r(i){t.value=i}function o(){return t.value}return e.setRenderWidth=r,e.getRenderWidth=o,{setRenderWidth:r,getRenderWidth:o}},hz=e=>{const{columnProps:t}=e,{tableSortName:r,tableSortOrder:o}=ci(),{tableEmit:i}=Me(),n=c.computed(()=>t.sortName||t.prop);function a(){return n.value}e.getColumnSortName=a;function s(){return r.value===n.value&&!!n.value}e.isCurrentSort=s;function l(d){if(n.value&&!(r.value===n.value&&o.value===d)){if(!d){i("sort-change",void 0);return}i("sort-change",{sortName:n.value,sortOrder:d})}}e.changeSortOrder=l;const p=["ascending","descending",void 0];function u(){if(!o.value)return p[0];if(r.value!==n.value)return o.value;const d=p.indexOf(o.value);return p[d+1>p.length?0:d+1]}e.toggleSortOrder=u},gz=e=>{const t=c.ref({});function r(){return e.hasSlots("default")}function o(s){return r()?e.columnProps.showExpand?e.columnProps.showExpand(s):!0:!1}function i(s){const l=!t.value[s];t.value=G(V({},t.value),{[s]:l})}function n(s){var l;return(l=t.value[s])!=null?l:!1}function a(s){delete t.value[s]}return e.hasExpandSlot=r,e.canShowExpand=o,e.getExpandVisible=n,e.toggleExpand=i,e.removeExpandRecord=a,{hasExpandSlot:r,getExpandVisible:n,toggleExpand:i}},vz=e=>{const{props:t}=e,{centerColumnListInstance:r,leftColumnListInstance:o,rightColumnListInstance:i,originalColumnListInstance:n}=Me(),{getModelValue:a,updateModelValue:s}=de(t),l={columnId:Xt(8),columnProps:t,getModelValue:a,updateModelValue:s};mz(l),uz(l),fz(l),hz(l);const{getHeaderSlotData:p,getCellSlotData:u}=dz(l);gz(l);const{childrenColumnList:d,isChildrenColmn:m}=pz(l);return c.onMounted(()=>{if(m||n.addColumn(l),d.value.length===0)switch(t.fixed){case"left":o.addColumn(l);break;case"right":i.addColumn(l);break;default:r.addColumn(l);break}}),c.onBeforeUnmount(()=>{if(d.value.length===0)switch(t.fixed){case"left":o.removeColumn(l);break;case"right":i.removeColumn(l);break;default:r.removeColumn(l);break}}),{getHeaderSlotData:p,getCellSlotData:u}},wz=c.defineComponent({__name:"table-column",props:rz(),emits:oz(),setup(e){const t=e,{getCellSlotData:r,getHeaderSlotData:o}=vz({props:t});return{__sfc:!0,props:t,getCellSlotData:r,getHeaderSlotData:o}}});var bz=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"pwc-table-column"},[e._e(),e._e(),e._t("column")],2)},_z=[],yz=$(wz,bz,_z);const xz=yz.exports;ee("PwcTable",cz);ee("PwcTableColumn",xz);const Cz=["line","rounded","text"],Sz=()=>({[g.modelValueKey]:g.oneOfType([String,Number,Symbol]),type:g.oneOf(Cz).def("line"),expand:g.bool.def(!1),lazyLoad:g.bool.def(!1)}),kz=()=>G(V({},he()),{change:W()}),Lz=()=>({name:g.oneOfType([String,Number]),extra:g.looseString,disabled:g.bool.def(!1),title:g.looseString,lazyLoad:g.looseBool}),Qs=Symbol("tabs-inject-key"),Pz=c.defineComponent({__name:"tab-nav",setup(e){const{tabPanes:t,tabsProps:r,setCurrentTab:o}=c.inject(Qs),{$t:i}=ie(),n=c.ref(),a=c.ref(!1),{visible:s,toggle:l}=zt();function p(){return H(this,null,function*(){if(yield c.nextTick(),!n.value||ce)return;const d=n.value.querySelector(".pwc-tab-nav__item");if(!d)return;const m=d.clientHeight;n.value.clientHeight>=m*1.5||n.value.scrollWidth>n.value.clientWidth?a.value=!0:a.value=!1})}c.watch(()=>t.value.length,()=>{p()},{immediate:!0});function u(d){d.paneProps.disabled||o(d.getPaneName())}return{__sfc:!0,tabPanes:t,tabsProps:r,setCurrentTab:o,$t:i,listRef:n,isMoreItem:a,isExpanded:s,toggle:l,computeIsMoreItem:p,onClickItem:u,PwcIconDown:Zo,PwcIconUp:r1,renderSlot:It}}});var Tz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"pwc-tab-nav",class:[`is-type-${r.tabsProps.type}`]},[t("div",{ref:"listRef",staticClass:"pwc-tab-nav__list",class:{"is-hide":r.tabsProps.expand&&!r.isExpanded}},e._l(r.tabPanes,function(o){return t("div",{key:o.paneId,staticClass:"pwc-tab-nav__item",class:{"is-active":o.getIsActive(),"is-disabled":o.paneProps.disabled},on:{click:function(i){return r.onClickItem(o)}}},[o.hasSlot("title")?t(r.renderSlot,{staticClass:"pwc-tab-nav__item__title",attrs:{"slot-func":o.getTitleRenderSlot}}):t("span",[e._v(e._s(o.paneProps.title))]),o.hasSlot("extra")?t(r.renderSlot,{staticClass:"pwc-tab-nav__item__extra",attrs:{"slot-func":o.getExtraRenderSlot}}):e._e(),o.paneProps.extra?t("span",{staticClass:"pwc-tab-nav__item__extra"},[e._v(" "+e._s(o.paneProps.extra)+" ")]):e._e()],1)}),0),t("div",{staticClass:"pwc-tab-nav__right"},[r.tabsProps.expand&&r.isMoreItem?t("div",{staticClass:"pwc-tab-nav__expand",on:{click:r.toggle}},[t("span",[e._v(e._s(r.isExpanded?r.$t("tabs.collapse"):r.$t("tabs.more")))]),r.isExpanded?t(r.PwcIconUp):t(r.PwcIconDown)],1):e._e()])])},Ez=[],Qz=$(Pz,Tz,Ez);const Iz=Qz.exports,Mz=c.defineComponent({__name:"tabs",props:Sz(),emits:kz(),setup(e,{emit:t}){const r=e,o=c.ref(),i=c.ref(),{modelValue:n,updateModelValue:a}=de(r,{outSideUpdate:w=>{o.value=w}}),s=c.ref([]);function l(w){if(!s.value.includes(w)){if(typeof o.value>"u")if(typeof n.value>"u"){const h=w.getPaneName();u(h,!1)}else u(n.value,!1);s.value.push(w)}}function p(w){s.value=s.value.filter(h=>h!==w)}function u(w,h=!0){o.value!==w&&(o.value=w,a(w),h&&t("change",w))}const d=c.ref(0);function m(){return H(this,null,function*(){var b;yield c.nextTick();const w=((b=i.value)==null?void 0:b.querySelectorAll("[data-pane-name]"))||[];let h=0;for(let v=0;v<w.length;v++)if(w[v].getAttribute("data-is-active")==="true"){h=v*100;break}d.value=h})}c.watch(()=>o.value,()=>{m()});const f={tabsProps:r,currentTab:o,tabPanes:s,setCurrentTab:u,addTabPane:l,removeTabPane:p};return c.provide(Qs,f),{__sfc:!0,props:r,emits:t,currentTab:o,tabsRef:i,modelValue:n,updateModelValue:a,tabPanes:s,addTabPane:l,removeTabPane:p,setCurrentTab:u,offsetPercent:d,getTabsOffset:m,injectData:f,TabNav:Iz}}});var Az=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"tabsRef",staticClass:"pwc-tabs"},[t(r.TabNav),t("div",{staticClass:"pwc-tabs__content"},[t("div",{staticClass:"pwc-tabs__list",style:{marginLeft:`-${r.offsetPercent}%`}},[e._t("default")],2)])],1)},zz=[],Dz=$(Mz,Az,zz);const Oz=Dz.exports,Rz=c.defineComponent({__name:"tab-pane",props:Lz(),setup(e){const t=e,r=Xt(8),o=c.inject(Qs),{hasSlot:i,slotRender:n}=Pe(),a=c.computed(()=>t.name||r),s=c.computed(()=>o.currentTab.value===a.value);function l(){return n("title",{isActive:s.value})}const p=c.computed(()=>{var f;return(f=t.lazyLoad)!=null?f:o.tabsProps.lazyLoad}),u=c.ref(!1);c.watch(s,()=>{s.value&&(u.value=!0)});const d=c.computed(()=>p.value?u.value:!0),m={paneId:r,paneProps:t,getPaneName:()=>a.value,getIsActive:()=>s.value,hasSlot:i,getTitleRenderSlot:l,getExtraRenderSlot:()=>n("extra")};return c.onBeforeMount(()=>{o.addTabPane(m)}),{__sfc:!0,props:t,paneId:r,tabsInject:o,hasSlot:i,slotRender:n,tabPaneName:a,isActive:s,getTitleRenderSlot:l,isLazyLoad:p,isFirstRender:u,canRender:d,tabPaneInstance:m}}});var Vz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"pwc-tab-pane",class:{"is-active":r.isActive},attrs:{"data-pane-name":r.tabPaneName,"data-is-active":r.isActive}},[r.canRender?t("div",{staticClass:"pwc-tab-pane__content"},[e._t("default")],2):e._e()])},Bz=[],$z=$(Rz,Vz,Bz);const Fz=$z.exports;ee("PwcTabs",Oz);ee("PwcTabPane",Fz);const jz={option:"Voting Options",rule:"Rules",ruleTitle:"Rule Description",success:"Vote successful",voted:"You have already voted",voteFailed:"Vote failed",voteLimit:"Vote limit reached",count:"votes",entrance:"Vote",listTitle:"Vote Activity",noRule:"No rules",status:{voting:"Voting",ended:"Ended"},button:{vote:"Vote",voted:"Voted",notVoted:"Not Voted"}},Nz={vote:jz},Uz={option:"投票オプション",rule:"ルール",ruleTitle:"ルール説明",success:"投票成功",voted:"すでに投票済みです",voteFailed:"投票失敗",voteLimit:"投票回数が上限に達しました",count:"票",entrance:"投票",listTitle:"投票活動",noRule:"ルールなし",status:{voting:"投票中",ended:"終了"},button:{vote:"投票",voted:"投票済み",notVoted:"未投票"}},Wz={vote:Uz},Hz={option:"투표 옵션",rule:"규칙",ruleTitle:"규칙 설명",success:"투표 성공",voted:"이미 투표했습니다",voteFailed:"투표 실패",voteLimit:"투표 횟수가 소진되었습니다",count:"표",entrance:"투표",listTitle:"투표 활동",noRule:"규칙 없음",status:{voting:"투표 중",ended:"종료"},button:{vote:"투표",voted:"투표함",notVoted:"미투표"}},Zz={vote:Hz},Yz={option:"Варианты голосования",rule:"Правила",ruleTitle:"Описание правил",success:"Голосование успешно",voted:"Вы уже проголосовали",voteFailed:"Голосование не удалось",voteLimit:"Лимит голосований исчерпан",count:"голосов",entrance:"Голосование",listTitle:"Активность голосования",noRule:"Нет правил",status:{voting:"Голосование",ended:"Завершено"},button:{vote:"Голосовать",voted:"Проголосовано",notVoted:"Не проголосовано"}},qz={vote:Yz},Gz={option:"投票选项",rule:"规则",ruleTitle:"规则说明",success:"投票成功",voted:"你之前已经投过票",voteFailed:"投票失败",voteLimit:"投票次数已用完",count:"票",entrance:"投票",listTitle:"投票活动",noRule:"暂无规则",status:{voting:"投票中",ended:"已结束"},button:{vote:"投票",voted:"已投票",notVoted:"未投票"}},Xz={vote:Gz},Kz={option:"投票選項",rule:"規則",ruleTitle:"規則說明",success:"投票成功",voted:"你之前已經投過票",voteFailed:"投票失敗",voteLimit:"投票次數已用完",count:"票",entrance:"投票",listTitle:"投票活動",noRule:"暫無規則",status:{voting:"投票中",ended:"已結束"},button:{vote:"投票",voted:"已投票",notVoted:"未投票"}},Jz={vote:Kz},{useI18n:Vt}=d1({zh_CN:Xz,zh_TW:Jz,en:Nz,ja:Wz,ko:Zz,ru:qz}),eD=()=>({status:g.oneOf(["Y","N"]).def("Y"),isVoted:g.bool.isRequired,disabled:g.bool.def(!1),hasVoteList:g.bool.def(!1)}),tD=()=>({click:W()}),rD=e=>{const{props:t,emit:r}=e,{$t:o}=Vt(),i=c.computed(()=>t.isVoted?"voted":t.status==="N"?"not-voted":t.disabled?"disabled":"vote"),n={vote:o("vote.button.vote"),voted:o("vote.button.voted"),"not-voted":o("vote.button.notVoted"),disabled:o("vote.button.vote")},a=c.computed(()=>n[i.value]);function s(){i.value==="vote"&&r("click")}return{buttonType:i,buttonText:a,handleClick:s}},oD=c.defineComponent({__name:"vote-button",props:eD(),emits:tD(),setup(e,{emit:t}){const r=e,{buttonType:o,buttonText:i,handleClick:n}=rD({props:r,emit:t});return{__sfc:!0,props:r,emit:t,buttonType:o,buttonText:i,handleClick:n,PwcButton:ot}}});function nr(e,t,r,o,i,n,a,s){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),n&&(l._scopeId="data-v-"+n),{exports:e,options:l}}var iD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-button",class:{"plv-iar-vote-button--no-pointer":o.props.hasVoteList}},[o.buttonType==="vote"?r(o.PwcButton,{staticClass:"plv-iar-vote-button__btn",attrs:{size:"mini",disabled:o.props.disabled},on:{click:o.handleClick}},[t._v(" "+t._s(o.buttonText)+" ")]):o.buttonType==="not-voted"||o.buttonType==="disabled"?r(o.PwcButton,{staticClass:"plv-iar-vote-button__btn",attrs:{size:"mini",disabled:""}},[t._v(" "+t._s(o.buttonText)+" ")]):r(o.PwcButton,{staticClass:"plv-iar-vote-button__text",attrs:{size:"mini",disabled:o.props.status==="N"||o.props.disabled}},[t._v(" "+t._s(o.buttonText)+" ")])],1)},nD=[],aD=nr(oD,iD,nD,!1,null,"6ba928d5");const Qd=aD.exports,sD=()=>({status:g.oneOf(["Y","N"]).def("Y")}),lD=()=>({}),cD=e=>{const{props:t}=e,{$t:r}=Vt();return{statusText:c.computed(()=>t.status==="Y"?r("vote.status.voting"):r("vote.status.ended"))}},pD=c.defineComponent({__name:"vote-status",props:sD(),emits:lD(),setup(e,{emit:t}){const r=e,{statusText:o}=cD({props:r});return{__sfc:!0,props:r,emit:t,statusText:o}}});var uD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-status",class:{"plv-iar-vote-status--voting":t.status==="Y","plv-iar-vote-status--ended":t.status==="N"}},[t._v(" "+t._s(o.statusText)+" ")])},dD=[],fD=nr(pD,uD,dD,!1,null,"c99114e4");const Id=fD.exports,Md=()=>({voteData:g.object().isRequired,votedList:g.array().def([]),layout:g.oneOf(["single","double"]).def("single"),clickable:g.bool.def(!0),hasVoteList:g.bool.def(!1)}),Ad=()=>({"to-vote":W()}),zd=e=>{const{props:t,emit:r,itemRef:o}=e,i=c.ref({gridRowEnd:"auto"}),n=c.computed(()=>t.votedList.includes(t.voteData.id)),a=c.computed(()=>!t.clickable);function s(){a.value||r("to-vote",t.voteData.id)}return{isVoted:n,isDisabled:a,gridRowEndStyle:i,handleVote:s}},mD=c.defineComponent({__name:"vote-item-single",props:Md(),emits:Ad(),setup(e,{emit:t}){const r=e,{$t:o}=Vt(),{isVoted:i,isDisabled:n,handleVote:a}=zd({props:r,emit:t});return{__sfc:!0,$t:o,props:r,emit:t,isVoted:i,isDisabled:n,handleVote:a,VoteButton:Qd,VoteStatus:Id}}});var hD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-list-item plv-iar-vote-list-item-layout-single",class:{"plv-iar-vote-list-item-image":!!t.voteData.voteCoverImage,"plv-iar-vote-list-item-no-image":!t.voteData.voteCoverImage}},[t.voteData.voteCoverImage?[r("div",{staticClass:"plv-iar-vote-list-item-bg"},[r("div",{staticClass:"plv-iar-vote-list-item-bg-image",style:{backgroundImage:`url(${t.voteData.voteCoverImage})`}}),r("div",{staticClass:"plv-iar-vote-list-item-bg-mask"})])]:t._e(),r("div",{staticClass:"plv-iar-vote-list-item-content"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-content-info-left-top-item",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-content-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1),r("div",{staticClass:"plv-iar-vote-list-item-content-info-name"},[t._v(t._s(t.voteData.name))])]),r(o.VoteButton,{attrs:{status:t.voteData.status,"is-voted":o.isVoted,disabled:o.isDisabled,"has-vote-list":o.props.hasVoteList},on:{click:o.handleVote}})],1)],2)},gD=[],vD=nr(mD,hD,gD,!1,null,"d0e638ec");const wD=vD.exports,bD=c.defineComponent({__name:"vote-item-double",props:Md(),emits:Ad(),setup(e,{expose:t,emit:r}){const o=e,{$t:i}=Vt(),n=c.ref(),{isVoted:a,isDisabled:s,gridRowEndStyle:l,handleVote:p}=zd({props:o,emit:r,itemRef:n});let u=null;const d=12;function m(h=d){if(!n.value)return;const b=n.value.offsetHeight;if(b>0){const v=Math.ceil(b/h);l.value={gridRowEnd:`span ${v}`}}}function f(){n.value&&(u&&(u.disconnect(),u=null),u=new ep(()=>{m(d)}),u.observe(n.value),m(d))}function w(){u&&(u.disconnect(),u=null)}return c.watch(n,h=>{w(),h&&f()},{immediate:!0}),c.onBeforeUnmount(()=>{w()}),t({calculateGridRowEnd:m,itemRef:n}),{__sfc:!0,$t:i,props:o,emit:r,itemRef:n,isVoted:a,isDisabled:s,gridRowEndStyle:l,handleVote:p,resizeObserver:u,GAP:d,calculateGridRowEnd:m,setupResizeObserver:f,cleanupResizeObserver:w,VoteButton:Qd,VoteStatus:Id}}});var _D=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{ref:"itemRef",staticClass:"plv-iar-vote-list-item plv-iar-vote-list-item-layout-double",style:o.gridRowEndStyle},[r("div",{staticClass:"plv-iar-vote-list-item-content-container"},[t.voteData.voteCoverImage?[r("div",{staticClass:"plv-iar-vote-list-item-image",style:{backgroundImage:`url(${t.voteData.voteCoverImage})`}},[r("div",{staticClass:"plv-iar-vote-list-item-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-image-status",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1)])]:t._e(),r("div",{staticClass:"plv-iar-vote-list-item-content"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info"},[t.voteData.voteCoverImage?t._e():r("div",{staticClass:"plv-iar-vote-list-item-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-info-left-top-item",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1),r("div",{staticClass:"plv-iar-vote-list-item-content-info-name"},[t._v(t._s(t.voteData.name))])]),r(o.VoteButton,{attrs:{status:t.voteData.status,"is-voted":o.isVoted,disabled:o.isDisabled,"has-vote-list":o.props.hasVoteList},on:{click:o.handleVote}})],1)],2)])},yD=[],xD=nr(bD,_D,yD,!1,null,"214a02c3");const CD=xD.exports,$o={OpenVote:"OpenVote",OpenVoteRule:"OpenVoteRule"};function SD(e){const{state:t,onShow:r,onGetVoteList:o}=e,{list:i,curVotedList:n,cacheVotedList:a,voteCount:s,isForceHideResult:l,isForceShowResult:p,findVoteById:u}=t;function d(y){n.value=y.curVotedList}function m(y){const _=y.voteData.id,C=u(_)[0];C!==-1&&i.value.splice(C,1);const x=n.value.findIndex(E=>E===_);x!==-1&&n.value.splice(x,1);const S=a.value.findIndex(E=>E===_);S!==-1&&a.value.splice(S,1);const L=y.voteData.voteOrder||0;let k=i.value.length;for(let E=0;E<i.value.length;E++)if((i.value[E].voteOrder||0)>=L){k=E;break}p.value&&(y.voteData.showVoteCount=!0,y.voteData.voteCount=0),i.value.splice(k,0,y.voteData),r()}function f(y){const _=u(y.id)[1];_&&(_.status="N")}function w(y){s.value=y.voteCount,y.list.forEach(_=>{const C=u(_.id)[1];C&&(C.showVoteCount=!l.value,C.voteCount=_.times)})}function h(){i.value.splice(0,i.value.length)}function b(y){const _=u(y.id)[0];_!==-1&&i.value.splice(_,1)}function v(y){const _=Math.floor(Math.random()*3e3);setTimeout(()=>{o()},_)}return{updateVotedList:d,onVoteStart:m,onVoteStop:f,onVoteResult:w,onVoteDeleteAll:h,onVoteDelete:b,onVoteChangeOrder:v}}function kD(e){const{voteTarget:t,state:r,onShowEntrance:o}=e,{list:i,curVotedList:n,cacheVotedList:a,isVotedWithLimit:s,voteCount:l,isForceHideResult:p,findVoteById:u}=r,{toast:d}=At(),{$t:m}=Vt(),{trackEvent:f}=PI((t==null?void 0:t.interactionCore)||{});function w(){return H(this,null,function*(){t&&(n.value=t.getVotedList())})}function h(){return H(this,null,function*(){if(!t)return;const C=yield t.getVoteList();if(C&&C.code===200&&C.data){i.value=C.data.list,i.value.length>0&&o(!0);const x=t.getCachedVoteResult();x&&x.forEach(S=>{const L=u(S.id)[1];L&&(L.showVoteCount=!p.value,L.voteCount=S.times)})}})}const b=rs(h,1e3);function v(C){return H(this,null,function*(){if(t&&a.value.indexOf(C)===-1){a.value.push(C);const x=yield t.toVote(C);if(x.code===200)t.pushVotedList(C),d.success(m("vote.success"));else if(x.code===506)d.info(m("vote.voted")),t.pushVotedList(C);else{x.code===501?(s.value=!0,d.error(m("vote.voteLimit"))):d.error(x.message||m("vote.voteFailed"));const S=a.value.indexOf(C);S!==-1&&a.value.splice(S,1)}y()}})}function y(){t&&f({event_id:"click_vote_widget",event_type:"click",spec_attrs:{timestamp:Date.now()}})}function _(){t&&t.interactionCore.getSocket().then(C=>{C&&C.on("connect",()=>{b()})})}return{getVotedList:w,getVoteList:b,toVote:v,setupSocketListener:_}}function LD(e){const{resultShowType:t}=e,r=c.ref([]),o=c.ref([]),i=c.ref([]),n=c.ref(!1),a=c.ref(0),s=c.computed(()=>o.value.length),l=c.computed(()=>t===3&&a.value===0&&i.value.length===0),p=c.computed(()=>t===2||t===3&&(a.value>0||o.value.length>0));function u(d){const m=r.value.findIndex(f=>f.id===d);return[m,r.value[m]]}return{list:r,curVotedList:o,cacheVotedList:i,isVotedWithLimit:n,voteCount:a,isForceHideResult:l,isForceShowResult:p,votedCount:s,findVoteById:u}}const PD=()=>({voteTarget:g.object(),layout:g.oneOf(["single","double"]).def("single"),voteList:g.array(),maxVote:g.number.def(0),showHeader:g.bool.def(!0),showRule:g.bool.def(!0),resultShowType:g.number.def(0)}),TD=()=>({"to-show":()=>!0,"to-hide":()=>!0,"show-entrance":W()}),ED=e=>{var v,y,_,C,x,S,L;const{props:t,emit:r}=e,{getEmitter:o}=er(),{voteTarget:i={}}=t,n=LD({resultShowType:t.resultShowType}),a=kD({voteTarget:i,state:n,onShowEntrance:k=>r("show-entrance",k)}),{updateVotedList:s,onVoteStart:l,onVoteStop:p,onVoteResult:u,onVoteDeleteAll:d,onVoteDelete:m,onVoteChangeOrder:f}=SD({state:n,onShow:()=>r("to-show"),onGetVoteList:()=>a.getVoteList()});function w(){o().emit($o.OpenVoteRule)}function h(k){if(n.curVotedList.value.indexOf(k)!==-1||n.isVotedWithLimit.value)return!1;const P=Number(t.maxVote)||0;return P>0?n.votedCount.value<P:!0}function b(){t.voteList&&t.voteList.length>0||(a.setupSocketListener(),a.getVoteList(),a.getVotedList())}return TI(i.eventEmitter,{[(v=i.VoteEvent)==null?void 0:v.UpdateVotedList]:s,[(y=i.VoteEvent)==null?void 0:y.Start]:l,[(_=i.VoteEvent)==null?void 0:_.Stop]:p,[(C=i.VoteEvent)==null?void 0:C.VoteResult]:u,[(x=i.VoteEvent)==null?void 0:x.DeleteAll]:d,[(S=i.VoteEvent)==null?void 0:S.Delete]:m,[(L=i.VoteEvent)==null?void 0:L.UpdateVoteOrder]:f}),c.onMounted(()=>{t.voteTarget&&b()}),c.watch(()=>t.voteTarget,k=>{k&&b()},{immediate:!0}),c.watch(()=>t.voteList,k=>{k!=null&&(n.list.value=[...k])},{immediate:!0,deep:!0}),{list:n.list,curVotedList:n.curVotedList,handleToVote:a.toVote,handleRule:w,isItemClickable:h}},QD=c.defineComponent({__name:"vote-list",props:PD(),emits:TD(),setup(e,{emit:t}){const r=e,{$t:o}=Vt(),{list:i,curVotedList:n,handleToVote:a,handleRule:s,isItemClickable:l}=ED({props:r,emit:t});return{__sfc:!0,$t:o,props:r,emit:t,list:i,curVotedList:n,handleToVote:a,handleRule:s,isItemClickable:l,PwcEmpty:un,VoteItemSingle:wD,VoteItemDouble:CD}}});var ID=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote"},[o.list.length?r("div",{staticClass:"plv-iar-vote__container"},[t.showHeader?r("div",{staticClass:"plv-iar-vote__container__header"},[r("span",[t._v(t._s(o.$t("vote.option")))]),o.props.showRule?r("span",{class:{"plv-iar-vote__container__header__rule--no-pointer":o.props.voteList&&o.props.voteList.length>0},on:{click:o.handleRule}},[t._v(t._s(o.$t("vote.rule")))]):t._e()]):t._e(),r("div",{staticClass:"plv-iar-vote__list",class:{"plv-iar-vote__list--single":t.layout==="single","plv-iar-vote__list--double":t.layout==="double"}},t._l(o.list,function(i){return r(t.layout==="single"?o.VoteItemSingle:o.VoteItemDouble,{key:i.id,tag:"component",attrs:{"vote-data":i,"voted-list":o.curVotedList,clickable:o.isItemClickable(i.id),"has-vote-list":!!(o.props.voteList&&o.props.voteList.length>0)},on:{"to-vote":o.handleToVote}})}),1)]):r("div",{staticClass:"plv-iar-vote__no-data"},[r(o.PwcEmpty)],1)])},MD=[],AD=nr(QD,ID,MD,!1,null,null);const Dd=AD.exports,zD="data:image/png;base64,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",DD=()=>({voteTarget:g.object(),isFullScreen:g.bool.def(!1),iconUrl:g.string.def(""),beforeClickInterrupt:g.func()}),OD=()=>({"open-vote":W()}),RD=e=>{const{props:t}=e,{getEmitter:r}=er();function o(){return H(this,null,function*(){t.beforeClickInterrupt&&Ga(t.beforeClickInterrupt)&&(yield t.beforeClickInterrupt())||r().emit($o.OpenVote)})}return{pendantIconUrl:c.computed(()=>t.iconUrl||zD),onClickPendant:o}},VD=c.defineComponent({__name:"vote-pendant",props:DD(),emits:OD(),setup(e,{emit:t}){const r=e,{$t:o}=Vt(),{onClickPendant:i,pendantIconUrl:n}=RD({props:r}),a=c.computed(()=>({backgroundImage:`url(${n.value})`}));return{__sfc:!0,props:r,emit:t,$t:o,onClickPendant:i,pendantIconUrl:n,pendantStyle:a}}});var BD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return t.voteTarget&&!t.isFullScreen?r("div",{staticClass:"plv-iar-vote-pendant",style:o.pendantStyle,on:{click:o.onClickPendant}},[r("div",{staticClass:"plv-iar-vote-pendant__text"},[t._v(" "+t._s(o.$t("vote.entrance"))+" ")])]):t._e()},$D=[],FD=nr(VD,BD,$D,!1,null,null);const jD=FD.exports,ND=()=>({voteTarget:g.object(),popupConfig:g.object(),layout:g.oneOf(["single","double"]).def("single"),maxVote:g.number.def(0),showRule:g.bool.def(!0),resultShowType:g.number.def(0)}),UD=e=>{const{voteListRef:t}=e,r=c.ref(!1),o=c.ref(),{getEmitter:i}=er();function n(){r.value=!0,c.nextTick(()=>{o.value&&o.value.resetScroll()})}c.watch(r,p=>{p&&c.nextTick(()=>{var u;(u=t==null?void 0:t.value)!=null&&u.recalculateGridRowEnds&&t.value.recalculateGridRowEnds()})});function a(){r.value=!1}function s(){i().emit($o.OpenVoteRule)}return Gt($o.OpenVote,n),{instance:{open:n,close:a},visible:r,popupRef:o,handleToRule:s}},WD=c.defineComponent({__name:"vote-list-popup",props:ND(),setup(e,{expose:t}){const r=e,{$t:o}=Vt(),i=c.ref(),{instance:n,visible:a,popupRef:s,handleToRule:l}=UD({voteListRef:i});return t(n),{__sfc:!0,props:r,$t:o,voteListRef:i,instance:n,visible:a,popupRef:s,handleToRule:l,PwcPopup:dt,VoteListComponent:Dd}}});var HD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r(o.PwcPopup,{ref:"popupRef",staticClass:"plv-iar-vote-list-popup",attrs:{title:o.$t("vote.listTitle"),"popup-config":t.popupConfig,closeable:!1,"body-height-percent":.65,background:"#F7F8Fa"},scopedSlots:t._u([{key:"header-right",fn:function(){return[t.showRule?r("span",{staticClass:"plv-iar-vote-list-popup__rule",on:{click:o.handleToRule}},[t._v(" "+t._s(o.$t("vote.rule"))+" ")]):t._e()]},proxy:!0}]),model:{value:o.visible,callback:function(i){o.visible=i},expression:"visible"}},[r("div",{staticClass:"plv-iar-vote-list-popup__content"},[r(o.VoteListComponent,{ref:"voteListRef",attrs:{"vote-target":t.voteTarget,layout:t.layout,"max-vote":t.maxVote,"show-header":!1,"show-rule":t.showRule,"result-show-type":t.resultShowType},on:{"to-rule":o.handleToRule}})],1)])},ZD=[],YD=nr(WD,HD,ZD,!1,null,null);const qD=YD.exports,GD=()=>({ruleText:g.string.def(""),popupConfig:g.object()}),XD=e=>{const t=c.ref(!1),r=c.ref();function o(){t.value=!0,c.nextTick(()=>{r.value&&r.value.resetScroll()})}function i(){t.value=!1}return Gt($o.OpenVoteRule,o),{instance:{open:o,close:i},visible:t,popupRef:r,close:i}},KD=c.defineComponent({__name:"vote-rule-popup",props:GD(),setup(e,{expose:t}){const r=e,{$t:o}=Vt(),{isMobile:i}=Se(),{instance:n,visible:a,popupRef:s}=XD();return t(n),{__sfc:!0,props:r,$t:o,isMobile:i,instance:n,visible:a,popupRef:s,PwcPopup:dt}}});var JD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r(o.PwcPopup,{ref:"popupRef",staticClass:"plv-iar-vote-rule-popup",attrs:{title:o.$t("vote.ruleTitle"),"popup-config":t.popupConfig,backable:o.isMobile,background:o.isMobile?"#F7F8Fa":void 0,"body-height-percent":o.isMobile?.65:void 0},model:{value:o.visible,callback:function(i){o.visible=i},expression:"visible"}},[r("div",{staticClass:"plv-iar-vote-rule-popup__content"},[t.ruleText?r("div",{staticClass:"plv-iar-vote-rule-popup__text",domProps:{innerHTML:t._s(t.ruleText)}}):r("div",{staticClass:"plv-iar-vote-rule-popup__empty"},[t._v(" "+t._s(o.$t("vote.noRule"))+" ")])])])},eO=[],tO=nr(KD,JD,eO,!1,null,null);const rO=tO.exports;exports.VoteList=Dd;exports.VoteListPopup=qD;exports.VotePendant=jD;exports.VoteRulePopup=rO;console.log("%c@polyv/iar-vote-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[version: 2.1.0]","[buildTime: 2026-03-13 02:45:04]");
|
package/index.es.js
CHANGED
|
@@ -27667,8 +27667,8 @@ const LO = bO.exports;
|
|
|
27667
27667
|
console.log(
|
|
27668
27668
|
"%c@polyv/iar-vote-ui",
|
|
27669
27669
|
"background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff",
|
|
27670
|
-
"[version: 2.1.0
|
|
27671
|
-
"[buildTime: 2026-03-
|
|
27670
|
+
"[version: 2.1.0]",
|
|
27671
|
+
"[buildTime: 2026-03-13 02:45:04]"
|
|
27672
27672
|
);
|
|
27673
27673
|
export {
|
|
27674
27674
|
JD as VoteList,
|
package/index.umd.js
CHANGED
|
@@ -1004,4 +1004,4 @@ ${vi(r)}`),o}})}function Xd(e){const t=Object.keys(e),r=t.filter(i=>{var a;retur
|
|
|
1004
1004
|
enabled: column.columnProps.ellipsis,
|
|
1005
1005
|
content: cellText,
|
|
1006
1006
|
onlyTextEllipsis: true,
|
|
1007
|
-
}`}],staticClass:"pwc-table-body-cell__content"},[e._v(" "+e._s(r.cellText)+" ")])],2)},VM=[],BM=$(OM,RM,VM);const $M=BM.exports,FM=e=>{const{rowIndex:t,rowData:r,renderRowKey:o}=e,{tableProps:i,allColumnList:a}=ze(),{hoverStatus:n}=di(),s=c.computed(()=>a.value.find(u=>u.columnProps.type==="expand")),l=c.computed(()=>{const u=[];if(i.rowClassName){const d=_d(i.rowClassName,{rowIndex:t.value,rowData:r.value});u.push(...d)}return i.hoverRow&&n.value.rowIndex===t.value&&u.push("is-hover-row"),s.value&&s.value.getExpandVisible(o.value)&&u.push("is-expanded-row"),u}),p=c.computed(()=>{const u={};if(i.rowStyle){const d=yd(i.rowStyle,{rowIndex:t.value,rowData:r.value});Object.assign(u,d)}return u});return{rowClass:l,rowStyle:p}},jM=c.defineComponent({__name:"table-body-row",props:gd(),setup(e){const t=e,{leftColumnListInstance:r,centerColumnListInstance:o,rightColumnListInstance:i}=ze(),{columnList:a}=r,{columnList:n}=o,{columnList:s}=i,l=aM({props:t}),{rowClass:p,rowStyle:u}=FM(l);return{__sfc:!0,props:t,leftColumnListInstance:r,centerColumnListInstance:o,rightColumnListInstance:i,leftColumnList:a,centerColumnList:n,rightColumnList:s,rowResult:l,rowClass:p,rowStyle:u,TableBodyCell:$M}}});var UM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("tr",{staticClass:"pwc-table-row",class:r.rowClass,style:r.rowStyle},[e._l(r.leftColumnList,function(o){return t(r.TableBodyCell,{key:`left-column-${o.columnId}`,attrs:{column:o}})}),e._l(r.centerColumnList,function(o){return t(r.TableBodyCell,{key:`center-column-${o.columnId}`,attrs:{column:o}})}),e._l(r.rightColumnList,function(o){return t(r.TableBodyCell,{key:`right-column-${o.columnId}`,attrs:{column:o}})})],2)},WM=[],HM=$(jM,UM,WM);const ZM=HM.exports,YM=c.defineComponent({__name:"table-body-row-expand",props:gd(),setup(e){const t=e,{allColumnList:r,wrapWidth:o}=ze(),i=c.computed(()=>r.value.find(n=>n.columnProps.type==="expand"));function a(){if(i.value)return i.value.getCellRenderSlot({rowData:t.rowData,rowIndex:t.rowIndex,columnIndex:i.value.getColumnIndex(),cellData:null})}return{__sfc:!0,props:t,allColumnList:r,wrapWidth:o,expandColumn:i,expandColumnRenderSlotFunc:a,renderSlot:It}}});var qM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.expandColumn&&r.expandColumn.canShowExpand({rowData:e.rowData,rowIndex:e.rowIndex})&&r.expandColumn.getExpandVisible(r.props.renderRowKey)?t("tr",{staticClass:"pwc-table-row-expand"},[t("td",{staticClass:"pwc-table-row-expand__cell",attrs:{colspan:r.allColumnList.length}},[t(r.renderSlot,{staticClass:"pwc-table-row-expand__cell__content",style:{width:`${r.wrapWidth}px`},attrs:{"slot-func":r.expandColumnRenderSlotFunc}})],1)]):e._e()},GM=[],XM=$(YM,qM,GM);const KM=XM.exports,JM=c.defineComponent({__name:"table-body",setup(e){const{allColumnWidth:t,tableProps:r,wrapWidth:o}=ze(),{bodyWrapRef:i,bodyRef:a}=ui(),{renderData:n,isEmptyData:s}=ya(),{getRenderRowKey:l}=zs(),p=c.computed(()=>{const u={};return r.height&&(u.height=`${r.height}px`),r.maxHeight&&(u.maxHeight=`${r.maxHeight}px`),u});return{__sfc:!0,allColumnWidth:t,tableProps:r,wrapWidth:o,bodyWrapRef:i,bodyRef:a,renderData:n,isEmptyData:s,getRenderRowKey:l,bodyWrapStyle:p,TableColgroup:hd,TableBodyRow:ZM,TableBodyRowExpand:KM,PwcEmpty:qi}}});var NM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"bodyWrapRef",staticClass:"pwc-table-body-wrap",style:r.bodyWrapStyle},[r.isEmptyData?t("div",{staticClass:"pwc-table-body__empty",style:{width:`${r.wrapWidth}px`}},[t(r.PwcEmpty,{attrs:{type:"box"}})],1):e._e(),t("table",{ref:"bodyRef",staticClass:"pwc-table-body",style:{width:`${r.allColumnWidth}px`},attrs:{cellpadding:"0",cellspacing:"0",border:"0"}},[t(r.TableColgroup),e._l(r.renderData,function(o,i){return[t(r.TableBodyRow,{attrs:{"render-row-key":r.getRenderRowKey(o,i),"row-data":o,"row-index":i}}),t(r.TableBodyRowExpand,{attrs:{"render-row-key":r.getRenderRowKey(o,i),"row-data":o,"row-index":i}})]})],2)])},eA=[],tA=$(JM,NM,eA);const rA=tA.exports,oA=["multiple","single","index","operation","tags","expand"],iA=["left","right"],aA=["left","center","right"],nA=c.defineComponent({__name:"table-fixed-shadow",props:{position:g.oneOf(aA).isRequired},setup(e){const t=e,{leftColumnListInstance:r,rightColumnListInstance:o}=ze(),{scrollXPosition:i,hasHorizontalScroll:a}=As(),{headerWrapSize:n,bodyWrapSize:s}=ui(),{isEmptyData:l}=ya(),p=c.computed(()=>{if(l.value)return!0;switch(t.position){case"left":return r.columnWidthTotal.value===0||i.value==="start";case"right":return o.columnWidthTotal.value===0||i.value==="end"}return!1}),u=c.computed(()=>{const d={height:`${n.value.height+s.value.height}px`};return t.position==="left"?d.left=`${r.columnWidthTotal.value}px`:d.right=`${o.columnWidthTotal.value}px`,d});return{__sfc:!0,props:t,leftColumnListInstance:r,rightColumnListInstance:o,scrollXPosition:i,hasHorizontalScroll:a,headerWrapSize:n,bodyWrapSize:s,isEmptyData:l,shadowHidden:p,shadowStyle:u}}});var sA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return!r.shadowHidden&&r.hasHorizontalScroll?t("div",{staticClass:"pwc-table-fixed-shadow",class:{"is-left":e.position==="left","is-right":e.position==="right"},style:r.shadowStyle}):e._e()},lA=[],cA=$(nA,sA,lA);const pA=cA.exports,uA=()=>({column:g.object().isRequired}),xd=Symbol("table-header-cell-inject-key"),dA=e=>{const{props:t}=e,r=c.ref();return c.provide(xd,{headerCellRef:r,column:t.column}),{headerCellRef:r,column:t.column}},Cd=()=>c.inject(xd),fA=c.defineComponent({__name:"header-cell-multiple",setup(e){const{renderData:t}=ya(),{column:r}=Cd(),{inModelValue:o,multipleIsDisabled:i,removeModelValue:a,getColumnModelValue:n,deleteRowData:s}=wd(r),l=c.computed(()=>{const d=t.value;for(let m=0;m<d.length;m++){const f=d[m];if(o(f))return!0}return!1}),p=c.computed(()=>{const d=t.value;for(let m=0;m<d.length;m++){const f=d[m];if(!o(f)&&!i(f,m))return!1}return!0});function u(){const d=t.value,m=n();if(p.value)for(let f=0;f<d.length;f++){const w=d[f];o(w)&&!i(w,f)&&s(m,w)}else for(let f=0;f<d.length&&!(m.length>=r.columnProps.multipleMax);f++){const w=d[f];!o(w)&&!i(w,f)&&m.push(w)}r.updateModelValue([...m])}return{__sfc:!0,renderData:t,column:r,inModelValue:o,multipleIsDisabled:i,removeModelValue:a,getColumnModelValue:n,deleteRowData:s,indeterminate:l,isChecked:p,toggleMultiple:u,PwcCheckbox:Ko}}});var mA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.PwcCheckbox,{attrs:{indeterminate:r.indeterminate,checked:r.isChecked},on:{change:r.toggleMultiple}})},hA=[],gA=$(fA,mA,hA);const vA=gA.exports,wA=c.defineComponent({__name:"header-cell-sort",setup(e){const{tableSortOrder:t}=di(),{column:r,headerCellRef:o}=Cd(),i=c.computed(()=>r.isCurrentSort());return ne(o,"click",()=>{const a=r.toggleSortOrder();r.changeSortOrder(a)}),{__sfc:!0,tableSortOrder:t,column:r,headerCellRef:o,isCurrentSort:i}}});var bA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.column.getColumnSortName()?t("div",{staticClass:"pwc-table-header-cell__sort"},[t("div",{staticClass:"pwc-table-header-cell__sort-asc",class:{"is-current":r.isCurrentSort&&r.tableSortOrder==="ascending"},on:{click:function(o){return o.stopPropagation(),r.column.changeSortOrder("ascending")}}}),t("div",{staticClass:"pwc-table-header-cell__sort-desc",class:{"is-current":r.isCurrentSort&&r.tableSortOrder==="descending"},on:{click:function(o){return o.stopPropagation(),r.column.changeSortOrder("descending")}}})]):e._e()},_A=[],yA=$(wA,bA,_A);const xA=yA.exports,CA=e=>{const{column:t}=e,{tableProps:r}=ze();return{headerCellClass:c.computed(()=>{const o=[];switch(t.columnProps.type){case"multiple":o.push("is-multiple-column");break;case"single":o.push("is-single-column");break;case"index":o.push("is-index-column");break;case"operation":o.push("is-operation-column");break}return t.columnProps.sortable&&o.push("is-sortable"),r.highlightSorted&&t.isCurrentSort()&&o.push("is-highlight-sorted"),o})}},SA=c.defineComponent({__name:"table-header-cell",props:uA(),setup(e){const t=e,{$t:r}=ie(),{tableProps:o}=ze(),i=dA({props:t}),{headerCellRef:a}=i,{headerCellClass:n}=CA(i),s=c.computed(()=>{let l="";const p=t.column;return p.columnProps.type==="operation"&&(l=r("table.operation")),p.columnProps.type==="tags"&&(l=r("table.tags")),p.columnProps.type==="index"&&(l=r("table.index")),p.columnProps.type==="single"&&(l=r("table.single")),p.columnProps.title&&(l=p.columnProps.title),l});return{__sfc:!0,props:t,$t:r,tableProps:o,cellResult:i,headerCellRef:a,headerCellClass:n,headerTitle:s,PwcIconQuestionCircleOutline:jo,vTooltip:yt,renderSlot:It,HeaderCellMultiple:vA,HeaderCellSort:xA}}});var kA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("th",{ref:"headerCellRef",staticClass:"pwc-table-header-cell",class:r.headerCellClass,style:X(V({},e.column.getStickyStyle()),{background:r.tableProps.headerBgColor})},[t("div",{staticClass:"pwc-table-header-cell__content"},[e.column.columnProps.type==="multiple"?[t(r.HeaderCellMultiple,{attrs:{column:e.column}})]:e.column.hasSlots("header")?[t(r.renderSlot,{attrs:{"slot-func":e.column.getHeaderRenderSlot}})]:[e._v(" "+e._s(r.headerTitle)+" ")],e.column.columnProps.headerTips?t(r.PwcIconQuestionCircleOutline,{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.column.columnProps.headerTips,expression:"column.columnProps.headerTips"}],staticClass:"pwc-table-header-cell__tips"}):e._e(),e.column.columnProps.sortable?[t(r.HeaderCellSort)]:e._e()],2)])},LA=[],PA=$(SA,kA,LA);const TA=PA.exports,EA=()=>{const{originalColumnListInstance:e}=ze(),t=o=>{const i=[];return o.forEach(a=>{const n=a.getChildrenColumns();i.push(a),n.length>0&&i.push(...t(n))}),i},r=()=>{let o=1;const i=(n,s)=>{s&&(n.level=s.level+1,o<n.level&&(o=n.level));const l=n.getChildrenColumns();if(l.length>0){let p=0;l.forEach(u=>{i(u,n),p+=u.getColSpan()}),n.setColSpan(p)}else n.setColSpan(1)};e.columnList.value.forEach(n=>{n.level=1,i(n,void 0)});const a=[];for(let n=0;n<o;n++)a.push([]);return t(e.columnList.value).forEach(n=>{n.getChildrenColumns().length===0?n.setRowSpan(o-n.level+1):n.setRowSpan(1),a[n.level-1].push(n)}),a};return{headerStructure:c.computed(()=>r())}},QA=c.defineComponent({__name:"table-header",setup(e){const{tableProps:t,allColumnWidth:r}=ze(),{headerWrapRef:o}=ui(),{headerStructure:i}=EA();return{__sfc:!0,tableProps:t,allColumnWidth:r,headerWrapRef:o,headerStructure:i,TableColgroup:hd,TableHeaderCell:TA}}});var IA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"headerWrapRef",staticClass:"pwc-table-header-wrap",class:{"is-sticky":r.tableProps.headerSticky},style:{background:r.tableProps.headerBgColor}},[t("table",{staticClass:"pwc-table-header",style:{width:`${r.allColumnWidth}px`},attrs:{cellpadding:"0",cellspacing:"0",border:"0"}},[t(r.TableColgroup),t("thead",e._l(r.headerStructure,function(o,i){return t("tr",{key:`header-row-${i}`,staticClass:"pwc-table-header__row"},e._l(o,function(a){return t(r.TableHeaderCell,{key:`header-column-${a.columnId}`,attrs:{column:a,rowspan:a.getRowSpan(),colspan:a.getColSpan()}})}),1)}),0)],1)])},MA=[],AA=$(QA,IA,MA);const zA=AA.exports,DA=c.defineComponent({__name:"horizontal-scrollbar",setup(e){const{allColumnWidth:t}=ze(),{horizontalScrollbarRef:r,bodyWrapSize:o}=ui(),{hasHorizontalScroll:i}=As();return{__sfc:!0,allColumnWidth:t,horizontalScrollbarRef:r,bodyWrapSize:o,hasHorizontalScroll:i}}});var OA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.hasHorizontalScroll?t("div",{staticClass:"pwc-table-horizontal-scrollbar"},[t("div",{ref:"horizontalScrollbarRef",staticClass:"pwc-table-horizontal-scrollbar__container",style:{width:`${r.bodyWrapSize.width}px`}},[t("div",{style:{width:`${r.allColumnWidth}px`}})])]):e._e()},RA=[],VA=$(DA,OA,RA);const BA=VA.exports,$A=c.defineComponent({__name:"vertical-scrollbar",setup(e){const{headerWrapSize:t,bodyWrapSize:r,bodySize:o,verticalScrollbarRef:i}=ui(),{tableProps:a}=ze(),{hasVerticalScroll:n}=As(),s=c.computed(()=>({height:`${t.value.height+r.value.height}px`}));return{__sfc:!0,headerWrapSize:t,bodyWrapSize:r,bodySize:o,verticalScrollbarRef:i,tableProps:a,hasVerticalScroll:n,verticalScrollbarStyle:s}}});var FA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.hasVerticalScroll?t("div",{staticClass:"pwc-table-vertical-scrollbar",style:r.verticalScrollbarStyle},[t("div",{staticClass:"pwc-table-vertical-scrollbar__header",style:{background:r.tableProps.headerBgColor,height:`${r.headerWrapSize.height}px`}}),t("div",{staticClass:"pwc-table-vertical-scrollbar__body"},[t("div",{ref:"verticalScrollbarRef",staticClass:"pwc-table-vertical-scrollbar__container"},[t("div",{style:{height:`${r.bodySize.height}px`}})])])]):e._e()},jA=[],UA=$($A,FA,jA);const WA=UA.exports,HA=c.defineComponent({__name:"table-pagination",setup(e){const{tableEmit:t,tableProps:r}=ze(),{paginationModelValue:o}=pd(),i=c.computed(()=>{const n={hideOnSinglePage:!0};return typeof r.pagination=="boolean"?n:V(V({},n),r.pagination)});function a(n){t("page-change",n)}return{__sfc:!0,tableEmit:t,tableProps:r,paginationModelValue:o,paginationProps:i,onPaginationChange:a,PwcPagination:Au}}});var ZA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.PwcPagination,e._b({staticClass:"pwc-table__pagination",on:{change:r.onPaginationChange},model:{value:r.paginationModelValue,callback:function(o){r.paginationModelValue=o},expression:"paginationModelValue"}},"pwc-pagination",r.paginationProps,!1))},YA=[],qA=$(HA,ZA,YA);const GA=qA.exports,XA=()=>({data:g.oneOfType([Object,Array]).def([]),headerHeight:g.number.def(48),headerBgColor:g.looseString,headerSticky:g.bool.def(!1),footerSticky:g.bool.def(!1),footerBgColor:g.looseString,height:g.looseNumber,maxHeight:g.looseNumber,flexHeight:g.bool.def(!1),hoverRow:g.bool.def(!0),hoverColumn:g.bool.def(!1),rowKey:g.oneOfType([String,Function]),rowClassName:g.oneOfType([Function,Array,String]),rowStyle:g.oneOfType([Function,Object]),cellClassName:g.oneOfType([Function,Array,String]),cellStyle:g.oneOfType([Function,Object]),pagination:g.oneOfType([Object,Boolean]).def(!1),sort:g.object(),highlightSorted:g.bool.def(!0),border:g.bool.def(!1)}),KA=()=>({"page-change":H(),"sort-change":H()}),JA=()=>({[g.modelValueKey]:g.any,type:g.oneOf(oA),title:g.looseString,prop:g.looseString,width:g.oneOfType([Number,String]),minWidth:g.oneOfType([Number,String]),fixed:g.oneOf(iA),multipleMax:g.number.def(1/0),multipleDisabled:g.func(),singleDisabled:g.func(),headerTips:g.string,sortable:g.bool.def(!1),sortName:g.looseString,ellipsis:g.bool.def(!1),formatter:g.oneOfType([Object,Function,String]),showExpand:g.func(),emptyText:g.oneOfType([String,Boolean]).def(!1)}),NA=()=>V({},he()),ez=e=>{const{props:t}=e,r=Og();return{footerClass:c.computed(()=>{const o=[];return t.footerSticky&&o.push("is-sticky"),r&&o.push("is-in-popup"),o})}},tz=c.defineComponent({__name:"table",props:XA(),emits:KA(),setup(e,{emit:t}){const r=e,{wrapRef:o,hasHorizontalScroll:i,hasVerticalScroll:a}=eM({props:r,emit:t}),{footerClass:n}=ez({props:r});return{__sfc:!0,props:r,emit:t,wrapRef:o,hasHorizontalScroll:i,hasVerticalScroll:a,footerClass:n,TableBody:rA,TableFixedShadow:pA,TableHeader:zA,HorizontalScrollbar:BA,VerticalScrollbar:WA,TablePagination:GA}}});var rz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"wrapRef",staticClass:"pwc-table",class:{"is-border-table":e.border,"is-flex-height":e.flexHeight,"has-horizontal-scroll":r.hasHorizontalScroll,"has-vertical-scroll":r.hasVerticalScroll}},[t("div",{staticClass:"pwc-table__hidden-column"},[e._t("default")],2),t("div",{staticClass:"pwc-table__content"},[t("div",{staticClass:"pwc-table__inner"},[t(r.TableHeader),t(r.TableBody),t(r.TableFixedShadow,{attrs:{position:"left"}}),t(r.TableFixedShadow,{attrs:{position:"right"}})],1),t(r.HorizontalScrollbar),t(r.VerticalScrollbar)],1),e.pagination?t("div",{staticClass:"pwc-table__footer",class:r.footerClass},[e.pagination?t(r.TablePagination):e._e()],1):e._e()])},oz=[],iz=$(tz,rz,oz);const az=iz.exports,Sd=Symbol("COLUMN_CHILDREN_PROVIDE_KEY");function kd(e){const t=c.ref(e);function r(i){t.value=i}function o(){return t.value}return{target:t,set:r,get:o}}const nz=e=>{const t=c.ref([]);function r(p){t.value.push(p)}e.addChildrenColumn=r;function o(){return t.value}e.getChildrenColumns=o;const{set:i,get:a}=kd(0);e.setColSpan=i,e.getColSpan=a;const{set:n,get:s}=kd(0);e.setRowSpan=n,e.getRowSpan=s,c.provide(Sd,{addChildrenColumn:r,getChildrenColumns:o,level:1,setColSpan:i,getColSpan:a,setRowSpan:n,getRowSpan:s});const l=c.inject(Sd,void 0);return l&&l.addChildrenColumn(e),{childrenColumnList:t,isChildrenColmn:!!l}},sz=e=>{const t=c.ref(-1);function r(i){t.value=i}function o(){return t.value}return e.setColumnIndex=r,e.getColumnIndex=o,{setColumnIndex:r,getColumnIndex:o}},lz=e=>{const t=c.useSlots();function r(s){return!!t[s]}function o(){return{renderWidth:e.getRenderWidth(),columnIndex:e.getColumnIndex()}}function i(){if(t.header)return t.header(o())}function a(s){return s||{rowData:{},rowIndex:-1,columnIndex:-1,cellData:void 0}}function n(s){if(t.default)return t.default(s)}return e.hasSlots=r,e.getHeaderRenderSlot=i,e.getCellRenderSlot=n,{hasSlots:r,getHeaderSlotData:o,getCellSlotData:a}},cz=e=>{const{columnProps:t}=e,{isEmptyData:r}=ya(),o=c.computed(()=>r.value?!1:t.fixed==="left"||t.fixed==="right");function i(){return o.value}const a=c.ref(-1);function n(l){a.value=l}function s(){const l={};if(o.value&&a.value!==-1){switch(t.fixed){case"left":l.left=`${a.value}px`;break;case"right":l.right=`${a.value}px`;break}l.position="sticky",l.zIndex="3"}return l}return e.getStickyStatus=i,e.setStickyPosition=n,e.getStickyStyle=s,{getStickyStatus:i,setStickyPosition:n,getStickyStyle:s}},pz=e=>{const t=c.ref(100);function r(i){t.value=i}function o(){return t.value}return e.setRenderWidth=r,e.getRenderWidth=o,{setRenderWidth:r,getRenderWidth:o}},uz=e=>{const{columnProps:t}=e,{tableSortName:r,tableSortOrder:o}=di(),{tableEmit:i}=ze(),a=c.computed(()=>t.sortName||t.prop);function n(){return a.value}e.getColumnSortName=n;function s(){return r.value===a.value&&!!a.value}e.isCurrentSort=s;function l(d){if(a.value&&!(r.value===a.value&&o.value===d)){if(!d){i("sort-change",void 0);return}i("sort-change",{sortName:a.value,sortOrder:d})}}e.changeSortOrder=l;const p=["ascending","descending",void 0];function u(){if(!o.value)return p[0];if(r.value!==a.value)return o.value;const d=p.indexOf(o.value);return p[d+1>p.length?0:d+1]}e.toggleSortOrder=u},dz=e=>{const t=c.ref({});function r(){return e.hasSlots("default")}function o(s){return r()?e.columnProps.showExpand?e.columnProps.showExpand(s):!0:!1}function i(s){const l=!t.value[s];t.value=X(V({},t.value),{[s]:l})}function a(s){var l;return(l=t.value[s])!=null?l:!1}function n(s){delete t.value[s]}return e.hasExpandSlot=r,e.canShowExpand=o,e.getExpandVisible=a,e.toggleExpand=i,e.removeExpandRecord=n,{hasExpandSlot:r,getExpandVisible:a,toggleExpand:i}},fz=e=>{const{props:t}=e,{centerColumnListInstance:r,leftColumnListInstance:o,rightColumnListInstance:i,originalColumnListInstance:a}=ze(),{getModelValue:n,updateModelValue:s}=fe(t),l={columnId:Wt(8),columnProps:t,getModelValue:n,updateModelValue:s};pz(l),sz(l),cz(l),uz(l);const{getHeaderSlotData:p,getCellSlotData:u}=lz(l);dz(l);const{childrenColumnList:d,isChildrenColmn:m}=nz(l);return c.onMounted(()=>{if(m||a.addColumn(l),d.value.length===0)switch(t.fixed){case"left":o.addColumn(l);break;case"right":i.addColumn(l);break;default:r.addColumn(l);break}}),c.onBeforeUnmount(()=>{if(d.value.length===0)switch(t.fixed){case"left":o.removeColumn(l);break;case"right":i.removeColumn(l);break;default:r.removeColumn(l);break}}),{getHeaderSlotData:p,getCellSlotData:u}},mz=c.defineComponent({__name:"table-column",props:JA(),emits:NA(),setup(e){const t=e,{getCellSlotData:r,getHeaderSlotData:o}=fz({props:t});return{__sfc:!0,props:t,getCellSlotData:r,getHeaderSlotData:o}}});var hz=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"pwc-table-column"},[e._e(),e._e(),e._t("column")],2)},gz=[],vz=$(mz,hz,gz);const wz=vz.exports;N("PwcTable",az),N("PwcTableColumn",wz);const bz=["line","rounded","text"],_z=()=>({[g.modelValueKey]:g.oneOfType([String,Number,Symbol]),type:g.oneOf(bz).def("line"),expand:g.bool.def(!1),lazyLoad:g.bool.def(!1)}),yz=()=>X(V({},he()),{change:H()}),xz=()=>({name:g.oneOfType([String,Number]),extra:g.looseString,disabled:g.bool.def(!1),title:g.looseString,lazyLoad:g.looseBool}),Ds=Symbol("tabs-inject-key"),Cz=c.defineComponent({__name:"tab-nav",setup(e){const{tabPanes:t,tabsProps:r,setCurrentTab:o}=c.inject(Ds),{$t:i}=ie(),a=c.ref(),n=c.ref(!1),{visible:s,toggle:l}=Ot();function p(){return Z(this,null,function*(){if(yield c.nextTick(),!a.value||pe)return;const d=a.value.querySelector(".pwc-tab-nav__item");if(!d)return;const m=d.clientHeight;a.value.clientHeight>=m*1.5||a.value.scrollWidth>a.value.clientWidth?n.value=!0:n.value=!1})}c.watch(()=>t.value.length,()=>{p()},{immediate:!0});function u(d){d.paneProps.disabled||o(d.getPaneName())}return{__sfc:!0,tabPanes:t,tabsProps:r,setCurrentTab:o,$t:i,listRef:a,isMoreItem:n,isExpanded:s,toggle:l,computeIsMoreItem:p,onClickItem:u,PwcIconDown:$o,PwcIconUp:mp,renderSlot:It}}});var Sz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"pwc-tab-nav",class:[`is-type-${r.tabsProps.type}`]},[t("div",{ref:"listRef",staticClass:"pwc-tab-nav__list",class:{"is-hide":r.tabsProps.expand&&!r.isExpanded}},e._l(r.tabPanes,function(o){return t("div",{key:o.paneId,staticClass:"pwc-tab-nav__item",class:{"is-active":o.getIsActive(),"is-disabled":o.paneProps.disabled},on:{click:function(i){return r.onClickItem(o)}}},[o.hasSlot("title")?t(r.renderSlot,{staticClass:"pwc-tab-nav__item__title",attrs:{"slot-func":o.getTitleRenderSlot}}):t("span",[e._v(e._s(o.paneProps.title))]),o.hasSlot("extra")?t(r.renderSlot,{staticClass:"pwc-tab-nav__item__extra",attrs:{"slot-func":o.getExtraRenderSlot}}):e._e(),o.paneProps.extra?t("span",{staticClass:"pwc-tab-nav__item__extra"},[e._v(" "+e._s(o.paneProps.extra)+" ")]):e._e()],1)}),0),t("div",{staticClass:"pwc-tab-nav__right"},[r.tabsProps.expand&&r.isMoreItem?t("div",{staticClass:"pwc-tab-nav__expand",on:{click:r.toggle}},[t("span",[e._v(e._s(r.isExpanded?r.$t("tabs.collapse"):r.$t("tabs.more")))]),r.isExpanded?t(r.PwcIconUp):t(r.PwcIconDown)],1):e._e()])])},kz=[],Lz=$(Cz,Sz,kz);const Pz=Lz.exports,Tz=c.defineComponent({__name:"tabs",props:_z(),emits:yz(),setup(e,{emit:t}){const r=e,o=c.ref(),i=c.ref(),{modelValue:a,updateModelValue:n}=fe(r,{outSideUpdate:w=>{o.value=w}}),s=c.ref([]);function l(w){if(!s.value.includes(w)){if(typeof o.value>"u")if(typeof a.value>"u"){const h=w.getPaneName();u(h,!1)}else u(a.value,!1);s.value.push(w)}}function p(w){s.value=s.value.filter(h=>h!==w)}function u(w,h=!0){o.value!==w&&(o.value=w,n(w),h&&t("change",w))}const d=c.ref(0);function m(){return Z(this,null,function*(){var b;yield c.nextTick();const w=((b=i.value)==null?void 0:b.querySelectorAll("[data-pane-name]"))||[];let h=0;for(let v=0;v<w.length;v++)if(w[v].getAttribute("data-is-active")==="true"){h=v*100;break}d.value=h})}c.watch(()=>o.value,()=>{m()});const f={tabsProps:r,currentTab:o,tabPanes:s,setCurrentTab:u,addTabPane:l,removeTabPane:p};return c.provide(Ds,f),{__sfc:!0,props:r,emits:t,currentTab:o,tabsRef:i,modelValue:a,updateModelValue:n,tabPanes:s,addTabPane:l,removeTabPane:p,setCurrentTab:u,offsetPercent:d,getTabsOffset:m,injectData:f,TabNav:Pz}}});var Ez=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"tabsRef",staticClass:"pwc-tabs"},[t(r.TabNav),t("div",{staticClass:"pwc-tabs__content"},[t("div",{staticClass:"pwc-tabs__list",style:{marginLeft:`-${r.offsetPercent}%`}},[e._t("default")],2)])],1)},Qz=[],Iz=$(Tz,Ez,Qz);const Mz=Iz.exports,Az=c.defineComponent({__name:"tab-pane",props:xz(),setup(e){const t=e,r=Wt(8),o=c.inject(Ds),{hasSlot:i,slotRender:a}=Te(),n=c.computed(()=>t.name||r),s=c.computed(()=>o.currentTab.value===n.value);function l(){return a("title",{isActive:s.value})}const p=c.computed(()=>{var f;return(f=t.lazyLoad)!=null?f:o.tabsProps.lazyLoad}),u=c.ref(!1);c.watch(s,()=>{s.value&&(u.value=!0)});const d=c.computed(()=>p.value?u.value:!0),m={paneId:r,paneProps:t,getPaneName:()=>n.value,getIsActive:()=>s.value,hasSlot:i,getTitleRenderSlot:l,getExtraRenderSlot:()=>a("extra")};return c.onBeforeMount(()=>{o.addTabPane(m)}),{__sfc:!0,props:t,paneId:r,tabsInject:o,hasSlot:i,slotRender:a,tabPaneName:n,isActive:s,getTitleRenderSlot:l,isLazyLoad:p,isFirstRender:u,canRender:d,tabPaneInstance:m}}});var zz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"pwc-tab-pane",class:{"is-active":r.isActive},attrs:{"data-pane-name":r.tabPaneName,"data-is-active":r.isActive}},[r.canRender?t("div",{staticClass:"pwc-tab-pane__content"},[e._t("default")],2):e._e()])},Dz=[],Oz=$(Az,zz,Dz);const Rz=Oz.exports;N("PwcTabs",Mz),N("PwcTabPane",Rz);const Vz={vote:{option:"Voting Options",rule:"Rules",ruleTitle:"Rule Description",success:"Vote successful",voted:"You have already voted",voteFailed:"Vote failed",voteLimit:"Vote limit reached",count:"votes",entrance:"Vote",listTitle:"Vote Activity",noRule:"No rules",status:{voting:"Voting",ended:"Ended"},button:{vote:"Vote",voted:"Voted",notVoted:"Not Voted"}}},Bz={vote:{option:"投票オプション",rule:"ルール",ruleTitle:"ルール説明",success:"投票成功",voted:"すでに投票済みです",voteFailed:"投票失敗",voteLimit:"投票回数が上限に達しました",count:"票",entrance:"投票",listTitle:"投票活動",noRule:"ルールなし",status:{voting:"投票中",ended:"終了"},button:{vote:"投票",voted:"投票済み",notVoted:"未投票"}}},$z={vote:{option:"투표 옵션",rule:"규칙",ruleTitle:"규칙 설명",success:"투표 성공",voted:"이미 투표했습니다",voteFailed:"투표 실패",voteLimit:"투표 횟수가 소진되었습니다",count:"표",entrance:"투표",listTitle:"투표 활동",noRule:"규칙 없음",status:{voting:"투표 중",ended:"종료"},button:{vote:"투표",voted:"투표함",notVoted:"미투표"}}},Fz={vote:{option:"Варианты голосования",rule:"Правила",ruleTitle:"Описание правил",success:"Голосование успешно",voted:"Вы уже проголосовали",voteFailed:"Голосование не удалось",voteLimit:"Лимит голосований исчерпан",count:"голосов",entrance:"Голосование",listTitle:"Активность голосования",noRule:"Нет правил",status:{voting:"Голосование",ended:"Завершено"},button:{vote:"Голосовать",voted:"Проголосовано",notVoted:"Не проголосовано"}}},jz={vote:{option:"投票选项",rule:"规则",ruleTitle:"规则说明",success:"投票成功",voted:"你之前已经投过票",voteFailed:"投票失败",voteLimit:"投票次数已用完",count:"票",entrance:"投票",listTitle:"投票活动",noRule:"暂无规则",status:{voting:"投票中",ended:"已结束"},button:{vote:"投票",voted:"已投票",notVoted:"未投票"}}},Uz={vote:{option:"投票選項",rule:"規則",ruleTitle:"規則說明",success:"投票成功",voted:"你之前已經投過票",voteFailed:"投票失敗",voteLimit:"投票次數已用完",count:"票",entrance:"投票",listTitle:"投票活動",noRule:"暫無規則",status:{voting:"投票中",ended:"已結束"},button:{vote:"投票",voted:"已投票",notVoted:"未投票"}}},{useI18n:jt}=kp({zh_CN:jz,zh_TW:Uz,en:Vz,ja:Bz,ko:$z,ru:Fz}),Wz=()=>({status:g.oneOf(["Y","N"]).def("Y"),isVoted:g.bool.isRequired,disabled:g.bool.def(!1),hasVoteList:g.bool.def(!1)}),Hz=()=>({click:H()}),Zz=e=>{const{props:t,emit:r}=e,{$t:o}=jt(),i=c.computed(()=>t.isVoted?"voted":t.status==="N"?"not-voted":t.disabled?"disabled":"vote"),a={vote:o("vote.button.vote"),voted:o("vote.button.voted"),"not-voted":o("vote.button.notVoted"),disabled:o("vote.button.vote")},n=c.computed(()=>a[i.value]);function s(){i.value==="vote"&&r("click")}return{buttonType:i,buttonText:n,handleClick:s}},Yz=c.defineComponent({__name:"vote-button",props:Wz(),emits:Hz(),setup(e,{emit:t}){const r=e,{buttonType:o,buttonText:i,handleClick:a}=Zz({props:r,emit:t});return{__sfc:!0,props:r,emit:t,buttonType:o,buttonText:i,handleClick:a,PwcButton:rt}}});function lr(e,t,r,o,i,a,n,s){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),a&&(l._scopeId="data-v-"+a),{exports:e,options:l}}var qz=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-button",class:{"plv-iar-vote-button--no-pointer":o.props.hasVoteList}},[o.buttonType==="vote"?r(o.PwcButton,{staticClass:"plv-iar-vote-button__btn",attrs:{size:"mini",disabled:o.props.disabled},on:{click:o.handleClick}},[t._v(" "+t._s(o.buttonText)+" ")]):o.buttonType==="not-voted"||o.buttonType==="disabled"?r(o.PwcButton,{staticClass:"plv-iar-vote-button__btn",attrs:{size:"mini",disabled:""}},[t._v(" "+t._s(o.buttonText)+" ")]):r(o.PwcButton,{staticClass:"plv-iar-vote-button__text",attrs:{size:"mini",disabled:o.props.status==="N"||o.props.disabled}},[t._v(" "+t._s(o.buttonText)+" ")])],1)},Gz=[],Xz=lr(Yz,qz,Gz,!1,null,"6ba928d5");const Ld=Xz.exports,Kz=()=>({status:g.oneOf(["Y","N"]).def("Y")}),Jz=()=>({}),Nz=e=>{const{props:t}=e,{$t:r}=jt();return{statusText:c.computed(()=>t.status==="Y"?r("vote.status.voting"):r("vote.status.ended"))}},eD=c.defineComponent({__name:"vote-status",props:Kz(),emits:Jz(),setup(e,{emit:t}){const r=e,{statusText:o}=Nz({props:r});return{__sfc:!0,props:r,emit:t,statusText:o}}});var tD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-status",class:{"plv-iar-vote-status--voting":t.status==="Y","plv-iar-vote-status--ended":t.status==="N"}},[t._v(" "+t._s(o.statusText)+" ")])},rD=[],oD=lr(eD,tD,rD,!1,null,"c99114e4");const Pd=oD.exports,Td=()=>({voteData:g.object().isRequired,votedList:g.array().def([]),layout:g.oneOf(["single","double"]).def("single"),clickable:g.bool.def(!0),hasVoteList:g.bool.def(!1)}),Ed=()=>({"to-vote":H()}),Qd=e=>{const{props:t,emit:r,itemRef:o}=e,i=c.ref({gridRowEnd:"auto"}),a=c.computed(()=>t.votedList.includes(t.voteData.id)),n=c.computed(()=>!t.clickable);function s(){n.value||r("to-vote",t.voteData.id)}return{isVoted:a,isDisabled:n,gridRowEndStyle:i,handleVote:s}},iD=c.defineComponent({__name:"vote-item-single",props:Td(),emits:Ed(),setup(e,{emit:t}){const r=e,{$t:o}=jt(),{isVoted:i,isDisabled:a,handleVote:n}=Qd({props:r,emit:t});return{__sfc:!0,$t:o,props:r,emit:t,isVoted:i,isDisabled:a,handleVote:n,VoteButton:Ld,VoteStatus:Pd}}});var aD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-list-item plv-iar-vote-list-item-layout-single",class:{"plv-iar-vote-list-item-image":!!t.voteData.voteCoverImage,"plv-iar-vote-list-item-no-image":!t.voteData.voteCoverImage}},[t.voteData.voteCoverImage?[r("div",{staticClass:"plv-iar-vote-list-item-bg"},[r("div",{staticClass:"plv-iar-vote-list-item-bg-image",style:{backgroundImage:`url(${t.voteData.voteCoverImage})`}}),r("div",{staticClass:"plv-iar-vote-list-item-bg-mask"})])]:t._e(),r("div",{staticClass:"plv-iar-vote-list-item-content"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-content-info-left-top-item",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-content-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1),r("div",{staticClass:"plv-iar-vote-list-item-content-info-name"},[t._v(t._s(t.voteData.name))])]),r(o.VoteButton,{attrs:{status:t.voteData.status,"is-voted":o.isVoted,disabled:o.isDisabled,"has-vote-list":o.props.hasVoteList},on:{click:o.handleVote}})],1)],2)},nD=[],sD=lr(iD,aD,nD,!1,null,"d0e638ec");const lD=sD.exports,cD=c.defineComponent({__name:"vote-item-double",props:Td(),emits:Ed(),setup(e,{expose:t,emit:r}){const o=e,{$t:i}=jt(),a=c.ref(),{isVoted:n,isDisabled:s,gridRowEndStyle:l,handleVote:p}=Qd({props:o,emit:r,itemRef:a});let u=null;const d=12;function m(h=d){if(!a.value)return;const b=a.value.offsetHeight;if(b>0){const v=Math.ceil(b/h);l.value={gridRowEnd:`span ${v}`}}}function f(){a.value&&(u&&(u.disconnect(),u=null),u=new dl(()=>{m(d)}),u.observe(a.value),m(d))}function w(){u&&(u.disconnect(),u=null)}return c.watch(a,h=>{w(),h&&f()},{immediate:!0}),c.onBeforeUnmount(()=>{w()}),t({calculateGridRowEnd:m,itemRef:a}),{__sfc:!0,$t:i,props:o,emit:r,itemRef:a,isVoted:n,isDisabled:s,gridRowEndStyle:l,handleVote:p,resizeObserver:u,GAP:d,calculateGridRowEnd:m,setupResizeObserver:f,cleanupResizeObserver:w,VoteButton:Ld,VoteStatus:Pd}}});var pD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{ref:"itemRef",staticClass:"plv-iar-vote-list-item plv-iar-vote-list-item-layout-double",style:o.gridRowEndStyle},[r("div",{staticClass:"plv-iar-vote-list-item-content-container"},[t.voteData.voteCoverImage?[r("div",{staticClass:"plv-iar-vote-list-item-image",style:{backgroundImage:`url(${t.voteData.voteCoverImage})`}},[r("div",{staticClass:"plv-iar-vote-list-item-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-image-status",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1)])]:t._e(),r("div",{staticClass:"plv-iar-vote-list-item-content"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info"},[t.voteData.voteCoverImage?t._e():r("div",{staticClass:"plv-iar-vote-list-item-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-info-left-top-item",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1),r("div",{staticClass:"plv-iar-vote-list-item-content-info-name"},[t._v(t._s(t.voteData.name))])]),r(o.VoteButton,{attrs:{status:t.voteData.status,"is-voted":o.isVoted,disabled:o.isDisabled,"has-vote-list":o.props.hasVoteList},on:{click:o.handleVote}})],1)],2)])},uD=[],dD=lr(cD,pD,uD,!1,null,"214a02c3");const fD=dD.exports,fi={OpenVote:"OpenVote",OpenVoteRule:"OpenVoteRule"};function mD(e){const{state:t,onShow:r,onGetVoteList:o}=e,{list:i,curVotedList:a,cacheVotedList:n,voteCount:s,isForceHideResult:l,isForceShowResult:p,findVoteById:u}=t;function d(y){a.value=y.curVotedList}function m(y){const _=y.voteData.id,C=u(_)[0];C!==-1&&i.value.splice(C,1);const x=a.value.findIndex(E=>E===_);x!==-1&&a.value.splice(x,1);const S=n.value.findIndex(E=>E===_);S!==-1&&n.value.splice(S,1);const L=y.voteData.voteOrder||0;let k=i.value.length;for(let E=0;E<i.value.length;E++)if((i.value[E].voteOrder||0)>=L){k=E;break}p.value&&(y.voteData.showVoteCount=!0,y.voteData.voteCount=0),i.value.splice(k,0,y.voteData),r()}function f(y){const _=u(y.id)[1];_&&(_.status="N")}function w(y){s.value=y.voteCount,y.list.forEach(_=>{const C=u(_.id)[1];C&&(C.showVoteCount=!l.value,C.voteCount=_.times)})}function h(){i.value.splice(0,i.value.length)}function b(y){const _=u(y.id)[0];_!==-1&&i.value.splice(_,1)}function v(y){const _=Math.floor(Math.random()*3e3);setTimeout(()=>{o()},_)}return{updateVotedList:d,onVoteStart:m,onVoteStop:f,onVoteResult:w,onVoteDeleteAll:h,onVoteDelete:b,onVoteChangeOrder:v}}function hD(e){const{voteTarget:t,state:r,onShowEntrance:o}=e,{list:i,curVotedList:a,cacheVotedList:n,isVotedWithLimit:s,voteCount:l,isForceHideResult:p,findVoteById:u}=r,{toast:d}=Dt(),{$t:m}=jt(),{trackEvent:f}=CI((t==null?void 0:t.interactionCore)||{});function w(){return Z(this,null,function*(){t&&(a.value=t.getVotedList())})}function h(){return Z(this,null,function*(){if(!t)return;const C=yield t.getVoteList();if(C&&C.code===200&&C.data){i.value=C.data.list,i.value.length>0&&o(!0);const x=t.getCachedVoteResult();x&&x.forEach(S=>{const L=u(S.id)[1];L&&(L.showVoteCount=!p.value,L.voteCount=S.times)})}})}const b=un(h,1e3);function v(C){return Z(this,null,function*(){if(t&&n.value.indexOf(C)===-1){n.value.push(C);const x=yield t.toVote(C);if(x.code===200)t.pushVotedList(C),d.success(m("vote.success"));else if(x.code===506)d.info(m("vote.voted")),t.pushVotedList(C);else{x.code===501?(s.value=!0,d.error(m("vote.voteLimit"))):d.error(x.message||m("vote.voteFailed"));const S=n.value.indexOf(C);S!==-1&&n.value.splice(S,1)}y()}})}function y(){t&&f({event_id:"click_vote_widget",event_type:"click",spec_attrs:{timestamp:Date.now()}})}function _(){t&&t.interactionCore.getSocket().then(C=>{C&&C.on("connect",()=>{b()})})}return{getVotedList:w,getVoteList:b,toVote:v,setupSocketListener:_}}function gD(e){const{resultShowType:t}=e,r=c.ref([]),o=c.ref([]),i=c.ref([]),a=c.ref(!1),n=c.ref(0),s=c.computed(()=>o.value.length),l=c.computed(()=>t===3&&n.value===0&&i.value.length===0),p=c.computed(()=>t===2||t===3&&(n.value>0||o.value.length>0));function u(d){const m=r.value.findIndex(f=>f.id===d);return[m,r.value[m]]}return{list:r,curVotedList:o,cacheVotedList:i,isVotedWithLimit:a,voteCount:n,isForceHideResult:l,isForceShowResult:p,votedCount:s,findVoteById:u}}const vD=()=>({voteTarget:g.object(),layout:g.oneOf(["single","double"]).def("single"),voteList:g.array(),maxVote:g.number.def(0),showHeader:g.bool.def(!0),showRule:g.bool.def(!0),resultShowType:g.number.def(0)}),wD=()=>({"to-show":()=>!0,"to-hide":()=>!0,"show-entrance":H()}),bD=e=>{var v,y,_,C,x,S,L;const{props:t,emit:r}=e,{getEmitter:o}=Xt(),{voteTarget:i={}}=t,a=gD({resultShowType:t.resultShowType}),n=hD({voteTarget:i,state:a,onShowEntrance:k=>r("show-entrance",k)}),{updateVotedList:s,onVoteStart:l,onVoteStop:p,onVoteResult:u,onVoteDeleteAll:d,onVoteDelete:m,onVoteChangeOrder:f}=mD({state:a,onShow:()=>r("to-show"),onGetVoteList:()=>n.getVoteList()});function w(){o().emit(fi.OpenVoteRule)}function h(k){if(a.curVotedList.value.indexOf(k)!==-1||a.isVotedWithLimit.value)return!1;const P=Number(t.maxVote)||0;return P>0?a.votedCount.value<P:!0}function b(){t.voteList&&t.voteList.length>0||(n.setupSocketListener(),n.getVoteList(),n.getVotedList())}return SI(i.eventEmitter,{[(v=i.VoteEvent)==null?void 0:v.UpdateVotedList]:s,[(y=i.VoteEvent)==null?void 0:y.Start]:l,[(_=i.VoteEvent)==null?void 0:_.Stop]:p,[(C=i.VoteEvent)==null?void 0:C.VoteResult]:u,[(x=i.VoteEvent)==null?void 0:x.DeleteAll]:d,[(S=i.VoteEvent)==null?void 0:S.Delete]:m,[(L=i.VoteEvent)==null?void 0:L.UpdateVoteOrder]:f}),c.onMounted(()=>{t.voteTarget&&b()}),c.watch(()=>t.voteTarget,k=>{k&&b()},{immediate:!0}),c.watch(()=>t.voteList,k=>{k!=null&&(a.list.value=[...k])},{immediate:!0,deep:!0}),{list:a.list,curVotedList:a.curVotedList,handleToVote:n.toVote,handleRule:w,isItemClickable:h}},_D=c.defineComponent({__name:"vote-list",props:vD(),emits:wD(),setup(e,{emit:t}){const r=e,{$t:o}=jt(),{list:i,curVotedList:a,handleToVote:n,handleRule:s,isItemClickable:l}=bD({props:r,emit:t});return{__sfc:!0,$t:o,props:r,emit:t,list:i,curVotedList:a,handleToVote:n,handleRule:s,isItemClickable:l,PwcEmpty:qi,VoteItemSingle:lD,VoteItemDouble:fD}}});var yD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote"},[o.list.length?r("div",{staticClass:"plv-iar-vote__container"},[t.showHeader?r("div",{staticClass:"plv-iar-vote__container__header"},[r("span",[t._v(t._s(o.$t("vote.option")))]),o.props.showRule?r("span",{class:{"plv-iar-vote__container__header__rule--no-pointer":o.props.voteList&&o.props.voteList.length>0},on:{click:o.handleRule}},[t._v(t._s(o.$t("vote.rule")))]):t._e()]):t._e(),r("div",{staticClass:"plv-iar-vote__list",class:{"plv-iar-vote__list--single":t.layout==="single","plv-iar-vote__list--double":t.layout==="double"}},t._l(o.list,function(i){return r(t.layout==="single"?o.VoteItemSingle:o.VoteItemDouble,{key:i.id,tag:"component",attrs:{"vote-data":i,"voted-list":o.curVotedList,clickable:o.isItemClickable(i.id),"has-vote-list":!!(o.props.voteList&&o.props.voteList.length>0)},on:{"to-vote":o.handleToVote}})}),1)]):r("div",{staticClass:"plv-iar-vote__no-data"},[r(o.PwcEmpty)],1)])},xD=[],CD=lr(_D,yD,xD,!1,null,null);const Id=CD.exports,SD="data:image/png;base64,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",kD=()=>({voteTarget:g.object(),isFullScreen:g.bool.def(!1),iconUrl:g.string.def(""),beforeClickInterrupt:g.func()}),LD=()=>({"open-vote":H()}),PD=e=>{const{props:t}=e,{getEmitter:r}=Xt();function o(){return Z(this,null,function*(){t.beforeClickInterrupt&&Ka(t.beforeClickInterrupt)&&(yield t.beforeClickInterrupt())||r().emit(fi.OpenVote)})}return{pendantIconUrl:c.computed(()=>t.iconUrl||SD),onClickPendant:o}},TD=c.defineComponent({__name:"vote-pendant",props:kD(),emits:LD(),setup(e,{emit:t}){const r=e,{$t:o}=jt(),{onClickPendant:i,pendantIconUrl:a}=PD({props:r}),n=c.computed(()=>({backgroundImage:`url(${a.value})`}));return{__sfc:!0,props:r,emit:t,$t:o,onClickPendant:i,pendantIconUrl:a,pendantStyle:n}}});var ED=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return t.voteTarget&&!t.isFullScreen?r("div",{staticClass:"plv-iar-vote-pendant",style:o.pendantStyle,on:{click:o.onClickPendant}},[r("div",{staticClass:"plv-iar-vote-pendant__text"},[t._v(" "+t._s(o.$t("vote.entrance"))+" ")])]):t._e()},QD=[],ID=lr(TD,ED,QD,!1,null,null);const MD=ID.exports,AD=()=>({voteTarget:g.object(),popupConfig:g.object(),layout:g.oneOf(["single","double"]).def("single"),maxVote:g.number.def(0),showRule:g.bool.def(!0),resultShowType:g.number.def(0)}),zD=e=>{const{voteListRef:t}=e,r=c.ref(!1),o=c.ref(),{getEmitter:i}=Xt();function a(){r.value=!0,c.nextTick(()=>{o.value&&o.value.resetScroll()})}c.watch(r,p=>{p&&c.nextTick(()=>{var u;(u=t==null?void 0:t.value)!=null&&u.recalculateGridRowEnds&&t.value.recalculateGridRowEnds()})});function n(){r.value=!1}function s(){i().emit(fi.OpenVoteRule)}return Kt(fi.OpenVote,a),{instance:{open:a,close:n},visible:r,popupRef:o,handleToRule:s}},DD=c.defineComponent({__name:"vote-list-popup",props:AD(),setup(e,{expose:t}){const r=e,{$t:o}=jt(),i=c.ref(),{instance:a,visible:n,popupRef:s,handleToRule:l}=zD({voteListRef:i});return t(a),{__sfc:!0,props:r,$t:o,voteListRef:i,instance:a,visible:n,popupRef:s,handleToRule:l,PwcPopup:ut,VoteListComponent:Id}}});var OD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r(o.PwcPopup,{ref:"popupRef",staticClass:"plv-iar-vote-list-popup",attrs:{title:o.$t("vote.listTitle"),"popup-config":t.popupConfig,closeable:!1,"body-height-percent":.65,background:"#F7F8Fa"},scopedSlots:t._u([{key:"header-right",fn:function(){return[t.showRule?r("span",{staticClass:"plv-iar-vote-list-popup__rule",on:{click:o.handleToRule}},[t._v(" "+t._s(o.$t("vote.rule"))+" ")]):t._e()]},proxy:!0}]),model:{value:o.visible,callback:function(i){o.visible=i},expression:"visible"}},[r("div",{staticClass:"plv-iar-vote-list-popup__content"},[r(o.VoteListComponent,{ref:"voteListRef",attrs:{"vote-target":t.voteTarget,layout:t.layout,"max-vote":t.maxVote,"show-header":!1,"show-rule":t.showRule,"result-show-type":t.resultShowType},on:{"to-rule":o.handleToRule}})],1)])},RD=[],VD=lr(DD,OD,RD,!1,null,null);const BD=VD.exports,$D=()=>({ruleText:g.string.def(""),popupConfig:g.object()}),FD=e=>{const t=c.ref(!1),r=c.ref();function o(){t.value=!0,c.nextTick(()=>{r.value&&r.value.resetScroll()})}function i(){t.value=!1}return Kt(fi.OpenVoteRule,o),{instance:{open:o,close:i},visible:t,popupRef:r,close:i}},jD=c.defineComponent({__name:"vote-rule-popup",props:$D(),setup(e,{expose:t}){const r=e,{$t:o}=jt(),{isMobile:i}=Ce(),{instance:a,visible:n,popupRef:s}=FD();return t(a),{__sfc:!0,props:r,$t:o,isMobile:i,instance:a,visible:n,popupRef:s,PwcPopup:ut}}});var UD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r(o.PwcPopup,{ref:"popupRef",staticClass:"plv-iar-vote-rule-popup",attrs:{title:o.$t("vote.ruleTitle"),"popup-config":t.popupConfig,backable:o.isMobile,background:o.isMobile?"#F7F8Fa":void 0,"body-height-percent":o.isMobile?.65:void 0},model:{value:o.visible,callback:function(i){o.visible=i},expression:"visible"}},[r("div",{staticClass:"plv-iar-vote-rule-popup__content"},[t.ruleText?r("div",{staticClass:"plv-iar-vote-rule-popup__text",domProps:{innerHTML:t._s(t.ruleText)}}):r("div",{staticClass:"plv-iar-vote-rule-popup__empty"},[t._v(" "+t._s(o.$t("vote.noRule"))+" ")])])])},WD=[],HD=lr(jD,UD,WD,!1,null,null);const ZD=HD.exports;ce.VoteList=Id,ce.VoteListPopup=BD,ce.VotePendant=MD,ce.VoteRulePopup=ZD,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});console.log("%c@polyv/iar-vote-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[version: 2.1.0-rc-20260312.1]","[buildTime: 2026-03-11 10:13:10]");
|
|
1007
|
+
}`}],staticClass:"pwc-table-body-cell__content"},[e._v(" "+e._s(r.cellText)+" ")])],2)},VM=[],BM=$(OM,RM,VM);const $M=BM.exports,FM=e=>{const{rowIndex:t,rowData:r,renderRowKey:o}=e,{tableProps:i,allColumnList:a}=ze(),{hoverStatus:n}=di(),s=c.computed(()=>a.value.find(u=>u.columnProps.type==="expand")),l=c.computed(()=>{const u=[];if(i.rowClassName){const d=_d(i.rowClassName,{rowIndex:t.value,rowData:r.value});u.push(...d)}return i.hoverRow&&n.value.rowIndex===t.value&&u.push("is-hover-row"),s.value&&s.value.getExpandVisible(o.value)&&u.push("is-expanded-row"),u}),p=c.computed(()=>{const u={};if(i.rowStyle){const d=yd(i.rowStyle,{rowIndex:t.value,rowData:r.value});Object.assign(u,d)}return u});return{rowClass:l,rowStyle:p}},jM=c.defineComponent({__name:"table-body-row",props:gd(),setup(e){const t=e,{leftColumnListInstance:r,centerColumnListInstance:o,rightColumnListInstance:i}=ze(),{columnList:a}=r,{columnList:n}=o,{columnList:s}=i,l=aM({props:t}),{rowClass:p,rowStyle:u}=FM(l);return{__sfc:!0,props:t,leftColumnListInstance:r,centerColumnListInstance:o,rightColumnListInstance:i,leftColumnList:a,centerColumnList:n,rightColumnList:s,rowResult:l,rowClass:p,rowStyle:u,TableBodyCell:$M}}});var UM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("tr",{staticClass:"pwc-table-row",class:r.rowClass,style:r.rowStyle},[e._l(r.leftColumnList,function(o){return t(r.TableBodyCell,{key:`left-column-${o.columnId}`,attrs:{column:o}})}),e._l(r.centerColumnList,function(o){return t(r.TableBodyCell,{key:`center-column-${o.columnId}`,attrs:{column:o}})}),e._l(r.rightColumnList,function(o){return t(r.TableBodyCell,{key:`right-column-${o.columnId}`,attrs:{column:o}})})],2)},WM=[],HM=$(jM,UM,WM);const ZM=HM.exports,YM=c.defineComponent({__name:"table-body-row-expand",props:gd(),setup(e){const t=e,{allColumnList:r,wrapWidth:o}=ze(),i=c.computed(()=>r.value.find(n=>n.columnProps.type==="expand"));function a(){if(i.value)return i.value.getCellRenderSlot({rowData:t.rowData,rowIndex:t.rowIndex,columnIndex:i.value.getColumnIndex(),cellData:null})}return{__sfc:!0,props:t,allColumnList:r,wrapWidth:o,expandColumn:i,expandColumnRenderSlotFunc:a,renderSlot:It}}});var qM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.expandColumn&&r.expandColumn.canShowExpand({rowData:e.rowData,rowIndex:e.rowIndex})&&r.expandColumn.getExpandVisible(r.props.renderRowKey)?t("tr",{staticClass:"pwc-table-row-expand"},[t("td",{staticClass:"pwc-table-row-expand__cell",attrs:{colspan:r.allColumnList.length}},[t(r.renderSlot,{staticClass:"pwc-table-row-expand__cell__content",style:{width:`${r.wrapWidth}px`},attrs:{"slot-func":r.expandColumnRenderSlotFunc}})],1)]):e._e()},GM=[],XM=$(YM,qM,GM);const KM=XM.exports,JM=c.defineComponent({__name:"table-body",setup(e){const{allColumnWidth:t,tableProps:r,wrapWidth:o}=ze(),{bodyWrapRef:i,bodyRef:a}=ui(),{renderData:n,isEmptyData:s}=ya(),{getRenderRowKey:l}=zs(),p=c.computed(()=>{const u={};return r.height&&(u.height=`${r.height}px`),r.maxHeight&&(u.maxHeight=`${r.maxHeight}px`),u});return{__sfc:!0,allColumnWidth:t,tableProps:r,wrapWidth:o,bodyWrapRef:i,bodyRef:a,renderData:n,isEmptyData:s,getRenderRowKey:l,bodyWrapStyle:p,TableColgroup:hd,TableBodyRow:ZM,TableBodyRowExpand:KM,PwcEmpty:qi}}});var NM=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"bodyWrapRef",staticClass:"pwc-table-body-wrap",style:r.bodyWrapStyle},[r.isEmptyData?t("div",{staticClass:"pwc-table-body__empty",style:{width:`${r.wrapWidth}px`}},[t(r.PwcEmpty,{attrs:{type:"box"}})],1):e._e(),t("table",{ref:"bodyRef",staticClass:"pwc-table-body",style:{width:`${r.allColumnWidth}px`},attrs:{cellpadding:"0",cellspacing:"0",border:"0"}},[t(r.TableColgroup),e._l(r.renderData,function(o,i){return[t(r.TableBodyRow,{attrs:{"render-row-key":r.getRenderRowKey(o,i),"row-data":o,"row-index":i}}),t(r.TableBodyRowExpand,{attrs:{"render-row-key":r.getRenderRowKey(o,i),"row-data":o,"row-index":i}})]})],2)])},eA=[],tA=$(JM,NM,eA);const rA=tA.exports,oA=["multiple","single","index","operation","tags","expand"],iA=["left","right"],aA=["left","center","right"],nA=c.defineComponent({__name:"table-fixed-shadow",props:{position:g.oneOf(aA).isRequired},setup(e){const t=e,{leftColumnListInstance:r,rightColumnListInstance:o}=ze(),{scrollXPosition:i,hasHorizontalScroll:a}=As(),{headerWrapSize:n,bodyWrapSize:s}=ui(),{isEmptyData:l}=ya(),p=c.computed(()=>{if(l.value)return!0;switch(t.position){case"left":return r.columnWidthTotal.value===0||i.value==="start";case"right":return o.columnWidthTotal.value===0||i.value==="end"}return!1}),u=c.computed(()=>{const d={height:`${n.value.height+s.value.height}px`};return t.position==="left"?d.left=`${r.columnWidthTotal.value}px`:d.right=`${o.columnWidthTotal.value}px`,d});return{__sfc:!0,props:t,leftColumnListInstance:r,rightColumnListInstance:o,scrollXPosition:i,hasHorizontalScroll:a,headerWrapSize:n,bodyWrapSize:s,isEmptyData:l,shadowHidden:p,shadowStyle:u}}});var sA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return!r.shadowHidden&&r.hasHorizontalScroll?t("div",{staticClass:"pwc-table-fixed-shadow",class:{"is-left":e.position==="left","is-right":e.position==="right"},style:r.shadowStyle}):e._e()},lA=[],cA=$(nA,sA,lA);const pA=cA.exports,uA=()=>({column:g.object().isRequired}),xd=Symbol("table-header-cell-inject-key"),dA=e=>{const{props:t}=e,r=c.ref();return c.provide(xd,{headerCellRef:r,column:t.column}),{headerCellRef:r,column:t.column}},Cd=()=>c.inject(xd),fA=c.defineComponent({__name:"header-cell-multiple",setup(e){const{renderData:t}=ya(),{column:r}=Cd(),{inModelValue:o,multipleIsDisabled:i,removeModelValue:a,getColumnModelValue:n,deleteRowData:s}=wd(r),l=c.computed(()=>{const d=t.value;for(let m=0;m<d.length;m++){const f=d[m];if(o(f))return!0}return!1}),p=c.computed(()=>{const d=t.value;for(let m=0;m<d.length;m++){const f=d[m];if(!o(f)&&!i(f,m))return!1}return!0});function u(){const d=t.value,m=n();if(p.value)for(let f=0;f<d.length;f++){const w=d[f];o(w)&&!i(w,f)&&s(m,w)}else for(let f=0;f<d.length&&!(m.length>=r.columnProps.multipleMax);f++){const w=d[f];!o(w)&&!i(w,f)&&m.push(w)}r.updateModelValue([...m])}return{__sfc:!0,renderData:t,column:r,inModelValue:o,multipleIsDisabled:i,removeModelValue:a,getColumnModelValue:n,deleteRowData:s,indeterminate:l,isChecked:p,toggleMultiple:u,PwcCheckbox:Ko}}});var mA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.PwcCheckbox,{attrs:{indeterminate:r.indeterminate,checked:r.isChecked},on:{change:r.toggleMultiple}})},hA=[],gA=$(fA,mA,hA);const vA=gA.exports,wA=c.defineComponent({__name:"header-cell-sort",setup(e){const{tableSortOrder:t}=di(),{column:r,headerCellRef:o}=Cd(),i=c.computed(()=>r.isCurrentSort());return ne(o,"click",()=>{const a=r.toggleSortOrder();r.changeSortOrder(a)}),{__sfc:!0,tableSortOrder:t,column:r,headerCellRef:o,isCurrentSort:i}}});var bA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.column.getColumnSortName()?t("div",{staticClass:"pwc-table-header-cell__sort"},[t("div",{staticClass:"pwc-table-header-cell__sort-asc",class:{"is-current":r.isCurrentSort&&r.tableSortOrder==="ascending"},on:{click:function(o){return o.stopPropagation(),r.column.changeSortOrder("ascending")}}}),t("div",{staticClass:"pwc-table-header-cell__sort-desc",class:{"is-current":r.isCurrentSort&&r.tableSortOrder==="descending"},on:{click:function(o){return o.stopPropagation(),r.column.changeSortOrder("descending")}}})]):e._e()},_A=[],yA=$(wA,bA,_A);const xA=yA.exports,CA=e=>{const{column:t}=e,{tableProps:r}=ze();return{headerCellClass:c.computed(()=>{const o=[];switch(t.columnProps.type){case"multiple":o.push("is-multiple-column");break;case"single":o.push("is-single-column");break;case"index":o.push("is-index-column");break;case"operation":o.push("is-operation-column");break}return t.columnProps.sortable&&o.push("is-sortable"),r.highlightSorted&&t.isCurrentSort()&&o.push("is-highlight-sorted"),o})}},SA=c.defineComponent({__name:"table-header-cell",props:uA(),setup(e){const t=e,{$t:r}=ie(),{tableProps:o}=ze(),i=dA({props:t}),{headerCellRef:a}=i,{headerCellClass:n}=CA(i),s=c.computed(()=>{let l="";const p=t.column;return p.columnProps.type==="operation"&&(l=r("table.operation")),p.columnProps.type==="tags"&&(l=r("table.tags")),p.columnProps.type==="index"&&(l=r("table.index")),p.columnProps.type==="single"&&(l=r("table.single")),p.columnProps.title&&(l=p.columnProps.title),l});return{__sfc:!0,props:t,$t:r,tableProps:o,cellResult:i,headerCellRef:a,headerCellClass:n,headerTitle:s,PwcIconQuestionCircleOutline:jo,vTooltip:yt,renderSlot:It,HeaderCellMultiple:vA,HeaderCellSort:xA}}});var kA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("th",{ref:"headerCellRef",staticClass:"pwc-table-header-cell",class:r.headerCellClass,style:X(V({},e.column.getStickyStyle()),{background:r.tableProps.headerBgColor})},[t("div",{staticClass:"pwc-table-header-cell__content"},[e.column.columnProps.type==="multiple"?[t(r.HeaderCellMultiple,{attrs:{column:e.column}})]:e.column.hasSlots("header")?[t(r.renderSlot,{attrs:{"slot-func":e.column.getHeaderRenderSlot}})]:[e._v(" "+e._s(r.headerTitle)+" ")],e.column.columnProps.headerTips?t(r.PwcIconQuestionCircleOutline,{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.column.columnProps.headerTips,expression:"column.columnProps.headerTips"}],staticClass:"pwc-table-header-cell__tips"}):e._e(),e.column.columnProps.sortable?[t(r.HeaderCellSort)]:e._e()],2)])},LA=[],PA=$(SA,kA,LA);const TA=PA.exports,EA=()=>{const{originalColumnListInstance:e}=ze(),t=o=>{const i=[];return o.forEach(a=>{const n=a.getChildrenColumns();i.push(a),n.length>0&&i.push(...t(n))}),i},r=()=>{let o=1;const i=(n,s)=>{s&&(n.level=s.level+1,o<n.level&&(o=n.level));const l=n.getChildrenColumns();if(l.length>0){let p=0;l.forEach(u=>{i(u,n),p+=u.getColSpan()}),n.setColSpan(p)}else n.setColSpan(1)};e.columnList.value.forEach(n=>{n.level=1,i(n,void 0)});const a=[];for(let n=0;n<o;n++)a.push([]);return t(e.columnList.value).forEach(n=>{n.getChildrenColumns().length===0?n.setRowSpan(o-n.level+1):n.setRowSpan(1),a[n.level-1].push(n)}),a};return{headerStructure:c.computed(()=>r())}},QA=c.defineComponent({__name:"table-header",setup(e){const{tableProps:t,allColumnWidth:r}=ze(),{headerWrapRef:o}=ui(),{headerStructure:i}=EA();return{__sfc:!0,tableProps:t,allColumnWidth:r,headerWrapRef:o,headerStructure:i,TableColgroup:hd,TableHeaderCell:TA}}});var IA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"headerWrapRef",staticClass:"pwc-table-header-wrap",class:{"is-sticky":r.tableProps.headerSticky},style:{background:r.tableProps.headerBgColor}},[t("table",{staticClass:"pwc-table-header",style:{width:`${r.allColumnWidth}px`},attrs:{cellpadding:"0",cellspacing:"0",border:"0"}},[t(r.TableColgroup),t("thead",e._l(r.headerStructure,function(o,i){return t("tr",{key:`header-row-${i}`,staticClass:"pwc-table-header__row"},e._l(o,function(a){return t(r.TableHeaderCell,{key:`header-column-${a.columnId}`,attrs:{column:a,rowspan:a.getRowSpan(),colspan:a.getColSpan()}})}),1)}),0)],1)])},MA=[],AA=$(QA,IA,MA);const zA=AA.exports,DA=c.defineComponent({__name:"horizontal-scrollbar",setup(e){const{allColumnWidth:t}=ze(),{horizontalScrollbarRef:r,bodyWrapSize:o}=ui(),{hasHorizontalScroll:i}=As();return{__sfc:!0,allColumnWidth:t,horizontalScrollbarRef:r,bodyWrapSize:o,hasHorizontalScroll:i}}});var OA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.hasHorizontalScroll?t("div",{staticClass:"pwc-table-horizontal-scrollbar"},[t("div",{ref:"horizontalScrollbarRef",staticClass:"pwc-table-horizontal-scrollbar__container",style:{width:`${r.bodyWrapSize.width}px`}},[t("div",{style:{width:`${r.allColumnWidth}px`}})])]):e._e()},RA=[],VA=$(DA,OA,RA);const BA=VA.exports,$A=c.defineComponent({__name:"vertical-scrollbar",setup(e){const{headerWrapSize:t,bodyWrapSize:r,bodySize:o,verticalScrollbarRef:i}=ui(),{tableProps:a}=ze(),{hasVerticalScroll:n}=As(),s=c.computed(()=>({height:`${t.value.height+r.value.height}px`}));return{__sfc:!0,headerWrapSize:t,bodyWrapSize:r,bodySize:o,verticalScrollbarRef:i,tableProps:a,hasVerticalScroll:n,verticalScrollbarStyle:s}}});var FA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return r.hasVerticalScroll?t("div",{staticClass:"pwc-table-vertical-scrollbar",style:r.verticalScrollbarStyle},[t("div",{staticClass:"pwc-table-vertical-scrollbar__header",style:{background:r.tableProps.headerBgColor,height:`${r.headerWrapSize.height}px`}}),t("div",{staticClass:"pwc-table-vertical-scrollbar__body"},[t("div",{ref:"verticalScrollbarRef",staticClass:"pwc-table-vertical-scrollbar__container"},[t("div",{style:{height:`${r.bodySize.height}px`}})])])]):e._e()},jA=[],UA=$($A,FA,jA);const WA=UA.exports,HA=c.defineComponent({__name:"table-pagination",setup(e){const{tableEmit:t,tableProps:r}=ze(),{paginationModelValue:o}=pd(),i=c.computed(()=>{const n={hideOnSinglePage:!0};return typeof r.pagination=="boolean"?n:V(V({},n),r.pagination)});function a(n){t("page-change",n)}return{__sfc:!0,tableEmit:t,tableProps:r,paginationModelValue:o,paginationProps:i,onPaginationChange:a,PwcPagination:Au}}});var ZA=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t(r.PwcPagination,e._b({staticClass:"pwc-table__pagination",on:{change:r.onPaginationChange},model:{value:r.paginationModelValue,callback:function(o){r.paginationModelValue=o},expression:"paginationModelValue"}},"pwc-pagination",r.paginationProps,!1))},YA=[],qA=$(HA,ZA,YA);const GA=qA.exports,XA=()=>({data:g.oneOfType([Object,Array]).def([]),headerHeight:g.number.def(48),headerBgColor:g.looseString,headerSticky:g.bool.def(!1),footerSticky:g.bool.def(!1),footerBgColor:g.looseString,height:g.looseNumber,maxHeight:g.looseNumber,flexHeight:g.bool.def(!1),hoverRow:g.bool.def(!0),hoverColumn:g.bool.def(!1),rowKey:g.oneOfType([String,Function]),rowClassName:g.oneOfType([Function,Array,String]),rowStyle:g.oneOfType([Function,Object]),cellClassName:g.oneOfType([Function,Array,String]),cellStyle:g.oneOfType([Function,Object]),pagination:g.oneOfType([Object,Boolean]).def(!1),sort:g.object(),highlightSorted:g.bool.def(!0),border:g.bool.def(!1)}),KA=()=>({"page-change":H(),"sort-change":H()}),JA=()=>({[g.modelValueKey]:g.any,type:g.oneOf(oA),title:g.looseString,prop:g.looseString,width:g.oneOfType([Number,String]),minWidth:g.oneOfType([Number,String]),fixed:g.oneOf(iA),multipleMax:g.number.def(1/0),multipleDisabled:g.func(),singleDisabled:g.func(),headerTips:g.string,sortable:g.bool.def(!1),sortName:g.looseString,ellipsis:g.bool.def(!1),formatter:g.oneOfType([Object,Function,String]),showExpand:g.func(),emptyText:g.oneOfType([String,Boolean]).def(!1)}),NA=()=>V({},he()),ez=e=>{const{props:t}=e,r=Og();return{footerClass:c.computed(()=>{const o=[];return t.footerSticky&&o.push("is-sticky"),r&&o.push("is-in-popup"),o})}},tz=c.defineComponent({__name:"table",props:XA(),emits:KA(),setup(e,{emit:t}){const r=e,{wrapRef:o,hasHorizontalScroll:i,hasVerticalScroll:a}=eM({props:r,emit:t}),{footerClass:n}=ez({props:r});return{__sfc:!0,props:r,emit:t,wrapRef:o,hasHorizontalScroll:i,hasVerticalScroll:a,footerClass:n,TableBody:rA,TableFixedShadow:pA,TableHeader:zA,HorizontalScrollbar:BA,VerticalScrollbar:WA,TablePagination:GA}}});var rz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"wrapRef",staticClass:"pwc-table",class:{"is-border-table":e.border,"is-flex-height":e.flexHeight,"has-horizontal-scroll":r.hasHorizontalScroll,"has-vertical-scroll":r.hasVerticalScroll}},[t("div",{staticClass:"pwc-table__hidden-column"},[e._t("default")],2),t("div",{staticClass:"pwc-table__content"},[t("div",{staticClass:"pwc-table__inner"},[t(r.TableHeader),t(r.TableBody),t(r.TableFixedShadow,{attrs:{position:"left"}}),t(r.TableFixedShadow,{attrs:{position:"right"}})],1),t(r.HorizontalScrollbar),t(r.VerticalScrollbar)],1),e.pagination?t("div",{staticClass:"pwc-table__footer",class:r.footerClass},[e.pagination?t(r.TablePagination):e._e()],1):e._e()])},oz=[],iz=$(tz,rz,oz);const az=iz.exports,Sd=Symbol("COLUMN_CHILDREN_PROVIDE_KEY");function kd(e){const t=c.ref(e);function r(i){t.value=i}function o(){return t.value}return{target:t,set:r,get:o}}const nz=e=>{const t=c.ref([]);function r(p){t.value.push(p)}e.addChildrenColumn=r;function o(){return t.value}e.getChildrenColumns=o;const{set:i,get:a}=kd(0);e.setColSpan=i,e.getColSpan=a;const{set:n,get:s}=kd(0);e.setRowSpan=n,e.getRowSpan=s,c.provide(Sd,{addChildrenColumn:r,getChildrenColumns:o,level:1,setColSpan:i,getColSpan:a,setRowSpan:n,getRowSpan:s});const l=c.inject(Sd,void 0);return l&&l.addChildrenColumn(e),{childrenColumnList:t,isChildrenColmn:!!l}},sz=e=>{const t=c.ref(-1);function r(i){t.value=i}function o(){return t.value}return e.setColumnIndex=r,e.getColumnIndex=o,{setColumnIndex:r,getColumnIndex:o}},lz=e=>{const t=c.useSlots();function r(s){return!!t[s]}function o(){return{renderWidth:e.getRenderWidth(),columnIndex:e.getColumnIndex()}}function i(){if(t.header)return t.header(o())}function a(s){return s||{rowData:{},rowIndex:-1,columnIndex:-1,cellData:void 0}}function n(s){if(t.default)return t.default(s)}return e.hasSlots=r,e.getHeaderRenderSlot=i,e.getCellRenderSlot=n,{hasSlots:r,getHeaderSlotData:o,getCellSlotData:a}},cz=e=>{const{columnProps:t}=e,{isEmptyData:r}=ya(),o=c.computed(()=>r.value?!1:t.fixed==="left"||t.fixed==="right");function i(){return o.value}const a=c.ref(-1);function n(l){a.value=l}function s(){const l={};if(o.value&&a.value!==-1){switch(t.fixed){case"left":l.left=`${a.value}px`;break;case"right":l.right=`${a.value}px`;break}l.position="sticky",l.zIndex="3"}return l}return e.getStickyStatus=i,e.setStickyPosition=n,e.getStickyStyle=s,{getStickyStatus:i,setStickyPosition:n,getStickyStyle:s}},pz=e=>{const t=c.ref(100);function r(i){t.value=i}function o(){return t.value}return e.setRenderWidth=r,e.getRenderWidth=o,{setRenderWidth:r,getRenderWidth:o}},uz=e=>{const{columnProps:t}=e,{tableSortName:r,tableSortOrder:o}=di(),{tableEmit:i}=ze(),a=c.computed(()=>t.sortName||t.prop);function n(){return a.value}e.getColumnSortName=n;function s(){return r.value===a.value&&!!a.value}e.isCurrentSort=s;function l(d){if(a.value&&!(r.value===a.value&&o.value===d)){if(!d){i("sort-change",void 0);return}i("sort-change",{sortName:a.value,sortOrder:d})}}e.changeSortOrder=l;const p=["ascending","descending",void 0];function u(){if(!o.value)return p[0];if(r.value!==a.value)return o.value;const d=p.indexOf(o.value);return p[d+1>p.length?0:d+1]}e.toggleSortOrder=u},dz=e=>{const t=c.ref({});function r(){return e.hasSlots("default")}function o(s){return r()?e.columnProps.showExpand?e.columnProps.showExpand(s):!0:!1}function i(s){const l=!t.value[s];t.value=X(V({},t.value),{[s]:l})}function a(s){var l;return(l=t.value[s])!=null?l:!1}function n(s){delete t.value[s]}return e.hasExpandSlot=r,e.canShowExpand=o,e.getExpandVisible=a,e.toggleExpand=i,e.removeExpandRecord=n,{hasExpandSlot:r,getExpandVisible:a,toggleExpand:i}},fz=e=>{const{props:t}=e,{centerColumnListInstance:r,leftColumnListInstance:o,rightColumnListInstance:i,originalColumnListInstance:a}=ze(),{getModelValue:n,updateModelValue:s}=fe(t),l={columnId:Wt(8),columnProps:t,getModelValue:n,updateModelValue:s};pz(l),sz(l),cz(l),uz(l);const{getHeaderSlotData:p,getCellSlotData:u}=lz(l);dz(l);const{childrenColumnList:d,isChildrenColmn:m}=nz(l);return c.onMounted(()=>{if(m||a.addColumn(l),d.value.length===0)switch(t.fixed){case"left":o.addColumn(l);break;case"right":i.addColumn(l);break;default:r.addColumn(l);break}}),c.onBeforeUnmount(()=>{if(d.value.length===0)switch(t.fixed){case"left":o.removeColumn(l);break;case"right":i.removeColumn(l);break;default:r.removeColumn(l);break}}),{getHeaderSlotData:p,getCellSlotData:u}},mz=c.defineComponent({__name:"table-column",props:JA(),emits:NA(),setup(e){const t=e,{getCellSlotData:r,getHeaderSlotData:o}=fz({props:t});return{__sfc:!0,props:t,getCellSlotData:r,getHeaderSlotData:o}}});var hz=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"pwc-table-column"},[e._e(),e._e(),e._t("column")],2)},gz=[],vz=$(mz,hz,gz);const wz=vz.exports;N("PwcTable",az),N("PwcTableColumn",wz);const bz=["line","rounded","text"],_z=()=>({[g.modelValueKey]:g.oneOfType([String,Number,Symbol]),type:g.oneOf(bz).def("line"),expand:g.bool.def(!1),lazyLoad:g.bool.def(!1)}),yz=()=>X(V({},he()),{change:H()}),xz=()=>({name:g.oneOfType([String,Number]),extra:g.looseString,disabled:g.bool.def(!1),title:g.looseString,lazyLoad:g.looseBool}),Ds=Symbol("tabs-inject-key"),Cz=c.defineComponent({__name:"tab-nav",setup(e){const{tabPanes:t,tabsProps:r,setCurrentTab:o}=c.inject(Ds),{$t:i}=ie(),a=c.ref(),n=c.ref(!1),{visible:s,toggle:l}=Ot();function p(){return Z(this,null,function*(){if(yield c.nextTick(),!a.value||pe)return;const d=a.value.querySelector(".pwc-tab-nav__item");if(!d)return;const m=d.clientHeight;a.value.clientHeight>=m*1.5||a.value.scrollWidth>a.value.clientWidth?n.value=!0:n.value=!1})}c.watch(()=>t.value.length,()=>{p()},{immediate:!0});function u(d){d.paneProps.disabled||o(d.getPaneName())}return{__sfc:!0,tabPanes:t,tabsProps:r,setCurrentTab:o,$t:i,listRef:a,isMoreItem:n,isExpanded:s,toggle:l,computeIsMoreItem:p,onClickItem:u,PwcIconDown:$o,PwcIconUp:mp,renderSlot:It}}});var Sz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"pwc-tab-nav",class:[`is-type-${r.tabsProps.type}`]},[t("div",{ref:"listRef",staticClass:"pwc-tab-nav__list",class:{"is-hide":r.tabsProps.expand&&!r.isExpanded}},e._l(r.tabPanes,function(o){return t("div",{key:o.paneId,staticClass:"pwc-tab-nav__item",class:{"is-active":o.getIsActive(),"is-disabled":o.paneProps.disabled},on:{click:function(i){return r.onClickItem(o)}}},[o.hasSlot("title")?t(r.renderSlot,{staticClass:"pwc-tab-nav__item__title",attrs:{"slot-func":o.getTitleRenderSlot}}):t("span",[e._v(e._s(o.paneProps.title))]),o.hasSlot("extra")?t(r.renderSlot,{staticClass:"pwc-tab-nav__item__extra",attrs:{"slot-func":o.getExtraRenderSlot}}):e._e(),o.paneProps.extra?t("span",{staticClass:"pwc-tab-nav__item__extra"},[e._v(" "+e._s(o.paneProps.extra)+" ")]):e._e()],1)}),0),t("div",{staticClass:"pwc-tab-nav__right"},[r.tabsProps.expand&&r.isMoreItem?t("div",{staticClass:"pwc-tab-nav__expand",on:{click:r.toggle}},[t("span",[e._v(e._s(r.isExpanded?r.$t("tabs.collapse"):r.$t("tabs.more")))]),r.isExpanded?t(r.PwcIconUp):t(r.PwcIconDown)],1):e._e()])])},kz=[],Lz=$(Cz,Sz,kz);const Pz=Lz.exports,Tz=c.defineComponent({__name:"tabs",props:_z(),emits:yz(),setup(e,{emit:t}){const r=e,o=c.ref(),i=c.ref(),{modelValue:a,updateModelValue:n}=fe(r,{outSideUpdate:w=>{o.value=w}}),s=c.ref([]);function l(w){if(!s.value.includes(w)){if(typeof o.value>"u")if(typeof a.value>"u"){const h=w.getPaneName();u(h,!1)}else u(a.value,!1);s.value.push(w)}}function p(w){s.value=s.value.filter(h=>h!==w)}function u(w,h=!0){o.value!==w&&(o.value=w,n(w),h&&t("change",w))}const d=c.ref(0);function m(){return Z(this,null,function*(){var b;yield c.nextTick();const w=((b=i.value)==null?void 0:b.querySelectorAll("[data-pane-name]"))||[];let h=0;for(let v=0;v<w.length;v++)if(w[v].getAttribute("data-is-active")==="true"){h=v*100;break}d.value=h})}c.watch(()=>o.value,()=>{m()});const f={tabsProps:r,currentTab:o,tabPanes:s,setCurrentTab:u,addTabPane:l,removeTabPane:p};return c.provide(Ds,f),{__sfc:!0,props:r,emits:t,currentTab:o,tabsRef:i,modelValue:a,updateModelValue:n,tabPanes:s,addTabPane:l,removeTabPane:p,setCurrentTab:u,offsetPercent:d,getTabsOffset:m,injectData:f,TabNav:Pz}}});var Ez=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{ref:"tabsRef",staticClass:"pwc-tabs"},[t(r.TabNav),t("div",{staticClass:"pwc-tabs__content"},[t("div",{staticClass:"pwc-tabs__list",style:{marginLeft:`-${r.offsetPercent}%`}},[e._t("default")],2)])],1)},Qz=[],Iz=$(Tz,Ez,Qz);const Mz=Iz.exports,Az=c.defineComponent({__name:"tab-pane",props:xz(),setup(e){const t=e,r=Wt(8),o=c.inject(Ds),{hasSlot:i,slotRender:a}=Te(),n=c.computed(()=>t.name||r),s=c.computed(()=>o.currentTab.value===n.value);function l(){return a("title",{isActive:s.value})}const p=c.computed(()=>{var f;return(f=t.lazyLoad)!=null?f:o.tabsProps.lazyLoad}),u=c.ref(!1);c.watch(s,()=>{s.value&&(u.value=!0)});const d=c.computed(()=>p.value?u.value:!0),m={paneId:r,paneProps:t,getPaneName:()=>n.value,getIsActive:()=>s.value,hasSlot:i,getTitleRenderSlot:l,getExtraRenderSlot:()=>a("extra")};return c.onBeforeMount(()=>{o.addTabPane(m)}),{__sfc:!0,props:t,paneId:r,tabsInject:o,hasSlot:i,slotRender:a,tabPaneName:n,isActive:s,getTitleRenderSlot:l,isLazyLoad:p,isFirstRender:u,canRender:d,tabPaneInstance:m}}});var zz=function(){var e=this,t=e._self._c,r=e._self._setupProxy;return t("div",{staticClass:"pwc-tab-pane",class:{"is-active":r.isActive},attrs:{"data-pane-name":r.tabPaneName,"data-is-active":r.isActive}},[r.canRender?t("div",{staticClass:"pwc-tab-pane__content"},[e._t("default")],2):e._e()])},Dz=[],Oz=$(Az,zz,Dz);const Rz=Oz.exports;N("PwcTabs",Mz),N("PwcTabPane",Rz);const Vz={vote:{option:"Voting Options",rule:"Rules",ruleTitle:"Rule Description",success:"Vote successful",voted:"You have already voted",voteFailed:"Vote failed",voteLimit:"Vote limit reached",count:"votes",entrance:"Vote",listTitle:"Vote Activity",noRule:"No rules",status:{voting:"Voting",ended:"Ended"},button:{vote:"Vote",voted:"Voted",notVoted:"Not Voted"}}},Bz={vote:{option:"投票オプション",rule:"ルール",ruleTitle:"ルール説明",success:"投票成功",voted:"すでに投票済みです",voteFailed:"投票失敗",voteLimit:"投票回数が上限に達しました",count:"票",entrance:"投票",listTitle:"投票活動",noRule:"ルールなし",status:{voting:"投票中",ended:"終了"},button:{vote:"投票",voted:"投票済み",notVoted:"未投票"}}},$z={vote:{option:"투표 옵션",rule:"규칙",ruleTitle:"규칙 설명",success:"투표 성공",voted:"이미 투표했습니다",voteFailed:"투표 실패",voteLimit:"투표 횟수가 소진되었습니다",count:"표",entrance:"투표",listTitle:"투표 활동",noRule:"규칙 없음",status:{voting:"투표 중",ended:"종료"},button:{vote:"투표",voted:"투표함",notVoted:"미투표"}}},Fz={vote:{option:"Варианты голосования",rule:"Правила",ruleTitle:"Описание правил",success:"Голосование успешно",voted:"Вы уже проголосовали",voteFailed:"Голосование не удалось",voteLimit:"Лимит голосований исчерпан",count:"голосов",entrance:"Голосование",listTitle:"Активность голосования",noRule:"Нет правил",status:{voting:"Голосование",ended:"Завершено"},button:{vote:"Голосовать",voted:"Проголосовано",notVoted:"Не проголосовано"}}},jz={vote:{option:"投票选项",rule:"规则",ruleTitle:"规则说明",success:"投票成功",voted:"你之前已经投过票",voteFailed:"投票失败",voteLimit:"投票次数已用完",count:"票",entrance:"投票",listTitle:"投票活动",noRule:"暂无规则",status:{voting:"投票中",ended:"已结束"},button:{vote:"投票",voted:"已投票",notVoted:"未投票"}}},Uz={vote:{option:"投票選項",rule:"規則",ruleTitle:"規則說明",success:"投票成功",voted:"你之前已經投過票",voteFailed:"投票失敗",voteLimit:"投票次數已用完",count:"票",entrance:"投票",listTitle:"投票活動",noRule:"暫無規則",status:{voting:"投票中",ended:"已結束"},button:{vote:"投票",voted:"已投票",notVoted:"未投票"}}},{useI18n:jt}=kp({zh_CN:jz,zh_TW:Uz,en:Vz,ja:Bz,ko:$z,ru:Fz}),Wz=()=>({status:g.oneOf(["Y","N"]).def("Y"),isVoted:g.bool.isRequired,disabled:g.bool.def(!1),hasVoteList:g.bool.def(!1)}),Hz=()=>({click:H()}),Zz=e=>{const{props:t,emit:r}=e,{$t:o}=jt(),i=c.computed(()=>t.isVoted?"voted":t.status==="N"?"not-voted":t.disabled?"disabled":"vote"),a={vote:o("vote.button.vote"),voted:o("vote.button.voted"),"not-voted":o("vote.button.notVoted"),disabled:o("vote.button.vote")},n=c.computed(()=>a[i.value]);function s(){i.value==="vote"&&r("click")}return{buttonType:i,buttonText:n,handleClick:s}},Yz=c.defineComponent({__name:"vote-button",props:Wz(),emits:Hz(),setup(e,{emit:t}){const r=e,{buttonType:o,buttonText:i,handleClick:a}=Zz({props:r,emit:t});return{__sfc:!0,props:r,emit:t,buttonType:o,buttonText:i,handleClick:a,PwcButton:rt}}});function lr(e,t,r,o,i,a,n,s){var l=typeof e=="function"?e.options:e;return t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),a&&(l._scopeId="data-v-"+a),{exports:e,options:l}}var qz=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-button",class:{"plv-iar-vote-button--no-pointer":o.props.hasVoteList}},[o.buttonType==="vote"?r(o.PwcButton,{staticClass:"plv-iar-vote-button__btn",attrs:{size:"mini",disabled:o.props.disabled},on:{click:o.handleClick}},[t._v(" "+t._s(o.buttonText)+" ")]):o.buttonType==="not-voted"||o.buttonType==="disabled"?r(o.PwcButton,{staticClass:"plv-iar-vote-button__btn",attrs:{size:"mini",disabled:""}},[t._v(" "+t._s(o.buttonText)+" ")]):r(o.PwcButton,{staticClass:"plv-iar-vote-button__text",attrs:{size:"mini",disabled:o.props.status==="N"||o.props.disabled}},[t._v(" "+t._s(o.buttonText)+" ")])],1)},Gz=[],Xz=lr(Yz,qz,Gz,!1,null,"6ba928d5");const Ld=Xz.exports,Kz=()=>({status:g.oneOf(["Y","N"]).def("Y")}),Jz=()=>({}),Nz=e=>{const{props:t}=e,{$t:r}=jt();return{statusText:c.computed(()=>t.status==="Y"?r("vote.status.voting"):r("vote.status.ended"))}},eD=c.defineComponent({__name:"vote-status",props:Kz(),emits:Jz(),setup(e,{emit:t}){const r=e,{statusText:o}=Nz({props:r});return{__sfc:!0,props:r,emit:t,statusText:o}}});var tD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-status",class:{"plv-iar-vote-status--voting":t.status==="Y","plv-iar-vote-status--ended":t.status==="N"}},[t._v(" "+t._s(o.statusText)+" ")])},rD=[],oD=lr(eD,tD,rD,!1,null,"c99114e4");const Pd=oD.exports,Td=()=>({voteData:g.object().isRequired,votedList:g.array().def([]),layout:g.oneOf(["single","double"]).def("single"),clickable:g.bool.def(!0),hasVoteList:g.bool.def(!1)}),Ed=()=>({"to-vote":H()}),Qd=e=>{const{props:t,emit:r,itemRef:o}=e,i=c.ref({gridRowEnd:"auto"}),a=c.computed(()=>t.votedList.includes(t.voteData.id)),n=c.computed(()=>!t.clickable);function s(){n.value||r("to-vote",t.voteData.id)}return{isVoted:a,isDisabled:n,gridRowEndStyle:i,handleVote:s}},iD=c.defineComponent({__name:"vote-item-single",props:Td(),emits:Ed(),setup(e,{emit:t}){const r=e,{$t:o}=jt(),{isVoted:i,isDisabled:a,handleVote:n}=Qd({props:r,emit:t});return{__sfc:!0,$t:o,props:r,emit:t,isVoted:i,isDisabled:a,handleVote:n,VoteButton:Ld,VoteStatus:Pd}}});var aD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote-list-item plv-iar-vote-list-item-layout-single",class:{"plv-iar-vote-list-item-image":!!t.voteData.voteCoverImage,"plv-iar-vote-list-item-no-image":!t.voteData.voteCoverImage}},[t.voteData.voteCoverImage?[r("div",{staticClass:"plv-iar-vote-list-item-bg"},[r("div",{staticClass:"plv-iar-vote-list-item-bg-image",style:{backgroundImage:`url(${t.voteData.voteCoverImage})`}}),r("div",{staticClass:"plv-iar-vote-list-item-bg-mask"})])]:t._e(),r("div",{staticClass:"plv-iar-vote-list-item-content"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-content-info-left-top-item",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-content-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1),r("div",{staticClass:"plv-iar-vote-list-item-content-info-name"},[t._v(t._s(t.voteData.name))])]),r(o.VoteButton,{attrs:{status:t.voteData.status,"is-voted":o.isVoted,disabled:o.isDisabled,"has-vote-list":o.props.hasVoteList},on:{click:o.handleVote}})],1)],2)},nD=[],sD=lr(iD,aD,nD,!1,null,"d0e638ec");const lD=sD.exports,cD=c.defineComponent({__name:"vote-item-double",props:Td(),emits:Ed(),setup(e,{expose:t,emit:r}){const o=e,{$t:i}=jt(),a=c.ref(),{isVoted:n,isDisabled:s,gridRowEndStyle:l,handleVote:p}=Qd({props:o,emit:r,itemRef:a});let u=null;const d=12;function m(h=d){if(!a.value)return;const b=a.value.offsetHeight;if(b>0){const v=Math.ceil(b/h);l.value={gridRowEnd:`span ${v}`}}}function f(){a.value&&(u&&(u.disconnect(),u=null),u=new dl(()=>{m(d)}),u.observe(a.value),m(d))}function w(){u&&(u.disconnect(),u=null)}return c.watch(a,h=>{w(),h&&f()},{immediate:!0}),c.onBeforeUnmount(()=>{w()}),t({calculateGridRowEnd:m,itemRef:a}),{__sfc:!0,$t:i,props:o,emit:r,itemRef:a,isVoted:n,isDisabled:s,gridRowEndStyle:l,handleVote:p,resizeObserver:u,GAP:d,calculateGridRowEnd:m,setupResizeObserver:f,cleanupResizeObserver:w,VoteButton:Ld,VoteStatus:Pd}}});var pD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{ref:"itemRef",staticClass:"plv-iar-vote-list-item plv-iar-vote-list-item-layout-double",style:o.gridRowEndStyle},[r("div",{staticClass:"plv-iar-vote-list-item-content-container"},[t.voteData.voteCoverImage?[r("div",{staticClass:"plv-iar-vote-list-item-image",style:{backgroundImage:`url(${t.voteData.voteCoverImage})`}},[r("div",{staticClass:"plv-iar-vote-list-item-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-image-status",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1)])]:t._e(),r("div",{staticClass:"plv-iar-vote-list-item-content"},[r("div",{staticClass:"plv-iar-vote-list-item-content-info"},[t.voteData.voteCoverImage?t._e():r("div",{staticClass:"plv-iar-vote-list-item-info-left-top"},[t.voteData.status?r(o.VoteStatus,{staticClass:"plv-iar-vote-list-item-info-left-top-item",attrs:{status:t.voteData.status}}):t._e(),t.voteData.showVoteCount?r("div",{staticClass:"plv-iar-vote-list-item-info-left-top-item plv-iar-vote-list-item-content-info-count"},[t._v(" "+t._s(t.voteData.voteCount||0)+" "+t._s(o.$t("vote.count"))+" ")]):t._e()],1),r("div",{staticClass:"plv-iar-vote-list-item-content-info-name"},[t._v(t._s(t.voteData.name))])]),r(o.VoteButton,{attrs:{status:t.voteData.status,"is-voted":o.isVoted,disabled:o.isDisabled,"has-vote-list":o.props.hasVoteList},on:{click:o.handleVote}})],1)],2)])},uD=[],dD=lr(cD,pD,uD,!1,null,"214a02c3");const fD=dD.exports,fi={OpenVote:"OpenVote",OpenVoteRule:"OpenVoteRule"};function mD(e){const{state:t,onShow:r,onGetVoteList:o}=e,{list:i,curVotedList:a,cacheVotedList:n,voteCount:s,isForceHideResult:l,isForceShowResult:p,findVoteById:u}=t;function d(y){a.value=y.curVotedList}function m(y){const _=y.voteData.id,C=u(_)[0];C!==-1&&i.value.splice(C,1);const x=a.value.findIndex(E=>E===_);x!==-1&&a.value.splice(x,1);const S=n.value.findIndex(E=>E===_);S!==-1&&n.value.splice(S,1);const L=y.voteData.voteOrder||0;let k=i.value.length;for(let E=0;E<i.value.length;E++)if((i.value[E].voteOrder||0)>=L){k=E;break}p.value&&(y.voteData.showVoteCount=!0,y.voteData.voteCount=0),i.value.splice(k,0,y.voteData),r()}function f(y){const _=u(y.id)[1];_&&(_.status="N")}function w(y){s.value=y.voteCount,y.list.forEach(_=>{const C=u(_.id)[1];C&&(C.showVoteCount=!l.value,C.voteCount=_.times)})}function h(){i.value.splice(0,i.value.length)}function b(y){const _=u(y.id)[0];_!==-1&&i.value.splice(_,1)}function v(y){const _=Math.floor(Math.random()*3e3);setTimeout(()=>{o()},_)}return{updateVotedList:d,onVoteStart:m,onVoteStop:f,onVoteResult:w,onVoteDeleteAll:h,onVoteDelete:b,onVoteChangeOrder:v}}function hD(e){const{voteTarget:t,state:r,onShowEntrance:o}=e,{list:i,curVotedList:a,cacheVotedList:n,isVotedWithLimit:s,voteCount:l,isForceHideResult:p,findVoteById:u}=r,{toast:d}=Dt(),{$t:m}=jt(),{trackEvent:f}=CI((t==null?void 0:t.interactionCore)||{});function w(){return Z(this,null,function*(){t&&(a.value=t.getVotedList())})}function h(){return Z(this,null,function*(){if(!t)return;const C=yield t.getVoteList();if(C&&C.code===200&&C.data){i.value=C.data.list,i.value.length>0&&o(!0);const x=t.getCachedVoteResult();x&&x.forEach(S=>{const L=u(S.id)[1];L&&(L.showVoteCount=!p.value,L.voteCount=S.times)})}})}const b=un(h,1e3);function v(C){return Z(this,null,function*(){if(t&&n.value.indexOf(C)===-1){n.value.push(C);const x=yield t.toVote(C);if(x.code===200)t.pushVotedList(C),d.success(m("vote.success"));else if(x.code===506)d.info(m("vote.voted")),t.pushVotedList(C);else{x.code===501?(s.value=!0,d.error(m("vote.voteLimit"))):d.error(x.message||m("vote.voteFailed"));const S=n.value.indexOf(C);S!==-1&&n.value.splice(S,1)}y()}})}function y(){t&&f({event_id:"click_vote_widget",event_type:"click",spec_attrs:{timestamp:Date.now()}})}function _(){t&&t.interactionCore.getSocket().then(C=>{C&&C.on("connect",()=>{b()})})}return{getVotedList:w,getVoteList:b,toVote:v,setupSocketListener:_}}function gD(e){const{resultShowType:t}=e,r=c.ref([]),o=c.ref([]),i=c.ref([]),a=c.ref(!1),n=c.ref(0),s=c.computed(()=>o.value.length),l=c.computed(()=>t===3&&n.value===0&&i.value.length===0),p=c.computed(()=>t===2||t===3&&(n.value>0||o.value.length>0));function u(d){const m=r.value.findIndex(f=>f.id===d);return[m,r.value[m]]}return{list:r,curVotedList:o,cacheVotedList:i,isVotedWithLimit:a,voteCount:n,isForceHideResult:l,isForceShowResult:p,votedCount:s,findVoteById:u}}const vD=()=>({voteTarget:g.object(),layout:g.oneOf(["single","double"]).def("single"),voteList:g.array(),maxVote:g.number.def(0),showHeader:g.bool.def(!0),showRule:g.bool.def(!0),resultShowType:g.number.def(0)}),wD=()=>({"to-show":()=>!0,"to-hide":()=>!0,"show-entrance":H()}),bD=e=>{var v,y,_,C,x,S,L;const{props:t,emit:r}=e,{getEmitter:o}=Xt(),{voteTarget:i={}}=t,a=gD({resultShowType:t.resultShowType}),n=hD({voteTarget:i,state:a,onShowEntrance:k=>r("show-entrance",k)}),{updateVotedList:s,onVoteStart:l,onVoteStop:p,onVoteResult:u,onVoteDeleteAll:d,onVoteDelete:m,onVoteChangeOrder:f}=mD({state:a,onShow:()=>r("to-show"),onGetVoteList:()=>n.getVoteList()});function w(){o().emit(fi.OpenVoteRule)}function h(k){if(a.curVotedList.value.indexOf(k)!==-1||a.isVotedWithLimit.value)return!1;const P=Number(t.maxVote)||0;return P>0?a.votedCount.value<P:!0}function b(){t.voteList&&t.voteList.length>0||(n.setupSocketListener(),n.getVoteList(),n.getVotedList())}return SI(i.eventEmitter,{[(v=i.VoteEvent)==null?void 0:v.UpdateVotedList]:s,[(y=i.VoteEvent)==null?void 0:y.Start]:l,[(_=i.VoteEvent)==null?void 0:_.Stop]:p,[(C=i.VoteEvent)==null?void 0:C.VoteResult]:u,[(x=i.VoteEvent)==null?void 0:x.DeleteAll]:d,[(S=i.VoteEvent)==null?void 0:S.Delete]:m,[(L=i.VoteEvent)==null?void 0:L.UpdateVoteOrder]:f}),c.onMounted(()=>{t.voteTarget&&b()}),c.watch(()=>t.voteTarget,k=>{k&&b()},{immediate:!0}),c.watch(()=>t.voteList,k=>{k!=null&&(a.list.value=[...k])},{immediate:!0,deep:!0}),{list:a.list,curVotedList:a.curVotedList,handleToVote:n.toVote,handleRule:w,isItemClickable:h}},_D=c.defineComponent({__name:"vote-list",props:vD(),emits:wD(),setup(e,{emit:t}){const r=e,{$t:o}=jt(),{list:i,curVotedList:a,handleToVote:n,handleRule:s,isItemClickable:l}=bD({props:r,emit:t});return{__sfc:!0,$t:o,props:r,emit:t,list:i,curVotedList:a,handleToVote:n,handleRule:s,isItemClickable:l,PwcEmpty:qi,VoteItemSingle:lD,VoteItemDouble:fD}}});var yD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r("div",{staticClass:"plv-iar-vote"},[o.list.length?r("div",{staticClass:"plv-iar-vote__container"},[t.showHeader?r("div",{staticClass:"plv-iar-vote__container__header"},[r("span",[t._v(t._s(o.$t("vote.option")))]),o.props.showRule?r("span",{class:{"plv-iar-vote__container__header__rule--no-pointer":o.props.voteList&&o.props.voteList.length>0},on:{click:o.handleRule}},[t._v(t._s(o.$t("vote.rule")))]):t._e()]):t._e(),r("div",{staticClass:"plv-iar-vote__list",class:{"plv-iar-vote__list--single":t.layout==="single","plv-iar-vote__list--double":t.layout==="double"}},t._l(o.list,function(i){return r(t.layout==="single"?o.VoteItemSingle:o.VoteItemDouble,{key:i.id,tag:"component",attrs:{"vote-data":i,"voted-list":o.curVotedList,clickable:o.isItemClickable(i.id),"has-vote-list":!!(o.props.voteList&&o.props.voteList.length>0)},on:{"to-vote":o.handleToVote}})}),1)]):r("div",{staticClass:"plv-iar-vote__no-data"},[r(o.PwcEmpty)],1)])},xD=[],CD=lr(_D,yD,xD,!1,null,null);const Id=CD.exports,SD="data:image/png;base64,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",kD=()=>({voteTarget:g.object(),isFullScreen:g.bool.def(!1),iconUrl:g.string.def(""),beforeClickInterrupt:g.func()}),LD=()=>({"open-vote":H()}),PD=e=>{const{props:t}=e,{getEmitter:r}=Xt();function o(){return Z(this,null,function*(){t.beforeClickInterrupt&&Ka(t.beforeClickInterrupt)&&(yield t.beforeClickInterrupt())||r().emit(fi.OpenVote)})}return{pendantIconUrl:c.computed(()=>t.iconUrl||SD),onClickPendant:o}},TD=c.defineComponent({__name:"vote-pendant",props:kD(),emits:LD(),setup(e,{emit:t}){const r=e,{$t:o}=jt(),{onClickPendant:i,pendantIconUrl:a}=PD({props:r}),n=c.computed(()=>({backgroundImage:`url(${a.value})`}));return{__sfc:!0,props:r,emit:t,$t:o,onClickPendant:i,pendantIconUrl:a,pendantStyle:n}}});var ED=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return t.voteTarget&&!t.isFullScreen?r("div",{staticClass:"plv-iar-vote-pendant",style:o.pendantStyle,on:{click:o.onClickPendant}},[r("div",{staticClass:"plv-iar-vote-pendant__text"},[t._v(" "+t._s(o.$t("vote.entrance"))+" ")])]):t._e()},QD=[],ID=lr(TD,ED,QD,!1,null,null);const MD=ID.exports,AD=()=>({voteTarget:g.object(),popupConfig:g.object(),layout:g.oneOf(["single","double"]).def("single"),maxVote:g.number.def(0),showRule:g.bool.def(!0),resultShowType:g.number.def(0)}),zD=e=>{const{voteListRef:t}=e,r=c.ref(!1),o=c.ref(),{getEmitter:i}=Xt();function a(){r.value=!0,c.nextTick(()=>{o.value&&o.value.resetScroll()})}c.watch(r,p=>{p&&c.nextTick(()=>{var u;(u=t==null?void 0:t.value)!=null&&u.recalculateGridRowEnds&&t.value.recalculateGridRowEnds()})});function n(){r.value=!1}function s(){i().emit(fi.OpenVoteRule)}return Kt(fi.OpenVote,a),{instance:{open:a,close:n},visible:r,popupRef:o,handleToRule:s}},DD=c.defineComponent({__name:"vote-list-popup",props:AD(),setup(e,{expose:t}){const r=e,{$t:o}=jt(),i=c.ref(),{instance:a,visible:n,popupRef:s,handleToRule:l}=zD({voteListRef:i});return t(a),{__sfc:!0,props:r,$t:o,voteListRef:i,instance:a,visible:n,popupRef:s,handleToRule:l,PwcPopup:ut,VoteListComponent:Id}}});var OD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r(o.PwcPopup,{ref:"popupRef",staticClass:"plv-iar-vote-list-popup",attrs:{title:o.$t("vote.listTitle"),"popup-config":t.popupConfig,closeable:!1,"body-height-percent":.65,background:"#F7F8Fa"},scopedSlots:t._u([{key:"header-right",fn:function(){return[t.showRule?r("span",{staticClass:"plv-iar-vote-list-popup__rule",on:{click:o.handleToRule}},[t._v(" "+t._s(o.$t("vote.rule"))+" ")]):t._e()]},proxy:!0}]),model:{value:o.visible,callback:function(i){o.visible=i},expression:"visible"}},[r("div",{staticClass:"plv-iar-vote-list-popup__content"},[r(o.VoteListComponent,{ref:"voteListRef",attrs:{"vote-target":t.voteTarget,layout:t.layout,"max-vote":t.maxVote,"show-header":!1,"show-rule":t.showRule,"result-show-type":t.resultShowType},on:{"to-rule":o.handleToRule}})],1)])},RD=[],VD=lr(DD,OD,RD,!1,null,null);const BD=VD.exports,$D=()=>({ruleText:g.string.def(""),popupConfig:g.object()}),FD=e=>{const t=c.ref(!1),r=c.ref();function o(){t.value=!0,c.nextTick(()=>{r.value&&r.value.resetScroll()})}function i(){t.value=!1}return Kt(fi.OpenVoteRule,o),{instance:{open:o,close:i},visible:t,popupRef:r,close:i}},jD=c.defineComponent({__name:"vote-rule-popup",props:$D(),setup(e,{expose:t}){const r=e,{$t:o}=jt(),{isMobile:i}=Ce(),{instance:a,visible:n,popupRef:s}=FD();return t(a),{__sfc:!0,props:r,$t:o,isMobile:i,instance:a,visible:n,popupRef:s,PwcPopup:ut}}});var UD=function(){var t=this,r=t._self._c,o=t._self._setupProxy;return r(o.PwcPopup,{ref:"popupRef",staticClass:"plv-iar-vote-rule-popup",attrs:{title:o.$t("vote.ruleTitle"),"popup-config":t.popupConfig,backable:o.isMobile,background:o.isMobile?"#F7F8Fa":void 0,"body-height-percent":o.isMobile?.65:void 0},model:{value:o.visible,callback:function(i){o.visible=i},expression:"visible"}},[r("div",{staticClass:"plv-iar-vote-rule-popup__content"},[t.ruleText?r("div",{staticClass:"plv-iar-vote-rule-popup__text",domProps:{innerHTML:t._s(t.ruleText)}}):r("div",{staticClass:"plv-iar-vote-rule-popup__empty"},[t._v(" "+t._s(o.$t("vote.noRule"))+" ")])])])},WD=[],HD=lr(jD,UD,WD,!1,null,null);const ZD=HD.exports;ce.VoteList=Id,ce.VoteListPopup=BD,ce.VotePendant=MD,ce.VoteRulePopup=ZD,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});console.log("%c@polyv/iar-vote-ui","background:#409EFF;padding: 2px 6px;border-radius: 3px;color: #fff","[version: 2.1.0]","[buildTime: 2026-03-13 02:44:59]");
|