rayyy-vue-table-components 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -41,4 +41,4 @@ __p += '`),Ie&&(Y+=`' +
41
41
  function print() { __p += __j.call(arguments, '') }
42
42
  `:`;
43
43
  `)+Y+`return __p
44
- }`;var Ee=bg(function(){return ze(E,ie+"return "+Y).apply(o,N)});if(Ee.source=Y,Jc(Ee))throw Ee;return Ee}function x3(n){return De(n).toLowerCase()}function O3(n){return De(n).toUpperCase()}function N3(n,l,s){if(n=De(n),n&&(s||l===o))return Bh(n);if(!n||!(l=nn(l)))return n;var p=xn(n),C=xn(l),E=Th(p,C),N=xh(p,C)+1;return Or(p,E,N).join("")}function A3(n,l,s){if(n=De(n),n&&(s||l===o))return n.slice(0,Nh(n)+1);if(!n||!(l=nn(l)))return n;var p=xn(n),C=xh(p,xn(l))+1;return Or(p,0,C).join("")}function L3(n,l,s){if(n=De(n),n&&(s||l===o))return n.replace(Ao,"");if(!n||!(l=nn(l)))return n;var p=xn(n),C=Th(p,xn(l));return Or(p,C).join("")}function I3(n,l){var s=U,p=D;if(tt(l)){var C="separator"in l?l.separator:C;s="length"in l?_e(l.length):s,p="omission"in l?nn(l.omission):p}n=De(n);var E=n.length;if(Mo(n)){var N=xn(n);E=N.length}if(s>=E)return n;var I=s-$o(p);if(I<1)return p;var M=N?Or(N,0,I).join(""):n.slice(0,I);if(C===o)return M+p;if(N&&(I+=M.length-I),Qc(C)){if(n.slice(I).search(C)){var K,j=M;for(C.global||(C=mc(C.source,De(rt.exec(C))+"g")),C.lastIndex=0;K=C.exec(j);)var Y=K.index;M=M.slice(0,Y===o?I:Y)}}else if(n.indexOf(nn(C),I)!=I){var ee=M.lastIndexOf(C);ee>-1&&(M=M.slice(0,ee))}return M+p}function R3(n){return n=De(n),n&&Ds.test(n)?n.replace(Qn,cT):n}var P3=Uo(function(n,l,s){return n+(s?" ":"")+l.toUpperCase()}),nu=ym("toUpperCase");function gg(n,l,s){return n=De(n),l=s?o:l,l===o?oT(n)?dT(n):YB(n):n.match(l)||[]}var bg=Te(function(n,l){try{return en(n,o,l)}catch(s){return Jc(s)?s:new me(s)}}),M3=or(function(n,l){return mn(l,function(s){s=Un(s),nr(n,s,Xc(n[s],n))}),n});function $3(n){var l=n==null?0:n.length,s=ue();return n=l?Qe(n,function(p){if(typeof p[1]!="function")throw new gn(u);return[s(p[0]),p[1]]}):[],Te(function(p){for(var C=-1;++C<l;){var E=n[C];if(en(E[0],this,p))return en(E[1],this,p)}})}function V3(n){return cx(yn(n,g))}function ru(n){return function(){return n}}function F3(n,l){return n==null||n!==n?l:n}var z3=wm(),D3=wm(!0);function Gt(n){return n}function ou(n){return Xh(typeof n=="function"?n:yn(n,g))}function W3(n){return Jh(yn(n,g))}function H3(n,l){return Qh(n,yn(l,g))}var U3=Te(function(n,l){return function(s){return Ol(s,n,l)}}),K3=Te(function(n,l){return function(s){return Ol(n,s,l)}});function lu(n,l,s){var p=pt(l),C=Xa(l,p);s==null&&!(tt(l)&&(C.length||!p.length))&&(s=l,l=n,n=this,C=Xa(l,pt(l)));var E=!(tt(s)&&"chain"in s)||!!s.chain,N=ar(n);return mn(C,function(I){var M=l[I];n[I]=M,N&&(n.prototype[I]=function(){var K=this.__chain__;if(E||K){var j=n(this.__wrapped__),Y=j.__actions__=Ut(this.__actions__);return Y.push({func:M,args:arguments,thisArg:n}),j.__chain__=K,j}return M.apply(n,Sr([this.value()],arguments))})}),n}function j3(){return wt._===this&&(wt._=yT),this}function au(){}function G3(n){return n=_e(n),Te(function(l){return em(l,n)})}var q3=$c(Qe),Y3=$c(vh),X3=$c(sc);function yg(n){return Uc(n)?cc(Un(n)):Bx(n)}function Z3(n){return function(l){return n==null?o:ro(n,l)}}var J3=_m(),Q3=_m(!0);function iu(){return[]}function su(){return!1}function eA(){return{}}function tA(){return""}function nA(){return!0}function rA(n,l){if(n=_e(n),n<1||n>W)return[];var s=Q,p=kt(n,Q);l=ue(l),n-=Q;for(var C=dc(p,l);++s<n;)l(s);return C}function oA(n){return be(n)?Qe(n,Un):rn(n)?[n]:Ut(Vm(De(n)))}function lA(n){var l=++gT;return De(n)+l}var aA=ni(function(n,l){return n+l},0),iA=Vc("ceil"),sA=ni(function(n,l){return n/l},1),cA=Vc("floor");function uA(n){return n&&n.length?Ya(n,Gt,Sc):o}function fA(n,l){return n&&n.length?Ya(n,ue(l,2),Sc):o}function dA(n){return Eh(n,Gt)}function pA(n,l){return Eh(n,ue(l,2))}function hA(n){return n&&n.length?Ya(n,Gt,Tc):o}function mA(n,l){return n&&n.length?Ya(n,ue(l,2),Tc):o}var gA=ni(function(n,l){return n*l},1),bA=Vc("round"),yA=ni(function(n,l){return n-l},0);function CA(n){return n&&n.length?fc(n,Gt):0}function wA(n,l){return n&&n.length?fc(n,ue(l,2)):0}return _.after=W4,_.ary=Ym,_.assign=ON,_.assignIn=cg,_.assignInWith=mi,_.assignWith=NN,_.at=AN,_.before=Xm,_.bind=Xc,_.bindAll=M3,_.bindKey=Zm,_.castArray=eN,_.chain=jm,_.chunk=cO,_.compact=uO,_.concat=fO,_.cond=$3,_.conforms=V3,_.constant=ru,_.countBy=C4,_.create=LN,_.curry=Jm,_.curryRight=Qm,_.debounce=eg,_.defaults=IN,_.defaultsDeep=RN,_.defer=H4,_.delay=U4,_.difference=dO,_.differenceBy=pO,_.differenceWith=hO,_.drop=mO,_.dropRight=gO,_.dropRightWhile=bO,_.dropWhile=yO,_.fill=CO,_.filter=v4,_.flatMap=E4,_.flatMapDeep=k4,_.flatMapDepth=B4,_.flatten=Wm,_.flattenDeep=wO,_.flattenDepth=vO,_.flip=K4,_.flow=z3,_.flowRight=D3,_.fromPairs=_O,_.functions=DN,_.functionsIn=WN,_.groupBy=T4,_.initial=EO,_.intersection=kO,_.intersectionBy=BO,_.intersectionWith=TO,_.invert=UN,_.invertBy=KN,_.invokeMap=O4,_.iteratee=ou,_.keyBy=N4,_.keys=pt,_.keysIn=jt,_.map=ci,_.mapKeys=GN,_.mapValues=qN,_.matches=W3,_.matchesProperty=H3,_.memoize=fi,_.merge=YN,_.mergeWith=ug,_.method=U3,_.methodOf=K3,_.mixin=lu,_.negate=di,_.nthArg=G3,_.omit=XN,_.omitBy=ZN,_.once=j4,_.orderBy=A4,_.over=q3,_.overArgs=G4,_.overEvery=Y3,_.overSome=X3,_.partial=Zc,_.partialRight=tg,_.partition=L4,_.pick=JN,_.pickBy=fg,_.property=yg,_.propertyOf=Z3,_.pull=AO,_.pullAll=Um,_.pullAllBy=LO,_.pullAllWith=IO,_.pullAt=RO,_.range=J3,_.rangeRight=Q3,_.rearg=q4,_.reject=P4,_.remove=PO,_.rest=Y4,_.reverse=qc,_.sampleSize=$4,_.set=e3,_.setWith=t3,_.shuffle=V4,_.slice=MO,_.sortBy=D4,_.sortedUniq=HO,_.sortedUniqBy=UO,_.split=E3,_.spread=X4,_.tail=KO,_.take=jO,_.takeRight=GO,_.takeRightWhile=qO,_.takeWhile=YO,_.tap=u4,_.throttle=Z4,_.thru=si,_.toArray=ag,_.toPairs=dg,_.toPairsIn=pg,_.toPath=oA,_.toPlainObject=sg,_.transform=n3,_.unary=J4,_.union=XO,_.unionBy=ZO,_.unionWith=JO,_.uniq=QO,_.uniqBy=e4,_.uniqWith=t4,_.unset=r3,_.unzip=Yc,_.unzipWith=Km,_.update=o3,_.updateWith=l3,_.values=Go,_.valuesIn=a3,_.without=n4,_.words=gg,_.wrap=Q4,_.xor=r4,_.xorBy=o4,_.xorWith=l4,_.zip=a4,_.zipObject=i4,_.zipObjectDeep=s4,_.zipWith=c4,_.entries=dg,_.entriesIn=pg,_.extend=cg,_.extendWith=mi,lu(_,_),_.add=aA,_.attempt=bg,_.camelCase=u3,_.capitalize=hg,_.ceil=iA,_.clamp=i3,_.clone=tN,_.cloneDeep=rN,_.cloneDeepWith=oN,_.cloneWith=nN,_.conformsTo=lN,_.deburr=mg,_.defaultTo=F3,_.divide=sA,_.endsWith=f3,_.eq=Nn,_.escape=d3,_.escapeRegExp=p3,_.every=w4,_.find=_4,_.findIndex=zm,_.findKey=PN,_.findLast=S4,_.findLastIndex=Dm,_.findLastKey=MN,_.floor=cA,_.forEach=Gm,_.forEachRight=qm,_.forIn=$N,_.forInRight=VN,_.forOwn=FN,_.forOwnRight=zN,_.get=eu,_.gt=aN,_.gte=iN,_.has=HN,_.hasIn=tu,_.head=Hm,_.identity=Gt,_.includes=x4,_.indexOf=SO,_.inRange=s3,_.invoke=jN,_.isArguments=ao,_.isArray=be,_.isArrayBuffer=sN,_.isArrayLike=Kt,_.isArrayLikeObject=at,_.isBoolean=cN,_.isBuffer=Nr,_.isDate=uN,_.isElement=fN,_.isEmpty=dN,_.isEqual=pN,_.isEqualWith=hN,_.isError=Jc,_.isFinite=mN,_.isFunction=ar,_.isInteger=ng,_.isLength=pi,_.isMap=rg,_.isMatch=gN,_.isMatchWith=bN,_.isNaN=yN,_.isNative=CN,_.isNil=vN,_.isNull=wN,_.isNumber=og,_.isObject=tt,_.isObjectLike=ot,_.isPlainObject=Pl,_.isRegExp=Qc,_.isSafeInteger=_N,_.isSet=lg,_.isString=hi,_.isSymbol=rn,_.isTypedArray=jo,_.isUndefined=SN,_.isWeakMap=EN,_.isWeakSet=kN,_.join=xO,_.kebabCase=h3,_.last=wn,_.lastIndexOf=OO,_.lowerCase=m3,_.lowerFirst=g3,_.lt=BN,_.lte=TN,_.max=uA,_.maxBy=fA,_.mean=dA,_.meanBy=pA,_.min=hA,_.minBy=mA,_.stubArray=iu,_.stubFalse=su,_.stubObject=eA,_.stubString=tA,_.stubTrue=nA,_.multiply=gA,_.nth=NO,_.noConflict=j3,_.noop=au,_.now=ui,_.pad=b3,_.padEnd=y3,_.padStart=C3,_.parseInt=w3,_.random=c3,_.reduce=I4,_.reduceRight=R4,_.repeat=v3,_.replace=_3,_.result=QN,_.round=bA,_.runInContext=P,_.sample=M4,_.size=F4,_.snakeCase=S3,_.some=z4,_.sortedIndex=$O,_.sortedIndexBy=VO,_.sortedIndexOf=FO,_.sortedLastIndex=zO,_.sortedLastIndexBy=DO,_.sortedLastIndexOf=WO,_.startCase=k3,_.startsWith=B3,_.subtract=yA,_.sum=CA,_.sumBy=wA,_.template=T3,_.times=rA,_.toFinite=ir,_.toInteger=_e,_.toLength=ig,_.toLower=x3,_.toNumber=vn,_.toSafeInteger=xN,_.toString=De,_.toUpper=O3,_.trim=N3,_.trimEnd=A3,_.trimStart=L3,_.truncate=I3,_.unescape=R3,_.uniqueId=lA,_.upperCase=P3,_.upperFirst=nu,_.each=Gm,_.eachRight=qm,_.first=Hm,lu(_,(function(){var n={};return Wn(_,function(l,s){Ue.call(_.prototype,s)||(n[s]=l)}),n})(),{chain:!1}),_.VERSION=a,mn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){_[n].placeholder=_}),mn(["drop","take"],function(n,l){Le.prototype[n]=function(s){s=s===o?1:ft(_e(s),0);var p=this.__filtered__&&!l?new Le(this):this.clone();return p.__filtered__?p.__takeCount__=kt(s,p.__takeCount__):p.__views__.push({size:kt(s,Q),type:n+(p.__dir__<0?"Right":"")}),p},Le.prototype[n+"Right"]=function(s){return this.reverse()[n](s).reverse()}}),mn(["filter","map","takeWhile"],function(n,l){var s=l+1,p=s==oe||s==re;Le.prototype[n]=function(C){var E=this.clone();return E.__iteratees__.push({iteratee:ue(C,3),type:s}),E.__filtered__=E.__filtered__||p,E}}),mn(["head","last"],function(n,l){var s="take"+(l?"Right":"");Le.prototype[n]=function(){return this[s](1).value()[0]}}),mn(["initial","tail"],function(n,l){var s="drop"+(l?"":"Right");Le.prototype[n]=function(){return this.__filtered__?new Le(this):this[s](1)}}),Le.prototype.compact=function(){return this.filter(Gt)},Le.prototype.find=function(n){return this.filter(n).head()},Le.prototype.findLast=function(n){return this.reverse().find(n)},Le.prototype.invokeMap=Te(function(n,l){return typeof n=="function"?new Le(this):this.map(function(s){return Ol(s,n,l)})}),Le.prototype.reject=function(n){return this.filter(di(ue(n)))},Le.prototype.slice=function(n,l){n=_e(n);var s=this;return s.__filtered__&&(n>0||l<0)?new Le(s):(n<0?s=s.takeRight(-n):n&&(s=s.drop(n)),l!==o&&(l=_e(l),s=l<0?s.dropRight(-l):s.take(l-n)),s)},Le.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Le.prototype.toArray=function(){return this.take(Q)},Wn(Le.prototype,function(n,l){var s=/^(?:filter|find|map|reject)|While$/.test(l),p=/^(?:head|last)$/.test(l),C=_[p?"take"+(l=="last"?"Right":""):l],E=p||/^find/.test(l);C&&(_.prototype[l]=function(){var N=this.__wrapped__,I=p?[1]:arguments,M=N instanceof Le,K=I[0],j=M||be(N),Y=function(Ne){var Ie=C.apply(_,Sr([Ne],I));return p&&ee?Ie[0]:Ie};j&&s&&typeof K=="function"&&K.length!=1&&(M=j=!1);var ee=this.__chain__,ie=!!this.__actions__.length,fe=E&&!ee,Ee=M&&!ie;if(!E&&j){N=Ee?N:new Le(this);var de=n.apply(N,I);return de.__actions__.push({func:si,args:[Y],thisArg:o}),new bn(de,ee)}return fe&&Ee?n.apply(this,I):(de=this.thru(Y),fe?p?de.value()[0]:de.value():de)})}),mn(["pop","push","shift","sort","splice","unshift"],function(n){var l=Ra[n],s=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",p=/^(?:pop|shift)$/.test(n);_.prototype[n]=function(){var C=arguments;if(p&&!this.__chain__){var E=this.value();return l.apply(be(E)?E:[],C)}return this[s](function(N){return l.apply(be(N)?N:[],C)})}}),Wn(Le.prototype,function(n,l){var s=_[l];if(s){var p=s.name+"";Ue.call(Do,p)||(Do[p]=[]),Do[p].push({name:l,func:s})}}),Do[ti(o,B).name]=[{name:"wrapper",func:o}],Le.prototype.clone=RT,Le.prototype.reverse=PT,Le.prototype.value=MT,_.prototype.at=f4,_.prototype.chain=d4,_.prototype.commit=p4,_.prototype.next=h4,_.prototype.plant=g4,_.prototype.reverse=b4,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=y4,_.prototype.first=_.prototype.head,_l&&(_.prototype[_l]=m4),_}),Vo=pT();Jr?((Jr.exports=Vo)._=Vo,oc._=Vo):wt._=Vo}).call(Fk)})(bl,bl.exports)),bl.exports}var Dk=zk();const Ba=sS(Dk),Kp=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e){const r=e,o=t.reactive({itemOnHover:!1,itemOnClick:!1}),a=()=>{o.itemOnClick=!0,o.itemOnHover=!1},i=()=>{o.itemOnClick=!1,o.itemOnHover=!0};return t.watch(()=>r.dialogModalVisible,c=>{c||(o.itemOnClick=!1,o.itemOnHover=!1)}),(c,u)=>{const f=yr,h=AS,d=X2;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":o.itemOnHover,"cursor-grabbing":o.itemOnClick}]),onMouseenter:u[4]||(u[4]=m=>o.itemOnHover=!0),onMouseleave:u[5]||(u[5]=m=>o.itemOnHover=!1),onMousedown:a,onMouseup:i},[(t.openBlock(),t.createBlock(f,{label:c.columnsValue.label,value:c.columnsValue.prop,key:c.columnsValue.prop},null,8,["label","value"])),c.columnsValue.checkActive?(t.openBlock(),t.createBlock(d,{key:0,class:"transfer-arrow-wrapper"},{default:t.withCtx(()=>[t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(bt),{icon:t.unref(Qw),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:u[0]||(u[0]=m=>c.$emit("update:toTop"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(bt),{icon:t.unref(Kf),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:u[1]||(u[1]=m=>c.$emit("update:toPre"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(bt),{icon:t.unref(zi),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:u[2]||(u[2]=m=>c.$emit("update:toNext"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(bt),{icon:t.unref(Pw),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:u[3]||(u[3]=m=>c.$emit("update:toBottom"))},null,8,["icon","disabled"])]),_:1})]),_:1})):t.createCommentVNode("",!0)],34)}}}),Wk={class:"search-bar"},Hk={class:"transfer-sort-wrapper"},Uk=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit","update:checkChange"],setup(e,{emit:r}){const o=e,a=r,i=t.computed({get:()=>o.modelValue,set:w=>a("update:modelValue",w)}),c=t.reactive({localColumns:Ba.cloneDeep(o.columnsValue),clickItemProp:"",checkList:o.columnsValue.map(w=>w.prop)}),u={toTop:w=>{if(w<=0)return;const k=c.localColumns.splice(w,1)[0];c.localColumns.unshift(k)},toBottom:w=>{if(w>=c.localColumns.length-1)return;const k=c.localColumns.splice(w,1)[0];c.localColumns.push(k)},toPre:w=>{if(w>0){const k=c.localColumns[w];c.localColumns[w]=c.localColumns[w-1],c.localColumns[w-1]=k}},toNext:w=>{if(w<c.localColumns.length-1){const k=c.localColumns[w];c.localColumns[w]=c.localColumns[w+1],c.localColumns[w+1]=k}}},f=()=>{c.localColumns=Ba.cloneDeep(o.columnsValue),c.checkList=o.columnsValue.filter(w=>w.checkActive).map(w=>w.prop||"")};t.watch(()=>i.value,w=>{w?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const h=()=>{a("update:submit",c.localColumns)},d=w=>{const k=o.columnsValue.map(B=>B.prop);c.checkList=w?k:[],m(c.checkList)},m=w=>{const k=w.map(B=>String(B));c.localColumns.forEach(B=>{B.checkActive=k.includes(B.prop)}),a("update:checkChange",{columns:c.localColumns,checkList:c.checkList})},g=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),v=t.computed({get:()=>g.value,set:w=>d(w)}),y=()=>{c.localColumns=Ba.cloneDeep(o.columnsValue)},b=w=>{if(w.length>0){const k=Ba.cloneDeep(c.localColumns);c.localColumns=k.filter(B=>B.label.includes(w))}else y()};return(w,k)=>{const B=yr,A=_S;return t.openBlock(),t.createBlock(Oo,{modelValue:i.value,"onUpdate:modelValue":k[2]||(k[2]=T=>i.value=T),title:w.transferTitle,"onClick:submit":h},{default:t.withCtx(()=>[t.createElementVNode("div",Wk,[t.createVNode(qr,{"show-search":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",Hk,[t.createVNode(B,{modelValue:v.value,"onUpdate:modelValue":k[0]||(k[0]=T=>v.value=T),class:"px-4",onChange:d},{default:t.withCtx(()=>[t.createTextVNode(" 欄 ("+t.toDisplayString(c.checkList.length)+"/"+t.toDisplayString(c.localColumns.length)+") ",1)]),_:1},8,["modelValue"]),t.createVNode(A,{modelValue:c.checkList,"onUpdate:modelValue":k[1]||(k[1]=T=>c.checkList=T),onChange:m},{default:t.withCtx(()=>[t.renderSlot(w.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:u,handleMousedown:T=>c.clickItemProp=T},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(T,S)=>(t.openBlock(),t.createBlock(Kp,{key:T.prop,"dialog-modal-visible":i.value,"columns-value":T,"columns-index":S,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":T.checkActive,"transfer-active-border":c.clickItemProp==T.prop}),onMousedown:x=>c.clickItemProp=T.prop||"","onUpdate:toTop":x=>u.toTop(S),"onUpdate:toBottom":x=>u.toBottom(S),"onUpdate:toPre":x=>u.toPre(S),"onUpdate:toNext":x=>u.toNext(S)},null,8,["dialog-modal-visible","columns-value","columns-index","columns-len","class","onMousedown","onUpdate:toTop","onUpdate:toBottom","onUpdate:toPre","onUpdate:toNext"]))),128))])]),_:3},8,["modelValue"])])]),_:3},8,["modelValue","title"])}}}),Kk={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},jk={class:"flex items-center gap-2"},Gk={key:0,class:"flex items-center text-black"},qk={class:"font-bold text-text text-xl md:text-2xl;"},Yk={class:"flex items-center gap-3"},jp=t.defineComponent({__name:"FunctionHeader",props:{title:{type:String,required:!1,default:""},showBack:{type:[Boolean,String,Object],required:!1,default:!1},depth:{type:Number,required:!1,default:1}},emits:["back"],setup(e,{emit:r}){const o=e,a=r,i=()=>{const c={};switch(typeof o.showBack){case"string":c.path=o.showBack;break;case"object":Object.assign(c,o.showBack);break;default:c.path=""}a("back",c)};return(c,u)=>{const f=st;return t.openBlock(),t.createElementBlock("div",Kk,[t.createElementVNode("div",jk,[e.showBack?(t.openBlock(),t.createElementBlock("div",Gk,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(Ow))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",qk,t.toDisplayString(o.title),1)]),t.createElementVNode("div",Yk,[t.renderSlot(c.$slots,"default")])])}}}),Xk={key:0,class:"px-4 pt-1.5"},Zk={key:1,class:"py-1.5 px-4"},Jk={key:0,class:"flex justify-start pl-1.5 pt-0"},Ta=To(t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1}},emits:["click:back"],setup(e,{emit:r}){const o=e,a=r,i=()=>{a("click:back")};return(c,u)=>{const f=la;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(jp),{title:o.title,showBack:o.showBack,onBack:i,depth:o.depth},null,8,["title","showBack","depth"]),t.createVNode(f,{class:"panel-scrollbar"},{default:t.withCtx(()=>[c.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",Xk,[t.renderSlot(c.$slots,"searchBar",{},void 0,!0)])):t.createCommentVNode("",!0),c.$slots.main?(t.openBlock(),t.createElementBlock("div",Zk,[t.renderSlot(c.$slots,"main",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3}),c.$slots.footer?(t.openBlock(),t.createElementBlock("div",Jk,[t.renderSlot(c.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-c88d2537"]]),Qk=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},showEdit:{type:Boolean},showFilter:{type:Boolean},showDefaultSearch:{type:Boolean}},emits:["search","updatePage","updatePageSize","click:back"],setup(e,{emit:r}){const o=e,{pagination:a}=t.toRefs(o),i=r,c=t.computed(()=>o.showDefaultSearch||o.showSearch&&o.showEdit&&o.showFilter),u=g=>{i("search",g)},f=()=>{i("search",null)},h=g=>{i("updatePage",g)},d=g=>{i("updatePageSize",g)},m=()=>{i("click:back")};return(g,v)=>{const y=K2;return t.openBlock(),t.createBlock(t.unref(Ta),{title:o.title,"show-back":g.showBack,"onClick:back":m},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(qr),{"show-filter":c.value||g.showFilter,"show-search":c.value||g.showSearch,"onKeydown:enter":u,"onUpdate:clear":f},{button:t.withCtx(()=>[t.renderSlot(g.$slots,"firstButton"),c.value||g.showEdit?t.renderSlot(g.$slots,"customButton",{key:0}):t.createCommentVNode("",!0),t.renderSlot(g.$slots,"lastButton")]),customerFilter:t.withCtx(()=>[t.renderSlot(g.$slots,"filterButton")]),_:3},8,["show-filter","show-search"])]),main:t.withCtx(()=>[t.renderSlot(g.$slots,"main")]),footer:t.withCtx(()=>[t.unref(a).totalCount>0?(t.openBlock(),t.createBlock(y,{key:0,layout:"jumper, prev, pager, next, total, sizes","page-sizes":[10,20,30,40,50],"current-page":t.unref(a).page,"page-size":t.unref(a).limit,total:t.unref(a).totalCount,onCurrentChange:h,onSizeChange:d},null,8,["current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),eB={class:"detail-container"},tB={class:"content-wrapper"},nB={key:0,class:"border-t pt-4 w-full flex items-center justify-end"},rB=To(t.defineComponent({__name:"DetailLayout",props:{title:{},showBack:{type:[Boolean,String,Object]},isEditable:{type:Boolean},pageLoading:{type:Boolean}},emits:["update:saveEdit","update:cancelEdit"],setup(e,{emit:r}){const o=r,a=()=>{o("update:saveEdit",!1)},i=()=>{o("update:cancelEdit")};return(c,u)=>{const f=jr;return t.openBlock(),t.createBlock(t.unref(Ta),{title:c.title,"show-back":c.showBack},{main:t.withCtx(()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",eB,[t.renderSlot(c.$slots,"detailHeader",{},void 0,!0),t.createElementVNode("div",tB,[t.renderSlot(c.$slots,"main",{},void 0,!0)])])),[[f,c.pageLoading]])]),footer:t.withCtx(()=>[c.isEditable?(t.openBlock(),t.createElementBlock("div",nB,[t.createVNode(t.unref(bt),{text:"儲存",type:"primary","is-fill":"",onClick:a}),t.createVNode(t.unref(bt),{text:"捨棄",type:"primary",onClick:i})])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),[["__scopeId","data-v-464c660d"]]),oB={class:"filter-container"},lB={class:"filter-header"},aB={class:"submit-row"},iB=To(t.defineComponent({__name:"FilterLayout",props:{mainTitle:{},filterTitle:{}},emits:["submitEmit","resetEmit"],setup(e,{emit:r}){const o=r,a=()=>{o("submitEmit")},i=()=>{o("resetEmit")};return(c,u)=>(t.openBlock(),t.createBlock(t.unref(Ta),{title:c.mainTitle},{main:t.withCtx(()=>[t.createElementVNode("div",oB,[t.createElementVNode("div",lB,t.toDisplayString(c.filterTitle),1),t.renderSlot(c.$slots,"default",{},void 0,!0)])]),footer:t.withCtx(()=>[t.createElementVNode("div",aB,[t.createVNode(t.unref(bt),{text:"執行","is-fill":"",type:"primary",onClick:a}),t.createVNode(t.unref(bt),{text:"重設",type:"primary",onClick:i})])]),_:3},8,["title"]))}}),[["__scopeId","data-v-80a39cc5"]]),sB={class:"w-full mb-4"},cB={class:"flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end"},uB={class:"flex items-center mr-4"},yl=t.defineComponent({__name:"SortTable",props:{data:{},columns:{},tableTitle:{},showSelection:{type:Boolean},loading:{type:Boolean},showSummary:{type:Boolean},showOverFlowTooltip:{type:Boolean},summaryMethod:{type:Function},sortTableRowClassName:{type:Function}},emits:["open:transfer","update:selectRow","click:cell","click:columnSort"],setup(e,{emit:r}){const o=r,a=()=>{o("open:transfer")},i=f=>{o("update:selectRow",f)},c=(f,h)=>{o("click:cell",f,h)},u=f=>{o("click:columnSort",f)};return(f,h)=>{const d=st,m=jr;return t.openBlock(),t.createElementBlock("div",sB,[t.createElementVNode("div",cB,[t.createElementVNode("div",uB,[t.createElementVNode("div",{class:"cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600",onClick:a},[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(t.unref(Zw))]),_:1})])])]),t.withDirectives(t.createVNode(t.unref(Gr),{"element-loading-text":"數據加載中...",data:f.data,columns:f.columns,"show-summary":f.showSummary,"show-over-flow-tooltip":f.showOverFlowTooltip,"summary-method":f.summaryMethod,"show-selection":f.showSelection,"base-table-row-class-name":f.sortTableRowClassName,onSelectionChange:i,onCellClick:c,onColumnSortChange:u},null,8,["data","columns","show-summary","show-over-flow-tooltip","summary-method","show-selection","base-table-row-class-name"]),[[m,f.loading]])])}}});function fB(e){return e.map(r=>({...r,checkActive:!0}))}const Gp=[Gr,bt,xo,Oo,yl,gl,qr];function qp(e,r){Gp.forEach(o=>{e.component(o.name||"VueTableComponent",o)})}const dB={install:qp,...Gp};Gr.install=e=>{e.component(Gr.name||"BaseTable",Gr)},bt.install=e=>{e.component(bt.name||"BaseBtn",bt)},xo.install=e=>{e.component(xo.name||"BaseInput",xo)},Oo.install=e=>{e.component(Oo.name||"BaseDialog",Oo)},yl.install=e=>{e.component(yl.name||"SortTable",yl)},gl.install=e=>{e.component(gl.name||"TitleTable",gl)},qr.install=e=>{e.component(qr.name||"SearchBar",qr)},Ae.BaseBtn=bt,Ae.BaseDialog=Oo,Ae.BaseInput=xo,Ae.BaseMultipleInput=Nk,Ae.BaseTable=Gr,Ae.DetailLayout=rB,Ae.FilterLayout=iB,Ae.FunctionHeader=jp,Ae.MainPanel=Ta,Ae.SearchBar=qr,Ae.SearchableListPanel=Qk,Ae.SortTable=yl,Ae.TitleTable=gl,Ae.TransferDialog=Uk,Ae.TransferItem=Kp,Ae.default=dB,Ae.install=qp,Ae.setActiveColumn=fB,Object.defineProperties(Ae,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
44
+ }`;var Ee=bg(function(){return ze(E,ie+"return "+Y).apply(o,N)});if(Ee.source=Y,Jc(Ee))throw Ee;return Ee}function x3(n){return De(n).toLowerCase()}function O3(n){return De(n).toUpperCase()}function N3(n,l,s){if(n=De(n),n&&(s||l===o))return Bh(n);if(!n||!(l=nn(l)))return n;var p=xn(n),C=xn(l),E=Th(p,C),N=xh(p,C)+1;return Or(p,E,N).join("")}function A3(n,l,s){if(n=De(n),n&&(s||l===o))return n.slice(0,Nh(n)+1);if(!n||!(l=nn(l)))return n;var p=xn(n),C=xh(p,xn(l))+1;return Or(p,0,C).join("")}function L3(n,l,s){if(n=De(n),n&&(s||l===o))return n.replace(Ao,"");if(!n||!(l=nn(l)))return n;var p=xn(n),C=Th(p,xn(l));return Or(p,C).join("")}function I3(n,l){var s=U,p=D;if(tt(l)){var C="separator"in l?l.separator:C;s="length"in l?_e(l.length):s,p="omission"in l?nn(l.omission):p}n=De(n);var E=n.length;if(Mo(n)){var N=xn(n);E=N.length}if(s>=E)return n;var I=s-$o(p);if(I<1)return p;var M=N?Or(N,0,I).join(""):n.slice(0,I);if(C===o)return M+p;if(N&&(I+=M.length-I),Qc(C)){if(n.slice(I).search(C)){var K,j=M;for(C.global||(C=mc(C.source,De(rt.exec(C))+"g")),C.lastIndex=0;K=C.exec(j);)var Y=K.index;M=M.slice(0,Y===o?I:Y)}}else if(n.indexOf(nn(C),I)!=I){var ee=M.lastIndexOf(C);ee>-1&&(M=M.slice(0,ee))}return M+p}function R3(n){return n=De(n),n&&Ds.test(n)?n.replace(Qn,cT):n}var P3=Uo(function(n,l,s){return n+(s?" ":"")+l.toUpperCase()}),nu=ym("toUpperCase");function gg(n,l,s){return n=De(n),l=s?o:l,l===o?oT(n)?dT(n):YB(n):n.match(l)||[]}var bg=Te(function(n,l){try{return en(n,o,l)}catch(s){return Jc(s)?s:new me(s)}}),M3=or(function(n,l){return mn(l,function(s){s=Un(s),nr(n,s,Xc(n[s],n))}),n});function $3(n){var l=n==null?0:n.length,s=ue();return n=l?Qe(n,function(p){if(typeof p[1]!="function")throw new gn(u);return[s(p[0]),p[1]]}):[],Te(function(p){for(var C=-1;++C<l;){var E=n[C];if(en(E[0],this,p))return en(E[1],this,p)}})}function V3(n){return cx(yn(n,g))}function ru(n){return function(){return n}}function F3(n,l){return n==null||n!==n?l:n}var z3=wm(),D3=wm(!0);function Gt(n){return n}function ou(n){return Xh(typeof n=="function"?n:yn(n,g))}function W3(n){return Jh(yn(n,g))}function H3(n,l){return Qh(n,yn(l,g))}var U3=Te(function(n,l){return function(s){return Ol(s,n,l)}}),K3=Te(function(n,l){return function(s){return Ol(n,s,l)}});function lu(n,l,s){var p=pt(l),C=Xa(l,p);s==null&&!(tt(l)&&(C.length||!p.length))&&(s=l,l=n,n=this,C=Xa(l,pt(l)));var E=!(tt(s)&&"chain"in s)||!!s.chain,N=ar(n);return mn(C,function(I){var M=l[I];n[I]=M,N&&(n.prototype[I]=function(){var K=this.__chain__;if(E||K){var j=n(this.__wrapped__),Y=j.__actions__=Ut(this.__actions__);return Y.push({func:M,args:arguments,thisArg:n}),j.__chain__=K,j}return M.apply(n,Sr([this.value()],arguments))})}),n}function j3(){return wt._===this&&(wt._=yT),this}function au(){}function G3(n){return n=_e(n),Te(function(l){return em(l,n)})}var q3=$c(Qe),Y3=$c(vh),X3=$c(sc);function yg(n){return Uc(n)?cc(Un(n)):Bx(n)}function Z3(n){return function(l){return n==null?o:ro(n,l)}}var J3=_m(),Q3=_m(!0);function iu(){return[]}function su(){return!1}function eA(){return{}}function tA(){return""}function nA(){return!0}function rA(n,l){if(n=_e(n),n<1||n>W)return[];var s=Q,p=kt(n,Q);l=ue(l),n-=Q;for(var C=dc(p,l);++s<n;)l(s);return C}function oA(n){return be(n)?Qe(n,Un):rn(n)?[n]:Ut(Vm(De(n)))}function lA(n){var l=++gT;return De(n)+l}var aA=ni(function(n,l){return n+l},0),iA=Vc("ceil"),sA=ni(function(n,l){return n/l},1),cA=Vc("floor");function uA(n){return n&&n.length?Ya(n,Gt,Sc):o}function fA(n,l){return n&&n.length?Ya(n,ue(l,2),Sc):o}function dA(n){return Eh(n,Gt)}function pA(n,l){return Eh(n,ue(l,2))}function hA(n){return n&&n.length?Ya(n,Gt,Tc):o}function mA(n,l){return n&&n.length?Ya(n,ue(l,2),Tc):o}var gA=ni(function(n,l){return n*l},1),bA=Vc("round"),yA=ni(function(n,l){return n-l},0);function CA(n){return n&&n.length?fc(n,Gt):0}function wA(n,l){return n&&n.length?fc(n,ue(l,2)):0}return _.after=W4,_.ary=Ym,_.assign=ON,_.assignIn=cg,_.assignInWith=mi,_.assignWith=NN,_.at=AN,_.before=Xm,_.bind=Xc,_.bindAll=M3,_.bindKey=Zm,_.castArray=eN,_.chain=jm,_.chunk=cO,_.compact=uO,_.concat=fO,_.cond=$3,_.conforms=V3,_.constant=ru,_.countBy=C4,_.create=LN,_.curry=Jm,_.curryRight=Qm,_.debounce=eg,_.defaults=IN,_.defaultsDeep=RN,_.defer=H4,_.delay=U4,_.difference=dO,_.differenceBy=pO,_.differenceWith=hO,_.drop=mO,_.dropRight=gO,_.dropRightWhile=bO,_.dropWhile=yO,_.fill=CO,_.filter=v4,_.flatMap=E4,_.flatMapDeep=k4,_.flatMapDepth=B4,_.flatten=Wm,_.flattenDeep=wO,_.flattenDepth=vO,_.flip=K4,_.flow=z3,_.flowRight=D3,_.fromPairs=_O,_.functions=DN,_.functionsIn=WN,_.groupBy=T4,_.initial=EO,_.intersection=kO,_.intersectionBy=BO,_.intersectionWith=TO,_.invert=UN,_.invertBy=KN,_.invokeMap=O4,_.iteratee=ou,_.keyBy=N4,_.keys=pt,_.keysIn=jt,_.map=ci,_.mapKeys=GN,_.mapValues=qN,_.matches=W3,_.matchesProperty=H3,_.memoize=fi,_.merge=YN,_.mergeWith=ug,_.method=U3,_.methodOf=K3,_.mixin=lu,_.negate=di,_.nthArg=G3,_.omit=XN,_.omitBy=ZN,_.once=j4,_.orderBy=A4,_.over=q3,_.overArgs=G4,_.overEvery=Y3,_.overSome=X3,_.partial=Zc,_.partialRight=tg,_.partition=L4,_.pick=JN,_.pickBy=fg,_.property=yg,_.propertyOf=Z3,_.pull=AO,_.pullAll=Um,_.pullAllBy=LO,_.pullAllWith=IO,_.pullAt=RO,_.range=J3,_.rangeRight=Q3,_.rearg=q4,_.reject=P4,_.remove=PO,_.rest=Y4,_.reverse=qc,_.sampleSize=$4,_.set=e3,_.setWith=t3,_.shuffle=V4,_.slice=MO,_.sortBy=D4,_.sortedUniq=HO,_.sortedUniqBy=UO,_.split=E3,_.spread=X4,_.tail=KO,_.take=jO,_.takeRight=GO,_.takeRightWhile=qO,_.takeWhile=YO,_.tap=u4,_.throttle=Z4,_.thru=si,_.toArray=ag,_.toPairs=dg,_.toPairsIn=pg,_.toPath=oA,_.toPlainObject=sg,_.transform=n3,_.unary=J4,_.union=XO,_.unionBy=ZO,_.unionWith=JO,_.uniq=QO,_.uniqBy=e4,_.uniqWith=t4,_.unset=r3,_.unzip=Yc,_.unzipWith=Km,_.update=o3,_.updateWith=l3,_.values=Go,_.valuesIn=a3,_.without=n4,_.words=gg,_.wrap=Q4,_.xor=r4,_.xorBy=o4,_.xorWith=l4,_.zip=a4,_.zipObject=i4,_.zipObjectDeep=s4,_.zipWith=c4,_.entries=dg,_.entriesIn=pg,_.extend=cg,_.extendWith=mi,lu(_,_),_.add=aA,_.attempt=bg,_.camelCase=u3,_.capitalize=hg,_.ceil=iA,_.clamp=i3,_.clone=tN,_.cloneDeep=rN,_.cloneDeepWith=oN,_.cloneWith=nN,_.conformsTo=lN,_.deburr=mg,_.defaultTo=F3,_.divide=sA,_.endsWith=f3,_.eq=Nn,_.escape=d3,_.escapeRegExp=p3,_.every=w4,_.find=_4,_.findIndex=zm,_.findKey=PN,_.findLast=S4,_.findLastIndex=Dm,_.findLastKey=MN,_.floor=cA,_.forEach=Gm,_.forEachRight=qm,_.forIn=$N,_.forInRight=VN,_.forOwn=FN,_.forOwnRight=zN,_.get=eu,_.gt=aN,_.gte=iN,_.has=HN,_.hasIn=tu,_.head=Hm,_.identity=Gt,_.includes=x4,_.indexOf=SO,_.inRange=s3,_.invoke=jN,_.isArguments=ao,_.isArray=be,_.isArrayBuffer=sN,_.isArrayLike=Kt,_.isArrayLikeObject=at,_.isBoolean=cN,_.isBuffer=Nr,_.isDate=uN,_.isElement=fN,_.isEmpty=dN,_.isEqual=pN,_.isEqualWith=hN,_.isError=Jc,_.isFinite=mN,_.isFunction=ar,_.isInteger=ng,_.isLength=pi,_.isMap=rg,_.isMatch=gN,_.isMatchWith=bN,_.isNaN=yN,_.isNative=CN,_.isNil=vN,_.isNull=wN,_.isNumber=og,_.isObject=tt,_.isObjectLike=ot,_.isPlainObject=Pl,_.isRegExp=Qc,_.isSafeInteger=_N,_.isSet=lg,_.isString=hi,_.isSymbol=rn,_.isTypedArray=jo,_.isUndefined=SN,_.isWeakMap=EN,_.isWeakSet=kN,_.join=xO,_.kebabCase=h3,_.last=wn,_.lastIndexOf=OO,_.lowerCase=m3,_.lowerFirst=g3,_.lt=BN,_.lte=TN,_.max=uA,_.maxBy=fA,_.mean=dA,_.meanBy=pA,_.min=hA,_.minBy=mA,_.stubArray=iu,_.stubFalse=su,_.stubObject=eA,_.stubString=tA,_.stubTrue=nA,_.multiply=gA,_.nth=NO,_.noConflict=j3,_.noop=au,_.now=ui,_.pad=b3,_.padEnd=y3,_.padStart=C3,_.parseInt=w3,_.random=c3,_.reduce=I4,_.reduceRight=R4,_.repeat=v3,_.replace=_3,_.result=QN,_.round=bA,_.runInContext=P,_.sample=M4,_.size=F4,_.snakeCase=S3,_.some=z4,_.sortedIndex=$O,_.sortedIndexBy=VO,_.sortedIndexOf=FO,_.sortedLastIndex=zO,_.sortedLastIndexBy=DO,_.sortedLastIndexOf=WO,_.startCase=k3,_.startsWith=B3,_.subtract=yA,_.sum=CA,_.sumBy=wA,_.template=T3,_.times=rA,_.toFinite=ir,_.toInteger=_e,_.toLength=ig,_.toLower=x3,_.toNumber=vn,_.toSafeInteger=xN,_.toString=De,_.toUpper=O3,_.trim=N3,_.trimEnd=A3,_.trimStart=L3,_.truncate=I3,_.unescape=R3,_.uniqueId=lA,_.upperCase=P3,_.upperFirst=nu,_.each=Gm,_.eachRight=qm,_.first=Hm,lu(_,(function(){var n={};return Wn(_,function(l,s){Ue.call(_.prototype,s)||(n[s]=l)}),n})(),{chain:!1}),_.VERSION=a,mn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){_[n].placeholder=_}),mn(["drop","take"],function(n,l){Le.prototype[n]=function(s){s=s===o?1:ft(_e(s),0);var p=this.__filtered__&&!l?new Le(this):this.clone();return p.__filtered__?p.__takeCount__=kt(s,p.__takeCount__):p.__views__.push({size:kt(s,Q),type:n+(p.__dir__<0?"Right":"")}),p},Le.prototype[n+"Right"]=function(s){return this.reverse()[n](s).reverse()}}),mn(["filter","map","takeWhile"],function(n,l){var s=l+1,p=s==oe||s==re;Le.prototype[n]=function(C){var E=this.clone();return E.__iteratees__.push({iteratee:ue(C,3),type:s}),E.__filtered__=E.__filtered__||p,E}}),mn(["head","last"],function(n,l){var s="take"+(l?"Right":"");Le.prototype[n]=function(){return this[s](1).value()[0]}}),mn(["initial","tail"],function(n,l){var s="drop"+(l?"":"Right");Le.prototype[n]=function(){return this.__filtered__?new Le(this):this[s](1)}}),Le.prototype.compact=function(){return this.filter(Gt)},Le.prototype.find=function(n){return this.filter(n).head()},Le.prototype.findLast=function(n){return this.reverse().find(n)},Le.prototype.invokeMap=Te(function(n,l){return typeof n=="function"?new Le(this):this.map(function(s){return Ol(s,n,l)})}),Le.prototype.reject=function(n){return this.filter(di(ue(n)))},Le.prototype.slice=function(n,l){n=_e(n);var s=this;return s.__filtered__&&(n>0||l<0)?new Le(s):(n<0?s=s.takeRight(-n):n&&(s=s.drop(n)),l!==o&&(l=_e(l),s=l<0?s.dropRight(-l):s.take(l-n)),s)},Le.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Le.prototype.toArray=function(){return this.take(Q)},Wn(Le.prototype,function(n,l){var s=/^(?:filter|find|map|reject)|While$/.test(l),p=/^(?:head|last)$/.test(l),C=_[p?"take"+(l=="last"?"Right":""):l],E=p||/^find/.test(l);C&&(_.prototype[l]=function(){var N=this.__wrapped__,I=p?[1]:arguments,M=N instanceof Le,K=I[0],j=M||be(N),Y=function(Ne){var Ie=C.apply(_,Sr([Ne],I));return p&&ee?Ie[0]:Ie};j&&s&&typeof K=="function"&&K.length!=1&&(M=j=!1);var ee=this.__chain__,ie=!!this.__actions__.length,fe=E&&!ee,Ee=M&&!ie;if(!E&&j){N=Ee?N:new Le(this);var de=n.apply(N,I);return de.__actions__.push({func:si,args:[Y],thisArg:o}),new bn(de,ee)}return fe&&Ee?n.apply(this,I):(de=this.thru(Y),fe?p?de.value()[0]:de.value():de)})}),mn(["pop","push","shift","sort","splice","unshift"],function(n){var l=Ra[n],s=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",p=/^(?:pop|shift)$/.test(n);_.prototype[n]=function(){var C=arguments;if(p&&!this.__chain__){var E=this.value();return l.apply(be(E)?E:[],C)}return this[s](function(N){return l.apply(be(N)?N:[],C)})}}),Wn(Le.prototype,function(n,l){var s=_[l];if(s){var p=s.name+"";Ue.call(Do,p)||(Do[p]=[]),Do[p].push({name:l,func:s})}}),Do[ti(o,B).name]=[{name:"wrapper",func:o}],Le.prototype.clone=RT,Le.prototype.reverse=PT,Le.prototype.value=MT,_.prototype.at=f4,_.prototype.chain=d4,_.prototype.commit=p4,_.prototype.next=h4,_.prototype.plant=g4,_.prototype.reverse=b4,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=y4,_.prototype.first=_.prototype.head,_l&&(_.prototype[_l]=m4),_}),Vo=pT();Jr?((Jr.exports=Vo)._=Vo,oc._=Vo):wt._=Vo}).call(Fk)})(bl,bl.exports)),bl.exports}var Dk=zk();const Ba=sS(Dk),Kp=t.defineComponent({__name:"transferItem",props:{dialogModalVisible:{type:Boolean},columnsValue:{},columnsIndex:{},columnsLen:{}},emits:["update:toTop","update:toPre","update:toNext","update:toBottom"],setup(e){const r=e,o=t.reactive({itemOnHover:!1,itemOnClick:!1}),a=()=>{o.itemOnClick=!0,o.itemOnHover=!1},i=()=>{o.itemOnClick=!1,o.itemOnHover=!0};return t.watch(()=>r.dialogModalVisible,c=>{c||(o.itemOnClick=!1,o.itemOnHover=!1)}),(c,u)=>{const f=yr,h=AS,d=X2;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transfer-item-wrapper",{"cursor-grab":o.itemOnHover,"cursor-grabbing":o.itemOnClick}]),onMouseenter:u[4]||(u[4]=m=>o.itemOnHover=!0),onMouseleave:u[5]||(u[5]=m=>o.itemOnHover=!1),onMousedown:a,onMouseup:i},[(t.openBlock(),t.createBlock(f,{label:c.columnsValue.label,value:c.columnsValue.prop,key:c.columnsValue.prop},null,8,["label","value"])),c.columnsValue.checkActive?(t.openBlock(),t.createBlock(d,{key:0,class:"transfer-arrow-wrapper"},{default:t.withCtx(()=>[t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(bt),{icon:t.unref(Qw),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:u[0]||(u[0]=m=>c.$emit("update:toTop"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(bt),{icon:t.unref(Kf),disabled:c.columnsIndex===0,link:"",type:"primary",onClick:u[1]||(u[1]=m=>c.$emit("update:toPre"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(bt),{icon:t.unref(zi),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:u[2]||(u[2]=m=>c.$emit("update:toNext"))},null,8,["icon","disabled"])]),_:1}),t.createVNode(h,{span:6},{default:t.withCtx(()=>[t.createVNode(t.unref(bt),{icon:t.unref(Pw),disabled:c.columnsIndex===c.columnsLen-1,link:"",type:"primary",onClick:u[3]||(u[3]=m=>c.$emit("update:toBottom"))},null,8,["icon","disabled"])]),_:1})]),_:1})):t.createCommentVNode("",!0)],34)}}}),Wk={class:"search-bar"},Hk={class:"transfer-sort-wrapper"},Uk=t.defineComponent({__name:"TransferDialog",props:{modelValue:{type:Boolean},columnsValue:{},transferTitle:{}},emits:["update:modelValue","update:submit","update:checkChange"],setup(e,{emit:r}){const o=e,a=r,i=t.computed({get:()=>o.modelValue,set:w=>a("update:modelValue",w)}),c=t.reactive({localColumns:Ba.cloneDeep(o.columnsValue),clickItemProp:"",checkList:o.columnsValue.map(w=>w.prop)}),u={toTop:w=>{if(w<=0)return;const k=c.localColumns.splice(w,1)[0];c.localColumns.unshift(k)},toBottom:w=>{if(w>=c.localColumns.length-1)return;const k=c.localColumns.splice(w,1)[0];c.localColumns.push(k)},toPre:w=>{if(w>0){const k=c.localColumns[w];c.localColumns[w]=c.localColumns[w-1],c.localColumns[w-1]=k}},toNext:w=>{if(w<c.localColumns.length-1){const k=c.localColumns[w];c.localColumns[w]=c.localColumns[w+1],c.localColumns[w+1]=k}}},f=()=>{c.localColumns=Ba.cloneDeep(o.columnsValue),c.checkList=o.columnsValue.filter(w=>w.checkActive).map(w=>w.prop||"")};t.watch(()=>i.value,w=>{w?f():(c.clickItemProp="",c.localColumns=[],c.checkList=[])});const h=()=>{a("update:submit",c.localColumns)},d=w=>{const k=o.columnsValue.map(B=>B.prop);c.checkList=w?k:[],m(c.checkList)},m=w=>{const k=w.map(B=>String(B));c.localColumns.forEach(B=>{B.checkActive=k.includes(B.prop)}),a("update:checkChange",{columns:c.localColumns,checkList:c.checkList})},g=t.computed(()=>c.localColumns.length>0&&c.checkList.length===c.localColumns.length),v=t.computed({get:()=>g.value,set:w=>d(w)}),y=()=>{c.localColumns=Ba.cloneDeep(o.columnsValue)},b=w=>{if(w.length>0){const k=Ba.cloneDeep(c.localColumns);c.localColumns=k.filter(B=>B.label.includes(w))}else y()};return(w,k)=>{const B=yr,A=_S;return t.openBlock(),t.createBlock(Oo,{modelValue:i.value,"onUpdate:modelValue":k[2]||(k[2]=T=>i.value=T),title:w.transferTitle,"onClick:submit":h},{default:t.withCtx(()=>[t.createElementVNode("div",Wk,[t.createVNode(qr,{"show-search":!0,"onUpdate:clear":y,"onKeydown:enter":b})]),t.createElementVNode("div",Hk,[t.createVNode(B,{modelValue:v.value,"onUpdate:modelValue":k[0]||(k[0]=T=>v.value=T),class:"px-4",onChange:d},{default:t.withCtx(()=>[t.createTextVNode(" 欄 ("+t.toDisplayString(c.checkList.length)+"/"+t.toDisplayString(c.localColumns.length)+") ",1)]),_:1},8,["modelValue"]),t.createVNode(A,{modelValue:c.checkList,"onUpdate:modelValue":k[1]||(k[1]=T=>c.checkList=T),onChange:m},{default:t.withCtx(()=>[t.renderSlot(w.$slots,"list-container",{columns:c.localColumns,clickItemProp:c.clickItemProp,handleItemEvents:u,handleMousedown:T=>c.clickItemProp=T},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.localColumns,(T,S)=>(t.openBlock(),t.createBlock(Kp,{key:T.prop,"dialog-modal-visible":i.value,"columns-value":T,"columns-index":S,"columns-len":c.localColumns.length,class:t.normalizeClass({"transfer-active-bg":T.checkActive,"transfer-active-border":c.clickItemProp==T.prop}),onMousedown:x=>c.clickItemProp=T.prop||"","onUpdate:toTop":x=>u.toTop(S),"onUpdate:toBottom":x=>u.toBottom(S),"onUpdate:toPre":x=>u.toPre(S),"onUpdate:toNext":x=>u.toNext(S)},null,8,["dialog-modal-visible","columns-value","columns-index","columns-len","class","onMousedown","onUpdate:toTop","onUpdate:toBottom","onUpdate:toPre","onUpdate:toNext"]))),128))])]),_:3},8,["modelValue"])])]),_:3},8,["modelValue","title"])}}}),Kk={class:"h-header px-4 py-4 flex justify-between items-center bg-primary-10"},jk={class:"flex items-center gap-2"},Gk={key:0,class:"flex items-center text-black"},qk={class:"font-bold text-text text-xl md:text-2xl;"},Yk={class:"flex items-center gap-3"},jp=t.defineComponent({__name:"FunctionHeader",props:{title:{type:String,required:!1,default:""},showBack:{type:[Boolean,String,Object],required:!1,default:!1},depth:{type:Number,required:!1,default:1}},emits:["back"],setup(e,{emit:r}){const o=e,a=r,i=()=>{const c={};switch(typeof o.showBack){case"string":c.path=o.showBack;break;case"object":Object.assign(c,o.showBack);break;default:c.path=""}a("back",c)};return(c,u)=>{const f=st;return t.openBlock(),t.createElementBlock("div",Kk,[t.createElementVNode("div",jk,[e.showBack?(t.openBlock(),t.createElementBlock("div",Gk,[t.createVNode(f,{size:16,class:"cursor-pointer",onClick:i},{default:t.withCtx(()=>[t.createVNode(t.unref(Ow))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",qk,t.toDisplayString(o.title),1)]),t.createElementVNode("div",Yk,[t.renderSlot(c.$slots,"default")])])}}}),Xk={key:0,class:"px-4 pt-1.5"},Zk={key:1,class:"py-1.5 px-4"},Jk={key:0,class:"flex justify-start pl-1.5 pt-0"},Ta=To(t.defineComponent({__name:"MainPanel",props:{title:{default:""},showBack:{type:[Boolean,String,Object],default:!1},depth:{default:1}},emits:["click:back"],setup(e,{emit:r}){const o=e,a=r,i=()=>{a("click:back")};return(c,u)=>{const f=la;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(jp),{title:o.title,showBack:o.showBack,onBack:i,depth:o.depth},null,8,["title","showBack","depth"]),t.createVNode(f,{class:"panel-scrollbar"},{default:t.withCtx(()=>[c.$slots.searchBar?(t.openBlock(),t.createElementBlock("div",Xk,[t.renderSlot(c.$slots,"searchBar",{},void 0,!0)])):t.createCommentVNode("",!0),c.$slots.main?(t.openBlock(),t.createElementBlock("div",Zk,[t.renderSlot(c.$slots,"main",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3}),c.$slots.footer?(t.openBlock(),t.createElementBlock("div",Jk,[t.renderSlot(c.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],64)}}}),[["__scopeId","data-v-c88d2537"]]),Qk=t.defineComponent({__name:"SearchableListPanel",props:{title:{},pagination:{},showBack:{type:[Boolean,String,Object]},showSearch:{type:Boolean},showEdit:{type:Boolean},showFilter:{type:Boolean},showDefaultSearch:{type:Boolean}},emits:["search","updatePage","updatePageSize","click:back"],setup(e,{emit:r}){const o=e,{pagination:a}=t.toRefs(o),i=r,c=t.computed(()=>o.showDefaultSearch||o.showSearch&&o.showEdit&&o.showFilter),u=g=>{i("search",g)},f=()=>{i("search",null)},h=g=>{i("updatePage",g)},d=g=>{i("updatePageSize",g)},m=()=>{i("click:back")};return(g,v)=>{const y=K2;return t.openBlock(),t.createBlock(t.unref(Ta),{title:o.title,"show-back":g.showBack,"onClick:back":m},{searchBar:t.withCtx(()=>[t.createVNode(t.unref(qr),{"show-filter":c.value||g.showFilter,"show-search":c.value||g.showSearch,"onKeydown:enter":u,"onUpdate:clear":f},{button:t.withCtx(()=>[t.renderSlot(g.$slots,"firstButton"),c.value||g.showEdit?t.renderSlot(g.$slots,"customButton",{key:0}):t.createCommentVNode("",!0),t.renderSlot(g.$slots,"lastButton")]),customerFilter:t.withCtx(()=>[t.renderSlot(g.$slots,"filterButton")]),_:3},8,["show-filter","show-search"])]),main:t.withCtx(()=>[t.renderSlot(g.$slots,"main")]),footer:t.withCtx(()=>[t.unref(a).totalCount>0?(t.openBlock(),t.createBlock(y,{key:0,layout:"jumper, prev, pager, next, total, sizes","page-sizes":[10,20,30,40,50],"current-page":t.unref(a).page,"page-size":t.unref(a).limit,total:t.unref(a).totalCount,onCurrentChange:h,onSizeChange:d},null,8,["current-page","page-size","total"])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),eB={class:"detail-container"},tB={class:"content-wrapper"},nB={key:0,class:"border-t pt-4 w-full flex items-center justify-end"},rB=To(t.defineComponent({__name:"DetailLayout",props:{title:{},showBack:{type:[Boolean,String,Object]},isEditable:{type:Boolean},pageLoading:{type:Boolean}},emits:["update:saveEdit","update:cancelEdit","click:back"],setup(e,{emit:r}){const o=r,a=()=>{o("update:saveEdit",!1)},i=()=>{o("update:cancelEdit")},c=()=>{o("click:back")};return(u,f)=>{const h=jr;return t.openBlock(),t.createBlock(t.unref(Ta),{title:u.title,"show-back":u.showBack,"onClick:back":c},{main:t.withCtx(()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",eB,[t.renderSlot(u.$slots,"detailHeader",{},void 0,!0),t.createElementVNode("div",tB,[t.renderSlot(u.$slots,"main",{},void 0,!0)])])),[[h,u.pageLoading]])]),footer:t.withCtx(()=>[u.isEditable?(t.openBlock(),t.createElementBlock("div",nB,[t.createVNode(t.unref(bt),{text:"儲存",type:"primary","is-fill":"",onClick:a}),t.createVNode(t.unref(bt),{text:"捨棄",type:"primary",onClick:i})])):t.createCommentVNode("",!0)]),_:3},8,["title","show-back"])}}}),[["__scopeId","data-v-143be0ac"]]),oB={class:"filter-container"},lB={class:"filter-header"},aB={class:"submit-row"},iB=To(t.defineComponent({__name:"FilterLayout",props:{mainTitle:{},showBack:{type:[Boolean,String,Object]},filterTitle:{}},emits:["submitEmit","resetEmit","click:back"],setup(e,{emit:r}){const o=r,a=()=>{o("submitEmit")},i=()=>{o("resetEmit")},c=()=>{o("click:back")};return(u,f)=>(t.openBlock(),t.createBlock(t.unref(Ta),{title:u.mainTitle,"show-back":u.showBack,"onClick:back":c},{main:t.withCtx(()=>[t.createElementVNode("div",oB,[t.createElementVNode("div",lB,t.toDisplayString(u.filterTitle),1),t.renderSlot(u.$slots,"default",{},void 0,!0)])]),footer:t.withCtx(()=>[t.createElementVNode("div",aB,[t.createVNode(t.unref(bt),{text:"執行","is-fill":"",type:"primary",onClick:a}),t.createVNode(t.unref(bt),{text:"重設",type:"primary",onClick:i})])]),_:3},8,["title","show-back"]))}}),[["__scopeId","data-v-84e37068"]]),sB={class:"w-full mb-4"},cB={class:"flex items-center h-12 bg-gray-200 px-1.5 rounded-t justify-end"},uB={class:"flex items-center mr-4"},yl=t.defineComponent({__name:"SortTable",props:{data:{},columns:{},tableTitle:{},showSelection:{type:Boolean},loading:{type:Boolean},showSummary:{type:Boolean},showOverFlowTooltip:{type:Boolean},summaryMethod:{type:Function},sortTableRowClassName:{type:Function}},emits:["open:transfer","update:selectRow","click:cell","click:columnSort"],setup(e,{emit:r}){const o=r,a=()=>{o("open:transfer")},i=f=>{o("update:selectRow",f)},c=(f,h)=>{o("click:cell",f,h)},u=f=>{o("click:columnSort",f)};return(f,h)=>{const d=st,m=jr;return t.openBlock(),t.createElementBlock("div",sB,[t.createElementVNode("div",cB,[t.createElementVNode("div",uB,[t.createElementVNode("div",{class:"cursor-pointer text-text text-xl flex items-center justify-center hover:text-blue-600",onClick:a},[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(t.unref(Zw))]),_:1})])])]),t.withDirectives(t.createVNode(t.unref(Gr),{"element-loading-text":"數據加載中...",data:f.data,columns:f.columns,"show-summary":f.showSummary,"show-over-flow-tooltip":f.showOverFlowTooltip,"summary-method":f.summaryMethod,"show-selection":f.showSelection,"base-table-row-class-name":f.sortTableRowClassName,onSelectionChange:i,onCellClick:c,onColumnSortChange:u},null,8,["data","columns","show-summary","show-over-flow-tooltip","summary-method","show-selection","base-table-row-class-name"]),[[m,f.loading]])])}}});function fB(e){return e.map(r=>({...r,checkActive:!0}))}const Gp=[Gr,bt,xo,Oo,yl,gl,qr];function qp(e,r){Gp.forEach(o=>{e.component(o.name||"VueTableComponent",o)})}const dB={install:qp,...Gp};Gr.install=e=>{e.component(Gr.name||"BaseTable",Gr)},bt.install=e=>{e.component(bt.name||"BaseBtn",bt)},xo.install=e=>{e.component(xo.name||"BaseInput",xo)},Oo.install=e=>{e.component(Oo.name||"BaseDialog",Oo)},yl.install=e=>{e.component(yl.name||"SortTable",yl)},gl.install=e=>{e.component(gl.name||"TitleTable",gl)},qr.install=e=>{e.component(qr.name||"SearchBar",qr)},Ae.BaseBtn=bt,Ae.BaseDialog=Oo,Ae.BaseInput=xo,Ae.BaseMultipleInput=Nk,Ae.BaseTable=Gr,Ae.DetailLayout=rB,Ae.FilterLayout=iB,Ae.FunctionHeader=jp,Ae.MainPanel=Ta,Ae.SearchBar=qr,Ae.SearchableListPanel=Qk,Ae.SortTable=yl,Ae.TitleTable=gl,Ae.TransferDialog=Uk,Ae.TransferItem=Kp,Ae.default=dB,Ae.install=qp,Ae.setActiveColumn=fB,Object.defineProperties(Ae,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));