jwt-ui 1.11.26 → 1.11.28

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/lib/jwt-ui.umd.js CHANGED
@@ -214,7 +214,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
214
214
  * @author RubaXa <trash@rubaxa.org>
215
215
  * @author owenm <owen23355@gmail.com>
216
216
  * @license MIT
217
- */function GW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GW(Object(n),!0).forEach(function(i){m8e(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function $b(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$b=function(t){return typeof t}:$b=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$b(e)}function m8e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ka(){return Ka=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ka.apply(this,arguments)}function v8e(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,o;for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function y8e(e,t){if(e==null)return{};var n=v8e(e,t),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var b8e="1.15.2";function Wa(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ga=Wa(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Cm=Wa(/Edge/i),JW=Wa(/firefox/i),Sm=Wa(/safari/i)&&!Wa(/chrome/i)&&!Wa(/android/i),YW=Wa(/iP(ad|od|hone)/i),XW=Wa(/chrome/i)&&Wa(/android/i),ZW={capture:!1,passive:!1};function hn(e,t,n){e.addEventListener(t,n,!Ga&&ZW)}function sn(e,t,n){e.removeEventListener(t,n,!Ga&&ZW)}function ek(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function k8e(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Fo(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&ek(e,t):ek(e,t))||i&&e===n)return e;if(e===n)break}while(e=k8e(e))}return null}var QW=/\s+/g;function Hr(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(QW," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(QW," ")}}function Dt(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function hd(e,t){var n="";if(typeof e=="string")n=e;else do{var i=Dt(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function $W(e,t,n){if(e){var i=e.getElementsByTagName(t),r=0,o=i.length;if(n)for(;r<o;r++)n(i[r],r);return i}return[]}function ga(){var e=document.scrollingElement;return e||document.documentElement}function bi(e,t,n,i,r){if(!(!e.getBoundingClientRect&&e!==window)){var o,a,s,u,c,f,d;if(e!==window&&e.parentNode&&e!==ga()?(o=e.getBoundingClientRect(),a=o.top,s=o.left,u=o.bottom,c=o.right,f=o.height,d=o.width):(a=0,s=0,u=window.innerHeight,c=window.innerWidth,f=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!Ga))do if(r&&r.getBoundingClientRect&&(Dt(r,"transform")!=="none"||n&&Dt(r,"position")!=="static")){var h=r.getBoundingClientRect();a-=h.top+parseInt(Dt(r,"border-top-width")),s-=h.left+parseInt(Dt(r,"border-left-width")),u=a+o.height,c=s+o.width;break}while(r=r.parentNode);if(i&&e!==window){var p=hd(r||e),m=p&&p.a,v=p&&p.d;p&&(a/=v,s/=m,d/=m,f/=v,u=a+f,c=s+d)}return{top:a,left:s,bottom:u,right:c,width:d,height:f}}}function eG(e,t,n){for(var i=bl(e,!0),r=bi(e)[t];i;){var o=bi(i)[n],a=void 0;if(a=r>=o,!a)return i;if(i===ga())break;i=bl(i,!1)}return!1}function pd(e,t,n,i){for(var r=0,o=0,a=e.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==Tt.ghost&&(i||a[o]!==Tt.dragged)&&Fo(a[o],n.draggable,e,!1)){if(r===t)return a[o];r++}o++}return null}function _E(e,t){for(var n=e.lastElementChild;n&&(n===Tt.ghost||Dt(n,"display")==="none"||t&&!ek(n,t));)n=n.previousElementSibling;return n||null}function po(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Tt.clone&&(!t||ek(e,t))&&n++;return n}function tG(e){var t=0,n=0,i=ga();if(e)do{var r=hd(e),o=r.a,a=r.d;t+=e.scrollLeft*o,n+=e.scrollTop*a}while(e!==i&&(e=e.parentNode));return[t,n]}function w8e(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function bl(e,t){if(!e||!e.getBoundingClientRect)return ga();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=Dt(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return ga();if(i||t)return n;i=!0}}while(n=n.parentNode);return ga()}function _8e(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function CE(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var xm;function nG(e,t){return function(){if(!xm){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),xm=setTimeout(function(){xm=void 0},t)}}}function C8e(){clearTimeout(xm),xm=void 0}function iG(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function rG(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function oG(e,t,n){var i={};return Array.from(e.children).forEach(function(r){var o,a,s,u;if(!(!Fo(r,t.draggable,e,!1)||r.animated||r===n)){var c=bi(r);i.left=Math.min((o=i.left)!==null&&o!==void 0?o:1/0,c.left),i.top=Math.min((a=i.top)!==null&&a!==void 0?a:1/0,c.top),i.right=Math.max((s=i.right)!==null&&s!==void 0?s:-1/0,c.right),i.bottom=Math.max((u=i.bottom)!==null&&u!==void 0?u:-1/0,c.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var qr="Sortable"+new Date().getTime();function S8e(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(Dt(i,"display")==="none"||i===Tt.ghost)){e.push({target:i,rect:bi(i)});var r=pa({},e[e.length-1].rect);if(i.thisAnimationDuration){var o=hd(i,!0);o&&(r.top-=o.f,r.left-=o.e)}i.fromRect=r}})}},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(w8e(e,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var r=!1,o=0;e.forEach(function(a){var s=0,u=a.target,c=u.fromRect,f=bi(u),d=u.prevFromRect,h=u.prevToRect,p=a.rect,m=hd(u,!0);m&&(f.top-=m.f,f.left-=m.e),u.toRect=f,u.thisAnimationDuration&&CE(d,f)&&!CE(c,f)&&(p.top-f.top)/(p.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(s=E8e(p,d,h,i.options)),CE(f,c)||(u.prevFromRect=c,u.prevToRect=f,s||(s=i.options.animation),i.animate(u,p,f,s)),s&&(r=!0,o=Math.max(o,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(t),r?t=setTimeout(function(){typeof n=="function"&&n()},o):typeof n=="function"&&n(),e=[]},animate:function(n,i,r,o){if(o){Dt(n,"transition",""),Dt(n,"transform","");var a=hd(this.el),s=a&&a.a,u=a&&a.d,c=(i.left-r.left)/(s||1),f=(i.top-r.top)/(u||1);n.animatingX=!!c,n.animatingY=!!f,Dt(n,"transform","translate3d("+c+"px,"+f+"px,0)"),this.forRepaintDummy=x8e(n),Dt(n,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Dt(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){Dt(n,"transition",""),Dt(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},o)}}}}function x8e(e){return e.offsetWidth}function E8e(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var gd=[],SE={initializeByDefault:!0},Em={mount:function(e){for(var t in SE)SE.hasOwnProperty(t)&&!(t in e)&&(e[t]=SE[t]);gd.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),gd.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var r=e+"Global";gd.forEach(function(o){t[o.pluginName]&&(t[o.pluginName][r]&&t[o.pluginName][r](pa({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](pa({sortable:t},n)))})},initializePlugins:function(e,t,n,i){gd.forEach(function(a){var s=a.pluginName;if(!(!e.options[s]&&!a.initializeByDefault)){var u=new a(e,t,e.options);u.sortable=e,u.options=e.options,e[s]=u,Ka(n,u.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var o=this.modifyOption(e,r,e.options[r]);typeof o<"u"&&(e.options[r]=o)}},getEventProperties:function(e,t){var n={};return gd.forEach(function(i){typeof i.eventProperties=="function"&&Ka(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return gd.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[t]=="function"&&(i=r.optionListeners[t].call(e[r.pluginName],n))}),i}};function B8e(e){var t=e.sortable,n=e.rootEl,i=e.name,r=e.targetEl,o=e.cloneEl,a=e.toEl,s=e.fromEl,u=e.oldIndex,c=e.newIndex,f=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,p=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[qr],!!t){var v,y=t.options,b="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Ga&&!Cm?v=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(i,!0,!0)),v.to=a||n,v.from=s||n,v.item=r||n,v.clone=o,v.oldIndex=u,v.newIndex=c,v.oldDraggableIndex=f,v.newDraggableIndex=d,v.originalEvent=h,v.pullMode=p?p.lastPutMode:void 0;var g=pa(pa({},m),Em.getEventProperties(i,t));for(var k in g)v[k]=g[k];n&&n.dispatchEvent(v),y[b]&&y[b].call(t,v)}}var D8e=["evt"],Er=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,r=y8e(n,D8e);Em.pluginEvent.bind(Tt)(e,t,pa({dragEl:it,parentEl:ei,ghostEl:It,rootEl:qn,nextEl:tf,lastDownEl:tk,cloneEl:Jn,cloneHidden:kl,dragStarted:Dm,putSortable:Ki,activeSortable:Tt.active,originalEvent:i,oldIndex:md,oldDraggableIndex:Bm,newIndex:Kr,newDraggableIndex:wl,hideGhostForTarget:dG,unhideGhostForTarget:hG,cloneNowHidden:function(){kl=!0},cloneNowShown:function(){kl=!1},dispatchSortableEvent:function(o){cr({sortable:t,name:o,originalEvent:i})}},r))};function cr(e){B8e(pa({putSortable:Ki,cloneEl:Jn,targetEl:it,rootEl:qn,oldIndex:md,oldDraggableIndex:Bm,newIndex:Kr,newDraggableIndex:wl},e))}var it,ei,It,qn,tf,tk,Jn,kl,md,Kr,Bm,wl,nk,Ki,vd=!1,ik=!1,rk=[],nf,Po,xE,EE,aG,sG,Dm,yd,Tm,Am=!1,ok=!1,ak,ir,BE=[],DE=!1,sk=[],lk=typeof document<"u",uk=YW,lG=Cm||Ga?"cssFloat":"float",T8e=lk&&!XW&&!YW&&"draggable"in document.createElement("div"),uG=function(){if(lk){if(Ga)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),fG=function(e,t){var n=Dt(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=pd(e,0,t),o=pd(e,1,t),a=r&&Dt(r),s=o&&Dt(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+bi(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+bi(o).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var f=a.float==="left"?"left":"right";return o&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=i&&n[lG]==="none"||o&&n[lG]==="none"&&u+c>i)?"vertical":"horizontal"},A8e=function(e,t,n){var i=n?e.left:e.top,r=n?e.right:e.bottom,o=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,u=n?t.width:t.height;return i===a||r===s||i+o/2===a+u/2},O8e=function(e,t){var n;return rk.some(function(i){var r=i[qr].options.emptyInsertThreshold;if(!(!r||_E(i))){var o=bi(i),a=e>=o.left-r&&e<=o.right+r,s=t>=o.top-r&&t<=o.bottom+r;if(a&&s)return n=i}}),n},cG=function(e){function t(r,o){return function(a,s,u,c){var f=a.options.group.name&&s.options.group.name&&a.options.group.name===s.options.group.name;if(r==null&&(o||f))return!0;if(r==null||r===!1)return!1;if(o&&r==="clone")return r;if(typeof r=="function")return t(r(a,s,u,c),o)(a,s,u,c);var d=(o?a:s).options.group.name;return r===!0||typeof r=="string"&&r===d||r.join&&r.indexOf(d)>-1}}var n={},i=e.group;(!i||$b(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},dG=function(){!uG&&It&&Dt(It,"display","none")},hG=function(){!uG&&It&&Dt(It,"display","")};lk&&!XW&&document.addEventListener("click",function(e){if(ik)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ik=!1,!1},!0);var rf=function(e){if(it){e=e.touches?e.touches[0]:e;var t=O8e(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[qr]._onDragOver(n)}}},F8e=function(e){it&&it.parentNode[qr]._isOutsideThisEl(e.target)};function Tt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ka({},t),e[qr]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return fG(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,a){o.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Tt.supportPointer!==!1&&"PointerEvent"in window&&!Sm,emptyInsertThreshold:5};Em.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);cG(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:T8e,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?hn(e,"pointerdown",this._onTapStart):(hn(e,"mousedown",this._onTapStart),hn(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(hn(e,"dragover",this),hn(e,"dragenter",this)),rk.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ka(this,S8e())}Tt.prototype={constructor:Tt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(yd=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,it):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,r=i.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(a||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=i.filter;if(z8e(n),!it&&!(/mousedown|pointerdown/.test(o)&&e.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Sm&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=Fo(s,i.draggable,n,!1),!(s&&s.animated)&&tk!==s)){if(md=po(s),Bm=po(s,i.draggable),typeof c=="function"){if(c.call(this,e,s,this)){cr({sortable:t,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),Er("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=Fo(u,f.trim(),n,!1),f)return cr({sortable:t,rootEl:f,name:"filter",targetEl:s,fromEl:n,toEl:n}),Er("filter",t,{evt:e}),!0}),c)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!Fo(u,i.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var i=this,r=i.el,o=i.options,a=r.ownerDocument,s;if(n&&!it&&n.parentNode===r){var u=bi(n);if(qn=r,it=n,ei=it.parentNode,tf=it.nextSibling,tk=n,nk=o.group,Tt.dragged=it,nf={target:it,clientX:(t||e).clientX,clientY:(t||e).clientY},aG=nf.clientX-u.left,sG=nf.clientY-u.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,it.style["will-change"]="all",s=function(){if(Er("delayEnded",i,{evt:e}),Tt.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!JW&&i.nativeDraggable&&(it.draggable=!0),i._triggerDragStart(e,t),cr({sortable:i,name:"choose",originalEvent:e}),Hr(it,o.chosenClass,!0)},o.ignore.split(",").forEach(function(c){$W(it,c.trim(),TE)}),hn(a,"dragover",rf),hn(a,"mousemove",rf),hn(a,"touchmove",rf),hn(a,"mouseup",i._onDrop),hn(a,"touchend",i._onDrop),hn(a,"touchcancel",i._onDrop),JW&&this.nativeDraggable&&(this.options.touchStartThreshold=4,it.draggable=!0),Er("delayStart",this,{evt:e}),o.delay&&(!o.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Cm||Ga))){if(Tt.eventCanceled){this._onDrop();return}hn(a,"mouseup",i._disableDelayedDrag),hn(a,"touchend",i._disableDelayedDrag),hn(a,"touchcancel",i._disableDelayedDrag),hn(a,"mousemove",i._delayedDragTouchMoveHandler),hn(a,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&hn(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,o.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){it&&TE(it),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;sn(e,"mouseup",this._disableDelayedDrag),sn(e,"touchend",this._disableDelayedDrag),sn(e,"touchcancel",this._disableDelayedDrag),sn(e,"mousemove",this._delayedDragTouchMoveHandler),sn(e,"touchmove",this._delayedDragTouchMoveHandler),sn(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?hn(document,"pointermove",this._onTouchMove):t?hn(document,"touchmove",this._onTouchMove):hn(document,"mousemove",this._onTouchMove):(hn(it,"dragend",this),hn(qn,"dragstart",this._onDragStart));try{document.selection?ck(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(vd=!1,qn&&it){Er("dragStarted",this,{evt:t}),this.nativeDraggable&&hn(document,"dragover",F8e);var n=this.options;!e&&Hr(it,n.dragClass,!1),Hr(it,n.ghostClass,!0),Tt.active=this,e&&this._appendGhost(),cr({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Po){this._lastX=Po.clientX,this._lastY=Po.clientY,dG();for(var e=document.elementFromPoint(Po.clientX,Po.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Po.clientX,Po.clientY),e!==t);)t=e;if(it.parentNode[qr]._isOutsideThisEl(e),t)do{if(t[qr]){var n=void 0;if(n=t[qr]._onDragOver({clientX:Po.clientX,clientY:Po.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);hG()}},_onTouchMove:function(e){if(nf){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,r=e.touches?e.touches[0]:e,o=It&&hd(It,!0),a=It&&o&&o.a,s=It&&o&&o.d,u=uk&&ir&&tG(ir),c=(r.clientX-nf.clientX+i.x)/(a||1)+(u?u[0]-BE[0]:0)/(a||1),f=(r.clientY-nf.clientY+i.y)/(s||1)+(u?u[1]-BE[1]:0)/(s||1);if(!Tt.active&&!vd){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(It){o?(o.e+=c-(xE||0),o.f+=f-(EE||0)):o={a:1,b:0,c:0,d:1,e:c,f};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");Dt(It,"webkitTransform",d),Dt(It,"mozTransform",d),Dt(It,"msTransform",d),Dt(It,"transform",d),xE=c,EE=f,Po=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!It){var e=this.options.fallbackOnBody?document.body:qn,t=bi(it,!0,uk,!0,e),n=this.options;if(uk){for(ir=e;Dt(ir,"position")==="static"&&Dt(ir,"transform")==="none"&&ir!==document;)ir=ir.parentNode;ir!==document.body&&ir!==document.documentElement?(ir===document&&(ir=ga()),t.top+=ir.scrollTop,t.left+=ir.scrollLeft):ir=ga(),BE=tG(ir)}It=it.cloneNode(!0),Hr(It,n.ghostClass,!1),Hr(It,n.fallbackClass,!0),Hr(It,n.dragClass,!0),Dt(It,"transition",""),Dt(It,"transform",""),Dt(It,"box-sizing","border-box"),Dt(It,"margin",0),Dt(It,"top",t.top),Dt(It,"left",t.left),Dt(It,"width",t.width),Dt(It,"height",t.height),Dt(It,"opacity","0.8"),Dt(It,"position",uk?"absolute":"fixed"),Dt(It,"zIndex","100000"),Dt(It,"pointerEvents","none"),Tt.ghost=It,e.appendChild(It),Dt(It,"transform-origin",aG/parseInt(It.style.width)*100+"% "+sG/parseInt(It.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,r=n.options;if(Er("dragStart",this,{evt:e}),Tt.eventCanceled){this._onDrop();return}Er("setupClone",this),Tt.eventCanceled||(Jn=rG(it),Jn.removeAttribute("id"),Jn.draggable=!1,Jn.style["will-change"]="",this._hideClone(),Hr(Jn,this.options.chosenClass,!1),Tt.clone=Jn),n.cloneId=ck(function(){Er("clone",n),!Tt.eventCanceled&&(n.options.removeCloneOnHide||qn.insertBefore(Jn,it),n._hideClone(),cr({sortable:n,name:"clone"}))}),!t&&Hr(it,r.dragClass,!0),t?(ik=!0,n._loopId=setInterval(n._emulateDragOver,50)):(sn(document,"mouseup",n._onDrop),sn(document,"touchend",n._onDrop),sn(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(n,i,it)),hn(document,"drop",n),Dt(it,"transform","translateZ(0)")),vd=!0,n._dragStartId=ck(n._dragStarted.bind(n,t,e)),hn(document,"selectstart",n),Dm=!0,Sm&&Dt(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,r,o,a=this.options,s=a.group,u=Tt.active,c=nk===s,f=a.sort,d=Ki||u,h,p=this,m=!1;if(DE)return;function v(M,X){Er(M,p,pa({evt:e,isOwner:c,axis:h?"vertical":"horizontal",revert:o,dragRect:i,targetRect:r,canSort:f,fromSortable:d,target:n,completed:b,onMove:function(ee,ae){return fk(qn,t,it,i,ee,bi(ee),e,ae)},changed:g},X))}function y(){v("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function b(M){return v("dragOverCompleted",{insertion:M}),M&&(c?u._hideClone():u._showClone(p),p!==d&&(Hr(it,Ki?Ki.options.ghostClass:u.options.ghostClass,!1),Hr(it,a.ghostClass,!0)),Ki!==p&&p!==Tt.active?Ki=p:p===Tt.active&&Ki&&(Ki=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){v("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===it&&!it.animated||n===t&&!n.animated)&&(yd=null),!a.dragoverBubble&&!e.rootEl&&n!==document&&(it.parentNode[qr]._isOutsideThisEl(e.target),!M&&rf(e)),!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function g(){Kr=po(it),wl=po(it,a.draggable),cr({sortable:p,name:"change",toEl:t,newIndex:Kr,newDraggableIndex:wl,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Fo(n,a.draggable,t,!0),v("dragOver"),Tt.eventCanceled)return m;if(it.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return b(!1);if(ik=!1,u&&!a.disabled&&(c?f||(o=ei!==qn):Ki===this||(this.lastPutMode=nk.checkPull(this,u,it,e))&&s.checkPut(this,u,it,e))){if(h=this._getDirection(e,n)==="vertical",i=bi(it),v("dragOverValid"),Tt.eventCanceled)return m;if(o)return ei=qn,y(),this._hideClone(),v("revert"),Tt.eventCanceled||(tf?qn.insertBefore(it,tf):qn.appendChild(it)),b(!0);var k=_E(t,a.draggable);if(!k||I8e(e,h,this)&&!k.animated){if(k===it)return b(!1);if(k&&t===e.target&&(n=k),n&&(r=bi(n)),fk(qn,t,it,i,n,r,e,!!n)!==!1)return y(),k&&k.nextSibling?t.insertBefore(it,k.nextSibling):t.appendChild(it),ei=t,g(),b(!0)}else if(k&&R8e(e,h,this)){var _=pd(t,0,a,!0);if(_===it)return b(!1);if(n=_,r=bi(n),fk(qn,t,it,i,n,r,e,!1)!==!1)return y(),t.insertBefore(it,_),ei=t,g(),b(!0)}else if(n.parentNode===t){r=bi(n);var A=0,x,w=it.parentNode!==t,O=!A8e(it.animated&&it.toRect||i,n.animated&&n.toRect||r,h),S=h?"top":"left",C=eG(n,"top","top")||eG(it,"top","top"),E=C?C.scrollTop:void 0;yd!==n&&(x=r[S],Am=!1,ok=!O&&a.invertSwap||w),A=N8e(e,n,r,h,O?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,ok,yd===n);var T;if(A!==0){var F=po(it);do F-=A,T=ei.children[F];while(T&&(Dt(T,"display")==="none"||T===It))}if(A===0||T===n)return b(!1);yd=n,Tm=A;var D=n.nextElementSibling,R=!1;R=A===1;var L=fk(qn,t,it,i,n,r,e,R);if(L!==!1)return(L===1||L===-1)&&(R=L===1),DE=!0,setTimeout(j8e,30),y(),R&&!D?t.appendChild(it):n.parentNode.insertBefore(it,R?D:n),C&&iG(C,0,E-C.scrollTop),ei=it.parentNode,x!==void 0&&!ok&&(ak=Math.abs(x-bi(n)[S])),g(),b(!0)}if(t.contains(it))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){sn(document,"mousemove",this._onTouchMove),sn(document,"touchmove",this._onTouchMove),sn(document,"pointermove",this._onTouchMove),sn(document,"dragover",rf),sn(document,"mousemove",rf),sn(document,"touchmove",rf)},_offUpEvents:function(){var e=this.el.ownerDocument;sn(e,"mouseup",this._onDrop),sn(e,"touchend",this._onDrop),sn(e,"pointerup",this._onDrop),sn(e,"touchcancel",this._onDrop),sn(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Kr=po(it),wl=po(it,n.draggable),Er("drop",this,{evt:e}),ei=it&&it.parentNode,Kr=po(it),wl=po(it,n.draggable),Tt.eventCanceled){this._nulling();return}vd=!1,ok=!1,Am=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),AE(this.cloneId),AE(this._dragStartId),this.nativeDraggable&&(sn(document,"drop",this),sn(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sm&&Dt(document.body,"user-select",""),Dt(it,"transform",""),e&&(Dm&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),It&&It.parentNode&&It.parentNode.removeChild(It),(qn===ei||Ki&&Ki.lastPutMode!=="clone")&&Jn&&Jn.parentNode&&Jn.parentNode.removeChild(Jn),it&&(this.nativeDraggable&&sn(it,"dragend",this),TE(it),it.style["will-change"]="",Dm&&!vd&&Hr(it,Ki?Ki.options.ghostClass:this.options.ghostClass,!1),Hr(it,this.options.chosenClass,!1),cr({sortable:this,name:"unchoose",toEl:ei,newIndex:null,newDraggableIndex:null,originalEvent:e}),qn!==ei?(Kr>=0&&(cr({rootEl:ei,name:"add",toEl:ei,fromEl:qn,originalEvent:e}),cr({sortable:this,name:"remove",toEl:ei,originalEvent:e}),cr({rootEl:ei,name:"sort",toEl:ei,fromEl:qn,originalEvent:e}),cr({sortable:this,name:"sort",toEl:ei,originalEvent:e})),Ki&&Ki.save()):Kr!==md&&Kr>=0&&(cr({sortable:this,name:"update",toEl:ei,originalEvent:e}),cr({sortable:this,name:"sort",toEl:ei,originalEvent:e})),Tt.active&&((Kr==null||Kr===-1)&&(Kr=md,wl=Bm),cr({sortable:this,name:"end",toEl:ei,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Er("nulling",this),qn=it=ei=It=tf=Jn=tk=kl=nf=Po=Dm=Kr=wl=md=Bm=yd=Tm=Ki=nk=Tt.dragged=Tt.ghost=Tt.clone=Tt.active=null,sk.forEach(function(e){e.checked=!0}),sk.length=xE=EE=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":it&&(this._onDragOver(e),P8e(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,r=n.length,o=this.options;i<r;i++)t=n[i],Fo(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||L8e(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(r,o){var a=i.children[o];Fo(a,this.options.draggable,i,!1)&&(n[r]=a)},this),t&&this.captureAnimationState(),e.forEach(function(r){n[r]&&(i.removeChild(n[r]),i.appendChild(n[r]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Fo(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Em.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&cG(n)},destroy:function(){Er("destroy",this);var e=this.el;e[qr]=null,sn(e,"mousedown",this._onTapStart),sn(e,"touchstart",this._onTapStart),sn(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(sn(e,"dragover",this),sn(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),rk.splice(rk.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!kl){if(Er("hideClone",this),Tt.eventCanceled)return;Dt(Jn,"display","none"),this.options.removeCloneOnHide&&Jn.parentNode&&Jn.parentNode.removeChild(Jn),kl=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(kl){if(Er("showClone",this),Tt.eventCanceled)return;it.parentNode==qn&&!this.options.group.revertClone?qn.insertBefore(Jn,it):tf?qn.insertBefore(Jn,tf):qn.appendChild(Jn),this.options.group.revertClone&&this.animate(it,Jn),Dt(Jn,"display",""),kl=!1}}};function P8e(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function fk(e,t,n,i,r,o,a,s){var u,c=e[qr],f=c.options.onMove,d;return window.CustomEvent&&!Ga&&!Cm?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=t,u.from=e,u.dragged=n,u.draggedRect=i,u.related=r||t,u.relatedRect=o||bi(t),u.willInsertAfter=s,u.originalEvent=a,e.dispatchEvent(u),f&&(d=f.call(c,u,a)),d}function TE(e){e.draggable=!1}function j8e(){DE=!1}function R8e(e,t,n){var i=bi(pd(n.el,0,n.options,!0)),r=oG(n.el,n.options,It),o=10;return t?e.clientX<r.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<r.top-o||e.clientY<i.bottom&&e.clientX<i.left}function I8e(e,t,n){var i=bi(_E(n.el,n.options.draggable)),r=oG(n.el,n.options,It),o=10;return t?e.clientX>r.right+o||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>r.bottom+o||e.clientX>i.right&&e.clientY>i.top}function N8e(e,t,n,i,r,o,a,s){var u=i?e.clientY:e.clientX,c=i?n.height:n.width,f=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!a){if(s&&ak<c*r){if(!Am&&(Tm===1?u>f+c*o/2:u<d-c*o/2)&&(Am=!0),Am)h=!0;else if(Tm===1?u<f+ak:u>d-ak)return-Tm}else if(u>f+c*(1-r)/2&&u<d-c*(1-r)/2)return M8e(t)}return h=h||a,h&&(u<f+c*o/2||u>d-c*o/2)?u>f+c/2?1:-1:0}function M8e(e){return po(it)<po(e)?1:-1}function L8e(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function z8e(e){sk.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&sk.push(i)}}function ck(e){return setTimeout(e,0)}function AE(e){return clearTimeout(e)}lk&&hn(document,"touchmove",function(e){(Tt.active||vd)&&e.cancelable&&e.preventDefault()}),Tt.utils={on:hn,off:sn,css:Dt,find:$W,is:function(e,t){return!!Fo(e,t,e,!1)},extend:_8e,throttle:nG,closest:Fo,toggleClass:Hr,clone:rG,index:po,nextTick:ck,cancelNextTick:AE,detectDirection:fG,getChild:pd},Tt.get=function(e){return e[qr]},Tt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(Tt.utils=pa(pa({},Tt.utils),i.utils)),Em.mount(i)})},Tt.create=function(e,t){return new Tt(e,t)},Tt.version=b8e;var ki=[],Om,OE,FE=!1,PE,jE,dk,Fm;function V8e(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?hn(document,"dragover",this._handleAutoScroll):this.options.supportPointer?hn(document,"pointermove",this._handleFallbackAutoScroll):n.touches?hn(document,"touchmove",this._handleFallbackAutoScroll):hn(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?sn(document,"dragover",this._handleAutoScroll):(sn(document,"pointermove",this._handleFallbackAutoScroll),sn(document,"touchmove",this._handleFallbackAutoScroll),sn(document,"mousemove",this._handleFallbackAutoScroll)),pG(),hk(),C8e()},nulling:function(){dk=OE=Om=FE=Fm=PE=jE=null,ki.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,a=document.elementFromPoint(r,o);if(dk=t,n||this.options.forceAutoScrollFallback||Cm||Ga||Sm){RE(t,this.options,a,n);var s=bl(a,!0);FE&&(!Fm||r!==PE||o!==jE)&&(Fm&&pG(),Fm=setInterval(function(){var u=bl(document.elementFromPoint(r,o),!0);u!==s&&(s=u,hk()),RE(t,i.options,u,n)},10),PE=r,jE=o)}else{if(!this.options.bubbleScroll||bl(a,!0)===ga()){hk();return}RE(t,this.options,bl(a,!1),!1)}}},Ka(e,{pluginName:"scroll",initializeByDefault:!0})}function hk(){ki.forEach(function(e){clearInterval(e.pid)}),ki=[]}function pG(){clearInterval(Fm)}var RE=nG(function(e,t,n,i){if(t.scroll){var r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=t.scrollSensitivity,s=t.scrollSpeed,u=ga(),c=!1,f;OE!==n&&(OE=n,hk(),Om=t.scroll,f=t.scrollFn,Om===!0&&(Om=bl(n,!0)));var d=0,h=Om;do{var p=h,m=bi(p),v=m.top,y=m.bottom,b=m.left,g=m.right,k=m.width,_=m.height,A=void 0,x=void 0,w=p.scrollWidth,O=p.scrollHeight,S=Dt(p),C=p.scrollLeft,E=p.scrollTop;p===u?(A=k<w&&(S.overflowX==="auto"||S.overflowX==="scroll"||S.overflowX==="visible"),x=_<O&&(S.overflowY==="auto"||S.overflowY==="scroll"||S.overflowY==="visible")):(A=k<w&&(S.overflowX==="auto"||S.overflowX==="scroll"),x=_<O&&(S.overflowY==="auto"||S.overflowY==="scroll"));var T=A&&(Math.abs(g-r)<=a&&C+k<w)-(Math.abs(b-r)<=a&&!!C),F=x&&(Math.abs(y-o)<=a&&E+_<O)-(Math.abs(v-o)<=a&&!!E);if(!ki[d])for(var D=0;D<=d;D++)ki[D]||(ki[D]={});(ki[d].vx!=T||ki[d].vy!=F||ki[d].el!==p)&&(ki[d].el=p,ki[d].vx=T,ki[d].vy=F,clearInterval(ki[d].pid),(T!=0||F!=0)&&(c=!0,ki[d].pid=setInterval((function(){i&&this.layer===0&&Tt.active._onTouchMove(dk);var R=ki[this.layer].vy?ki[this.layer].vy*s:0,L=ki[this.layer].vx?ki[this.layer].vx*s:0;typeof f=="function"&&f.call(Tt.dragged.parentNode[qr],L,R,e,dk,ki[this.layer].el)!=="continue"||iG(ki[this.layer].el,L,R)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==u&&(h=bl(h,!1)));FE=c}},30),gG=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,r=e.activeSortable,o=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var u=n||r;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(c.clientX,c.clientY);s(),u&&!u.el.contains(f)&&(o("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function IE(){}IE.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=pd(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:gG},Ka(IE,{pluginName:"revertOnSpill"});function NE(){}NE.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:gG},Ka(NE,{pluginName:"removeOnSpill"}),Tt.mount(new V8e),Tt.mount(NE,IE);function U8e(e){return e==null?e:JSON.parse(JSON.stringify(e))}function H8e(e){l.getCurrentInstance()&&l.onUnmounted(e)}function q8e(e){l.getCurrentInstance()?l.onMounted(e):l.nextTick(e)}let mG=null,vG=null;function yG(e=null,t=null){mG=e,vG=t}function K8e(){return{data:mG,clonedData:vG}}const bG=Symbol("cloneElement");function W8e(...e){var t,n;const i=(t=l.getCurrentInstance())==null?void 0:t.proxy;let r=null;const o=e[0];let[,a,s]=e;Array.isArray(l.unref(a))||(s=a,a=null);let u=null;const{immediate:c=!0,clone:f=U8e,forceFallback:d,fallbackOnBody:h,customUpdate:p}=(n=l.unref(s))!=null?n:{};function m(C){var E;const{from:T,oldIndex:F,item:D}=C,R=Array.from(T.childNodes);r=d&&!h?R.slice(0,-1):R;const L=l.unref((E=l.unref(a))==null?void 0:E[F]),M=f(L);yG(L,M),D[bG]=M}function v(C){const E=C.item[bG];if(!l8e(E)){if(wE(C.item),l.isRef(a)){const T=[...l.unref(a)];a.value=qW(T,C.newDraggableIndex,E);return}qW(l.unref(a),C.newDraggableIndex,E)}}function y(C){const{from:E,item:T,oldIndex:F,oldDraggableIndex:D,pullMode:R,clone:L}=C;if(KW(E,T,F),R==="clone"){wE(L);return}if(l.isRef(a)){const M=[...l.unref(a)];a.value=HW(M,D);return}HW(l.unref(a),D)}function b(C){if(p){p(C);return}const{from:E,item:T,oldIndex:F,oldDraggableIndex:D,newDraggableIndex:R}=C;if(wE(T),KW(E,T,F),l.isRef(a)){const L=[...l.unref(a)];a.value=UW(L,D,R);return}UW(l.unref(a),D,R)}function g(C){const{newIndex:E,oldIndex:T,from:F,to:D}=C;let R=null;const L=E===T&&F===D;try{if(L){let M=null;r==null||r.some((X,ee)=>{if(M&&(r==null?void 0:r.length)!==D.childNodes.length)return F.insertBefore(M,X.nextSibling),!0;const ae=D.childNodes[ee];M=D==null?void 0:D.replaceChild(X,ae)})}}catch(M){R=M}finally{r=null}l.nextTick(()=>{if(yG(),R)throw R})}const k={onUpdate:b,onStart:m,onAdd:v,onRemove:y,onEnd:g};function _(C){const E=l.unref(o);return C||(C=u8e(E)?f8e(E,i==null?void 0:i.$el):E),C&&!h8e(C)&&(C=C.$el),C||void 0,C}function A(){var C;const E=(C=l.unref(s))!=null?C:{},{immediate:T,clone:F}=E,D=VW(E,["immediate","clone"]);return WW(D,(R,L)=>{p8e(R)&&(D[R]=(M,...X)=>{const ee=K8e();return g8e(M,ee),L(M,...X)})}),d8e(a===null?{}:k,D)}const x=C=>{C=_(C),u&&w.destroy(),u=new Tt(C,A())};l.watch(()=>s,()=>{u&&WW(A(),(C,E)=>{u==null||u.option(C,E)})},{deep:!0});const w={option:(C,E)=>u==null?void 0:u.option(C,E),destroy:()=>{u==null||u.destroy(),u=null},save:()=>u==null?void 0:u.save(),toArray:()=>u==null?void 0:u.toArray(),closest:(...C)=>u==null?void 0:u.closest(...C)},O=()=>w==null?void 0:w.option("disabled",!0),S=()=>w==null?void 0:w.option("disabled",!1);return q8e(()=>{c&&x()}),H8e(w.destroy),dd({start:x,pause:O,resume:S},w)}const ME=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],G8e=["clone","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target","customUpdate",...ME.map(e=>`on${e.replace(/^\S/,t=>t.toUpperCase())}`)],kG=l.defineComponent({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:G8e,emits:["update:modelValue",...ME],setup(e,{slots:t,emit:n,expose:i,attrs:r}){const o=ME.reduce((f,d)=>{const h=`on${d.replace(/^\S/,p=>p.toUpperCase())}`;return f[h]=(...p)=>n(d,...p),f},{}),a=l.computed(()=>{const f=l.toRefs(e),{modelValue:d}=f,h=VW(f,["modelValue"]),p=Object.entries(h).reduce((m,[v,y])=>{const b=l.unref(y);return b!==void 0&&(m[v]=b),m},{});return dd(dd({},o),s8e(dd(dd({},r),p)))}),s=l.computed({get:()=>e.modelValue,set:f=>n("update:modelValue",f)}),u=l.ref(),c=l.reactive(W8e(e.target||u,s,a));return i(c),()=>{var f;return l.h(e.tag||"div",{ref:u},(f=t==null?void 0:t.default)==null?void 0:f.call(t,c))}}}),J8e={class:"c0 omit ex fs13 plr4"},Y8e={class:"b g6"},X8e=["title"],LE={__name:"tableContentControl",props:{modelValue:{type:Array,default:()=>[]},dragTitleKey:{type:String,default:"title"}},emits:["sort","change","update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r=l.computed({get:()=>n.modelValue,set:u=>{i("update:modelValue",u)}}),o=l.computed(()=>{let u=1/0;return n.modelValue.forEach(c=>{u=Math.min(u,c.rank)}),u||1});function a(u){return or(n.dragTitleKey,u)}function s(u){i("sort",u,o.value)}return(u,c)=>{const f=l.resolveComponent("jwt-icon"),d=l.resolveComponent("el-button"),h=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(h,{persistent:!1,placement:"bottom","popper-style":"max-height:60vh;overflow-y:auto;",trigger:"hover",width:240},{reference:l.withCtx(()=>[l.createVNode(d,{size:"small",text:""},{default:l.withCtx(()=>[l.createVNode(f,{icon:"draggable",size:"18"})]),_:1})]),default:l.withCtx(()=>[l.createVNode(l.unref(kG),{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r.value=p),animation:"150","ghost-class":"ghost",onSort:s},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(p,m)=>(l.openBlock(),l.createElementBlock("div",{key:p.id,class:"cpm ptb4 w fxmc"},[l.createVNode(f,{class:"g9",icon:"drag-drop-line"}),l.createElementVNode("div",J8e,[l.createElementVNode("span",Y8e,l.toDisplayString(o.value+m),1),l.createElementVNode("span",{class:"ml4",title:a(p)},l.toDisplayString(a(p)),9,X8e)])]))),128))]),_:1},8,["modelValue"])]),_:1})}}},Z8e=Object.freeze(Object.defineProperty({__proto__:null,default:LE},Symbol.toStringTag,{value:"Module"})),pk={__name:"tableFieldControl",props:{modelValue:{type:Array,default:()=>[]}},emits:["sort","change","update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r=l.computed({get:()=>n.modelValue,set:s=>{i("update:modelValue",s)}});function o(s){i("sort",s)}function a(s,u){i("change",s,u)}return(s,u)=>{const c=l.resolveComponent("jwt-icon"),f=l.resolveComponent("el-button"),d=l.resolveComponent("el-checkbox"),h=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(h,{persistent:!1,placement:"bottom","popper-style":"max-height:70vh;overflow-y:auto;",trigger:"hover",width:210},{reference:l.withCtx(()=>[l.createVNode(f,{size:"small",text:""},{default:l.withCtx(()=>[l.createVNode(c,{icon:"settings-line",size:"18"})]),_:1})]),default:l.withCtx(()=>[l.createVNode(l.unref(kG),{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=p=>r.value=p),animation:"150","ghost-class":"ghost",onSort:o},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,p=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{key:p.id},[l.createVNode(c,{icon:"drag-drop-line"}),l.createVNode(d,{checked:p.checked,class:"ml5",onChange:m=>a(p,s.index)},{default:l.withCtx(()=>[l.createElementVNode("span",{class:l.normalizeClass(p.label.length>6?"fs12":"")},l.toDisplayString(p.label),3)]),_:2},1032,["checked","onChange"])],512)),[[l.vShow,!p.isOperate]])),128))]),_:1},8,["modelValue"])]),_:1})}}},Q8e=Object.freeze(Object.defineProperty({__proto__:null,default:pk},Symbol.toStringTag,{value:"Module"})),zE={__name:"tableListContent",props:{tableAttr:{require:!0,type:Object,default:()=>{}},tableEvents:{type:Object,default:()=>{}},tableData:{type:Array,default:()=>[]},appTableColumn:{type:Array,default:()=>[]},ajaxLoading:{type:Boolean,default:!1},loadingText:{type:String,default:"正在加载中..."},tableHeight:{type:[String,Number],default:null},tableSize:{type:String,default:"small"},currentPagePath:{type:String,default:""},userMenusAuth:{type:Object,default:()=>{}},tableButtonNum:{type:Number,default:3},pagination:{type:Object,default:()=>{}},defaultSort:{type:Object,default:()=>{}}},emits:["table-current-change","header-dragend","selection-change","sort-change","change-table-column","table-action","edit-row","click-cell","dbclick-cell","show-file"],setup(e,{expose:t,emit:n}){const i=e,r=n,o=l.ref(null),a=l.computed(()=>{var b,g;return((((b=i==null?void 0:i.pagination)==null?void 0:b.currentPage)||1)-1)*(((g=i==null?void 0:i.pagination)==null?void 0:g.pageSize)||15)});function s(b){r("table-current-change",b)}function u(b,g,k,_){r("header-dragend",b,g,k,_)}function c(b){r("selection-change",b)}function f(b={}){r("sort-change",b)}function d(b){r("change-table-column","fixed",b)}function h(b,g,k){r("table-action",b,g,k)}function p(b={},g={}){r("edit-row",b,g)}function m(b,g){r("click-cell",b,g)}function v(b){r("show-file",b)}function y(b,g,k,_){var A;r("dbclick-cell",{row:b,column:g,cell:k,event:_,text:((A=_==null?void 0:_.target)==null?void 0:A.textContent)||""})}return t({tableRef:o}),(b,g)=>{const k=l.resolveComponent("jwt-table-button"),_=l.resolveComponent("jwt-column-item"),A=l.resolveComponent("el-table-column"),x=l.resolveComponent("el-table"),w=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createBlock(x,l.mergeProps(e.tableAttr,{ref_key:"tableRef",ref:o,"default-sort":e.defaultSort,class:"mt10 jwt-table-wrapper",data:e.tableData,"element-loading-spinner":"el-icon-loading","element-loading-text":e.loadingText,height:e.tableHeight,size:e.tableSize},l.toHandlers(e.tableEvents),{onCellDblclick:y,onCurrentChange:s,onHeaderDragend:u,onSelectionChange:c,onSortChange:f}),{default:l.withCtx(()=>[l.renderSlot(b.$slots,"table-content-before"),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.appTableColumn,(O,S)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:S},[O.checked?(l.openBlock(),l.createBlock(A,l.mergeProps({key:0,align:O.align||"center",fixed:O.fixed},{ref_for:!0},O.attrs,{"min-width":O.minWidth?O.minWidth:null,prop:O.prop,sortable:O.sortable,type:O.type,width:O.width?O.width:null}),l.createSlots({header:l.withCtx(()=>[l.createVNode(Zb,{item:O,onFixed:C=>d(O)},null,8,["item","onFixed"])]),_:2},[O.type?O.type==="expand"?{name:"default",fn:l.withCtx(({row:C})=>[l.renderSlot(b.$slots,O.prop,{index:S,scope:C})]),key:"1"}:void 0:{name:"default",fn:l.withCtx(({row:C,$index:E})=>[O.action?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(b.$slots,"action-before",{scope:C}),l.createVNode(k,{config:O,"current-path":e.currentPagePath,"menus-obj":e.userMenusAuth,row:C,"show-button-num":e.tableButtonNum,onTableAction:T=>h(T,C,O)},null,8,["config","current-path","menus-obj","row","show-button-num","onTableAction"]),l.renderSlot(b.$slots,"action-after",{scope:C})],64)):O.isColumn?l.renderSlot(b.$slots,O.prop,{key:1,index:S,scope:C}):(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass([(O==null?void 0:O.columnCls)||"fxmc","w mw"])},[l.renderSlot(b.$slots,O.slotPreName,{scope:C}),l.renderSlot(b.$slots,O.prop,{index:S,rowindex:E,pagestart:a.value,scope:C},()=>[l.createVNode(_,{index:E,item:O,row:C,pagestart:a.value,onChange:p,onClickCell:m,onShowFile:v},null,8,["index","item","row","pagestart"])]),l.renderSlot(b.$slots,O.slotSufName,{scope:C})],2))]),key:"0"}]),1040,["align","fixed","min-width","prop","sortable","type","width"])):l.createCommentVNode("",!0)],64))),128)),l.renderSlot(b.$slots,"table-content-after",{list:e.tableData})]),_:3},16,["default-sort","data","element-loading-text","height","size"])),[[w,e.ajaxLoading]])}}},$8e=Object.freeze(Object.defineProperty({__proto__:null,default:zE},Symbol.toStringTag,{value:"Module"})),e9e={class:"table-list-actions"},t9e={class:"fx fxwp"},n9e=l.defineComponent({name:"JwtTableButton"}),wG=l.defineComponent({...n9e,props:{currentPath:{type:String,default:"/"},menusObj:{type:Object,default:()=>{}},config:{type:Object,default:()=>{}},row:{type:Object,default:()=>{}},operationName:{type:String,default:"operations"},showButtonNum:{type:Number,default:3},showIcon:{type:Boolean,default:!1},showText:{type:Boolean,default:!0}},emits:["table-action"],setup(e,{emit:t}){const n=e,i=t,{visibleActions:r,tableButtonActions:o,hasOverflowActions:a}=jW(n),s=(u,c)=>{i("table-action",{action:c,e:u})};return(u,c)=>{var h;const f=l.resolveComponent("jwt-icon"),d=l.resolveComponent("el-popover");return l.openBlock(),l.createElementBlock("div",e9e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(p,m)=>(l.openBlock(),l.createBlock(_m,{key:m,link:"",size:"small",action:p,"show-icon":e.showIcon,"show-text":e.showText,onActionClick:v=>s(v,p)},null,8,["action","show-icon","show-text","onActionClick"]))),128)),l.unref(a)?(l.openBlock(),l.createBlock(d,{key:0,placement:"bottom",trigger:"hover",persistent:!1,width:150},{reference:l.withCtx(()=>[l.createVNode(f,{class:"ml5 cp",icon:"more-fill"})]),default:l.withCtx(()=>[l.createElementVNode("div",t9e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(p,m)=>(l.openBlock(),l.createBlock(_m,{key:m,action:p,link:"","show-icon":e.showIcon,"show-text":e.showText,size:"small",onActionClick:v=>s(v,p)},null,8,["action","show-icon","show-text","onActionClick"]))),128))])]),_:1})):l.createCommentVNode("",!0),(h=l.unref(r))!=null&&h.length?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(" ")],64))])}}}),i9e=Object.freeze(Object.defineProperty({__proto__:null,default:wG},Symbol.toStringTag,{value:"Module"})),r9e=["element-loading-text"],o9e={class:"fxmc c0",style:{padding:"10px 0","justify-content":"center",height:"100%","background-color":"var(--el-table-row-hover-bg-color)"}},VE=tn({__name:"tableListContentVirtualized",props:{tableAttr:{require:!0,type:Object,default:()=>{}},tableEvents:{type:Object,default:()=>{}},tableData:{type:Array,default:()=>[]},appTableColumn:{type:Array,default:()=>[]},ajaxLoading:{type:Boolean,default:!1},loadingText:{type:String,default:"正在加载中..."},tableHeight:{type:[String,Number],default:"72vh"},tableSize:{type:String,default:"small"},currentPagePath:{type:String,default:""},userMenusAuth:{type:Object,default:()=>{}},tableButtonNum:{type:Number,default:3},estimatedRowHeight:{type:Number,default:50},pagination:{type:Object,default:()=>{}},defaultSort:{type:Object,default:()=>{}}},emits:["table-current-change","header-dragend","selection-change","sort-change","change-table-column","table-action","edit-row","click-cell","dbclick-cell","selection-header-change","selection-column-change","show-file"],setup(e,{emit:t}){const n=e,i=l.computed(()=>{var h,p;return((h=n.tableAttr)==null?void 0:h["show-summary"])&&((p=n.tableAttr)==null?void 0:p.summaryMethod)}),r=l.computed(()=>{var h,p;return((((h=n==null?void 0:n.pagination)==null?void 0:h.currentPage)||1)-1)*(((p=n==null?void 0:n.pagination)==null?void 0:p.pageSize)||15)}),o=t,a=l.useSlots(),s=l.computed(()=>n.appTableColumn.map(h=>({...h,align:h.align||"center",title:h.label,key:h.prop,property:h.prop,width:h.width||h.minWidth||150,dataKey:h.prop,headerCellRenderer:()=>l.h(Zb,{item:h,tableData:n.tableData,onFixed:()=>o("change-table-column","fixed",h),onSelect:p=>o("selection-header-change",p)}),cellRenderer:({rowData:p,rowIndex:m,columnIndex:v})=>{const y={index:v,rowindex:m,scope:p,row:p,item:h,pagestart:r.value};return h.action?l.h("div",{class:[(h==null?void 0:h.columnCls)||"fxmc","w mw ptb8"],onDblclick:b=>d(b,p,h)},[a["action-before"]?a["action-before"]({scope:p}):null,l.h(wG,{config:h,"current-path":n.currentPagePath,"menus-obj":n.userMenusAuth,row:p,"show-button-num":n.tableButtonNum,onTableAction:b=>o("table-action",b,p,h)}),a["action-after"]?a["action-after"]({scope:p}):null]):(h==null?void 0:h.type)==="selection"?l.h(ut.ElCheckbox,{modelValue:p.selectionChecked,onChange:b=>{p.selectionChecked=b,o("selection-column-change",b,p)}}):l.h("div",{class:[(h==null?void 0:h.columnCls)||"fxmc","w mw ptb8"],onDblclick:b=>d(b,p,h)},[h.slotPreName&&a[h.slotPreName]?a[h.slotPreName](y):null,a[h.prop]?a[h.prop](y):l.h(j7,{item:h,row:p,index:m,pagestart:r.value,onChange:(b,g)=>o("edit-row",b,g),onClickCell:(b,g)=>o("click-cell",b,g),onShowFile:b=>o("show-file",b)}),h.slotSufName&&a[h.slotSufName]?a[h.slotSufName](y):null])}})).filter(h=>!h.hide)),u=l.computed(()=>{var h;if(i.value){const p=(h=n.tableAttr)==null?void 0:h.summaryMethod({columns:s.value,data:n.tableData});let m=[];return p.forEach((v,y)=>{v&&v!=="-"&&y&&m.push(`${s.value[y].label}: ${v}`)}),m.length?`总计:${m.join("、")}`:""}return""}),c=l.ref({order:"desc"});function f(h){o("sort-change",{prop:h.key,order:h.order==="asc"?"ascending":"descending",column:h.column}),c.value=h}function d(h,p,m){var v;o("dbclick-cell",{row:p,column:m,event:h,text:((v=h==null?void 0:h.currentTarget)==null?void 0:v.textContent)||""})}return(h,p)=>{const m=l.resolveComponent("el-table-v2"),v=l.resolveComponent("el-auto-resizer"),y=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createElementBlock("div",{"element-loading-spinner":"el-icon-loading","element-loading-text":e.loadingText,style:l.normalizeStyle({height:e.tableHeight})},[l.createVNode(v,null,{default:l.withCtx(({height:b,width:g})=>[l.createVNode(m,l.mergeProps({columns:s.value,data:e.tableData,"estimated-row-height":e.estimatedRowHeight,fixed:"","footer-height":40,height:b,"sort-by":e.defaultSort,width:g},e.tableAttr,l.toHandlers(e.tableEvents),{onColumnSort:f}),l.createSlots({_:2},[i.value&&u.value?{name:"footer",fn:l.withCtx(()=>[l.createElementVNode("div",o9e,l.toDisplayString(u.value),1)]),key:"0"}:void 0]),1040,["columns","data","estimated-row-height","height","sort-by","width"])]),_:1})],12,r9e)),[[y,e.ajaxLoading]])}}},[["__scopeId","data-v-7ecf0778"]]),a9e=Object.freeze(Object.defineProperty({__proto__:null,default:VE},Symbol.toStringTag,{value:"Module"})),gk={__name:"tableSizeSetting",emits:["tableSize"],setup(e,{emit:t}){const n=t,i=Ai.get("tableSize")||"default",r=l.ref(i),o=[{title:Oe("大"),size:"large",imgSize:70},{title:Oe("中"),size:"default",imgSize:60},{title:Oe("小"),size:"small",imgSize:40}];function a(s){n("tableSize",s)}return(s,u)=>{const c=l.resolveComponent("jwt-icon"),f=l.resolveComponent("el-button"),d=l.resolveComponent("el-radio"),h=l.resolveComponent("el-radio-group"),p=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(p,{persistent:!1,placement:"bottom",trigger:"hover",width:200},{reference:l.withCtx(()=>[l.createVNode(f,{size:"small",text:""},{default:l.withCtx(()=>[l.createVNode(c,{icon:"line-height",size:"18"})]),_:1})]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.createVNode(h,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=m=>r.value=m),onChange:a},{default:l.withCtx(()=>[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(o,(m,v)=>l.createVNode(d,{key:v,label:m.size},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(m.title),1)]),_:2},1032,["label"])),64))]),_:1},8,["modelValue"])])]),_:1})}}},s9e=Object.freeze(Object.defineProperty({__proto__:null,default:gk},Symbol.toStringTag,{value:"Module"})),l9e=l.defineComponent({name:"JwtTableCopy",components:{TableSizeSetting:gk,TableFieldControl:pk,TableColumnHeader:Zb},props:{config:{require:!0,type:Object,default:()=>{}},tableHeight:{type:[String,Number],default:null},userMenusAuth:{type:Object,default:()=>{}},route:{type:Object,default:()=>{}},router:{type:Object,default:()=>{}},userFieldList:{type:Object,default:()=>{}},refMenuId:{type:[Number,String],default:""},pageUrl:{type:String,default:""},tableColumn:{type:Array,default:()=>[]},freezeList:{type:Boolean,default:!0},cacheSearch:{type:Boolean,default:!1}},emits:["selection-change","list-change","header-action","table-action","add-handle","edit-handle","add-success","edit-success","delete-success","table-current-change","tablelist-change","get-detail-success","click-cell","des-edit-success","upload-btn","event-name","copy-success","asynExport","search-result","change-table-column","fixed-table-column","dialog-close","refresh-draw","refresh-table","form-item-change","row-change"],setup(e,{emit:t}){var U,Z,Ce,Me;const n=gn(),i={"page-sizes":Im(),"page-size":20,layout:"total, sizes, prev, pager, next, jumper"};let r="";const o=l.shallowRef([]),a=l.shallowRef([]),s=l.reactive({ajaxLoading:!1,submitLoading:!1,renderTable:!0,refreshTable:!1,tableSize:Ai.get("tableSize")||"default",tableFields:null,tableStatistics:[]}),{proxy:u}=l.getCurrentInstance(),c=l.useSlots(),f=l.ref([]),d=l.ref({}),h=l.shallowRef(null),p=l.shallowRef(null),m=l.shallowRef(null),v=l.shallowRef(null),y=l.computed(()=>f.value.map(te=>te.id).join(",")),b=l.computed(()=>{var te;return((te=p.value)==null?void 0:te.editBoxRefModel)||{}}),g=l.computed(()=>{var te;return((te=m.value)==null?void 0:te.editBoxRefModel)||{}}),k=l.computed(()=>dr("showPagination",e.config)?Le.isFunction(e.config.showPagination)?e.config.showPagination():e.config.showPagination:!0),_=l.computed(()=>dr("headerActionsShow",e.config)?Le.isFunction(e.config.headerActionsShow)?e.config.headerActionsShow():e.config.headerActionsShow:!0),A=l.computed(()=>dr("showHeaderSearch",e.config)?Le.isFunction(e.config.showHeaderSearch)?e.config.showHeaderSearch():e.config.showHeaderSearch:!0),x=Object.freeze({headerActions:{list:[],deleteText:""},headerActionsShow:!0,tableAttr:{stripe:!0,border:!0,fit:!0,highlightCurrentRow:!0,immediate:!0},virtualized:!1,tableEvents:{},tableColumn:[],searchBtnInline:!1,useField:!0,keepAliveTabs:!0,tableListApi:null,tableListParams:{},tableDeleteApi:null,tableRowEdit:!0,tableDeleteText:"",tableDeleteParams:{},tableExportApi:"",tableExportPathKey:"",tablePrintApi:"",tablePrintPathKey:"http_path",pagination:i,showPagination:!0,hasPagination:!0,showTableLineHeight:!1,editBoxOnDialog:!0,editBox:{title:Oe("系统"),dialog:{width:"960px",top:"7vh"},form:{api:{add:null,update:null},formAttrs:{},formList:[]},footer:{confirm:{title:Oe("确认"),attrs:{type:"primary"}},cancel:{title:Oe("取消"),attrs:{}}}},tableDrawer:{}});let w=Le.merge({},x,{useField:!0,keepAliveTabs:!0},e.config);const O=()=>{var te;return((te=e==null?void 0:e.config)==null?void 0:te.tablePageSizeName)||"pageSize"},S=l.reactive({currentPage:1,pageCount:1,pageSize:Ai.get(O())||((U=w.tableListParams)==null?void 0:U.per_page)||w.pagination["page-sizes"][2],totalCount:1,sort:((Z=w.tableListParams)==null?void 0:Z.sort)||"id",order:((Ce=w.tableListParams)==null?void 0:Ce.order)||"desc"}),C=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox",refreshTable:!1}),E=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox"}),T={"append-to-body":!0,"destroy-on-close":!0,size:"40%"},F=l.shallowReactive({attrs:{...T},visible:!1,config:{},detailInfo:{},contentConfig:{}}),D=l.computed(()=>{var te;return F.descriptionEdit||(te=F==null?void 0:F.attrs)!=null&&te.refresh?l.reactive(F.detailInfo):F.detailInfo}),R=()=>{var ge;const te={};for(const ke in e.userMenusAuth){const{id:Re}=((ge=e.userMenusAuth)==null?void 0:ge[ke])||"";Re&&(te[Re]=ke)}return te},L=l.computed(()=>{let te=e.route.path||"";return e!=null&&e.refMenuId&&(te=R()[e.refMenuId]),e!=null&&e.pageUrl&&(te=e==null?void 0:e.pageUrl),te||""}),M=l.computed(()=>Oe("加载数据中")||"加载数据中..."),X=(te={})=>{const{query:ge}=e.route;let ke={...d.value,...te};if((ge.fromJump||ge.openType)&&!(e!=null&&e.refMenuId)){for(let[Re,We]of Object.entries(ge))Le.isArray(We)?ke[Re]=We.map(ot=>+ot):ke[Re]=We;ke.openType&&delete ke.openType,delete ke.fromJump}d.value=ke,ae(te)},ee=()=>{var te,ge;return{...w.tableListParams||{},[n.pageKey]:S.currentPage,[n.pageSizeKey]:S.pageSize,sort:S.sort||((te=w.tableListParams)==null?void 0:te.sort)||"",order:S.order||((ge=w.tableListParams)==null?void 0:ge.order)||"",...d.value||{}}},ae=(te={})=>{const ge=ee(),ke=Le.merge({},ge,te);N(ke)},N=te=>{if(!w.tableListApi){w.tableData&&(o.value=w.tableData);return}s.ajaxLoading=!0,n.request({url:w.tableListApi,method:"get",params:te}).then(ge=>{let ke=null;w.hasPagination?(w!=null&&w.tableListCallback&&Le.isFunction(w.tableListCallback)?ke=w.tableListCallback(ge.data,ge):ke=ge.data,o.value=e.freezeList?l.markRaw(ke.map(Re=>l.markRaw(Re))):ke,S.pageCount=ge==null?void 0:ge.totalPage,S.totalCount=ge.total,S.currentPage=ge.current_page):(ke=ge,o.value=e.freezeList?l.markRaw(ke):ke),ke=null,s.tableStatistics=(ge==null?void 0:ge.statistics)||null,s.ajaxLoading=!1,j(ge.data),t("tablelist-change",ge.data)}).catch(()=>{s.ajaxLoading=!1})},j=(te=[])=>{if(e!=null&&e.refMenuId)return;const{query:{id:ge,openType:ke}}=e.route;if(ke&&ge&&te.length===1){if(ke==="edit")Rn(te[0],{});else if(ke.includes("Detail")){const Re=a.value.find(We=>{var ot;return((ot=We==null?void 0:We.publicDrawerConfig)==null?void 0:ot.openName)===ke});Re!=null&&Re.id&&t("click-cell",te[0],Re)}}},q=()=>{S.currentPage=1;const te={[n.pageKey]:1,[n.pageSizeKey]:S.pageSize};d.value={},l.nextTick(()=>{ae(te)})},V=(te,ge)=>{d.value[te]=ge},K=te=>{var ge,ke;S.currentPage=1,(ke=(ge=e.config)==null?void 0:ge.tableSearch)!=null&&ke.onlyData?d.value={...te}:d.value={...d.value,...te},t("search-result",te),ae(te)},Y=te=>{S.currentPage=te,ae({page:te})},ne=te=>{S.pageSize=te;const ge=O();Ai.set(ge,te);const ke={[n.pageSizeKey]:te};ae(ke)},oe=te=>{f.value=te,t("selection-change",te)},ve=({prop:te,order:ge})=>{S.sort=te,S.order=ge==="ascending"?"asc":"desc",ae({sort:te,order:ge==="ascending"?"asc":"desc"})},xe=te=>{t("table-current-change",te)},ie=()=>{var te,ge,ke,Re;if(E.visible){E.visible=!1,E.config=null,E.model=null,s.submitLoading=!1;return}F.visible&&Fe(),(ge=(te=C==null?void 0:C.config)==null?void 0:te.api)!=null&&ge.refreshDraw&&t("refresh-draw"),((Re=(ke=C==null?void 0:C.config)==null?void 0:ke.api)!=null&&Re.refreshTable||C!=null&&C.refreshTable)&&t("refresh-table"),C.visible=!1,C.config=null,C.model=null,s.submitLoading=!1,t("list-change"),!C.stopGetList&&ae()},we=(te,ge)=>{var ke,Re,We;C.visible&&(ke=C==null?void 0:C.config)!=null&&ke.addSuccess&&Le.isFunction((Re=C==null?void 0:C.config)==null?void 0:Re.addSuccess)&&((We=C==null?void 0:C.config)==null||We.addSuccess(d,V)),ie(),t("add-success",te,ge)},Se=(te,ge)=>{ie(),t("edit-success",te,ge)},P=()=>{F.visible=!0},le=(te,ge)=>{n.request({url:w.tableCopyApi,method:"post",data:te}).then(()=>{t("copy-success",ge),ae()})},ye=(te,ge,ke,Re=[],We=!1)=>{Od(te,ge,ke,{selectionRow:Re,cancel:We,callback:(ot,Ge)=>{var Ct,Zt;t("des-edit-success",ot,Ge),ge.refreshTable&&B(),ge!=null&&ge.refreshDraw&&be(),(Zt=(Ct=ge==null?void 0:ge.api)==null?void 0:Ct.callback)==null||Zt.call(Ct,ot)}})},G=(te={})=>{const ge=ee();Xk(te,ge,{url:w.tablePrintApi,tableData:o.value,proxy:u,tableExportPathKey:w.tableExportPathKey})},J=(te={},ge={})=>{const ke=ee();Ad(te,ge,ke,{url:w.tableExportApi,tableData:o.value,proxy:u,selectionRow:f.value,tableExportPathKey:w.tableExportPathKey,beforeExportFun:w.beforeExportFun,tableExportName:w.tableExportName,emit:t,isTemp:!1})},fe=(te={},ge={})=>{const ke=ee();Ad(te,ge,ke,{url:w.tableExportApi,tableData:o.value,proxy:u,selectionRow:f.value,tableExportPathKey:w.tableExportPathKey,beforeExportFun:w.beforeExportFun,tableExportName:w.tableExportName,emit:t,isTemp:!0})},se=()=>{var te;if(!((te=w.tableFileImport)!=null&&te.action)){ut.ElMessage.info(Oe("请配置文件上传接口"));return}},me=(te,ge,ke=!0)=>{te[`isEdit${ge.prop}`]=ke},ce=(te={},ge={},ke="table")=>{var Be,je,qe,at,ft;const{id:Re}=te,{prop:We,refreshTable:ot,api:Ge}=ge;if(t("row-change",te,ge),!Re||!w.tableRowEdit)return;const Ct={table:{url:w.tableUpdateApi,des:"tableUpdateApi"},drawDes:{url:((Be=F==null?void 0:F.api)==null?void 0:Be.update)||((qe=(je=F==null?void 0:F.descriptions)==null?void 0:je.api)==null?void 0:qe.update)||((ft=(at=w==null?void 0:w.tableDrawer)==null?void 0:at.api)==null?void 0:ft.update),des:"drawerConfig.api.update || appConfig.tableDrawer.api.update"}};let Zt=(Ge==null?void 0:Ge.url)||Ct[ke].url;if(!Zt)return ut.ElMessage.info(`${Oe("请配置编辑接口")}${Ct[ke].des}`);var Ke={id:Re};const{startKey:$,endKey:de}=ge;if($&&de?(Ke[$]=te[We][0]||"",Ke[de]=te[We][1]||""):Ke[We]=te[We]||"",Ge!=null&&Ge.params){let Qe=Le.isFunction(Ge.params)?Ge.params(te,Ke):Ge.params;Ke={...Ke,...Qe}}n.request({url:Zt,method:"post",data:Ke}).then(()=>{te[`isEdit${We}`]=!1,ke==="drawDes"&&(s.refreshTable=!0),ot&&B(),t("des-edit-success",ge)})},Fe=(te="")=>{if(!F.visible){t("refresh-draw");return}const{url:ge,row:ke,searchKey:Re,valueKey:We}=F.params||{};if(!ge)return ut.ElMessage.info(Oe("请配置详情接口"));const ot={};ot[Re]=te||or(We,ke),n.request({url:ge,method:"get",params:ot}).then(Ge=>{F.detailInfo=Ge})},be=(te="")=>{Fe(te),s.refreshTable=!0},_e=(te,ge)=>{var ot,Ge,Ct,Zt,Ke;const ke=Le.merge({},T,((ot=ge.drawerConfig)==null?void 0:ot.attrs)||{});F.attrs=ke;const Re=(Ge=ge==null?void 0:ge.drawerConfig)==null?void 0:Ge.tabPaneName,We=(Ct=ge==null?void 0:ge.drawerConfig)==null?void 0:Ct.desListName;Re&&(w!=null&&w.tableDrawer[Re])&&(F.config={...w==null?void 0:w.tableDrawer[Re],api:Le.merge({},((Zt=w==null?void 0:w.tableDrawer)==null?void 0:Zt.api)||{},((Ke=ge.drawerConfig)==null?void 0:Ke.api)||{}),attrs:ke,descriptions:We&&(w!=null&&w.tableDrawer[We])?w==null?void 0:w.tableDrawer[We]:{}}),F.detailInfo=te,F.contentConfig={row:l.toRaw(te),item:l.toRaw(ge)},l.nextTick(()=>{F.visible=!0})},Ve=(te,ge)=>{var ke;t("click-cell",te,ge),ge.drawerConfig?_e(te,ge):((ke=ge==null?void 0:ge.actions)==null?void 0:ke.type)==="editBox"&&Rn(te,ge.actions)},st=()=>{},et=()=>{s.refreshTable&&(ae(),s.refreshTable=!1),F.visible=!1},Et=te=>{t("upload-btn",te)},Bt=()=>{var te;(te=w==null?void 0:w.tableFileImport)!=null&&te.refreshTable&&B()},bt=(...te)=>{t("event-name",...te)},Kt=te=>{const ge=te==null?void 0:te.action;Xn("",ge)},gt=(te,ge)=>{E.visible?m.value.setModelVal(te,ge):p.value.setModelVal(te,ge)},Ne=(te,ge)=>{E.visible?m.value.handleSetModelVal(te,ge):p.value.handleSetModelVal(te,ge)},he=(te="editBoxInfo")=>{te==="editBoxInfo"?(C.model={},C.config={}):te==="addBoxInfo"&&(E.model={},E.config={}),t("dialog-close")},Ee=te=>{s.tableSize=te,Ai.set("tableSize",te)},Te=(te,ge,ke,Re)=>{if(s.tableFields){const We=a.value.find(ot=>ot.prop===ke.property);We!=null&&We.id&&t("change-table-column","width",{width:te,column:We})}},ze=te=>{s.tableFields&&(t("change-table-column","toggle",te),te.checked=!te.checked)},He=()=>{s.tableFields&&t("change-table-column","draggable",a.value)},rt=te=>{s.tableFields&&(t("change-table-column","fixed",te),te.fixed=!te.fixed)},ct=()=>{h.value.formReset()},dt=(te,ge)=>{h.value.setModelVal(te,ge)},vt=()=>{var Re,We,ot;const{path:te}=e.route,ge=(e==null?void 0:e.refMenuId)||((We=(Re=e.userMenusAuth)==null?void 0:Re[te])==null?void 0:We.id);return((ot=e==null?void 0:e.config)==null?void 0:ot.useField)&&(e==null?void 0:e.userFieldList[ge])||null},Vt=()=>{var ge,ke,Re;return((Re=(ke=(ge=e.userMenusAuth)==null?void 0:ge[L.value])==null?void 0:ke.operations)==null?void 0:Re.filter(We=>We==null?void 0:We.show_table))||[]},Yt=()=>{var Re,We;let te=[];const ge=vt();s.tableFields=ge,((Re=e==null?void 0:e.tableColumn)!=null&&Re.length?e==null?void 0:e.tableColumn:(We=e==null?void 0:e.config)==null?void 0:We.tableColumn).forEach(ot=>{var Zt,Ke,$,de;const Ge={...ot,label:Le.isFunction(ot.label)?ot.label():Oe(ot.label),tips:Le.isFunction(ot.tips)?ot.tips():Oe(ot.tips)};Ge.isEdit=!!(Ge.editType||Ge.dateTimeFormat||Ge.isImg||Ge.isImgs||Ge.editTypeFun);let Ct=!0;if(Ge.isOperate){const Be=Vt(),je=Ge.fixed==="right"&&(((Zt=Ge==null?void 0:Ge.action)==null?void 0:Zt.list)||[]);Be!=null&&Be.length&&je.length?Ct=Be.some(qe=>je.includes(qe.code)):Ct=!1}ge?(ge[Ge.prop]&&te.push({...Ge,...ge[Ge.prop],isControl:!0,fixed:!!((Ke=ge[Ge.prop])!=null&&Ke.is_fixed),checked:Ge.hide?!1:!!ge[Ge.prop].is_show,width:(($=ge[Ge.prop])==null?void 0:$.width)||(Ge==null?void 0:Ge.width)||""}),Ge.isOperate&&te.push({...Ge,rank:Ge!=null&&Ge.type?-1/0:1/0,checked:(Ge==null?void 0:Ge.type)||Ct,isControl:!1,fixed:(Ge==null?void 0:Ge.fixed)||"",width:((de=ge[Ge.prop])==null?void 0:de.width)||(Ge==null?void 0:Ge.width)||""})):te.push({...Ge,checked:Ge.isOperate?Ct:!Ge.hide})}),ge&&(te=te.sort((ot,Ge)=>ot.rank-Ge.rank)),a.value=te},Xt=()=>{const te={},ge=vt();if(ge&&Le.isObject(ge))for(const[ke,Re]of Object.entries(ge))Re.is_default_sort&&(te.sort=ke,te.order=Re.sort);te!=null&&te.order&&(S.sort=te.sort,S.order=te.order)},Kn=async()=>await p.value.createSubmitData(),xn=()=>{Yt()},Yn=(te,ge,ke)=>{te&&n.request({url:te,method:"get",params:{}}).then(Re=>{ge==null||ge(Re,ke.model)})},_t=(te={},ge={})=>{var We;const ke=te.formList;let Re=ke;return s.tableFields&&(Re=ke.filter(ot=>{const Ge=!ot.privacyId||!!s.tableFields[ot.privacyId];return(te==null?void 0:te.privacyKey)==="disabled"?(ot.formAttrs={...ot.formAttrs,disabled:!Ge},!0):Ge})),(We=te==null?void 0:te.beforeCreate)!=null&&We.formatFormList&&Le.isFunction(te.beforeCreate.formatFormList)&&(Re=te.beforeCreate.formatFormList(Re,ge)),Re},An=async(te,ge,ke={},Re)=>{const We={id:te.id,...ke};n.request({url:w[ge].form.api.detail,method:"get",params:We}).then(ot=>{Re?C.model=Re(ot):C.model=ot,C.title=Td(!0,w,ge,Oe),t("get-detail-success",ot)})},ln={filterFormList:_t,handleGetDetail:An,handleBeforeCreateReq:Yn,t:Oe},Rn=(te,ge)=>{ya(te,ge,w,C,ln),l.nextTick(()=>{w.editBoxOnDialog?C.visible=!0:P()})},Xn=(te,ge)=>{ya(te,ge,w,E,ln),E.visible=!0},rr=(te="",ge,ke,Re)=>{n.request({url:te||w.tableDeleteApi,method:"post",data:ge}).then(()=>{t("delete-success",Re),ae(),ke!=null&&ke.refreshDraw&&be()})},In={deleteText:((Me=w==null?void 0:w.headerActions)==null?void 0:Me.deleteText)||"",tableCopyText:w.tableCopyText,handleEdit:Rn,handleLinkRouter:Rm,t:Oe,emit:t,handleDeleteRequest:rr,handleExportRequest:J,handleExportTempRequest:fe,handlePrintRequest:G,handleImportRequest:se,handleSimpleRequest:ye,handleCopyRequest:le},tt=(te,ge={},ke=null)=>{var ot,Ge,Ct;const{code:Re}=te,We=ke||((ot=w.headerActions)==null?void 0:ot[Re])||((Ct=(Ge=F==null?void 0:F.descriptions)==null?void 0:Ge.headerActions)==null?void 0:Ct[Re]);ns(te,ge,We,f.value,"tableHeader",In),t("header-action",te,f.value,D.value,We)},Li=(te,ge,ke)=>{const{action:Re}=te,We=ke.action[Re.code];ns(Re,ge,We,f.value,"",{...In,deleteText:w.tableDeleteText}),t("table-action",Re,ge,We,te)},Ti=l.watchEffect(()=>{}),Br=l.watch(e,te=>{w=Le.merge({},x,te.config),te.config.tableData&&(o.value=te.config.tableData||[])}),B=()=>{ae(),t("refresh-table")},z=(te,ge,ke)=>{t("form-item-change",te,ge,ke)},I=async()=>{var ke;const te=await((ke=h==null?void 0:h.value)==null?void 0:ke.createSubmitData());for(const Re in te)te[Re]===""&&delete te[Re];const ge=H(!1);return ge&&(Object.assign(te,ge),h.value.handleSetModelValue(te)),te},H=(te=!1)=>{var ge;if(e.cacheSearch){const ke=r||L.value;return((ge=n==null?void 0:n.handleCacheSearch)==null?void 0:ge.call(n,ke,te,te?d.value:null))||null}return null},re=l.watch(()=>L.value,(te,ge)=>{te!==r&&(r=ge)});l.onMounted(async()=>{var ge;const te=await I();d.value=te,Xt(),Yt(),(ge=w.tableAttr)!=null&&ge.immediate&&X()});function Q(){w=null,o.value=null,a.value=null,d.value=null,s.tableFields=null,f.value=null,s.renderTable=!1}return l.onBeforeUnmount(()=>{H(!0),Ti(),Br(),Q(),re()}),{tableRef:v,tableData:o,appTableColumn:a,slots:c,...l.toRefs(s),currentPagePath:L,appConfig:w,pagination:S,editBoxRef:p,editBoxRefModel:b,editBoxInfo:C,addBoxInfo:E,addBoxRef:m,addBoxRefModel:g,tableDrawerConfig:F,selectionRow:f,selectionRowIds:y,tableSearchModel:d,loadingText:M,searchFormRef:h,showPagination:k,showHeaderActions:_,showHeaderSearch:A,onSearchSubmit:K,onSearchReset:q,handleEdit:Rn,handleCurrentChange:Y,handleSizeChange:ne,handleSelectionChange:oe,handleTableCurrentChange:xe,handleSortChange:ve,handleHeaderAction:tt,handleTableAction:Li,handleGetDetail:An,getList:ae,initSearch:X,handleError:st,handleAddSuccess:we,handleEditSuccess:Se,handleEditRow:me,handleEditRowProp:ce,handleImportRequest:se,handleClickRow:Ve,handleCloseDrawer:et,handleUploadBtn:Et,handleUploadSuccess:Bt,handleRefreshDrawerDetail:be,handleComponentEvent:bt,handleAddOption:Kt,setFormModelVal:gt,handleSetFormModelVal:Ne,handleSetSearchModelVal:dt,handleDialogClose:he,handleTableSizeChange:Ee,handleTableHeaderDragend:Te,handleFieldCheck:ze,handleTableColumnSort:He,handleSearchFormReset:ct,getSubmitData:Kn,handleFixedCell:rt,handleDoLayoutTable:xn,handleItemChange:z}}}),u9e={key:0,class:"app-table-wrapper"},f9e={key:0,class:"table-header-wrapper fx"},c9e={class:"fxm pr10 ex"},d9e={class:"fxmj"},h9e={class:"ex"};function p9e(e,t,n,i,r,o){var _,A,x,w,O,S,C;const a=l.resolveComponent("jwt-form"),s=l.resolveComponent("jwt-header-button"),u=l.resolveComponent("TableSizeSetting"),c=l.resolveComponent("TableFieldControl"),f=l.resolveComponent("TableColumnHeader"),d=l.resolveComponent("jwt-table-button"),h=l.resolveComponent("jwt-column-item"),p=l.resolveComponent("el-table-column"),m=l.resolveComponent("el-table"),v=l.resolveComponent("el-pagination"),y=l.resolveComponent("JwtDialogForm"),b=l.resolveComponent("jwt-detail-drawer"),g=l.resolveComponent("el-drawer"),k=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock(l.Fragment,null,[e.renderTable?(l.openBlock(),l.createElementBlock("div",u9e,[l.createElementVNode("div",{class:l.normalizeClass([(_=e.appConfig)!=null&&_.searchBtnInline?"fxmj":""])},[l.renderSlot(e.$slots,"search-before",{},void 0,!0),e.showHeaderSearch?(l.openBlock(),l.createElementBlock("div",f9e,[t[0]||(l.setBlockTracking(-1,!0),(t[0]=(w=(x=(A=e.config)==null?void 0:A.tableSearch)==null?void 0:x.formList)!=null&&w.length?(l.openBlock(),l.createBlock(a,{key:0,ref:"searchFormRef",modelValue:e.tableSearchModel,"onUpdate:modelValue":E=>e.tableSearchModel=E,class:"app-table-search",config:(O=e.config)==null?void 0:O.tableSearch,"is-search":"",onReset:e.onSearchReset,onSubmit:e.onSearchSubmit},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),E=>({name:E,fn:l.withCtx(({model:T})=>[l.renderSlot(e.$slots,E,{model:T},void 0,!0)])}))]),1032,["modelValue","onUpdate:modelValue","config","onReset","onSubmit"])):l.createCommentVNode("",!0)).cacheIndex=0,l.setBlockTracking(1),t[0]),l.renderSlot(e.$slots,"search-form-after",{},void 0,!0)])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"search-after",{},void 0,!0),l.createElementVNode("div",{class:l.normalizeClass(["fxmj",[(S=e.appConfig)!=null&&S.searchBtnInline?"mb18":""]])},[l.createElementVNode("div",c9e,[l.renderSlot(e.$slots,"header-button-before",{},void 0,!0),e.showHeaderActions?(l.openBlock(),l.createBlock(s,{key:0,config:((C=e.config)==null?void 0:C.headerActions)||{},"current-path":e.currentPagePath,"file-import":e.appConfig.tableFileImport,loading:e.ajaxLoading,"menus-obj":e.userMenusAuth,"selection-row":e.selectionRow,"upload-success-cb":e.appConfig.uploadSuccessCb,onHeaderAction:e.handleHeaderAction,onUploadSuccess:e.handleUploadSuccess},null,8,["config","current-path","file-import","loading","menus-obj","selection-row","upload-success-cb","onHeaderAction","onUploadSuccess"])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"header-button-after",{},void 0,!0)]),l.createElementVNode("div",null,[e.appConfig.showTableLineHeight?(l.openBlock(),l.createBlock(u,{key:0,onTableSize:e.handleTableSizeChange},null,8,["onTableSize"])):l.createCommentVNode("",!0),e.tableFields?(l.openBlock(),l.createBlock(c,{key:1,modelValue:e.appTableColumn,"onUpdate:modelValue":t[1]||(t[1]=E=>e.appTableColumn=E),onChange:e.handleFieldCheck,onSort:e.handleTableColumnSort},null,8,["modelValue","onChange","onSort"])):l.createCommentVNode("",!0)])],2)],2),l.renderSlot(e.$slots,"table-before",{},void 0,!0),l.renderSlot(e.$slots,"table-content",{list:e.tableData},()=>[l.withDirectives((l.openBlock(),l.createBlock(m,l.mergeProps(e.appConfig.tableAttr,{ref:"tableRef",class:"mt10 jwt-table-wrapper",data:e.tableData,"element-loading-spinner":"el-icon-loading","element-loading-text":e.loadingText,height:e.tableHeight,size:e.tableSize},l.toHandlers(e.appConfig.tableEvents),{onCurrentChange:e.handleTableCurrentChange,onHeaderDragend:e.handleTableHeaderDragend,onSelectionChange:e.handleSelectionChange,onSortChange:e.handleSortChange}),{default:l.withCtx(()=>[l.renderSlot(e.$slots,"table-content-before",{},void 0,!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.appTableColumn,(E,T)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:T},[E.checked?(l.openBlock(),l.createBlock(p,l.mergeProps({key:0,align:E.align||"center",fixed:E.fixed},{ref_for:!0},E.attrs,{"min-width":E.minWidth?E.minWidth:null,prop:E.prop,sortable:E.sortable,type:E.type,width:E.width?E.width:null}),l.createSlots({header:l.withCtx(()=>[l.createVNode(f,{item:E,onFixed:F=>e.handleFixedCell(E)},null,8,["item","onFixed"])]),_:2},[E.type?E.type==="expand"?{name:"default",fn:l.withCtx(({row:F})=>[l.renderSlot(e.$slots,E.prop,{index:T,scope:F},void 0,!0)]),key:"1"}:void 0:{name:"default",fn:l.withCtx(({row:F,$index:D})=>[E.action?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(e.$slots,"action-before",{scope:F},void 0,!0),l.createVNode(d,{config:E,"current-path":e.currentPagePath,"menus-obj":e.userMenusAuth,row:F,"show-button-num":e.appConfig.tableButtonNum,onTableAction:R=>e.handleTableAction(R,F,E)},null,8,["config","current-path","menus-obj","row","show-button-num","onTableAction"]),l.renderSlot(e.$slots,"action-after",{scope:F},void 0,!0)],64)):E.isColumn?l.renderSlot(e.$slots,E.prop,{key:1,index:T,scope:F},void 0,!0):(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass([(E==null?void 0:E.columnCls)||"fxmc","w mw"])},[l.renderSlot(e.$slots,E.slotPreName,{scope:F},void 0,!0),l.renderSlot(e.$slots,E.prop,{index:T,scope:F},()=>[l.createVNode(h,{index:D,item:E,row:F,onChange:e.handleEditRowProp,onClickCell:e.handleClickRow},null,8,["index","item","row","onChange","onClickCell"])],!0),l.renderSlot(e.$slots,E.slotSufName,{scope:F},void 0,!0)],2))]),key:"0"}]),1040,["align","fixed","min-width","prop","sortable","type","width"])):l.createCommentVNode("",!0)],64))),128)),l.renderSlot(e.$slots,"table-content-after",{list:e.tableData},void 0,!0)]),_:3},16,["data","element-loading-text","height","size","onCurrentChange","onHeaderDragend","onSelectionChange","onSortChange"])),[[k,e.ajaxLoading]])],!0),l.renderSlot(e.$slots,"table-after",{},void 0,!0),l.createElementVNode("div",d9e,[l.createElementVNode("div",h9e,[l.renderSlot(e.$slots,"table-pagination-before",{data:e.tableStatistics},void 0,!0)]),e.showPagination?(l.openBlock(),l.createBlock(v,l.mergeProps({key:0},e.appConfig.pagination,{class:"app-pagination","current-page":e.pagination.currentPage,disabled:e.ajaxLoading,"page-count":e.pagination.pageCount,"page-size":e.pagination.pageSize,total:e.pagination.totalCount,onCurrentChange:e.handleCurrentChange,onSizeChange:e.handleSizeChange}),null,16,["current-page","disabled","page-count","page-size","total","onCurrentChange","onSizeChange"])):l.createCommentVNode("",!0)]),l.renderSlot(e.$slots,"table-pagination-after",{},void 0,!0)])):l.createCommentVNode("",!0),e.editBoxInfo.visible?(l.openBlock(),l.createBlock(y,{key:1,ref:"editBoxRef","app-config":e.editBoxInfo.config,config:e.editBoxInfo,"selection-row":e.selectionRow,"selection-row-ids":e.selectionRowIds,onAddOption:e.handleAddOption,onAddSuccess:e.handleAddSuccess,onEditSuccess:e.handleEditSuccess,onError:e.handleError,onItemChange:e.handleItemChange,onUploadBtn:e.handleUploadBtn},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),E=>({name:E,fn:l.withCtx(({model:T})=>[l.renderSlot(e.$slots,E,{model:T},void 0,!0)])}))]),1032,["app-config","config","selection-row","selection-row-ids","onAddOption","onAddSuccess","onEditSuccess","onError","onItemChange","onUploadBtn"])):l.createCommentVNode("",!0),e.addBoxInfo.visible?(l.openBlock(),l.createBlock(y,{key:2,ref:"addBoxRef","app-config":e.addBoxInfo.config,config:e.addBoxInfo,onAddOption:e.handleAddOption,onAddSuccess:e.handleAddSuccess,onEditSuccess:e.handleEditSuccess,onError:e.handleError,onUploadBtn:e.handleUploadBtn},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),E=>({name:E,fn:l.withCtx(({model:T})=>[l.renderSlot(e.$slots,E,{model:T},void 0,!0)])}))]),1032,["app-config","config","onAddOption","onAddSuccess","onEditSuccess","onError","onUploadBtn"])):l.createCommentVNode("",!0),e.tableDrawerConfig.visible?(l.openBlock(),l.createBlock(g,l.mergeProps({key:3,modelValue:e.tableDrawerConfig.visible,"onUpdate:modelValue":t[2]||(t[2]=E=>e.tableDrawerConfig.visible=E)},e.tableDrawerConfig.attrs,{class:"jwt-drawer-wrapper","with-header":!1,onClose:e.handleCloseDrawer}),{default:l.withCtx(()=>[l.createVNode(b,{ref:"pageDetailRef",config:e.tableDrawerConfig.config,"current-page-drawer-config":e.tableDrawerConfig.contentConfig,"current-page-path":e.currentPagePath,"keep-alive":!1,"open-page-drawer-config-list":[],"user-menus-auth":e.userMenusAuth,onCloseDrawer:e.handleCloseDrawer,onRefreshTable:e.handleRefreshTable},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),E=>({name:E,fn:l.withCtx(({scope:T,model:F,row:D})=>[l.renderSlot(e.$slots,E,{model:F,row:D,scope:T},void 0,!0)])}))]),1032,["config","current-page-drawer-config","current-page-path","user-menus-auth","onCloseDrawer","onRefreshTable"])]),_:3},16,["modelValue","onClose"])):l.createCommentVNode("",!0)],64)}const g9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn(l9e,[["render",p9e],["__scopeId","data-v-8ee33710"]])},Symbol.toStringTag,{value:"Module"})),m9e=l.defineComponent({name:"JwtTable",components:{TableSizeSetting:gk,TableFieldControl:pk,TableListContent:zE,TableContentControl:LE,TableListContentVirtualized:VE},props:{config:{require:!0,type:Object,default:()=>{}},tableHeight:{type:[String,Number],default:null},userMenusAuth:{type:Object,default:()=>{}},route:{type:Object,default:()=>{}},router:{type:Object,default:()=>{}},userFieldList:{type:Object,default:()=>{}},refMenuId:{type:[Number,String],default:""},pageUrl:{type:String,default:""},tableColumn:{type:Array,default:()=>[]},freezeList:{type:Boolean,default:!0},cacheSearch:{type:Boolean,default:!1}},emits:["selection-change","list-change","header-action","table-action","add-handle","edit-handle","add-success","edit-success","delete-success","table-current-change","tablelist-change","get-detail-success","click-cell","des-edit-success","upload-btn","event-name","copy-success","asynExport","search-result","change-table-column","fixed-table-column","dialog-close","refresh-draw","refresh-table","form-item-change","row-change","dbclick-cell","change-table-rank","after-btns-click","show-file","sort-change"],setup(e,{emit:t}){var ot,Ge,Ct,Zt,Ke;const n=gn(),i={"page-sizes":Im(),"page-size":20,layout:"total, sizes, prev, pager, next, jumper"};let r="";const o=(ot=e==null?void 0:e.config)!=null&&ot.virtualized?l.ref([]):l.shallowRef([]),a=l.shallowRef([]),s=l.reactive({ajaxLoading:!1,submitLoading:!1,renderTable:!0,refreshTable:!1,tableSize:Ai.get("tableSize")||"default",tableFields:null,tableStatistics:[]}),{proxy:u}=l.getCurrentInstance(),c=l.useSlots(),f=l.ref([]),d=l.ref({}),h=l.shallowRef(null),p=l.shallowRef(null),m=l.shallowRef(null),v=l.ref(null),y=l.computed(()=>{var $;return($=v==null?void 0:v.value)==null?void 0:$.tableRef}),b=l.computed(()=>f.value.map($=>$.id).join(",")),g=l.computed(()=>{var $;return(($=p.value)==null?void 0:$.editBoxRefModel)||{}}),k=l.computed(()=>{var $;return(($=m.value)==null?void 0:$.editBoxRefModel)||{}}),_=l.computed(()=>dr("showPagination",e.config)?Le.isFunction(e.config.showPagination)?e.config.showPagination():e.config.showPagination:!0),A=l.computed(()=>dr("headerActionsShow",e.config)?Le.isFunction(e.config.headerActionsShow)?e.config.headerActionsShow():e.config.headerActionsShow:!0),x=l.computed(()=>dr("showHeaderSearch",e.config)?Le.isFunction(e.config.showHeaderSearch)?e.config.showHeaderSearch():e.config.showHeaderSearch:!0),w=Object.freeze({headerActions:{list:[],deleteText:""},headerActionsShow:!0,tableAttr:{stripe:!0,border:!0,fit:!0,highlightCurrentRow:!0,immediate:!0,defaultSort:{prop:"",order:""},sortBy:{key:"",order:""}},virtualized:!1,dragTitleKey:"title",estimatedRowHeight:50,tableEvents:{},tableColumn:[],searchBtnInline:!1,useField:!0,keepAliveTabs:!0,tableListApi:null,tableListParams:{},tableCacheSortOrder:{},tableDeleteApi:null,tableRowEdit:!0,tableDeleteText:"",tableDeleteParams:{},tableExportApi:"",tableExportPathKey:"",tablePrintApi:"",tablePrintPathKey:"http_path",pagination:i,showPagination:!0,hasPagination:!0,showTableLineHeight:!1,showTableDrag:!1,editBoxOnDialog:!0,editBox:{title:Oe("系统"),dialog:{width:"960px",top:"7vh"},form:{api:{add:null,update:null},formAttrs:{},formList:[]},footer:{confirm:{title:Oe("确认"),attrs:{type:"primary"}},cancel:{title:Oe("取消"),attrs:{}}}},tableDrawer:{}});let O=Le.merge({},w,{useField:!0,keepAliveTabs:!0},e.config);const S=()=>{var $;return(($=e==null?void 0:e.config)==null?void 0:$.tablePageSizeName)||"pageSize"},C=l.reactive({currentPage:1,pageCount:1,pageSize:Ai.get(S())||((Ge=O.tableListParams)==null?void 0:Ge[n.pageSizeKey])||O.pagination["page-sizes"][2],totalCount:1,sort:((Ct=O.tableListParams)==null?void 0:Ct.sort)||"id",order:((Zt=O.tableListParams)==null?void 0:Zt.order)||"desc"}),E=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox",refreshTable:!1}),T=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox"}),F={"append-to-body":!0,"destroy-on-close":!0,size:"40%"},D=l.shallowReactive({attrs:{...F},visible:!1,config:{},detailInfo:{},contentConfig:{}}),R=l.computed(()=>O.virtualized?{key:C.sort,order:C.order}:{prop:C.sort,order:C.order==="asc"?"ascending":"descending"}),L=l.computed(()=>{var $;return D.descriptionEdit||($=D==null?void 0:D.attrs)!=null&&$.refresh?l.reactive(D.detailInfo):D.detailInfo}),M=()=>{var de;const $={};for(const Be in e.userMenusAuth){const{id:je}=((de=e.userMenusAuth)==null?void 0:de[Be])||"";je&&($[je]=Be)}return $},X=l.computed(()=>{var de;let $=((de=e==null?void 0:e.route)==null?void 0:de.path)||"";return e!=null&&e.refMenuId&&($=M()[e.refMenuId]),e!=null&&e.pageUrl&&($=e==null?void 0:e.pageUrl),$||""}),ee=l.computed(()=>Oe("加载数据中")||"加载数据中..."),ae=($={})=>{const{query:de}=e.route||{};let Be={...d.value,...$};if((de!=null&&de.fromJump||de!=null&&de.openType)&&!(e!=null&&e.refMenuId)){for(let[je,qe]of Object.entries(de))Le.isArray(qe)?Be[je]=qe.map(at=>+at):Be[je]=qe;Be.openType&&delete Be.openType,delete Be.fromJump}d.value=Be,j($)},N=()=>{var $,de;return{...O.tableListParams||{},[n.pageKey]:C.currentPage,[n.pageSizeKey]:C.pageSize,sort:C.sort||(($=O.tableListParams)==null?void 0:$.sort)||"",order:C.order||((de=O.tableListParams)==null?void 0:de.order)||"",...d.value||{}}},j=($={})=>{const de=N(),Be=Le.merge({},de,$);q(Be)},q=$=>{if(!O.tableListApi){O.tableData&&(o.value=O.tableData);return}s.ajaxLoading=!0,n.request({url:O.tableListApi,method:"get",params:$}).then(de=>{let Be=null;if(O.hasPagination){O!=null&&O.tableListCallback&&Le.isFunction(O.tableListCallback)?Be=O.tableListCallback(de.data,de):Be=de.data,o.value=e.freezeList?l.markRaw(Be.map(qe=>l.markRaw(qe))):Be;let je=de;O!=null&&O.paginationCback&&Le.isFunction(O.paginationCback)&&(je=O.paginationCback(de)),C.pageCount=je==null?void 0:je.totalPage,C.totalCount=je.total,C.currentPage=je.current_page}else Be=de,o.value=e.freezeList?l.markRaw(Be):Be;Be=null,s.tableStatistics=(de==null?void 0:de.statistics)||null,s.ajaxLoading=!1,V(de.data),t("tablelist-change",de.data)}).catch(()=>{s.ajaxLoading=!1})},V=($=[])=>{if(e!=null&&e.refMenuId)return;const{query:{id:de,openType:Be}}=e.route;if(Be&&de&&$.length===1){if(Be==="edit")z($[0],{});else if(Be.includes("Detail")){const je=a.value.find(qe=>{var at;return((at=qe==null?void 0:qe.publicDrawerConfig)==null?void 0:at.openName)===Be});je!=null&&je.id&&t("click-cell",$[0],je)}}},K=()=>{C.currentPage=1;const $={[n.pageKey]:1,[n.pageSizeKey]:C.pageSize};d.value={},l.nextTick(()=>{j($)})},Y=($,de)=>{d.value[$]=de},ne=$=>{var de,Be;C.currentPage=1,(Be=(de=e.config)==null?void 0:de.tableSearch)!=null&&Be.onlyData?d.value={...$}:d.value={...d.value,...$},t("search-result",$),j($)},oe=$=>{C.currentPage=$,j({page:$})},ve=$=>{C.pageSize=$;const de=S();Ai.set(de,$);const Be={[n.pageSizeKey]:$};j(Be)},xe=$=>{f.value=$,t("selection-change",$)},ie=$=>{o.value=o.value.map(de=>(de.selectionChecked=$,de)),$?(f.value=o.value,t("selection-change",o.value)):(f.value=[],t("selection-change",[]))},we=()=>{l.nextTick(()=>{const $=o.value.filter(de=>de.selectionChecked);f.value=$,t("selection-change",$)})},Se=({prop:$,order:de})=>{var je;C.sort=$,C.order=de==="ascending"?"asc":"desc";const Be={sort:$,order:de==="ascending"?"asc":"desc"};de&&((je=O==null?void 0:O.tableListParams)!=null&&je.sorts)&&(Be.sorts=""),t("sort-change",{prop:$,order:de,param:Be,tableFields:s.tableFields}),j(Be)},P=$=>{t("table-current-change",$)},le=()=>{var $,de,Be,je;if(T.visible){T.visible=!1,T.config=null,T.model=null,s.submitLoading=!1;return}D.visible&&Et(),(de=($=E==null?void 0:E.config)==null?void 0:$.api)!=null&&de.refreshDraw&&t("refresh-draw"),((je=(Be=E==null?void 0:E.config)==null?void 0:Be.api)!=null&&je.refreshTable||E!=null&&E.refreshTable)&&t("refresh-table"),E.visible=!1,E.config=null,E.model=null,s.submitLoading=!1,t("list-change"),!E.stopGetList&&j()},ye=($,de)=>{var Be,je,qe;E.visible&&(Be=E==null?void 0:E.config)!=null&&Be.addSuccess&&Le.isFunction((je=E==null?void 0:E.config)==null?void 0:je.addSuccess)&&((qe=E==null?void 0:E.config)==null||qe.addSuccess(d,Y)),le(),t("add-success",$,de)},G=($,de)=>{le(),t("edit-success",$,de)},J=()=>{D.visible=!0},fe=($,de)=>{n.request({url:O.tableCopyApi,method:"post",data:$}).then(()=>{t("copy-success",de),j()})},se=($,de,Be,je=[],qe=!1)=>{Od($,de,Be,{selectionRow:je,cancel:qe,callback:(at,ft)=>{var Qe,Gt;t("des-edit-success",at,ft),de.refreshTable&&Me(),de!=null&&de.refreshDraw&&Bt(),(Gt=(Qe=de==null?void 0:de.api)==null?void 0:Qe.callback)==null||Gt.call(Qe,at)}})},me=($={})=>{const de=N();Xk($,de,{url:O.tablePrintApi,tableData:o.value,proxy:u,tableExportPathKey:O.tableExportPathKey})},ce=($={},de={})=>{const Be=N();Ad($,de,Be,{url:O.tableExportApi,tableData:o.value,proxy:u,selectionRow:f.value,tableExportPathKey:O.tableExportPathKey,beforeExportFun:O.beforeExportFun,tableExportName:O.tableExportName,emit:t,isTemp:!1})},Fe=($={},de={})=>{const Be=N();Ad($,de,Be,{url:O.tableExportApi,tableData:o.value,proxy:u,selectionRow:f.value,tableExportPathKey:O.tableExportPathKey,beforeExportFun:O.beforeExportFun,tableExportName:O.tableExportName,emit:t,isTemp:!0})},be=()=>{var $;if(!(($=O.tableFileImport)!=null&&$.action)){ut.ElMessage.info(Oe("请配置文件上传接口"));return}},_e=($,de,Be=!0)=>{$[`isEdit${de.prop}`]=Be},Ve=($={},de={})=>{const{id:Be}=$,{prop:je,startKey:qe,endKey:at}=de;if(!Be||!je)return;const ft=o.value.findIndex(Pe=>(Pe==null?void 0:Pe.id)===Be);if(ft===-1)return;const Gt={...o.value[ft]||{},...$};qe&&at&&($!=null&&$[je])&&(Gt[qe]=$[je][0],Gt[at]=$[je][1]),o.value=o.value.map((Pe,Ze)=>Ze===ft?Gt:Pe)},st=($={},de={},Be="table")=>{var Nt,bn,wi,On,fn;const{id:je}=$,{prop:qe,refreshTable:at,api:ft}=de;if(Ve($,de),t("row-change",$,de),!je||!O.tableRowEdit)return;const Qe={table:{url:O.tableUpdateApi,des:"tableUpdateApi"},drawDes:{url:((Nt=D==null?void 0:D.api)==null?void 0:Nt.update)||((wi=(bn=D==null?void 0:D.descriptions)==null?void 0:bn.api)==null?void 0:wi.update)||((fn=(On=O==null?void 0:O.tableDrawer)==null?void 0:On.api)==null?void 0:fn.update),des:"drawerConfig.api.update || appConfig.tableDrawer.api.update"}};let Gt=(ft==null?void 0:ft.url)||Qe[Be].url;if(!Gt)return ut.ElMessage.info(`${Oe("请配置编辑接口")}${Qe[Be].des}`);let Pe={id:je};const{startKey:Ze,endKey:yt}=de;if(Ze&&yt?(Pe[Ze]=sf($[qe][0]),Pe[yt]=sf($[qe][1])):Pe[qe]=sf($[qe]),ft!=null&&ft.params){const zi=Le.isFunction(ft.params)?ft.params($,Pe):ft.params;Pe={...Pe,...zi}}n.request({url:Gt,method:"post",data:Pe}).then(()=>{$[`isEdit${qe}`]=!1,Ve($,de),Be==="drawDes"&&(s.refreshTable=!0),at&&Me(),t("des-edit-success",de)})},et=$=>{t("dbclick-cell",$)},Et=($="")=>{if(!D.visible){t("refresh-draw");return}const{url:de,row:Be,searchKey:je,valueKey:qe}=D.params||{};if(!de)return ut.ElMessage.info(Oe("请配置详情接口"));const at={};at[je]=$||or(qe,Be),n.request({url:de,method:"get",params:at}).then(ft=>{D.detailInfo=ft})},Bt=($="")=>{Et($),s.refreshTable=!0},bt=($,de)=>{var at,ft,Qe,Gt,Pe;const Be=Le.merge({},F,((at=de.drawerConfig)==null?void 0:at.attrs)||{});D.attrs=Be;const je=(ft=de==null?void 0:de.drawerConfig)==null?void 0:ft.tabPaneName,qe=(Qe=de==null?void 0:de.drawerConfig)==null?void 0:Qe.desListName;je&&(O!=null&&O.tableDrawer[je])&&(D.config={...O==null?void 0:O.tableDrawer[je],api:Le.merge({},((Gt=O==null?void 0:O.tableDrawer)==null?void 0:Gt.api)||{},((Pe=de.drawerConfig)==null?void 0:Pe.api)||{}),attrs:Be,descriptions:qe&&(O!=null&&O.tableDrawer[qe])?O==null?void 0:O.tableDrawer[qe]:{}}),D.detailInfo=$,D.contentConfig={row:l.toRaw($),item:l.toRaw(de)},l.nextTick(()=>{D.visible=!0})},Kt=($,de)=>{var Be;t("click-cell",$,de),de.drawerConfig?bt($,de):((Be=de==null?void 0:de.actions)==null?void 0:Be.type)==="editBox"&&z($,de.actions)},gt=$=>{t("show-file",$)},Ne=()=>{},he=()=>{s.refreshTable&&(j(),s.refreshTable=!1),D.visible=!1},Ee=$=>{t("upload-btn",$)},Te=($,de,Be,je)=>{t("after-btns-click",$,de,Be,je)},ze=()=>{var $;($=O==null?void 0:O.tableFileImport)!=null&&$.refreshTable&&Me()},He=(...$)=>{t("event-name",...$)},rt=$=>{const de=$==null?void 0:$.action;I("",de)},ct=($,de)=>{T.visible?m.value.setModelVal($,de):p.value.setModelVal($,de)},dt=($,de)=>{T.visible?m.value.handleSetModelVal($,de):p.value.handleSetModelVal($,de)},vt=($="editBoxInfo")=>{$==="editBoxInfo"?(E.model={},E.config={}):$==="addBoxInfo"&&(T.model={},T.config={}),t("dialog-close")},Vt=$=>{s.tableSize=$,Ai.set("tableSize",$)},Yt=($,de,Be)=>{if(s.tableFields){const je=a.value.find(qe=>qe.prop===Be.property);je!=null&&je.id&&t("change-table-column","width",{width:$,column:je})}},Xt=$=>{s.tableFields&&(t("change-table-column","toggle",$),$.checked=!$.checked)},Kn=()=>{s.tableFields&&t("change-table-column","draggable",a.value)},xn=($,de)=>{o.value=o.value.map((Be,je)=>({...Be,rank:de+je})),l.nextTick(()=>{t("change-table-rank",o.value)})},Yn=($,de)=>{s.tableFields&&(t("change-table-column",$,de),de.fixed=!de.fixed)},_t=()=>{h.value.formReset()},An=($,de)=>{h.value.setModelVal($,de)},ln=()=>{var je,qe,at;const{path:$}=(e==null?void 0:e.route)||{},de=(e==null?void 0:e.refMenuId)||((qe=(je=e.userMenusAuth)==null?void 0:je[$])==null?void 0:qe.id);return((at=e==null?void 0:e.config)==null?void 0:at.useField)&&(e==null?void 0:e.userFieldList[de])||null},Rn=()=>{var de,Be,je;return((je=(Be=(de=e.userMenusAuth)==null?void 0:de[X.value])==null?void 0:Be.operations)==null?void 0:je.filter(qe=>qe==null?void 0:qe.show_table))||[]},Xn=()=>{var je,qe;let $=[];const de=ln();s.tableFields=de,((je=e==null?void 0:e.tableColumn)!=null&&je.length?e==null?void 0:e.tableColumn:(qe=e==null?void 0:e.config)==null?void 0:qe.tableColumn).forEach(at=>{var Pe,Ze,yt,Nt,bn,wi;const ft=Le.isFunction(at.label)?at.label():at.label,Qe={...at,label:Oe(ft),tips:Le.isFunction(at.tips)?at.tips():Oe(at.tips)};Qe.isEdit=!!(Qe.editType||Qe.dateTimeFormat||Qe.isImg||Qe.isImgs||Qe.editTypeFun);let Gt=!0;if(Qe.isOperate){const On=Rn(),fn=Qe.fixed==="right"&&(((Pe=Qe==null?void 0:Qe.action)==null?void 0:Pe.list)||[]);On!=null&&On.length&&fn.length?Gt=On.some(zi=>fn.includes(zi.code)):Gt=!1}de?(de[Qe.prop]&&$.push({...Qe,...de[Qe.prop],label:Qe!=null&&Qe.customLabel?Qe.label:((Ze=de[Qe.prop])==null?void 0:Ze.label)||Qe.label,isControl:!0,fixed:!!((yt=de[Qe.prop])!=null&&yt.is_fixed),checked:Qe.hide?!1:!!de[Qe.prop].is_show,width:((Nt=de[Qe.prop])==null?void 0:Nt.width)||(Qe==null?void 0:Qe.width)||"",sortable:(bn=de[Qe.prop])!=null&&bn.support_sort?"custome":!1}),Qe.isOperate&&$.push({...Qe,rank:Qe!=null&&Qe.type?-1/0:1/0,checked:(Qe==null?void 0:Qe.type)||Gt,isControl:!1,fixed:(Qe==null?void 0:Qe.fixed)||"",width:((wi=de[Qe.prop])==null?void 0:wi.width)||(Qe==null?void 0:Qe.width)||""})):$.push({...Qe,checked:Qe.isOperate?Gt:!Qe.hide})}),de&&($=$.sort((at,ft)=>at.rank-ft.rank)),a.value=$},rr=()=>{var Be,je,qe;const $={},de=ln();if(de&&Le.isObject(de))for(const[at,ft]of Object.entries(de))ft.is_default_sort&&($.sort=at,$.order=ft.sort);(Be=O==null?void 0:O.tableCacheSortOrder)!=null&&Be.order&&($.order=(je=O==null?void 0:O.tableCacheSortOrder)==null?void 0:je.order,$.sort=(qe=O==null?void 0:O.tableCacheSortOrder)==null?void 0:qe.sort),$!=null&&$.order&&(C.sort=$.sort,C.order=$.order)},In=async()=>await p.value.createSubmitData(),tt=()=>{Xn()},Li=($,de,Be)=>{$&&n.request({url:$,method:"get",params:{}}).then(je=>{de==null||de(je,Be.model)})},Ti=($={},de={})=>{var qe;const Be=$.formList;let je=Be;return s.tableFields&&(je=Be.filter(at=>{const ft=!at.privacyId||!!s.tableFields[at.privacyId];return($==null?void 0:$.privacyKey)==="disabled"?(at.formAttrs={...at.formAttrs,disabled:!ft},!0):ft})),(qe=$==null?void 0:$.beforeCreate)!=null&&qe.formatFormList&&Le.isFunction($.beforeCreate.formatFormList)&&(je=$.beforeCreate.formatFormList(je,de)),je},Br=async($,de,Be={},je)=>{const qe={id:$.id,...Be};n.request({url:O[de].form.api.detail,method:"get",params:qe}).then(at=>{var ft,Qe,Gt,Pe;je?E.model=je(at):E.model=at,(ft=O[de].form.api)!=null&&ft.detailCallback&&Le.isFunction((Qe=O[de].form.api)==null?void 0:Qe.detailCallback)&&((Pe=(Gt=O[de].form.api)==null?void 0:Gt.detailCallback)==null||Pe.call(Gt,at)),E.title=Td(!0,O,de,Oe),t("get-detail-success",at)})},B={filterFormList:Ti,handleGetDetail:Br,handleBeforeCreateReq:Li,t:Oe},z=($,de)=>{ya($,de,O,E,B),l.nextTick(()=>{O.editBoxOnDialog?E.visible=!0:J()})},I=($,de)=>{ya($,de,O,T,B),T.visible=!0},H=($="",de,Be,je)=>{n.request({url:$||O.tableDeleteApi,method:"post",data:de}).then(()=>{t("delete-success",je),j(),Be!=null&&Be.refreshDraw&&Bt()})},re={deleteText:((Ke=O==null?void 0:O.headerActions)==null?void 0:Ke.deleteText)||"",tableCopyText:O.tableCopyText,handleEdit:z,handleLinkRouter:Rm,t:Oe,emit:t,handleDeleteRequest:H,handleExportRequest:ce,handleExportTempRequest:Fe,handlePrintRequest:me,handleImportRequest:be,handleSimpleRequest:se,handleCopyRequest:fe},Q=($,de={},Be=null)=>{var at,ft,Qe;const{code:je}=$,qe=Be||((at=O.headerActions)==null?void 0:at[je])||((Qe=(ft=D==null?void 0:D.descriptions)==null?void 0:ft.headerActions)==null?void 0:Qe[je]);ns($,de,qe,f.value,"tableHeader",re),t("header-action",$,f.value,L.value,qe)},U=($,de,Be)=>{const{action:je}=$,qe=Be.action[je.code];ns(je,de,qe,f.value,"",{...re,deleteText:O.tableDeleteText}),t("table-action",je,de,qe,$)},Z=l.watchEffect(()=>{}),Ce=l.watch(e,$=>{O=Le.merge({},w,$.config),$.config.tableData&&(o.value=$.config.tableData||[])}),Me=()=>{j(),t("refresh-table")},te=($,de,Be)=>{t("form-item-change",$,de,Be)},ge=async()=>{var Be;const $=await((Be=h==null?void 0:h.value)==null?void 0:Be.createSubmitData());for(const je in $)$[je]===""&&delete $[je];const de=ke(!1);return de&&(Object.assign($,de),h.value.handleSetModelValue($)),$},ke=($=!1)=>{var de;if(e.cacheSearch){const Be=r||X.value;return((de=n==null?void 0:n.handleCacheSearch)==null?void 0:de.call(n,Be,$,$?d.value:null))||null}return null},Re=l.watch(()=>X.value,($,de)=>{$!==r&&(r=de)});l.onMounted(async()=>{var de;const $=await ge();d.value=$,rr(),Xn(),(de=O.tableAttr)!=null&&de.immediate&&ae()});function We(){O=null,o.value=null,a.value=null,d.value=null,s.tableFields=null,f.value=null,s.renderTable=!1}return l.onBeforeUnmount(()=>{ke(!0),Z(),Ce(),We(),Re()}),{tableRef:y,tableListContentRef:v,tableData:o,appTableColumn:a,slots:c,...l.toRefs(s),currentPagePath:X,appConfig:O,pagination:C,editBoxRef:p,editBoxRefModel:g,editBoxInfo:E,addBoxInfo:T,addBoxRef:m,addBoxRefModel:k,tableDrawerConfig:D,selectionRow:f,selectionRowIds:b,tableSearchModel:d,loadingText:ee,searchFormRef:h,showPagination:_,showHeaderActions:A,showHeaderSearch:x,defaultSort:R,onSearchSubmit:ne,onSearchReset:K,handleEdit:z,handleCurrentChange:oe,handleSizeChange:ve,handleSelectionChange:xe,handleTableCurrentChange:P,handleSortChange:Se,handleHeaderAction:Q,handleTableAction:U,handleGetDetail:Br,getList:j,initSearch:ae,handleError:Ne,handleAddSuccess:ye,handleEditSuccess:G,handleEditRow:_e,handleEditRowProp:st,handleImportRequest:be,handleClickRow:Kt,handleShowFile:gt,handleCloseDrawer:he,handleUploadBtn:Ee,handleUploadSuccess:ze,handleRefreshDrawerDetail:Bt,handleComponentEvent:He,handleAddOption:rt,setFormModelVal:ct,handleSetFormModelVal:dt,handleSetSearchModelVal:An,handleDialogClose:vt,handleTableSizeChange:Vt,handleTableHeaderDragend:Yt,handleFieldCheck:Xt,handleTableColumnSort:Kn,handleSearchFormReset:_t,getSubmitData:In,handleFixedCell:Yn,handleDoLayoutTable:tt,handleItemChange:te,handleDbCellClick:et,handleTableDataSort:xn,handleAfterBtnsClick:Te,handleSelectionHeaderChange:ie,handleSelectionColumnChange:we}}}),v9e={key:0,class:"app-table-wrapper"},y9e={key:0,class:"table-header-wrapper fx"},b9e={class:"fxm pr10 ex"},k9e={class:"fxmj"},w9e={class:"ex"};function _9e(e,t,n,i,r,o){var b,g,k,_,A,x,w,O,S;const a=l.resolveComponent("jwt-form"),s=l.resolveComponent("jwt-header-button"),u=l.resolveComponent("TableSizeSetting"),c=l.resolveComponent("TableFieldControl"),f=l.resolveComponent("TableContentControl"),d=l.resolveComponent("TableListContentVirtualized"),h=l.resolveComponent("TableListContent"),p=l.resolveComponent("el-pagination"),m=l.resolveComponent("JwtDialogForm"),v=l.resolveComponent("jwt-detail-drawer"),y=l.resolveComponent("el-drawer");return l.openBlock(),l.createElementBlock(l.Fragment,null,[e.renderTable?(l.openBlock(),l.createElementBlock("div",v9e,[l.createElementVNode("div",{class:l.normalizeClass([(b=e.appConfig)!=null&&b.searchBtnInline?"fxmj":""])},[l.renderSlot(e.$slots,"search-before",{},void 0,!0),e.showHeaderSearch?(l.openBlock(),l.createElementBlock("div",y9e,[t[0]||(l.setBlockTracking(-1,!0),(t[0]=(_=(k=(g=e.config)==null?void 0:g.tableSearch)==null?void 0:k.formList)!=null&&_.length?(l.openBlock(),l.createBlock(a,{key:0,ref:"searchFormRef",modelValue:e.tableSearchModel,"onUpdate:modelValue":C=>e.tableSearchModel=C,class:"app-table-search",config:(A=e.config)==null?void 0:A.tableSearch,"is-search":"",onReset:e.onSearchReset,onSubmit:e.onSearchSubmit},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({model:E})=>[l.renderSlot(e.$slots,C,{model:E},void 0,!0)])}))]),1032,["modelValue","onUpdate:modelValue","config","onReset","onSubmit"])):l.createCommentVNode("",!0)).cacheIndex=0,l.setBlockTracking(1),t[0]),l.renderSlot(e.$slots,"search-form-after",{},void 0,!0)])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"search-after",{},void 0,!0),l.createElementVNode("div",{class:l.normalizeClass(["fxmj",[(x=e.appConfig)!=null&&x.searchBtnInline?"mb18":""]])},[l.createElementVNode("div",b9e,[l.renderSlot(e.$slots,"header-button-before",{},void 0,!0),e.showHeaderActions?(l.openBlock(),l.createBlock(s,{key:0,config:((w=e.config)==null?void 0:w.headerActions)||{},"current-path":e.currentPagePath,"file-import":e.appConfig.tableFileImport,loading:e.ajaxLoading,"menus-obj":e.userMenusAuth,"total-count":e.pagination.totalCount,"selection-row":e.selectionRow,"upload-success-cb":e.appConfig.uploadSuccessCb,onHeaderAction:e.handleHeaderAction,onUploadSuccess:e.handleUploadSuccess},null,8,["config","current-path","file-import","loading","menus-obj","total-count","selection-row","upload-success-cb","onHeaderAction","onUploadSuccess"])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"header-button-after",{},void 0,!0)]),l.createElementVNode("div",null,[e.appConfig.showTableLineHeight?(l.openBlock(),l.createBlock(u,{key:0,onTableSize:e.handleTableSizeChange},null,8,["onTableSize"])):l.createCommentVNode("",!0),e.tableFields?(l.openBlock(),l.createBlock(c,{key:1,modelValue:e.appTableColumn,"onUpdate:modelValue":t[1]||(t[1]=C=>e.appTableColumn=C),onChange:e.handleFieldCheck,onSort:e.handleTableColumnSort},null,8,["modelValue","onChange","onSort"])):l.createCommentVNode("",!0),(O=e.appConfig)!=null&&O.showTableDrag&&((S=e.tableData)!=null&&S.length)?(l.openBlock(),l.createBlock(f,{key:2,modelValue:e.tableData,"onUpdate:modelValue":t[2]||(t[2]=C=>e.tableData=C),"drag-title-key":e.appConfig.dragTitleKey,onSort:e.handleTableDataSort},null,8,["modelValue","drag-title-key","onSort"])):l.createCommentVNode("",!0)])],2)],2),l.renderSlot(e.$slots,"table-before",{},void 0,!0),l.renderSlot(e.$slots,"table-content",{list:e.tableData},()=>[e.appConfig.virtualized?(l.openBlock(),l.createBlock(d,{key:0,"ajax-loading":e.ajaxLoading,"app-table-column":e.appTableColumn,"current-page-path":e.currentPagePath,"default-sort":e.defaultSort,"estimated-row-height":e.appConfig.estimatedRowHeight,"loading-text":e.loadingText,pagination:e.pagination,"table-attr":e.appConfig.tableAttr,"table-button-num":e.appConfig.tableButtonNum,"table-data":e.tableData,"table-events":e.appConfig.tableEvents,"table-height":e.tableHeight,"table-size":e.tableSize,"user-menus-auth":e.userMenusAuth,onChangeTableColumn:e.handleFixedCell,onClickCell:e.handleClickRow,onDbclickCell:e.handleDbCellClick,onEditRow:e.handleEditRowProp,onSelectionColumnChange:e.handleSelectionColumnChange,onSelectionHeaderChange:e.handleSelectionHeaderChange,onSortChange:e.handleSortChange,onTableAction:e.handleTableAction,onShowFile:e.handleShowFile},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({scope:E,data:T,list:F,index:D,rowindex:R,pagestart:L})=>[l.renderSlot(e.$slots,C,{data:T,index:D,list:F,rowindex:R,pagestart:L,scope:E},void 0,!0)])}))]),1032,["ajax-loading","app-table-column","current-page-path","default-sort","estimated-row-height","loading-text","pagination","table-attr","table-button-num","table-data","table-events","table-height","table-size","user-menus-auth","onChangeTableColumn","onClickCell","onDbclickCell","onEditRow","onSelectionColumnChange","onSelectionHeaderChange","onSortChange","onTableAction","onShowFile"])):(l.openBlock(),l.createBlock(h,{key:1,ref:"tableListContentRef","ajax-loading":e.ajaxLoading,"app-table-column":e.appTableColumn,"current-page-path":e.currentPagePath,"default-sort":e.defaultSort,"loading-text":e.loadingText,"table-attr":e.appConfig.tableAttr,"table-button-num":e.appConfig.tableButtonNum,"table-data":e.tableData,"table-events":e.appConfig.tableEvents,"table-height":e.tableHeight,"table-size":e.tableSize,"user-menus-auth":e.userMenusAuth,pagination:e.pagination,onChangeTableColumn:e.handleFixedCell,onClickCell:e.handleClickRow,onDbclickCell:e.handleDbCellClick,onEditRow:e.handleEditRowProp,onHeaderDragend:e.handleTableHeaderDragend,onSelectionChange:e.handleSelectionChange,onSortChange:e.handleSortChange,onTableAction:e.handleTableAction,onTableCurrentChange:e.handleTableCurrentChange,onShowFile:e.handleShowFile},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({scope:E,data:T,list:F,index:D,rowindex:R,pagestart:L})=>[l.renderSlot(e.$slots,C,{data:T,index:D,list:F,rowindex:R,pagestart:L,scope:E},void 0,!0)])}))]),1032,["ajax-loading","app-table-column","current-page-path","default-sort","loading-text","table-attr","table-button-num","table-data","table-events","table-height","table-size","user-menus-auth","pagination","onChangeTableColumn","onClickCell","onDbclickCell","onEditRow","onHeaderDragend","onSelectionChange","onSortChange","onTableAction","onTableCurrentChange","onShowFile"]))],!0),l.renderSlot(e.$slots,"table-after",{},void 0,!0),l.createElementVNode("div",k9e,[l.createElementVNode("div",w9e,[l.renderSlot(e.$slots,"table-pagination-before",{data:e.tableStatistics},void 0,!0)]),e.showPagination?(l.openBlock(),l.createBlock(p,l.mergeProps({key:0},e.appConfig.pagination,{class:"app-pagination","current-page":e.pagination.currentPage,disabled:e.ajaxLoading,"page-count":e.pagination.pageCount,"page-size":e.pagination.pageSize,total:e.pagination.totalCount,onCurrentChange:e.handleCurrentChange,onSizeChange:e.handleSizeChange}),null,16,["current-page","disabled","page-count","page-size","total","onCurrentChange","onSizeChange"])):l.createCommentVNode("",!0)]),l.renderSlot(e.$slots,"table-pagination-after",{},void 0,!0)])):l.createCommentVNode("",!0),e.editBoxInfo.visible?(l.openBlock(),l.createBlock(m,{key:1,ref:"editBoxRef","app-config":e.editBoxInfo.config,config:e.editBoxInfo,"selection-row":e.selectionRow,"selection-row-ids":e.selectionRowIds,onAddOption:e.handleAddOption,onAddSuccess:e.handleAddSuccess,onDialogClose:e.handleDialogClose,onEditSuccess:e.handleEditSuccess,onError:e.handleError,onItemChange:e.handleItemChange,onUploadBtn:e.handleUploadBtn,onAfterBtnsClick:e.handleAfterBtnsClick},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({model:E})=>[l.renderSlot(e.$slots,C,{model:E},void 0,!0)])}))]),1032,["app-config","config","selection-row","selection-row-ids","onAddOption","onAddSuccess","onDialogClose","onEditSuccess","onError","onItemChange","onUploadBtn","onAfterBtnsClick"])):l.createCommentVNode("",!0),e.addBoxInfo.visible?(l.openBlock(),l.createBlock(m,{key:2,ref:"addBoxRef","app-config":e.addBoxInfo.config,config:e.addBoxInfo,onAddOption:e.handleAddOption,onAddSuccess:e.handleAddSuccess,onDialogClose:e.handleDialogClose,onEditSuccess:e.handleEditSuccess,onError:e.handleError,onUploadBtn:e.handleUploadBtn},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({model:E})=>[l.renderSlot(e.$slots,C,{model:E},void 0,!0)])}))]),1032,["app-config","config","onAddOption","onAddSuccess","onDialogClose","onEditSuccess","onError","onUploadBtn"])):l.createCommentVNode("",!0),e.tableDrawerConfig.visible?(l.openBlock(),l.createBlock(y,l.mergeProps({key:3,modelValue:e.tableDrawerConfig.visible,"onUpdate:modelValue":t[3]||(t[3]=C=>e.tableDrawerConfig.visible=C)},e.tableDrawerConfig.attrs,{class:"jwt-drawer-wrapper","with-header":!1,onClose:e.handleCloseDrawer}),{default:l.withCtx(()=>[l.createVNode(v,{ref:"pageDetailRef",config:e.tableDrawerConfig.config,"current-page-drawer-config":e.tableDrawerConfig.contentConfig,"current-page-path":e.currentPagePath,"keep-alive":!1,"open-page-drawer-config-list":[],"user-menus-auth":e.userMenusAuth,onCloseDrawer:e.handleCloseDrawer,onRefreshTable:e.handleRefreshTable},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({scope:E,model:T,row:F})=>[l.renderSlot(e.$slots,C,{model:T,row:F,scope:E},void 0,!0)])}))]),1032,["config","current-page-drawer-config","current-page-path","user-menus-auth","onCloseDrawer","onRefreshTable"])]),_:3},16,["modelValue","onClose"])):l.createCommentVNode("",!0)],64)}const C9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn(m9e,[["render",_9e],["__scopeId","data-v-296da7f4"]])},Symbol.toStringTag,{value:"Module"})),S9e={"page-sizes":[10,20,30,40,50,100],"page-size":10,layout:"total, sizes, prev, pager, next, jumper"},x9e=l.defineComponent({name:"JwtTableOnly",components:{},props:{config:{require:!0,type:Object,default:()=>{}},tableHeight:{type:[String,Number],default:null},userMenusAuth:{type:Object,default:()=>{}}},emits:["selection-change","list-change","header-action","table-action","add-handle","edit-handle","add-success","edit-success","delete-success","table-current-change","tablelist-change","get-detail-success"],setup(e,{emit:t}){const n=gn(),i=l.reactive({tableData:[],ajaxLoading:!1,submitLoading:!1});let r=l.reactive(Le.merge({tableAttr:{stripe:!0,border:!0,fit:!0,highlightCurrentRow:!0},tableColumn:[],tableListApi:null,tableListParams:{},tableDeleteApi:null,tableDeleteParams:{},pagination:S9e,showPagination:!0},e.config));const o=l.reactive({currentPage:1,pageCount:1,pageSize:r.pagination["page-sizes"][0],totalCount:1,sort:"id",order:"desc"}),a=l.ref([]),s=l.ref({}),u=l.ref(null),c=l.computed(()=>e.userMenusAuth||{}),f=()=>{d()},d=()=>{const O=Le.merge({page:o.currentPage,per_page:o.pageSize,sort:o.sort,order:o.order},r.tableListParams,s.value);h(O)},h=O=>{if(!r.tableListApi){r.tableData&&(i.tableData=r.tableData);return}i.ajaxLoading=!0,n.request({url:r.tableListApi,method:"get",params:O}).then(S=>{i.tableData=S.data,o.pageCount=S.totalPage,o.totalCount=S.total,i.ajaxLoading=!1,t("tablelist-change")})},p=()=>{o.currentPage=1,o.pageSize=r.pagination["page-sizes"][0],d()},m=()=>{o.currentPage=1,o.pageSize=r.pagination["page-sizes"][0],d(s.value)},v=O=>{o.currentPage=O,d()},y=O=>{o.pageSize=O,d()},b=(O,S="")=>O===null||O===""||O===void 0?"-":S?va(O).format(S):O,g=O=>{a.value=O,t("selection-change",O)},k=({prop:O,order:S})=>{o.sort=O,o.order=S==="ascending"?"asc":"desc",d()},_=O=>{t("table-current-change",O)},A=(O,S,C=!0)=>{O[`isEdit${S.prop}`]=C},x=(O,S)=>{const{id:C}=O,{prop:E}=S;if(C){var T={id:C};if(T[E]=O[E],!r.tableUpdateApi)return ut.ElMessage.info("请配置编辑接口!tableUpdateApi");n.request({url:r.tableUpdateApi,method:"post",data:T}).then(()=>{O[`isEdit${E}`]=!1})}},w=O=>n.fillUrl&&cn.isFunction(n.fillUrl)?n.fillUrl(O):O;return l.watch(e,O=>{r=Le.merge(r,O.config),O.config.tableData&&(i.tableData=O.config.tableData||[])}),l.onBeforeMount(()=>{f()}),{...l.toRefs(i),appConfig:r,pagination:o,selectionRow:a,tableSearchModel:s,editBoxRef:u,dayjs:va,userMenusAuthObj:c,onSearchSubmit:m,onSearchReset:p,handleCurrentChange:v,handleSizeChange:y,handleSelectionChange:g,handleTableCurrentChange:_,handleSortChange:k,filterVal:b,initSearch:f,handleEditRow:A,handleEditRowProp:x,handleFillUrl:w}}}),E9e={class:"app-table-wrapper"},B9e=["onDblclick"],D9e={class:"image-slot wh fxmc"},T9e={class:"fxr"};function A9e(e,t,n,i,r,o){const a=l.resolveComponent("el-input"),s=l.resolveComponent("el-input-number"),u=l.resolveComponent("jwt-upload-image"),c=l.resolveComponent("el-switch"),f=l.resolveComponent("jwt-icon"),d=l.resolveComponent("el-image"),h=l.resolveComponent("el-table-column"),p=l.resolveComponent("el-table"),m=l.resolveComponent("el-pagination"),v=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",E9e,[l.renderSlot(e.$slots,"table-before",{},void 0,!0),l.withDirectives((l.openBlock(),l.createBlock(p,l.mergeProps(e.appConfig.tableAttr,{ref:"tableRef",class:"mt15",data:e.tableData,"element-loading-spinner":"el-icon-loading","element-loading-text":"加载数据中...",height:e.tableHeight,onCurrentChange:e.handleTableCurrentChange,onSelectionChange:e.handleSelectionChange,onSortChange:e.handleSortChange}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.appConfig.tableColumn,(y,b)=>(l.openBlock(),l.createBlock(h,{key:b,align:y.align||"center",fixed:y.fixed,label:y.label,"min-width":y.minWidth?y.minWidth:null,prop:y.prop,sortable:y.sortable,type:y.type,width:y.width?y.width:null},l.createSlots({_:2},[y.type?void 0:{name:"default",fn:l.withCtx(({row:g,$index:k})=>[y.dateTimeFormat?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createTextVNode(l.toDisplayString(e.filterVal(g[y.prop],y.dateTimeFormat)),1)],64)):y.editType?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[y.editType==="input"?(l.openBlock(),l.createBlock(a,{key:0,modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,type:"text",onKeydown:l.withKeys(_=>e.handleEditRowProp(g,y),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])):y.editType==="inputNumber"?(l.openBlock(),l.createBlock(s,{key:1,modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,"controls-position":"right",min:0,onBlur:_=>e.handleEditRowProp(g,y)},null,8,["modelValue","onUpdate:modelValue","onBlur"])):y.editType==="uploadImg"?(l.openBlock(),l.createBlock(u,{key:2,modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,onOnChange:_=>e.handleEditRowProp(g,y)},null,8,["modelValue","onUpdate:modelValue","onOnChange"])):y.editType==="switch"?(l.openBlock(),l.createBlock(c,{key:3,modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,"active-value":1,"inactive-value":0,onChange:_=>e.handleEditRowProp(g,y)},null,8,["modelValue","onUpdate:modelValue","onChange"])):l.createCommentVNode("",!0)],64)):y.editInput?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.withDirectives(l.createElementVNode("div",{onDblclick:_=>e.handleEditRow(g,y)},l.toDisplayString(e.filterVal(g[y.prop])),41,B9e),[[l.vShow,!g[`isEdit${y.prop}`]]]),l.withDirectives(l.createVNode(a,{modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,type:"text",onBlur:_=>e.handleEditRowProp(g,y),onKeyup:l.withKeys(_=>e.handleEditRowProp(g,y),["enter"])},null,8,["modelValue","onUpdate:modelValue","onBlur","onKeyup"]),[[l.vShow,g[`isEdit${y.prop}`]]])],64)):y.isImg?(l.openBlock(),l.createBlock(d,{key:3,"preview-src-list":[e.handleFillUrl(g[y.prop])],"preview-teleported":"",size:80,src:e.handleFillUrl(g[y.prop]),teleported:""},{error:l.withCtx(()=>[l.createElementVNode("div",D9e,[l.createVNode(f,{class:"g9",icon:"image-line",style:{"font-size":"40px"}})])]),_:1},8,["preview-src-list","src"])):l.renderSlot(e.$slots,y.prop,{key:4,index:k,scope:g},()=>[l.createTextVNode(l.toDisplayString(e.filterVal(g[y.prop])),1)],!0)]),key:"0"}]),1032,["align","fixed","label","min-width","prop","sortable","type","width"]))),128))]),_:3},16,["data","height","onCurrentChange","onSelectionChange","onSortChange"])),[[v,e.ajaxLoading]]),l.createElementVNode("div",T9e,[e.appConfig.showPagination?(l.openBlock(),l.createBlock(m,l.mergeProps({key:0},e.appConfig.pagination,{class:"app-pagination","current-page":e.pagination.currentPage,disabled:e.ajaxLoading,"page-count":e.pagination.pageCount,"page-size":e.pagination.pageSize,total:e.pagination.totalCount,onCurrentChange:e.handleCurrentChange,onSizeChange:e.handleSizeChange}),null,16,["current-page","disabled","page-count","page-size","total","onCurrentChange","onSizeChange"])):l.createCommentVNode("",!0)])])}const O9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn(x9e,[["render",A9e],["__scopeId","data-v-3311d9e5"]])},Symbol.toStringTag,{value:"Module"}));function F9e(e){const t=gn(),{route:n,refMenuId:i,config:r,onGetList:o,emit:a}=e,s=l.ref({}),u=l.ref(null);let c="";return{tableSearchModel:s,searchFormRef:u,initSearch:(k={})=>{const{query:_}=n||{};let A={...s.value,...k};if((_!=null&&_.fromJump||_!=null&&_.openType)&&!i){for(let[x,w]of Object.entries(_))Le.isArray(w)?A[x]=w.map(O=>+O):A[x]=w;A.openType&&delete A.openType,delete A.fromJump}s.value=A,o(k)},onSearchReset:()=>{const k={[t.pageKey]:1};s.value={},l.nextTick(()=>{o(k)})},onSearchSubmit:k=>{var _;(_=r==null?void 0:r.tableSearch)!=null&&_.onlyData?s.value={...k}:s.value={...s.value,...k},a("search-result",k),o(k)},handleSetSearchModel:(k,_)=>{s.value[k]=_},handleSearchFormReset:()=>{var k,_;(_=(k=u.value)==null?void 0:k.formReset)==null||_.call(k)},handleSetSearchModelVal:(k,_)=>{var A,x;(x=(A=u.value)==null?void 0:A.setModelVal)==null||x.call(A,k,_)},handleCacheSearch:(k=!1,_)=>{var A;if(e.cacheSearch){const x=c||_;return((A=t==null?void 0:t.handleCacheSearch)==null?void 0:A.call(t,x,k,k?s.value:null))||null}return null},handleInitTableSearchData:async()=>{var _,A;const k=await((A=(_=u==null?void 0:u.value)==null?void 0:_.createSubmitData)==null?void 0:A.call(_))||{};for(const x in k)k[x]===""&&delete k[x];return k},setLastPagePath:k=>{c=k}}}function P9e(e){var p,m,v;const t=gn(),{config:n,onGetList:i}=e,r={"page-sizes":Im(),"page-size":20,layout:"total, sizes, prev, pager, next, jumper"},o=()=>(n==null?void 0:n.tablePageSizeName)||"pageSize",a=l.reactive({currentPage:1,pageCount:1,pageSize:Ai.get(o())||((p=n==null?void 0:n.tableListParams)==null?void 0:p[t.pageSizeKey])||r["page-sizes"][2],totalCount:1,sort:((m=n==null?void 0:n.tableListParams)==null?void 0:m.sort)||"id",order:((v=n==null?void 0:n.tableListParams)==null?void 0:v.order)||"desc"});return{pagination:a,paginationDefault:r,handlePageSearchParams:(y,b={})=>({...b||{},[t.pageKey]:a.currentPage,[t.pageSizeKey]:a.pageSize,sort:a.sort||(b==null?void 0:b.sort)||"",order:a.order||(b==null?void 0:b.order)||"",...y||{}}),handleCurrentChange:y=>{a.currentPage=y,i({page:y})},handleSizeChange:y=>{a.pageSize=y;const b=o();Ai.set(b,y);const g={[t.pageSizeKey]:y};i(g)},resetPagination:()=>{a.currentPage=1},updatePagination:y=>{y.pageCount!==void 0&&(a.pageCount=y.pageCount),y.totalCount!==void 0&&(a.totalCount=y.totalCount),y.currentPage!==void 0&&(a.currentPage=y.currentPage)},updateSort:(y,b)=>{a.sort=y,a.order=b}}}function j9e(e){const t=gn(),{config:n,freezeList:i=!0,virtualized:r=!1,emit:o}=e,a=r?l.ref([]):l.shallowRef([]),s=l.reactive({ajaxLoading:!1,submitLoading:!1,renderTable:!0,refreshTable:!1,tableStatistics:null});return{tableData:a,ajaxLoading:s,state:s,getTableListData:(h,p,m={})=>p?(s.ajaxLoading=!0,t.request({url:p,method:"get",params:h}).then(v=>{var b,g;let y=null;if(m.hasPagination!==!1){m.tableListCallback&&l.isFunction(m.tableListCallback)?y=m.tableListCallback(v.data,v):y=v.data,a.value=i?l.markRaw(y.map(_=>l.markRaw(_))):y;let k=v;return m.paginationCback&&l.isFunction(m.paginationCback)&&(k=m.paginationCback(v)),s.tableStatistics=(v==null?void 0:v.statistics)||null,s.ajaxLoading=!1,(b=m.onFromJump)==null||b.call(m,v.data),o("tablelist-change",v.data),{pageCount:k==null?void 0:k.totalPage,totalCount:k==null?void 0:k.total,currentPage:k==null?void 0:k.current_page,data:v.data}}else return y=v,a.value=i?l.markRaw(y):y,s.ajaxLoading=!1,(g=m.onFromJump)==null||g.call(m,v),o("tablelist-change",v),{data:v}}).catch(()=>(s.ajaxLoading=!1,null))):(n!=null&&n.tableData&&(a.value=n.tableData),Promise.resolve(null)),setRefreshTable:h=>{s.refreshTable=h},setTableData:h=>{a.value=h},clearData:()=>{a.value=[],s.tableStatistics=null}}}function R9e(e){const{config:t,tableColumn:n,userFieldList:i,userMenusAuth:r,route:o,refMenuId:a,emit:s}=e,u=l.shallowRef([]);let c=null;const f=_=>{var x,w;return((w=(x=r==null?void 0:r[_])==null?void 0:x.operations)==null?void 0:w.filter(O=>O==null?void 0:O.show_table))||[]},d=()=>{var w;const{path:_}=o||{},A=a||((w=r==null?void 0:r[_])==null?void 0:w.id);return(t==null?void 0:t.useField)&&(i==null?void 0:i[A])||null},h=_=>{let A=[];c=d();const x=n!=null&&n.length?n:t==null?void 0:t.tableColumn;x==null||x.forEach(w=>{var E,T,F,D,R,L;const O=Le.isFunction(w.label)?w.label():w.label,S={...w,label:Oe(O),tips:Le.isFunction(w.tips)?w.tips():Oe(w.tips)};S.isEdit=!!(S.editType||S.dateTimeFormat||S.isImg||S.isImgs||S.editTypeFun);let C=!0;if(S.isOperate){const M=f(_),X=S.fixed==="right"&&(((E=S==null?void 0:S.action)==null?void 0:E.list)||[]);M!=null&&M.length&&X.length?C=M.some(ee=>X.includes(ee.code)):C=!1}c?(c[S.prop]&&A.push({...S,...c[S.prop],label:S!=null&&S.customLabel?S.label:((T=c[S.prop])==null?void 0:T.label)||S.label,isControl:!0,fixed:!!((F=c[S.prop])!=null&&F.is_fixed),checked:S.hide?!1:!!c[S.prop].is_show,width:((D=c[S.prop])==null?void 0:D.width)||(S==null?void 0:S.width)||"",sortable:(R=c[S.prop])!=null&&R.support_sort?"custome":!1}),S.isOperate&&A.push({...S,rank:S!=null&&S.type?-1/0:1/0,checked:(S==null?void 0:S.type)||C,isControl:!1,fixed:(S==null?void 0:S.fixed)||"",width:((L=c[S.prop])==null?void 0:L.width)||(S==null?void 0:S.width)||""})):A.push({...S,checked:S.isOperate?C:!S.hide})}),c&&(A=A.sort((w,O)=>w.rank-O.rank)),u.value=A};return{appTableColumn:u,handleRenderTableColumn:h,handleTableFiledsSort:()=>{const _={},A=d();if(A&&Le.isObject(A))for(const[x,w]of Object.entries(A))w.is_default_sort&&(_.sort=x,_.order=w.sort);return _},handleFieldCheck:_=>{c&&(s("change-table-column","toggle",_),_.checked=!_.checked)},handleTableColumnSort:()=>{c&&s("change-table-column","draggable",u.value)},handleFixedCell:(_,A)=>{c&&(s("change-table-column",_,A),A.fixed=!A.fixed)},handleTableHeaderDragend:(_,A,x)=>{if(c){const w=u.value.find(O=>O.prop===x.property);w!=null&&w.id&&s("change-table-column","width",{width:_,column:w})}},handleDoLayoutTable:_=>{h(_)},handleGetTableFields:d,getTableFields:()=>c}}function I9e(e){const{emit:t}=e,n=l.ref([]),i=l.computed(()=>n.value.map(c=>c.id).join(","));return{selectionRow:n,selectionRowIds:i,handleSelectionChange:c=>{n.value=c,t("selection-change",c)},handleSelectionHeaderChange:(c,f)=>{const d=f.map(h=>(h.selectionChecked=c,h));return c?(n.value=d,t("selection-change",d)):(n.value=[],t("selection-change",[])),d},handleSelectionColumnChange:c=>{l.nextTick(()=>{const f=c.filter(d=>d.selectionChecked);n.value=f,t("selection-change",f)})},handleTableCurrentChange:c=>{t("table-current-change",c)},clearSelection:()=>{n.value=[]}}}function N9e(e){const t=gn(),{config:n,emit:i}=e,r=l.shallowRef(null),o=l.shallowRef(null),a=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox",refreshTable:!1,stopGetList:!1}),s=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox"}),u=l.computed(()=>{var w;return((w=r.value)==null?void 0:w.editBoxRefModel)||{}}),c=l.computed(()=>{var w;return((w=o.value)==null?void 0:w.editBoxRefModel)||{}}),f=(w={},O={},S=null)=>{var T;const C=w.formList;let E=C;return S&&(E=C.filter(F=>{const D=!F.privacyId||!!S[F.privacyId];return(w==null?void 0:w.privacyKey)==="disabled"?(F.formAttrs={...F.formAttrs,disabled:!D},!0):D})),(T=w==null?void 0:w.beforeCreate)!=null&&T.formatFormList&&Le.isFunction(w.beforeCreate.formatFormList)&&(E=w.beforeCreate.formatFormList(E,O)),E},d=(w,O,S)=>{w&&t.request({url:w,method:"get",params:{}}).then(C=>{O==null||O(C,S.model)})},h=async(w,O,S={},C)=>{var T,F,D;const E={id:w.id,...S};return t.request({url:(D=(F=(T=n==null?void 0:n[O])==null?void 0:T.form)==null?void 0:F.api)==null?void 0:D.detail,method:"get",params:E}).then(R=>{var L,M,X,ee,ae,N;return C?a.model=C(R):a.model=R,(X=(M=(L=n==null?void 0:n[O])==null?void 0:L.form)==null?void 0:M.api)!=null&&X.detailCallback&&Le.isFunction((ee=n[O].form.api)==null?void 0:ee.detailCallback)&&((N=(ae=n[O].form.api)==null?void 0:ae.detailCallback)==null||N.call(ae,R)),a.title=Td(!0,n,O,Oe),i("get-detail-success",R),R})},p=(w,O,S,C=null)=>{ya(w,O,S,a,{filterFormList:(T,F)=>f(T,F,C),handleGetDetail:h,handleBeforeCreateReq:d,t:Oe}),l.nextTick(()=>{S.editBoxOnDialog&&(a.visible=!0)})},m=(w,O,S,C=null)=>{ya(w,O,S,s,{filterFormList:(T,F)=>f(T,F,C),handleGetDetail:h,handleBeforeCreateReq:d,t:Oe}),s.visible=!0},v=(w={})=>{var O,S,C,E,T,F,D;if(s.visible){s.visible=!1,s.config=null,s.model={};return}(S=(O=a==null?void 0:a.config)==null?void 0:O.api)!=null&&S.refreshDraw&&((C=w.onRefreshDraw)==null||C.call(w),i("refresh-draw")),((T=(E=a==null?void 0:a.config)==null?void 0:E.api)!=null&&T.refreshTable||a!=null&&a.refreshTable)&&((F=w.onRefreshTable)==null||F.call(w),i("refresh-table")),a.visible=!1,a.config=null,a.model={},i("list-change"),a.stopGetList||(D=w.onGetList)==null||D.call(w)};return{editBoxRef:r,addBoxRef:o,editBoxInfo:a,addBoxInfo:s,editBoxRefModel:u,addBoxRefModel:c,handleEdit:p,handleAddBox:m,handleAddSuccess:(w,O,S={})=>{var C,E,T;a.visible&&(C=a==null?void 0:a.config)!=null&&C.addSuccess&&Le.isFunction((E=a==null?void 0:a.config)==null?void 0:E.addSuccess)&&((T=a==null?void 0:a.config)==null||T.addSuccess(S.tableSearchModel,S.handleSetSearchModel)),v(S),i("add-success",w,O)},handleEditSuccess:(w,O,S={})=>{v(S),i("edit-success",w,O)},handleDialogClose:(w="editBoxInfo")=>{w==="editBoxInfo"?(a.model={},a.config={}):w==="addBoxInfo"&&(s.model={},s.config={}),i("dialog-close")},handleAddOption:(w,O,S=null)=>{const C=w==null?void 0:w.action;m("",C,O,S)},setFormModelVal:(w,O)=>{var S,C,E,T;s.visible?(C=(S=o.value)==null?void 0:S.setModelVal)==null||C.call(S,w,O):(T=(E=r.value)==null?void 0:E.setModelVal)==null||T.call(E,w,O)},handleSetFormModelVal:(w,O)=>{var S,C,E,T;s.visible?(C=(S=o.value)==null?void 0:S.handleSetModelVal)==null||C.call(S,w,O):(T=(E=r.value)==null?void 0:E.handleSetModelVal)==null||T.call(E,w,O)},handleGetDetail:h,getSubmitData:async()=>{var w,O;return await((O=(w=r.value)==null?void 0:w.createSubmitData)==null?void 0:O.call(w))},filterFormList:f}}function M9e(e){const t=gn(),{config:n,emit:i}=e;return{handleDeleteRequest:(g="",k,_,A,x={})=>t.request({url:g||(n==null?void 0:n.tableDeleteApi),method:"post",data:k}).then(()=>{var w,O;i("delete-success",A),(w=x.onGetList)==null||w.call(x),_!=null&&_.refreshDraw&&((O=x.onRefreshDrawerDetail)==null||O.call(x))}),handleCopyRequest:(g,k,_={})=>t.request({url:n==null?void 0:n.tableCopyApi,method:"post",data:g}).then(()=>{var A;i("copy-success",k),(A=_.onGetList)==null||A.call(_)}),handleSimpleRequest:(g,k,_,A=[],x=!1,w={})=>{Od(g,k,_,{selectionRow:A,cancel:x,callback:(O,S)=>{var C,E,T,F;i("des-edit-success",O,S),k.refreshTable&&((C=w.onRefreshTable)==null||C.call(w)),k!=null&&k.refreshDraw&&((E=w.onRefreshDrawerDetail)==null||E.call(w)),(F=(T=k==null?void 0:k.api)==null?void 0:T.callback)==null||F.call(T,O)}})},handlePrintRequest:(g={},k,_,A)=>{Xk(g,k,{url:n==null?void 0:n.tablePrintApi,tableData:_,proxy:A,tableExportPathKey:n==null?void 0:n.tableExportPathKey})},handleExportRequest:(g={},k={},_,A,x,w,O=!1)=>{Ad(g,k,_,{url:n==null?void 0:n.tableExportApi,tableData:A,proxy:w,selectionRow:x,tableExportPathKey:n==null?void 0:n.tableExportPathKey,beforeExportFun:n==null?void 0:n.beforeExportFun,tableExportName:n==null?void 0:n.tableExportName,emit:i,isTemp:O})},handleImportRequest:()=>{var g;if(!((g=n==null?void 0:n.tableFileImport)!=null&&g.action)){ut.ElMessage.info(Oe("请配置文件上传接口"));return}},handleEditRow:(g,k,_=!0)=>{g[`isEdit${k.prop}`]=_},handleEditRowProp:(g={},k={},_="table",A={})=>{var R,L,M,X,ee,ae,N;const{id:x}=g,{prop:w,refreshTable:O,api:S}=k;if(i("row-change",g,k),!x||!(n!=null&&n.tableRowEdit))return;const C={table:{url:n==null?void 0:n.tableUpdateApi,des:"tableUpdateApi"},drawDes:{url:((L=(R=A.tableDrawerConfig)==null?void 0:R.api)==null?void 0:L.update)||((ee=(X=(M=A.tableDrawerConfig)==null?void 0:M.descriptions)==null?void 0:X.api)==null?void 0:ee.update)||((N=(ae=n==null?void 0:n.tableDrawer)==null?void 0:ae.api)==null?void 0:N.update),des:"drawerConfig.api.update || appConfig.tableDrawer.api.update"}};let E=(S==null?void 0:S.url)||C[_].url;if(!E)return ut.ElMessage.info(`${Oe("请配置编辑接口")}${C[_].des}`);let T={id:x};const{startKey:F,endKey:D}=k;if(F&&D?(T[F]=sf(g[w][0]),T[D]=sf(g[w][1])):T[w]=sf(g[w]),S!=null&&S.params){const j=Le.isFunction(S.params)?S.params(g,T):S.params;T={...T,...j}}t.request({url:E,method:"post",data:T}).then(()=>{var j,q;g[`isEdit${w}`]=!1,_==="drawDes"&&((j=A.onSetRefreshTable)==null||j.call(A)),O&&((q=A.onRefreshTable)==null||q.call(A)),i("des-edit-success",k)})},handleDbCellClick:g=>{i("dbclick-cell",g)},handleTableDataSort:(g,k)=>{const _=g.map((A,x)=>({...A,rank:k+x}));return l.nextTick(()=>{i("change-table-rank",_)}),_},createTableActionOptions:g=>{var k;return{deleteText:((k=n==null?void 0:n.headerActions)==null?void 0:k.deleteText)||"",tableCopyText:n==null?void 0:n.tableCopyText,handleEdit:g.handleEdit,handleLinkRouter:Rm,t:Oe,emit:i,handleDeleteRequest:g.handleDeleteRequest,handleExportRequest:g.handleExportRequest,handleExportTempRequest:g.handleExportTempRequest,handlePrintRequest:g.handlePrintRequest,handleImportRequest:g.handleImportRequest,handleSimpleRequest:g.handleSimpleRequest,handleCopyRequest:g.handleCopyRequest}},handleHeaderAction:(g,k={},_=null,A,x,w,O)=>{var E,T,F,D;const{code:S}=g,C=_||((E=A.headerActions)==null?void 0:E[S])||((D=(F=(T=A.tableDrawerConfig)==null?void 0:T.descriptions)==null?void 0:F.headerActions)==null?void 0:D[S]);ns(g,k,C,x,"tableHeader",O),i("header-action",g,x,w,C)},handleTableAction:(g,k,_,A,x)=>{const{action:w}=g,O=_.action[w.code];ns(w,k,O,A,"",{...x,deleteText:n==null?void 0:n.tableDeleteText}),i("table-action",w,k,O,g)},handleSortChange:({prop:g,order:k},_,A,x)=>{var S;const w=k==="ascending"?"asc":"desc";x.onUpdateSort(g,w);const O={sort:g,order:w};k&&((S=_==null?void 0:_.tableListParams)!=null&&S.sorts)&&(O.sorts=""),i("sort-change",{prop:g,order:k,param:O,tableFields:A}),x.onGetList(O)}}}const L9e={key:0,class:"app-table-wrapper"},z9e={key:0,class:"table-header-wrapper fx"},V9e={class:"fxm pr10 ex"},U9e={class:"fxmj"},H9e={class:"ex"},q9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn({__name:"index",props:{config:{require:!0,type:Object,default:()=>({})},tableHeight:{type:[String,Number],default:null},userMenusAuth:{type:Object,default:()=>({})},route:{type:Object,default:()=>({})},router:{type:Object,default:()=>({})},userFieldList:{type:Object,default:()=>({})},refMenuId:{type:[Number,String],default:""},pageUrl:{type:String,default:""},tableColumn:{type:Array,default:()=>[]},freezeList:{type:Boolean,default:!0},cacheSearch:{type:Boolean,default:!1}},emits:["selection-change","list-change","header-action","table-action","add-handle","edit-handle","add-success","edit-success","delete-success","table-current-change","tablelist-change","get-detail-success","click-cell","des-edit-success","upload-btn","event-name","copy-success","asynExport","search-result","change-table-column","fixed-table-column","dialog-close","refresh-table","form-item-change","row-change","dbclick-cell","change-table-rank","after-btns-click","show-file","sort-change"],setup(e,{expose:t,emit:n}){const i=e,r=n,o=l.useSlots(),{proxy:a}=l.getCurrentInstance(),s={"page-sizes":Im(),"page-size":20,layout:"total, sizes, prev, pager, next, jumper"},u=Object.freeze({headerActions:{list:[],deleteText:""},headerActionsShow:!0,tableAttr:{stripe:!0,border:!0,fit:!0,highlightCurrentRow:!0,immediate:!0,defaultSort:{prop:"",order:""},sortBy:{key:"",order:""}},virtualized:!1,dragTitleKey:"title",estimatedRowHeight:50,tableEvents:{},tableColumn:[],searchBtnInline:!1,useField:!0,keepAliveTabs:!0,tableListApi:null,tableListParams:{},tableCacheSortOrder:{},tableDeleteApi:null,tableRowEdit:!0,tableDeleteText:"",tableDeleteParams:{},tableExportApi:"",tableExportPathKey:"",tablePrintApi:"",tablePrintPathKey:"http_path",pagination:s,showPagination:!0,hasPagination:!0,showTableLineHeight:!1,showTableDrag:!1,editBoxOnDialog:!0,editBox:{title:Oe("系统"),dialog:{width:"960px",top:"7vh"},form:{api:{add:null,update:null},formAttrs:{},formList:[]},footer:{confirm:{title:Oe("确认"),attrs:{type:"primary"}},cancel:{title:Oe("取消"),attrs:{}}}}});let c=Le.merge({},u,{useField:!0,keepAliveTabs:!0},i.config);const f=l.reactive({ajaxLoading:!1,renderTable:!0,refreshTable:!1,tableSize:Ai.get("tableSize")||"default",tableStatistics:null}),d=l.ref(null),h=l.computed(()=>{var Pe;return(Pe=d==null?void 0:d.value)==null?void 0:Pe.tableRef}),p=l.computed(()=>{var Ze;const Pe={};for(const yt in i.userMenusAuth){const{id:Nt}=((Ze=i.userMenusAuth)==null?void 0:Ze[yt])||"";Nt&&(Pe[Nt]=yt)}return Pe}),m=l.computed(()=>{var Ze;let Pe=((Ze=i==null?void 0:i.route)==null?void 0:Ze.path)||"";return i!=null&&i.refMenuId&&(Pe=p.value[i.refMenuId]),i!=null&&i.pageUrl&&(Pe=i==null?void 0:i.pageUrl),Pe||""}),v=l.computed(()=>Oe("加载数据中")||"加载数据中..."),y=l.computed(()=>dr("showPagination",i.config)?Le.isFunction(i.config.showPagination)?i.config.showPagination():i.config.showPagination:!0),b=l.computed(()=>dr("headerActionsShow",i.config)?Le.isFunction(i.config.headerActionsShow)?i.config.headerActionsShow():i.config.headerActionsShow:!0),g=l.computed(()=>dr("showHeaderSearch",i.config)?Le.isFunction(i.config.showHeaderSearch)?i.config.showHeaderSearch():i.config.showHeaderSearch:!0),{pagination:k,handlePageSearchParams:_,handleCurrentChange:A,handleSizeChange:x,resetPagination:w,updatePagination:O,updateSort:S}=P9e({config:i.config,onGetList:Pe=>ln(Pe)}),{tableData:C,state:E,getTableListData:T,setTableData:F}=j9e({config:i.config,freezeList:i.freezeList,virtualized:c.virtualized,emit:r}),{tableSearchModel:D,searchFormRef:R,initSearch:L,onSearchReset:M,onSearchSubmit:X,handleSetSearchModel:ee,handleSearchFormReset:ae,handleSetSearchModelVal:N,handleCacheSearch:j,handleInitTableSearchData:q,setLastPagePath:V}=F9e({route:i.route,refMenuId:i.refMenuId,cacheSearch:i.cacheSearch,config:i.config,onGetList:Pe=>ln(Pe),emit:r}),{appTableColumn:K,handleRenderTableColumn:Y,handleTableFiledsSort:ne,handleFieldCheck:oe,handleTableColumnSort:ve,handleFixedCell:xe,handleTableHeaderDragend:ie,handleDoLayoutTable:we,getTableFields:Se}=R9e({config:i.config,tableColumn:i.tableColumn,userFieldList:i.userFieldList,userMenusAuth:i.userMenusAuth,route:i.route,refMenuId:i.refMenuId,emit:r}),{selectionRow:P,selectionRowIds:le,handleSelectionChange:ye,handleSelectionHeaderChange:G,handleSelectionColumnChange:J,handleTableCurrentChange:fe,clearSelection:se}=I9e({emit:r}),{editBoxRef:me,addBoxRef:ce,editBoxInfo:Fe,addBoxInfo:be,editBoxRefModel:_e,addBoxRefModel:Ve,handleEdit:st,handleAddSuccess:et,handleEditSuccess:Et,handleDialogClose:Bt,handleAddOption:bt,setFormModelVal:Kt,handleSetFormModelVal:gt,handleGetDetail:Ne,getSubmitData:he}=N9e({config:i.config,emit:r}),{handleDeleteRequest:Ee,handleCopyRequest:Te,handleSimpleRequest:ze,handlePrintRequest:He,handleExportRequest:rt,handleImportRequest:ct,handleEditRow:dt,handleEditRowProp:vt,handleDbCellClick:Vt,handleTableDataSort:Yt,createTableActionOptions:Xt,handleHeaderAction:Kn,handleTableAction:xn,handleSortChange:Yn}=M9e({config:i.config,emit:r}),_t=l.computed(()=>Se()),An=l.computed(()=>c.virtualized?{key:k.sort,order:k.order}:{prop:k.sort,order:k.order==="asc"?"ascending":"descending"}),ln=(Pe={})=>{const Ze=_(D.value,c.tableListParams),yt=Le.merge({},Ze,Pe);T(yt,c.tableListApi,{hasPagination:c.hasPagination,tableListCallback:c.tableListCallback,paginationCback:c.paginationCback,onFromJump:Nt=>Rn(Nt)}).then(Nt=>{Nt&&O(Nt),f.ajaxLoading=E.ajaxLoading})},Rn=(Pe=[])=>{if(i!=null&&i.refMenuId)return;const{query:{id:Ze,openType:yt}}=i.route||{query:{}};if(yt&&Ze&&Pe.length===1){if(yt==="edit")I(Pe[0],{});else if(yt.includes("Detail")){const Nt=K.value.find(bn=>{var wi;return((wi=bn==null?void 0:bn.publicDrawerConfig)==null?void 0:wi.openName)===yt});Nt!=null&&Nt.id&&r("click-cell",Pe[0],Nt)}}},Xn=()=>{w(),M()},rr=Pe=>{w(),X(Pe)},In=()=>{ln(),r("refresh-table")},tt=Pe=>A(Pe),Li=Pe=>x(Pe),Ti=Pe=>ye(Pe),Br=Pe=>{const Ze=G(Pe,C.value);F(Ze)},B=()=>J(C.value),z=Pe=>fe(Pe),I=(Pe,Ze)=>st(Pe,Ze,c,Se()),H=Pe=>bt(Pe,c,Se()),re=(Pe,Ze)=>et(Pe,Ze,{tableSearchModel:D,handleSetSearchModel:ee,onRefreshTable:In,onGetList:ln}),Q=(Pe,Ze)=>Et(Pe,Ze,{onRefreshTable:In,onGetList:ln}),U=Pe=>Bt(Pe),Z=(Pe,Ze)=>{var yt;r("click-cell",Pe,Ze),((yt=Ze==null?void 0:Ze.actions)==null?void 0:yt.type)==="editBox"&&I(Pe,Ze.actions)},Ce=(Pe,Ze,yt="table")=>vt(Pe,Ze,yt,{onSetRefreshTable:()=>{f.refreshTable=!0},onRefreshTable:In}),Me=Pe=>Vt(Pe),te=(Pe,Ze)=>xe(Pe,Ze),ge=(Pe,Ze,yt)=>ie(Pe,Ze,yt),ke=Pe=>oe(Pe),Re=()=>ve(),We=(Pe,Ze)=>{const yt=Yt(C.value,Ze);F(yt)},ot=Xt({handleEdit:I,handleDeleteRequest:(Pe,Ze,yt,Nt)=>Ee(Pe,Ze,yt,Nt,{onGetList:ln}),handleExportRequest:(Pe,Ze)=>{const yt=_(D.value,c.tableListParams);rt(Pe,Ze,yt,C.value,P.value,a,!1)},handleExportTempRequest:(Pe,Ze)=>{const yt=_(D.value,c.tableListParams);rt(Pe,Ze,yt,C.value,P.value,a,!0)},handlePrintRequest:Pe=>{const Ze=_(D.value,c.tableListParams);He(Pe,Ze,C.value,a)},handleImportRequest:ct,handleSimpleRequest:(Pe,Ze,yt,Nt,bn)=>ze(Pe,Ze,yt,Nt,bn,{onRefreshTable:In}),handleCopyRequest:(Pe,Ze)=>Te(Pe,Ze,{onGetList:ln})}),Ge=(Pe,Ze={},yt=null)=>{Kn(Pe,Ze,yt,c,P.value,null,ot)},Ct=(Pe,Ze,yt)=>{xn(Pe,Ze,yt,P.value,ot)},Zt=({prop:Pe,order:Ze})=>{Yn({prop:Pe,order:Ze},c,Se(),{onUpdateSort:S,onGetList:ln})},Ke=Pe=>{f.tableSize=Pe,Ai.set("tableSize",Pe)},$=()=>{var Pe;(Pe=c==null?void 0:c.tableFileImport)!=null&&Pe.refreshTable&&In()},de=Pe=>r("show-file",Pe),Be=()=>{},je=Pe=>r("upload-btn",Pe),qe=(Pe,Ze,yt,Nt)=>r("after-btns-click",Pe,Ze,yt,Nt),at=(Pe,Ze,yt)=>r("form-item-change",Pe,Ze,yt),ft=l.watch(()=>i.config.tableData,Pe=>{Pe&&F(Pe)}),Qe=l.watch(()=>i.config,Pe=>{c=Le.merge({},u,Pe)}),Gt=l.watch(()=>m.value,(Pe,Ze)=>{Pe!==Ze&&V(Ze)});return l.onMounted(async()=>{var Nt,bn,wi,On;const Pe=await q();D.value=Pe;const Ze=j(!1,m.value);Ze&&(Object.assign(D.value,Ze),(bn=(Nt=R.value)==null?void 0:Nt.handleSetModelValue)==null||bn.call(Nt,D.value));const yt=ne();yt!=null&&yt.order&&S(yt.sort,yt.order),(wi=c==null?void 0:c.tableCacheSortOrder)!=null&&wi.order&&S(c.tableCacheSortOrder.sort,c.tableCacheSortOrder.order),Y(m.value),(On=c.tableAttr)!=null&&On.immediate&&L()}),l.onBeforeUnmount(()=>{j(!0,m.value),ft(),Qe(),Gt(),c=null,F([]),f.renderTable=!1,se()}),t({tableRef:h,tableListContentRef:d,tableData:C,appTableColumn:K,currentPagePath:m,appConfig:c,pagination:k,editBoxRef:me,editBoxRefModel:_e,editBoxInfo:Fe,addBoxInfo:be,addBoxRef:ce,addBoxRefModel:Ve,selectionRow:P,selectionRowIds:le,tableSearchModel:D,loadingText:v,searchFormRef:R,showPagination:y,showHeaderActions:b,showHeaderSearch:g,defaultSort:An,onSearchSubmit:rr,onSearchReset:Xn,handleEdit:I,handleCurrentChange:A,handleSizeChange:x,handleSelectionChange:ye,handleTableCurrentChange:fe,handleSortChange:Zt,handleHeaderAction:Ge,handleTableAction:Ct,handleGetDetail:Ne,getList:ln,initSearch:L,handleError:Be,handleAddSuccess:re,handleEditSuccess:Q,handleEditRow:dt,handleEditRowProp:Ce,handleImportRequest:ct,handleClickRow:Z,handleShowFile:de,handleUploadBtn:je,handleUploadSuccess:$,handleAddOption:H,setFormModelVal:Kt,handleSetFormModelVal:gt,handleSetSearchModelVal:N,handleDialogClose:U,handleTableSizeChange:Ke,handleTableHeaderDragend:ge,handleFieldCheck:ke,handleTableColumnSort:Re,handleSearchFormReset:ae,getSubmitData:he,handleFixedCell:te,handleDoLayoutTable:()=>we(m.value),handleItemChange:at,handleDbCellClick:Me,handleTableDataSort:We,handleAfterBtnsClick:qe,handleSelectionHeaderChange:Br,handleSelectionColumnChange:B}),(Pe,Ze)=>{var On,fn,zi,jo,Cl,Za,af,vJ,yJ;const yt=l.resolveComponent("jwt-form"),Nt=l.resolveComponent("jwt-header-button"),bn=l.resolveComponent("el-pagination"),wi=l.resolveComponent("JwtDialogForm");return l.openBlock(),l.createElementBlock(l.Fragment,null,[f.renderTable?(l.openBlock(),l.createElementBlock("div",L9e,[l.createElementVNode("div",{class:l.normalizeClass([(On=l.unref(c))!=null&&On.searchBtnInline?"fxmj":""])},[l.renderSlot(Pe.$slots,"search-before",{},void 0,!0),g.value?(l.openBlock(),l.createElementBlock("div",z9e,[Ze[0]||(l.setBlockTracking(-1,!0),(Ze[0]=(jo=(zi=(fn=e.config)==null?void 0:fn.tableSearch)==null?void 0:zi.formList)!=null&&jo.length?(l.openBlock(),l.createBlock(yt,{key:0,ref_key:"searchFormRef",ref:R,modelValue:l.unref(D),"onUpdate:modelValue":_i=>l.isRef(D)?D.value=_i:null,class:"app-table-search",config:(Cl=e.config)==null?void 0:Cl.tableSearch,"is-search":"",onReset:Xn,onSubmit:rr},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({model:Qa})=>[l.renderSlot(Pe.$slots,_i,{model:Qa},void 0,!0)])}))]),1032,["modelValue","onUpdate:modelValue","config"])):l.createCommentVNode("",!0)).cacheIndex=0,l.setBlockTracking(1),Ze[0]),l.renderSlot(Pe.$slots,"search-form-after",{},void 0,!0)])):l.createCommentVNode("",!0),l.renderSlot(Pe.$slots,"search-after",{},void 0,!0),l.createElementVNode("div",{class:l.normalizeClass(["fxmj",[(Za=l.unref(c))!=null&&Za.searchBtnInline?"mb18":""]])},[l.createElementVNode("div",V9e,[l.renderSlot(Pe.$slots,"header-button-before",{},void 0,!0),b.value?(l.openBlock(),l.createBlock(Nt,{key:0,config:((af=e.config)==null?void 0:af.headerActions)||{},"current-path":m.value,"file-import":l.unref(c).tableFileImport,loading:f.ajaxLoading,"menus-obj":e.userMenusAuth,"total-count":l.unref(k).totalCount,"selection-row":l.unref(P),"upload-success-cb":l.unref(c).uploadSuccessCb,onHeaderAction:Ge,onUploadSuccess:$},null,8,["config","current-path","file-import","loading","menus-obj","total-count","selection-row","upload-success-cb"])):l.createCommentVNode("",!0),l.renderSlot(Pe.$slots,"header-button-after",{},void 0,!0)]),l.createElementVNode("div",null,[l.unref(c).showTableLineHeight?(l.openBlock(),l.createBlock(gk,{key:0,onTableSize:Ke})):l.createCommentVNode("",!0),_t.value?(l.openBlock(),l.createBlock(pk,{key:1,modelValue:l.unref(K),"onUpdate:modelValue":Ze[1]||(Ze[1]=_i=>l.isRef(K)?K.value=_i:null),onChange:ke,onSort:Re},null,8,["modelValue"])):l.createCommentVNode("",!0),(vJ=l.unref(c))!=null&&vJ.showTableDrag&&((yJ=l.unref(C))!=null&&yJ.length)?(l.openBlock(),l.createBlock(LE,{key:2,modelValue:l.unref(C),"onUpdate:modelValue":Ze[2]||(Ze[2]=_i=>l.isRef(C)?C.value=_i:null),"drag-title-key":l.unref(c).dragTitleKey,onSort:We},null,8,["modelValue","drag-title-key"])):l.createCommentVNode("",!0)])],2)],2),l.renderSlot(Pe.$slots,"table-before",{},void 0,!0),l.renderSlot(Pe.$slots,"table-content",{list:l.unref(C)},()=>[l.unref(c).virtualized?(l.openBlock(),l.createBlock(VE,{key:0,"ajax-loading":f.ajaxLoading,"app-table-column":l.unref(K),"current-page-path":m.value,"default-sort":An.value,"estimated-row-height":l.unref(c).estimatedRowHeight,"loading-text":v.value,pagination:l.unref(k),"table-attr":l.unref(c).tableAttr,"table-button-num":l.unref(c).tableButtonNum,"table-data":l.unref(C),"table-events":l.unref(c).tableEvents,"table-height":e.tableHeight,"table-size":f.tableSize,"user-menus-auth":e.userMenusAuth,onChangeTableColumn:te,onClickCell:Z,onDbclickCell:Me,onEditRow:Ce,onSelectionColumnChange:B,onSelectionHeaderChange:Br,onSortChange:Zt,onTableAction:Ct,onShowFile:de},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({scope:Qa,data:i7,list:r7,index:o7,rowindex:a7,pagestart:s7})=>[l.renderSlot(Pe.$slots,_i,{data:i7,index:o7,list:r7,rowindex:a7,pagestart:s7,scope:Qa},void 0,!0)])}))]),1032,["ajax-loading","app-table-column","current-page-path","default-sort","estimated-row-height","loading-text","pagination","table-attr","table-button-num","table-data","table-events","table-height","table-size","user-menus-auth"])):(l.openBlock(),l.createBlock(zE,{key:1,ref_key:"tableListContentRef",ref:d,"ajax-loading":f.ajaxLoading,"app-table-column":l.unref(K),"current-page-path":m.value,"default-sort":An.value,"loading-text":v.value,"table-attr":l.unref(c).tableAttr,"table-button-num":l.unref(c).tableButtonNum,"table-data":l.unref(C),"table-events":l.unref(c).tableEvents,"table-height":e.tableHeight,"table-size":f.tableSize,"user-menus-auth":e.userMenusAuth,pagination:l.unref(k),onChangeTableColumn:te,onClickCell:Z,onDbclickCell:Me,onEditRow:Ce,onHeaderDragend:ge,onSelectionChange:Ti,onSortChange:Zt,onTableAction:Ct,onTableCurrentChange:z,onShowFile:de},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({scope:Qa,data:i7,list:r7,index:o7,rowindex:a7,pagestart:s7})=>[l.renderSlot(Pe.$slots,_i,{data:i7,index:o7,list:r7,rowindex:a7,pagestart:s7,scope:Qa},void 0,!0)])}))]),1032,["ajax-loading","app-table-column","current-page-path","default-sort","loading-text","table-attr","table-button-num","table-data","table-events","table-height","table-size","user-menus-auth","pagination"]))],!0),l.renderSlot(Pe.$slots,"table-after",{},void 0,!0),l.createElementVNode("div",U9e,[l.createElementVNode("div",H9e,[l.renderSlot(Pe.$slots,"table-pagination-before",{data:f.tableStatistics},void 0,!0)]),y.value?(l.openBlock(),l.createBlock(bn,l.mergeProps({key:0},l.unref(c).pagination,{class:"app-pagination","current-page":l.unref(k).currentPage,disabled:f.ajaxLoading,"page-count":l.unref(k).pageCount,"page-size":l.unref(k).pageSize,total:l.unref(k).totalCount,onCurrentChange:tt,onSizeChange:Li}),null,16,["current-page","disabled","page-count","page-size","total"])):l.createCommentVNode("",!0)]),l.renderSlot(Pe.$slots,"table-pagination-after",{},void 0,!0)])):l.createCommentVNode("",!0),l.unref(Fe).visible?(l.openBlock(),l.createBlock(wi,{key:1,ref_key:"editBoxRef",ref:me,"app-config":l.unref(Fe).config,config:l.unref(Fe),"selection-row":l.unref(P),"selection-row-ids":l.unref(le),onAddOption:H,onAddSuccess:re,onDialogClose:U,onEditSuccess:Q,onError:Be,onItemChange:at,onUploadBtn:je,onAfterBtnsClick:qe},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({model:Qa})=>[l.renderSlot(Pe.$slots,_i,{model:Qa},void 0,!0)])}))]),1032,["app-config","config","selection-row","selection-row-ids"])):l.createCommentVNode("",!0),l.unref(be).visible?(l.openBlock(),l.createBlock(wi,{key:2,ref_key:"addBoxRef",ref:ce,"app-config":l.unref(be).config,config:l.unref(be),onAddOption:H,onAddSuccess:re,onDialogClose:U,onEditSuccess:Q,onError:Be,onUploadBtn:je},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({model:Qa})=>[l.renderSlot(Pe.$slots,_i,{model:Qa},void 0,!0)])}))]),1032,["app-config","config"])):l.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-15a4c691"]])},Symbol.toStringTag,{value:"Module"})),K9e=l.defineComponent({name:"JwtTabs"}),W9e=l.defineComponent({...K9e,props:{config:{type:Object,require:!0,default:()=>{}},currentPath:{type:String,default:"/"},menusObj:{type:Object,default:()=>{}},info:{type:Object,require:!0,default:()=>{}},keepAlive:{type:Boolean,default:!0}},emits:["tab-click","event-name"],setup(e,{expose:t,emit:n}){var b,g;const i=e,r=n,o=l.ref(null),a=l.ref(!1),s=l.computed(()=>{var _,A;return((A=(_=i.menusObj)==null?void 0:_[i==null?void 0:i.currentPath])==null?void 0:A.id)||""}),u=l.computed(()=>{var k,_;return((_=(k=i.config)==null?void 0:k.tabPaneList)==null?void 0:_.filter(A=>A.condition&&Le.isFunction(A.condition)?A.condition(i.info):!0))||[]}),c=l.computed(()=>{var A;const k=((i==null?void 0:i.menusObj)||{})[i==null?void 0:i.currentPath];let _=u.value;if(k&&((A=k==null?void 0:k.operations)!=null&&A.length)){const x={};if(k.operations.forEach(w=>{w.show_tab&&(x[w.code]=w)}),Object.keys(x).length)return _.filter(w=>{var O,S,C;if(x[w.name]){w.refMenuId=((O=x[w.name])==null?void 0:O.ref_menu_id)||"",w.rank=((S=x[w.name])==null?void 0:S.rank)||"";let E=((C=x[w.name])==null?void 0:C.show_title)||w.label||"";return w.numKey&&(E=`${Oe(E)} (${i.info[w.numKey]||0})`),w.label=E,!0}}).sort((w,O)=>w.rank-O.rank)}return _}),f=l.computed(()=>{if(!i.keepAlive||a.value)return[""];const k=[];return c.value.map(_=>{_.unKeepAlive||k.push(_.name)}),k}),d=l.ref(((b=i.config)==null?void 0:b.activeName)||((g=c.value[0])==null?void 0:g.name)),h=l.computed(()=>c.value.find(_=>_.name===d.value)),p=l.computed(()=>{var _,A;const k=((_=h.value)==null?void 0:_.params)||{};return{refMenuId:((A=h.value)==null?void 0:A.refMenuId)||s.value||"",...k}}),m=(k,_)=>{l.nextTick(()=>{r("tab-click",k,_,h.value)})},v=(...k)=>{r("event-name",...k)},y=k=>{c.value.find(A=>A.name===k)&&(d.value=k)};return l.onBeforeUnmount(()=>{a.value=!0}),t({componentRef:o,handleChangeTab:y}),(k,_)=>{var w;const A=l.resolveComponent("el-tab-pane"),x=l.resolveComponent("el-tabs");return l.openBlock(),l.createBlock(x,l.mergeProps({modelValue:d.value,"onUpdate:modelValue":_[0]||(_[0]=O=>d.value=O)},(w=e.config)==null?void 0:w.tabsAttrs,{onTabClick:m}),{default:l.withCtx(()=>{var O,S;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c.value,(C,E)=>(l.openBlock(),l.createBlock(A,l.mergeProps({key:E},{ref_for:!0},C,{label:C.label}),null,16,["label"]))),128)),(l.openBlock(),l.createBlock(l.KeepAlive,{include:f.value},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(h.value.component),l.mergeProps({key:h.value.name,ref_key:"componentRef",ref:o,info:e.info,params:p.value,"ref-menu-id":((O=h.value)==null?void 0:O.refMenuId)||s.value||""},((S=h.value)==null?void 0:S.attrs)||{},{onEventName:v}),null,16,["info","params","ref-menu-id"]))],1032,["include"]))]}),_:1},16,["modelValue"])}}}),G9e=Object.freeze(Object.defineProperty({__proto__:null,default:W9e},Symbol.toStringTag,{value:"Module"})),J9e=l.defineComponent({name:"JwtTags",props:{modelValue:{type:[String,Array],default:""},btnTitle:{type:String,default:"添加"},disabled:{type:Boolean,default:!1},labelKey:{type:String,default:"title"},valueKey:{type:String,default:"id"},isArray:{type:Boolean,default:!1},isInput:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=l.ref(null),i=l.reactive({tagList:[],inputVisible:!1,inputValue:"",initOnce:!1}),r=()=>{var d;if(i.initOnce)return;let f=[];return e.modelValue&&cn.isString(e.modelValue)?f=(d=e==null?void 0:e.modelValue)==null?void 0:d.split(","):e.modelValue&&cn.isArray(e.modelValue)&&(f=e.modelValue.map(h=>({...h,title:h[e.labelKey],id:h[e.valueKey]}))),i.initOnce=!0,f},o=l.watch(()=>e.modelValue,f=>{i.initOnce||f!=null&&f.isTrusted||(f?i.tagList=r():i.tagList=[])},{immediate:!0}),a=()=>{i.inputVisible=!0,l.nextTick(()=>{var f,d;(d=(f=n.value)==null?void 0:f.input)==null||d.focus()})},s=f=>{i.tagList.splice(i.tagList.indexOf(f),1),u()},u=()=>{const f=e.isArray?i.tagList:i.tagList.join(",");t("update:modelValue",f)},c=()=>{i.inputValue&&(e.isArray?i.tagList.push({[e.labelKey]:i.inputValue,[e.valueKey]:""}):i.tagList.push(i.inputValue)),i.inputVisible=!1,i.inputValue="",u()};return l.onUpdated(()=>{}),l.onBeforeMount(()=>{i.initOnce=!1}),l.onBeforeUnmount(()=>{o()}),{...l.toRefs(i),inputRef:n,showInput:a,handleClose:s,handleEmitResult:u,handleInputConfirm:c}}}),Y9e={class:"fx fxwp w"};function X9e(e,t,n,i,r,o){const a=l.resolveComponent("el-input"),s=l.resolveComponent("jwt-icon"),u=l.resolveComponent("el-tag"),c=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",Y9e,[e.isInput?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(e.tagList,(f,d)=>(l.openBlock(),l.createElementBlock("div",{key:f,class:"rel tags-input-wrapper mb10 mr10"},[l.createVNode(a,{modelValue:f[e.labelKey],"onUpdate:modelValue":h=>f[e.labelKey]=h,class:"w220",clearable:"",placeholder:"请输入",onBlur:e.handleEmitResult},null,8,["modelValue","onUpdate:modelValue","onBlur"]),l.createVNode(s,{class:"cd cp tags-input-close",icon:"close-circle-fill abs_rt",size:"18",style:{right:"-10px",top:"-15px"},onClick:h=>e.handleClose(f,d)},null,8,["onClick"])]))),128)):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(e.tagList,f=>(l.openBlock(),l.createBlock(u,{key:f,class:"mb4",closable:"","disable-transitions":!1,disabled:e.disabled,onClose:d=>e.handleClose(f,e.index)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.isArray?f[e.labelKey]:f),1)]),_:2},1032,["disabled","onClose"]))),128)),e.inputVisible?(l.openBlock(),l.createBlock(a,{key:2,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[0]||(t[0]=f=>e.inputValue=f),class:l.normalizeClass([e.isInput?"w220 mr10 mb10":"w120"]),placeholder:"请输入",onBlur:e.handleInputConfirm,onKeyup:l.withKeys(e.handleInputConfirm,["enter"])},null,8,["modelValue","class","onBlur","onKeyup"])):(l.openBlock(),l.createBlock(c,{key:3,class:"button-new-tag",disabled:e.disabled,size:e.isInput?"":"small",onClick:e.showInput},{default:l.withCtx(()=>[l.createTextVNode(" + "+l.toDisplayString(e.btnTitle),1)]),_:1},8,["disabled","size","onClick"]))])}const Z9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn(J9e,[["render",X9e],["__scopeId","data-v-44fc3183"]])},Symbol.toStringTag,{value:"Module"})),Q9e=["id"],UE={__name:"TreeNodeTitle",props:{node:{type:Object,default:()=>{}},nodeKey:{type:String,default:"id"},children:{type:String,default:"children"},checkedKeys:{type:Array,default:()=>[]},expandAll:{type:Boolean,default:!0},level:{type:Number,default:0},menuTitleKey:{type:String,default:"title"},optTitleKey:{type:String,default:"title"},isOpt:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["check","show"],setup(e,{emit:t}){const n=e,i=t,r=l.inject("menusIdObj"),o=l.ref(n.expandAll),a=l.computed(()=>n.node[n.nodeKey]),s=l.computed(()=>n.isOpt?"":`menu-id-${n.node[n.nodeKey]}`),u=l.computed(()=>{var y;if(n.isOpt)return((y=n==null?void 0:n.node)==null?void 0:y.remark)||"";if(n.node.rid){const b=r==null?void 0:r[n.node.rid];return b!=null&&b[n.optTitleKey]?`权限关联:${b[n.optTitleKey]}`:""}return""}),c=l.computed(()=>{var y;return((y=n.node[n.children])==null?void 0:y.length)>0}),f=(y=n.node)=>{const b=[],g=k=>{var _;(_=k[n.children])!=null&&_.length&&k[n.children].forEach(A=>{b.push(A[n.nodeKey]),g(A)})};return g(y),b},d=l.computed(()=>f()),h=l.computed({get(){return c.value?d.value.length>0&&d.value.every(y=>n.checkedKeys.includes(y)):n.checkedKeys.includes(a.value)},set(y){m(y)}}),p=l.computed(()=>{if(!c.value)return!1;const y=d.value.filter(b=>n.checkedKeys.includes(b)).length;return y>0&&y<d.value.length}),m=y=>{i("check",{key:a.value,checked:y,level:n.level})};function v(){o.value=!o.value,l.nextTick(()=>{i("show",o.value,n.node)})}return l.onUnmounted(()=>{}),(y,b)=>{var A,x,w,O;const g=l.resolveComponent("jwt-icon"),k=l.resolveComponent("el-popover"),_=l.resolveComponent("el-checkbox");return l.openBlock(),l.createElementBlock("div",{id:s.value||"",class:l.normalizeClass(["fxm jwt-menu-opt-item-title",[e.isOpt?"mr20":""]])},[e.isOpt?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(g,{key:0,class:l.normalizeClass(["cp fs20 mr5 g9 linear",[(x=(A=e.node)==null?void 0:A.children)!=null&&x.length||(O=(w=e.node)==null?void 0:w.operations)!=null&&O.length?"":"gtp",o.value?"":"up-90"]]),icon:"arrow-down-s-fill",onClick:v},null,8,["class"])),l.createVNode(_,{modelValue:h.value,"onUpdate:modelValue":b[0]||(b[0]=S=>h.value=S),indeterminate:p.value,disabled:e.disabled},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.node[e.menuTitleKey])+" ",1),l.createVNode(k,{content:u.value,persistent:!1,placement:"bottom",title:"权限说明",width:"240"},{reference:l.withCtx(()=>[u.value?(l.openBlock(),l.createBlock(g,{key:0,icon:"information-fill"})):l.createCommentVNode("",!0)]),_:1},8,["content"])]),_:1},8,["modelValue","indeterminate","disabled"]),e.isOpt?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:1,class:"ex h30",onClick:v}))],10,Q9e)}}},$9e=Object.freeze(Object.defineProperty({__proto__:null,default:UE},Symbol.toStringTag,{value:"Module"})),eEe={class:"jwt-menu-opt-item"},tEe={class:"fx fxwp"},_G={__name:"TreeNode",props:{node:{type:Object,required:!0},nodeKey:{type:String,default:"id"},children:{type:String,default:"children"},checkedKeys:{type:Array,default:()=>[]},expandAll:{type:Boolean,default:!0},level:{type:Number,default:0},menuTitleKey:{type:String,default:"title"},optTitleKey:{type:String,default:"title"},disabled:{type:Boolean,default:!1}},emits:["check","toggle"],setup(e,{emit:t}){const n=e,i=t,r=l.ref(!0),o=l.computed(()=>n.node[n.children]||[]),a=l.computed(()=>{var d;return((d=o.value)==null?void 0:d.length)>0}),s=l.computed(()=>{const d=[],h=[],p=[],m=[];return o.value.forEach(v=>{v.show_tab?d.push(v):v.show_header?p.push(v):v.show_table?h.push(v):m.push(v)}),[{title:"表头权限",list:p},{title:"表格权限",list:h},{title:"tab权限",list:d},{title:"其他权限",list:m}]});function u(d,h){r.value=d,i("toggle",h)}function c(d){i("toggle",d)}const f=d=>{i("check",d)};return(d,h)=>{const p=l.resolveComponent("TreeNode",!0),m=l.resolveComponent("el-divider");return l.openBlock(),l.createElementBlock("div",eEe,[l.createVNode(UE,{"checked-keys":e.checkedKeys,children:e.children,"expand-all":e.expandAll,level:e.level+1,"menu-title-key":e.menuTitleKey,node:e.node,"node-key":e.nodeKey,"opt-title-key":e.optTitleKey,disabled:e.disabled,onCheck:f,onShow:u},null,8,["checked-keys","children","expand-all","level","menu-title-key","node","node-key","opt-title-key","disabled"]),a.value?l.withDirectives((l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass([e.node.isOptChild?"fs16 lhm jwt-menu-opt-item-opt-wrapper":"pl25"])},[e.node.isOptChild?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(s.value,(v,y)=>(l.openBlock(),l.createElementBlock("div",{key:y,class:"plr25"},[v.list.length?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(m,{"border-style":"dashed",class:"jwt-menu-opt-item-opt-divider","content-position":"center"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v.title),1)]),_:2},1024),l.createElementVNode("div",tEe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v.list,b=>(l.openBlock(),l.createBlock(UE,{key:b.id,"checked-keys":e.checkedKeys,children:e.children,"expand-all":e.expandAll,"is-opt":"",disabled:e.disabled,level:e.level+1,"menu-title-key":e.menuTitleKey,node:b,"node-key":e.nodeKey,"opt-title-key":e.optTitleKey,onCheck:f},null,8,["checked-keys","children","expand-all","disabled","level","menu-title-key","node","node-key","opt-title-key"]))),128))])],64)):l.createCommentVNode("",!0)]))),128)):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(e.node.children,(v,y)=>(l.openBlock(),l.createElementBlock("div",{key:y},[l.createVNode(p,{"checked-keys":e.checkedKeys,children:e.children,"expand-all":e.expandAll,level:e.level+1,"menu-title-key":e.menuTitleKey,node:v,"node-key":e.nodeKey,disabled:e.disabled,"opt-title-key":e.optTitleKey,onCheck:f,onToggle:c},null,8,["checked-keys","children","expand-all","level","menu-title-key","node","node-key","disabled","opt-title-key"])]))),128))],2)),[[l.vShow,r.value]]):l.createCommentVNode("",!0)])}}},nEe=Object.freeze(Object.defineProperty({__proto__:null,default:_G},Symbol.toStringTag,{value:"Module"})),iEe={class:"rel"},rEe={key:0,class:"menu-opt-nav-wrapper"},oEe=Object.freeze(Object.defineProperty({__proto__:null,default:tn(Object.assign({name:"JwtTree"},{props:{treeData:{type:Array,default:()=>[]},nodeKey:{type:String,default:"id"},menuTitleKey:{type:String,default:"title"},children:{type:String,default:"children"},checkedKeys:{type:Array,default:()=>[]},expandAll:{type:Boolean,default:!0},menusIdObj:{type:Object,default:()=>{}},showNav:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:checked-keys","change","toggle","tab-change"],setup(e,{emit:t}){const n=e,i=t,r=l.ref(n.checkedKeys||[]),o=l.ref([]),a=l.ref(""),s=new Map,u=new Map;l.provide("menusIdObj",n.menusIdObj||{});const c=(k,_=null)=>{const A=new Map,x=(w,O)=>{w&&w.forEach(S=>{var E,T;const C=S[n.nodeKey];A.set(C,{node:S,parentKey:O,childrenKeys:((E=S[n.children])==null?void 0:E.map(F=>F[n.nodeKey]))||[]}),(T=S[n.children])!=null&&T.length&&x(S[n.children],C)})};return x(k,_),A},f=l.computed(()=>c(n.treeData)),d=l.computed(()=>{var k,_;return Le.isArray(n.treeData)&&((k=n.treeData)!=null&&k.length)?((_=n.treeData)==null?void 0:_.length)>1?n.treeDatap:n.treeData[0][n.children]:[]}),h=l.computed(()=>d.value.map(k=>`menu-id-${k[n.nodeKey]}`)),p=k=>{if(s.has(k))return s.get(k);const _=[],A=[k];for(;A.length;){const x=A.pop(),w=f.value.get(x);w&&w.childrenKeys.length&&(_.push(...w.childrenKeys),A.push(...w.childrenKeys))}return s.set(k,_),_},m=k=>{if(u.has(k))return u.get(k);const _=[];let A=k;for(;A;){const x=f.value.get(A);x&&x.parentKey?(_.push(x.parentKey),A=x.parentKey):A=null}return u.set(k,_),_},v=({key:k,level:_,checked:A})=>{const x=new Set(r.value),w=new Set(o.value);A?x.add(k):x.delete(k),w.delete(k),p(k).forEach(C=>{w.delete(C),A?x.add(C):x.delete(C)}),m(k).forEach(C=>{const E=f.value.get(C);E&&(E.childrenKeys.every(F=>x.has(F))?(x.add(C),w.delete(C)):(x.delete(C),E.childrenKeys.some(R=>x.has(R))?w.add(C):w.delete(C),E.childrenKeys.some(R=>w.has(R))&&w.add(C)))}),r.value=Array.from(x),o.value=Array.from(w),i("update:checked-keys",r.value),i("change",{key:k,checked:A,level:_,data:f.value.get(k),checkedKeys:r.value,halfCheckedKeys:o.value})},y=()=>{s.clear(),u.clear()};function b(k){i("toggle",k,h.value)}function g(k){i("tab-change",k)}return l.onMounted(()=>{setTimeout(()=>{b("")},1e3)}),l.watchEffect(()=>{n.checkedKeys&&(r.value=[...n.checkedKeys],y())}),l.onUnmounted(()=>{y()}),(k,_)=>{const A=l.resolveComponent("el-tab-pane"),x=l.resolveComponent("el-tabs");return l.openBlock(),l.createElementBlock("div",iEe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.treeData,(w,O)=>(l.openBlock(),l.createBlock(_G,{key:O,"checked-keys":r.value,"expand-all":e.expandAll,level:0,"menu-title-key":e.menuTitleKey,node:w,"node-key":e.nodeKey,disabled:e.disabled,onCheck:v,onToggle:b},null,8,["checked-keys","expand-all","menu-title-key","node","node-key","disabled"]))),128)),e.showNav?(l.openBlock(),l.createElementBlock("div",rEe,[l.createVNode(x,{modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=w=>a.value=w),"tab-position":"right",onTabChange:g},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.value,w=>(l.openBlock(),l.createBlock(A,{key:w[e.nodeKey],label:w[e.menuTitleKey]},null,8,["label"]))),128))]),_:1},8,["modelValue"])])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-392b12fd"]])},Symbol.toStringTag,{value:"Module"})),aEe=l.defineComponent({name:"JwtUploadFile",props:{modelValue:{type:[String,Array],default:null},limitSize:{type:[String,Number],default:1024*10*50},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},limit:{type:[String,Number],default:10},uploadParam:{type:Object,default:()=>{}},module:{type:String,default:""},dragUpload:{type:Boolean,default:!1}},emits:["update:modelValue","onChange","after-btn-click"],setup(e,{emit:t}){const n=gn(),i=l.useAttrs(),r=l.ref(null),o=l.reactive({fileList:[],initOnce:!1,onUploadProgress:!1,uploadFiles:[],uploadSuccessFiles:[],selectUploadFileNum:0}),a=l.computed(()=>e.disabled||(e.isCosBacthUpload?o.uploadProgress:!1)),s=y=>n.fillUrl&&cn.isFunction(n.fillUrl)?n.fillUrl(y,"","",""):y,u=()=>{let y=[];if(e.multiple)if(cn.hasArray(e.modelValue))e.modelValue.map(b=>{b&&y.push({url:s(b),org_url:b,name:s(b)})});else if(cn.isString(e.modelValue))e.modelValue.split(",").map(b=>{b&&y.push({url:s(b),org_url:b,name:s(b)})});else return o.initOnce=!1,[];else y=e.modelValue?[{url:s(e.modelValue),org_url:e.modelValue,name:s(e.modelValue)}]:[];return o.initOnce=!0,y},c=l.watch(()=>e.modelValue,y=>{l.nextTick(()=>{if(!(y!=null&&y.isTrusted))if(y){const b=u();o.fileList=b}else o.fileList=[]})},{immediate:!0}),f=l.computed(()=>wd()),d=y=>{if(!n.uploadImgUrl)return ut.ElMessage.error(Oe("请配置上传的路径地址"));const b=y.type,g=parseInt(e.limitSize),k=g/1024,_=y.size/1024<g;_||(k>1?ut.ElMessage.error(`${Oe("上传文件大小不能超过")} ${k}MB!`):ut.ElMessage.error(`${Oe("上传文件大小不能超过")} ${g}KB!`));const A=_;return A&&(o.onUploadProgress=!0),A},h=()=>{o.onUploadProgress=!1},p=(y,b)=>{if(o.onUploadProgress=!1,y.code===0){let g=o.fileList.concat([b]);v(g)}else ut.ElMessage.error(y.msg),this.dialogVisible=!1},m=(y,b)=>{v(b)},v=y=>{const b=(n==null?void 0:n.imgUploadResKey)||"";o.initOnce=!0;let g=[];y.map(k=>{var A,x,w;const _=(b?(x=(A=k==null?void 0:k.response)==null?void 0:A.data)==null?void 0:x[b]:(w=k==null?void 0:k.response)==null?void 0:w.data)||k.org_url;_&&g.push(_)}),e.multiple?(t("update:modelValue",g),t("onChange",g)):(t("update:modelValue",g[0]||""),t("onChange",g[0]||""))};return l.onBeforeMount(()=>{o.fileList=[],o.initOnce=!1}),l.onMounted(()=>{}),l.onBeforeUnmount(()=>{c()}),{attrs:i,uploadRef:r,appOptions:n,...l.toRefs(o),headers:f,uploadDisabled:a,handleRemove:m,handleBeforeUpload:d,handleUploadSuccess:p,handleUploadError:h,t:Oe}}}),sEe={class:"w"};function lEe(e,t,n,i,r,o){const a=l.resolveComponent("el-button"),s=l.resolveComponent("el-upload");return l.openBlock(),l.createElementBlock("div",sEe,[l.createVNode(s,l.mergeProps({ref:"uploadRef","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=u=>e.fileList=u),accept:e.attrs.accept||"application/*",action:e.appOptions.uploadImgUrl,"before-upload":e.handleBeforeUpload,data:e.uploadParam,disabled:e.uploadDisabled,headers:e.headers,multiple:e.multiple,drag:e.dragUpload,name:"filedata","on-error":e.handleUploadError,"on-remove":e.handleRemove,"on-success":e.handleUploadSuccess,limit:e.limit,"with-credentials":""},e.attrs),{default:l.withCtx(()=>[l.createVNode(a,{type:"primary"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.t("上传")),1)]),_:1})]),_:1},16,["file-list","accept","action","before-upload","data","disabled","headers","multiple","drag","on-error","on-remove","on-success","limit"])])}const uEe=Object.freeze(Object.defineProperty({__proto__:null,default:tn(aEe,[["render",lEe]])},Symbol.toStringTag,{value:"Module"})),fEe=["src"],cEe=["title"],dEe={class:"picture-card-operation"},hEe=["onClick"],CG=tn({__name:"fileSlot",props:{listType:{type:String,default:"picture-card"},file:{type:Object,default:()=>{}},pictureActions:{type:Array,default:()=>[]}},emits:["remove","on-preview","action"],setup(e,{emit:t}){const n=t,{t:i}=ut.useLocale(),r=ut.useNamespace("upload"),o=ut.useNamespace("icon"),a=ut.useFormDisabled(),s=f=>{n("remove",f)},u=f=>{n("on-preview",f)},c=(f,d)=>{n("action",{item:f,file:d})};return(f,d)=>{const h=l.resolveComponent("el-icon"),p=l.resolveComponent("el-progress");return l.openBlock(),l.createElementBlock(l.Fragment,null,[e.listType==="picture"||e.file.status!=="uploading"&&e.listType==="picture-card"?(l.openBlock(),l.createElementBlock("img",{key:0,alt:"",class:l.normalizeClass(l.unref(r).be("list","item-thumbnail")),src:e.file.url},null,10,fEe)):l.createCommentVNode("",!0),e.file.status==="uploading"||e.listType!=="picture-card"?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(l.unref(r).be("list","item-info"))},[l.createElementVNode("a",{class:l.normalizeClass(l.unref(r).be("list","item-name")),onClick:d[0]||(d[0]=l.withModifiers(m=>u(e.file),["prevent"]))},[l.createVNode(h,{class:l.normalizeClass(l.unref(o).m("document"))},{default:l.withCtx(()=>[l.createVNode(l.unref(LX))]),_:1},8,["class"]),l.createElementVNode("span",{class:l.normalizeClass(l.unref(r).be("list","item-file-name")),title:e.file.name},l.toDisplayString(e.file.name),11,cEe)],2),e.file.status==="uploading"?(l.openBlock(),l.createBlock(p,{key:0,percentage:Number(e.file.percentage),"stroke-width":e.listType==="picture-card"?6:2,style:l.normalizeStyle(e.listType==="picture-card"?"":"margin-top: 0.5rem"),type:e.listType==="picture-card"?"circle":"line"},null,8,["percentage","stroke-width","style","type"])):l.createCommentVNode("",!0)],2)):l.createCommentVNode("",!0),l.createElementVNode("label",{class:l.normalizeClass(l.unref(r).be("list","item-status-label"))},[e.listType==="text"?(l.openBlock(),l.createBlock(h,{key:0,class:l.normalizeClass([l.unref(o).m("upload-success"),l.unref(o).m("circle-check")])},{default:l.withCtx(()=>[l.createVNode(l.unref(jX))]),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(l.openBlock(),l.createBlock(h,{key:1,class:l.normalizeClass([l.unref(o).m("upload-success"),l.unref(o).m("check")])},{default:l.withCtx(()=>[l.createVNode(l.unref(FX))]),_:1},8,["class"])):l.createCommentVNode("",!0)],2),l.unref(a)?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(h,{key:2,class:l.normalizeClass(l.unref(o).m("close")),onClick:d[1]||(d[1]=m=>s(e.file))},{default:l.withCtx(()=>[l.createVNode(l.unref(gB))]),_:1},8,["class"])),l.unref(a)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("i",{key:3,class:l.normalizeClass(l.unref(o).m("close-tip"))},l.toDisplayString(l.unref(i)("el.upload.deleteTip")),3)),e.listType==="picture-card"?(l.openBlock(),l.createElementBlock("span",{key:4,class:l.normalizeClass(l.unref(r).be("list","item-actions"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(r).be("list","item-preview")),onClick:d[2]||(d[2]=m=>u(e.file))},[l.createVNode(h,{class:l.normalizeClass(l.unref(o).m("zoom-in"))},{default:l.withCtx(()=>[l.createVNode(l.unref(HX))]),_:1},8,["class"])],2),l.unref(a)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(l.unref(r).be("list","item-delete")),onClick:d[3]||(d[3]=m=>s(e.file))},[l.createVNode(h,{class:l.normalizeClass(l.unref(o).m("delete"))},{default:l.withCtx(()=>[l.createVNode(l.unref(NX))]),_:1},8,["class"])],2)),l.createElementVNode("div",dEe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.pictureActions,(m,v)=>(l.openBlock(),l.createElementBlock("span",{key:v,onClick:l.withModifiers(y=>c(m,e.file),["stop"])},l.toDisplayString(m.label),9,hEe))),128))])],2)):l.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-5526a394"]]),pEe=Object.freeze(Object.defineProperty({__proto__:null,default:CG},Symbol.toStringTag,{value:"Module"})),gEe=l.defineComponent({name:"JwtUploadImage",components:{FileSlot:CG,PasteUpload:Jb},props:{modelValue:{type:[String,Array],default:null},limitSize:{type:[String,Number],default:2048},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},listType:{type:String,default:"picture-card"},limit:{type:[String,Number],default:10},uploadParam:{type:Object,default:()=>{}},uploadPrefixName:{type:String,default:""},copyImgUploade:{type:Boolean,default:!1},verifyFileType:{type:Boolean,default:!0},uploadName:{type:String,default:""},dragUpload:{type:Boolean,default:!1}},emits:["update:modelValue","onChange","after-btn-click","picture-action","after-btns-click"],setup(e,{emit:t}){const n=gn(),i=l.useAttrs(),r=l.ref(null),o=l.reactive({fileList:[],dialogVisible:!1,dialogImageUrl:"",initOnce:!1,onUploadProgress:!1,textarea:"",uploadParams:{...e.uploadParam,name:"",goods_matting:0}}),a=(D="")=>n.fillUrl&&cn.isFunction(n.fillUrl)?n.fillUrl(D):D,s=l.computed(()=>(e==null?void 0:e.uploadName)||(n==null?void 0:n.uploadFileName)||"filedata"),u=l.computed(()=>({"--upload-picture-card-size":(i==null?void 0:i.cardSize)||"148px"})),c=l.computed(()=>(e==null?void 0:e.listType)==="picture-card"),f=l.computed(()=>{var D;return e.multiple?!1:!!((D=e==null?void 0:e.modelValue)!=null&&D.length)||o.onUploadProgress}),d=()=>{var R;if(!e.modelValue)return[];let D=[];if(e.multiple)if(cn.hasArray(e.modelValue))e.modelValue.map(L=>{L&&D.push({url:a(L),org_url:L,name:a(L)})});else if(cn.isString(e.modelValue))e.modelValue.split(",").map(L=>{L&&D.push({url:a(L),org_url:L,name:a(L)})});else if((R=e.modelValue)!=null&&R.length)D=[{url:a(e.modelValue),org_url:e.modelValue,name:a(e.modelValue)}];else return o.initOnce=!1,[];else D=e.modelValue?[{url:a(e.modelValue),org_url:e.modelValue,name:a(e.modelValue)}]:[];return o.initOnce=!0,D},h=l.watch(()=>e.modelValue,D=>{l.nextTick(()=>{if(!(D!=null&&D.isTrusted))if(D){const R=d();o.fileList=R}else o.fileList=[]})},{immediate:!0}),p=l.computed(()=>wd()),m=D=>{if(!n.uploadImgUrl)return ut.ElMessage.error(Oe("请配置上传的路径地址"));o.uploadParams.name=`${e.uploadPrefixName}${e.uploadPrefixName?"_":""}${D.name}`;const R=D.type,L=parseInt(e.limitSize),M=L/1024,X=D.size/1024<L,ee=["image/jpeg","image/png","image/gif","image/webp","image/x-icon"];let ae=e.verifyFileType?ee.includes(R):!0;R.includes(".icon")&&(ae=!0),ae||ut.ElMessage.error(Oe("上传图片只能是JPG,PNG,GIF,WEBP格式")),X||(M>1?ut.ElMessage.error(`${Oe("上传图片大小不能超过")} ${M}MB!`):ut.ElMessage.error(`${Oe("上传图片大小不能超过")} ${L}KB!`));const N=ae&&X;return N&&(o.onUploadProgress=!0),N},v=()=>{o.onUploadProgress=!1},y=(D,R,L)=>{const M=L.every(X=>X.status==="success");o.onUploadProgress=!1,M&&g(L)},b=(D,R)=>{g(R)},g=D=>{const R=n.imgUploadResKey||"";o.initOnce=!0;let L=[];D.map(M=>{var ee,ae,N;const X=(R?(ae=(ee=M==null?void 0:M.response)==null?void 0:ee.data)==null?void 0:ae[R]:(N=M==null?void 0:M.response)==null?void 0:N.data)||M.org_url;X&&L.push(X)}),e.multiple?(t("update:modelValue",L),t("onChange",L)):(t("update:modelValue",L[0]||""),t("onChange",L[0]||""))},k=D=>{o.dialogImageUrl=D.url,o.dialogVisible=!0},_=D=>{r.value.handleStart(D),r.value.submit()},A=()=>{t("after-btn-click")},x=(D,R)=>{t("after-btns-click",D,R)},w=(D,R)=>{const L=ut.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});i.mattingUrl&&i.requestFun({url:i.mattingUrl,method:"post",data:{http_path:D,...e.uploadParam}}).then(M=>{const X=M==null?void 0:M.relative_path.split(",").map(ee=>({url:a(ee),org_url:ee,name:ee}));t("picture-action",{file:X,item:R}),L.close()}).catch(()=>{L.close()})},O=D=>{r.value.handleRemove(D)},S=l.computed(()=>o.fileList.length&&i.mattingAll),C=l.computed(()=>{const D=(i==null?void 0:i.actionList)||[];return D.length===0?[]:[{label:Oe("设为主图"),code:"setMain"},{label:Oe("抠图"),code:"mattingImg"},{label:Oe("设计"),code:"design"}].filter(M=>D.includes(M.code))}),E=({file:D,item:R})=>{if(R.code==="mattingImg"){w(D.url,R);return}t("picture-action",{file:D,item:R})},T=()=>{var R,L;const D=(L=(R=o.fileList)==null?void 0:R.map(M=>M.org_url))==null?void 0:L.join(",");D&&w(D,{code:"mattingAll"})},F=(D,R)=>{};return l.onBeforeMount(()=>{o.fileList=[],o.initOnce=!1}),l.onBeforeUnmount(()=>{o.fileList=[],o.initOnce=!1,h()}),{attrs:i,uploadRef:r,appOptions:n,isPictureCard:c,...l.toRefs(o),headers:p,showOnlyOne:f,pictureActions:C,showMattingAll:S,styleObj:u,uploadFileName:s,handleRemove:b,handleBeforeUpload:m,handleUploadSuccess:y,handlePictureCardPreview:k,handleUploadError:v,handleUploadPaste:_,t:Oe,handleAfterBtn:A,handleClickAfterBtns:x,handleFileRemove:O,handlePictureAction:E,handleAllMattingImg:T,handleUploadOnChange:F}}}),mEe={key:0,class:"fv fxr ml5"},vEe=["src"];function yEe(e,t,n,i,r,o){const a=l.resolveComponent("PasteUpload"),s=l.resolveComponent("jwt-icon"),u=l.resolveComponent("el-button"),c=l.resolveComponent("file-slot"),f=l.resolveComponent("el-upload"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",{class:"w jwt-upload-image-wrapper",style:l.normalizeStyle(e.styleObj)},[l.createVNode(a,{"btn-list":e.attrs.btnList,"btn-text":e.attrs.afterBtnText,copy:e.copyImgUploade,disabled:e.disabled,limit:e.showOnlyOne,onAfterBtnClick:e.handleAfterBtn,onAfterBtnsClick:e.handleClickAfterBtns,onUploadPaste:e.handleUploadPaste},null,8,["btn-list","btn-text","copy","disabled","limit","onAfterBtnClick","onAfterBtnsClick","onUploadPaste"]),l.createElementVNode("div",{class:l.normalizeClass([e.isPictureCard?"fx":""])},[l.createVNode(f,{ref:"uploadRef",accept:e.attrs.accept||"image/*",action:e.appOptions.uploadImgUrl,"before-upload":e.handleBeforeUpload,class:l.normalizeClass({onlyOne:e.showOnlyOne}),data:e.uploadParams,disabled:e.disabled,drag:e.dragUpload,"file-list":e.fileList,headers:e.headers,"list-type":e.listType,multiple:e.multiple,name:e.uploadFileName,"on-change":e.handleUploadOnChange,"on-error":e.handleUploadError,"on-preview":e.handlePictureCardPreview,"on-remove":e.handleRemove,"on-success":e.handleUploadSuccess,"show-file-list":!0,"with-credentials":""},l.createSlots({trigger:l.withCtx(()=>[e.isPictureCard?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[e.attrs.useMaterial?(l.openBlock(),l.createElementBlock("div",{key:0,class:"wh fxmc",onClick:t[0]||(t[0]=l.withModifiers((...h)=>e.handleAfterBtn&&e.handleAfterBtn(...h),["stop"]))},[l.createVNode(s,{icon:"add-line",size:40})])):(l.openBlock(),l.createBlock(s,{key:1,icon:"add-line",size:40}))],64)):(l.openBlock(),l.createBlock(u,{key:1,type:"primary"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.t("选择文件")),1)]),_:1}))]),_:2},[e.attrs.mattingUrl?{name:"file",fn:l.withCtx(({file:h})=>[l.createVNode(c,{file:h,"list-type":e.listType,"picture-actions":e.pictureActions,onAction:e.handlePictureAction,onOnPreview:e.handlePictureCardPreview,onRemove:e.handleFileRemove},null,8,["file","list-type","picture-actions","onAction","onOnPreview","onRemove"])]),key:"0"}:void 0]),1032,["accept","action","before-upload","class","data","disabled","drag","file-list","headers","list-type","multiple","name","on-change","on-error","on-preview","on-remove","on-success"]),e.showMattingAll?(l.openBlock(),l.createElementBlock("div",mEe,[l.createVNode(u,{type:"primary",onClick:e.handleAllMattingImg},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.t("一键抠图")),1)]),_:1},8,["onClick"])])):l.createCommentVNode("",!0)],2),e.attrs.tips1?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(e.attrs.tipsCls)},l.toDisplayString(e.attrs.tips),3)):l.createCommentVNode("",!0),l.createVNode(d,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[1]||(t[1]=h=>e.dialogVisible=h),"append-to-body":""},{default:l.withCtx(()=>[l.createElementVNode("img",{src:e.dialogImageUrl,style:{width:"100%"},"w-full":""},null,8,vEe)]),_:1},8,["modelValue"])],4)}const bEe=Object.freeze(Object.defineProperty({__proto__:null,default:tn(gEe,[["render",yEe]])},Symbol.toStringTag,{value:"Module"})),kEe=l.defineComponent({name:"JwtUploadVideo",props:{modelValue:{type:[String,Array],default:null},limitSize:{type:[String,Number],default:1024*10*50},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},listType:{type:String,default:"picture-card"},limit:{type:[String,Number],default:10},uploadParam:{type:Object,default:()=>{}},copyImgUploade:{type:Boolean,default:!1},isCosSdk:{type:Boolean,default:!1},isCosBacthUpload:{type:Boolean,default:!0},module:{type:String,default:""},dragUpload:{type:Boolean,default:!1}},emits:["update:modelValue","onChange","after-btn-click"],setup(e,{emit:t}){const n=gn(),i=l.useAttrs(),r=l.ref(null),o=l.reactive({fileList:[],dialogVisible:!1,dialogImageUrl:"",initOnce:!1,onUploadProgress:!1,textarea:"",uploadFiles:[],uploadSuccessFiles:[],uploadFileNum:0,selectUploadFileNum:0,uploadTips:"",uploadProgress:!1,uploadPercent:0,cosConfig:{}}),a=l.computed(()=>e.disabled||(e.isCosBacthUpload?o.uploadProgress:!1)),s=S=>n.fillUrl&&cn.isFunction(n.fillUrl)?n.fillUrl(S,"","",""):S,u=l.computed(()=>{var S;return e.multiple?!1:!!((S=e==null?void 0:e.modelValue)!=null&&S.length)||o.onUploadProgress}),c=()=>{let S=[];if(e.multiple)if(cn.hasArray(e.modelValue))e.modelValue.map(C=>{C&&S.push({url:s(C),org_url:C,name:s(C)})});else if(cn.isString(e.modelValue))e.modelValue.split(",").map(C=>{C&&S.push({url:s(C),org_url:C,name:s(C)})});else return o.initOnce=!1,[];else S=e.modelValue?[{url:s(e.modelValue),org_url:e.modelValue,name:s(e.modelValue)}]:[];return o.initOnce=!0,S};l.watch(()=>e.modelValue,S=>{l.nextTick(()=>{if(!(S!=null&&S.isTrusted))if(S){const C=c();o.fileList=C}else o.fileList=[]})},{immediate:!0});const f=l.computed(()=>wd()),d=S=>{if(!n.uploadImgUrl)return ut.ElMessage.error(Oe("请配置上传的路径地址"));const C=S.type,E=parseInt(e.limitSize),T=E/1024,F=S.size/1024<E;F||(T>1?ut.ElMessage.error(`${Oe("上传视频大小不能超过")} ${T}MB!`):ut.ElMessage.error(`${Oe("上传视频大小不能超过")} ${E}KB!`));const D=F;return D&&(o.onUploadProgress=!0),D},h=()=>{o.onUploadProgress=!1},p=(S,C)=>{if(o.onUploadProgress=!1,S.code===0){let E=o.fileList.concat([C]);v(E)}else ut.ElMessage.error(S.msg),o.dialogVisible=!1},m=(S,C)=>{v(C)},v=S=>{const C=n.imgUploadResKey||"";o.initOnce=!0;let E=[];S.map(T=>{var D,R,L;const F=(C?(R=(D=T==null?void 0:T.response)==null?void 0:D.data)==null?void 0:R[C]:(L=T==null?void 0:T.response)==null?void 0:L.data)||T.org_url;F&&E.push(F)}),e.multiple?(t("update:modelValue",E),t("onChange",E)):(t("update:modelValue",E[0]||""),t("onChange",E[0]||""))},y=(S,C)=>{if(!e.isCosSdk)return;o.uploadFiles.push(S);let E=C.length;o.selectUploadFileNum=Math.max(E,o.selectUploadFileNum),setTimeout(()=>{o.selectUploadFileNum!==E||o.uploadProgress&&e.isCosBacthUpload||(o.uploadProgress=!0,o.uploadTips=Oe("正在上传中")+"...",o.uploadSuccessFiles=[],b(o.uploadFiles))},50)},b=async S=>{Gb.handleUploadFiles(S,e.isCosBacthUpload,{onProgress:g,onFileFinish:k,handlePath:_})},g=S=>{e.isCosBacthUpload&&(o.uploadPercent=S)},k=(S,C,E,T)=>{if(e.isCosBacthUpload)if(S)ut.ElMessage.error(Oe("上传失败请重新上传")),o.uploadTips=Oe("上传失败请重新上传")+"...",o.uploadProgress=!1,o.uploadFileNum=0,o.uploadPercent=0;else{o.uploadFileNum+=1;const F=`/${E.Key}`,D=o.uploadFiles.findIndex(R=>R.keyPath===E.Key);if(D>=0&&(o.uploadFiles[D].uploadDone="done",o.uploadFiles[D].uploadPercent=100),o.uploadSuccessFiles.push({org_url:F}),o.uploadFileNum===T.length){o.uploadTips=Oe("上传完成");let R=o.fileList.concat(o.uploadSuccessFiles);v(R),setTimeout(()=>{o.uploadProgress=!1,o.uploadFileNum=0,o.uploadPercent=0},500)}}else if(S)ut.ElMessage.error(Oe("上传失败请重新上传"));else{const F=`/${E.Key}`;let D=o.fileList.concat([{org_url:F}]);v(D)}},_=S=>`${Ai.get("companyId")}/${e.module}/${va().format("YYYYMMDD")}/${l7(S.name+`${c7(0,1e4)}`)}.${S.ext}`,A=S=>{o.dialogImageUrl=S,o.dialogVisible=!0},x=()=>{t("after-btn-click")},w=(S,C)=>{if(o.fileList.splice(S,1),l.nextTick(()=>{v(o.fileList)}),o.uploadFileList.length){const E=o.uploadFileList.findIndex(T=>T.org_url===C.org_url);E>=0&&o.uploadFileList.splice(E,1)}},O=()=>{Gb.getInstance(n.txCosUploadFileUrl)};return l.onBeforeMount(()=>{o.fileList=[],o.initOnce=!1}),l.onMounted(()=>{e.isCosSdk&&O()}),{attrs:i,uploadRef:r,appOptions:n,...l.toRefs(o),headers:f,showOnlyOne:u,uploadDisabled:a,handleRemove:m,handleBeforeUpload:d,handleUploadSuccess:p,handleVideoPreview:A,handleUploadError:h,t:Oe,handleAfterBtn:x,handleDeleteVideo:w,handleUploadOnChange:y,handleInitCosSdk:O}}}),wEe={class:"w"},_Ee={class:"fx fxwp el-upload-list el-upload-list--picture-card"},CEe=["src"],SEe={key:0,class:"jwt-material-img-mask"},xEe=["onClick"],EEe=["onClick"],BEe={class:"fx mb10 fxb"},DEe={key:0},TEe={class:"g6 fs12 lh1"},AEe={key:1,style:{width:"50%"}},OEe={class:"cd"},FEe=["src"];function PEe(e,t,n,i,r,o){const a=l.resolveComponent("jwt-icon"),s=l.resolveComponent("el-upload"),u=l.resolveComponent("el-button"),c=l.resolveComponent("el-progress"),f=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",wEe,[l.createElementVNode("ul",_Ee,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.fileList,(d,h)=>(l.openBlock(),l.createElementBlock("li",{key:h,class:"el-upload-list__item is-success rel"},[l.createElementVNode("video",{class:"wh",controls:"",src:d.url},null,8,CEe),d.url?(l.openBlock(),l.createElementBlock("div",SEe,[l.createElementVNode("i",{class:"el-icon",onClick:l.withModifiers(p=>e.handleVideoPreview(d.url),["stop"])},[...t[2]||(t[2]=[l.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[l.createElementVNode("path",{d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zm-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96z",fill:"currentColor"})],-1)])],8,xEe),l.createElementVNode("i",{class:"el-icon",onClick:l.withModifiers(p=>e.handleDeleteVideo(h,d),["stop"])},[...t[3]||(t[3]=[l.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[l.createElementVNode("path",{d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z",fill:"currentColor"})],-1)])],8,EEe)])):l.createCommentVNode("",!0)]))),128)),l.createVNode(s,{ref:"uploadRef",accept:"video/*",action:e.appOptions.uploadImgUrl,"auto-upload":!e.isCosSdk,"before-upload":e.handleBeforeUpload,class:l.normalizeClass({onlyOne:e.showOnlyOne}),data:e.uploadParam,disabled:e.uploadDisabled,headers:e.headers,"list-type":e.listType,multiple:e.multiple,drag:e.dragUpload,name:"filedata","on-change":e.handleUploadOnChange,"on-error":e.handleUploadError,"on-remove":e.handleRemove,"on-success":e.handleUploadSuccess,"show-file-list":!1,"with-credentials":""},{default:l.withCtx(()=>[e.attrs.useMaterial?(l.openBlock(),l.createElementBlock("div",{key:0,class:"wh fxmc",onClick:t[0]||(t[0]=l.withModifiers((...d)=>e.handleAfterBtn&&e.handleAfterBtn(...d),["stop"]))},[l.createVNode(a,{icon:"add-line",size:40})])):(l.openBlock(),l.createBlock(a,{key:1,icon:"add-line",size:40}))]),_:1},8,["action","auto-upload","before-upload","class","data","disabled","headers","list-type","multiple","drag","on-change","on-error","on-remove","on-success"]),l.createElementVNode("div",BEe,[e.attrs.afterBtnText?(l.openBlock(),l.createBlock(u,{key:0,class:"ml10",disabled:e.disabled,size:"default",type:"primary",onClick:e.handleAfterBtn},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.t(e.attrs.afterBtnText)||e.t("从素材库选")),1)]),_:1},8,["disabled","onClick"])):l.createCommentVNode("",!0)])]),e.isCosBacthUpload?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",DEe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.uploadFiles,(d,h)=>(l.openBlock(),l.createElementBlock("div",{key:h,class:"lh1"},[l.createElementVNode("span",TEe,l.toDisplayString(d.name),1),l.createVNode(c,{class:"mt2",percentage:d.uploadPercent,"stroke-width":3},null,8,["percentage"])]))),128))])),e.isCosBacthUpload&&e.uploadProgress?(l.openBlock(),l.createElementBlock("div",AEe,[l.createVNode(c,{percentage:e.uploadPercent},null,8,["percentage"]),l.createElementVNode("span",OEe,l.toDisplayString(e.uploadTips),1)])):l.createCommentVNode("",!0),l.createVNode(f,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[1]||(t[1]=d=>e.dialogVisible=d),"append-to-body":""},{default:l.withCtx(()=>[l.createElementVNode("video",{controls:"",src:e.dialogImageUrl,style:{width:"100%"},"w-full":""},null,8,FEe)]),_:1},8,["modelValue"])])}const jEe=Object.freeze(Object.defineProperty({__proto__:null,default:tn(kEe,[["render",PEe],["__scopeId","data-v-9fde4789"]])},Symbol.toStringTag,{value:"Module"})),REe={beforeMount(e,t){var s;const n=t.arg||{},i=((s=t==null?void 0:t.modifiers)==null?void 0:s.once)||!1,r=n.root||null,o=n.rootMargin||"0px",a=n.threshold||0;e.intersectionObserver=new IntersectionObserver(u=>{u[0].isIntersecting&&(t.value(),i&&e.intersectionObserver.disconnect())},{root:r,rootMargin:o,threshold:a}),e.intersectionObserver.observe(e)},unmounted(e){e.intersectionObserver.disconnect()}};function IEe(e){const t=new Map;return function(...n){const i=JSON.stringify(n);if(t.has(i))return t.get(i);const r=l.computed(()=>e(...n));return t.set(i,r),r}}var SG={exports:{}};const NEe=NSe(cSe);(function(e,t){(function(n,i){e.exports=i(NEe)})(self,n=>(()=>{var i={857:s=>{s.exports=n}},r={};function o(s){var u=r[s];if(u!==void 0)return u.exports;var c=r[s]={exports:{}};return i[s](c,c.exports,o),c.exports}o.d=(s,u)=>{for(var c in u)o.o(u,c)&&!o.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:u[c]})},o.o=(s,u)=>Object.prototype.hasOwnProperty.call(s,u),o.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var a={};return(()=>{o.r(a),o.d(a,{default:()=>q});var s=o(857);(0,s.i18nAddResources)("en",{attachment:{upload:"Upload Attachment",download:"Download Attachment"}}),(0,s.i18nAddResources)("zh-CN",{attachment:{upload:"上传附件",download:"下载附件"}});function u(V,K,Y,ne,oe){return{sel:V,data:K,children:Y,text:ne,elm:oe,key:K===void 0?void 0:K.key}}const c=Array.isArray;function f(V){return typeof V=="string"||typeof V=="number"||V instanceof String||V instanceof Number}function d(V,K,Y){if(V.ns="http://www.w3.org/2000/svg",Y!=="foreignObject"&&K!==void 0)for(let ne=0;ne<K.length;++ne){const oe=K[ne];if(typeof oe=="string")continue;const ve=oe.data;ve!==void 0&&d(ve,oe.children,oe.sel)}}function h(V,K,Y){let ne,oe,ve,xe={};if(Y!==void 0?(K!==null&&(xe=K),c(Y)?ne=Y:f(Y)?oe=Y.toString():Y&&Y.sel&&(ne=[Y])):K!=null&&(c(K)?ne=K:f(K)?oe=K.toString():K&&K.sel?ne=[K]:xe=K),ne!==void 0)for(ve=0;ve<ne.length;++ve)f(ne[ve])&&(ne[ve]=u(void 0,void 0,void 0,ne[ve],void 0));return V[0]!=="s"||V[1]!=="v"||V[2]!=="g"||V.length!==3&&V[3]!=="."&&V[3]!=="#"||d(xe,ne,V),u(V,xe,ne,oe,void 0)}const p={type:"attachment",renderElem:function(V,K,Y){var ne=Y.isDisabled(),oe=s.DomEditor.isNodeSelected(Y,V),ve=V,xe=ve.fileName,ie=xe===void 0?"":xe,we=ve.link,Se=we===void 0?"":we;return h("span",{props:{contentEditable:!1},style:{display:"inline-block",marginLeft:"3px",marginRight:"3px",border:oe&&!ne?"2px solid var(--w-e-textarea-selected-border-color)":"2px solid transparent",borderRadius:"3px",padding:"0 3px",backgroundColor:"#f1f1f1",cursor:ne?"pointer":"inherit"},on:{click:function(){ne&&Se&&window.open(Se,"_blank")}}},[h("img",{props:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAv5JREFUWEetl1nITVEUx3/fo5LkyRQeFA+SIS8eZHhQimRKMhMSoogyR5QxMs9DkplQEhFvxihCKUWkpCTP9P9a+1p3f2efe869367T3Xeftdf/v9e012mi9cZQYDzQBxgIfANeAO+BDSmYplbCX58HAnwFFgNXY7zWIHABmBQpfg10A9pH64OAZ36tUQLngClO4XVgC/DU1iYCF937N+aiylIjBM4A05xy+XljwqV/3bpkKjFRL4GTwMyU0gwSY4Abtn4NGBdk6iFwFJhbAjyI/gLaAR+BnvUSOATML2j22BCvgL7AbyPS/L6MBfYDC3NOrlS8BLzNcIGi/4mtPwSGlbXAHmBJDriCSgQU5UrJmIT8Ptb277OaUNgCu4BlBcCDSFWUGzFfCXV6WaEQge3A8hLgcSquBjbnBWxeDGwFVtXwuT9ZfHLtlY4wFB9xxUwGoViLfVGzxuCymqyXC57KAilb1wC44kVxUxM8i8Bs4HgJn8cnV6YoYwqBxwR6A/eBzrY7Vh5SLeUW1QjVisLgMQEFyQTbfQqY5ZTVAp8HHC4L7gnocrhiCj5ZpdKvxlJgd45b5gDHcsDzKmQlC3zUrwS2mcJ+wAPXWMRumQHIWimzh04pVSErBG4Do0zLaOCWzX2rpeZjqgPT/GwB8FTMNK+HQqSerZNJKgjVUGro9Go2NXwJnQycLwGebFYCgS9AF1PYEfhu8wXAQZurfh8AutcoMnGDGrvN8f5vAQVg6FJGAndNqq211SE1qzbb9evLaylw74I1wCbTvgLY4ZAGAzeBDhH6kYzmRARyfR6fILhAd7XubI0fQC/gpxNuY23YcOCDdbrP3fvSJw97/W14B5D5NR4DQ2K2if91g3sXaN4V+OxAlN+LgD8J4B7WbJTpjluoivuB6cBpJ6VquBd4BAST67tP1tHFIxKlfJ6KAb8+AriXcWqlarCUf60ashY4UdBlVWKpjkgRvzP6+MjSf9nA39UDHsdAlg7VhgFAf3sk89IefXq3+NotS+QfmNG0IS7jBhcAAAAASUVORK5CYII="},style:{width:"1em",marginRight:"0.1em",minWidth:"0",minHeight:"0"}}),ie])}};function m(V){return V!==null&&typeof V=="object"&&"constructor"in V&&V.constructor===Object}function v(V={},K={}){Object.keys(K).forEach(Y=>{V[Y]===void 0?V[Y]=K[Y]:m(K[Y])&&m(V[Y])&&Object.keys(K[Y]).length>0&&v(V[Y],K[Y])})}const y={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function b(){const V=typeof document<"u"?document:{};return v(V,y),V}const g={document:y,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:V=>typeof setTimeout>"u"?(V(),null):setTimeout(V,0),cancelAnimationFrame(V){typeof setTimeout<"u"&&clearTimeout(V)}};function k(){const V=typeof window<"u"?window:{};return v(V,g),V}class _ extends Array{constructor(K){typeof K=="number"?super(K):(super(...K||[]),function(Y){const ne=Y.__proto__;Object.defineProperty(Y,"__proto__",{get:()=>ne,set(oe){ne.__proto__=oe}})}(this))}}function A(V,K){const Y=k(),ne=b();let oe=[];if(!K&&V instanceof _)return V;if(!V)return new _(oe);if(typeof V=="string"){const ve=V.trim();if(ve.indexOf("<")>=0&&ve.indexOf(">")>=0){let xe="div";ve.indexOf("<li")===0&&(xe="ul"),ve.indexOf("<tr")===0&&(xe="tbody"),ve.indexOf("<td")!==0&&ve.indexOf("<th")!==0||(xe="tr"),ve.indexOf("<tbody")===0&&(xe="table"),ve.indexOf("<option")===0&&(xe="select");const ie=ne.createElement(xe);ie.innerHTML=ve;for(let we=0;we<ie.childNodes.length;we+=1)oe.push(ie.childNodes[we])}else oe=function(xe,ie){if(typeof xe!="string")return[xe];const we=[],Se=ie.querySelectorAll(xe);for(let P=0;P<Se.length;P+=1)we.push(Se[P]);return we}(V.trim(),K||ne)}else if(V.nodeType||V===Y||V===ne)oe.push(V);else if(Array.isArray(V)){if(V instanceof _)return V;oe=V}return new _(function(ve){const xe=[];for(let ie=0;ie<ve.length;ie+=1)xe.indexOf(ve[ie])===-1&&xe.push(ve[ie]);return xe}(oe))}function x(...V){let[K,Y,ne,oe]=V;function ve(Se){const P=Se.target;if(!P)return;const le=Se.target.dom7EventData||[];if(le.indexOf(Se)<0&&le.unshift(Se),A(P).is(Y))ne.apply(P,le);else{const ye=A(P).parents();for(let G=0;G<ye.length;G+=1)A(ye[G]).is(Y)&&ne.apply(ye[G],le)}}function xe(Se){const P=Se&&Se.target&&Se.target.dom7EventData||[];P.indexOf(Se)<0&&P.unshift(Se),ne.apply(this,P)}typeof V[1]=="function"&&([K,ne,oe]=V,Y=void 0),oe||(oe=!1);const ie=K.split(" ");let we;for(let Se=0;Se<this.length;Se+=1){const P=this[Se];if(Y)for(we=0;we<ie.length;we+=1){const le=ie[we];P.dom7LiveListeners||(P.dom7LiveListeners={}),P.dom7LiveListeners[le]||(P.dom7LiveListeners[le]=[]),P.dom7LiveListeners[le].push({listener:ne,proxyListener:ve}),P.addEventListener(le,ve,oe)}else for(we=0;we<ie.length;we+=1){const le=ie[we];P.dom7Listeners||(P.dom7Listeners={}),P.dom7Listeners[le]||(P.dom7Listeners[le]=[]),P.dom7Listeners[le].push({listener:ne,proxyListener:xe}),P.addEventListener(le,xe,oe)}}return this}function w(){for(let V=0;V<this.length;V+=1)this[V].style.display="none";return this}function O(...V){let K;const Y=b();for(let ne=0;ne<V.length;ne+=1){K=V[ne];for(let oe=0;oe<this.length;oe+=1)if(typeof K=="string"){const ve=Y.createElement("div");for(ve.innerHTML=K;ve.firstChild;)this[oe].appendChild(ve.firstChild)}else if(K instanceof _)for(let ve=0;ve<K.length;ve+=1)this[oe].appendChild(K[ve]);else this[oe].appendChild(K)}return this}A.fn=_.prototype;const S="resize scroll".split(" ");function C(V){return function(...K){if(K[0]===void 0){for(let Y=0;Y<this.length;Y+=1)S.indexOf(V)<0&&(V in this[Y]?this[Y][V]():A(this[Y]).trigger(V));return this}return this.on(V,...K)}}const E=C("click"),T=A;w&&(T.fn.hide=w),O&&(T.fn.append=O),E&&(T.fn.click=E),x&&(T.fn.on=x);const F=T;var D=function(){return D=Object.assign||function(V){for(var K,Y=1,ne=arguments.length;Y<ne;Y++)for(var oe in K=arguments[Y])Object.prototype.hasOwnProperty.call(K,oe)&&(V[oe]=K[oe]);return V},D.apply(this,arguments)},R=function(V,K,Y,ne){return new(Y||(Y=Promise))(function(oe,ve){function xe(Se){try{we(ne.next(Se))}catch(P){ve(P)}}function ie(Se){try{we(ne.throw(Se))}catch(P){ve(P)}}function we(Se){var P;Se.done?oe(Se.value):(P=Se.value,P instanceof Y?P:new Y(function(le){le(P)})).then(xe,ie)}we((ne=ne.apply(V,[])).next())})},L=function(V,K){var Y,ne,oe,ve,xe={label:0,sent:function(){if(1&oe[0])throw oe[1];return oe[1]},trys:[],ops:[]};return ve={next:ie(0),throw:ie(1),return:ie(2)},typeof Symbol=="function"&&(ve[Symbol.iterator]=function(){return this}),ve;function ie(we){return function(Se){return function(P){if(Y)throw new TypeError("Generator is already executing.");for(;xe;)try{if(Y=1,ne&&(oe=2&P[0]?ne.return:P[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,P[1])).done)return oe;switch(ne=0,oe&&(P=[2&P[0],oe.value]),P[0]){case 0:case 1:oe=P;break;case 4:return xe.label++,{value:P[1],done:!1};case 5:xe.label++,ne=P[1],P=[0];continue;case 7:P=xe.ops.pop(),xe.trys.pop();continue;default:if(!((oe=(oe=xe.trys).length>0&&oe[oe.length-1])||P[0]!==6&&P[0]!==2)){xe=0;continue}if(P[0]===3&&(!oe||P[1]>oe[0]&&P[1]<oe[3])){xe.label=P[1];break}if(P[0]===6&&xe.label<oe[1]){xe.label=oe[1],oe=P;break}if(oe&&xe.label<oe[2]){xe.label=oe[2],xe.ops.push(P);break}oe[2]&&xe.ops.pop(),xe.trys.pop();continue}P=K.call(V,xe)}catch(le){P=[6,le],ne=0}finally{Y=oe=0}if(5&P[0])throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}([we,Se])}}};function M(V){return V.getMenuConfig("uploadAttachment")}function X(V,K,Y){if(K&&Y){V.restoreSelection();var ne={type:"attachment",fileName:K,link:Y,children:[{text:""}]};V.insertNode(ne),V.move(1);var oe=M(V).onInsertedAttachment;oe&&oe(ne)}}function ee(V,K){return R(this,void 0,void 0,function(){var Y,ne,oe,ve;return L(this,function(xe){switch(xe.label){case 0:return Y=function(ie){var we=ae.get(ie);if(we!=null)return we;var Se=M(ie),P=Se.onSuccess,le=Se.onProgress,ye=Se.onFailed,G=Se.customInsert,J=Se.onError;return we=(0,s.createUploader)(D(D({},Se),{onProgress:function(fe){ie.showProgressBar(fe),le&&le(fe)},onSuccess:function(fe,se){if(G)G(se,fe,function(st,et){return X(ie,st,et)});else{var me=se.errno,ce=me===void 0?1:me,Fe=se.data,be=Fe===void 0?{}:Fe;if(ce!==0)return void ye(fe,se);var _e=be.url,Ve=_e===void 0?"":_e;X(ie,fe.name,Ve),P(fe,se)}},onError:function(fe,se,me){var ce=fe.name;J&&J(fe,se,me)}})),ae.set(ie,we),we}(V),ne=K.name,oe=K.type,ve=K.size,Y.addFile({name:ne,type:oe,size:ve,data:K}),[4,Y.upload()];case 1:return xe.sent(),[2]}})})}var ae=new WeakMap;const N=function(){function V(){this.title=(0,s.t)("attachment.upload"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M665.821116 327.053068l-64.958782-64.926783-324.79391 324.729911c-53.822991 53.790991-53.822991 141.053355 0 194.844347s141.053355 53.790991 194.876346 0l389.752692-389.688693a229.531696 229.531696 0 0 0 0-324.729912 229.627694 229.627694 0 0 0-324.761911 0L126.727224 476.458266l-0.863984 0.831985c-125.085655 125.085655-125.085655 327.833853 0 452.887508 125.053655 125.053655 327.865853 125.053655 452.983507 0l0.831984-0.863984 0.031999 0.032 279.322763-279.290764-64.990781-64.926782-279.322763 279.258764-0.831984 0.831984a228.731711 228.731711 0 0 1-323.065943 0 228.603714 228.603714 0 0 1 0-322.969944l0.895983-0.831985-0.031999-0.063998L600.958332 132.208721c53.694993-53.726993 141.149353-53.726993 194.876346 0s53.694993 141.149353 0 194.844347L406.081986 716.741761c-17.919664 17.919664-47.039118 17.919664-64.958782 0a45.983138 45.983138 0 0 1 0-64.926783L665.917114 327.053068z"></path></svg>',this.tag="button"}return V.prototype.getValue=function(K){return""},V.prototype.isActive=function(K){return!1},V.prototype.exec=function(K,Y){var ne=this.getMenuConfig(K),oe=ne.allowedFileTypes,ve=oe===void 0?[]:oe,xe=ne.customBrowseAndUpload;if(xe)xe(function(P,le){return X(K,P,le)});else{var ie="";ve.length>0&&(ie='accept="'.concat(ve.join(", "),'"'));var we=F("body"),Se=F('<input type="file" '.concat(ie," multiple/>"));Se.hide(),we.append(Se),Se.click(),Se.on("change",function(){var P=Se[0].files;(function(le,ye){var G,J;R(this,void 0,void 0,function(){var fe,se,me,ce,Fe,be;return L(this,function(_e){switch(_e.label){case 0:if(ye==null)return[2];fe=Array.prototype.slice.call(ye),se=M(le).customUpload,_e.label=1;case 1:_e.trys.push([1,9,10,15]),me=function(Ve){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var st,et=Ve[Symbol.asyncIterator];return et?et.call(Ve):(Ve=typeof __values=="function"?__values(Ve):Ve[Symbol.iterator](),st={},Et("next"),Et("throw"),Et("return"),st[Symbol.asyncIterator]=function(){return this},st);function Et(Bt){st[Bt]=Ve[Bt]&&function(bt){return new Promise(function(Kt,gt){(function(Ne,he,Ee,Te){Promise.resolve(Te).then(function(ze){Ne({value:ze,done:Ee})},he)})(Kt,gt,(bt=Ve[Bt](bt)).done,bt.value)})}}}(fe),_e.label=2;case 2:return[4,me.next()];case 3:return(ce=_e.sent()).done?[3,8]:(Fe=ce.value,se?[4,se(Fe,function(Ve,st){return X(le,Ve,st)})]:[3,5]);case 4:return _e.sent(),[3,7];case 5:return[4,ee(le,Fe)];case 6:_e.sent(),_e.label=7;case 7:return[3,2];case 8:return[3,15];case 9:return be=_e.sent(),G={error:be},[3,15];case 10:return _e.trys.push([10,,13,14]),ce&&!ce.done&&(J=me.return)?[4,J.call(me)]:[3,12];case 11:_e.sent(),_e.label=12;case 12:return[3,14];case 13:if(G)throw G.error;return[7];case 14:return[7];case 15:return[2]}})})})(K,P)})}},V.prototype.isDisabled=function(K){var Y=K.selection;if(Y==null||s.SlateRange.isExpanded(Y))return!0;var ne=s.DomEditor.getSelectedElems(K);return!!ne.some(function(oe){return K.isVoid(oe)})||!!ne.some(function(oe){return s.DomEditor.getNodeType(oe)==="pre"})},V.prototype.getMenuConfig=function(K){return K.getMenuConfig("uploadAttachment")},V}(),j=function(){function V(){this.title=(0,s.t)("attachment.download"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M736 448l-256 256-256-256h160V64h192v384z m-256 256H0v256h960v-256H480z m416 128h-128v-64h128v64z"></path></svg>',this.tag="button",this.alwaysEnable=!0}return V.prototype.getValue=function(K){var Y=this.getSelectedElem(K);return Y==null?"":Y.link},V.prototype.isActive=function(K){return!1},V.prototype.exec=function(K,Y){Y&&typeof Y=="string"&&window.open(Y,"_blank")},V.prototype.isDisabled=function(K){var Y=K.selection;return Y==null||!!s.SlateRange.isExpanded(Y)||this.getSelectedElem(K)==null},V.prototype.getSelectedElem=function(K){var Y=s.DomEditor.getSelectedNodeByType(K,"attachment");return Y??null},V}(),q={editorPlugin:function(V){var K=V.isInline,Y=V.isVoid,ne=V;return ne.isInline=function(oe){return s.DomEditor.getNodeType(oe)==="attachment"||K(oe)},ne.isVoid=function(oe){return s.DomEditor.getNodeType(oe)==="attachment"||Y(oe)},ne},renderElems:[p],elemsToHtml:[{type:"attachment",elemToHtml:function(V,K){var Y=V,ne=Y.link,oe=ne===void 0?"":ne,ve=Y.fileName,xe=ve===void 0?"":ve;return'<a data-w-e-type="attachment" data-w-e-is-void data-w-e-is-inline href="'.concat(oe,'" download="').concat(xe,'">').concat(xe,"</a>")}}],parseElemsHtml:[{selector:'a[data-w-e-type="attachment"]',parseElemHtml:function(V,K,Y){return{type:"attachment",link:V.getAttribute("href")||"",fileName:V.getAttribute("download")||"",children:[{text:""}]}}}],menus:[{key:"uploadAttachment",factory:function(){return new N},config:{server:"",fieldName:"wangeditor-uploaded-attachment",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(V){return V},onProgress:function(V){},onSuccess:function(V,K){},onFailed:function(V,K){},onError:function(V,K,Y){},onInsertedAttachment:function(V){}}},{key:"downloadAttachment",factory:function(){return new j}}]}})(),a})())})(SG);var MEe=SG.exports;const LEe=dE(MEe),zEe=(e,t={})=>{_J(t);const n=Object.assign({"./JwtCascaderArea/index.vue":FJ,"./JwtCascaderServer/index.vue":IJ,"./JwtColumnItme/components/ColumnDateTimeFormat.vue":C7,"./JwtColumnItme/components/ColumnDefault.vue":S7,"./JwtColumnItme/components/ColumnFile.vue":x7,"./JwtColumnItme/components/ColumnHtml.vue":E7,"./JwtColumnItme/components/ColumnImg.vue":B7,"./JwtColumnItme/components/ColumnImgAdd.vue":D7,"./JwtColumnItme/components/ColumnImgs.vue":T7,"./JwtColumnItme/components/ColumnLink.vue":A7,"./JwtColumnItme/components/ColumnTag.vue":O7,"./JwtColumnItme/components/ColumnTagList.vue":F7,"./JwtColumnItme/components/ColumnText.vue":Ok,"./JwtColumnItme/components/ColumnVideo.vue":P7,"./JwtColumnItme/index.vue":gY,"./JwtCount/index.vue":yY,"./JwtCropper/index.vue":hX,"./JwtCropperDialog/index.vue":vX,"./JwtDesHeader/index.vue":Yk,"./JwtDesInfo/index.vue":xX,"./JwtDesTable/index.vue":DX,"./JwtDetailDrawer/index.vue":oZ,"./JwtDialogForm/index.vue":pZ,"./JwtEditor/index.vue":ASe,"./JwtEmojiSelect/index.vue":RSe,"./JwtFileIcon/index.vue":ISe,"./JwtFileUpload/index.vue":oxe,"./JwtForm/components/FormLabel.vue":uxe,"./JwtForm/index.vue":pxe,"./JwtFormItem/components/FormAutocomplete.vue":kW,"./JwtFormItem/components/FormCascader.vue":hE,"./JwtFormItem/components/FormCascaderPanel.vue":wW,"./JwtFormItem/components/FormCheckbox.vue":_W,"./JwtFormItem/components/FormColorPicker.vue":CW,"./JwtFormItem/components/FormDatePicker.vue":pE,"./JwtFormItem/components/FormDivider.vue":gE,"./JwtFormItem/components/FormEditInput.vue":mE,"./JwtFormItem/components/FormInput.vue":vE,"./JwtFormItem/components/FormInputHidden.vue":SW,"./JwtFormItem/components/FormInputSelect.vue":xW,"./JwtFormItem/components/FormNumberInput.vue":yE,"./JwtFormItem/components/FormRadio.vue":EW,"./JwtFormItem/components/FormRate.vue":BW,"./JwtFormItem/components/FormSelect.vue":DW,"./JwtFormItem/components/FormSlider.vue":TW,"./JwtFormItem/components/FormSwitch.vue":bE,"./JwtFormItem/components/FormTabs.vue":AW,"./JwtFormItem/components/FormTimePicker.vue":kE,"./JwtFormItem/components/FormTimeSelect.vue":OW,"./JwtFormItem/components/FormTips.vue":FW,"./JwtFormItem/components/FormTransfer.vue":PW,"./JwtFormItem/index.vue":bxe,"./JwtHeaderButton/index.vue":Exe,"./JwtIcon/index.vue":Oxe,"./JwtIconSelect/index.vue":Nxe,"./JwtImage/index.vue":Vxe,"./JwtInput/index.vue":qxe,"./JwtMaterial/index.vue":F5e,"./JwtMaterialItemMask/index.vue":Jxe,"./JwtPrefixSuffix/index.vue":I5e,"./JwtRateIcon/index.vue":z5e,"./JwtSelectServer/index.vue":i8e,"./JwtTable/components/tableColumnHeader.vue":r8e,"./JwtTable/components/tableContentControl.vue":Z8e,"./JwtTable/components/tableFieldControl.vue":Q8e,"./JwtTable/components/tableListContent.vue":$8e,"./JwtTable/components/tableListContentVirtualized.vue":a9e,"./JwtTable/components/tableSizeSetting.vue":s9e,"./JwtTable/index copy.vue":g9e,"./JwtTable/index.vue":C9e,"./JwtTableButton/components/ActionButton.vue":kxe,"./JwtTableButton/index.vue":i9e,"./JwtTableOnly/index.vue":O9e,"./JwtTableV2/index.vue":q9e,"./JwtTabs/index.vue":G9e,"./JwtTags/index.vue":Z9e,"./JwtTree/components/TreeNode.vue":nEe,"./JwtTree/components/TreeNodeTitle.vue":$9e,"./JwtTree/index.vue":oEe,"./JwtUploadFile/index.vue":uEe,"./JwtUploadImage/components/fileSlot.vue":pEe,"./JwtUploadImage/components/pasteUpload.vue":QSe,"./JwtUploadImage/index.vue":bEe,"./JwtUploadVideo/index.vue":jEe});for(const i in n){const r=n[i];r.default.name&&e.component(r.default.name,r.default||r)}e.directive("jwt-observe-viewport",REe)};yi.registerModule(LEe);function xG(e){return e&&e.__esModule?e.default:e}function go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mk,kt,EG,Pm,BG,DG,vk={},TG=[],VEe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function _l(e,t){for(var n in t)e[n]=t[n];return e}function AG(e){var t=e.parentNode;t&&t.removeChild(e)}function HE(e,t,n){var i,r,o,a={};for(o in t)o=="key"?i=t[o]:o=="ref"?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?mk.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return yk(e,a,i,r,null)}function yk(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++EG};return r==null&&kt.vnode!=null&&kt.vnode(o),o}function Ja(){return{current:null}}function bd(e){return e.children}function ma(e,t){this.props=e,this.context=t}function kd(e,t){if(t==null)return e.__?kd(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?kd(e):null}function OG(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return OG(e)}}function FG(e){(!e.__d&&(e.__d=!0)&&Pm.push(e)&&!bk.__r++||DG!==kt.debounceRendering)&&((DG=kt.debounceRendering)||BG)(bk)}function bk(){for(var e;bk.__r=Pm.length;)e=Pm.sort(function(t,n){return t.__v.__b-n.__v.__b}),Pm=[],e.some(function(t){var n,i,r,o,a,s;t.__d&&(a=(o=(n=t).__v).__e,(s=n.__P)&&(i=[],(r=_l({},o)).__v=o.__v+1,qE(s,o,r,n.__n,s.ownerSVGElement!==void 0,o.__h!=null?[a]:null,i,a??kd(o),o.__h),LG(i,o),o.__e!=a&&OG(o)))})}function PG(e,t,n,i,r,o,a,s,u,c){var f,d,h,p,m,v,y,b=i&&i.__k||TG,g=b.length;for(n.__k=[],f=0;f<t.length;f++)if((p=n.__k[f]=(p=t[f])==null||typeof p=="boolean"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?yk(null,p,null,null,p):Array.isArray(p)?yk(bd,{children:p},null,null,null):p.__b>0?yk(p.type,p.props,p.key,null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(h=b[f])===null||h&&p.key==h.key&&p.type===h.type)b[f]=void 0;else for(d=0;d<g;d++){if((h=b[d])&&p.key==h.key&&p.type===h.type){b[d]=void 0;break}h=null}qE(e,p,h=h||vk,r,o,a,s,u,c),m=p.__e,(d=p.ref)&&h.ref!=d&&(y||(y=[]),h.ref&&y.push(h.ref,null,p),y.push(d,p.__c||m,p)),m!=null?(v==null&&(v=m),typeof p.type=="function"&&p.__k===h.__k?p.__d=u=jG(p,u,e):u=RG(e,p,h,b,m,u),typeof n.type=="function"&&(n.__d=u)):u&&h.__e==u&&u.parentNode!=e&&(u=kd(h))}for(n.__e=v,f=g;f--;)b[f]!=null&&(typeof n.type=="function"&&b[f].__e!=null&&b[f].__e==n.__d&&(n.__d=kd(i,f+1)),VG(b[f],b[f]));if(y)for(f=0;f<y.length;f++)zG(y[f],y[++f],y[++f])}function jG(e,t,n){for(var i,r=e.__k,o=0;r&&o<r.length;o++)(i=r[o])&&(i.__=e,t=typeof i.type=="function"?jG(i,t,n):RG(n,i,i,r,i.__e,t));return t}function kk(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){kk(n,t)}):t.push(e)),t}function RG(e,t,n,i,r,o){var a,s,u;if(t.__d!==void 0)a=t.__d,t.__d=void 0;else if(n==null||r!=o||r.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(r),a=null;else{for(s=o,u=0;(s=s.nextSibling)&&u<i.length;u+=2)if(s==r)break e;e.insertBefore(r,o),a=o}return a!==void 0?a:r.nextSibling}function UEe(e,t,n,i,r){var o;for(o in n)o==="children"||o==="key"||o in t||wk(e,o,null,n[o],i);for(o in t)r&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||wk(e,o,t[o],n[o],i)}function IG(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||VEe.test(t)?n:n+"px"}function wk(e,t,n,i,r){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||IG(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||IG(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i||e.addEventListener(t,o?MG:NG,o):e.removeEventListener(t,o?MG:NG,o);else if(t!=="dangerouslySetInnerHTML"){if(r)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function NG(e){this.l[e.type+!1](kt.event?kt.event(e):e)}function MG(e){this.l[e.type+!0](kt.event?kt.event(e):e)}function qE(e,t,n,i,r,o,a,s,u){var c,f,d,h,p,m,v,y,b,g,k,_=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(u=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=kt.__b)&&c(t);try{e:if(typeof _=="function"){if(y=t.props,b=(c=_.contextType)&&i[c.__c],g=c?b?b.props.value:c.__:i,n.__c?v=(f=t.__c=n.__c).__=f.__E:("prototype"in _&&_.prototype.render?t.__c=f=new _(y,g):(t.__c=f=new ma(y,g),f.constructor=_,f.render=qEe),b&&b.sub(f),f.props=y,f.state||(f.state={}),f.context=g,f.__n=i,d=f.__d=!0,f.__h=[]),f.__s==null&&(f.__s=f.state),_.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=_l({},f.__s)),_l(f.__s,_.getDerivedStateFromProps(y,f.__s))),h=f.props,p=f.state,d)_.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_.getDerivedStateFromProps==null&&y!==h&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(y,g),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(y,f.__s,g)===!1||t.__v===n.__v){f.props=y,f.state=f.__s,t.__v!==n.__v&&(f.__d=!1),f.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),f.__h.length&&a.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(y,f.__s,g),f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(h,p,m)})}f.context=g,f.props=y,f.state=f.__s,(c=kt.__r)&&c(t),f.__d=!1,f.__v=t,f.__P=e,c=f.render(f.props,f.state,f.context),f.state=f.__s,f.getChildContext!=null&&(i=_l(_l({},i),f.getChildContext())),d||f.getSnapshotBeforeUpdate==null||(m=f.getSnapshotBeforeUpdate(h,p)),k=c!=null&&c.type===bd&&c.key==null?c.props.children:c,PG(e,Array.isArray(k)?k:[k],t,n,i,r,o,a,s,u),f.base=t.__e,t.__h=null,f.__h.length&&a.push(f),v&&(f.__E=f.__=null),f.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=HEe(n.__e,t,n,i,r,o,a,u);(c=kt.diffed)&&c(t)}catch(A){t.__v=null,(u||o!=null)&&(t.__e=s,t.__h=!!u,o[o.indexOf(s)]=null),kt.__e(A,t,n)}}function LG(e,t){kt.__c&&kt.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){kt.__e(i,n.__v)}})}function HEe(e,t,n,i,r,o,a,s){var u,c,f,d=n.props,h=t.props,p=t.type,m=0;if(p==="svg"&&(r=!0),o!=null){for(;m<o.length;m++)if((u=o[m])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,o[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=r?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),o=null,s=!1}if(p===null)d===h||s&&e.data===h||(e.data=h);else{if(o=o&&mk.call(e.childNodes),c=(d=n.props||vk).dangerouslySetInnerHTML,f=h.dangerouslySetInnerHTML,!s){if(o!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(f||c)&&(f&&(c&&f.__html==c.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(UEe(e,h,d,r,s),f)t.__k=[];else if(m=t.props.children,PG(e,Array.isArray(m)?m:[m],t,n,i,r&&p!=="foreignObject",o,a,o?o[0]:n.__k&&kd(n,0),s),o!=null)for(m=o.length;m--;)o[m]!=null&&AG(o[m]);s||("value"in h&&(m=h.value)!==void 0&&(m!==d.value||m!==e.value||p==="progress"&&!m)&&wk(e,"value",m,d.value,!1),"checked"in h&&(m=h.checked)!==void 0&&m!==e.checked&&wk(e,"checked",m,d.checked,!1))}return e}function zG(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(i){kt.__e(i,n)}}function VG(e,t,n){var i,r;if(kt.unmount&&kt.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||zG(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){kt.__e(o,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&VG(i[r],t,typeof e.type!="function");n||e.__e==null||AG(e.__e),e.__e=e.__d=void 0}function qEe(e,t,n){return this.constructor(e,n)}function UG(e,t,n){var i,r,o;kt.__&&kt.__(e,t),r=(i=typeof n=="function")?null:n&&n.__k||t.__k,o=[],qE(t,e=(!i&&n||t).__k=HE(bd,null,[e]),r||vk,vk,t.ownerSVGElement!==void 0,!i&&n?[n]:r?null:t.firstChild?mk.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i),LG(o,e)}mk=TG.slice,kt={__e:function(e,t){for(var n,i,r;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),r=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),r=n.__d),r)return n.__E=n}catch(o){e=o}throw e}},EG=0,ma.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=_l({},this.state),typeof e=="function"&&(e=e(_l({},n),this.props)),e&&_l(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),FG(this))},ma.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),FG(this))},ma.prototype.render=bd,Pm=[],BG=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,bk.__r=0;var KEe=0;function Ue(e,t,n,i,r){var o,a,s={};for(a in t)a=="ref"?o=t[a]:s[a]=t[a];var u={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--KEe,__source:i,__self:r};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)s[a]===void 0&&(s[a]=o[a]);return kt.vnode&&kt.vnode(u),u}function WEe(e,t){try{window.localStorage[`emoji-mart.${e}`]=JSON.stringify(t)}catch{}}function GEe(e){try{const t=window.localStorage[`emoji-mart.${e}`];if(t)return JSON.parse(t)}catch{}}var Ya={set:WEe,get:GEe};const KE=new Map,JEe=[{v:15,emoji:"🫨"},{v:14,emoji:"🫠"},{v:13.1,emoji:"😶‍🌫️"},{v:13,emoji:"🥸"},{v:12.1,emoji:"🧑‍🦰"},{v:12,emoji:"🥱"},{v:11,emoji:"🥰"},{v:5,emoji:"🤩"},{v:4,emoji:"👱‍♀️"},{v:3,emoji:"🤣"},{v:2,emoji:"👋🏻"},{v:1,emoji:"🙃"}];function YEe(){for(const{v:e,emoji:t}of JEe)if(HG(t))return e}function XEe(){return!HG("🇨🇦")}function HG(e){if(KE.has(e))return KE.get(e);const t=ZEe(e);return KE.set(e,t),t}const ZEe=(()=>{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const t=25,n=20,i=Math.floor(t/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=n*2,e.canvas.height=t,r=>{e.clearRect(0,0,n*2,t),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,n,22);const o=e.getImageData(0,0,n,t).data,a=o.length;let s=0;for(;s<a&&!o[s+3];s+=4);if(s>=a)return!1;const u=n+s/4%n,c=Math.floor(s/4/n),f=e.getImageData(u,c,1,1).data;return!(o[s]!==f[0]||o[s+2]!==f[2]||e.measureText(r).width>=n)}})();var qG={latestVersion:YEe,noCountryFlags:XEe};const WE=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Wi=null;function QEe(e){Wi||(Wi=Ya.get("frequently")||{});const t=e.id||e;t&&(Wi[t]||(Wi[t]=0),Wi[t]+=1,Ya.set("last",t),Ya.set("frequently",Wi))}function $Ee({maxFrequentRows:e,perLine:t}){if(!e)return[];Wi||(Wi=Ya.get("frequently"));let n=[];if(!Wi){Wi={};for(let o in WE.slice(0,t)){const a=WE[o];Wi[a]=t-o,n.push(a)}return n}const i=e*t,r=Ya.get("last");for(let o in Wi)n.push(o);if(n.sort((o,a)=>{const s=Wi[a],u=Wi[o];return s==u?o.localeCompare(a):s-u}),n.length>i){const o=n.slice(i);n=n.slice(0,i);for(let a of o)a!=r&&delete Wi[a];r&&n.indexOf(r)==-1&&(delete Wi[n[n.length-1]],n.splice(-1,1,r)),Ya.set("frequently",Wi)}return n}var GE={add:QEe,get:$Ee,DEFAULTS:WE},KG={};KG=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Xa={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Gi=null,Jt=null;const JE={};async function WG(e){if(JE[e])return JE[e];const n=await(await fetch(e)).json();return JE[e]=n,n}let YE=null,GG=null,JG=!1;function jm(e,{caller:t}={}){return YE||(YE=new Promise(n=>{GG=n})),e&&e7e(e),YE}async function e7e(e){JG=!0;let{emojiVersion:t,set:n,locale:i}=e;if(t||(t=Xa.emojiVersion.value),n||(n=Xa.set.value),i||(i=Xa.locale.value),Jt)Jt.categories=Jt.categories.filter(u=>!u.name);else{Jt=(typeof e.data=="function"?await e.data():e.data)||await WG(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${n}.json`),Jt.emoticons={},Jt.natives={},Jt.categories.unshift({id:"frequent",emojis:[]});for(const u in Jt.aliases){const c=Jt.aliases[u],f=Jt.emojis[c];f&&(f.aliases||(f.aliases=[]),f.aliases.push(u))}Jt.originalCategories=Jt.categories}if(Gi=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?xG(KG):await WG(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let u in e.custom){u=parseInt(u);const c=e.custom[u],f=e.custom[u-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${u+1}`),c.name||(c.name=Gi.categories.custom),f&&!c.icon&&(c.target=f.target||f),Jt.categories.push(c);for(const d of c.emojis)Jt.emojis[d.id]=d}}e.categories&&(Jt.categories=Jt.originalCategories.filter(u=>e.categories.indexOf(u.id)!=-1).sort((u,c)=>{const f=e.categories.indexOf(u.id),d=e.categories.indexOf(c.id);return f-d}));let r=null,o=null;n=="native"&&(r=qG.latestVersion(),o=e.noCountryFlags||qG.noCountryFlags());let a=Jt.categories.length,s=!1;for(;a--;){const u=Jt.categories[a];if(u.id=="frequent"){let{maxFrequentRows:d,perLine:h}=e;d=d>=0?d:Xa.maxFrequentRows.value,h||(h=Xa.perLine.value),u.emojis=GE.get({maxFrequentRows:d,perLine:h})}if(!u.emojis||!u.emojis.length){Jt.categories.splice(a,1);continue}const{categoryIcons:c}=e;if(c){const d=c[u.id];d&&!u.icon&&(u.icon=d)}let f=u.emojis.length;for(;f--;){const d=u.emojis[f],h=d.id?d:Jt.emojis[d],p=()=>{u.emojis.splice(f,1)};if(!h||e.exceptEmojis&&e.exceptEmojis.includes(h.id)){p();continue}if(r&&h.version>r){p();continue}if(o&&u.id=="flags"&&!ZG.includes(h.id)){p();continue}if(!h.search){if(s=!0,h.search=","+[[h.id,!1],[h.name,!0],[h.keywords,!1],[h.emoticons,!1]].map(([v,y])=>{if(v)return(Array.isArray(v)?v:[v]).map(b=>(y?b.split(/[-|_|\s]+/):[b]).map(g=>g.toLowerCase())).flat()}).flat().filter(v=>v&&v.trim()).join(","),h.emoticons)for(const v of h.emoticons)Jt.emoticons[v]||(Jt.emoticons[v]=h.id);let m=0;for(const v of h.skins){if(!v)continue;m++;const{native:y}=v;y&&(Jt.natives[y]=h.id,h.search+=`,${y}`);const b=m==1?"":`:skin-tone-${m}:`;v.shortcodes=`:${h.id}:${b}`}}}}s&&of.reset(),GG()}function YG(e,t,n){e||(e={});const i={};for(let r in t)i[r]=XG(r,e,t,n);return i}function XG(e,t,n,i){const r=n[e];let o=i&&i.getAttribute(e)||(t[e]!=null&&t[e]!=null?t[e]:null);return r&&(o!=null&&r.value&&typeof r.value!=typeof o&&(typeof r.value=="boolean"?o=o!="false":o=r.value.constructor(o)),r.transform&&o&&(o=r.transform(o)),(o==null||r.choices&&r.choices.indexOf(o)==-1)&&(o=r.value)),o}const t7e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let XE=null;function n7e(e){return e.id?e:Jt.emojis[e]||Jt.emojis[Jt.aliases[e]]||Jt.emojis[Jt.natives[e]]}function i7e(){XE=null}async function r7e(e,{maxResults:t,caller:n}={}){if(!e||!e.trim().length)return null;t||(t=90),await jm(null,{caller:n||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((s,u,c)=>s.trim()&&c.indexOf(s)==u);if(!i.length)return;let r=XE||(XE=Object.values(Jt.emojis)),o,a;for(const s of i){if(!r.length)break;o=[],a={};for(const u of r){if(!u.search)continue;const c=u.search.indexOf(`,${s}`);c!=-1&&(o.push(u),a[u.id]||(a[u.id]=0),a[u.id]+=u.id==s?0:c+1)}r=o}return o.length<2||(o.sort((s,u)=>{const c=a[s.id],f=a[u.id];return c==f?s.id.localeCompare(u.id):c-f}),o.length>t&&(o=o.slice(0,t))),o}var of={search:r7e,get:n7e,reset:i7e,SHORTCODES_REGEX:t7e};const ZG=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function o7e(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((n,i)=>n==t[i])}async function a7e(e=1){for(let t in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function s7e(e,{skinIndex:t=0}={}){const n=e.skins[t]||(t=0,e.skins[t]),i={id:e.id,name:e.name,native:n.native,unified:n.unified,keywords:e.keywords,shortcodes:n.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=t+1),n.src&&(i.src=n.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}var _k={categories:{activity:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ue("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Ue("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ue("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ue("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Ue("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Ue("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Ue("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Ue("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Ue("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Ue("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Ue("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ue("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},search:{loupe:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ue("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ue("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})}};function ZE(e){let{id:t,skin:n,emoji:i}=e;if(e.shortcodes){const s=e.shortcodes.match(of.SHORTCODES_REGEX);s&&(t=s[1],s[2]&&(n=s[2]))}if(i||(i=of.get(t||e.native)),!i)return e.fallback;const r=i.skins[n-1]||i.skins[0],o=r.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${r.unified}.png`:void 0),a=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return Ue("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:o?Ue("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:o}):e.set=="native"?Ue("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):Ue("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${a})`,backgroundSize:`${100*Jt.sheet.cols}% ${100*Jt.sheet.rows}%`,backgroundPosition:`${100/(Jt.sheet.cols-1)*r.x}% ${100/(Jt.sheet.rows-1)*r.y}%`}})})}const l7e=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class QG extends l7e{static get observedAttributes(){return Object.keys(this.Props)}update(t={}){for(let n in t)this.attributeChangedCallback(n,null,t[n])}attributeChangedCallback(t,n,i){if(!this.component)return;const r=XG(t,{[t]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[t]:r}):(this.component.props[t]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(t={}){if(super(),this.props=t,t.parent||t.ref){let n=null;const i=t.parent||(n=t.ref&&t.ref.current);n&&(n.innerHTML=""),i&&i.appendChild(this)}}}class u7e extends QG{setShadow(){this.attachShadow({mode:"open"})}injectStyles(t){if(!t)return;const n=document.createElement("style");n.textContent=t,this.shadowRoot.insertBefore(n,this.shadowRoot.firstChild)}constructor(t,{styles:n}={}){super(t),this.setShadow(),this.injectStyles(n)}}var $G={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:Xa.set,skin:Xa.skin};class QE extends QG{async connectedCallback(){const t=YG(this.props,$G,this);t.element=this,t.ref=n=>{this.component=n},await jm(),!this.disconnected&&UG(Ue(ZE,{...t}),this)}constructor(t){super(t)}}go(QE,"Props",$G),typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",QE);var eJ,$E=[],tJ=kt.__b,nJ=kt.__r,iJ=kt.diffed,rJ=kt.__c,oJ=kt.unmount;function f7e(){var e;for($E.sort(function(t,n){return t.__v.__b-n.__v.__b});e=$E.pop();)if(e.__P)try{e.__H.__h.forEach(Ck),e.__H.__h.forEach(e7),e.__H.__h=[]}catch(t){e.__H.__h=[],kt.__e(t,e.__v)}}kt.__b=function(e){tJ&&tJ(e)},kt.__r=function(e){nJ&&nJ(e);var t=e.__c.__H;t&&(t.__h.forEach(Ck),t.__h.forEach(e7),t.__h=[])},kt.diffed=function(e){iJ&&iJ(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&($E.push(t)!==1&&eJ===kt.requestAnimationFrame||((eJ=kt.requestAnimationFrame)||function(n){var i,r=function(){clearTimeout(o),aJ&&cancelAnimationFrame(i),setTimeout(n)},o=setTimeout(r,100);aJ&&(i=requestAnimationFrame(r))})(f7e))},kt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ck),n.__h=n.__h.filter(function(i){return!i.__||e7(i)})}catch(i){t.some(function(r){r.__h&&(r.__h=[])}),t=[],kt.__e(i,n.__v)}}),rJ&&rJ(e,t)},kt.unmount=function(e){oJ&&oJ(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{Ck(i)}catch(r){t=r}}),t&&kt.__e(t,n.__v))};var aJ=typeof requestAnimationFrame=="function";function Ck(e){var t=e.__c;typeof t=="function"&&(e.__c=void 0,t())}function e7(e){e.__c=e.__()}function c7e(e,t){for(var n in t)e[n]=t[n];return e}function sJ(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var i in t)if(i!=="__source"&&e[i]!==t[i])return!0;return!1}function Sk(e){this.props=e}(Sk.prototype=new ma).isPureReactComponent=!0,Sk.prototype.shouldComponentUpdate=function(e,t){return sJ(this.props,e)||sJ(this.state,t)};var lJ=kt.__b;kt.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),lJ&&lJ(e)};var d7e=kt.__e;kt.__e=function(e,t,n){if(e.then){for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}d7e(e,t,n)};var uJ=kt.unmount;function t7(){this.__u=0,this.t=null,this.__b=null}function fJ(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function xk(){this.u=null,this.o=null}kt.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),uJ&&uJ(e)},(t7.prototype=new ma).__c=function(e,t){var n=t.__c,i=this;i.t==null&&(i.t=[]),i.t.push(n);var r=fJ(i.__v),o=!1,a=function(){o||(o=!0,n.__R=null,r?r(s):s())};n.__R=a;var s=function(){if(!--i.__u){if(i.state.__e){var c=i.state.__e;i.__v.__k[0]=function d(h,p,m){return h&&(h.__v=null,h.__k=h.__k&&h.__k.map(function(v){return d(v,p,m)}),h.__c&&h.__c.__P===p&&(h.__e&&m.insertBefore(h.__e,h.__d),h.__c.__e=!0,h.__c.__P=m)),h}(c,c.__c.__P,c.__c.__O)}var f;for(i.setState({__e:i.__b=null});f=i.t.pop();)f.forceUpdate()}},u=t.__h===!0;i.__u++||u||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(a,a)},t7.prototype.componentWillUnmount=function(){this.t=[]},t7.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function o(a,s,u){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),a.__c.__H=null),(a=c7e({},a)).__c!=null&&(a.__c.__P===u&&(a.__c.__P=s),a.__c=null),a.__k=a.__k&&a.__k.map(function(c){return o(c,s,u)})),a}(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__e&&HE(bd,null,e.fallback);return r&&(r.__h=null),[HE(bd,null,t.__e?null:e.children),r]};var cJ=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(xk.prototype=new ma).__e=function(e){var t=this,n=fJ(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),cJ(t,e,i)):r()};n?n(o):o()}},xk.prototype.render=function(e){this.u=null,this.o=new Map;var t=kk(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},xk.prototype.componentDidUpdate=xk.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){cJ(e,n,t)})};var h7e=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,p7e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,g7e=typeof document<"u",m7e=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};ma.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ma.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var dJ=kt.event;function v7e(){}function y7e(){return this.cancelBubble}function b7e(){return this.defaultPrevented}kt.event=function(e){return dJ&&(e=dJ(e)),e.persist=v7e,e.isPropagationStopped=y7e,e.isDefaultPrevented=b7e,e.nativeEvent=e};var hJ={configurable:!0,get:function(){return this.class}},pJ=kt.vnode;kt.vnode=function(e){var t=e.type,n=e.props,i=n;if(typeof t=="string"){var r=t.indexOf("-")===-1;for(var o in i={},n){var a=n[o];g7e&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&a==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!m7e(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():r&&p7e.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():a===null&&(a=void 0),i[o]=a)}t=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=kk(n.children).forEach(function(s){s.props.selected=i.value.indexOf(s.props.value)!=-1})),t=="select"&&i.defaultValue!=null&&(i.value=kk(n.children).forEach(function(s){s.props.selected=i.multiple?i.defaultValue.indexOf(s.props.value)!=-1:i.defaultValue==s.props.value})),e.props=i,n.class!=n.className&&(hJ.enumerable="className"in n,n.className!=null&&(i.class=n.className),Object.defineProperty(i,"className",hJ))}e.$$typeof=h7e,pJ&&pJ(e)};var gJ=kt.__r;kt.__r=function(e){gJ&&gJ(e),e.__c};const k7e={light:"outline",dark:"solid"};class w7e extends Sk{renderIcon(t){const{icon:n}=t;if(n){if(n.svg)return Ue("span",{class:"flex",dangerouslySetInnerHTML:{__html:n.svg}});if(n.src)return Ue("img",{src:n.src})}const i=_k.categories[t.id]||_k.categories.custom,r=this.props.icons=="auto"?k7e[this.props.theme]:this.props.icons;return i[r]||i}render(){let t=null;return Ue("nav",{id:"nav",class:"padding","data-position":this.props.position,dir:this.props.dir,children:Ue("div",{class:"flex relative",children:[this.categories.map((n,i)=>{const r=n.name||Gi.categories[n.id],o=!this.props.unfocused&&n.id==this.state.categoryId;return o&&(t=i),Ue("button",{"aria-label":r,"aria-selected":o||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:a=>a.preventDefault(),onClick:()=>{this.props.onClick({category:n,i})},children:this.renderIcon(n)})}),Ue("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:t==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${t*100}%)`:`translateX(${t*100}%)`}})]})})}constructor(){super(),this.categories=Jt.categories.filter(t=>!t.target),this.state={categoryId:this.categories[0].id}}}class _7e extends Sk{shouldComponentUpdate(t){for(let n in t)if(n!="children"&&t[n]!=this.props[n])return!0;return!1}render(){return this.props.children}}const Ek={rowsPerRender:10};class C7e extends ma{getInitialState(t=this.props){return{skin:Ya.get("skin")||t.skin,theme:this.initTheme(t.theme)}}componentWillMount(){this.dir=Gi.rtl?"rtl":"ltr",this.refs={menu:Ja(),navigation:Ja(),scroll:Ja(),search:Ja(),searchInput:Ja(),skinToneButton:Ja(),skinToneRadio:Ja()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:t}=this.refs;t.current&&t.current.focus()}}componentWillReceiveProps(t){this.nextState||(this.nextState={});for(const n in t)this.nextState[n]=t[n];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let n=!1;for(const r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(n=!0);delete this.nextState;const i=this.getInitialState();if(n)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(t={}){await jm(this.props),this.initGrid(),this.unobserve(),this.setState(t,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var t;document.removeEventListener("click",this.handleClickOutside),(t=this.darkMedia)==null||t.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:t=[]}={}){Array.isArray(t)||(t=[t]);for(const n of this.observers)t.includes(n)||n.disconnect();this.observers=[].concat(t)}initGrid(){const{categories:t}=Jt;this.refs.categories=new Map;const n=Jt.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=n&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=n,this.grid=[],this.grid.setsize=0;const i=(r,o)=>{const a=[];a.__categoryId=o.id,a.__index=r.length,this.grid.push(a);const s=this.grid.length-1,u=s%Ek.rowsPerRender?{}:Ja();return u.index=s,u.posinset=this.grid.setsize+1,r.push(u),a};for(let r of t){const o=[];let a=i(o,r);for(let s of r.emojis)a.length==this.getPerLine()&&(a=i(o,r)),this.grid.setsize+=1,a.push(s);this.refs.categories.set(r.id,{root:Ja(),rows:o})}}initTheme(t){if(t!="auto")return t;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(t=this.props){if(!t.dynamicWidth)return;const{element:n,emojiButtonSize:i}=t,r=()=>{const{width:a}=n.getBoundingClientRect();return Math.floor(a/i)},o=new ResizeObserver(()=>{this.unobserve({except:o}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return o.observe(n),this.observers.push(o),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([t,n]){const i=this.state.searchResults||this.grid,r=i[t]&&i[t][n];if(r)return of.get(r)}observeCategories(){const t=this.refs.navigation.current;if(!t)return;const n=new Map,i=a=>{a!=t.state.categoryId&&t.setState({categoryId:a})},r={root:this.refs.scroll.current,threshold:[0,1]},o=new IntersectionObserver(a=>{for(const u of a){const c=u.target.dataset.id;n.set(c,u.intersectionRatio)}const s=[...n];for(const[u,c]of s)if(c){i(u);break}},r);for(const{root:a}of this.refs.categories.values())o.observe(a.current);this.observers.push(o)}observeRows(){const t={...this.state.visibleRows},n=new IntersectionObserver(i=>{for(const r of i){const o=parseInt(r.target.dataset.index);r.isIntersecting?t[o]=!0:delete t[o]}this.setState({visibleRows:t})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(Ek.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*Ek.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const r of i)r.current&&n.observe(r.current);this.observers.push(n)}preventDefault(t){t.preventDefault()}unfocusSearch(){const t=this.refs.searchInput.current;t&&t.blur()}navigate({e:t,input:n,left:i,right:r,up:o,down:a}){const s=this.state.searchResults||this.grid;if(!s.length)return;let[u,c]=this.state.pos;const f=(()=>{if(u==0&&c==0&&!t.repeat&&(i||o))return null;if(u==-1)return!t.repeat&&(r||a)&&n.selectionStart==n.value.length?[0,0]:null;if(i||r){let d=s[u];const h=i?-1:1;if(c+=h,!d[c]){if(u+=h,d=s[u],!d)return u=i?0:s.length-1,c=i?0:s[u].length-1,[u,c];c=i?d.length-1:0}return[u,c]}if(o||a){u+=o?-1:1;const d=s[u];return d?(d[c]||(c=d.length-1),[u,c]):(u=o?0:s.length-1,c=o?0:s[u].length-1,[u,c])}})();if(f)t.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:f,keyboard:!0},()=>{this.scrollTo({row:f[0]})})}scrollTo({categoryId:t,row:n}){const i=this.state.searchResults||this.grid;if(!i.length)return;const r=this.refs.scroll.current,o=r.getBoundingClientRect();let a=0;if(n>=0&&(t=i[n].__categoryId),t&&(a=(this.refs[t]||this.refs.categories.get(t).root).current.getBoundingClientRect().top-(o.top-r.scrollTop)+1),n>=0)if(!n)a=0;else{const s=i[n].__index,u=a+s*this.props.emojiButtonSize,c=u+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(u<r.scrollTop)a=u;else if(c>r.scrollTop+o.height)a=c-o.height;else return}this.ignoreMouse(),r.scrollTop=a}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(t){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:t||[-1,-1],keyboard:!1})}handleEmojiClick({e:t,emoji:n,pos:i}){if(this.props.onEmojiSelect&&(!n&&i&&(n=this.getEmojiByPos(i)),n)){const r=s7e(n,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&GE.add(r,this.props),this.props.onEmojiSelect(r,t)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(t){this.setState({tempSkin:t})}handleSkinClick(t){this.ignoreMouse(),this.closeSkins(),this.setState({skin:t,tempSkin:null}),Ya.set("skin",t)}renderNav(){return Ue(w7e,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const t=this.getEmojiByPos(this.state.pos),n=this.state.searchResults&&!this.state.searchResults.length;return Ue("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Ue("div",{class:"flex flex-middle flex-grow",children:[Ue("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Ue(ZE,{emoji:t,id:n?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Ue("div",{class:`margin-${this.dir[0]}`,children:t||n?Ue("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Ue("div",{class:"preview-title ellipsis",children:t?t.name:Gi.search_no_results_1}),Ue("div",{class:"preview-subtitle ellipsis color-c",children:t?t.skins[0].shortcodes:Gi.search_no_results_2})]}):Ue("div",{class:"preview-placeholder color-c",children:Gi.pick})})]}),!t&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(t,{pos:n,posinset:i,grid:r}){const o=this.props.emojiButtonSize,a=this.state.tempSkin||this.state.skin,u=(t.skins[a-1]||t.skins[0]).native,c=o7e(this.state.pos,n),f=n.concat(t.id).join("");return Ue(_7e,{selected:c,skin:a,size:o,children:Ue("button",{"aria-label":u,"aria-selected":c||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?t.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:t}),onMouseEnter:()=>this.handleEmojiOver(n),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Ue("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),Ue(ZE,{emoji:t,set:this.props.set,size:this.props.emojiSize,skin:a,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},f)}renderSearch(){const t=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return Ue("div",{children:[Ue("div",{class:"spacer"}),Ue("div",{class:"flex flex-middle",children:[Ue("div",{class:"search relative flex-grow",children:[Ue("input",{type:"search",ref:this.refs.searchInput,placeholder:Gi.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Ue("span",{class:"icon loupe flex",children:_k.search.loupe}),this.state.searchResults&&Ue("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:_k.search.delete})]}),t&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:t}=this.state;return t?Ue("div",{class:"category",ref:this.refs.search,children:[Ue("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Gi.categories.search}),Ue("div",{children:t.length?t.map((n,i)=>Ue("div",{class:"flex",children:n.map((r,o)=>this.renderEmojiButton(r,{pos:[i,o],posinset:i*this.props.perLine+o+1,grid:t}))})):Ue("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Ue("a",{onClick:this.props.onAddCustomEmoji,children:Gi.add_custom})})})]}):null}renderCategories(){const{categories:t}=Jt,n=!!this.state.searchResults,i=this.getPerLine();return Ue("div",{style:{visibility:n?"hidden":void 0,display:n?"none":void 0,height:"100%"},children:t.map(r=>{const{root:o,rows:a}=this.refs.categories.get(r.id);return Ue("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:o,children:[Ue("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Gi.categories[r.id]}),Ue("div",{class:"relative",style:{height:a.length*this.props.emojiButtonSize},children:a.map((s,u)=>{const c=s.index-s.index%Ek.rowsPerRender,f=this.state.visibleRows[c],d="current"in s?s:void 0;if(!f&&!d)return null;const h=u*i,p=h+i,m=r.emojis.slice(h,p);return m.length<i&&m.push(...new Array(i-m.length)),Ue("div",{"data-index":s.index,ref:d,class:"flex row",style:{top:u*this.props.emojiButtonSize},children:f&&m.map((v,y)=>{if(!v)return Ue("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const b=of.get(v);return this.renderEmojiButton(b,{pos:[s.index,y],posinset:s.posinset+y,grid:this.grid})})},s.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Ue("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Ue("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Gi.skins.choose,title:Gi.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Ue("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const t=this.getEmojiByPos(this.state.pos),n=t?t.name:"";return Ue("div",{"aria-live":"polite",class:"sr-only",children:n})}renderSkins(){const n=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),r={};return this.dir=="ltr"?r.right=i.right-n.right-3:r.left=n.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?r.bottom=i.bottom-n.top+6:(r.top=n.bottom-i.top+3,r.bottom="auto"),Ue("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Gi.skins.choose,class:"menu hidden","data-position":r.top?"top":"bottom",style:r,children:[...Array(6).keys()].map(o=>{const a=o+1,s=this.state.skin==a;return Ue("div",{children:[Ue("input",{type:"radio",name:"skin-tone",value:a,"aria-label":Gi.skins[a],ref:s?this.refs.skinToneRadio:null,defaultChecked:s,onChange:()=>this.handleSkinMouseOver(a),onKeyDown:u=>{(u.code=="Enter"||u.code=="Space"||u.code=="Tab")&&(u.preventDefault(),this.handleSkinClick(a))}}),Ue("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(a),onMouseEnter:()=>this.handleSkinMouseOver(a),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Ue("span",{class:`skin-tone skin-tone-${a}`}),Ue("span",{class:"margin-small-lr",children:Gi.skins[a]})]})]})})})}render(){const t=this.props.perLine*this.props.emojiButtonSize;return Ue("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${t}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&Ue("div",{class:"padding-lr",children:this.renderSearch()}),Ue("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Ue("div",{style:{width:this.props.dynamicWidth?"100%":t,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(t){super(),go(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),go(this,"handleClickOutside",n=>{const{element:i}=this.props;n.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(n))}),go(this,"handleBaseClick",n=>{this.state.showSkins&&(n.target.closest(".menu")||(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins()))}),go(this,"handleBaseKeydown",n=>{this.state.showSkins&&n.key=="Escape"&&(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins())}),go(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),go(this,"handleSearchInput",async()=>{const n=this.refs.searchInput.current;if(!n)return;const{value:i}=n,r=await of.search(i),o=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},o);const a=n.selectionStart==n.value.length?[0,0]:[-1,-1],s=[];s.setsize=r.length;let u=null;for(let c of r)(!s.length||u.length==this.getPerLine())&&(u=[],u.__categoryId="search",u.__index=s.length,s.push(u)),u.push(c);this.ignoreMouse(),this.setState({searchResults:s,pos:a},o)}),go(this,"handleSearchKeyDown",n=>{const i=n.currentTarget;switch(n.stopImmediatePropagation(),n.key){case"ArrowLeft":this.navigate({e:n,input:i,left:!0});break;case"ArrowRight":this.navigate({e:n,input:i,right:!0});break;case"ArrowUp":this.navigate({e:n,input:i,up:!0});break;case"ArrowDown":this.navigate({e:n,input:i,down:!0});break;case"Enter":n.preventDefault(),this.handleEmojiClick({e:n,pos:this.state.pos});break;case"Escape":n.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),go(this,"clearSearch",()=>{const n=this.refs.searchInput.current;n&&(n.value="",n.focus(),this.handleSearchInput())}),go(this,"handleCategoryClick",({category:n,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:n.id})}),go(this,"openSkins",n=>{const{currentTarget:i}=n,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await a7e(2);const o=this.refs.menu.current;o&&(o.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(t),visibleRows:{0:!0},...this.getInitialState(t)}}}class n7 extends u7e{async connectedCallback(){const t=YG(this.props,Xa,this);t.element=this,t.ref=n=>{this.component=n},await jm(t),!this.disconnected&&UG(Ue(C7e,{...t}),this.shadowRoot)}constructor(t){super(t,{styles:xG(mJ)})}}go(n7,"Props",Xa),typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",n7);var mJ={};mJ=`:host {
217
+ */function GW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GW(Object(n),!0).forEach(function(i){m8e(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GW(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function $b(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$b=function(t){return typeof t}:$b=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$b(e)}function m8e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ka(){return Ka=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ka.apply(this,arguments)}function v8e(e,t){if(e==null)return{};var n={},i=Object.keys(e),r,o;for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function y8e(e,t){if(e==null)return{};var n=v8e(e,t),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var b8e="1.15.2";function Wa(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Ga=Wa(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Cm=Wa(/Edge/i),JW=Wa(/firefox/i),Sm=Wa(/safari/i)&&!Wa(/chrome/i)&&!Wa(/android/i),YW=Wa(/iP(ad|od|hone)/i),XW=Wa(/chrome/i)&&Wa(/android/i),ZW={capture:!1,passive:!1};function hn(e,t,n){e.addEventListener(t,n,!Ga&&ZW)}function sn(e,t,n){e.removeEventListener(t,n,!Ga&&ZW)}function ek(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function k8e(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Fo(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&ek(e,t):ek(e,t))||i&&e===n)return e;if(e===n)break}while(e=k8e(e))}return null}var QW=/\s+/g;function Hr(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(QW," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(QW," ")}}function Dt(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function hd(e,t){var n="";if(typeof e=="string")n=e;else do{var i=Dt(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function $W(e,t,n){if(e){var i=e.getElementsByTagName(t),r=0,o=i.length;if(n)for(;r<o;r++)n(i[r],r);return i}return[]}function ga(){var e=document.scrollingElement;return e||document.documentElement}function bi(e,t,n,i,r){if(!(!e.getBoundingClientRect&&e!==window)){var o,a,s,u,c,f,d;if(e!==window&&e.parentNode&&e!==ga()?(o=e.getBoundingClientRect(),a=o.top,s=o.left,u=o.bottom,c=o.right,f=o.height,d=o.width):(a=0,s=0,u=window.innerHeight,c=window.innerWidth,f=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!Ga))do if(r&&r.getBoundingClientRect&&(Dt(r,"transform")!=="none"||n&&Dt(r,"position")!=="static")){var h=r.getBoundingClientRect();a-=h.top+parseInt(Dt(r,"border-top-width")),s-=h.left+parseInt(Dt(r,"border-left-width")),u=a+o.height,c=s+o.width;break}while(r=r.parentNode);if(i&&e!==window){var p=hd(r||e),m=p&&p.a,v=p&&p.d;p&&(a/=v,s/=m,d/=m,f/=v,u=a+f,c=s+d)}return{top:a,left:s,bottom:u,right:c,width:d,height:f}}}function eG(e,t,n){for(var i=bl(e,!0),r=bi(e)[t];i;){var o=bi(i)[n],a=void 0;if(a=r>=o,!a)return i;if(i===ga())break;i=bl(i,!1)}return!1}function pd(e,t,n,i){for(var r=0,o=0,a=e.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==Tt.ghost&&(i||a[o]!==Tt.dragged)&&Fo(a[o],n.draggable,e,!1)){if(r===t)return a[o];r++}o++}return null}function _E(e,t){for(var n=e.lastElementChild;n&&(n===Tt.ghost||Dt(n,"display")==="none"||t&&!ek(n,t));)n=n.previousElementSibling;return n||null}function po(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Tt.clone&&(!t||ek(e,t))&&n++;return n}function tG(e){var t=0,n=0,i=ga();if(e)do{var r=hd(e),o=r.a,a=r.d;t+=e.scrollLeft*o,n+=e.scrollTop*a}while(e!==i&&(e=e.parentNode));return[t,n]}function w8e(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function bl(e,t){if(!e||!e.getBoundingClientRect)return ga();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=Dt(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return ga();if(i||t)return n;i=!0}}while(n=n.parentNode);return ga()}function _8e(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function CE(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var xm;function nG(e,t){return function(){if(!xm){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),xm=setTimeout(function(){xm=void 0},t)}}}function C8e(){clearTimeout(xm),xm=void 0}function iG(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function rG(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function oG(e,t,n){var i={};return Array.from(e.children).forEach(function(r){var o,a,s,u;if(!(!Fo(r,t.draggable,e,!1)||r.animated||r===n)){var c=bi(r);i.left=Math.min((o=i.left)!==null&&o!==void 0?o:1/0,c.left),i.top=Math.min((a=i.top)!==null&&a!==void 0?a:1/0,c.top),i.right=Math.max((s=i.right)!==null&&s!==void 0?s:-1/0,c.right),i.bottom=Math.max((u=i.bottom)!==null&&u!==void 0?u:-1/0,c.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var qr="Sortable"+new Date().getTime();function S8e(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(Dt(i,"display")==="none"||i===Tt.ghost)){e.push({target:i,rect:bi(i)});var r=pa({},e[e.length-1].rect);if(i.thisAnimationDuration){var o=hd(i,!0);o&&(r.top-=o.f,r.left-=o.e)}i.fromRect=r}})}},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(w8e(e,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var r=!1,o=0;e.forEach(function(a){var s=0,u=a.target,c=u.fromRect,f=bi(u),d=u.prevFromRect,h=u.prevToRect,p=a.rect,m=hd(u,!0);m&&(f.top-=m.f,f.left-=m.e),u.toRect=f,u.thisAnimationDuration&&CE(d,f)&&!CE(c,f)&&(p.top-f.top)/(p.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(s=E8e(p,d,h,i.options)),CE(f,c)||(u.prevFromRect=c,u.prevToRect=f,s||(s=i.options.animation),i.animate(u,p,f,s)),s&&(r=!0,o=Math.max(o,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(t),r?t=setTimeout(function(){typeof n=="function"&&n()},o):typeof n=="function"&&n(),e=[]},animate:function(n,i,r,o){if(o){Dt(n,"transition",""),Dt(n,"transform","");var a=hd(this.el),s=a&&a.a,u=a&&a.d,c=(i.left-r.left)/(s||1),f=(i.top-r.top)/(u||1);n.animatingX=!!c,n.animatingY=!!f,Dt(n,"transform","translate3d("+c+"px,"+f+"px,0)"),this.forRepaintDummy=x8e(n),Dt(n,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Dt(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){Dt(n,"transition",""),Dt(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},o)}}}}function x8e(e){return e.offsetWidth}function E8e(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var gd=[],SE={initializeByDefault:!0},Em={mount:function(e){for(var t in SE)SE.hasOwnProperty(t)&&!(t in e)&&(e[t]=SE[t]);gd.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),gd.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var r=e+"Global";gd.forEach(function(o){t[o.pluginName]&&(t[o.pluginName][r]&&t[o.pluginName][r](pa({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](pa({sortable:t},n)))})},initializePlugins:function(e,t,n,i){gd.forEach(function(a){var s=a.pluginName;if(!(!e.options[s]&&!a.initializeByDefault)){var u=new a(e,t,e.options);u.sortable=e,u.options=e.options,e[s]=u,Ka(n,u.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var o=this.modifyOption(e,r,e.options[r]);typeof o<"u"&&(e.options[r]=o)}},getEventProperties:function(e,t){var n={};return gd.forEach(function(i){typeof i.eventProperties=="function"&&Ka(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return gd.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[t]=="function"&&(i=r.optionListeners[t].call(e[r.pluginName],n))}),i}};function B8e(e){var t=e.sortable,n=e.rootEl,i=e.name,r=e.targetEl,o=e.cloneEl,a=e.toEl,s=e.fromEl,u=e.oldIndex,c=e.newIndex,f=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,p=e.putSortable,m=e.extraEventProperties;if(t=t||n&&n[qr],!!t){var v,y=t.options,b="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Ga&&!Cm?v=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(i,!0,!0)),v.to=a||n,v.from=s||n,v.item=r||n,v.clone=o,v.oldIndex=u,v.newIndex=c,v.oldDraggableIndex=f,v.newDraggableIndex=d,v.originalEvent=h,v.pullMode=p?p.lastPutMode:void 0;var g=pa(pa({},m),Em.getEventProperties(i,t));for(var k in g)v[k]=g[k];n&&n.dispatchEvent(v),y[b]&&y[b].call(t,v)}}var D8e=["evt"],Er=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,r=y8e(n,D8e);Em.pluginEvent.bind(Tt)(e,t,pa({dragEl:it,parentEl:ei,ghostEl:It,rootEl:qn,nextEl:tf,lastDownEl:tk,cloneEl:Jn,cloneHidden:kl,dragStarted:Dm,putSortable:Ki,activeSortable:Tt.active,originalEvent:i,oldIndex:md,oldDraggableIndex:Bm,newIndex:Kr,newDraggableIndex:wl,hideGhostForTarget:dG,unhideGhostForTarget:hG,cloneNowHidden:function(){kl=!0},cloneNowShown:function(){kl=!1},dispatchSortableEvent:function(o){cr({sortable:t,name:o,originalEvent:i})}},r))};function cr(e){B8e(pa({putSortable:Ki,cloneEl:Jn,targetEl:it,rootEl:qn,oldIndex:md,oldDraggableIndex:Bm,newIndex:Kr,newDraggableIndex:wl},e))}var it,ei,It,qn,tf,tk,Jn,kl,md,Kr,Bm,wl,nk,Ki,vd=!1,ik=!1,rk=[],nf,Po,xE,EE,aG,sG,Dm,yd,Tm,Am=!1,ok=!1,ak,ir,BE=[],DE=!1,sk=[],lk=typeof document<"u",uk=YW,lG=Cm||Ga?"cssFloat":"float",T8e=lk&&!XW&&!YW&&"draggable"in document.createElement("div"),uG=function(){if(lk){if(Ga)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),fG=function(e,t){var n=Dt(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=pd(e,0,t),o=pd(e,1,t),a=r&&Dt(r),s=o&&Dt(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+bi(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+bi(o).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var f=a.float==="left"?"left":"right";return o&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=i&&n[lG]==="none"||o&&n[lG]==="none"&&u+c>i)?"vertical":"horizontal"},A8e=function(e,t,n){var i=n?e.left:e.top,r=n?e.right:e.bottom,o=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,u=n?t.width:t.height;return i===a||r===s||i+o/2===a+u/2},O8e=function(e,t){var n;return rk.some(function(i){var r=i[qr].options.emptyInsertThreshold;if(!(!r||_E(i))){var o=bi(i),a=e>=o.left-r&&e<=o.right+r,s=t>=o.top-r&&t<=o.bottom+r;if(a&&s)return n=i}}),n},cG=function(e){function t(r,o){return function(a,s,u,c){var f=a.options.group.name&&s.options.group.name&&a.options.group.name===s.options.group.name;if(r==null&&(o||f))return!0;if(r==null||r===!1)return!1;if(o&&r==="clone")return r;if(typeof r=="function")return t(r(a,s,u,c),o)(a,s,u,c);var d=(o?a:s).options.group.name;return r===!0||typeof r=="string"&&r===d||r.join&&r.indexOf(d)>-1}}var n={},i=e.group;(!i||$b(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},dG=function(){!uG&&It&&Dt(It,"display","none")},hG=function(){!uG&&It&&Dt(It,"display","")};lk&&!XW&&document.addEventListener("click",function(e){if(ik)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ik=!1,!1},!0);var rf=function(e){if(it){e=e.touches?e.touches[0]:e;var t=O8e(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[qr]._onDragOver(n)}}},F8e=function(e){it&&it.parentNode[qr]._isOutsideThisEl(e.target)};function Tt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ka({},t),e[qr]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return fG(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,a){o.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Tt.supportPointer!==!1&&"PointerEvent"in window&&!Sm,emptyInsertThreshold:5};Em.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);cG(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:T8e,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?hn(e,"pointerdown",this._onTapStart):(hn(e,"mousedown",this._onTapStart),hn(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(hn(e,"dragover",this),hn(e,"dragenter",this)),rk.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ka(this,S8e())}Tt.prototype={constructor:Tt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(yd=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,it):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,r=i.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(a||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=i.filter;if(z8e(n),!it&&!(/mousedown|pointerdown/.test(o)&&e.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Sm&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=Fo(s,i.draggable,n,!1),!(s&&s.animated)&&tk!==s)){if(md=po(s),Bm=po(s,i.draggable),typeof c=="function"){if(c.call(this,e,s,this)){cr({sortable:t,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),Er("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=Fo(u,f.trim(),n,!1),f)return cr({sortable:t,rootEl:f,name:"filter",targetEl:s,fromEl:n,toEl:n}),Er("filter",t,{evt:e}),!0}),c)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!Fo(u,i.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var i=this,r=i.el,o=i.options,a=r.ownerDocument,s;if(n&&!it&&n.parentNode===r){var u=bi(n);if(qn=r,it=n,ei=it.parentNode,tf=it.nextSibling,tk=n,nk=o.group,Tt.dragged=it,nf={target:it,clientX:(t||e).clientX,clientY:(t||e).clientY},aG=nf.clientX-u.left,sG=nf.clientY-u.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,it.style["will-change"]="all",s=function(){if(Er("delayEnded",i,{evt:e}),Tt.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!JW&&i.nativeDraggable&&(it.draggable=!0),i._triggerDragStart(e,t),cr({sortable:i,name:"choose",originalEvent:e}),Hr(it,o.chosenClass,!0)},o.ignore.split(",").forEach(function(c){$W(it,c.trim(),TE)}),hn(a,"dragover",rf),hn(a,"mousemove",rf),hn(a,"touchmove",rf),hn(a,"mouseup",i._onDrop),hn(a,"touchend",i._onDrop),hn(a,"touchcancel",i._onDrop),JW&&this.nativeDraggable&&(this.options.touchStartThreshold=4,it.draggable=!0),Er("delayStart",this,{evt:e}),o.delay&&(!o.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Cm||Ga))){if(Tt.eventCanceled){this._onDrop();return}hn(a,"mouseup",i._disableDelayedDrag),hn(a,"touchend",i._disableDelayedDrag),hn(a,"touchcancel",i._disableDelayedDrag),hn(a,"mousemove",i._delayedDragTouchMoveHandler),hn(a,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&hn(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,o.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){it&&TE(it),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;sn(e,"mouseup",this._disableDelayedDrag),sn(e,"touchend",this._disableDelayedDrag),sn(e,"touchcancel",this._disableDelayedDrag),sn(e,"mousemove",this._delayedDragTouchMoveHandler),sn(e,"touchmove",this._delayedDragTouchMoveHandler),sn(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?hn(document,"pointermove",this._onTouchMove):t?hn(document,"touchmove",this._onTouchMove):hn(document,"mousemove",this._onTouchMove):(hn(it,"dragend",this),hn(qn,"dragstart",this._onDragStart));try{document.selection?ck(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(vd=!1,qn&&it){Er("dragStarted",this,{evt:t}),this.nativeDraggable&&hn(document,"dragover",F8e);var n=this.options;!e&&Hr(it,n.dragClass,!1),Hr(it,n.ghostClass,!0),Tt.active=this,e&&this._appendGhost(),cr({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Po){this._lastX=Po.clientX,this._lastY=Po.clientY,dG();for(var e=document.elementFromPoint(Po.clientX,Po.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Po.clientX,Po.clientY),e!==t);)t=e;if(it.parentNode[qr]._isOutsideThisEl(e),t)do{if(t[qr]){var n=void 0;if(n=t[qr]._onDragOver({clientX:Po.clientX,clientY:Po.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);hG()}},_onTouchMove:function(e){if(nf){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,r=e.touches?e.touches[0]:e,o=It&&hd(It,!0),a=It&&o&&o.a,s=It&&o&&o.d,u=uk&&ir&&tG(ir),c=(r.clientX-nf.clientX+i.x)/(a||1)+(u?u[0]-BE[0]:0)/(a||1),f=(r.clientY-nf.clientY+i.y)/(s||1)+(u?u[1]-BE[1]:0)/(s||1);if(!Tt.active&&!vd){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(It){o?(o.e+=c-(xE||0),o.f+=f-(EE||0)):o={a:1,b:0,c:0,d:1,e:c,f};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");Dt(It,"webkitTransform",d),Dt(It,"mozTransform",d),Dt(It,"msTransform",d),Dt(It,"transform",d),xE=c,EE=f,Po=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!It){var e=this.options.fallbackOnBody?document.body:qn,t=bi(it,!0,uk,!0,e),n=this.options;if(uk){for(ir=e;Dt(ir,"position")==="static"&&Dt(ir,"transform")==="none"&&ir!==document;)ir=ir.parentNode;ir!==document.body&&ir!==document.documentElement?(ir===document&&(ir=ga()),t.top+=ir.scrollTop,t.left+=ir.scrollLeft):ir=ga(),BE=tG(ir)}It=it.cloneNode(!0),Hr(It,n.ghostClass,!1),Hr(It,n.fallbackClass,!0),Hr(It,n.dragClass,!0),Dt(It,"transition",""),Dt(It,"transform",""),Dt(It,"box-sizing","border-box"),Dt(It,"margin",0),Dt(It,"top",t.top),Dt(It,"left",t.left),Dt(It,"width",t.width),Dt(It,"height",t.height),Dt(It,"opacity","0.8"),Dt(It,"position",uk?"absolute":"fixed"),Dt(It,"zIndex","100000"),Dt(It,"pointerEvents","none"),Tt.ghost=It,e.appendChild(It),Dt(It,"transform-origin",aG/parseInt(It.style.width)*100+"% "+sG/parseInt(It.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,r=n.options;if(Er("dragStart",this,{evt:e}),Tt.eventCanceled){this._onDrop();return}Er("setupClone",this),Tt.eventCanceled||(Jn=rG(it),Jn.removeAttribute("id"),Jn.draggable=!1,Jn.style["will-change"]="",this._hideClone(),Hr(Jn,this.options.chosenClass,!1),Tt.clone=Jn),n.cloneId=ck(function(){Er("clone",n),!Tt.eventCanceled&&(n.options.removeCloneOnHide||qn.insertBefore(Jn,it),n._hideClone(),cr({sortable:n,name:"clone"}))}),!t&&Hr(it,r.dragClass,!0),t?(ik=!0,n._loopId=setInterval(n._emulateDragOver,50)):(sn(document,"mouseup",n._onDrop),sn(document,"touchend",n._onDrop),sn(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(n,i,it)),hn(document,"drop",n),Dt(it,"transform","translateZ(0)")),vd=!0,n._dragStartId=ck(n._dragStarted.bind(n,t,e)),hn(document,"selectstart",n),Dm=!0,Sm&&Dt(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,r,o,a=this.options,s=a.group,u=Tt.active,c=nk===s,f=a.sort,d=Ki||u,h,p=this,m=!1;if(DE)return;function v(M,X){Er(M,p,pa({evt:e,isOwner:c,axis:h?"vertical":"horizontal",revert:o,dragRect:i,targetRect:r,canSort:f,fromSortable:d,target:n,completed:b,onMove:function(ee,ae){return fk(qn,t,it,i,ee,bi(ee),e,ae)},changed:g},X))}function y(){v("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function b(M){return v("dragOverCompleted",{insertion:M}),M&&(c?u._hideClone():u._showClone(p),p!==d&&(Hr(it,Ki?Ki.options.ghostClass:u.options.ghostClass,!1),Hr(it,a.ghostClass,!0)),Ki!==p&&p!==Tt.active?Ki=p:p===Tt.active&&Ki&&(Ki=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){v("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===it&&!it.animated||n===t&&!n.animated)&&(yd=null),!a.dragoverBubble&&!e.rootEl&&n!==document&&(it.parentNode[qr]._isOutsideThisEl(e.target),!M&&rf(e)),!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function g(){Kr=po(it),wl=po(it,a.draggable),cr({sortable:p,name:"change",toEl:t,newIndex:Kr,newDraggableIndex:wl,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Fo(n,a.draggable,t,!0),v("dragOver"),Tt.eventCanceled)return m;if(it.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return b(!1);if(ik=!1,u&&!a.disabled&&(c?f||(o=ei!==qn):Ki===this||(this.lastPutMode=nk.checkPull(this,u,it,e))&&s.checkPut(this,u,it,e))){if(h=this._getDirection(e,n)==="vertical",i=bi(it),v("dragOverValid"),Tt.eventCanceled)return m;if(o)return ei=qn,y(),this._hideClone(),v("revert"),Tt.eventCanceled||(tf?qn.insertBefore(it,tf):qn.appendChild(it)),b(!0);var k=_E(t,a.draggable);if(!k||I8e(e,h,this)&&!k.animated){if(k===it)return b(!1);if(k&&t===e.target&&(n=k),n&&(r=bi(n)),fk(qn,t,it,i,n,r,e,!!n)!==!1)return y(),k&&k.nextSibling?t.insertBefore(it,k.nextSibling):t.appendChild(it),ei=t,g(),b(!0)}else if(k&&R8e(e,h,this)){var _=pd(t,0,a,!0);if(_===it)return b(!1);if(n=_,r=bi(n),fk(qn,t,it,i,n,r,e,!1)!==!1)return y(),t.insertBefore(it,_),ei=t,g(),b(!0)}else if(n.parentNode===t){r=bi(n);var A=0,x,w=it.parentNode!==t,O=!A8e(it.animated&&it.toRect||i,n.animated&&n.toRect||r,h),S=h?"top":"left",C=eG(n,"top","top")||eG(it,"top","top"),E=C?C.scrollTop:void 0;yd!==n&&(x=r[S],Am=!1,ok=!O&&a.invertSwap||w),A=N8e(e,n,r,h,O?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,ok,yd===n);var T;if(A!==0){var F=po(it);do F-=A,T=ei.children[F];while(T&&(Dt(T,"display")==="none"||T===It))}if(A===0||T===n)return b(!1);yd=n,Tm=A;var D=n.nextElementSibling,R=!1;R=A===1;var L=fk(qn,t,it,i,n,r,e,R);if(L!==!1)return(L===1||L===-1)&&(R=L===1),DE=!0,setTimeout(j8e,30),y(),R&&!D?t.appendChild(it):n.parentNode.insertBefore(it,R?D:n),C&&iG(C,0,E-C.scrollTop),ei=it.parentNode,x!==void 0&&!ok&&(ak=Math.abs(x-bi(n)[S])),g(),b(!0)}if(t.contains(it))return b(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){sn(document,"mousemove",this._onTouchMove),sn(document,"touchmove",this._onTouchMove),sn(document,"pointermove",this._onTouchMove),sn(document,"dragover",rf),sn(document,"mousemove",rf),sn(document,"touchmove",rf)},_offUpEvents:function(){var e=this.el.ownerDocument;sn(e,"mouseup",this._onDrop),sn(e,"touchend",this._onDrop),sn(e,"pointerup",this._onDrop),sn(e,"touchcancel",this._onDrop),sn(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Kr=po(it),wl=po(it,n.draggable),Er("drop",this,{evt:e}),ei=it&&it.parentNode,Kr=po(it),wl=po(it,n.draggable),Tt.eventCanceled){this._nulling();return}vd=!1,ok=!1,Am=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),AE(this.cloneId),AE(this._dragStartId),this.nativeDraggable&&(sn(document,"drop",this),sn(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sm&&Dt(document.body,"user-select",""),Dt(it,"transform",""),e&&(Dm&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),It&&It.parentNode&&It.parentNode.removeChild(It),(qn===ei||Ki&&Ki.lastPutMode!=="clone")&&Jn&&Jn.parentNode&&Jn.parentNode.removeChild(Jn),it&&(this.nativeDraggable&&sn(it,"dragend",this),TE(it),it.style["will-change"]="",Dm&&!vd&&Hr(it,Ki?Ki.options.ghostClass:this.options.ghostClass,!1),Hr(it,this.options.chosenClass,!1),cr({sortable:this,name:"unchoose",toEl:ei,newIndex:null,newDraggableIndex:null,originalEvent:e}),qn!==ei?(Kr>=0&&(cr({rootEl:ei,name:"add",toEl:ei,fromEl:qn,originalEvent:e}),cr({sortable:this,name:"remove",toEl:ei,originalEvent:e}),cr({rootEl:ei,name:"sort",toEl:ei,fromEl:qn,originalEvent:e}),cr({sortable:this,name:"sort",toEl:ei,originalEvent:e})),Ki&&Ki.save()):Kr!==md&&Kr>=0&&(cr({sortable:this,name:"update",toEl:ei,originalEvent:e}),cr({sortable:this,name:"sort",toEl:ei,originalEvent:e})),Tt.active&&((Kr==null||Kr===-1)&&(Kr=md,wl=Bm),cr({sortable:this,name:"end",toEl:ei,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Er("nulling",this),qn=it=ei=It=tf=Jn=tk=kl=nf=Po=Dm=Kr=wl=md=Bm=yd=Tm=Ki=nk=Tt.dragged=Tt.ghost=Tt.clone=Tt.active=null,sk.forEach(function(e){e.checked=!0}),sk.length=xE=EE=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":it&&(this._onDragOver(e),P8e(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,r=n.length,o=this.options;i<r;i++)t=n[i],Fo(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||L8e(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(r,o){var a=i.children[o];Fo(a,this.options.draggable,i,!1)&&(n[r]=a)},this),t&&this.captureAnimationState(),e.forEach(function(r){n[r]&&(i.removeChild(n[r]),i.appendChild(n[r]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Fo(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Em.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&cG(n)},destroy:function(){Er("destroy",this);var e=this.el;e[qr]=null,sn(e,"mousedown",this._onTapStart),sn(e,"touchstart",this._onTapStart),sn(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(sn(e,"dragover",this),sn(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),rk.splice(rk.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!kl){if(Er("hideClone",this),Tt.eventCanceled)return;Dt(Jn,"display","none"),this.options.removeCloneOnHide&&Jn.parentNode&&Jn.parentNode.removeChild(Jn),kl=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(kl){if(Er("showClone",this),Tt.eventCanceled)return;it.parentNode==qn&&!this.options.group.revertClone?qn.insertBefore(Jn,it):tf?qn.insertBefore(Jn,tf):qn.appendChild(Jn),this.options.group.revertClone&&this.animate(it,Jn),Dt(Jn,"display",""),kl=!1}}};function P8e(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function fk(e,t,n,i,r,o,a,s){var u,c=e[qr],f=c.options.onMove,d;return window.CustomEvent&&!Ga&&!Cm?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=t,u.from=e,u.dragged=n,u.draggedRect=i,u.related=r||t,u.relatedRect=o||bi(t),u.willInsertAfter=s,u.originalEvent=a,e.dispatchEvent(u),f&&(d=f.call(c,u,a)),d}function TE(e){e.draggable=!1}function j8e(){DE=!1}function R8e(e,t,n){var i=bi(pd(n.el,0,n.options,!0)),r=oG(n.el,n.options,It),o=10;return t?e.clientX<r.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<r.top-o||e.clientY<i.bottom&&e.clientX<i.left}function I8e(e,t,n){var i=bi(_E(n.el,n.options.draggable)),r=oG(n.el,n.options,It),o=10;return t?e.clientX>r.right+o||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>r.bottom+o||e.clientX>i.right&&e.clientY>i.top}function N8e(e,t,n,i,r,o,a,s){var u=i?e.clientY:e.clientX,c=i?n.height:n.width,f=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!a){if(s&&ak<c*r){if(!Am&&(Tm===1?u>f+c*o/2:u<d-c*o/2)&&(Am=!0),Am)h=!0;else if(Tm===1?u<f+ak:u>d-ak)return-Tm}else if(u>f+c*(1-r)/2&&u<d-c*(1-r)/2)return M8e(t)}return h=h||a,h&&(u<f+c*o/2||u>d-c*o/2)?u>f+c/2?1:-1:0}function M8e(e){return po(it)<po(e)?1:-1}function L8e(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function z8e(e){sk.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&sk.push(i)}}function ck(e){return setTimeout(e,0)}function AE(e){return clearTimeout(e)}lk&&hn(document,"touchmove",function(e){(Tt.active||vd)&&e.cancelable&&e.preventDefault()}),Tt.utils={on:hn,off:sn,css:Dt,find:$W,is:function(e,t){return!!Fo(e,t,e,!1)},extend:_8e,throttle:nG,closest:Fo,toggleClass:Hr,clone:rG,index:po,nextTick:ck,cancelNextTick:AE,detectDirection:fG,getChild:pd},Tt.get=function(e){return e[qr]},Tt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(Tt.utils=pa(pa({},Tt.utils),i.utils)),Em.mount(i)})},Tt.create=function(e,t){return new Tt(e,t)},Tt.version=b8e;var ki=[],Om,OE,FE=!1,PE,jE,dk,Fm;function V8e(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?hn(document,"dragover",this._handleAutoScroll):this.options.supportPointer?hn(document,"pointermove",this._handleFallbackAutoScroll):n.touches?hn(document,"touchmove",this._handleFallbackAutoScroll):hn(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?sn(document,"dragover",this._handleAutoScroll):(sn(document,"pointermove",this._handleFallbackAutoScroll),sn(document,"touchmove",this._handleFallbackAutoScroll),sn(document,"mousemove",this._handleFallbackAutoScroll)),pG(),hk(),C8e()},nulling:function(){dk=OE=Om=FE=Fm=PE=jE=null,ki.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,a=document.elementFromPoint(r,o);if(dk=t,n||this.options.forceAutoScrollFallback||Cm||Ga||Sm){RE(t,this.options,a,n);var s=bl(a,!0);FE&&(!Fm||r!==PE||o!==jE)&&(Fm&&pG(),Fm=setInterval(function(){var u=bl(document.elementFromPoint(r,o),!0);u!==s&&(s=u,hk()),RE(t,i.options,u,n)},10),PE=r,jE=o)}else{if(!this.options.bubbleScroll||bl(a,!0)===ga()){hk();return}RE(t,this.options,bl(a,!1),!1)}}},Ka(e,{pluginName:"scroll",initializeByDefault:!0})}function hk(){ki.forEach(function(e){clearInterval(e.pid)}),ki=[]}function pG(){clearInterval(Fm)}var RE=nG(function(e,t,n,i){if(t.scroll){var r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=t.scrollSensitivity,s=t.scrollSpeed,u=ga(),c=!1,f;OE!==n&&(OE=n,hk(),Om=t.scroll,f=t.scrollFn,Om===!0&&(Om=bl(n,!0)));var d=0,h=Om;do{var p=h,m=bi(p),v=m.top,y=m.bottom,b=m.left,g=m.right,k=m.width,_=m.height,A=void 0,x=void 0,w=p.scrollWidth,O=p.scrollHeight,S=Dt(p),C=p.scrollLeft,E=p.scrollTop;p===u?(A=k<w&&(S.overflowX==="auto"||S.overflowX==="scroll"||S.overflowX==="visible"),x=_<O&&(S.overflowY==="auto"||S.overflowY==="scroll"||S.overflowY==="visible")):(A=k<w&&(S.overflowX==="auto"||S.overflowX==="scroll"),x=_<O&&(S.overflowY==="auto"||S.overflowY==="scroll"));var T=A&&(Math.abs(g-r)<=a&&C+k<w)-(Math.abs(b-r)<=a&&!!C),F=x&&(Math.abs(y-o)<=a&&E+_<O)-(Math.abs(v-o)<=a&&!!E);if(!ki[d])for(var D=0;D<=d;D++)ki[D]||(ki[D]={});(ki[d].vx!=T||ki[d].vy!=F||ki[d].el!==p)&&(ki[d].el=p,ki[d].vx=T,ki[d].vy=F,clearInterval(ki[d].pid),(T!=0||F!=0)&&(c=!0,ki[d].pid=setInterval((function(){i&&this.layer===0&&Tt.active._onTouchMove(dk);var R=ki[this.layer].vy?ki[this.layer].vy*s:0,L=ki[this.layer].vx?ki[this.layer].vx*s:0;typeof f=="function"&&f.call(Tt.dragged.parentNode[qr],L,R,e,dk,ki[this.layer].el)!=="continue"||iG(ki[this.layer].el,L,R)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==u&&(h=bl(h,!1)));FE=c}},30),gG=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,r=e.activeSortable,o=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var u=n||r;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(c.clientX,c.clientY);s(),u&&!u.el.contains(f)&&(o("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function IE(){}IE.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=pd(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:gG},Ka(IE,{pluginName:"revertOnSpill"});function NE(){}NE.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:gG},Ka(NE,{pluginName:"removeOnSpill"}),Tt.mount(new V8e),Tt.mount(NE,IE);function U8e(e){return e==null?e:JSON.parse(JSON.stringify(e))}function H8e(e){l.getCurrentInstance()&&l.onUnmounted(e)}function q8e(e){l.getCurrentInstance()?l.onMounted(e):l.nextTick(e)}let mG=null,vG=null;function yG(e=null,t=null){mG=e,vG=t}function K8e(){return{data:mG,clonedData:vG}}const bG=Symbol("cloneElement");function W8e(...e){var t,n;const i=(t=l.getCurrentInstance())==null?void 0:t.proxy;let r=null;const o=e[0];let[,a,s]=e;Array.isArray(l.unref(a))||(s=a,a=null);let u=null;const{immediate:c=!0,clone:f=U8e,forceFallback:d,fallbackOnBody:h,customUpdate:p}=(n=l.unref(s))!=null?n:{};function m(C){var E;const{from:T,oldIndex:F,item:D}=C,R=Array.from(T.childNodes);r=d&&!h?R.slice(0,-1):R;const L=l.unref((E=l.unref(a))==null?void 0:E[F]),M=f(L);yG(L,M),D[bG]=M}function v(C){const E=C.item[bG];if(!l8e(E)){if(wE(C.item),l.isRef(a)){const T=[...l.unref(a)];a.value=qW(T,C.newDraggableIndex,E);return}qW(l.unref(a),C.newDraggableIndex,E)}}function y(C){const{from:E,item:T,oldIndex:F,oldDraggableIndex:D,pullMode:R,clone:L}=C;if(KW(E,T,F),R==="clone"){wE(L);return}if(l.isRef(a)){const M=[...l.unref(a)];a.value=HW(M,D);return}HW(l.unref(a),D)}function b(C){if(p){p(C);return}const{from:E,item:T,oldIndex:F,oldDraggableIndex:D,newDraggableIndex:R}=C;if(wE(T),KW(E,T,F),l.isRef(a)){const L=[...l.unref(a)];a.value=UW(L,D,R);return}UW(l.unref(a),D,R)}function g(C){const{newIndex:E,oldIndex:T,from:F,to:D}=C;let R=null;const L=E===T&&F===D;try{if(L){let M=null;r==null||r.some((X,ee)=>{if(M&&(r==null?void 0:r.length)!==D.childNodes.length)return F.insertBefore(M,X.nextSibling),!0;const ae=D.childNodes[ee];M=D==null?void 0:D.replaceChild(X,ae)})}}catch(M){R=M}finally{r=null}l.nextTick(()=>{if(yG(),R)throw R})}const k={onUpdate:b,onStart:m,onAdd:v,onRemove:y,onEnd:g};function _(C){const E=l.unref(o);return C||(C=u8e(E)?f8e(E,i==null?void 0:i.$el):E),C&&!h8e(C)&&(C=C.$el),C||void 0,C}function A(){var C;const E=(C=l.unref(s))!=null?C:{},{immediate:T,clone:F}=E,D=VW(E,["immediate","clone"]);return WW(D,(R,L)=>{p8e(R)&&(D[R]=(M,...X)=>{const ee=K8e();return g8e(M,ee),L(M,...X)})}),d8e(a===null?{}:k,D)}const x=C=>{C=_(C),u&&w.destroy(),u=new Tt(C,A())};l.watch(()=>s,()=>{u&&WW(A(),(C,E)=>{u==null||u.option(C,E)})},{deep:!0});const w={option:(C,E)=>u==null?void 0:u.option(C,E),destroy:()=>{u==null||u.destroy(),u=null},save:()=>u==null?void 0:u.save(),toArray:()=>u==null?void 0:u.toArray(),closest:(...C)=>u==null?void 0:u.closest(...C)},O=()=>w==null?void 0:w.option("disabled",!0),S=()=>w==null?void 0:w.option("disabled",!1);return q8e(()=>{c&&x()}),H8e(w.destroy),dd({start:x,pause:O,resume:S},w)}const ME=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],G8e=["clone","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target","customUpdate",...ME.map(e=>`on${e.replace(/^\S/,t=>t.toUpperCase())}`)],kG=l.defineComponent({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:G8e,emits:["update:modelValue",...ME],setup(e,{slots:t,emit:n,expose:i,attrs:r}){const o=ME.reduce((f,d)=>{const h=`on${d.replace(/^\S/,p=>p.toUpperCase())}`;return f[h]=(...p)=>n(d,...p),f},{}),a=l.computed(()=>{const f=l.toRefs(e),{modelValue:d}=f,h=VW(f,["modelValue"]),p=Object.entries(h).reduce((m,[v,y])=>{const b=l.unref(y);return b!==void 0&&(m[v]=b),m},{});return dd(dd({},o),s8e(dd(dd({},r),p)))}),s=l.computed({get:()=>e.modelValue,set:f=>n("update:modelValue",f)}),u=l.ref(),c=l.reactive(W8e(e.target||u,s,a));return i(c),()=>{var f;return l.h(e.tag||"div",{ref:u},(f=t==null?void 0:t.default)==null?void 0:f.call(t,c))}}}),J8e={class:"c0 omit ex fs13 plr4"},Y8e={class:"b g6"},X8e=["title"],LE={__name:"tableContentControl",props:{modelValue:{type:Array,default:()=>[]},dragTitleKey:{type:String,default:"title"}},emits:["sort","change","update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r=l.computed({get:()=>n.modelValue,set:u=>{i("update:modelValue",u)}}),o=l.computed(()=>{let u=1/0;return n.modelValue.forEach(c=>{u=Math.min(u,c.rank)}),u||1});function a(u){return or(n.dragTitleKey,u)}function s(u){i("sort",u,o.value)}return(u,c)=>{const f=l.resolveComponent("jwt-icon"),d=l.resolveComponent("el-button"),h=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(h,{persistent:!1,placement:"bottom","popper-style":"max-height:60vh;overflow-y:auto;",trigger:"hover",width:240},{reference:l.withCtx(()=>[l.createVNode(d,{size:"small",text:""},{default:l.withCtx(()=>[l.createVNode(f,{icon:"draggable",size:"18"})]),_:1})]),default:l.withCtx(()=>[l.createVNode(l.unref(kG),{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=p=>r.value=p),animation:"150","ghost-class":"ghost",onSort:s},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(p,m)=>(l.openBlock(),l.createElementBlock("div",{key:p.id,class:"cpm ptb4 w fxmc"},[l.createVNode(f,{class:"g9",icon:"drag-drop-line"}),l.createElementVNode("div",J8e,[l.createElementVNode("span",Y8e,l.toDisplayString(o.value+m),1),l.createElementVNode("span",{class:"ml4",title:a(p)},l.toDisplayString(a(p)),9,X8e)])]))),128))]),_:1},8,["modelValue"])]),_:1})}}},Z8e=Object.freeze(Object.defineProperty({__proto__:null,default:LE},Symbol.toStringTag,{value:"Module"})),pk={__name:"tableFieldControl",props:{modelValue:{type:Array,default:()=>[]}},emits:["sort","change","update:modelValue"],setup(e,{emit:t}){const n=e,i=t,r=l.computed({get:()=>n.modelValue,set:s=>{i("update:modelValue",s)}});function o(s){i("sort",s)}function a(s,u){i("change",s,u)}return(s,u)=>{const c=l.resolveComponent("jwt-icon"),f=l.resolveComponent("el-button"),d=l.resolveComponent("el-checkbox"),h=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(h,{persistent:!1,placement:"bottom","popper-style":"max-height:70vh;overflow-y:auto;",trigger:"hover",width:210},{reference:l.withCtx(()=>[l.createVNode(f,{size:"small",text:""},{default:l.withCtx(()=>[l.createVNode(c,{icon:"settings-line",size:"18"})]),_:1})]),default:l.withCtx(()=>[l.createVNode(l.unref(kG),{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=p=>r.value=p),animation:"150","ghost-class":"ghost",onSort:o},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,p=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{key:p.id},[l.createVNode(c,{icon:"drag-drop-line"}),l.createVNode(d,{checked:p.checked,class:"ml5",onChange:m=>a(p,s.index)},{default:l.withCtx(()=>[l.createElementVNode("span",{class:l.normalizeClass(p.label.length>6?"fs12":"")},l.toDisplayString(p.label),3)]),_:2},1032,["checked","onChange"])],512)),[[l.vShow,!p.isOperate]])),128))]),_:1},8,["modelValue"])]),_:1})}}},Q8e=Object.freeze(Object.defineProperty({__proto__:null,default:pk},Symbol.toStringTag,{value:"Module"})),zE={__name:"tableListContent",props:{tableAttr:{require:!0,type:Object,default:()=>{}},tableEvents:{type:Object,default:()=>{}},tableData:{type:Array,default:()=>[]},appTableColumn:{type:Array,default:()=>[]},ajaxLoading:{type:Boolean,default:!1},loadingText:{type:String,default:"正在加载中..."},tableHeight:{type:[String,Number],default:null},tableSize:{type:String,default:"small"},currentPagePath:{type:String,default:""},userMenusAuth:{type:Object,default:()=>{}},tableButtonNum:{type:Number,default:3},pagination:{type:Object,default:()=>{}},defaultSort:{type:Object,default:()=>{}}},emits:["table-current-change","header-dragend","selection-change","sort-change","change-table-column","table-action","edit-row","click-cell","dbclick-cell","show-file"],setup(e,{expose:t,emit:n}){const i=e,r=n,o=l.ref(null),a=l.computed(()=>{var b,g;return((((b=i==null?void 0:i.pagination)==null?void 0:b.currentPage)||1)-1)*(((g=i==null?void 0:i.pagination)==null?void 0:g.pageSize)||15)});function s(b){r("table-current-change",b)}function u(b,g,k,_){r("header-dragend",b,g,k,_)}function c(b){r("selection-change",b)}function f(b={}){r("sort-change",b)}function d(b){r("change-table-column","fixed",b)}function h(b,g,k){r("table-action",b,g,k)}function p(b={},g={}){r("edit-row",b,g)}function m(b,g){r("click-cell",b,g)}function v(b){r("show-file",b)}function y(b,g,k,_){var A;r("dbclick-cell",{row:b,column:g,cell:k,event:_,text:((A=_==null?void 0:_.target)==null?void 0:A.textContent)||""})}return t({tableRef:o}),(b,g)=>{const k=l.resolveComponent("jwt-table-button"),_=l.resolveComponent("jwt-column-item"),A=l.resolveComponent("el-table-column"),x=l.resolveComponent("el-table"),w=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createBlock(x,l.mergeProps(e.tableAttr,{ref_key:"tableRef",ref:o,"default-sort":e.defaultSort,class:"mt10 jwt-table-wrapper",data:e.tableData,"element-loading-spinner":"el-icon-loading","element-loading-text":e.loadingText,height:e.tableHeight,size:e.tableSize},l.toHandlers(e.tableEvents),{onCellDblclick:y,onCurrentChange:s,onHeaderDragend:u,onSelectionChange:c,onSortChange:f}),{default:l.withCtx(()=>[l.renderSlot(b.$slots,"table-content-before"),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.appTableColumn,(O,S)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:S},[O.checked?(l.openBlock(),l.createBlock(A,l.mergeProps({key:0,align:O.align||"center",fixed:O.fixed},{ref_for:!0},O.attrs,{"min-width":O.minWidth?O.minWidth:null,prop:O.prop,sortable:O.sortable,type:O.type,width:O.width?O.width:null}),l.createSlots({header:l.withCtx(()=>[l.createVNode(Zb,{item:O,onFixed:C=>d(O)},null,8,["item","onFixed"])]),_:2},[O.type?O.type==="expand"?{name:"default",fn:l.withCtx(({row:C})=>[l.renderSlot(b.$slots,O.prop,{index:S,scope:C})]),key:"1"}:void 0:{name:"default",fn:l.withCtx(({row:C,$index:E})=>[O.action?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(b.$slots,"action-before",{scope:C}),l.createVNode(k,{config:O,"current-path":e.currentPagePath,"menus-obj":e.userMenusAuth,row:C,"show-button-num":e.tableButtonNum,onTableAction:T=>h(T,C,O)},null,8,["config","current-path","menus-obj","row","show-button-num","onTableAction"]),l.renderSlot(b.$slots,"action-after",{scope:C})],64)):O.isColumn?l.renderSlot(b.$slots,O.prop,{key:1,index:S,scope:C}):(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass([(O==null?void 0:O.columnCls)||"fxmc","w mw"])},[l.renderSlot(b.$slots,O.slotPreName,{scope:C}),l.renderSlot(b.$slots,O.prop,{index:S,rowindex:E,pagestart:a.value,scope:C},()=>[l.createVNode(_,{index:E,item:O,row:C,pagestart:a.value,onChange:p,onClickCell:m,onShowFile:v},null,8,["index","item","row","pagestart"])]),l.renderSlot(b.$slots,O.slotSufName,{scope:C})],2))]),key:"0"}]),1040,["align","fixed","min-width","prop","sortable","type","width"])):l.createCommentVNode("",!0)],64))),128)),l.renderSlot(b.$slots,"table-content-after",{list:e.tableData})]),_:3},16,["default-sort","data","element-loading-text","height","size"])),[[w,e.ajaxLoading]])}}},$8e=Object.freeze(Object.defineProperty({__proto__:null,default:zE},Symbol.toStringTag,{value:"Module"})),e9e={class:"table-list-actions"},t9e={class:"fx fxwp"},n9e=l.defineComponent({name:"JwtTableButton"}),wG=l.defineComponent({...n9e,props:{currentPath:{type:String,default:"/"},menusObj:{type:Object,default:()=>{}},config:{type:Object,default:()=>{}},row:{type:Object,default:()=>{}},operationName:{type:String,default:"operations"},showButtonNum:{type:Number,default:3},showIcon:{type:Boolean,default:!1},showText:{type:Boolean,default:!0}},emits:["table-action"],setup(e,{emit:t}){const n=e,i=t,{visibleActions:r,tableButtonActions:o,hasOverflowActions:a}=jW(n),s=(u,c)=>{i("table-action",{action:c,e:u})};return(u,c)=>{var h;const f=l.resolveComponent("jwt-icon"),d=l.resolveComponent("el-popover");return l.openBlock(),l.createElementBlock("div",e9e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(p,m)=>(l.openBlock(),l.createBlock(_m,{key:m,link:"",size:"small",action:p,"show-icon":e.showIcon,"show-text":e.showText,onActionClick:v=>s(v,p)},null,8,["action","show-icon","show-text","onActionClick"]))),128)),l.unref(a)?(l.openBlock(),l.createBlock(d,{key:0,placement:"bottom",trigger:"hover",persistent:!1,width:150},{reference:l.withCtx(()=>[l.createVNode(f,{class:"ml5 cp",icon:"more-fill"})]),default:l.withCtx(()=>[l.createElementVNode("div",t9e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(p,m)=>(l.openBlock(),l.createBlock(_m,{key:m,action:p,link:"","show-icon":e.showIcon,"show-text":e.showText,size:"small",onActionClick:v=>s(v,p)},null,8,["action","show-icon","show-text","onActionClick"]))),128))])]),_:1})):l.createCommentVNode("",!0),(h=l.unref(r))!=null&&h.length?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(" ")],64))])}}}),i9e=Object.freeze(Object.defineProperty({__proto__:null,default:wG},Symbol.toStringTag,{value:"Module"})),r9e=["element-loading-text"],o9e={class:"fxmc c0",style:{padding:"10px 0","justify-content":"center",height:"100%","background-color":"var(--el-table-row-hover-bg-color)"}},VE=tn({__name:"tableListContentVirtualized",props:{tableAttr:{require:!0,type:Object,default:()=>{}},tableEvents:{type:Object,default:()=>{}},tableData:{type:Array,default:()=>[]},appTableColumn:{type:Array,default:()=>[]},ajaxLoading:{type:Boolean,default:!1},loadingText:{type:String,default:"正在加载中..."},tableHeight:{type:[String,Number],default:"72vh"},tableSize:{type:String,default:"small"},currentPagePath:{type:String,default:""},userMenusAuth:{type:Object,default:()=>{}},tableButtonNum:{type:Number,default:3},estimatedRowHeight:{type:Number,default:50},pagination:{type:Object,default:()=>{}},defaultSort:{type:Object,default:()=>{}}},emits:["table-current-change","header-dragend","selection-change","sort-change","change-table-column","table-action","edit-row","click-cell","dbclick-cell","selection-header-change","selection-column-change","show-file"],setup(e,{emit:t}){const n=e,i=l.computed(()=>{var h,p;return((h=n.tableAttr)==null?void 0:h["show-summary"])&&((p=n.tableAttr)==null?void 0:p.summaryMethod)}),r=l.computed(()=>{var h,p;return((((h=n==null?void 0:n.pagination)==null?void 0:h.currentPage)||1)-1)*(((p=n==null?void 0:n.pagination)==null?void 0:p.pageSize)||15)}),o=t,a=l.useSlots(),s=l.computed(()=>n.appTableColumn.map(h=>({...h,align:h.align||"center",title:h.label,key:h.prop,property:h.prop,width:h.width||h.minWidth||150,dataKey:h.prop,headerCellRenderer:()=>l.h(Zb,{item:h,tableData:n.tableData,onFixed:()=>o("change-table-column","fixed",h),onSelect:p=>o("selection-header-change",p)}),cellRenderer:({rowData:p,rowIndex:m,columnIndex:v})=>{const y={index:v,rowindex:m,scope:p,row:p,item:h,pagestart:r.value};return h.action?l.h("div",{class:[(h==null?void 0:h.columnCls)||"fxmc","w mw ptb8"],onDblclick:b=>d(b,p,h)},[a["action-before"]?a["action-before"]({scope:p}):null,l.h(wG,{config:h,"current-path":n.currentPagePath,"menus-obj":n.userMenusAuth,row:p,"show-button-num":n.tableButtonNum,onTableAction:b=>o("table-action",b,p,h)}),a["action-after"]?a["action-after"]({scope:p}):null]):(h==null?void 0:h.type)==="selection"?l.h(ut.ElCheckbox,{modelValue:p.selectionChecked,onChange:b=>{p.selectionChecked=b,o("selection-column-change",b,p)}}):l.h("div",{class:[(h==null?void 0:h.columnCls)||"fxmc","w mw ptb8"],onDblclick:b=>d(b,p,h)},[h.slotPreName&&a[h.slotPreName]?a[h.slotPreName](y):null,a[h.prop]?a[h.prop](y):l.h(j7,{item:h,row:p,index:m,pagestart:r.value,onChange:(b,g)=>o("edit-row",b,g),onClickCell:(b,g)=>o("click-cell",b,g),onShowFile:b=>o("show-file",b)}),h.slotSufName&&a[h.slotSufName]?a[h.slotSufName](y):null])}})).filter(h=>!h.hide)),u=l.computed(()=>{var h;if(i.value){const p=(h=n.tableAttr)==null?void 0:h.summaryMethod({columns:s.value,data:n.tableData});let m=[];return p.forEach((v,y)=>{v&&v!=="-"&&y&&m.push(`${s.value[y].label}: ${v}`)}),m.length?`总计:${m.join("、")}`:""}return""}),c=l.ref({order:"desc"});function f(h){o("sort-change",{prop:h.key,order:h.order==="asc"?"ascending":"descending",column:h.column}),c.value=h}function d(h,p,m){var v;o("dbclick-cell",{row:p,column:m,event:h,text:((v=h==null?void 0:h.currentTarget)==null?void 0:v.textContent)||""})}return(h,p)=>{const m=l.resolveComponent("el-table-v2"),v=l.resolveComponent("el-auto-resizer"),y=l.resolveDirective("loading");return l.withDirectives((l.openBlock(),l.createElementBlock("div",{"element-loading-spinner":"el-icon-loading","element-loading-text":e.loadingText,style:l.normalizeStyle({height:e.tableHeight})},[l.createVNode(v,null,{default:l.withCtx(({height:b,width:g})=>[l.createVNode(m,l.mergeProps({columns:s.value,data:e.tableData,"estimated-row-height":e.estimatedRowHeight,fixed:"","footer-height":40,height:b,"sort-by":e.defaultSort,width:g},e.tableAttr,l.toHandlers(e.tableEvents),{onColumnSort:f}),l.createSlots({_:2},[i.value&&u.value?{name:"footer",fn:l.withCtx(()=>[l.createElementVNode("div",o9e,l.toDisplayString(u.value),1)]),key:"0"}:void 0]),1040,["columns","data","estimated-row-height","height","sort-by","width"])]),_:1})],12,r9e)),[[y,e.ajaxLoading]])}}},[["__scopeId","data-v-7ecf0778"]]),a9e=Object.freeze(Object.defineProperty({__proto__:null,default:VE},Symbol.toStringTag,{value:"Module"})),gk={__name:"tableSizeSetting",emits:["tableSize"],setup(e,{emit:t}){const n=t,i=Ai.get("tableSize")||"default",r=l.ref(i),o=[{title:Oe("大"),size:"large",imgSize:70},{title:Oe("中"),size:"default",imgSize:60},{title:Oe("小"),size:"small",imgSize:40}];function a(s){n("tableSize",s)}return(s,u)=>{const c=l.resolveComponent("jwt-icon"),f=l.resolveComponent("el-button"),d=l.resolveComponent("el-radio"),h=l.resolveComponent("el-radio-group"),p=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(p,{persistent:!1,placement:"bottom",trigger:"hover",width:200},{reference:l.withCtx(()=>[l.createVNode(f,{size:"small",text:""},{default:l.withCtx(()=>[l.createVNode(c,{icon:"line-height",size:"18"})]),_:1})]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.createVNode(h,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=m=>r.value=m),onChange:a},{default:l.withCtx(()=>[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(o,(m,v)=>l.createVNode(d,{key:v,label:m.size},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(m.title),1)]),_:2},1032,["label"])),64))]),_:1},8,["modelValue"])])]),_:1})}}},s9e=Object.freeze(Object.defineProperty({__proto__:null,default:gk},Symbol.toStringTag,{value:"Module"})),l9e=l.defineComponent({name:"JwtTableCopy",components:{TableSizeSetting:gk,TableFieldControl:pk,TableColumnHeader:Zb},props:{config:{require:!0,type:Object,default:()=>{}},tableHeight:{type:[String,Number],default:null},userMenusAuth:{type:Object,default:()=>{}},route:{type:Object,default:()=>{}},router:{type:Object,default:()=>{}},userFieldList:{type:Object,default:()=>{}},refMenuId:{type:[Number,String],default:""},pageUrl:{type:String,default:""},tableColumn:{type:Array,default:()=>[]},freezeList:{type:Boolean,default:!0},cacheSearch:{type:Boolean,default:!1}},emits:["selection-change","list-change","header-action","table-action","add-handle","edit-handle","add-success","edit-success","delete-success","table-current-change","tablelist-change","get-detail-success","click-cell","des-edit-success","upload-btn","event-name","copy-success","asynExport","search-result","change-table-column","fixed-table-column","dialog-close","refresh-draw","refresh-table","form-item-change","row-change"],setup(e,{emit:t}){var U,Z,Ce,Me;const n=gn(),i={"page-sizes":Im(),"page-size":20,layout:"total, sizes, prev, pager, next, jumper"};let r="";const o=l.shallowRef([]),a=l.shallowRef([]),s=l.reactive({ajaxLoading:!1,submitLoading:!1,renderTable:!0,refreshTable:!1,tableSize:Ai.get("tableSize")||"default",tableFields:null,tableStatistics:[]}),{proxy:u}=l.getCurrentInstance(),c=l.useSlots(),f=l.ref([]),d=l.ref({}),h=l.shallowRef(null),p=l.shallowRef(null),m=l.shallowRef(null),v=l.shallowRef(null),y=l.computed(()=>f.value.map(te=>te.id).join(",")),b=l.computed(()=>{var te;return((te=p.value)==null?void 0:te.editBoxRefModel)||{}}),g=l.computed(()=>{var te;return((te=m.value)==null?void 0:te.editBoxRefModel)||{}}),k=l.computed(()=>dr("showPagination",e.config)?Le.isFunction(e.config.showPagination)?e.config.showPagination():e.config.showPagination:!0),_=l.computed(()=>dr("headerActionsShow",e.config)?Le.isFunction(e.config.headerActionsShow)?e.config.headerActionsShow():e.config.headerActionsShow:!0),A=l.computed(()=>dr("showHeaderSearch",e.config)?Le.isFunction(e.config.showHeaderSearch)?e.config.showHeaderSearch():e.config.showHeaderSearch:!0),x=Object.freeze({headerActions:{list:[],deleteText:""},headerActionsShow:!0,tableAttr:{stripe:!0,border:!0,fit:!0,highlightCurrentRow:!0,immediate:!0},virtualized:!1,tableEvents:{},tableColumn:[],searchBtnInline:!1,useField:!0,keepAliveTabs:!0,tableListApi:null,tableListParams:{},tableDeleteApi:null,tableRowEdit:!0,tableDeleteText:"",tableDeleteParams:{},tableExportApi:"",tableExportPathKey:"",tablePrintApi:"",tablePrintPathKey:"http_path",pagination:i,showPagination:!0,hasPagination:!0,showTableLineHeight:!1,editBoxOnDialog:!0,editBox:{title:Oe("系统"),dialog:{width:"960px",top:"7vh"},form:{api:{add:null,update:null},formAttrs:{},formList:[]},footer:{confirm:{title:Oe("确认"),attrs:{type:"primary"}},cancel:{title:Oe("取消"),attrs:{}}}},tableDrawer:{}});let w=Le.merge({},x,{useField:!0,keepAliveTabs:!0},e.config);const O=()=>{var te;return((te=e==null?void 0:e.config)==null?void 0:te.tablePageSizeName)||"pageSize"},S=l.reactive({currentPage:1,pageCount:1,pageSize:Ai.get(O())||((U=w.tableListParams)==null?void 0:U.per_page)||w.pagination["page-sizes"][2],totalCount:1,sort:((Z=w.tableListParams)==null?void 0:Z.sort)||"id",order:((Ce=w.tableListParams)==null?void 0:Ce.order)||"desc"}),C=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox",refreshTable:!1}),E=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox"}),T={"append-to-body":!0,"destroy-on-close":!0,size:"40%"},F=l.shallowReactive({attrs:{...T},visible:!1,config:{},detailInfo:{},contentConfig:{}}),D=l.computed(()=>{var te;return F.descriptionEdit||(te=F==null?void 0:F.attrs)!=null&&te.refresh?l.reactive(F.detailInfo):F.detailInfo}),R=()=>{var ge;const te={};for(const ke in e.userMenusAuth){const{id:Re}=((ge=e.userMenusAuth)==null?void 0:ge[ke])||"";Re&&(te[Re]=ke)}return te},L=l.computed(()=>{let te=e.route.path||"";return e!=null&&e.refMenuId&&(te=R()[e.refMenuId]),e!=null&&e.pageUrl&&(te=e==null?void 0:e.pageUrl),te||""}),M=l.computed(()=>Oe("加载数据中")||"加载数据中..."),X=(te={})=>{const{query:ge}=e.route;let ke={...d.value,...te};if((ge.fromJump||ge.openType)&&!(e!=null&&e.refMenuId)){for(let[Re,We]of Object.entries(ge))Le.isArray(We)?ke[Re]=We.map(ot=>+ot):ke[Re]=We;ke.openType&&delete ke.openType,delete ke.fromJump}d.value=ke,ae(te)},ee=()=>{var te,ge;return{...w.tableListParams||{},[n.pageKey]:S.currentPage,[n.pageSizeKey]:S.pageSize,sort:S.sort||((te=w.tableListParams)==null?void 0:te.sort)||"",order:S.order||((ge=w.tableListParams)==null?void 0:ge.order)||"",...d.value||{}}},ae=(te={})=>{const ge=ee(),ke=Le.merge({},ge,te);N(ke)},N=te=>{if(!w.tableListApi){w.tableData&&(o.value=w.tableData);return}s.ajaxLoading=!0,n.request({url:w.tableListApi,method:"get",params:te}).then(ge=>{let ke=null;w.hasPagination?(w!=null&&w.tableListCallback&&Le.isFunction(w.tableListCallback)?ke=w.tableListCallback(ge.data,ge):ke=ge.data,o.value=e.freezeList?l.markRaw(ke.map(Re=>l.markRaw(Re))):ke,S.pageCount=ge==null?void 0:ge.totalPage,S.totalCount=ge.total,S.currentPage=ge.current_page):(ke=ge,o.value=e.freezeList?l.markRaw(ke):ke),ke=null,s.tableStatistics=(ge==null?void 0:ge.statistics)||null,s.ajaxLoading=!1,j(ge.data),t("tablelist-change",ge.data)}).catch(()=>{s.ajaxLoading=!1})},j=(te=[])=>{if(e!=null&&e.refMenuId)return;const{query:{id:ge,openType:ke}}=e.route;if(ke&&ge&&te.length===1){if(ke==="edit")Rn(te[0],{});else if(ke.includes("Detail")){const Re=a.value.find(We=>{var ot;return((ot=We==null?void 0:We.publicDrawerConfig)==null?void 0:ot.openName)===ke});Re!=null&&Re.id&&t("click-cell",te[0],Re)}}},q=()=>{S.currentPage=1;const te={[n.pageKey]:1,[n.pageSizeKey]:S.pageSize};d.value={},l.nextTick(()=>{ae(te)})},V=(te,ge)=>{d.value[te]=ge},K=te=>{var ge,ke;S.currentPage=1,(ke=(ge=e.config)==null?void 0:ge.tableSearch)!=null&&ke.onlyData?d.value={...te}:d.value={...d.value,...te},t("search-result",te),ae(te)},Y=te=>{S.currentPage=te,ae({page:te})},ne=te=>{S.pageSize=te;const ge=O();Ai.set(ge,te);const ke={[n.pageSizeKey]:te};ae(ke)},oe=te=>{f.value=te,t("selection-change",te)},ve=({prop:te,order:ge})=>{S.sort=te,S.order=ge==="ascending"?"asc":"desc",ae({sort:te,order:ge==="ascending"?"asc":"desc"})},xe=te=>{t("table-current-change",te)},ie=()=>{var te,ge,ke,Re;if(E.visible){E.visible=!1,E.config=null,E.model=null,s.submitLoading=!1;return}F.visible&&Fe(),(ge=(te=C==null?void 0:C.config)==null?void 0:te.api)!=null&&ge.refreshDraw&&t("refresh-draw"),((Re=(ke=C==null?void 0:C.config)==null?void 0:ke.api)!=null&&Re.refreshTable||C!=null&&C.refreshTable)&&t("refresh-table"),C.visible=!1,C.config=null,C.model=null,s.submitLoading=!1,t("list-change"),!C.stopGetList&&ae()},we=(te,ge)=>{var ke,Re,We;C.visible&&(ke=C==null?void 0:C.config)!=null&&ke.addSuccess&&Le.isFunction((Re=C==null?void 0:C.config)==null?void 0:Re.addSuccess)&&((We=C==null?void 0:C.config)==null||We.addSuccess(d,V)),ie(),t("add-success",te,ge)},Se=(te,ge)=>{ie(),t("edit-success",te,ge)},P=()=>{F.visible=!0},le=(te,ge)=>{n.request({url:w.tableCopyApi,method:"post",data:te}).then(()=>{t("copy-success",ge),ae()})},ye=(te,ge,ke,Re=[],We=!1)=>{Od(te,ge,ke,{selectionRow:Re,cancel:We,callback:(ot,Ge)=>{var Ct,Zt;t("des-edit-success",ot,Ge),ge.refreshTable&&B(),ge!=null&&ge.refreshDraw&&be(),(Zt=(Ct=ge==null?void 0:ge.api)==null?void 0:Ct.callback)==null||Zt.call(Ct,ot)}})},G=(te={})=>{const ge=ee();Xk(te,ge,{url:w.tablePrintApi,tableData:o.value,proxy:u,tableExportPathKey:w.tableExportPathKey})},J=(te={},ge={})=>{const ke=ee();Ad(te,ge,ke,{url:w.tableExportApi,tableData:o.value,proxy:u,selectionRow:f.value,tableExportPathKey:w.tableExportPathKey,beforeExportFun:w.beforeExportFun,tableExportName:w.tableExportName,emit:t,isTemp:!1})},fe=(te={},ge={})=>{const ke=ee();Ad(te,ge,ke,{url:w.tableExportApi,tableData:o.value,proxy:u,selectionRow:f.value,tableExportPathKey:w.tableExportPathKey,beforeExportFun:w.beforeExportFun,tableExportName:w.tableExportName,emit:t,isTemp:!0})},se=()=>{var te;if(!((te=w.tableFileImport)!=null&&te.action)){ut.ElMessage.info(Oe("请配置文件上传接口"));return}},me=(te,ge,ke=!0)=>{te[`isEdit${ge.prop}`]=ke},ce=(te={},ge={},ke="table")=>{var Be,je,qe,at,ft;const{id:Re}=te,{prop:We,refreshTable:ot,api:Ge}=ge;if(t("row-change",te,ge),!Re||!w.tableRowEdit)return;const Ct={table:{url:w.tableUpdateApi,des:"tableUpdateApi"},drawDes:{url:((Be=F==null?void 0:F.api)==null?void 0:Be.update)||((qe=(je=F==null?void 0:F.descriptions)==null?void 0:je.api)==null?void 0:qe.update)||((ft=(at=w==null?void 0:w.tableDrawer)==null?void 0:at.api)==null?void 0:ft.update),des:"drawerConfig.api.update || appConfig.tableDrawer.api.update"}};let Zt=(Ge==null?void 0:Ge.url)||Ct[ke].url;if(!Zt)return ut.ElMessage.info(`${Oe("请配置编辑接口")}${Ct[ke].des}`);var Ke={id:Re};const{startKey:$,endKey:de}=ge;if($&&de?(Ke[$]=te[We][0]||"",Ke[de]=te[We][1]||""):Ke[We]=te[We]||"",Ge!=null&&Ge.params){let Qe=Le.isFunction(Ge.params)?Ge.params(te,Ke):Ge.params;Ke={...Ke,...Qe}}n.request({url:Zt,method:"post",data:Ke}).then(()=>{te[`isEdit${We}`]=!1,ke==="drawDes"&&(s.refreshTable=!0),ot&&B(),t("des-edit-success",ge)})},Fe=(te="")=>{if(!F.visible){t("refresh-draw");return}const{url:ge,row:ke,searchKey:Re,valueKey:We}=F.params||{};if(!ge)return ut.ElMessage.info(Oe("请配置详情接口"));const ot={};ot[Re]=te||or(We,ke),n.request({url:ge,method:"get",params:ot}).then(Ge=>{F.detailInfo=Ge})},be=(te="")=>{Fe(te),s.refreshTable=!0},_e=(te,ge)=>{var ot,Ge,Ct,Zt,Ke;const ke=Le.merge({},T,((ot=ge.drawerConfig)==null?void 0:ot.attrs)||{});F.attrs=ke;const Re=(Ge=ge==null?void 0:ge.drawerConfig)==null?void 0:Ge.tabPaneName,We=(Ct=ge==null?void 0:ge.drawerConfig)==null?void 0:Ct.desListName;Re&&(w!=null&&w.tableDrawer[Re])&&(F.config={...w==null?void 0:w.tableDrawer[Re],api:Le.merge({},((Zt=w==null?void 0:w.tableDrawer)==null?void 0:Zt.api)||{},((Ke=ge.drawerConfig)==null?void 0:Ke.api)||{}),attrs:ke,descriptions:We&&(w!=null&&w.tableDrawer[We])?w==null?void 0:w.tableDrawer[We]:{}}),F.detailInfo=te,F.contentConfig={row:l.toRaw(te),item:l.toRaw(ge)},l.nextTick(()=>{F.visible=!0})},Ve=(te,ge)=>{var ke;t("click-cell",te,ge),ge.drawerConfig?_e(te,ge):((ke=ge==null?void 0:ge.actions)==null?void 0:ke.type)==="editBox"&&Rn(te,ge.actions)},st=()=>{},et=()=>{s.refreshTable&&(ae(),s.refreshTable=!1),F.visible=!1},Et=te=>{t("upload-btn",te)},Bt=()=>{var te;(te=w==null?void 0:w.tableFileImport)!=null&&te.refreshTable&&B()},bt=(...te)=>{t("event-name",...te)},Kt=te=>{const ge=te==null?void 0:te.action;Xn("",ge)},gt=(te,ge)=>{E.visible?m.value.setModelVal(te,ge):p.value.setModelVal(te,ge)},Ne=(te,ge)=>{E.visible?m.value.handleSetModelVal(te,ge):p.value.handleSetModelVal(te,ge)},he=(te="editBoxInfo")=>{te==="editBoxInfo"?(C.model={},C.config={}):te==="addBoxInfo"&&(E.model={},E.config={}),t("dialog-close")},Ee=te=>{s.tableSize=te,Ai.set("tableSize",te)},Te=(te,ge,ke,Re)=>{if(s.tableFields){const We=a.value.find(ot=>ot.prop===ke.property);We!=null&&We.id&&t("change-table-column","width",{width:te,column:We})}},ze=te=>{s.tableFields&&(t("change-table-column","toggle",te),te.checked=!te.checked)},He=()=>{s.tableFields&&t("change-table-column","draggable",a.value)},rt=te=>{s.tableFields&&(t("change-table-column","fixed",te),te.fixed=!te.fixed)},ct=()=>{h.value.formReset()},dt=(te,ge)=>{h.value.setModelVal(te,ge)},vt=()=>{var Re,We,ot;const{path:te}=e.route,ge=(e==null?void 0:e.refMenuId)||((We=(Re=e.userMenusAuth)==null?void 0:Re[te])==null?void 0:We.id);return((ot=e==null?void 0:e.config)==null?void 0:ot.useField)&&(e==null?void 0:e.userFieldList[ge])||null},Vt=()=>{var ge,ke,Re;return((Re=(ke=(ge=e.userMenusAuth)==null?void 0:ge[L.value])==null?void 0:ke.operations)==null?void 0:Re.filter(We=>We==null?void 0:We.show_table))||[]},Yt=()=>{var Re,We;let te=[];const ge=vt();s.tableFields=ge,((Re=e==null?void 0:e.tableColumn)!=null&&Re.length?e==null?void 0:e.tableColumn:(We=e==null?void 0:e.config)==null?void 0:We.tableColumn).forEach(ot=>{var Zt,Ke,$,de;const Ge={...ot,label:Le.isFunction(ot.label)?ot.label():Oe(ot.label),tips:Le.isFunction(ot.tips)?ot.tips():Oe(ot.tips)};Ge.isEdit=!!(Ge.editType||Ge.dateTimeFormat||Ge.isImg||Ge.isImgs||Ge.editTypeFun);let Ct=!0;if(Ge.isOperate){const Be=Vt(),je=Ge.fixed==="right"&&(((Zt=Ge==null?void 0:Ge.action)==null?void 0:Zt.list)||[]);Be!=null&&Be.length&&je.length?Ct=Be.some(qe=>je.includes(qe.code)):Ct=!1}ge?(ge[Ge.prop]&&te.push({...Ge,...ge[Ge.prop],isControl:!0,fixed:!!((Ke=ge[Ge.prop])!=null&&Ke.is_fixed),checked:Ge.hide?!1:!!ge[Ge.prop].is_show,width:(($=ge[Ge.prop])==null?void 0:$.width)||(Ge==null?void 0:Ge.width)||""}),Ge.isOperate&&te.push({...Ge,rank:Ge!=null&&Ge.type?-1/0:1/0,checked:(Ge==null?void 0:Ge.type)||Ct,isControl:!1,fixed:(Ge==null?void 0:Ge.fixed)||"",width:((de=ge[Ge.prop])==null?void 0:de.width)||(Ge==null?void 0:Ge.width)||""})):te.push({...Ge,checked:Ge.isOperate?Ct:!Ge.hide})}),ge&&(te=te.sort((ot,Ge)=>ot.rank-Ge.rank)),a.value=te},Xt=()=>{const te={},ge=vt();if(ge&&Le.isObject(ge))for(const[ke,Re]of Object.entries(ge))Re.is_default_sort&&(te.sort=ke,te.order=Re.sort);te!=null&&te.order&&(S.sort=te.sort,S.order=te.order)},Kn=async()=>await p.value.createSubmitData(),xn=()=>{Yt()},Yn=(te,ge,ke)=>{te&&n.request({url:te,method:"get",params:{}}).then(Re=>{ge==null||ge(Re,ke.model)})},_t=(te={},ge={})=>{var We;const ke=te.formList;let Re=ke;return s.tableFields&&(Re=ke.filter(ot=>{const Ge=!ot.privacyId||!!s.tableFields[ot.privacyId];return(te==null?void 0:te.privacyKey)==="disabled"?(ot.formAttrs={...ot.formAttrs,disabled:!Ge},!0):Ge})),(We=te==null?void 0:te.beforeCreate)!=null&&We.formatFormList&&Le.isFunction(te.beforeCreate.formatFormList)&&(Re=te.beforeCreate.formatFormList(Re,ge)),Re},An=async(te,ge,ke={},Re)=>{const We={id:te.id,...ke};n.request({url:w[ge].form.api.detail,method:"get",params:We}).then(ot=>{Re?C.model=Re(ot):C.model=ot,C.title=Td(!0,w,ge,Oe),t("get-detail-success",ot)})},ln={filterFormList:_t,handleGetDetail:An,handleBeforeCreateReq:Yn,t:Oe},Rn=(te,ge)=>{ya(te,ge,w,C,ln),l.nextTick(()=>{w.editBoxOnDialog?C.visible=!0:P()})},Xn=(te,ge)=>{ya(te,ge,w,E,ln),E.visible=!0},rr=(te="",ge,ke,Re)=>{n.request({url:te||w.tableDeleteApi,method:"post",data:ge}).then(()=>{t("delete-success",Re),ae(),ke!=null&&ke.refreshDraw&&be()})},In={deleteText:((Me=w==null?void 0:w.headerActions)==null?void 0:Me.deleteText)||"",tableCopyText:w.tableCopyText,handleEdit:Rn,handleLinkRouter:Rm,t:Oe,emit:t,handleDeleteRequest:rr,handleExportRequest:J,handleExportTempRequest:fe,handlePrintRequest:G,handleImportRequest:se,handleSimpleRequest:ye,handleCopyRequest:le},tt=(te,ge={},ke=null)=>{var ot,Ge,Ct;const{code:Re}=te,We=ke||((ot=w.headerActions)==null?void 0:ot[Re])||((Ct=(Ge=F==null?void 0:F.descriptions)==null?void 0:Ge.headerActions)==null?void 0:Ct[Re]);ns(te,ge,We,f.value,"tableHeader",In),t("header-action",te,f.value,D.value,We)},Li=(te,ge,ke)=>{const{action:Re}=te,We=ke.action[Re.code];ns(Re,ge,We,f.value,"",{...In,deleteText:w.tableDeleteText}),t("table-action",Re,ge,We,te)},Ti=l.watchEffect(()=>{}),Br=l.watch(e,te=>{w=Le.merge({},x,te.config),te.config.tableData&&(o.value=te.config.tableData||[])}),B=()=>{ae(),t("refresh-table")},z=(te,ge,ke)=>{t("form-item-change",te,ge,ke)},I=async()=>{var ke;const te=await((ke=h==null?void 0:h.value)==null?void 0:ke.createSubmitData());for(const Re in te)te[Re]===""&&delete te[Re];const ge=H(!1);return ge&&(Object.assign(te,ge),h.value.handleSetModelValue(te)),te},H=(te=!1)=>{var ge;if(e.cacheSearch){const ke=r||L.value;return((ge=n==null?void 0:n.handleCacheSearch)==null?void 0:ge.call(n,ke,te,te?d.value:null))||null}return null},re=l.watch(()=>L.value,(te,ge)=>{te!==r&&(r=ge)});l.onMounted(async()=>{var ge;const te=await I();d.value=te,Xt(),Yt(),(ge=w.tableAttr)!=null&&ge.immediate&&X()});function Q(){w=null,o.value=null,a.value=null,d.value=null,s.tableFields=null,f.value=null,s.renderTable=!1}return l.onBeforeUnmount(()=>{H(!0),Ti(),Br(),Q(),re()}),{tableRef:v,tableData:o,appTableColumn:a,slots:c,...l.toRefs(s),currentPagePath:L,appConfig:w,pagination:S,editBoxRef:p,editBoxRefModel:b,editBoxInfo:C,addBoxInfo:E,addBoxRef:m,addBoxRefModel:g,tableDrawerConfig:F,selectionRow:f,selectionRowIds:y,tableSearchModel:d,loadingText:M,searchFormRef:h,showPagination:k,showHeaderActions:_,showHeaderSearch:A,onSearchSubmit:K,onSearchReset:q,handleEdit:Rn,handleCurrentChange:Y,handleSizeChange:ne,handleSelectionChange:oe,handleTableCurrentChange:xe,handleSortChange:ve,handleHeaderAction:tt,handleTableAction:Li,handleGetDetail:An,getList:ae,initSearch:X,handleError:st,handleAddSuccess:we,handleEditSuccess:Se,handleEditRow:me,handleEditRowProp:ce,handleImportRequest:se,handleClickRow:Ve,handleCloseDrawer:et,handleUploadBtn:Et,handleUploadSuccess:Bt,handleRefreshDrawerDetail:be,handleComponentEvent:bt,handleAddOption:Kt,setFormModelVal:gt,handleSetFormModelVal:Ne,handleSetSearchModelVal:dt,handleDialogClose:he,handleTableSizeChange:Ee,handleTableHeaderDragend:Te,handleFieldCheck:ze,handleTableColumnSort:He,handleSearchFormReset:ct,getSubmitData:Kn,handleFixedCell:rt,handleDoLayoutTable:xn,handleItemChange:z}}}),u9e={key:0,class:"app-table-wrapper"},f9e={key:0,class:"table-header-wrapper fx"},c9e={class:"fxm pr10 ex"},d9e={class:"fxmj"},h9e={class:"ex"};function p9e(e,t,n,i,r,o){var _,A,x,w,O,S,C;const a=l.resolveComponent("jwt-form"),s=l.resolveComponent("jwt-header-button"),u=l.resolveComponent("TableSizeSetting"),c=l.resolveComponent("TableFieldControl"),f=l.resolveComponent("TableColumnHeader"),d=l.resolveComponent("jwt-table-button"),h=l.resolveComponent("jwt-column-item"),p=l.resolveComponent("el-table-column"),m=l.resolveComponent("el-table"),v=l.resolveComponent("el-pagination"),y=l.resolveComponent("JwtDialogForm"),b=l.resolveComponent("jwt-detail-drawer"),g=l.resolveComponent("el-drawer"),k=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock(l.Fragment,null,[e.renderTable?(l.openBlock(),l.createElementBlock("div",u9e,[l.createElementVNode("div",{class:l.normalizeClass([(_=e.appConfig)!=null&&_.searchBtnInline?"fxmj":""])},[l.renderSlot(e.$slots,"search-before",{},void 0,!0),e.showHeaderSearch?(l.openBlock(),l.createElementBlock("div",f9e,[t[0]||(l.setBlockTracking(-1,!0),(t[0]=(w=(x=(A=e.config)==null?void 0:A.tableSearch)==null?void 0:x.formList)!=null&&w.length?(l.openBlock(),l.createBlock(a,{key:0,ref:"searchFormRef",modelValue:e.tableSearchModel,"onUpdate:modelValue":E=>e.tableSearchModel=E,class:"app-table-search",config:(O=e.config)==null?void 0:O.tableSearch,"is-search":"",onReset:e.onSearchReset,onSubmit:e.onSearchSubmit},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),E=>({name:E,fn:l.withCtx(({model:T})=>[l.renderSlot(e.$slots,E,{model:T},void 0,!0)])}))]),1032,["modelValue","onUpdate:modelValue","config","onReset","onSubmit"])):l.createCommentVNode("",!0)).cacheIndex=0,l.setBlockTracking(1),t[0]),l.renderSlot(e.$slots,"search-form-after",{},void 0,!0)])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"search-after",{},void 0,!0),l.createElementVNode("div",{class:l.normalizeClass(["fxmj",[(S=e.appConfig)!=null&&S.searchBtnInline?"mb18":""]])},[l.createElementVNode("div",c9e,[l.renderSlot(e.$slots,"header-button-before",{},void 0,!0),e.showHeaderActions?(l.openBlock(),l.createBlock(s,{key:0,config:((C=e.config)==null?void 0:C.headerActions)||{},"current-path":e.currentPagePath,"file-import":e.appConfig.tableFileImport,loading:e.ajaxLoading,"menus-obj":e.userMenusAuth,"selection-row":e.selectionRow,"upload-success-cb":e.appConfig.uploadSuccessCb,onHeaderAction:e.handleHeaderAction,onUploadSuccess:e.handleUploadSuccess},null,8,["config","current-path","file-import","loading","menus-obj","selection-row","upload-success-cb","onHeaderAction","onUploadSuccess"])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"header-button-after",{},void 0,!0)]),l.createElementVNode("div",null,[e.appConfig.showTableLineHeight?(l.openBlock(),l.createBlock(u,{key:0,onTableSize:e.handleTableSizeChange},null,8,["onTableSize"])):l.createCommentVNode("",!0),e.tableFields?(l.openBlock(),l.createBlock(c,{key:1,modelValue:e.appTableColumn,"onUpdate:modelValue":t[1]||(t[1]=E=>e.appTableColumn=E),onChange:e.handleFieldCheck,onSort:e.handleTableColumnSort},null,8,["modelValue","onChange","onSort"])):l.createCommentVNode("",!0)])],2)],2),l.renderSlot(e.$slots,"table-before",{},void 0,!0),l.renderSlot(e.$slots,"table-content",{list:e.tableData},()=>[l.withDirectives((l.openBlock(),l.createBlock(m,l.mergeProps(e.appConfig.tableAttr,{ref:"tableRef",class:"mt10 jwt-table-wrapper",data:e.tableData,"element-loading-spinner":"el-icon-loading","element-loading-text":e.loadingText,height:e.tableHeight,size:e.tableSize},l.toHandlers(e.appConfig.tableEvents),{onCurrentChange:e.handleTableCurrentChange,onHeaderDragend:e.handleTableHeaderDragend,onSelectionChange:e.handleSelectionChange,onSortChange:e.handleSortChange}),{default:l.withCtx(()=>[l.renderSlot(e.$slots,"table-content-before",{},void 0,!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.appTableColumn,(E,T)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:T},[E.checked?(l.openBlock(),l.createBlock(p,l.mergeProps({key:0,align:E.align||"center",fixed:E.fixed},{ref_for:!0},E.attrs,{"min-width":E.minWidth?E.minWidth:null,prop:E.prop,sortable:E.sortable,type:E.type,width:E.width?E.width:null}),l.createSlots({header:l.withCtx(()=>[l.createVNode(f,{item:E,onFixed:F=>e.handleFixedCell(E)},null,8,["item","onFixed"])]),_:2},[E.type?E.type==="expand"?{name:"default",fn:l.withCtx(({row:F})=>[l.renderSlot(e.$slots,E.prop,{index:T,scope:F},void 0,!0)]),key:"1"}:void 0:{name:"default",fn:l.withCtx(({row:F,$index:D})=>[E.action?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(e.$slots,"action-before",{scope:F},void 0,!0),l.createVNode(d,{config:E,"current-path":e.currentPagePath,"menus-obj":e.userMenusAuth,row:F,"show-button-num":e.appConfig.tableButtonNum,onTableAction:R=>e.handleTableAction(R,F,E)},null,8,["config","current-path","menus-obj","row","show-button-num","onTableAction"]),l.renderSlot(e.$slots,"action-after",{scope:F},void 0,!0)],64)):E.isColumn?l.renderSlot(e.$slots,E.prop,{key:1,index:T,scope:F},void 0,!0):(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass([(E==null?void 0:E.columnCls)||"fxmc","w mw"])},[l.renderSlot(e.$slots,E.slotPreName,{scope:F},void 0,!0),l.renderSlot(e.$slots,E.prop,{index:T,scope:F},()=>[l.createVNode(h,{index:D,item:E,row:F,onChange:e.handleEditRowProp,onClickCell:e.handleClickRow},null,8,["index","item","row","onChange","onClickCell"])],!0),l.renderSlot(e.$slots,E.slotSufName,{scope:F},void 0,!0)],2))]),key:"0"}]),1040,["align","fixed","min-width","prop","sortable","type","width"])):l.createCommentVNode("",!0)],64))),128)),l.renderSlot(e.$slots,"table-content-after",{list:e.tableData},void 0,!0)]),_:3},16,["data","element-loading-text","height","size","onCurrentChange","onHeaderDragend","onSelectionChange","onSortChange"])),[[k,e.ajaxLoading]])],!0),l.renderSlot(e.$slots,"table-after",{},void 0,!0),l.createElementVNode("div",d9e,[l.createElementVNode("div",h9e,[l.renderSlot(e.$slots,"table-pagination-before",{data:e.tableStatistics},void 0,!0)]),e.showPagination?(l.openBlock(),l.createBlock(v,l.mergeProps({key:0},e.appConfig.pagination,{class:"app-pagination","current-page":e.pagination.currentPage,disabled:e.ajaxLoading,"page-count":e.pagination.pageCount,"page-size":e.pagination.pageSize,total:e.pagination.totalCount,onCurrentChange:e.handleCurrentChange,onSizeChange:e.handleSizeChange}),null,16,["current-page","disabled","page-count","page-size","total","onCurrentChange","onSizeChange"])):l.createCommentVNode("",!0)]),l.renderSlot(e.$slots,"table-pagination-after",{},void 0,!0)])):l.createCommentVNode("",!0),e.editBoxInfo.visible?(l.openBlock(),l.createBlock(y,{key:1,ref:"editBoxRef","app-config":e.editBoxInfo.config,config:e.editBoxInfo,"selection-row":e.selectionRow,"selection-row-ids":e.selectionRowIds,onAddOption:e.handleAddOption,onAddSuccess:e.handleAddSuccess,onEditSuccess:e.handleEditSuccess,onError:e.handleError,onItemChange:e.handleItemChange,onUploadBtn:e.handleUploadBtn},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),E=>({name:E,fn:l.withCtx(({model:T})=>[l.renderSlot(e.$slots,E,{model:T},void 0,!0)])}))]),1032,["app-config","config","selection-row","selection-row-ids","onAddOption","onAddSuccess","onEditSuccess","onError","onItemChange","onUploadBtn"])):l.createCommentVNode("",!0),e.addBoxInfo.visible?(l.openBlock(),l.createBlock(y,{key:2,ref:"addBoxRef","app-config":e.addBoxInfo.config,config:e.addBoxInfo,onAddOption:e.handleAddOption,onAddSuccess:e.handleAddSuccess,onEditSuccess:e.handleEditSuccess,onError:e.handleError,onUploadBtn:e.handleUploadBtn},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),E=>({name:E,fn:l.withCtx(({model:T})=>[l.renderSlot(e.$slots,E,{model:T},void 0,!0)])}))]),1032,["app-config","config","onAddOption","onAddSuccess","onEditSuccess","onError","onUploadBtn"])):l.createCommentVNode("",!0),e.tableDrawerConfig.visible?(l.openBlock(),l.createBlock(g,l.mergeProps({key:3,modelValue:e.tableDrawerConfig.visible,"onUpdate:modelValue":t[2]||(t[2]=E=>e.tableDrawerConfig.visible=E)},e.tableDrawerConfig.attrs,{class:"jwt-drawer-wrapper","with-header":!1,onClose:e.handleCloseDrawer}),{default:l.withCtx(()=>[l.createVNode(b,{ref:"pageDetailRef",config:e.tableDrawerConfig.config,"current-page-drawer-config":e.tableDrawerConfig.contentConfig,"current-page-path":e.currentPagePath,"keep-alive":!1,"open-page-drawer-config-list":[],"user-menus-auth":e.userMenusAuth,onCloseDrawer:e.handleCloseDrawer,onRefreshTable:e.handleRefreshTable},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),E=>({name:E,fn:l.withCtx(({scope:T,model:F,row:D})=>[l.renderSlot(e.$slots,E,{model:F,row:D,scope:T},void 0,!0)])}))]),1032,["config","current-page-drawer-config","current-page-path","user-menus-auth","onCloseDrawer","onRefreshTable"])]),_:3},16,["modelValue","onClose"])):l.createCommentVNode("",!0)],64)}const g9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn(l9e,[["render",p9e],["__scopeId","data-v-8ee33710"]])},Symbol.toStringTag,{value:"Module"})),m9e=l.defineComponent({name:"JwtTable",components:{TableSizeSetting:gk,TableFieldControl:pk,TableListContent:zE,TableContentControl:LE,TableListContentVirtualized:VE},props:{config:{require:!0,type:Object,default:()=>{}},tableHeight:{type:[String,Number],default:null},userMenusAuth:{type:Object,default:()=>{}},route:{type:Object,default:()=>{}},router:{type:Object,default:()=>{}},userFieldList:{type:Object,default:()=>{}},refMenuId:{type:[Number,String],default:""},pageUrl:{type:String,default:""},tableColumn:{type:Array,default:()=>[]},freezeList:{type:Boolean,default:!0},cacheSearch:{type:Boolean,default:!1}},emits:["selection-change","list-change","header-action","table-action","add-handle","edit-handle","add-success","edit-success","delete-success","table-current-change","tablelist-change","get-detail-success","click-cell","des-edit-success","upload-btn","event-name","copy-success","asynExport","search-result","change-table-column","fixed-table-column","dialog-close","refresh-draw","refresh-table","form-item-change","row-change","dbclick-cell","change-table-rank","after-btns-click","show-file","sort-change"],setup(e,{emit:t}){var ot,Ge,Ct,Zt,Ke;const n=gn(),i={"page-sizes":Im(),"page-size":20,layout:"total, sizes, prev, pager, next, jumper"};let r="";const o=(ot=e==null?void 0:e.config)!=null&&ot.virtualized?l.ref([]):l.shallowRef([]),a=l.shallowRef([]),s=l.reactive({ajaxLoading:!1,submitLoading:!1,renderTable:!0,refreshTable:!1,tableSize:Ai.get("tableSize")||"default",tableFields:null,tableStatistics:[]}),{proxy:u}=l.getCurrentInstance(),c=l.useSlots(),f=l.ref([]),d=l.ref({}),h=l.shallowRef(null),p=l.shallowRef(null),m=l.shallowRef(null),v=l.ref(null),y=l.computed(()=>{var $;return($=v==null?void 0:v.value)==null?void 0:$.tableRef}),b=l.computed(()=>f.value.map($=>$.id).join(",")),g=l.computed(()=>{var $;return(($=p.value)==null?void 0:$.editBoxRefModel)||{}}),k=l.computed(()=>{var $;return(($=m.value)==null?void 0:$.editBoxRefModel)||{}}),_=l.computed(()=>dr("showPagination",e.config)?Le.isFunction(e.config.showPagination)?e.config.showPagination():e.config.showPagination:!0),A=l.computed(()=>dr("headerActionsShow",e.config)?Le.isFunction(e.config.headerActionsShow)?e.config.headerActionsShow():e.config.headerActionsShow:!0),x=l.computed(()=>dr("showHeaderSearch",e.config)?Le.isFunction(e.config.showHeaderSearch)?e.config.showHeaderSearch():e.config.showHeaderSearch:!0),w=Object.freeze({headerActions:{list:[],deleteText:""},headerActionsShow:!0,tableAttr:{stripe:!0,border:!0,fit:!0,highlightCurrentRow:!0,immediate:!0,defaultSort:{prop:"",order:""},sortBy:{key:"",order:""}},virtualized:!1,dragTitleKey:"title",estimatedRowHeight:50,tableEvents:{},tableColumn:[],searchBtnInline:!1,useField:!0,keepAliveTabs:!0,tableListApi:null,tableListParams:{},tableCacheSortOrder:{},tableDeleteApi:null,tableRowEdit:!0,tableDeleteText:"",tableDeleteParams:{},tableExportApi:"",tableExportPathKey:"",tablePrintApi:"",tablePrintPathKey:"http_path",pagination:i,showPagination:!0,hasPagination:!0,showTableLineHeight:!1,showTableDrag:!1,editBoxOnDialog:!0,editBox:{title:Oe("系统"),dialog:{width:"960px",top:"7vh"},form:{api:{add:null,update:null},formAttrs:{},formList:[]},footer:{confirm:{title:Oe("确认"),attrs:{type:"primary"}},cancel:{title:Oe("取消"),attrs:{}}}},tableDrawer:{}});let O=Le.merge({},w,{useField:!0,keepAliveTabs:!0},e.config);const S=()=>{var $;return(($=e==null?void 0:e.config)==null?void 0:$.tablePageSizeName)||"pageSize"},C=l.reactive({currentPage:1,pageCount:1,pageSize:Ai.get(S())||((Ge=O.tableListParams)==null?void 0:Ge[n.pageSizeKey])||O.pagination["page-sizes"][2],totalCount:1,sort:((Ct=O.tableListParams)==null?void 0:Ct.sort)||"id",order:((Zt=O.tableListParams)==null?void 0:Zt.order)||"desc"}),E=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox",refreshTable:!1}),T=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox"}),F={"append-to-body":!0,"destroy-on-close":!0,size:"40%"},D=l.shallowReactive({attrs:{...F},visible:!1,config:{},detailInfo:{},contentConfig:{}}),R=l.computed(()=>O.virtualized?{key:C.sort,order:C.order}:{prop:C.sort,order:C.order==="asc"?"ascending":"descending"}),L=l.computed(()=>{var $;return D.descriptionEdit||($=D==null?void 0:D.attrs)!=null&&$.refresh?l.reactive(D.detailInfo):D.detailInfo}),M=()=>{var de;const $={};for(const Be in e.userMenusAuth){const{id:je}=((de=e.userMenusAuth)==null?void 0:de[Be])||"";je&&($[je]=Be)}return $},X=l.computed(()=>{var de;let $=((de=e==null?void 0:e.route)==null?void 0:de.path)||"";return e!=null&&e.refMenuId&&($=M()[e.refMenuId]),e!=null&&e.pageUrl&&($=e==null?void 0:e.pageUrl),$||""}),ee=l.computed(()=>Oe("加载数据中")||"加载数据中..."),ae=($={})=>{const{query:de}=e.route||{};let Be={...d.value,...$};if((de!=null&&de.fromJump||de!=null&&de.openType)&&!(e!=null&&e.refMenuId)){for(let[je,qe]of Object.entries(de))Le.isArray(qe)?Be[je]=qe.map(at=>+at):Be[je]=qe;Be.openType&&delete Be.openType,delete Be.fromJump}d.value=Be,j($)},N=()=>{var $,de;return{...O.tableListParams||{},[n.pageKey]:C.currentPage,[n.pageSizeKey]:C.pageSize,sort:C.sort||(($=O.tableListParams)==null?void 0:$.sort)||"",order:C.order||((de=O.tableListParams)==null?void 0:de.order)||"",...d.value||{}}},j=($={})=>{const de=N(),Be=Le.merge({},de,$);q(Be)},q=$=>{if(!O.tableListApi){O.tableData&&(o.value=O.tableData);return}s.ajaxLoading=!0,n.request({url:O.tableListApi,method:"get",params:$}).then(de=>{let Be=null;if(O.hasPagination){O!=null&&O.tableListCallback&&Le.isFunction(O.tableListCallback)?Be=O.tableListCallback(de.data,de):Be=de.data,o.value=e.freezeList?l.markRaw(Be.map(qe=>l.markRaw(qe))):Be;let je=de;O!=null&&O.paginationCback&&Le.isFunction(O.paginationCback)&&(je=O.paginationCback(de)),C.pageCount=je==null?void 0:je.totalPage,C.totalCount=je.total,C.currentPage=je.current_page}else Be=de,o.value=e.freezeList?l.markRaw(Be):Be;Be=null,s.tableStatistics=(de==null?void 0:de.statistics)||null,s.ajaxLoading=!1,V(de.data),t("tablelist-change",de.data)}).catch(()=>{s.ajaxLoading=!1})},V=($=[])=>{if(e!=null&&e.refMenuId)return;const{query:{id:de,openType:Be}}=e.route;if(Be&&de&&$.length===1){if(Be==="edit")z($[0],{});else if(Be.includes("Detail")){const je=a.value.find(qe=>{var at;return((at=qe==null?void 0:qe.publicDrawerConfig)==null?void 0:at.openName)===Be});je!=null&&je.id&&t("click-cell",$[0],je)}}},K=()=>{C.currentPage=1;const $={[n.pageKey]:1,[n.pageSizeKey]:C.pageSize};d.value={},l.nextTick(()=>{j($)})},Y=($,de)=>{d.value[$]=de},ne=$=>{var de,Be;C.currentPage=1,(Be=(de=e.config)==null?void 0:de.tableSearch)!=null&&Be.onlyData?d.value={...$}:d.value={...d.value,...$},t("search-result",$),j($)},oe=$=>{C.currentPage=$,j({page:$})},ve=$=>{C.pageSize=$;const de=S();Ai.set(de,$);const Be={[n.pageSizeKey]:$};j(Be)},xe=$=>{f.value=$,t("selection-change",$)},ie=$=>{o.value=o.value.map(de=>(de.selectionChecked=$,de)),$?(f.value=o.value,t("selection-change",o.value)):(f.value=[],t("selection-change",[]))},we=()=>{l.nextTick(()=>{const $=o.value.filter(de=>de.selectionChecked);f.value=$,t("selection-change",$)})},Se=({prop:$,order:de})=>{var je;C.sort=$,C.order=de==="ascending"?"asc":"desc";const Be={sort:$,order:de==="ascending"?"asc":"desc"};de&&((je=O==null?void 0:O.tableListParams)!=null&&je.sorts)&&(Be.sorts=""),t("sort-change",{prop:$,order:de,param:Be,tableFields:s.tableFields}),j(Be)},P=$=>{t("table-current-change",$)},le=()=>{var $,de,Be,je;if(T.visible){T.visible=!1,T.config=null,T.model=null,s.submitLoading=!1;return}D.visible&&Et(),(de=($=E==null?void 0:E.config)==null?void 0:$.api)!=null&&de.refreshDraw&&t("refresh-draw"),((je=(Be=E==null?void 0:E.config)==null?void 0:Be.api)!=null&&je.refreshTable||E!=null&&E.refreshTable)&&t("refresh-table"),E.visible=!1,E.config=null,E.model=null,s.submitLoading=!1,t("list-change"),!E.stopGetList&&j()},ye=($,de)=>{var Be,je,qe;E.visible&&(Be=E==null?void 0:E.config)!=null&&Be.addSuccess&&Le.isFunction((je=E==null?void 0:E.config)==null?void 0:je.addSuccess)&&((qe=E==null?void 0:E.config)==null||qe.addSuccess(d,Y)),le(),t("add-success",$,de)},G=($,de)=>{le(),t("edit-success",$,de)},J=()=>{D.visible=!0},fe=($,de)=>{n.request({url:O.tableCopyApi,method:"post",data:$}).then(()=>{t("copy-success",de),j()})},se=($,de,Be,je=[],qe=!1)=>{Od($,de,Be,{selectionRow:je,cancel:qe,callback:(at,ft)=>{var Qe,Gt;t("des-edit-success",at,ft),de.refreshTable&&Me(),de!=null&&de.refreshDraw&&Bt(),(Gt=(Qe=de==null?void 0:de.api)==null?void 0:Qe.callback)==null||Gt.call(Qe,at)}})},me=($={})=>{const de=N();Xk($,de,{url:O.tablePrintApi,tableData:o.value,proxy:u,tableExportPathKey:O.tableExportPathKey})},ce=($={},de={})=>{const Be=N();Ad($,de,Be,{url:O.tableExportApi,tableData:o.value,proxy:u,selectionRow:f.value,tableExportPathKey:O.tableExportPathKey,beforeExportFun:O.beforeExportFun,tableExportName:O.tableExportName,emit:t,isTemp:!1})},Fe=($={},de={})=>{const Be=N();Ad($,de,Be,{url:O.tableExportApi,tableData:o.value,proxy:u,selectionRow:f.value,tableExportPathKey:O.tableExportPathKey,beforeExportFun:O.beforeExportFun,tableExportName:O.tableExportName,emit:t,isTemp:!0})},be=()=>{var $;if(!(($=O.tableFileImport)!=null&&$.action)){ut.ElMessage.info(Oe("请配置文件上传接口"));return}},_e=($,de,Be=!0)=>{$[`isEdit${de.prop}`]=Be},Ve=($={},de={})=>{const{id:Be}=$,{prop:je,startKey:qe,endKey:at}=de;if(!Be||!je)return;const ft=o.value.findIndex(Pe=>(Pe==null?void 0:Pe.id)===Be);if(ft===-1)return;const Gt={...o.value[ft]||{},...$};qe&&at&&($!=null&&$[je])&&(Gt[qe]=$[je][0],Gt[at]=$[je][1]),o.value=o.value.map((Pe,Ze)=>Ze===ft?Gt:Pe)},st=($={},de={},Be="table")=>{var Nt,bn,wi,On,fn;const{id:je}=$,{prop:qe,refreshTable:at,api:ft}=de;if(Ve($,de),t("row-change",$,de),!je||!O.tableRowEdit)return;const Qe={table:{url:O.tableUpdateApi,des:"tableUpdateApi"},drawDes:{url:((Nt=D==null?void 0:D.api)==null?void 0:Nt.update)||((wi=(bn=D==null?void 0:D.descriptions)==null?void 0:bn.api)==null?void 0:wi.update)||((fn=(On=O==null?void 0:O.tableDrawer)==null?void 0:On.api)==null?void 0:fn.update),des:"drawerConfig.api.update || appConfig.tableDrawer.api.update"}};let Gt=(ft==null?void 0:ft.url)||Qe[Be].url;if(!Gt)return ut.ElMessage.info(`${Oe("请配置编辑接口")}${Qe[Be].des}`);let Pe={id:je};const{startKey:Ze,endKey:yt}=de;if(Ze&&yt?(Pe[Ze]=sf($[qe][0]),Pe[yt]=sf($[qe][1])):Pe[qe]=sf($[qe]),ft!=null&&ft.params){const zi=Le.isFunction(ft.params)?ft.params($,Pe):ft.params;Pe={...Pe,...zi}}n.request({url:Gt,method:"post",data:Pe}).then(()=>{$[`isEdit${qe}`]=!1,Ve($,de),Be==="drawDes"&&(s.refreshTable=!0),at&&Me(),t("des-edit-success",de)})},et=$=>{t("dbclick-cell",$)},Et=($="")=>{if(!D.visible){t("refresh-draw");return}const{url:de,row:Be,searchKey:je,valueKey:qe}=D.params||{};if(!de)return ut.ElMessage.info(Oe("请配置详情接口"));const at={};at[je]=$||or(qe,Be),n.request({url:de,method:"get",params:at}).then(ft=>{D.detailInfo=ft})},Bt=($="")=>{Et($),s.refreshTable=!0},bt=($,de)=>{var at,ft,Qe,Gt,Pe;const Be=Le.merge({},F,((at=de.drawerConfig)==null?void 0:at.attrs)||{});D.attrs=Be;const je=(ft=de==null?void 0:de.drawerConfig)==null?void 0:ft.tabPaneName,qe=(Qe=de==null?void 0:de.drawerConfig)==null?void 0:Qe.desListName;je&&(O!=null&&O.tableDrawer[je])&&(D.config={...O==null?void 0:O.tableDrawer[je],api:Le.merge({},((Gt=O==null?void 0:O.tableDrawer)==null?void 0:Gt.api)||{},((Pe=de.drawerConfig)==null?void 0:Pe.api)||{}),attrs:Be,descriptions:qe&&(O!=null&&O.tableDrawer[qe])?O==null?void 0:O.tableDrawer[qe]:{}}),D.detailInfo=$,D.contentConfig={row:l.toRaw($),item:l.toRaw(de)},l.nextTick(()=>{D.visible=!0})},Kt=($,de)=>{var Be;t("click-cell",$,de),de.drawerConfig?bt($,de):((Be=de==null?void 0:de.actions)==null?void 0:Be.type)==="editBox"&&z($,de.actions)},gt=$=>{t("show-file",$)},Ne=()=>{},he=()=>{s.refreshTable&&(j(),s.refreshTable=!1),D.visible=!1},Ee=$=>{t("upload-btn",$)},Te=($,de,Be,je)=>{t("after-btns-click",$,de,Be,je)},ze=()=>{var $;($=O==null?void 0:O.tableFileImport)!=null&&$.refreshTable&&Me()},He=(...$)=>{t("event-name",...$)},rt=$=>{const de=$==null?void 0:$.action;I("",de)},ct=($,de)=>{T.visible?m.value.setModelVal($,de):p.value.setModelVal($,de)},dt=($,de)=>{T.visible?m.value.handleSetModelVal($,de):p.value.handleSetModelVal($,de)},vt=($="editBoxInfo")=>{$==="editBoxInfo"?(E.model={},E.config={}):$==="addBoxInfo"&&(T.model={},T.config={}),t("dialog-close")},Vt=$=>{s.tableSize=$,Ai.set("tableSize",$)},Yt=($,de,Be)=>{if(s.tableFields){const je=a.value.find(qe=>qe.prop===Be.property);je!=null&&je.id&&t("change-table-column","width",{width:$,column:je})}},Xt=$=>{s.tableFields&&(t("change-table-column","toggle",$),$.checked=!$.checked)},Kn=()=>{s.tableFields&&t("change-table-column","draggable",a.value)},xn=($,de)=>{o.value=o.value.map((Be,je)=>({...Be,rank:de+je})),l.nextTick(()=>{t("change-table-rank",o.value)})},Yn=($,de)=>{s.tableFields&&(t("change-table-column",$,de),de.fixed=!de.fixed)},_t=()=>{h.value.formReset()},An=($,de)=>{h.value.setModelVal($,de)},ln=()=>{var je,qe,at;const{path:$}=(e==null?void 0:e.route)||{},de=(e==null?void 0:e.refMenuId)||((qe=(je=e.userMenusAuth)==null?void 0:je[$])==null?void 0:qe.id);return((at=e==null?void 0:e.config)==null?void 0:at.useField)&&(e==null?void 0:e.userFieldList[de])||null},Rn=()=>{var de,Be,je;return((je=(Be=(de=e.userMenusAuth)==null?void 0:de[X.value])==null?void 0:Be.operations)==null?void 0:je.filter(qe=>qe==null?void 0:qe.show_table))||[]},Xn=()=>{var je,qe;let $=[];const de=ln();s.tableFields=de,((je=e==null?void 0:e.tableColumn)!=null&&je.length?e==null?void 0:e.tableColumn:(qe=e==null?void 0:e.config)==null?void 0:qe.tableColumn).forEach(at=>{var Pe,Ze,yt,Nt,bn,wi;const ft=Le.isFunction(at.label)?at.label():at.label,Qe={...at,label:Oe(ft),tips:Le.isFunction(at.tips)?at.tips():Oe(at.tips)};Qe.isEdit=!!(Qe.editType||Qe.dateTimeFormat||Qe.isImg||Qe.isImgs||Qe.editTypeFun);let Gt=!0;if(Qe.isOperate){const On=Rn(),fn=Qe.fixed==="right"&&(((Pe=Qe==null?void 0:Qe.action)==null?void 0:Pe.list)||[]);On!=null&&On.length&&fn.length?Gt=On.some(zi=>fn.includes(zi.code)):Gt=!1}de?(de[Qe.prop]&&$.push({...Qe,...de[Qe.prop],label:Qe!=null&&Qe.customLabel?Qe.label:((Ze=de[Qe.prop])==null?void 0:Ze.label)||Qe.label,isControl:!0,fixed:!!((yt=de[Qe.prop])!=null&&yt.is_fixed),checked:Qe.hide?!1:!!de[Qe.prop].is_show,width:((Nt=de[Qe.prop])==null?void 0:Nt.width)||(Qe==null?void 0:Qe.width)||"",sortable:(bn=de[Qe.prop])!=null&&bn.support_sort?"custome":!1}),Qe.isOperate&&$.push({...Qe,rank:Qe!=null&&Qe.type?-1/0:1/0,checked:(Qe==null?void 0:Qe.type)||Gt,isControl:!1,fixed:(Qe==null?void 0:Qe.fixed)||"",width:((wi=de[Qe.prop])==null?void 0:wi.width)||(Qe==null?void 0:Qe.width)||""})):$.push({...Qe,checked:Qe.isOperate?Gt:!Qe.hide})}),de&&($=$.sort((at,ft)=>at.rank-ft.rank)),a.value=$},rr=()=>{var Be,je,qe;const $={},de=ln();if(de&&Le.isObject(de))for(const[at,ft]of Object.entries(de))ft.is_default_sort&&($.sort=at,$.order=ft.sort);(Be=O==null?void 0:O.tableCacheSortOrder)!=null&&Be.order&&($.order=(je=O==null?void 0:O.tableCacheSortOrder)==null?void 0:je.order,$.sort=(qe=O==null?void 0:O.tableCacheSortOrder)==null?void 0:qe.sort),$!=null&&$.order&&(C.sort=$.sort,C.order=$.order)},In=async()=>await p.value.createSubmitData(),tt=()=>{Xn()},Li=($,de,Be)=>{$&&n.request({url:$,method:"get",params:{}}).then(je=>{de==null||de(je,Be.model)})},Ti=($={},de={})=>{var qe;const Be=$.formList;let je=Be;return s.tableFields&&(je=Be.filter(at=>{const ft=!at.privacyId||!!s.tableFields[at.privacyId];return($==null?void 0:$.privacyKey)==="disabled"?(at.formAttrs={...at.formAttrs,disabled:!ft},!0):ft})),(qe=$==null?void 0:$.beforeCreate)!=null&&qe.formatFormList&&Le.isFunction($.beforeCreate.formatFormList)&&(je=$.beforeCreate.formatFormList(je,de)),je},Br=async($,de,Be={},je)=>{const qe={id:$.id,...Be};n.request({url:O[de].form.api.detail,method:"get",params:qe}).then(at=>{var ft,Qe,Gt,Pe;je?E.model=je(at):E.model=at,(ft=O[de].form.api)!=null&&ft.detailCallback&&Le.isFunction((Qe=O[de].form.api)==null?void 0:Qe.detailCallback)&&((Pe=(Gt=O[de].form.api)==null?void 0:Gt.detailCallback)==null||Pe.call(Gt,at)),E.title=Td(!0,O,de,Oe),t("get-detail-success",at)})},B={filterFormList:Ti,handleGetDetail:Br,handleBeforeCreateReq:Li,t:Oe},z=($,de)=>{ya($,de,O,E,B),l.nextTick(()=>{O.editBoxOnDialog?E.visible=!0:J()})},I=($,de)=>{ya($,de,O,T,B),T.visible=!0},H=($="",de,Be,je)=>{n.request({url:$||O.tableDeleteApi,method:"post",data:de}).then(()=>{t("delete-success",je),j(),Be!=null&&Be.refreshDraw&&Bt()})},re={deleteText:((Ke=O==null?void 0:O.headerActions)==null?void 0:Ke.deleteText)||"",tableCopyText:O.tableCopyText,handleEdit:z,handleLinkRouter:Rm,t:Oe,emit:t,handleDeleteRequest:H,handleExportRequest:ce,handleExportTempRequest:Fe,handlePrintRequest:me,handleImportRequest:be,handleSimpleRequest:se,handleCopyRequest:fe},Q=($,de={},Be=null)=>{var at,ft,Qe;const{code:je}=$,qe=Be||((at=O.headerActions)==null?void 0:at[je])||((Qe=(ft=D==null?void 0:D.descriptions)==null?void 0:ft.headerActions)==null?void 0:Qe[je]);ns($,de,qe,f.value,"tableHeader",re),t("header-action",$,f.value,L.value,qe)},U=($,de,Be)=>{const{action:je}=$,qe=Be.action[je.code];ns(je,de,qe,f.value,"",{...re,deleteText:O.tableDeleteText}),t("table-action",je,de,qe,$)},Z=l.watchEffect(()=>{}),Ce=l.watch(e,$=>{O=Le.merge({},w,$.config),$.config.tableData&&(o.value=$.config.tableData||[])}),Me=()=>{j(),t("refresh-table")},te=($,de,Be)=>{t("form-item-change",$,de,Be)},ge=async()=>{var Be;const $=await((Be=h==null?void 0:h.value)==null?void 0:Be.createSubmitData());for(const je in $)$[je]===""&&delete $[je];const de=ke(!1);return de&&(Object.assign($,de),h.value.handleSetModelValue($)),$},ke=($=!1)=>{var de;if(e.cacheSearch){const Be=r||X.value;return((de=n==null?void 0:n.handleCacheSearch)==null?void 0:de.call(n,Be,$,$?d.value:null))||null}return null},Re=l.watch(()=>X.value,($,de)=>{$!==r&&(r=de)});l.onMounted(async()=>{var de;const $=await ge();d.value=$,rr(),Xn(),(de=O.tableAttr)!=null&&de.immediate&&ae()});function We(){O=null,o.value=null,a.value=null,d.value=null,s.tableFields=null,f.value=null,s.renderTable=!1}return l.onBeforeUnmount(()=>{ke(!0),Z(),Ce(),We(),Re()}),{tableRef:y,tableListContentRef:v,tableData:o,appTableColumn:a,slots:c,...l.toRefs(s),currentPagePath:X,appConfig:O,pagination:C,editBoxRef:p,editBoxRefModel:g,editBoxInfo:E,addBoxInfo:T,addBoxRef:m,addBoxRefModel:k,tableDrawerConfig:D,selectionRow:f,selectionRowIds:b,tableSearchModel:d,loadingText:ee,searchFormRef:h,showPagination:_,showHeaderActions:A,showHeaderSearch:x,defaultSort:R,onSearchSubmit:ne,onSearchReset:K,handleEdit:z,handleCurrentChange:oe,handleSizeChange:ve,handleSelectionChange:xe,handleTableCurrentChange:P,handleSortChange:Se,handleHeaderAction:Q,handleTableAction:U,handleGetDetail:Br,getList:j,initSearch:ae,handleError:Ne,handleAddSuccess:ye,handleEditSuccess:G,handleEditRow:_e,handleEditRowProp:st,handleImportRequest:be,handleClickRow:Kt,handleShowFile:gt,handleCloseDrawer:he,handleUploadBtn:Ee,handleUploadSuccess:ze,handleRefreshDrawerDetail:Bt,handleComponentEvent:He,handleAddOption:rt,setFormModelVal:ct,handleSetFormModelVal:dt,handleSetSearchModelVal:An,handleDialogClose:vt,handleTableSizeChange:Vt,handleTableHeaderDragend:Yt,handleFieldCheck:Xt,handleTableColumnSort:Kn,handleSearchFormReset:_t,getSubmitData:In,handleFixedCell:Yn,handleDoLayoutTable:tt,handleItemChange:te,handleDbCellClick:et,handleTableDataSort:xn,handleAfterBtnsClick:Te,handleSelectionHeaderChange:ie,handleSelectionColumnChange:we}}}),v9e={key:0,class:"app-table-wrapper"},y9e={key:0,class:"table-header-wrapper fx"},b9e={class:"fxm pr10 ex"},k9e={class:"fxmj"},w9e={class:"ex"};function _9e(e,t,n,i,r,o){var b,g,k,_,A,x,w,O,S;const a=l.resolveComponent("jwt-form"),s=l.resolveComponent("jwt-header-button"),u=l.resolveComponent("TableSizeSetting"),c=l.resolveComponent("TableFieldControl"),f=l.resolveComponent("TableContentControl"),d=l.resolveComponent("TableListContentVirtualized"),h=l.resolveComponent("TableListContent"),p=l.resolveComponent("el-pagination"),m=l.resolveComponent("JwtDialogForm"),v=l.resolveComponent("jwt-detail-drawer"),y=l.resolveComponent("el-drawer");return l.openBlock(),l.createElementBlock(l.Fragment,null,[e.renderTable?(l.openBlock(),l.createElementBlock("div",v9e,[l.createElementVNode("div",{class:l.normalizeClass([(b=e.appConfig)!=null&&b.searchBtnInline?"fxmj":""])},[l.renderSlot(e.$slots,"search-before",{},void 0,!0),e.showHeaderSearch?(l.openBlock(),l.createElementBlock("div",y9e,[t[0]||(l.setBlockTracking(-1,!0),(t[0]=(_=(k=(g=e.config)==null?void 0:g.tableSearch)==null?void 0:k.formList)!=null&&_.length?(l.openBlock(),l.createBlock(a,{key:0,ref:"searchFormRef",modelValue:e.tableSearchModel,"onUpdate:modelValue":C=>e.tableSearchModel=C,class:"app-table-search",config:(A=e.config)==null?void 0:A.tableSearch,"is-search":"",onReset:e.onSearchReset,onSubmit:e.onSearchSubmit},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({model:E})=>[l.renderSlot(e.$slots,C,{model:E},void 0,!0)])}))]),1032,["modelValue","onUpdate:modelValue","config","onReset","onSubmit"])):l.createCommentVNode("",!0)).cacheIndex=0,l.setBlockTracking(1),t[0]),l.renderSlot(e.$slots,"search-form-after",{},void 0,!0)])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"search-after",{},void 0,!0),l.createElementVNode("div",{class:l.normalizeClass(["fxmj",[(x=e.appConfig)!=null&&x.searchBtnInline?"mb18":""]])},[l.createElementVNode("div",b9e,[l.renderSlot(e.$slots,"header-button-before",{},void 0,!0),e.showHeaderActions?(l.openBlock(),l.createBlock(s,{key:0,config:((w=e.config)==null?void 0:w.headerActions)||{},"current-path":e.currentPagePath,"file-import":e.appConfig.tableFileImport,loading:e.ajaxLoading,"menus-obj":e.userMenusAuth,"total-count":e.pagination.totalCount,"selection-row":e.selectionRow,"upload-success-cb":e.appConfig.uploadSuccessCb,onHeaderAction:e.handleHeaderAction,onUploadSuccess:e.handleUploadSuccess},null,8,["config","current-path","file-import","loading","menus-obj","total-count","selection-row","upload-success-cb","onHeaderAction","onUploadSuccess"])):l.createCommentVNode("",!0),l.renderSlot(e.$slots,"header-button-after",{},void 0,!0)]),l.createElementVNode("div",null,[e.appConfig.showTableLineHeight?(l.openBlock(),l.createBlock(u,{key:0,onTableSize:e.handleTableSizeChange},null,8,["onTableSize"])):l.createCommentVNode("",!0),e.tableFields?(l.openBlock(),l.createBlock(c,{key:1,modelValue:e.appTableColumn,"onUpdate:modelValue":t[1]||(t[1]=C=>e.appTableColumn=C),onChange:e.handleFieldCheck,onSort:e.handleTableColumnSort},null,8,["modelValue","onChange","onSort"])):l.createCommentVNode("",!0),(O=e.appConfig)!=null&&O.showTableDrag&&((S=e.tableData)!=null&&S.length)?(l.openBlock(),l.createBlock(f,{key:2,modelValue:e.tableData,"onUpdate:modelValue":t[2]||(t[2]=C=>e.tableData=C),"drag-title-key":e.appConfig.dragTitleKey,onSort:e.handleTableDataSort},null,8,["modelValue","drag-title-key","onSort"])):l.createCommentVNode("",!0)])],2)],2),l.renderSlot(e.$slots,"table-before",{},void 0,!0),l.renderSlot(e.$slots,"table-content",{list:e.tableData},()=>[e.appConfig.virtualized?(l.openBlock(),l.createBlock(d,{key:0,"ajax-loading":e.ajaxLoading,"app-table-column":e.appTableColumn,"current-page-path":e.currentPagePath,"default-sort":e.defaultSort,"estimated-row-height":e.appConfig.estimatedRowHeight,"loading-text":e.loadingText,pagination:e.pagination,"table-attr":e.appConfig.tableAttr,"table-button-num":e.appConfig.tableButtonNum,"table-data":e.tableData,"table-events":e.appConfig.tableEvents,"table-height":e.tableHeight,"table-size":e.tableSize,"user-menus-auth":e.userMenusAuth,onChangeTableColumn:e.handleFixedCell,onClickCell:e.handleClickRow,onDbclickCell:e.handleDbCellClick,onEditRow:e.handleEditRowProp,onSelectionColumnChange:e.handleSelectionColumnChange,onSelectionHeaderChange:e.handleSelectionHeaderChange,onSortChange:e.handleSortChange,onTableAction:e.handleTableAction,onShowFile:e.handleShowFile},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({scope:E,data:T,list:F,index:D,rowindex:R,pagestart:L})=>[l.renderSlot(e.$slots,C,{data:T,index:D,list:F,rowindex:R,pagestart:L,scope:E},void 0,!0)])}))]),1032,["ajax-loading","app-table-column","current-page-path","default-sort","estimated-row-height","loading-text","pagination","table-attr","table-button-num","table-data","table-events","table-height","table-size","user-menus-auth","onChangeTableColumn","onClickCell","onDbclickCell","onEditRow","onSelectionColumnChange","onSelectionHeaderChange","onSortChange","onTableAction","onShowFile"])):(l.openBlock(),l.createBlock(h,{key:1,ref:"tableListContentRef","ajax-loading":e.ajaxLoading,"app-table-column":e.appTableColumn,"current-page-path":e.currentPagePath,"default-sort":e.defaultSort,"loading-text":e.loadingText,"table-attr":e.appConfig.tableAttr,"table-button-num":e.appConfig.tableButtonNum,"table-data":e.tableData,"table-events":e.appConfig.tableEvents,"table-height":e.tableHeight,"table-size":e.tableSize,"user-menus-auth":e.userMenusAuth,pagination:e.pagination,onChangeTableColumn:e.handleFixedCell,onClickCell:e.handleClickRow,onDbclickCell:e.handleDbCellClick,onEditRow:e.handleEditRowProp,onHeaderDragend:e.handleTableHeaderDragend,onSelectionChange:e.handleSelectionChange,onSortChange:e.handleSortChange,onTableAction:e.handleTableAction,onTableCurrentChange:e.handleTableCurrentChange,onShowFile:e.handleShowFile},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({scope:E,data:T,list:F,index:D,rowindex:R,pagestart:L})=>[l.renderSlot(e.$slots,C,{data:T,index:D,list:F,rowindex:R,pagestart:L,scope:E},void 0,!0)])}))]),1032,["ajax-loading","app-table-column","current-page-path","default-sort","loading-text","table-attr","table-button-num","table-data","table-events","table-height","table-size","user-menus-auth","pagination","onChangeTableColumn","onClickCell","onDbclickCell","onEditRow","onHeaderDragend","onSelectionChange","onSortChange","onTableAction","onTableCurrentChange","onShowFile"]))],!0),l.renderSlot(e.$slots,"table-after",{},void 0,!0),l.createElementVNode("div",k9e,[l.createElementVNode("div",w9e,[l.renderSlot(e.$slots,"table-pagination-before",{data:e.tableStatistics},void 0,!0)]),e.showPagination?(l.openBlock(),l.createBlock(p,l.mergeProps({key:0},e.appConfig.pagination,{class:"app-pagination","current-page":e.pagination.currentPage,disabled:e.ajaxLoading,"page-count":e.pagination.pageCount,"page-size":e.pagination.pageSize,total:e.pagination.totalCount,onCurrentChange:e.handleCurrentChange,onSizeChange:e.handleSizeChange}),null,16,["current-page","disabled","page-count","page-size","total","onCurrentChange","onSizeChange"])):l.createCommentVNode("",!0)]),l.renderSlot(e.$slots,"table-pagination-after",{},void 0,!0)])):l.createCommentVNode("",!0),e.editBoxInfo.visible?(l.openBlock(),l.createBlock(m,{key:1,ref:"editBoxRef","app-config":e.editBoxInfo.config,config:e.editBoxInfo,"selection-row":e.selectionRow,"selection-row-ids":e.selectionRowIds,onAddOption:e.handleAddOption,onAddSuccess:e.handleAddSuccess,onDialogClose:e.handleDialogClose,onEditSuccess:e.handleEditSuccess,onError:e.handleError,onItemChange:e.handleItemChange,onUploadBtn:e.handleUploadBtn,onAfterBtnsClick:e.handleAfterBtnsClick},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({model:E})=>[l.renderSlot(e.$slots,C,{model:E},void 0,!0)])}))]),1032,["app-config","config","selection-row","selection-row-ids","onAddOption","onAddSuccess","onDialogClose","onEditSuccess","onError","onItemChange","onUploadBtn","onAfterBtnsClick"])):l.createCommentVNode("",!0),e.addBoxInfo.visible?(l.openBlock(),l.createBlock(m,{key:2,ref:"addBoxRef","app-config":e.addBoxInfo.config,config:e.addBoxInfo,onAddOption:e.handleAddOption,onAddSuccess:e.handleAddSuccess,onDialogClose:e.handleDialogClose,onEditSuccess:e.handleEditSuccess,onError:e.handleError,onUploadBtn:e.handleUploadBtn},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({model:E})=>[l.renderSlot(e.$slots,C,{model:E},void 0,!0)])}))]),1032,["app-config","config","onAddOption","onAddSuccess","onDialogClose","onEditSuccess","onError","onUploadBtn"])):l.createCommentVNode("",!0),e.tableDrawerConfig.visible?(l.openBlock(),l.createBlock(y,l.mergeProps({key:3,modelValue:e.tableDrawerConfig.visible,"onUpdate:modelValue":t[3]||(t[3]=C=>e.tableDrawerConfig.visible=C)},e.tableDrawerConfig.attrs,{class:"jwt-drawer-wrapper","with-header":!1,onClose:e.handleCloseDrawer}),{default:l.withCtx(()=>[l.createVNode(v,{ref:"pageDetailRef",config:e.tableDrawerConfig.config,"current-page-drawer-config":e.tableDrawerConfig.contentConfig,"current-page-path":e.currentPagePath,"keep-alive":!1,"open-page-drawer-config-list":[],"user-menus-auth":e.userMenusAuth,onCloseDrawer:e.handleCloseDrawer,onRefreshTable:e.handleRefreshTable},l.createSlots({_:2},[l.renderList(Object.keys(e.slots),C=>({name:C,fn:l.withCtx(({scope:E,model:T,row:F})=>[l.renderSlot(e.$slots,C,{model:T,row:F,scope:E},void 0,!0)])}))]),1032,["config","current-page-drawer-config","current-page-path","user-menus-auth","onCloseDrawer","onRefreshTable"])]),_:3},16,["modelValue","onClose"])):l.createCommentVNode("",!0)],64)}const C9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn(m9e,[["render",_9e],["__scopeId","data-v-296da7f4"]])},Symbol.toStringTag,{value:"Module"})),S9e={"page-sizes":[10,20,30,40,50,100],"page-size":10,layout:"total, sizes, prev, pager, next, jumper"},x9e=l.defineComponent({name:"JwtTableOnly",components:{},props:{config:{require:!0,type:Object,default:()=>{}},tableHeight:{type:[String,Number],default:null},userMenusAuth:{type:Object,default:()=>{}}},emits:["selection-change","list-change","header-action","table-action","add-handle","edit-handle","add-success","edit-success","delete-success","table-current-change","tablelist-change","get-detail-success"],setup(e,{emit:t}){const n=gn(),i=l.reactive({tableData:[],ajaxLoading:!1,submitLoading:!1});let r=l.reactive(Le.merge({tableAttr:{stripe:!0,border:!0,fit:!0,highlightCurrentRow:!0},tableColumn:[],tableListApi:null,tableListParams:{},tableDeleteApi:null,tableDeleteParams:{},pagination:S9e,showPagination:!0},e.config));const o=l.reactive({currentPage:1,pageCount:1,pageSize:r.pagination["page-sizes"][0],totalCount:1,sort:"id",order:"desc"}),a=l.ref([]),s=l.ref({}),u=l.ref(null),c=l.computed(()=>e.userMenusAuth||{}),f=()=>{d()},d=()=>{const O=Le.merge({page:o.currentPage,per_page:o.pageSize,sort:o.sort,order:o.order},r.tableListParams,s.value);h(O)},h=O=>{if(!r.tableListApi){r.tableData&&(i.tableData=r.tableData);return}i.ajaxLoading=!0,n.request({url:r.tableListApi,method:"get",params:O}).then(S=>{i.tableData=S.data,o.pageCount=S.totalPage,o.totalCount=S.total,i.ajaxLoading=!1,t("tablelist-change")})},p=()=>{o.currentPage=1,o.pageSize=r.pagination["page-sizes"][0],d()},m=()=>{o.currentPage=1,o.pageSize=r.pagination["page-sizes"][0],d(s.value)},v=O=>{o.currentPage=O,d()},y=O=>{o.pageSize=O,d()},b=(O,S="")=>O===null||O===""||O===void 0?"-":S?va(O).format(S):O,g=O=>{a.value=O,t("selection-change",O)},k=({prop:O,order:S})=>{o.sort=O,o.order=S==="ascending"?"asc":"desc",d()},_=O=>{t("table-current-change",O)},A=(O,S,C=!0)=>{O[`isEdit${S.prop}`]=C},x=(O,S)=>{const{id:C}=O,{prop:E}=S;if(C){var T={id:C};if(T[E]=O[E],!r.tableUpdateApi)return ut.ElMessage.info("请配置编辑接口!tableUpdateApi");n.request({url:r.tableUpdateApi,method:"post",data:T}).then(()=>{O[`isEdit${E}`]=!1})}},w=O=>n.fillUrl&&cn.isFunction(n.fillUrl)?n.fillUrl(O):O;return l.watch(e,O=>{r=Le.merge(r,O.config),O.config.tableData&&(i.tableData=O.config.tableData||[])}),l.onBeforeMount(()=>{f()}),{...l.toRefs(i),appConfig:r,pagination:o,selectionRow:a,tableSearchModel:s,editBoxRef:u,dayjs:va,userMenusAuthObj:c,onSearchSubmit:m,onSearchReset:p,handleCurrentChange:v,handleSizeChange:y,handleSelectionChange:g,handleTableCurrentChange:_,handleSortChange:k,filterVal:b,initSearch:f,handleEditRow:A,handleEditRowProp:x,handleFillUrl:w}}}),E9e={class:"app-table-wrapper"},B9e=["onDblclick"],D9e={class:"image-slot wh fxmc"},T9e={class:"fxr"};function A9e(e,t,n,i,r,o){const a=l.resolveComponent("el-input"),s=l.resolveComponent("el-input-number"),u=l.resolveComponent("jwt-upload-image"),c=l.resolveComponent("el-switch"),f=l.resolveComponent("jwt-icon"),d=l.resolveComponent("el-image"),h=l.resolveComponent("el-table-column"),p=l.resolveComponent("el-table"),m=l.resolveComponent("el-pagination"),v=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",E9e,[l.renderSlot(e.$slots,"table-before",{},void 0,!0),l.withDirectives((l.openBlock(),l.createBlock(p,l.mergeProps(e.appConfig.tableAttr,{ref:"tableRef",class:"mt15",data:e.tableData,"element-loading-spinner":"el-icon-loading","element-loading-text":"加载数据中...",height:e.tableHeight,onCurrentChange:e.handleTableCurrentChange,onSelectionChange:e.handleSelectionChange,onSortChange:e.handleSortChange}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.appConfig.tableColumn,(y,b)=>(l.openBlock(),l.createBlock(h,{key:b,align:y.align||"center",fixed:y.fixed,label:y.label,"min-width":y.minWidth?y.minWidth:null,prop:y.prop,sortable:y.sortable,type:y.type,width:y.width?y.width:null},l.createSlots({_:2},[y.type?void 0:{name:"default",fn:l.withCtx(({row:g,$index:k})=>[y.dateTimeFormat?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createTextVNode(l.toDisplayString(e.filterVal(g[y.prop],y.dateTimeFormat)),1)],64)):y.editType?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[y.editType==="input"?(l.openBlock(),l.createBlock(a,{key:0,modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,type:"text",onKeydown:l.withKeys(_=>e.handleEditRowProp(g,y),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])):y.editType==="inputNumber"?(l.openBlock(),l.createBlock(s,{key:1,modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,"controls-position":"right",min:0,onBlur:_=>e.handleEditRowProp(g,y)},null,8,["modelValue","onUpdate:modelValue","onBlur"])):y.editType==="uploadImg"?(l.openBlock(),l.createBlock(u,{key:2,modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,onOnChange:_=>e.handleEditRowProp(g,y)},null,8,["modelValue","onUpdate:modelValue","onOnChange"])):y.editType==="switch"?(l.openBlock(),l.createBlock(c,{key:3,modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,"active-value":1,"inactive-value":0,onChange:_=>e.handleEditRowProp(g,y)},null,8,["modelValue","onUpdate:modelValue","onChange"])):l.createCommentVNode("",!0)],64)):y.editInput?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.withDirectives(l.createElementVNode("div",{onDblclick:_=>e.handleEditRow(g,y)},l.toDisplayString(e.filterVal(g[y.prop])),41,B9e),[[l.vShow,!g[`isEdit${y.prop}`]]]),l.withDirectives(l.createVNode(a,{modelValue:g[y.prop],"onUpdate:modelValue":_=>g[y.prop]=_,type:"text",onBlur:_=>e.handleEditRowProp(g,y),onKeyup:l.withKeys(_=>e.handleEditRowProp(g,y),["enter"])},null,8,["modelValue","onUpdate:modelValue","onBlur","onKeyup"]),[[l.vShow,g[`isEdit${y.prop}`]]])],64)):y.isImg?(l.openBlock(),l.createBlock(d,{key:3,"preview-src-list":[e.handleFillUrl(g[y.prop])],"preview-teleported":"",size:80,src:e.handleFillUrl(g[y.prop]),teleported:""},{error:l.withCtx(()=>[l.createElementVNode("div",D9e,[l.createVNode(f,{class:"g9",icon:"image-line",style:{"font-size":"40px"}})])]),_:1},8,["preview-src-list","src"])):l.renderSlot(e.$slots,y.prop,{key:4,index:k,scope:g},()=>[l.createTextVNode(l.toDisplayString(e.filterVal(g[y.prop])),1)],!0)]),key:"0"}]),1032,["align","fixed","label","min-width","prop","sortable","type","width"]))),128))]),_:3},16,["data","height","onCurrentChange","onSelectionChange","onSortChange"])),[[v,e.ajaxLoading]]),l.createElementVNode("div",T9e,[e.appConfig.showPagination?(l.openBlock(),l.createBlock(m,l.mergeProps({key:0},e.appConfig.pagination,{class:"app-pagination","current-page":e.pagination.currentPage,disabled:e.ajaxLoading,"page-count":e.pagination.pageCount,"page-size":e.pagination.pageSize,total:e.pagination.totalCount,onCurrentChange:e.handleCurrentChange,onSizeChange:e.handleSizeChange}),null,16,["current-page","disabled","page-count","page-size","total","onCurrentChange","onSizeChange"])):l.createCommentVNode("",!0)])])}const O9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn(x9e,[["render",A9e],["__scopeId","data-v-3311d9e5"]])},Symbol.toStringTag,{value:"Module"}));function F9e(e){const t=gn(),{route:n,refMenuId:i,config:r,onGetList:o,emit:a}=e,s=l.ref({}),u=l.ref(null);let c="";return{tableSearchModel:s,searchFormRef:u,initSearch:(k={})=>{const{query:_}=n||{};let A={...s.value,...k};if((_!=null&&_.fromJump||_!=null&&_.openType)&&!i){for(let[x,w]of Object.entries(_))Le.isArray(w)?A[x]=w.map(O=>+O):A[x]=w;A.openType&&delete A.openType,delete A.fromJump}s.value=A,o(k)},onSearchReset:()=>{const k={[t.pageKey]:1};s.value={},l.nextTick(()=>{o(k)})},onSearchSubmit:k=>{var _;(_=r==null?void 0:r.tableSearch)!=null&&_.onlyData?s.value={...k}:s.value={...s.value,...k},a("search-result",k),o(k)},handleSetSearchModel:(k,_)=>{s.value[k]=_},handleSearchFormReset:()=>{var k,_;(_=(k=u.value)==null?void 0:k.formReset)==null||_.call(k)},handleSetSearchModelVal:(k,_)=>{var A,x;(x=(A=u.value)==null?void 0:A.setModelVal)==null||x.call(A,k,_)},handleCacheSearch:(k=!1,_)=>{var A;if(e.cacheSearch){const x=c||_;return((A=t==null?void 0:t.handleCacheSearch)==null?void 0:A.call(t,x,k,k?s.value:null))||null}return null},handleInitTableSearchData:async()=>{var _,A;const k=await((A=(_=u==null?void 0:u.value)==null?void 0:_.createSubmitData)==null?void 0:A.call(_))||{};for(const x in k)k[x]===""&&delete k[x];return k},setLastPagePath:k=>{c=k}}}function P9e(e){var p,m,v;const t=gn(),{config:n,onGetList:i}=e,r={"page-sizes":Im(),"page-size":20,layout:"total, sizes, prev, pager, next, jumper"},o=()=>(n==null?void 0:n.tablePageSizeName)||"pageSize",a=l.reactive({currentPage:1,pageCount:1,pageSize:Ai.get(o())||((p=n==null?void 0:n.tableListParams)==null?void 0:p[t.pageSizeKey])||r["page-sizes"][2],totalCount:1,sort:((m=n==null?void 0:n.tableListParams)==null?void 0:m.sort)||"id",order:((v=n==null?void 0:n.tableListParams)==null?void 0:v.order)||"desc"});return{pagination:a,paginationDefault:r,handlePageSearchParams:(y,b={})=>({...b||{},[t.pageKey]:a.currentPage,[t.pageSizeKey]:a.pageSize,sort:a.sort||(b==null?void 0:b.sort)||"",order:a.order||(b==null?void 0:b.order)||"",...y||{}}),handleCurrentChange:y=>{a.currentPage=y,i({page:y})},handleSizeChange:y=>{a.pageSize=y;const b=o();Ai.set(b,y);const g={[t.pageSizeKey]:y};i(g)},resetPagination:()=>{a.currentPage=1},updatePagination:y=>{y.pageCount!==void 0&&(a.pageCount=y.pageCount),y.totalCount!==void 0&&(a.totalCount=y.totalCount),y.currentPage!==void 0&&(a.currentPage=y.currentPage)},updateSort:(y,b)=>{a.sort=y,a.order=b}}}function j9e(e){const t=gn(),{config:n,freezeList:i=!0,virtualized:r=!1,emit:o}=e,a=r?l.ref([]):l.shallowRef([]),s=l.reactive({ajaxLoading:!1,submitLoading:!1,renderTable:!0,refreshTable:!1,tableStatistics:null});return{tableData:a,ajaxLoading:s,state:s,getTableListData:(h,p,m={})=>p?(s.ajaxLoading=!0,t.request({url:p,method:"get",params:h}).then(v=>{var b,g;let y=null;if(m.hasPagination!==!1){m.tableListCallback&&typeof m.tableListCallback=="function"?y=m.tableListCallback(v.data,v):y=v.data,a.value=i?l.markRaw(y.map(_=>l.markRaw(_))):y;let k=v;return m.paginationCback&&typeof m.paginationCback=="function"&&(k=m.paginationCback(v)),s.tableStatistics=(v==null?void 0:v.statistics)||null,s.ajaxLoading=!1,(b=m.onFromJump)==null||b.call(m,v.data),o("tablelist-change",v.data),{pageCount:k==null?void 0:k.totalPage,totalCount:k==null?void 0:k.total,currentPage:k==null?void 0:k.current_page,data:v.data}}else return y=v,a.value=i?l.markRaw(y):y,s.ajaxLoading=!1,(g=m.onFromJump)==null||g.call(m,v),o("tablelist-change",v),{data:v}}).catch(()=>(s.ajaxLoading=!1,null))):(n!=null&&n.tableData&&(a.value=n.tableData),Promise.resolve(null)),setRefreshTable:h=>{s.refreshTable=h},setTableData:h=>{a.value=h},clearData:()=>{a.value=[],s.tableStatistics=null}}}function R9e(e){const{config:t,tableColumn:n,userFieldList:i,userMenusAuth:r,route:o,refMenuId:a,emit:s}=e,u=l.shallowRef([]);let c=null;const f=_=>{var x,w;return((w=(x=r==null?void 0:r[_])==null?void 0:x.operations)==null?void 0:w.filter(O=>O==null?void 0:O.show_table))||[]},d=()=>{var w;const{path:_}=o||{},A=a||((w=r==null?void 0:r[_])==null?void 0:w.id);return(t==null?void 0:t.useField)&&(i==null?void 0:i[A])||null},h=_=>{let A=[];c=d();const x=n!=null&&n.length?n:t==null?void 0:t.tableColumn;x==null||x.forEach(w=>{var E,T,F,D,R,L;const O=Le.isFunction(w.label)?w.label():w.label,S={...w,label:Oe(O),tips:Le.isFunction(w.tips)?w.tips():Oe(w.tips)};S.isEdit=!!(S.editType||S.dateTimeFormat||S.isImg||S.isImgs||S.editTypeFun);let C=!0;if(S.isOperate){const M=f(_),X=S.fixed==="right"&&(((E=S==null?void 0:S.action)==null?void 0:E.list)||[]);M!=null&&M.length&&X.length?C=M.some(ee=>X.includes(ee.code)):C=!1}c?(c[S.prop]&&A.push({...S,...c[S.prop],label:S!=null&&S.customLabel?S.label:((T=c[S.prop])==null?void 0:T.label)||S.label,isControl:!0,fixed:!!((F=c[S.prop])!=null&&F.is_fixed),checked:S.hide?!1:!!c[S.prop].is_show,width:((D=c[S.prop])==null?void 0:D.width)||(S==null?void 0:S.width)||"",sortable:(R=c[S.prop])!=null&&R.support_sort?"custome":!1}),S.isOperate&&A.push({...S,rank:S!=null&&S.type?-1/0:1/0,checked:(S==null?void 0:S.type)||C,isControl:!1,fixed:(S==null?void 0:S.fixed)||"",width:((L=c[S.prop])==null?void 0:L.width)||(S==null?void 0:S.width)||""})):A.push({...S,checked:S.isOperate?C:!S.hide})}),c&&(A=A.sort((w,O)=>w.rank-O.rank)),u.value=A};return{appTableColumn:u,handleRenderTableColumn:h,handleTableFiledsSort:()=>{const _={},A=d();if(A&&Le.isObject(A))for(const[x,w]of Object.entries(A))w.is_default_sort&&(_.sort=x,_.order=w.sort);return _},handleFieldCheck:_=>{c&&(s("change-table-column","toggle",_),_.checked=!_.checked)},handleTableColumnSort:()=>{c&&s("change-table-column","draggable",u.value)},handleFixedCell:(_,A)=>{c&&(s("change-table-column",_,A),A.fixed=!A.fixed)},handleTableHeaderDragend:(_,A,x)=>{if(c){const w=u.value.find(O=>O.prop===x.property);w!=null&&w.id&&s("change-table-column","width",{width:_,column:w})}},handleDoLayoutTable:_=>{h(_)},handleGetTableFields:d,getTableFields:()=>c}}function I9e(e){const{emit:t}=e,n=l.ref([]),i=l.computed(()=>n.value.map(c=>c.id).join(","));return{selectionRow:n,selectionRowIds:i,handleSelectionChange:c=>{n.value=c,t("selection-change",c)},handleSelectionHeaderChange:(c,f)=>{const d=f.map(h=>(h.selectionChecked=c,h));return c?(n.value=d,t("selection-change",d)):(n.value=[],t("selection-change",[])),d},handleSelectionColumnChange:c=>{l.nextTick(()=>{const f=c.filter(d=>d.selectionChecked);n.value=f,t("selection-change",f)})},handleTableCurrentChange:c=>{t("table-current-change",c)},clearSelection:()=>{n.value=[]}}}function N9e(e){const t=gn(),{config:n,emit:i}=e,r=l.shallowRef(null),o=l.shallowRef(null),a=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox",refreshTable:!1,stopGetList:!1}),s=l.reactive({title:"",type:"add",visible:!1,model:{},config:{},boxName:"editBox"}),u=l.computed(()=>{var w;return((w=r.value)==null?void 0:w.editBoxRefModel)||{}}),c=l.computed(()=>{var w;return((w=o.value)==null?void 0:w.editBoxRefModel)||{}}),f=(w={},O={},S=null)=>{var T;const C=w.formList;let E=C;return S&&(E=C.filter(F=>{const D=!F.privacyId||!!S[F.privacyId];return(w==null?void 0:w.privacyKey)==="disabled"?(F.formAttrs={...F.formAttrs,disabled:!D},!0):D})),(T=w==null?void 0:w.beforeCreate)!=null&&T.formatFormList&&Le.isFunction(w.beforeCreate.formatFormList)&&(E=w.beforeCreate.formatFormList(E,O)),E},d=(w,O,S)=>{w&&t.request({url:w,method:"get",params:{}}).then(C=>{O==null||O(C,S.model)})},h=async(w,O,S={},C)=>{var T,F,D;const E={id:w.id,...S};return t.request({url:(D=(F=(T=n==null?void 0:n[O])==null?void 0:T.form)==null?void 0:F.api)==null?void 0:D.detail,method:"get",params:E}).then(R=>{var L,M,X,ee,ae,N;return C?a.model=C(R):a.model=R,(X=(M=(L=n==null?void 0:n[O])==null?void 0:L.form)==null?void 0:M.api)!=null&&X.detailCallback&&Le.isFunction((ee=n[O].form.api)==null?void 0:ee.detailCallback)&&((N=(ae=n[O].form.api)==null?void 0:ae.detailCallback)==null||N.call(ae,R)),a.title=Td(!0,n,O,Oe),i("get-detail-success",R),R})},p=(w,O,S,C=null)=>{ya(w,O,S,a,{filterFormList:(T,F)=>f(T,F,C),handleGetDetail:h,handleBeforeCreateReq:d,t:Oe}),l.nextTick(()=>{S.editBoxOnDialog&&(a.visible=!0)})},m=(w,O,S,C=null)=>{ya(w,O,S,s,{filterFormList:(T,F)=>f(T,F,C),handleGetDetail:h,handleBeforeCreateReq:d,t:Oe}),s.visible=!0},v=(w={})=>{var O,S,C,E,T,F,D;if(s.visible){s.visible=!1,s.config=null,s.model={};return}(S=(O=a==null?void 0:a.config)==null?void 0:O.api)!=null&&S.refreshDraw&&((C=w.onRefreshDraw)==null||C.call(w),i("refresh-draw")),((T=(E=a==null?void 0:a.config)==null?void 0:E.api)!=null&&T.refreshTable||a!=null&&a.refreshTable)&&((F=w.onRefreshTable)==null||F.call(w),i("refresh-table")),a.visible=!1,a.config=null,a.model={},i("list-change"),a.stopGetList||(D=w.onGetList)==null||D.call(w)};return{editBoxRef:r,addBoxRef:o,editBoxInfo:a,addBoxInfo:s,editBoxRefModel:u,addBoxRefModel:c,handleEdit:p,handleAddBox:m,handleAddSuccess:(w,O,S={})=>{var C,E,T;a.visible&&(C=a==null?void 0:a.config)!=null&&C.addSuccess&&Le.isFunction((E=a==null?void 0:a.config)==null?void 0:E.addSuccess)&&((T=a==null?void 0:a.config)==null||T.addSuccess(S.tableSearchModel,S.handleSetSearchModel)),v(S),i("add-success",w,O)},handleEditSuccess:(w,O,S={})=>{v(S),i("edit-success",w,O)},handleDialogClose:(w="editBoxInfo")=>{w==="editBoxInfo"?(a.model={},a.config={}):w==="addBoxInfo"&&(s.model={},s.config={}),i("dialog-close")},handleAddOption:(w,O,S=null)=>{const C=w==null?void 0:w.action;m("",C,O,S)},setFormModelVal:(w,O)=>{var S,C,E,T;s.visible?(C=(S=o.value)==null?void 0:S.setModelVal)==null||C.call(S,w,O):(T=(E=r.value)==null?void 0:E.setModelVal)==null||T.call(E,w,O)},handleSetFormModelVal:(w,O)=>{var S,C,E,T;s.visible?(C=(S=o.value)==null?void 0:S.handleSetModelVal)==null||C.call(S,w,O):(T=(E=r.value)==null?void 0:E.handleSetModelVal)==null||T.call(E,w,O)},handleGetDetail:h,getSubmitData:async()=>{var w,O;return await((O=(w=r.value)==null?void 0:w.createSubmitData)==null?void 0:O.call(w))},filterFormList:f}}function M9e(e){const t=gn(),{config:n,emit:i}=e;return{handleDeleteRequest:(g="",k,_,A,x={})=>t.request({url:g||(n==null?void 0:n.tableDeleteApi),method:"post",data:k}).then(()=>{var w,O;i("delete-success",A),(w=x.onGetList)==null||w.call(x),_!=null&&_.refreshDraw&&((O=x.onRefreshDrawerDetail)==null||O.call(x))}),handleCopyRequest:(g,k,_={})=>t.request({url:n==null?void 0:n.tableCopyApi,method:"post",data:g}).then(()=>{var A;i("copy-success",k),(A=_.onGetList)==null||A.call(_)}),handleSimpleRequest:(g,k,_,A=[],x=!1,w={})=>{Od(g,k,_,{selectionRow:A,cancel:x,callback:(O,S)=>{var C,E,T,F;i("des-edit-success",O,S),k.refreshTable&&((C=w.onRefreshTable)==null||C.call(w)),k!=null&&k.refreshDraw&&((E=w.onRefreshDrawerDetail)==null||E.call(w)),(F=(T=k==null?void 0:k.api)==null?void 0:T.callback)==null||F.call(T,O)}})},handlePrintRequest:(g={},k,_,A)=>{Xk(g,k,{url:n==null?void 0:n.tablePrintApi,tableData:_,proxy:A,tableExportPathKey:n==null?void 0:n.tableExportPathKey})},handleExportRequest:(g={},k={},_,A,x,w,O=!1)=>{Ad(g,k,_,{url:n==null?void 0:n.tableExportApi,tableData:A,proxy:w,selectionRow:x,tableExportPathKey:n==null?void 0:n.tableExportPathKey,beforeExportFun:n==null?void 0:n.beforeExportFun,tableExportName:n==null?void 0:n.tableExportName,emit:i,isTemp:O})},handleImportRequest:()=>{var g;if(!((g=n==null?void 0:n.tableFileImport)!=null&&g.action)){ut.ElMessage.info(Oe("请配置文件上传接口"));return}},handleEditRow:(g,k,_=!0)=>{g[`isEdit${k.prop}`]=_},handleEditRowProp:(g={},k={},_="table",A={})=>{var R,L,M,X,ee,ae,N;const{id:x}=g,{prop:w,refreshTable:O,api:S}=k;if(i("row-change",g,k),!x||!(n!=null&&n.tableRowEdit))return;const C={table:{url:n==null?void 0:n.tableUpdateApi,des:"tableUpdateApi"},drawDes:{url:((L=(R=A.tableDrawerConfig)==null?void 0:R.api)==null?void 0:L.update)||((ee=(X=(M=A.tableDrawerConfig)==null?void 0:M.descriptions)==null?void 0:X.api)==null?void 0:ee.update)||((N=(ae=n==null?void 0:n.tableDrawer)==null?void 0:ae.api)==null?void 0:N.update),des:"drawerConfig.api.update || appConfig.tableDrawer.api.update"}};let E=(S==null?void 0:S.url)||C[_].url;if(!E)return ut.ElMessage.info(`${Oe("请配置编辑接口")}${C[_].des}`);let T={id:x};const{startKey:F,endKey:D}=k;if(F&&D?(T[F]=sf(g[w][0]),T[D]=sf(g[w][1])):T[w]=sf(g[w]),S!=null&&S.params){const j=Le.isFunction(S.params)?S.params(g,T):S.params;T={...T,...j}}t.request({url:E,method:"post",data:T}).then(()=>{var j,q;g[`isEdit${w}`]=!1,_==="drawDes"&&((j=A.onSetRefreshTable)==null||j.call(A)),O&&((q=A.onRefreshTable)==null||q.call(A)),i("des-edit-success",k)})},handleDbCellClick:g=>{i("dbclick-cell",g)},handleTableDataSort:(g,k)=>{const _=g.map((A,x)=>({...A,rank:k+x}));return l.nextTick(()=>{i("change-table-rank",_)}),_},createTableActionOptions:g=>{var k;return{deleteText:((k=n==null?void 0:n.headerActions)==null?void 0:k.deleteText)||"",tableCopyText:n==null?void 0:n.tableCopyText,handleEdit:g.handleEdit,handleLinkRouter:Rm,t:Oe,emit:i,handleDeleteRequest:g.handleDeleteRequest,handleExportRequest:g.handleExportRequest,handleExportTempRequest:g.handleExportTempRequest,handlePrintRequest:g.handlePrintRequest,handleImportRequest:g.handleImportRequest,handleSimpleRequest:g.handleSimpleRequest,handleCopyRequest:g.handleCopyRequest}},handleHeaderAction:(g,k={},_=null,A,x,w,O)=>{var E,T,F,D;const{code:S}=g,C=_||((E=A.headerActions)==null?void 0:E[S])||((D=(F=(T=A.tableDrawerConfig)==null?void 0:T.descriptions)==null?void 0:F.headerActions)==null?void 0:D[S]);ns(g,k,C,x,"tableHeader",O),i("header-action",g,x,w,C)},handleTableAction:(g,k,_,A,x)=>{const{action:w}=g,O=_.action[w.code];ns(w,k,O,A,"",{...x,deleteText:n==null?void 0:n.tableDeleteText}),i("table-action",w,k,O,g)},handleSortChange:({prop:g,order:k},_,A,x)=>{var S;const w=k==="ascending"?"asc":"desc";x.onUpdateSort(g,w);const O={sort:g,order:w};k&&((S=_==null?void 0:_.tableListParams)!=null&&S.sorts)&&(O.sorts=""),i("sort-change",{prop:g,order:k,param:O,tableFields:A}),x.onGetList(O)}}}const L9e={key:0,class:"app-table-wrapper"},z9e={key:0,class:"table-header-wrapper fx"},V9e={class:"fxm pr10 ex"},U9e={class:"fxmj"},H9e={class:"ex"},q9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn({__name:"index",props:{config:{require:!0,type:Object,default:()=>({})},tableHeight:{type:[String,Number],default:null},userMenusAuth:{type:Object,default:()=>({})},route:{type:Object,default:()=>({})},router:{type:Object,default:()=>({})},userFieldList:{type:Object,default:()=>({})},refMenuId:{type:[Number,String],default:""},pageUrl:{type:String,default:""},tableColumn:{type:Array,default:()=>[]},freezeList:{type:Boolean,default:!0},cacheSearch:{type:Boolean,default:!1}},emits:["selection-change","list-change","header-action","table-action","add-handle","edit-handle","add-success","edit-success","delete-success","table-current-change","tablelist-change","get-detail-success","click-cell","des-edit-success","upload-btn","event-name","copy-success","asynExport","search-result","change-table-column","fixed-table-column","dialog-close","refresh-table","form-item-change","row-change","dbclick-cell","change-table-rank","after-btns-click","show-file","sort-change"],setup(e,{expose:t,emit:n}){const i=e,r=n,o=l.useSlots(),{proxy:a}=l.getCurrentInstance(),s={"page-sizes":Im(),"page-size":20,layout:"total, sizes, prev, pager, next, jumper"},u=Object.freeze({headerActions:{list:[],deleteText:""},headerActionsShow:!0,tableAttr:{stripe:!0,border:!0,fit:!0,highlightCurrentRow:!0,immediate:!0,defaultSort:{prop:"",order:""},sortBy:{key:"",order:""}},virtualized:!1,dragTitleKey:"title",estimatedRowHeight:50,tableEvents:{},tableColumn:[],searchBtnInline:!1,useField:!0,keepAliveTabs:!0,tableListApi:null,tableListParams:{},tableCacheSortOrder:{},tableDeleteApi:null,tableRowEdit:!0,tableDeleteText:"",tableDeleteParams:{},tableExportApi:"",tableExportPathKey:"",tablePrintApi:"",tablePrintPathKey:"http_path",pagination:s,showPagination:!0,hasPagination:!0,showTableLineHeight:!1,showTableDrag:!1,editBoxOnDialog:!0,editBox:{title:Oe("系统"),dialog:{width:"960px",top:"7vh"},form:{api:{add:null,update:null},formAttrs:{},formList:[]},footer:{confirm:{title:Oe("确认"),attrs:{type:"primary"}},cancel:{title:Oe("取消"),attrs:{}}}}});let c=Le.merge({},u,{useField:!0,keepAliveTabs:!0},i.config);const f=l.reactive({ajaxLoading:!1,renderTable:!0,refreshTable:!1,tableSize:Ai.get("tableSize")||"default",tableStatistics:null}),d=l.ref(null),h=l.computed(()=>{var Pe;return(Pe=d==null?void 0:d.value)==null?void 0:Pe.tableRef}),p=l.computed(()=>{var Ze;const Pe={};for(const yt in i.userMenusAuth){const{id:Nt}=((Ze=i.userMenusAuth)==null?void 0:Ze[yt])||"";Nt&&(Pe[Nt]=yt)}return Pe}),m=l.computed(()=>{var Ze;let Pe=((Ze=i==null?void 0:i.route)==null?void 0:Ze.path)||"";return i!=null&&i.refMenuId&&(Pe=p.value[i.refMenuId]),i!=null&&i.pageUrl&&(Pe=i==null?void 0:i.pageUrl),Pe||""}),v=l.computed(()=>Oe("加载数据中")||"加载数据中..."),y=l.computed(()=>dr("showPagination",i.config)?Le.isFunction(i.config.showPagination)?i.config.showPagination():i.config.showPagination:!0),b=l.computed(()=>dr("headerActionsShow",i.config)?Le.isFunction(i.config.headerActionsShow)?i.config.headerActionsShow():i.config.headerActionsShow:!0),g=l.computed(()=>dr("showHeaderSearch",i.config)?Le.isFunction(i.config.showHeaderSearch)?i.config.showHeaderSearch():i.config.showHeaderSearch:!0),{pagination:k,handlePageSearchParams:_,handleCurrentChange:A,handleSizeChange:x,resetPagination:w,updatePagination:O,updateSort:S}=P9e({config:i.config,onGetList:Pe=>ln(Pe)}),{tableData:C,state:E,getTableListData:T,setTableData:F}=j9e({config:i.config,freezeList:i.freezeList,virtualized:c.virtualized,emit:r}),{tableSearchModel:D,searchFormRef:R,initSearch:L,onSearchReset:M,onSearchSubmit:X,handleSetSearchModel:ee,handleSearchFormReset:ae,handleSetSearchModelVal:N,handleCacheSearch:j,handleInitTableSearchData:q,setLastPagePath:V}=F9e({route:i.route,refMenuId:i.refMenuId,cacheSearch:i.cacheSearch,config:i.config,onGetList:Pe=>ln(Pe),emit:r}),{appTableColumn:K,handleRenderTableColumn:Y,handleTableFiledsSort:ne,handleFieldCheck:oe,handleTableColumnSort:ve,handleFixedCell:xe,handleTableHeaderDragend:ie,handleDoLayoutTable:we,getTableFields:Se}=R9e({config:i.config,tableColumn:i.tableColumn,userFieldList:i.userFieldList,userMenusAuth:i.userMenusAuth,route:i.route,refMenuId:i.refMenuId,emit:r}),{selectionRow:P,selectionRowIds:le,handleSelectionChange:ye,handleSelectionHeaderChange:G,handleSelectionColumnChange:J,handleTableCurrentChange:fe,clearSelection:se}=I9e({emit:r}),{editBoxRef:me,addBoxRef:ce,editBoxInfo:Fe,addBoxInfo:be,editBoxRefModel:_e,addBoxRefModel:Ve,handleEdit:st,handleAddSuccess:et,handleEditSuccess:Et,handleDialogClose:Bt,handleAddOption:bt,setFormModelVal:Kt,handleSetFormModelVal:gt,handleGetDetail:Ne,getSubmitData:he}=N9e({config:i.config,emit:r}),{handleDeleteRequest:Ee,handleCopyRequest:Te,handleSimpleRequest:ze,handlePrintRequest:He,handleExportRequest:rt,handleImportRequest:ct,handleEditRow:dt,handleEditRowProp:vt,handleDbCellClick:Vt,handleTableDataSort:Yt,createTableActionOptions:Xt,handleHeaderAction:Kn,handleTableAction:xn,handleSortChange:Yn}=M9e({config:i.config,emit:r}),_t=l.computed(()=>Se()),An=l.computed(()=>c.virtualized?{key:k.sort,order:k.order}:{prop:k.sort,order:k.order==="asc"?"ascending":"descending"}),ln=(Pe={})=>{const Ze=_(D.value,c.tableListParams),yt=Le.merge({},Ze,Pe);T(yt,c.tableListApi,{hasPagination:c.hasPagination,tableListCallback:c.tableListCallback,paginationCback:c.paginationCback,onFromJump:Nt=>Rn(Nt)}).then(Nt=>{Nt&&O(Nt),f.ajaxLoading=E.ajaxLoading})},Rn=(Pe=[])=>{if(i!=null&&i.refMenuId)return;const{query:{id:Ze,openType:yt}}=i.route||{query:{}};if(yt&&Ze&&Pe.length===1){if(yt==="edit")I(Pe[0],{});else if(yt.includes("Detail")){const Nt=K.value.find(bn=>{var wi;return((wi=bn==null?void 0:bn.publicDrawerConfig)==null?void 0:wi.openName)===yt});Nt!=null&&Nt.id&&r("click-cell",Pe[0],Nt)}}},Xn=()=>{w(),M()},rr=Pe=>{w(),X(Pe)},In=()=>{ln(),r("refresh-table")},tt=Pe=>A(Pe),Li=Pe=>x(Pe),Ti=Pe=>ye(Pe),Br=Pe=>{const Ze=G(Pe,C.value);F(Ze)},B=()=>J(C.value),z=Pe=>fe(Pe),I=(Pe,Ze)=>st(Pe,Ze,c,Se()),H=Pe=>bt(Pe,c,Se()),re=(Pe,Ze)=>et(Pe,Ze,{tableSearchModel:D,handleSetSearchModel:ee,onRefreshTable:In,onGetList:ln}),Q=(Pe,Ze)=>Et(Pe,Ze,{onRefreshTable:In,onGetList:ln}),U=Pe=>Bt(Pe),Z=(Pe,Ze)=>{var yt;r("click-cell",Pe,Ze),((yt=Ze==null?void 0:Ze.actions)==null?void 0:yt.type)==="editBox"&&I(Pe,Ze.actions)},Ce=(Pe,Ze,yt="table")=>vt(Pe,Ze,yt,{onSetRefreshTable:()=>{f.refreshTable=!0},onRefreshTable:In}),Me=Pe=>Vt(Pe),te=(Pe,Ze)=>xe(Pe,Ze),ge=(Pe,Ze,yt)=>ie(Pe,Ze,yt),ke=Pe=>oe(Pe),Re=()=>ve(),We=(Pe,Ze)=>{const yt=Yt(C.value,Ze);F(yt)},ot=Xt({handleEdit:I,handleDeleteRequest:(Pe,Ze,yt,Nt)=>Ee(Pe,Ze,yt,Nt,{onGetList:ln}),handleExportRequest:(Pe,Ze)=>{const yt=_(D.value,c.tableListParams);rt(Pe,Ze,yt,C.value,P.value,a,!1)},handleExportTempRequest:(Pe,Ze)=>{const yt=_(D.value,c.tableListParams);rt(Pe,Ze,yt,C.value,P.value,a,!0)},handlePrintRequest:Pe=>{const Ze=_(D.value,c.tableListParams);He(Pe,Ze,C.value,a)},handleImportRequest:ct,handleSimpleRequest:(Pe,Ze,yt,Nt,bn)=>ze(Pe,Ze,yt,Nt,bn,{onRefreshTable:In}),handleCopyRequest:(Pe,Ze)=>Te(Pe,Ze,{onGetList:ln})}),Ge=(Pe,Ze={},yt=null)=>{Kn(Pe,Ze,yt,c,P.value,null,ot)},Ct=(Pe,Ze,yt)=>{xn(Pe,Ze,yt,P.value,ot)},Zt=({prop:Pe,order:Ze})=>{Yn({prop:Pe,order:Ze},c,Se(),{onUpdateSort:S,onGetList:ln})},Ke=Pe=>{f.tableSize=Pe,Ai.set("tableSize",Pe)},$=()=>{var Pe;(Pe=c==null?void 0:c.tableFileImport)!=null&&Pe.refreshTable&&In()},de=Pe=>r("show-file",Pe),Be=()=>{},je=Pe=>r("upload-btn",Pe),qe=(Pe,Ze,yt,Nt)=>r("after-btns-click",Pe,Ze,yt,Nt),at=(Pe,Ze,yt)=>r("form-item-change",Pe,Ze,yt),ft=l.watch(()=>i.config.tableData,Pe=>{Pe&&F(Pe)}),Qe=l.watch(()=>i.config,Pe=>{c=Le.merge({},u,Pe)}),Gt=l.watch(()=>m.value,(Pe,Ze)=>{Pe!==Ze&&V(Ze)});return l.onMounted(async()=>{var Nt,bn,wi,On;const Pe=await q();D.value=Pe;const Ze=j(!1,m.value);Ze&&(Object.assign(D.value,Ze),(bn=(Nt=R.value)==null?void 0:Nt.handleSetModelValue)==null||bn.call(Nt,D.value));const yt=ne();yt!=null&&yt.order&&S(yt.sort,yt.order),(wi=c==null?void 0:c.tableCacheSortOrder)!=null&&wi.order&&S(c.tableCacheSortOrder.sort,c.tableCacheSortOrder.order),Y(m.value),(On=c.tableAttr)!=null&&On.immediate&&L()}),l.onBeforeUnmount(()=>{j(!0,m.value),ft(),Qe(),Gt(),c=null,F([]),f.renderTable=!1,se()}),t({tableRef:h,tableListContentRef:d,tableData:C,appTableColumn:K,currentPagePath:m,appConfig:c,pagination:k,editBoxRef:me,editBoxRefModel:_e,editBoxInfo:Fe,addBoxInfo:be,addBoxRef:ce,addBoxRefModel:Ve,selectionRow:P,selectionRowIds:le,tableSearchModel:D,loadingText:v,searchFormRef:R,showPagination:y,showHeaderActions:b,showHeaderSearch:g,defaultSort:An,onSearchSubmit:rr,onSearchReset:Xn,handleEdit:I,handleCurrentChange:A,handleSizeChange:x,handleSelectionChange:ye,handleTableCurrentChange:fe,handleSortChange:Zt,handleHeaderAction:Ge,handleTableAction:Ct,handleGetDetail:Ne,getList:ln,initSearch:L,handleError:Be,handleAddSuccess:re,handleEditSuccess:Q,handleEditRow:dt,handleEditRowProp:Ce,handleImportRequest:ct,handleClickRow:Z,handleShowFile:de,handleUploadBtn:je,handleUploadSuccess:$,handleAddOption:H,setFormModelVal:Kt,handleSetFormModelVal:gt,handleSetSearchModelVal:N,handleDialogClose:U,handleTableSizeChange:Ke,handleTableHeaderDragend:ge,handleFieldCheck:ke,handleTableColumnSort:Re,handleSearchFormReset:ae,getSubmitData:he,handleFixedCell:te,handleDoLayoutTable:()=>we(m.value),handleItemChange:at,handleDbCellClick:Me,handleTableDataSort:We,handleAfterBtnsClick:qe,handleSelectionHeaderChange:Br,handleSelectionColumnChange:B}),(Pe,Ze)=>{var On,fn,zi,jo,Cl,Za,af,vJ,yJ;const yt=l.resolveComponent("jwt-form"),Nt=l.resolveComponent("jwt-header-button"),bn=l.resolveComponent("el-pagination"),wi=l.resolveComponent("JwtDialogForm");return l.openBlock(),l.createElementBlock(l.Fragment,null,[f.renderTable?(l.openBlock(),l.createElementBlock("div",L9e,[l.createElementVNode("div",{class:l.normalizeClass([(On=l.unref(c))!=null&&On.searchBtnInline?"fxmj":""])},[l.renderSlot(Pe.$slots,"search-before",{},void 0,!0),g.value?(l.openBlock(),l.createElementBlock("div",z9e,[Ze[0]||(l.setBlockTracking(-1,!0),(Ze[0]=(jo=(zi=(fn=e.config)==null?void 0:fn.tableSearch)==null?void 0:zi.formList)!=null&&jo.length?(l.openBlock(),l.createBlock(yt,{key:0,ref_key:"searchFormRef",ref:R,modelValue:l.unref(D),"onUpdate:modelValue":_i=>l.isRef(D)?D.value=_i:null,class:"app-table-search",config:(Cl=e.config)==null?void 0:Cl.tableSearch,"is-search":"",onReset:Xn,onSubmit:rr},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({model:Qa})=>[l.renderSlot(Pe.$slots,_i,{model:Qa},void 0,!0)])}))]),1032,["modelValue","onUpdate:modelValue","config"])):l.createCommentVNode("",!0)).cacheIndex=0,l.setBlockTracking(1),Ze[0]),l.renderSlot(Pe.$slots,"search-form-after",{},void 0,!0)])):l.createCommentVNode("",!0),l.renderSlot(Pe.$slots,"search-after",{},void 0,!0),l.createElementVNode("div",{class:l.normalizeClass(["fxmj",[(Za=l.unref(c))!=null&&Za.searchBtnInline?"mb18":""]])},[l.createElementVNode("div",V9e,[l.renderSlot(Pe.$slots,"header-button-before",{},void 0,!0),b.value?(l.openBlock(),l.createBlock(Nt,{key:0,config:((af=e.config)==null?void 0:af.headerActions)||{},"current-path":m.value,"file-import":l.unref(c).tableFileImport,loading:f.ajaxLoading,"menus-obj":e.userMenusAuth,"total-count":l.unref(k).totalCount,"selection-row":l.unref(P),"upload-success-cb":l.unref(c).uploadSuccessCb,onHeaderAction:Ge,onUploadSuccess:$},null,8,["config","current-path","file-import","loading","menus-obj","total-count","selection-row","upload-success-cb"])):l.createCommentVNode("",!0),l.renderSlot(Pe.$slots,"header-button-after",{},void 0,!0)]),l.createElementVNode("div",null,[l.unref(c).showTableLineHeight?(l.openBlock(),l.createBlock(gk,{key:0,onTableSize:Ke})):l.createCommentVNode("",!0),_t.value?(l.openBlock(),l.createBlock(pk,{key:1,modelValue:l.unref(K),"onUpdate:modelValue":Ze[1]||(Ze[1]=_i=>l.isRef(K)?K.value=_i:null),onChange:ke,onSort:Re},null,8,["modelValue"])):l.createCommentVNode("",!0),(vJ=l.unref(c))!=null&&vJ.showTableDrag&&((yJ=l.unref(C))!=null&&yJ.length)?(l.openBlock(),l.createBlock(LE,{key:2,modelValue:l.unref(C),"onUpdate:modelValue":Ze[2]||(Ze[2]=_i=>l.isRef(C)?C.value=_i:null),"drag-title-key":l.unref(c).dragTitleKey,onSort:We},null,8,["modelValue","drag-title-key"])):l.createCommentVNode("",!0)])],2)],2),l.renderSlot(Pe.$slots,"table-before",{},void 0,!0),l.renderSlot(Pe.$slots,"table-content",{list:l.unref(C)},()=>[l.unref(c).virtualized?(l.openBlock(),l.createBlock(VE,{key:0,"ajax-loading":f.ajaxLoading,"app-table-column":l.unref(K),"current-page-path":m.value,"default-sort":An.value,"estimated-row-height":l.unref(c).estimatedRowHeight,"loading-text":v.value,pagination:l.unref(k),"table-attr":l.unref(c).tableAttr,"table-button-num":l.unref(c).tableButtonNum,"table-data":l.unref(C),"table-events":l.unref(c).tableEvents,"table-height":e.tableHeight,"table-size":f.tableSize,"user-menus-auth":e.userMenusAuth,onChangeTableColumn:te,onClickCell:Z,onDbclickCell:Me,onEditRow:Ce,onSelectionColumnChange:B,onSelectionHeaderChange:Br,onSortChange:Zt,onTableAction:Ct,onShowFile:de},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({scope:Qa,data:i7,list:r7,index:o7,rowindex:a7,pagestart:s7})=>[l.renderSlot(Pe.$slots,_i,{data:i7,index:o7,list:r7,rowindex:a7,pagestart:s7,scope:Qa},void 0,!0)])}))]),1032,["ajax-loading","app-table-column","current-page-path","default-sort","estimated-row-height","loading-text","pagination","table-attr","table-button-num","table-data","table-events","table-height","table-size","user-menus-auth"])):(l.openBlock(),l.createBlock(zE,{key:1,ref_key:"tableListContentRef",ref:d,"ajax-loading":f.ajaxLoading,"app-table-column":l.unref(K),"current-page-path":m.value,"default-sort":An.value,"loading-text":v.value,"table-attr":l.unref(c).tableAttr,"table-button-num":l.unref(c).tableButtonNum,"table-data":l.unref(C),"table-events":l.unref(c).tableEvents,"table-height":e.tableHeight,"table-size":f.tableSize,"user-menus-auth":e.userMenusAuth,pagination:l.unref(k),onChangeTableColumn:te,onClickCell:Z,onDbclickCell:Me,onEditRow:Ce,onHeaderDragend:ge,onSelectionChange:Ti,onSortChange:Zt,onTableAction:Ct,onTableCurrentChange:z,onShowFile:de},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({scope:Qa,data:i7,list:r7,index:o7,rowindex:a7,pagestart:s7})=>[l.renderSlot(Pe.$slots,_i,{data:i7,index:o7,list:r7,rowindex:a7,pagestart:s7,scope:Qa},void 0,!0)])}))]),1032,["ajax-loading","app-table-column","current-page-path","default-sort","loading-text","table-attr","table-button-num","table-data","table-events","table-height","table-size","user-menus-auth","pagination"]))],!0),l.renderSlot(Pe.$slots,"table-after",{},void 0,!0),l.createElementVNode("div",U9e,[l.createElementVNode("div",H9e,[l.renderSlot(Pe.$slots,"table-pagination-before",{data:f.tableStatistics},void 0,!0)]),y.value?(l.openBlock(),l.createBlock(bn,l.mergeProps({key:0},l.unref(c).pagination,{class:"app-pagination","current-page":l.unref(k).currentPage,disabled:f.ajaxLoading,"page-count":l.unref(k).pageCount,"page-size":l.unref(k).pageSize,total:l.unref(k).totalCount,onCurrentChange:tt,onSizeChange:Li}),null,16,["current-page","disabled","page-count","page-size","total"])):l.createCommentVNode("",!0)]),l.renderSlot(Pe.$slots,"table-pagination-after",{},void 0,!0)])):l.createCommentVNode("",!0),l.unref(Fe).visible?(l.openBlock(),l.createBlock(wi,{key:1,ref_key:"editBoxRef",ref:me,"app-config":l.unref(Fe).config,config:l.unref(Fe),"selection-row":l.unref(P),"selection-row-ids":l.unref(le),onAddOption:H,onAddSuccess:re,onDialogClose:U,onEditSuccess:Q,onError:Be,onItemChange:at,onUploadBtn:je,onAfterBtnsClick:qe},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({model:Qa})=>[l.renderSlot(Pe.$slots,_i,{model:Qa},void 0,!0)])}))]),1032,["app-config","config","selection-row","selection-row-ids"])):l.createCommentVNode("",!0),l.unref(be).visible?(l.openBlock(),l.createBlock(wi,{key:2,ref_key:"addBoxRef",ref:ce,"app-config":l.unref(be).config,config:l.unref(be),onAddOption:H,onAddSuccess:re,onDialogClose:U,onEditSuccess:Q,onError:Be,onUploadBtn:je},l.createSlots({_:2},[l.renderList(Object.keys(l.unref(o)),_i=>({name:_i,fn:l.withCtx(({model:Qa})=>[l.renderSlot(Pe.$slots,_i,{model:Qa},void 0,!0)])}))]),1032,["app-config","config"])):l.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-15a4c691"]])},Symbol.toStringTag,{value:"Module"})),K9e=l.defineComponent({name:"JwtTabs"}),W9e=l.defineComponent({...K9e,props:{config:{type:Object,require:!0,default:()=>{}},currentPath:{type:String,default:"/"},menusObj:{type:Object,default:()=>{}},info:{type:Object,require:!0,default:()=>{}},keepAlive:{type:Boolean,default:!0}},emits:["tab-click","event-name"],setup(e,{expose:t,emit:n}){var b,g;const i=e,r=n,o=l.ref(null),a=l.ref(!1),s=l.computed(()=>{var _,A;return((A=(_=i.menusObj)==null?void 0:_[i==null?void 0:i.currentPath])==null?void 0:A.id)||""}),u=l.computed(()=>{var k,_;return((_=(k=i.config)==null?void 0:k.tabPaneList)==null?void 0:_.filter(A=>A.condition&&Le.isFunction(A.condition)?A.condition(i.info):!0))||[]}),c=l.computed(()=>{var A;const k=((i==null?void 0:i.menusObj)||{})[i==null?void 0:i.currentPath];let _=u.value;if(k&&((A=k==null?void 0:k.operations)!=null&&A.length)){const x={};if(k.operations.forEach(w=>{w.show_tab&&(x[w.code]=w)}),Object.keys(x).length)return _.filter(w=>{var O,S,C;if(x[w.name]){w.refMenuId=((O=x[w.name])==null?void 0:O.ref_menu_id)||"",w.rank=((S=x[w.name])==null?void 0:S.rank)||"";let E=((C=x[w.name])==null?void 0:C.show_title)||w.label||"";return w.numKey&&(E=`${Oe(E)} (${i.info[w.numKey]||0})`),w.label=E,!0}}).sort((w,O)=>w.rank-O.rank)}return _}),f=l.computed(()=>{if(!i.keepAlive||a.value)return[""];const k=[];return c.value.map(_=>{_.unKeepAlive||k.push(_.name)}),k}),d=l.ref(((b=i.config)==null?void 0:b.activeName)||((g=c.value[0])==null?void 0:g.name)),h=l.computed(()=>c.value.find(_=>_.name===d.value)),p=l.computed(()=>{var _,A;const k=((_=h.value)==null?void 0:_.params)||{};return{refMenuId:((A=h.value)==null?void 0:A.refMenuId)||s.value||"",...k}}),m=(k,_)=>{l.nextTick(()=>{r("tab-click",k,_,h.value)})},v=(...k)=>{r("event-name",...k)},y=k=>{c.value.find(A=>A.name===k)&&(d.value=k)};return l.onBeforeUnmount(()=>{a.value=!0}),t({componentRef:o,handleChangeTab:y}),(k,_)=>{var w;const A=l.resolveComponent("el-tab-pane"),x=l.resolveComponent("el-tabs");return l.openBlock(),l.createBlock(x,l.mergeProps({modelValue:d.value,"onUpdate:modelValue":_[0]||(_[0]=O=>d.value=O)},(w=e.config)==null?void 0:w.tabsAttrs,{onTabClick:m}),{default:l.withCtx(()=>{var O,S;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c.value,(C,E)=>(l.openBlock(),l.createBlock(A,l.mergeProps({key:E},{ref_for:!0},C,{label:C.label}),null,16,["label"]))),128)),(l.openBlock(),l.createBlock(l.KeepAlive,{include:f.value},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(h.value.component),l.mergeProps({key:h.value.name,ref_key:"componentRef",ref:o,info:e.info,params:p.value,"ref-menu-id":((O=h.value)==null?void 0:O.refMenuId)||s.value||""},((S=h.value)==null?void 0:S.attrs)||{},{onEventName:v}),null,16,["info","params","ref-menu-id"]))],1032,["include"]))]}),_:1},16,["modelValue"])}}}),G9e=Object.freeze(Object.defineProperty({__proto__:null,default:W9e},Symbol.toStringTag,{value:"Module"})),J9e=l.defineComponent({name:"JwtTags",props:{modelValue:{type:[String,Array],default:""},btnTitle:{type:String,default:"添加"},disabled:{type:Boolean,default:!1},labelKey:{type:String,default:"title"},valueKey:{type:String,default:"id"},isArray:{type:Boolean,default:!1},isInput:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=l.ref(null),i=l.reactive({tagList:[],inputVisible:!1,inputValue:"",initOnce:!1}),r=()=>{var d;if(i.initOnce)return;let f=[];return e.modelValue&&cn.isString(e.modelValue)?f=(d=e==null?void 0:e.modelValue)==null?void 0:d.split(","):e.modelValue&&cn.isArray(e.modelValue)&&(f=e.modelValue.map(h=>({...h,title:h[e.labelKey],id:h[e.valueKey]}))),i.initOnce=!0,f},o=l.watch(()=>e.modelValue,f=>{i.initOnce||f!=null&&f.isTrusted||(f?i.tagList=r():i.tagList=[])},{immediate:!0}),a=()=>{i.inputVisible=!0,l.nextTick(()=>{var f,d;(d=(f=n.value)==null?void 0:f.input)==null||d.focus()})},s=f=>{i.tagList.splice(i.tagList.indexOf(f),1),u()},u=()=>{const f=e.isArray?i.tagList:i.tagList.join(",");t("update:modelValue",f)},c=()=>{i.inputValue&&(e.isArray?i.tagList.push({[e.labelKey]:i.inputValue,[e.valueKey]:""}):i.tagList.push(i.inputValue)),i.inputVisible=!1,i.inputValue="",u()};return l.onUpdated(()=>{}),l.onBeforeMount(()=>{i.initOnce=!1}),l.onBeforeUnmount(()=>{o()}),{...l.toRefs(i),inputRef:n,showInput:a,handleClose:s,handleEmitResult:u,handleInputConfirm:c}}}),Y9e={class:"fx fxwp w"};function X9e(e,t,n,i,r,o){const a=l.resolveComponent("el-input"),s=l.resolveComponent("jwt-icon"),u=l.resolveComponent("el-tag"),c=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",Y9e,[e.isInput?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(e.tagList,(f,d)=>(l.openBlock(),l.createElementBlock("div",{key:f,class:"rel tags-input-wrapper mb10 mr10"},[l.createVNode(a,{modelValue:f[e.labelKey],"onUpdate:modelValue":h=>f[e.labelKey]=h,class:"w220",clearable:"",placeholder:"请输入",onBlur:e.handleEmitResult},null,8,["modelValue","onUpdate:modelValue","onBlur"]),l.createVNode(s,{class:"cd cp tags-input-close",icon:"close-circle-fill abs_rt",size:"18",style:{right:"-10px",top:"-15px"},onClick:h=>e.handleClose(f,d)},null,8,["onClick"])]))),128)):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(e.tagList,f=>(l.openBlock(),l.createBlock(u,{key:f,class:"mb4",closable:"","disable-transitions":!1,disabled:e.disabled,onClose:d=>e.handleClose(f,e.index)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.isArray?f[e.labelKey]:f),1)]),_:2},1032,["disabled","onClose"]))),128)),e.inputVisible?(l.openBlock(),l.createBlock(a,{key:2,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[0]||(t[0]=f=>e.inputValue=f),class:l.normalizeClass([e.isInput?"w220 mr10 mb10":"w120"]),placeholder:"请输入",onBlur:e.handleInputConfirm,onKeyup:l.withKeys(e.handleInputConfirm,["enter"])},null,8,["modelValue","class","onBlur","onKeyup"])):(l.openBlock(),l.createBlock(c,{key:3,class:"button-new-tag",disabled:e.disabled,size:e.isInput?"":"small",onClick:e.showInput},{default:l.withCtx(()=>[l.createTextVNode(" + "+l.toDisplayString(e.btnTitle),1)]),_:1},8,["disabled","size","onClick"]))])}const Z9e=Object.freeze(Object.defineProperty({__proto__:null,default:tn(J9e,[["render",X9e],["__scopeId","data-v-44fc3183"]])},Symbol.toStringTag,{value:"Module"})),Q9e=["id"],UE={__name:"TreeNodeTitle",props:{node:{type:Object,default:()=>{}},nodeKey:{type:String,default:"id"},children:{type:String,default:"children"},checkedKeys:{type:Array,default:()=>[]},expandAll:{type:Boolean,default:!0},level:{type:Number,default:0},menuTitleKey:{type:String,default:"title"},optTitleKey:{type:String,default:"title"},isOpt:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["check","show"],setup(e,{emit:t}){const n=e,i=t,r=l.inject("menusIdObj"),o=l.ref(n.expandAll),a=l.computed(()=>n.node[n.nodeKey]),s=l.computed(()=>n.isOpt?"":`menu-id-${n.node[n.nodeKey]}`),u=l.computed(()=>{var y;if(n.isOpt)return((y=n==null?void 0:n.node)==null?void 0:y.remark)||"";if(n.node.rid){const b=r==null?void 0:r[n.node.rid];return b!=null&&b[n.optTitleKey]?`权限关联:${b[n.optTitleKey]}`:""}return""}),c=l.computed(()=>{var y;return((y=n.node[n.children])==null?void 0:y.length)>0}),f=(y=n.node)=>{const b=[],g=k=>{var _;(_=k[n.children])!=null&&_.length&&k[n.children].forEach(A=>{b.push(A[n.nodeKey]),g(A)})};return g(y),b},d=l.computed(()=>f()),h=l.computed({get(){return c.value?d.value.length>0&&d.value.every(y=>n.checkedKeys.includes(y)):n.checkedKeys.includes(a.value)},set(y){m(y)}}),p=l.computed(()=>{if(!c.value)return!1;const y=d.value.filter(b=>n.checkedKeys.includes(b)).length;return y>0&&y<d.value.length}),m=y=>{i("check",{key:a.value,checked:y,level:n.level})};function v(){o.value=!o.value,l.nextTick(()=>{i("show",o.value,n.node)})}return l.onUnmounted(()=>{}),(y,b)=>{var A,x,w,O;const g=l.resolveComponent("jwt-icon"),k=l.resolveComponent("el-popover"),_=l.resolveComponent("el-checkbox");return l.openBlock(),l.createElementBlock("div",{id:s.value||"",class:l.normalizeClass(["fxm jwt-menu-opt-item-title",[e.isOpt?"mr20":""]])},[e.isOpt?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(g,{key:0,class:l.normalizeClass(["cp fs20 mr5 g9 linear",[(x=(A=e.node)==null?void 0:A.children)!=null&&x.length||(O=(w=e.node)==null?void 0:w.operations)!=null&&O.length?"":"gtp",o.value?"":"up-90"]]),icon:"arrow-down-s-fill",onClick:v},null,8,["class"])),l.createVNode(_,{modelValue:h.value,"onUpdate:modelValue":b[0]||(b[0]=S=>h.value=S),indeterminate:p.value,disabled:e.disabled},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.node[e.menuTitleKey])+" ",1),l.createVNode(k,{content:u.value,persistent:!1,placement:"bottom",title:"权限说明",width:"240"},{reference:l.withCtx(()=>[u.value?(l.openBlock(),l.createBlock(g,{key:0,icon:"information-fill"})):l.createCommentVNode("",!0)]),_:1},8,["content"])]),_:1},8,["modelValue","indeterminate","disabled"]),e.isOpt?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:1,class:"ex h30",onClick:v}))],10,Q9e)}}},$9e=Object.freeze(Object.defineProperty({__proto__:null,default:UE},Symbol.toStringTag,{value:"Module"})),eEe={class:"jwt-menu-opt-item"},tEe={class:"fx fxwp"},_G={__name:"TreeNode",props:{node:{type:Object,required:!0},nodeKey:{type:String,default:"id"},children:{type:String,default:"children"},checkedKeys:{type:Array,default:()=>[]},expandAll:{type:Boolean,default:!0},level:{type:Number,default:0},menuTitleKey:{type:String,default:"title"},optTitleKey:{type:String,default:"title"},disabled:{type:Boolean,default:!1}},emits:["check","toggle"],setup(e,{emit:t}){const n=e,i=t,r=l.ref(!0),o=l.computed(()=>n.node[n.children]||[]),a=l.computed(()=>{var d;return((d=o.value)==null?void 0:d.length)>0}),s=l.computed(()=>{const d=[],h=[],p=[],m=[];return o.value.forEach(v=>{v.show_tab?d.push(v):v.show_header?p.push(v):v.show_table?h.push(v):m.push(v)}),[{title:"表头权限",list:p},{title:"表格权限",list:h},{title:"tab权限",list:d},{title:"其他权限",list:m}]});function u(d,h){r.value=d,i("toggle",h)}function c(d){i("toggle",d)}const f=d=>{i("check",d)};return(d,h)=>{const p=l.resolveComponent("TreeNode",!0),m=l.resolveComponent("el-divider");return l.openBlock(),l.createElementBlock("div",eEe,[l.createVNode(UE,{"checked-keys":e.checkedKeys,children:e.children,"expand-all":e.expandAll,level:e.level+1,"menu-title-key":e.menuTitleKey,node:e.node,"node-key":e.nodeKey,"opt-title-key":e.optTitleKey,disabled:e.disabled,onCheck:f,onShow:u},null,8,["checked-keys","children","expand-all","level","menu-title-key","node","node-key","opt-title-key","disabled"]),a.value?l.withDirectives((l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass([e.node.isOptChild?"fs16 lhm jwt-menu-opt-item-opt-wrapper":"pl25"])},[e.node.isOptChild?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(s.value,(v,y)=>(l.openBlock(),l.createElementBlock("div",{key:y,class:"plr25"},[v.list.length?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(m,{"border-style":"dashed",class:"jwt-menu-opt-item-opt-divider","content-position":"center"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v.title),1)]),_:2},1024),l.createElementVNode("div",tEe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(v.list,b=>(l.openBlock(),l.createBlock(UE,{key:b.id,"checked-keys":e.checkedKeys,children:e.children,"expand-all":e.expandAll,"is-opt":"",disabled:e.disabled,level:e.level+1,"menu-title-key":e.menuTitleKey,node:b,"node-key":e.nodeKey,"opt-title-key":e.optTitleKey,onCheck:f},null,8,["checked-keys","children","expand-all","disabled","level","menu-title-key","node","node-key","opt-title-key"]))),128))])],64)):l.createCommentVNode("",!0)]))),128)):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(e.node.children,(v,y)=>(l.openBlock(),l.createElementBlock("div",{key:y},[l.createVNode(p,{"checked-keys":e.checkedKeys,children:e.children,"expand-all":e.expandAll,level:e.level+1,"menu-title-key":e.menuTitleKey,node:v,"node-key":e.nodeKey,disabled:e.disabled,"opt-title-key":e.optTitleKey,onCheck:f,onToggle:c},null,8,["checked-keys","children","expand-all","level","menu-title-key","node","node-key","disabled","opt-title-key"])]))),128))],2)),[[l.vShow,r.value]]):l.createCommentVNode("",!0)])}}},nEe=Object.freeze(Object.defineProperty({__proto__:null,default:_G},Symbol.toStringTag,{value:"Module"})),iEe={class:"rel"},rEe={key:0,class:"menu-opt-nav-wrapper"},oEe=Object.freeze(Object.defineProperty({__proto__:null,default:tn(Object.assign({name:"JwtTree"},{props:{treeData:{type:Array,default:()=>[]},nodeKey:{type:String,default:"id"},menuTitleKey:{type:String,default:"title"},children:{type:String,default:"children"},checkedKeys:{type:Array,default:()=>[]},expandAll:{type:Boolean,default:!0},menusIdObj:{type:Object,default:()=>{}},showNav:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:checked-keys","change","toggle","tab-change"],setup(e,{emit:t}){const n=e,i=t,r=l.ref(n.checkedKeys||[]),o=l.ref([]),a=l.ref(""),s=new Map,u=new Map;l.provide("menusIdObj",n.menusIdObj||{});const c=(k,_=null)=>{const A=new Map,x=(w,O)=>{w&&w.forEach(S=>{var E,T;const C=S[n.nodeKey];A.set(C,{node:S,parentKey:O,childrenKeys:((E=S[n.children])==null?void 0:E.map(F=>F[n.nodeKey]))||[]}),(T=S[n.children])!=null&&T.length&&x(S[n.children],C)})};return x(k,_),A},f=l.computed(()=>c(n.treeData)),d=l.computed(()=>{var k,_;return Le.isArray(n.treeData)&&((k=n.treeData)!=null&&k.length)?((_=n.treeData)==null?void 0:_.length)>1?n.treeDatap:n.treeData[0][n.children]:[]}),h=l.computed(()=>d.value.map(k=>`menu-id-${k[n.nodeKey]}`)),p=k=>{if(s.has(k))return s.get(k);const _=[],A=[k];for(;A.length;){const x=A.pop(),w=f.value.get(x);w&&w.childrenKeys.length&&(_.push(...w.childrenKeys),A.push(...w.childrenKeys))}return s.set(k,_),_},m=k=>{if(u.has(k))return u.get(k);const _=[];let A=k;for(;A;){const x=f.value.get(A);x&&x.parentKey?(_.push(x.parentKey),A=x.parentKey):A=null}return u.set(k,_),_},v=({key:k,level:_,checked:A})=>{const x=new Set(r.value),w=new Set(o.value);A?x.add(k):x.delete(k),w.delete(k),p(k).forEach(C=>{w.delete(C),A?x.add(C):x.delete(C)}),m(k).forEach(C=>{const E=f.value.get(C);E&&(E.childrenKeys.every(F=>x.has(F))?(x.add(C),w.delete(C)):(x.delete(C),E.childrenKeys.some(R=>x.has(R))?w.add(C):w.delete(C),E.childrenKeys.some(R=>w.has(R))&&w.add(C)))}),r.value=Array.from(x),o.value=Array.from(w),i("update:checked-keys",r.value),i("change",{key:k,checked:A,level:_,data:f.value.get(k),checkedKeys:r.value,halfCheckedKeys:o.value})},y=()=>{s.clear(),u.clear()};function b(k){i("toggle",k,h.value)}function g(k){i("tab-change",k)}return l.onMounted(()=>{setTimeout(()=>{b("")},1e3)}),l.watchEffect(()=>{n.checkedKeys&&(r.value=[...n.checkedKeys],y())}),l.onUnmounted(()=>{y()}),(k,_)=>{const A=l.resolveComponent("el-tab-pane"),x=l.resolveComponent("el-tabs");return l.openBlock(),l.createElementBlock("div",iEe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.treeData,(w,O)=>(l.openBlock(),l.createBlock(_G,{key:O,"checked-keys":r.value,"expand-all":e.expandAll,level:0,"menu-title-key":e.menuTitleKey,node:w,"node-key":e.nodeKey,disabled:e.disabled,onCheck:v,onToggle:b},null,8,["checked-keys","expand-all","menu-title-key","node","node-key","disabled"]))),128)),e.showNav?(l.openBlock(),l.createElementBlock("div",rEe,[l.createVNode(x,{modelValue:a.value,"onUpdate:modelValue":_[0]||(_[0]=w=>a.value=w),"tab-position":"right",onTabChange:g},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.value,w=>(l.openBlock(),l.createBlock(A,{key:w[e.nodeKey],label:w[e.menuTitleKey]},null,8,["label"]))),128))]),_:1},8,["modelValue"])])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-392b12fd"]])},Symbol.toStringTag,{value:"Module"})),aEe=l.defineComponent({name:"JwtUploadFile",props:{modelValue:{type:[String,Array],default:null},limitSize:{type:[String,Number],default:1024*10*50},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},limit:{type:[String,Number],default:10},uploadParam:{type:Object,default:()=>{}},module:{type:String,default:""},dragUpload:{type:Boolean,default:!1}},emits:["update:modelValue","onChange","after-btn-click"],setup(e,{emit:t}){const n=gn(),i=l.useAttrs(),r=l.ref(null),o=l.reactive({fileList:[],initOnce:!1,onUploadProgress:!1,uploadFiles:[],uploadSuccessFiles:[],selectUploadFileNum:0}),a=l.computed(()=>e.disabled||(e.isCosBacthUpload?o.uploadProgress:!1)),s=y=>n.fillUrl&&cn.isFunction(n.fillUrl)?n.fillUrl(y,"","",""):y,u=()=>{let y=[];if(e.multiple)if(cn.hasArray(e.modelValue))e.modelValue.map(b=>{b&&y.push({url:s(b),org_url:b,name:s(b)})});else if(cn.isString(e.modelValue))e.modelValue.split(",").map(b=>{b&&y.push({url:s(b),org_url:b,name:s(b)})});else return o.initOnce=!1,[];else y=e.modelValue?[{url:s(e.modelValue),org_url:e.modelValue,name:s(e.modelValue)}]:[];return o.initOnce=!0,y},c=l.watch(()=>e.modelValue,y=>{l.nextTick(()=>{if(!(y!=null&&y.isTrusted))if(y){const b=u();o.fileList=b}else o.fileList=[]})},{immediate:!0}),f=l.computed(()=>wd()),d=y=>{if(!n.uploadImgUrl)return ut.ElMessage.error(Oe("请配置上传的路径地址"));const b=y.type,g=parseInt(e.limitSize),k=g/1024,_=y.size/1024<g;_||(k>1?ut.ElMessage.error(`${Oe("上传文件大小不能超过")} ${k}MB!`):ut.ElMessage.error(`${Oe("上传文件大小不能超过")} ${g}KB!`));const A=_;return A&&(o.onUploadProgress=!0),A},h=()=>{o.onUploadProgress=!1},p=(y,b)=>{if(o.onUploadProgress=!1,y.code===0){let g=o.fileList.concat([b]);v(g)}else ut.ElMessage.error(y.msg),this.dialogVisible=!1},m=(y,b)=>{v(b)},v=y=>{const b=(n==null?void 0:n.imgUploadResKey)||"";o.initOnce=!0;let g=[];y.map(k=>{var A,x,w;const _=(b?(x=(A=k==null?void 0:k.response)==null?void 0:A.data)==null?void 0:x[b]:(w=k==null?void 0:k.response)==null?void 0:w.data)||k.org_url;_&&g.push(_)}),e.multiple?(t("update:modelValue",g),t("onChange",g)):(t("update:modelValue",g[0]||""),t("onChange",g[0]||""))};return l.onBeforeMount(()=>{o.fileList=[],o.initOnce=!1}),l.onMounted(()=>{}),l.onBeforeUnmount(()=>{c()}),{attrs:i,uploadRef:r,appOptions:n,...l.toRefs(o),headers:f,uploadDisabled:a,handleRemove:m,handleBeforeUpload:d,handleUploadSuccess:p,handleUploadError:h,t:Oe}}}),sEe={class:"w"};function lEe(e,t,n,i,r,o){const a=l.resolveComponent("el-button"),s=l.resolveComponent("el-upload");return l.openBlock(),l.createElementBlock("div",sEe,[l.createVNode(s,l.mergeProps({ref:"uploadRef","file-list":e.fileList,"onUpdate:fileList":t[0]||(t[0]=u=>e.fileList=u),accept:e.attrs.accept||"application/*",action:e.appOptions.uploadImgUrl,"before-upload":e.handleBeforeUpload,data:e.uploadParam,disabled:e.uploadDisabled,headers:e.headers,multiple:e.multiple,drag:e.dragUpload,name:"filedata","on-error":e.handleUploadError,"on-remove":e.handleRemove,"on-success":e.handleUploadSuccess,limit:e.limit,"with-credentials":""},e.attrs),{default:l.withCtx(()=>[l.createVNode(a,{type:"primary"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.t("上传")),1)]),_:1})]),_:1},16,["file-list","accept","action","before-upload","data","disabled","headers","multiple","drag","on-error","on-remove","on-success","limit"])])}const uEe=Object.freeze(Object.defineProperty({__proto__:null,default:tn(aEe,[["render",lEe]])},Symbol.toStringTag,{value:"Module"})),fEe=["src"],cEe=["title"],dEe={class:"picture-card-operation"},hEe=["onClick"],CG=tn({__name:"fileSlot",props:{listType:{type:String,default:"picture-card"},file:{type:Object,default:()=>{}},pictureActions:{type:Array,default:()=>[]}},emits:["remove","on-preview","action"],setup(e,{emit:t}){const n=t,{t:i}=ut.useLocale(),r=ut.useNamespace("upload"),o=ut.useNamespace("icon"),a=ut.useFormDisabled(),s=f=>{n("remove",f)},u=f=>{n("on-preview",f)},c=(f,d)=>{n("action",{item:f,file:d})};return(f,d)=>{const h=l.resolveComponent("el-icon"),p=l.resolveComponent("el-progress");return l.openBlock(),l.createElementBlock(l.Fragment,null,[e.listType==="picture"||e.file.status!=="uploading"&&e.listType==="picture-card"?(l.openBlock(),l.createElementBlock("img",{key:0,alt:"",class:l.normalizeClass(l.unref(r).be("list","item-thumbnail")),src:e.file.url},null,10,fEe)):l.createCommentVNode("",!0),e.file.status==="uploading"||e.listType!=="picture-card"?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(l.unref(r).be("list","item-info"))},[l.createElementVNode("a",{class:l.normalizeClass(l.unref(r).be("list","item-name")),onClick:d[0]||(d[0]=l.withModifiers(m=>u(e.file),["prevent"]))},[l.createVNode(h,{class:l.normalizeClass(l.unref(o).m("document"))},{default:l.withCtx(()=>[l.createVNode(l.unref(LX))]),_:1},8,["class"]),l.createElementVNode("span",{class:l.normalizeClass(l.unref(r).be("list","item-file-name")),title:e.file.name},l.toDisplayString(e.file.name),11,cEe)],2),e.file.status==="uploading"?(l.openBlock(),l.createBlock(p,{key:0,percentage:Number(e.file.percentage),"stroke-width":e.listType==="picture-card"?6:2,style:l.normalizeStyle(e.listType==="picture-card"?"":"margin-top: 0.5rem"),type:e.listType==="picture-card"?"circle":"line"},null,8,["percentage","stroke-width","style","type"])):l.createCommentVNode("",!0)],2)):l.createCommentVNode("",!0),l.createElementVNode("label",{class:l.normalizeClass(l.unref(r).be("list","item-status-label"))},[e.listType==="text"?(l.openBlock(),l.createBlock(h,{key:0,class:l.normalizeClass([l.unref(o).m("upload-success"),l.unref(o).m("circle-check")])},{default:l.withCtx(()=>[l.createVNode(l.unref(jX))]),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(l.openBlock(),l.createBlock(h,{key:1,class:l.normalizeClass([l.unref(o).m("upload-success"),l.unref(o).m("check")])},{default:l.withCtx(()=>[l.createVNode(l.unref(FX))]),_:1},8,["class"])):l.createCommentVNode("",!0)],2),l.unref(a)?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(h,{key:2,class:l.normalizeClass(l.unref(o).m("close")),onClick:d[1]||(d[1]=m=>s(e.file))},{default:l.withCtx(()=>[l.createVNode(l.unref(gB))]),_:1},8,["class"])),l.unref(a)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("i",{key:3,class:l.normalizeClass(l.unref(o).m("close-tip"))},l.toDisplayString(l.unref(i)("el.upload.deleteTip")),3)),e.listType==="picture-card"?(l.openBlock(),l.createElementBlock("span",{key:4,class:l.normalizeClass(l.unref(r).be("list","item-actions"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(r).be("list","item-preview")),onClick:d[2]||(d[2]=m=>u(e.file))},[l.createVNode(h,{class:l.normalizeClass(l.unref(o).m("zoom-in"))},{default:l.withCtx(()=>[l.createVNode(l.unref(HX))]),_:1},8,["class"])],2),l.unref(a)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(l.unref(r).be("list","item-delete")),onClick:d[3]||(d[3]=m=>s(e.file))},[l.createVNode(h,{class:l.normalizeClass(l.unref(o).m("delete"))},{default:l.withCtx(()=>[l.createVNode(l.unref(NX))]),_:1},8,["class"])],2)),l.createElementVNode("div",dEe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.pictureActions,(m,v)=>(l.openBlock(),l.createElementBlock("span",{key:v,onClick:l.withModifiers(y=>c(m,e.file),["stop"])},l.toDisplayString(m.label),9,hEe))),128))])],2)):l.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-5526a394"]]),pEe=Object.freeze(Object.defineProperty({__proto__:null,default:CG},Symbol.toStringTag,{value:"Module"})),gEe=l.defineComponent({name:"JwtUploadImage",components:{FileSlot:CG,PasteUpload:Jb},props:{modelValue:{type:[String,Array],default:null},limitSize:{type:[String,Number],default:2048},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},listType:{type:String,default:"picture-card"},limit:{type:[String,Number],default:10},uploadParam:{type:Object,default:()=>{}},uploadPrefixName:{type:String,default:""},copyImgUploade:{type:Boolean,default:!1},verifyFileType:{type:Boolean,default:!0},uploadName:{type:String,default:""},dragUpload:{type:Boolean,default:!1}},emits:["update:modelValue","onChange","after-btn-click","picture-action","after-btns-click"],setup(e,{emit:t}){const n=gn(),i=l.useAttrs(),r=l.ref(null),o=l.reactive({fileList:[],dialogVisible:!1,dialogImageUrl:"",initOnce:!1,onUploadProgress:!1,textarea:"",uploadParams:{...e.uploadParam,name:"",goods_matting:0}}),a=(D="")=>n.fillUrl&&cn.isFunction(n.fillUrl)?n.fillUrl(D):D,s=l.computed(()=>(e==null?void 0:e.uploadName)||(n==null?void 0:n.uploadFileName)||"filedata"),u=l.computed(()=>({"--upload-picture-card-size":(i==null?void 0:i.cardSize)||"148px"})),c=l.computed(()=>(e==null?void 0:e.listType)==="picture-card"),f=l.computed(()=>{var D;return e.multiple?!1:!!((D=e==null?void 0:e.modelValue)!=null&&D.length)||o.onUploadProgress}),d=()=>{var R;if(!e.modelValue)return[];let D=[];if(e.multiple)if(cn.hasArray(e.modelValue))e.modelValue.map(L=>{L&&D.push({url:a(L),org_url:L,name:a(L)})});else if(cn.isString(e.modelValue))e.modelValue.split(",").map(L=>{L&&D.push({url:a(L),org_url:L,name:a(L)})});else if((R=e.modelValue)!=null&&R.length)D=[{url:a(e.modelValue),org_url:e.modelValue,name:a(e.modelValue)}];else return o.initOnce=!1,[];else D=e.modelValue?[{url:a(e.modelValue),org_url:e.modelValue,name:a(e.modelValue)}]:[];return o.initOnce=!0,D},h=l.watch(()=>e.modelValue,D=>{l.nextTick(()=>{if(!(D!=null&&D.isTrusted))if(D){const R=d();o.fileList=R}else o.fileList=[]})},{immediate:!0}),p=l.computed(()=>wd()),m=D=>{if(!n.uploadImgUrl)return ut.ElMessage.error(Oe("请配置上传的路径地址"));o.uploadParams.name=`${e.uploadPrefixName}${e.uploadPrefixName?"_":""}${D.name}`;const R=D.type,L=parseInt(e.limitSize),M=L/1024,X=D.size/1024<L,ee=["image/jpeg","image/png","image/gif","image/webp","image/x-icon"];let ae=e.verifyFileType?ee.includes(R):!0;R.includes(".icon")&&(ae=!0),ae||ut.ElMessage.error(Oe("上传图片只能是JPG,PNG,GIF,WEBP格式")),X||(M>1?ut.ElMessage.error(`${Oe("上传图片大小不能超过")} ${M}MB!`):ut.ElMessage.error(`${Oe("上传图片大小不能超过")} ${L}KB!`));const N=ae&&X;return N&&(o.onUploadProgress=!0),N},v=()=>{o.onUploadProgress=!1},y=(D,R,L)=>{const M=L.every(X=>X.status==="success");o.onUploadProgress=!1,M&&g(L)},b=(D,R)=>{g(R)},g=D=>{const R=n.imgUploadResKey||"";o.initOnce=!0;let L=[];D.map(M=>{var ee,ae,N;const X=(R?(ae=(ee=M==null?void 0:M.response)==null?void 0:ee.data)==null?void 0:ae[R]:(N=M==null?void 0:M.response)==null?void 0:N.data)||M.org_url;X&&L.push(X)}),e.multiple?(t("update:modelValue",L),t("onChange",L)):(t("update:modelValue",L[0]||""),t("onChange",L[0]||""))},k=D=>{o.dialogImageUrl=D.url,o.dialogVisible=!0},_=D=>{r.value.handleStart(D),r.value.submit()},A=()=>{t("after-btn-click")},x=(D,R)=>{t("after-btns-click",D,R)},w=(D,R)=>{const L=ut.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});i.mattingUrl&&i.requestFun({url:i.mattingUrl,method:"post",data:{http_path:D,...e.uploadParam}}).then(M=>{const X=M==null?void 0:M.relative_path.split(",").map(ee=>({url:a(ee),org_url:ee,name:ee}));t("picture-action",{file:X,item:R}),L.close()}).catch(()=>{L.close()})},O=D=>{r.value.handleRemove(D)},S=l.computed(()=>o.fileList.length&&i.mattingAll),C=l.computed(()=>{const D=(i==null?void 0:i.actionList)||[];return D.length===0?[]:[{label:Oe("设为主图"),code:"setMain"},{label:Oe("抠图"),code:"mattingImg"},{label:Oe("设计"),code:"design"}].filter(M=>D.includes(M.code))}),E=({file:D,item:R})=>{if(R.code==="mattingImg"){w(D.url,R);return}t("picture-action",{file:D,item:R})},T=()=>{var R,L;const D=(L=(R=o.fileList)==null?void 0:R.map(M=>M.org_url))==null?void 0:L.join(",");D&&w(D,{code:"mattingAll"})},F=(D,R)=>{};return l.onBeforeMount(()=>{o.fileList=[],o.initOnce=!1}),l.onBeforeUnmount(()=>{o.fileList=[],o.initOnce=!1,h()}),{attrs:i,uploadRef:r,appOptions:n,isPictureCard:c,...l.toRefs(o),headers:p,showOnlyOne:f,pictureActions:C,showMattingAll:S,styleObj:u,uploadFileName:s,handleRemove:b,handleBeforeUpload:m,handleUploadSuccess:y,handlePictureCardPreview:k,handleUploadError:v,handleUploadPaste:_,t:Oe,handleAfterBtn:A,handleClickAfterBtns:x,handleFileRemove:O,handlePictureAction:E,handleAllMattingImg:T,handleUploadOnChange:F}}}),mEe={key:0,class:"fv fxr ml5"},vEe=["src"];function yEe(e,t,n,i,r,o){const a=l.resolveComponent("PasteUpload"),s=l.resolveComponent("jwt-icon"),u=l.resolveComponent("el-button"),c=l.resolveComponent("file-slot"),f=l.resolveComponent("el-upload"),d=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",{class:"w jwt-upload-image-wrapper",style:l.normalizeStyle(e.styleObj)},[l.createVNode(a,{"btn-list":e.attrs.btnList,"btn-text":e.attrs.afterBtnText,copy:e.copyImgUploade,disabled:e.disabled,limit:e.showOnlyOne,onAfterBtnClick:e.handleAfterBtn,onAfterBtnsClick:e.handleClickAfterBtns,onUploadPaste:e.handleUploadPaste},null,8,["btn-list","btn-text","copy","disabled","limit","onAfterBtnClick","onAfterBtnsClick","onUploadPaste"]),l.createElementVNode("div",{class:l.normalizeClass([e.isPictureCard?"fx":""])},[l.createVNode(f,{ref:"uploadRef",accept:e.attrs.accept||"image/*",action:e.appOptions.uploadImgUrl,"before-upload":e.handleBeforeUpload,class:l.normalizeClass({onlyOne:e.showOnlyOne}),data:e.uploadParams,disabled:e.disabled,drag:e.dragUpload,"file-list":e.fileList,headers:e.headers,"list-type":e.listType,multiple:e.multiple,name:e.uploadFileName,"on-change":e.handleUploadOnChange,"on-error":e.handleUploadError,"on-preview":e.handlePictureCardPreview,"on-remove":e.handleRemove,"on-success":e.handleUploadSuccess,"show-file-list":!0,"with-credentials":""},l.createSlots({trigger:l.withCtx(()=>[e.isPictureCard?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[e.attrs.useMaterial?(l.openBlock(),l.createElementBlock("div",{key:0,class:"wh fxmc",onClick:t[0]||(t[0]=l.withModifiers((...h)=>e.handleAfterBtn&&e.handleAfterBtn(...h),["stop"]))},[l.createVNode(s,{icon:"add-line",size:40})])):(l.openBlock(),l.createBlock(s,{key:1,icon:"add-line",size:40}))],64)):(l.openBlock(),l.createBlock(u,{key:1,type:"primary"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.t("选择文件")),1)]),_:1}))]),_:2},[e.attrs.mattingUrl?{name:"file",fn:l.withCtx(({file:h})=>[l.createVNode(c,{file:h,"list-type":e.listType,"picture-actions":e.pictureActions,onAction:e.handlePictureAction,onOnPreview:e.handlePictureCardPreview,onRemove:e.handleFileRemove},null,8,["file","list-type","picture-actions","onAction","onOnPreview","onRemove"])]),key:"0"}:void 0]),1032,["accept","action","before-upload","class","data","disabled","drag","file-list","headers","list-type","multiple","name","on-change","on-error","on-preview","on-remove","on-success"]),e.showMattingAll?(l.openBlock(),l.createElementBlock("div",mEe,[l.createVNode(u,{type:"primary",onClick:e.handleAllMattingImg},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.t("一键抠图")),1)]),_:1},8,["onClick"])])):l.createCommentVNode("",!0)],2),e.attrs.tips1?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(e.attrs.tipsCls)},l.toDisplayString(e.attrs.tips),3)):l.createCommentVNode("",!0),l.createVNode(d,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[1]||(t[1]=h=>e.dialogVisible=h),"append-to-body":""},{default:l.withCtx(()=>[l.createElementVNode("img",{src:e.dialogImageUrl,style:{width:"100%"},"w-full":""},null,8,vEe)]),_:1},8,["modelValue"])],4)}const bEe=Object.freeze(Object.defineProperty({__proto__:null,default:tn(gEe,[["render",yEe]])},Symbol.toStringTag,{value:"Module"})),kEe=l.defineComponent({name:"JwtUploadVideo",props:{modelValue:{type:[String,Array],default:null},limitSize:{type:[String,Number],default:1024*10*50},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},listType:{type:String,default:"picture-card"},limit:{type:[String,Number],default:10},uploadParam:{type:Object,default:()=>{}},copyImgUploade:{type:Boolean,default:!1},isCosSdk:{type:Boolean,default:!1},isCosBacthUpload:{type:Boolean,default:!0},module:{type:String,default:""},dragUpload:{type:Boolean,default:!1}},emits:["update:modelValue","onChange","after-btn-click"],setup(e,{emit:t}){const n=gn(),i=l.useAttrs(),r=l.ref(null),o=l.reactive({fileList:[],dialogVisible:!1,dialogImageUrl:"",initOnce:!1,onUploadProgress:!1,textarea:"",uploadFiles:[],uploadSuccessFiles:[],uploadFileNum:0,selectUploadFileNum:0,uploadTips:"",uploadProgress:!1,uploadPercent:0,cosConfig:{}}),a=l.computed(()=>e.disabled||(e.isCosBacthUpload?o.uploadProgress:!1)),s=S=>n.fillUrl&&cn.isFunction(n.fillUrl)?n.fillUrl(S,"","",""):S,u=l.computed(()=>{var S;return e.multiple?!1:!!((S=e==null?void 0:e.modelValue)!=null&&S.length)||o.onUploadProgress}),c=()=>{let S=[];if(e.multiple)if(cn.hasArray(e.modelValue))e.modelValue.map(C=>{C&&S.push({url:s(C),org_url:C,name:s(C)})});else if(cn.isString(e.modelValue))e.modelValue.split(",").map(C=>{C&&S.push({url:s(C),org_url:C,name:s(C)})});else return o.initOnce=!1,[];else S=e.modelValue?[{url:s(e.modelValue),org_url:e.modelValue,name:s(e.modelValue)}]:[];return o.initOnce=!0,S};l.watch(()=>e.modelValue,S=>{l.nextTick(()=>{if(!(S!=null&&S.isTrusted))if(S){const C=c();o.fileList=C}else o.fileList=[]})},{immediate:!0});const f=l.computed(()=>wd()),d=S=>{if(!n.uploadImgUrl)return ut.ElMessage.error(Oe("请配置上传的路径地址"));const C=S.type,E=parseInt(e.limitSize),T=E/1024,F=S.size/1024<E;F||(T>1?ut.ElMessage.error(`${Oe("上传视频大小不能超过")} ${T}MB!`):ut.ElMessage.error(`${Oe("上传视频大小不能超过")} ${E}KB!`));const D=F;return D&&(o.onUploadProgress=!0),D},h=()=>{o.onUploadProgress=!1},p=(S,C)=>{if(o.onUploadProgress=!1,S.code===0){let E=o.fileList.concat([C]);v(E)}else ut.ElMessage.error(S.msg),o.dialogVisible=!1},m=(S,C)=>{v(C)},v=S=>{const C=n.imgUploadResKey||"";o.initOnce=!0;let E=[];S.map(T=>{var D,R,L;const F=(C?(R=(D=T==null?void 0:T.response)==null?void 0:D.data)==null?void 0:R[C]:(L=T==null?void 0:T.response)==null?void 0:L.data)||T.org_url;F&&E.push(F)}),e.multiple?(t("update:modelValue",E),t("onChange",E)):(t("update:modelValue",E[0]||""),t("onChange",E[0]||""))},y=(S,C)=>{if(!e.isCosSdk)return;o.uploadFiles.push(S);let E=C.length;o.selectUploadFileNum=Math.max(E,o.selectUploadFileNum),setTimeout(()=>{o.selectUploadFileNum!==E||o.uploadProgress&&e.isCosBacthUpload||(o.uploadProgress=!0,o.uploadTips=Oe("正在上传中")+"...",o.uploadSuccessFiles=[],b(o.uploadFiles))},50)},b=async S=>{Gb.handleUploadFiles(S,e.isCosBacthUpload,{onProgress:g,onFileFinish:k,handlePath:_})},g=S=>{e.isCosBacthUpload&&(o.uploadPercent=S)},k=(S,C,E,T)=>{if(e.isCosBacthUpload)if(S)ut.ElMessage.error(Oe("上传失败请重新上传")),o.uploadTips=Oe("上传失败请重新上传")+"...",o.uploadProgress=!1,o.uploadFileNum=0,o.uploadPercent=0;else{o.uploadFileNum+=1;const F=`/${E.Key}`,D=o.uploadFiles.findIndex(R=>R.keyPath===E.Key);if(D>=0&&(o.uploadFiles[D].uploadDone="done",o.uploadFiles[D].uploadPercent=100),o.uploadSuccessFiles.push({org_url:F}),o.uploadFileNum===T.length){o.uploadTips=Oe("上传完成");let R=o.fileList.concat(o.uploadSuccessFiles);v(R),setTimeout(()=>{o.uploadProgress=!1,o.uploadFileNum=0,o.uploadPercent=0},500)}}else if(S)ut.ElMessage.error(Oe("上传失败请重新上传"));else{const F=`/${E.Key}`;let D=o.fileList.concat([{org_url:F}]);v(D)}},_=S=>`${Ai.get("companyId")}/${e.module}/${va().format("YYYYMMDD")}/${l7(S.name+`${c7(0,1e4)}`)}.${S.ext}`,A=S=>{o.dialogImageUrl=S,o.dialogVisible=!0},x=()=>{t("after-btn-click")},w=(S,C)=>{if(o.fileList.splice(S,1),l.nextTick(()=>{v(o.fileList)}),o.uploadFileList.length){const E=o.uploadFileList.findIndex(T=>T.org_url===C.org_url);E>=0&&o.uploadFileList.splice(E,1)}},O=()=>{Gb.getInstance(n.txCosUploadFileUrl)};return l.onBeforeMount(()=>{o.fileList=[],o.initOnce=!1}),l.onMounted(()=>{e.isCosSdk&&O()}),{attrs:i,uploadRef:r,appOptions:n,...l.toRefs(o),headers:f,showOnlyOne:u,uploadDisabled:a,handleRemove:m,handleBeforeUpload:d,handleUploadSuccess:p,handleVideoPreview:A,handleUploadError:h,t:Oe,handleAfterBtn:x,handleDeleteVideo:w,handleUploadOnChange:y,handleInitCosSdk:O}}}),wEe={class:"w"},_Ee={class:"fx fxwp el-upload-list el-upload-list--picture-card"},CEe=["src"],SEe={key:0,class:"jwt-material-img-mask"},xEe=["onClick"],EEe=["onClick"],BEe={class:"fx mb10 fxb"},DEe={key:0},TEe={class:"g6 fs12 lh1"},AEe={key:1,style:{width:"50%"}},OEe={class:"cd"},FEe=["src"];function PEe(e,t,n,i,r,o){const a=l.resolveComponent("jwt-icon"),s=l.resolveComponent("el-upload"),u=l.resolveComponent("el-button"),c=l.resolveComponent("el-progress"),f=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",wEe,[l.createElementVNode("ul",_Ee,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.fileList,(d,h)=>(l.openBlock(),l.createElementBlock("li",{key:h,class:"el-upload-list__item is-success rel"},[l.createElementVNode("video",{class:"wh",controls:"",src:d.url},null,8,CEe),d.url?(l.openBlock(),l.createElementBlock("div",SEe,[l.createElementVNode("i",{class:"el-icon",onClick:l.withModifiers(p=>e.handleVideoPreview(d.url),["stop"])},[...t[2]||(t[2]=[l.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[l.createElementVNode("path",{d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zm-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96z",fill:"currentColor"})],-1)])],8,xEe),l.createElementVNode("i",{class:"el-icon",onClick:l.withModifiers(p=>e.handleDeleteVideo(h,d),["stop"])},[...t[3]||(t[3]=[l.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[l.createElementVNode("path",{d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z",fill:"currentColor"})],-1)])],8,EEe)])):l.createCommentVNode("",!0)]))),128)),l.createVNode(s,{ref:"uploadRef",accept:"video/*",action:e.appOptions.uploadImgUrl,"auto-upload":!e.isCosSdk,"before-upload":e.handleBeforeUpload,class:l.normalizeClass({onlyOne:e.showOnlyOne}),data:e.uploadParam,disabled:e.uploadDisabled,headers:e.headers,"list-type":e.listType,multiple:e.multiple,drag:e.dragUpload,name:"filedata","on-change":e.handleUploadOnChange,"on-error":e.handleUploadError,"on-remove":e.handleRemove,"on-success":e.handleUploadSuccess,"show-file-list":!1,"with-credentials":""},{default:l.withCtx(()=>[e.attrs.useMaterial?(l.openBlock(),l.createElementBlock("div",{key:0,class:"wh fxmc",onClick:t[0]||(t[0]=l.withModifiers((...d)=>e.handleAfterBtn&&e.handleAfterBtn(...d),["stop"]))},[l.createVNode(a,{icon:"add-line",size:40})])):(l.openBlock(),l.createBlock(a,{key:1,icon:"add-line",size:40}))]),_:1},8,["action","auto-upload","before-upload","class","data","disabled","headers","list-type","multiple","drag","on-change","on-error","on-remove","on-success"]),l.createElementVNode("div",BEe,[e.attrs.afterBtnText?(l.openBlock(),l.createBlock(u,{key:0,class:"ml10",disabled:e.disabled,size:"default",type:"primary",onClick:e.handleAfterBtn},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.t(e.attrs.afterBtnText)||e.t("从素材库选")),1)]),_:1},8,["disabled","onClick"])):l.createCommentVNode("",!0)])]),e.isCosBacthUpload?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",DEe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.uploadFiles,(d,h)=>(l.openBlock(),l.createElementBlock("div",{key:h,class:"lh1"},[l.createElementVNode("span",TEe,l.toDisplayString(d.name),1),l.createVNode(c,{class:"mt2",percentage:d.uploadPercent,"stroke-width":3},null,8,["percentage"])]))),128))])),e.isCosBacthUpload&&e.uploadProgress?(l.openBlock(),l.createElementBlock("div",AEe,[l.createVNode(c,{percentage:e.uploadPercent},null,8,["percentage"]),l.createElementVNode("span",OEe,l.toDisplayString(e.uploadTips),1)])):l.createCommentVNode("",!0),l.createVNode(f,{modelValue:e.dialogVisible,"onUpdate:modelValue":t[1]||(t[1]=d=>e.dialogVisible=d),"append-to-body":""},{default:l.withCtx(()=>[l.createElementVNode("video",{controls:"",src:e.dialogImageUrl,style:{width:"100%"},"w-full":""},null,8,FEe)]),_:1},8,["modelValue"])])}const jEe=Object.freeze(Object.defineProperty({__proto__:null,default:tn(kEe,[["render",PEe],["__scopeId","data-v-9fde4789"]])},Symbol.toStringTag,{value:"Module"})),REe={beforeMount(e,t){var s;const n=t.arg||{},i=((s=t==null?void 0:t.modifiers)==null?void 0:s.once)||!1,r=n.root||null,o=n.rootMargin||"0px",a=n.threshold||0;e.intersectionObserver=new IntersectionObserver(u=>{u[0].isIntersecting&&(t.value(),i&&e.intersectionObserver.disconnect())},{root:r,rootMargin:o,threshold:a}),e.intersectionObserver.observe(e)},unmounted(e){e.intersectionObserver.disconnect()}};function IEe(e){const t=new Map;return function(...n){const i=JSON.stringify(n);if(t.has(i))return t.get(i);const r=l.computed(()=>e(...n));return t.set(i,r),r}}var SG={exports:{}};const NEe=NSe(cSe);(function(e,t){(function(n,i){e.exports=i(NEe)})(self,n=>(()=>{var i={857:s=>{s.exports=n}},r={};function o(s){var u=r[s];if(u!==void 0)return u.exports;var c=r[s]={exports:{}};return i[s](c,c.exports,o),c.exports}o.d=(s,u)=>{for(var c in u)o.o(u,c)&&!o.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:u[c]})},o.o=(s,u)=>Object.prototype.hasOwnProperty.call(s,u),o.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var a={};return(()=>{o.r(a),o.d(a,{default:()=>q});var s=o(857);(0,s.i18nAddResources)("en",{attachment:{upload:"Upload Attachment",download:"Download Attachment"}}),(0,s.i18nAddResources)("zh-CN",{attachment:{upload:"上传附件",download:"下载附件"}});function u(V,K,Y,ne,oe){return{sel:V,data:K,children:Y,text:ne,elm:oe,key:K===void 0?void 0:K.key}}const c=Array.isArray;function f(V){return typeof V=="string"||typeof V=="number"||V instanceof String||V instanceof Number}function d(V,K,Y){if(V.ns="http://www.w3.org/2000/svg",Y!=="foreignObject"&&K!==void 0)for(let ne=0;ne<K.length;++ne){const oe=K[ne];if(typeof oe=="string")continue;const ve=oe.data;ve!==void 0&&d(ve,oe.children,oe.sel)}}function h(V,K,Y){let ne,oe,ve,xe={};if(Y!==void 0?(K!==null&&(xe=K),c(Y)?ne=Y:f(Y)?oe=Y.toString():Y&&Y.sel&&(ne=[Y])):K!=null&&(c(K)?ne=K:f(K)?oe=K.toString():K&&K.sel?ne=[K]:xe=K),ne!==void 0)for(ve=0;ve<ne.length;++ve)f(ne[ve])&&(ne[ve]=u(void 0,void 0,void 0,ne[ve],void 0));return V[0]!=="s"||V[1]!=="v"||V[2]!=="g"||V.length!==3&&V[3]!=="."&&V[3]!=="#"||d(xe,ne,V),u(V,xe,ne,oe,void 0)}const p={type:"attachment",renderElem:function(V,K,Y){var ne=Y.isDisabled(),oe=s.DomEditor.isNodeSelected(Y,V),ve=V,xe=ve.fileName,ie=xe===void 0?"":xe,we=ve.link,Se=we===void 0?"":we;return h("span",{props:{contentEditable:!1},style:{display:"inline-block",marginLeft:"3px",marginRight:"3px",border:oe&&!ne?"2px solid var(--w-e-textarea-selected-border-color)":"2px solid transparent",borderRadius:"3px",padding:"0 3px",backgroundColor:"#f1f1f1",cursor:ne?"pointer":"inherit"},on:{click:function(){ne&&Se&&window.open(Se,"_blank")}}},[h("img",{props:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAv5JREFUWEetl1nITVEUx3/fo5LkyRQeFA+SIS8eZHhQimRKMhMSoogyR5QxMs9DkplQEhFvxihCKUWkpCTP9P9a+1p3f2efe869367T3Xeftdf/v9e012mi9cZQYDzQBxgIfANeAO+BDSmYplbCX58HAnwFFgNXY7zWIHABmBQpfg10A9pH64OAZ36tUQLngClO4XVgC/DU1iYCF937N+aiylIjBM4A05xy+XljwqV/3bpkKjFRL4GTwMyU0gwSY4Abtn4NGBdk6iFwFJhbAjyI/gLaAR+BnvUSOATML2j22BCvgL7AbyPS/L6MBfYDC3NOrlS8BLzNcIGi/4mtPwSGlbXAHmBJDriCSgQU5UrJmIT8Ptb277OaUNgCu4BlBcCDSFWUGzFfCXV6WaEQge3A8hLgcSquBjbnBWxeDGwFVtXwuT9ZfHLtlY4wFB9xxUwGoViLfVGzxuCymqyXC57KAilb1wC44kVxUxM8i8Bs4HgJn8cnV6YoYwqBxwR6A/eBzrY7Vh5SLeUW1QjVisLgMQEFyQTbfQqY5ZTVAp8HHC4L7gnocrhiCj5ZpdKvxlJgd45b5gDHcsDzKmQlC3zUrwS2mcJ+wAPXWMRumQHIWimzh04pVSErBG4Do0zLaOCWzX2rpeZjqgPT/GwB8FTMNK+HQqSerZNJKgjVUGro9Go2NXwJnQycLwGebFYCgS9AF1PYEfhu8wXAQZurfh8AutcoMnGDGrvN8f5vAQVg6FJGAndNqq211SE1qzbb9evLaylw74I1wCbTvgLY4ZAGAzeBDhH6kYzmRARyfR6fILhAd7XubI0fQC/gpxNuY23YcOCDdbrP3fvSJw97/W14B5D5NR4DQ2K2if91g3sXaN4V+OxAlN+LgD8J4B7WbJTpjluoivuB6cBpJ6VquBd4BAST67tP1tHFIxKlfJ6KAb8+AriXcWqlarCUf60ashY4UdBlVWKpjkgRvzP6+MjSf9nA39UDHsdAlg7VhgFAf3sk89IefXq3+NotS+QfmNG0IS7jBhcAAAAASUVORK5CYII="},style:{width:"1em",marginRight:"0.1em",minWidth:"0",minHeight:"0"}}),ie])}};function m(V){return V!==null&&typeof V=="object"&&"constructor"in V&&V.constructor===Object}function v(V={},K={}){Object.keys(K).forEach(Y=>{V[Y]===void 0?V[Y]=K[Y]:m(K[Y])&&m(V[Y])&&Object.keys(K[Y]).length>0&&v(V[Y],K[Y])})}const y={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function b(){const V=typeof document<"u"?document:{};return v(V,y),V}const g={document:y,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:V=>typeof setTimeout>"u"?(V(),null):setTimeout(V,0),cancelAnimationFrame(V){typeof setTimeout<"u"&&clearTimeout(V)}};function k(){const V=typeof window<"u"?window:{};return v(V,g),V}class _ extends Array{constructor(K){typeof K=="number"?super(K):(super(...K||[]),function(Y){const ne=Y.__proto__;Object.defineProperty(Y,"__proto__",{get:()=>ne,set(oe){ne.__proto__=oe}})}(this))}}function A(V,K){const Y=k(),ne=b();let oe=[];if(!K&&V instanceof _)return V;if(!V)return new _(oe);if(typeof V=="string"){const ve=V.trim();if(ve.indexOf("<")>=0&&ve.indexOf(">")>=0){let xe="div";ve.indexOf("<li")===0&&(xe="ul"),ve.indexOf("<tr")===0&&(xe="tbody"),ve.indexOf("<td")!==0&&ve.indexOf("<th")!==0||(xe="tr"),ve.indexOf("<tbody")===0&&(xe="table"),ve.indexOf("<option")===0&&(xe="select");const ie=ne.createElement(xe);ie.innerHTML=ve;for(let we=0;we<ie.childNodes.length;we+=1)oe.push(ie.childNodes[we])}else oe=function(xe,ie){if(typeof xe!="string")return[xe];const we=[],Se=ie.querySelectorAll(xe);for(let P=0;P<Se.length;P+=1)we.push(Se[P]);return we}(V.trim(),K||ne)}else if(V.nodeType||V===Y||V===ne)oe.push(V);else if(Array.isArray(V)){if(V instanceof _)return V;oe=V}return new _(function(ve){const xe=[];for(let ie=0;ie<ve.length;ie+=1)xe.indexOf(ve[ie])===-1&&xe.push(ve[ie]);return xe}(oe))}function x(...V){let[K,Y,ne,oe]=V;function ve(Se){const P=Se.target;if(!P)return;const le=Se.target.dom7EventData||[];if(le.indexOf(Se)<0&&le.unshift(Se),A(P).is(Y))ne.apply(P,le);else{const ye=A(P).parents();for(let G=0;G<ye.length;G+=1)A(ye[G]).is(Y)&&ne.apply(ye[G],le)}}function xe(Se){const P=Se&&Se.target&&Se.target.dom7EventData||[];P.indexOf(Se)<0&&P.unshift(Se),ne.apply(this,P)}typeof V[1]=="function"&&([K,ne,oe]=V,Y=void 0),oe||(oe=!1);const ie=K.split(" ");let we;for(let Se=0;Se<this.length;Se+=1){const P=this[Se];if(Y)for(we=0;we<ie.length;we+=1){const le=ie[we];P.dom7LiveListeners||(P.dom7LiveListeners={}),P.dom7LiveListeners[le]||(P.dom7LiveListeners[le]=[]),P.dom7LiveListeners[le].push({listener:ne,proxyListener:ve}),P.addEventListener(le,ve,oe)}else for(we=0;we<ie.length;we+=1){const le=ie[we];P.dom7Listeners||(P.dom7Listeners={}),P.dom7Listeners[le]||(P.dom7Listeners[le]=[]),P.dom7Listeners[le].push({listener:ne,proxyListener:xe}),P.addEventListener(le,xe,oe)}}return this}function w(){for(let V=0;V<this.length;V+=1)this[V].style.display="none";return this}function O(...V){let K;const Y=b();for(let ne=0;ne<V.length;ne+=1){K=V[ne];for(let oe=0;oe<this.length;oe+=1)if(typeof K=="string"){const ve=Y.createElement("div");for(ve.innerHTML=K;ve.firstChild;)this[oe].appendChild(ve.firstChild)}else if(K instanceof _)for(let ve=0;ve<K.length;ve+=1)this[oe].appendChild(K[ve]);else this[oe].appendChild(K)}return this}A.fn=_.prototype;const S="resize scroll".split(" ");function C(V){return function(...K){if(K[0]===void 0){for(let Y=0;Y<this.length;Y+=1)S.indexOf(V)<0&&(V in this[Y]?this[Y][V]():A(this[Y]).trigger(V));return this}return this.on(V,...K)}}const E=C("click"),T=A;w&&(T.fn.hide=w),O&&(T.fn.append=O),E&&(T.fn.click=E),x&&(T.fn.on=x);const F=T;var D=function(){return D=Object.assign||function(V){for(var K,Y=1,ne=arguments.length;Y<ne;Y++)for(var oe in K=arguments[Y])Object.prototype.hasOwnProperty.call(K,oe)&&(V[oe]=K[oe]);return V},D.apply(this,arguments)},R=function(V,K,Y,ne){return new(Y||(Y=Promise))(function(oe,ve){function xe(Se){try{we(ne.next(Se))}catch(P){ve(P)}}function ie(Se){try{we(ne.throw(Se))}catch(P){ve(P)}}function we(Se){var P;Se.done?oe(Se.value):(P=Se.value,P instanceof Y?P:new Y(function(le){le(P)})).then(xe,ie)}we((ne=ne.apply(V,[])).next())})},L=function(V,K){var Y,ne,oe,ve,xe={label:0,sent:function(){if(1&oe[0])throw oe[1];return oe[1]},trys:[],ops:[]};return ve={next:ie(0),throw:ie(1),return:ie(2)},typeof Symbol=="function"&&(ve[Symbol.iterator]=function(){return this}),ve;function ie(we){return function(Se){return function(P){if(Y)throw new TypeError("Generator is already executing.");for(;xe;)try{if(Y=1,ne&&(oe=2&P[0]?ne.return:P[0]?ne.throw||((oe=ne.return)&&oe.call(ne),0):ne.next)&&!(oe=oe.call(ne,P[1])).done)return oe;switch(ne=0,oe&&(P=[2&P[0],oe.value]),P[0]){case 0:case 1:oe=P;break;case 4:return xe.label++,{value:P[1],done:!1};case 5:xe.label++,ne=P[1],P=[0];continue;case 7:P=xe.ops.pop(),xe.trys.pop();continue;default:if(!((oe=(oe=xe.trys).length>0&&oe[oe.length-1])||P[0]!==6&&P[0]!==2)){xe=0;continue}if(P[0]===3&&(!oe||P[1]>oe[0]&&P[1]<oe[3])){xe.label=P[1];break}if(P[0]===6&&xe.label<oe[1]){xe.label=oe[1],oe=P;break}if(oe&&xe.label<oe[2]){xe.label=oe[2],xe.ops.push(P);break}oe[2]&&xe.ops.pop(),xe.trys.pop();continue}P=K.call(V,xe)}catch(le){P=[6,le],ne=0}finally{Y=oe=0}if(5&P[0])throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}([we,Se])}}};function M(V){return V.getMenuConfig("uploadAttachment")}function X(V,K,Y){if(K&&Y){V.restoreSelection();var ne={type:"attachment",fileName:K,link:Y,children:[{text:""}]};V.insertNode(ne),V.move(1);var oe=M(V).onInsertedAttachment;oe&&oe(ne)}}function ee(V,K){return R(this,void 0,void 0,function(){var Y,ne,oe,ve;return L(this,function(xe){switch(xe.label){case 0:return Y=function(ie){var we=ae.get(ie);if(we!=null)return we;var Se=M(ie),P=Se.onSuccess,le=Se.onProgress,ye=Se.onFailed,G=Se.customInsert,J=Se.onError;return we=(0,s.createUploader)(D(D({},Se),{onProgress:function(fe){ie.showProgressBar(fe),le&&le(fe)},onSuccess:function(fe,se){if(G)G(se,fe,function(st,et){return X(ie,st,et)});else{var me=se.errno,ce=me===void 0?1:me,Fe=se.data,be=Fe===void 0?{}:Fe;if(ce!==0)return void ye(fe,se);var _e=be.url,Ve=_e===void 0?"":_e;X(ie,fe.name,Ve),P(fe,se)}},onError:function(fe,se,me){var ce=fe.name;J&&J(fe,se,me)}})),ae.set(ie,we),we}(V),ne=K.name,oe=K.type,ve=K.size,Y.addFile({name:ne,type:oe,size:ve,data:K}),[4,Y.upload()];case 1:return xe.sent(),[2]}})})}var ae=new WeakMap;const N=function(){function V(){this.title=(0,s.t)("attachment.upload"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M665.821116 327.053068l-64.958782-64.926783-324.79391 324.729911c-53.822991 53.790991-53.822991 141.053355 0 194.844347s141.053355 53.790991 194.876346 0l389.752692-389.688693a229.531696 229.531696 0 0 0 0-324.729912 229.627694 229.627694 0 0 0-324.761911 0L126.727224 476.458266l-0.863984 0.831985c-125.085655 125.085655-125.085655 327.833853 0 452.887508 125.053655 125.053655 327.865853 125.053655 452.983507 0l0.831984-0.863984 0.031999 0.032 279.322763-279.290764-64.990781-64.926782-279.322763 279.258764-0.831984 0.831984a228.731711 228.731711 0 0 1-323.065943 0 228.603714 228.603714 0 0 1 0-322.969944l0.895983-0.831985-0.031999-0.063998L600.958332 132.208721c53.694993-53.726993 141.149353-53.726993 194.876346 0s53.694993 141.149353 0 194.844347L406.081986 716.741761c-17.919664 17.919664-47.039118 17.919664-64.958782 0a45.983138 45.983138 0 0 1 0-64.926783L665.917114 327.053068z"></path></svg>',this.tag="button"}return V.prototype.getValue=function(K){return""},V.prototype.isActive=function(K){return!1},V.prototype.exec=function(K,Y){var ne=this.getMenuConfig(K),oe=ne.allowedFileTypes,ve=oe===void 0?[]:oe,xe=ne.customBrowseAndUpload;if(xe)xe(function(P,le){return X(K,P,le)});else{var ie="";ve.length>0&&(ie='accept="'.concat(ve.join(", "),'"'));var we=F("body"),Se=F('<input type="file" '.concat(ie," multiple/>"));Se.hide(),we.append(Se),Se.click(),Se.on("change",function(){var P=Se[0].files;(function(le,ye){var G,J;R(this,void 0,void 0,function(){var fe,se,me,ce,Fe,be;return L(this,function(_e){switch(_e.label){case 0:if(ye==null)return[2];fe=Array.prototype.slice.call(ye),se=M(le).customUpload,_e.label=1;case 1:_e.trys.push([1,9,10,15]),me=function(Ve){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var st,et=Ve[Symbol.asyncIterator];return et?et.call(Ve):(Ve=typeof __values=="function"?__values(Ve):Ve[Symbol.iterator](),st={},Et("next"),Et("throw"),Et("return"),st[Symbol.asyncIterator]=function(){return this},st);function Et(Bt){st[Bt]=Ve[Bt]&&function(bt){return new Promise(function(Kt,gt){(function(Ne,he,Ee,Te){Promise.resolve(Te).then(function(ze){Ne({value:ze,done:Ee})},he)})(Kt,gt,(bt=Ve[Bt](bt)).done,bt.value)})}}}(fe),_e.label=2;case 2:return[4,me.next()];case 3:return(ce=_e.sent()).done?[3,8]:(Fe=ce.value,se?[4,se(Fe,function(Ve,st){return X(le,Ve,st)})]:[3,5]);case 4:return _e.sent(),[3,7];case 5:return[4,ee(le,Fe)];case 6:_e.sent(),_e.label=7;case 7:return[3,2];case 8:return[3,15];case 9:return be=_e.sent(),G={error:be},[3,15];case 10:return _e.trys.push([10,,13,14]),ce&&!ce.done&&(J=me.return)?[4,J.call(me)]:[3,12];case 11:_e.sent(),_e.label=12;case 12:return[3,14];case 13:if(G)throw G.error;return[7];case 14:return[7];case 15:return[2]}})})})(K,P)})}},V.prototype.isDisabled=function(K){var Y=K.selection;if(Y==null||s.SlateRange.isExpanded(Y))return!0;var ne=s.DomEditor.getSelectedElems(K);return!!ne.some(function(oe){return K.isVoid(oe)})||!!ne.some(function(oe){return s.DomEditor.getNodeType(oe)==="pre"})},V.prototype.getMenuConfig=function(K){return K.getMenuConfig("uploadAttachment")},V}(),j=function(){function V(){this.title=(0,s.t)("attachment.download"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M736 448l-256 256-256-256h160V64h192v384z m-256 256H0v256h960v-256H480z m416 128h-128v-64h128v64z"></path></svg>',this.tag="button",this.alwaysEnable=!0}return V.prototype.getValue=function(K){var Y=this.getSelectedElem(K);return Y==null?"":Y.link},V.prototype.isActive=function(K){return!1},V.prototype.exec=function(K,Y){Y&&typeof Y=="string"&&window.open(Y,"_blank")},V.prototype.isDisabled=function(K){var Y=K.selection;return Y==null||!!s.SlateRange.isExpanded(Y)||this.getSelectedElem(K)==null},V.prototype.getSelectedElem=function(K){var Y=s.DomEditor.getSelectedNodeByType(K,"attachment");return Y??null},V}(),q={editorPlugin:function(V){var K=V.isInline,Y=V.isVoid,ne=V;return ne.isInline=function(oe){return s.DomEditor.getNodeType(oe)==="attachment"||K(oe)},ne.isVoid=function(oe){return s.DomEditor.getNodeType(oe)==="attachment"||Y(oe)},ne},renderElems:[p],elemsToHtml:[{type:"attachment",elemToHtml:function(V,K){var Y=V,ne=Y.link,oe=ne===void 0?"":ne,ve=Y.fileName,xe=ve===void 0?"":ve;return'<a data-w-e-type="attachment" data-w-e-is-void data-w-e-is-inline href="'.concat(oe,'" download="').concat(xe,'">').concat(xe,"</a>")}}],parseElemsHtml:[{selector:'a[data-w-e-type="attachment"]',parseElemHtml:function(V,K,Y){return{type:"attachment",link:V.getAttribute("href")||"",fileName:V.getAttribute("download")||"",children:[{text:""}]}}}],menus:[{key:"uploadAttachment",factory:function(){return new N},config:{server:"",fieldName:"wangeditor-uploaded-attachment",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(V){return V},onProgress:function(V){},onSuccess:function(V,K){},onFailed:function(V,K){},onError:function(V,K,Y){},onInsertedAttachment:function(V){}}},{key:"downloadAttachment",factory:function(){return new j}}]}})(),a})())})(SG);var MEe=SG.exports;const LEe=dE(MEe),zEe=(e,t={})=>{_J(t);const n=Object.assign({"./JwtCascaderArea/index.vue":FJ,"./JwtCascaderServer/index.vue":IJ,"./JwtColumnItme/components/ColumnDateTimeFormat.vue":C7,"./JwtColumnItme/components/ColumnDefault.vue":S7,"./JwtColumnItme/components/ColumnFile.vue":x7,"./JwtColumnItme/components/ColumnHtml.vue":E7,"./JwtColumnItme/components/ColumnImg.vue":B7,"./JwtColumnItme/components/ColumnImgAdd.vue":D7,"./JwtColumnItme/components/ColumnImgs.vue":T7,"./JwtColumnItme/components/ColumnLink.vue":A7,"./JwtColumnItme/components/ColumnTag.vue":O7,"./JwtColumnItme/components/ColumnTagList.vue":F7,"./JwtColumnItme/components/ColumnText.vue":Ok,"./JwtColumnItme/components/ColumnVideo.vue":P7,"./JwtColumnItme/index.vue":gY,"./JwtCount/index.vue":yY,"./JwtCropper/index.vue":hX,"./JwtCropperDialog/index.vue":vX,"./JwtDesHeader/index.vue":Yk,"./JwtDesInfo/index.vue":xX,"./JwtDesTable/index.vue":DX,"./JwtDetailDrawer/index.vue":oZ,"./JwtDialogForm/index.vue":pZ,"./JwtEditor/index.vue":ASe,"./JwtEmojiSelect/index.vue":RSe,"./JwtFileIcon/index.vue":ISe,"./JwtFileUpload/index.vue":oxe,"./JwtForm/components/FormLabel.vue":uxe,"./JwtForm/index.vue":pxe,"./JwtFormItem/components/FormAutocomplete.vue":kW,"./JwtFormItem/components/FormCascader.vue":hE,"./JwtFormItem/components/FormCascaderPanel.vue":wW,"./JwtFormItem/components/FormCheckbox.vue":_W,"./JwtFormItem/components/FormColorPicker.vue":CW,"./JwtFormItem/components/FormDatePicker.vue":pE,"./JwtFormItem/components/FormDivider.vue":gE,"./JwtFormItem/components/FormEditInput.vue":mE,"./JwtFormItem/components/FormInput.vue":vE,"./JwtFormItem/components/FormInputHidden.vue":SW,"./JwtFormItem/components/FormInputSelect.vue":xW,"./JwtFormItem/components/FormNumberInput.vue":yE,"./JwtFormItem/components/FormRadio.vue":EW,"./JwtFormItem/components/FormRate.vue":BW,"./JwtFormItem/components/FormSelect.vue":DW,"./JwtFormItem/components/FormSlider.vue":TW,"./JwtFormItem/components/FormSwitch.vue":bE,"./JwtFormItem/components/FormTabs.vue":AW,"./JwtFormItem/components/FormTimePicker.vue":kE,"./JwtFormItem/components/FormTimeSelect.vue":OW,"./JwtFormItem/components/FormTips.vue":FW,"./JwtFormItem/components/FormTransfer.vue":PW,"./JwtFormItem/index.vue":bxe,"./JwtHeaderButton/index.vue":Exe,"./JwtIcon/index.vue":Oxe,"./JwtIconSelect/index.vue":Nxe,"./JwtImage/index.vue":Vxe,"./JwtInput/index.vue":qxe,"./JwtMaterial/index.vue":F5e,"./JwtMaterialItemMask/index.vue":Jxe,"./JwtPrefixSuffix/index.vue":I5e,"./JwtRateIcon/index.vue":z5e,"./JwtSelectServer/index.vue":i8e,"./JwtTable/components/tableColumnHeader.vue":r8e,"./JwtTable/components/tableContentControl.vue":Z8e,"./JwtTable/components/tableFieldControl.vue":Q8e,"./JwtTable/components/tableListContent.vue":$8e,"./JwtTable/components/tableListContentVirtualized.vue":a9e,"./JwtTable/components/tableSizeSetting.vue":s9e,"./JwtTable/index copy.vue":g9e,"./JwtTable/index.vue":C9e,"./JwtTableButton/components/ActionButton.vue":kxe,"./JwtTableButton/index.vue":i9e,"./JwtTableOnly/index.vue":O9e,"./JwtTableV2/index.vue":q9e,"./JwtTabs/index.vue":G9e,"./JwtTags/index.vue":Z9e,"./JwtTree/components/TreeNode.vue":nEe,"./JwtTree/components/TreeNodeTitle.vue":$9e,"./JwtTree/index.vue":oEe,"./JwtUploadFile/index.vue":uEe,"./JwtUploadImage/components/fileSlot.vue":pEe,"./JwtUploadImage/components/pasteUpload.vue":QSe,"./JwtUploadImage/index.vue":bEe,"./JwtUploadVideo/index.vue":jEe});for(const i in n){const r=n[i];r.default.name&&e.component(r.default.name,r.default||r)}e.directive("jwt-observe-viewport",REe)};yi.registerModule(LEe);function xG(e){return e&&e.__esModule?e.default:e}function go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mk,kt,EG,Pm,BG,DG,vk={},TG=[],VEe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function _l(e,t){for(var n in t)e[n]=t[n];return e}function AG(e){var t=e.parentNode;t&&t.removeChild(e)}function HE(e,t,n){var i,r,o,a={};for(o in t)o=="key"?i=t[o]:o=="ref"?r=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?mk.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return yk(e,a,i,r,null)}function yk(e,t,n,i,r){var o={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++EG};return r==null&&kt.vnode!=null&&kt.vnode(o),o}function Ja(){return{current:null}}function bd(e){return e.children}function ma(e,t){this.props=e,this.context=t}function kd(e,t){if(t==null)return e.__?kd(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?kd(e):null}function OG(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return OG(e)}}function FG(e){(!e.__d&&(e.__d=!0)&&Pm.push(e)&&!bk.__r++||DG!==kt.debounceRendering)&&((DG=kt.debounceRendering)||BG)(bk)}function bk(){for(var e;bk.__r=Pm.length;)e=Pm.sort(function(t,n){return t.__v.__b-n.__v.__b}),Pm=[],e.some(function(t){var n,i,r,o,a,s;t.__d&&(a=(o=(n=t).__v).__e,(s=n.__P)&&(i=[],(r=_l({},o)).__v=o.__v+1,qE(s,o,r,n.__n,s.ownerSVGElement!==void 0,o.__h!=null?[a]:null,i,a??kd(o),o.__h),LG(i,o),o.__e!=a&&OG(o)))})}function PG(e,t,n,i,r,o,a,s,u,c){var f,d,h,p,m,v,y,b=i&&i.__k||TG,g=b.length;for(n.__k=[],f=0;f<t.length;f++)if((p=n.__k[f]=(p=t[f])==null||typeof p=="boolean"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?yk(null,p,null,null,p):Array.isArray(p)?yk(bd,{children:p},null,null,null):p.__b>0?yk(p.type,p.props,p.key,null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(h=b[f])===null||h&&p.key==h.key&&p.type===h.type)b[f]=void 0;else for(d=0;d<g;d++){if((h=b[d])&&p.key==h.key&&p.type===h.type){b[d]=void 0;break}h=null}qE(e,p,h=h||vk,r,o,a,s,u,c),m=p.__e,(d=p.ref)&&h.ref!=d&&(y||(y=[]),h.ref&&y.push(h.ref,null,p),y.push(d,p.__c||m,p)),m!=null?(v==null&&(v=m),typeof p.type=="function"&&p.__k===h.__k?p.__d=u=jG(p,u,e):u=RG(e,p,h,b,m,u),typeof n.type=="function"&&(n.__d=u)):u&&h.__e==u&&u.parentNode!=e&&(u=kd(h))}for(n.__e=v,f=g;f--;)b[f]!=null&&(typeof n.type=="function"&&b[f].__e!=null&&b[f].__e==n.__d&&(n.__d=kd(i,f+1)),VG(b[f],b[f]));if(y)for(f=0;f<y.length;f++)zG(y[f],y[++f],y[++f])}function jG(e,t,n){for(var i,r=e.__k,o=0;r&&o<r.length;o++)(i=r[o])&&(i.__=e,t=typeof i.type=="function"?jG(i,t,n):RG(n,i,i,r,i.__e,t));return t}function kk(e,t){return t=t||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(n){kk(n,t)}):t.push(e)),t}function RG(e,t,n,i,r,o){var a,s,u;if(t.__d!==void 0)a=t.__d,t.__d=void 0;else if(n==null||r!=o||r.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(r),a=null;else{for(s=o,u=0;(s=s.nextSibling)&&u<i.length;u+=2)if(s==r)break e;e.insertBefore(r,o),a=o}return a!==void 0?a:r.nextSibling}function UEe(e,t,n,i,r){var o;for(o in n)o==="children"||o==="key"||o in t||wk(e,o,null,n[o],i);for(o in t)r&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||wk(e,o,t[o],n[o],i)}function IG(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||VEe.test(t)?n:n+"px"}function wk(e,t,n,i,r){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof i=="string"&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||IG(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||IG(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i||e.addEventListener(t,o?MG:NG,o):e.removeEventListener(t,o?MG:NG,o);else if(t!=="dangerouslySetInnerHTML"){if(r)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function NG(e){this.l[e.type+!1](kt.event?kt.event(e):e)}function MG(e){this.l[e.type+!0](kt.event?kt.event(e):e)}function qE(e,t,n,i,r,o,a,s,u){var c,f,d,h,p,m,v,y,b,g,k,_=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(u=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=kt.__b)&&c(t);try{e:if(typeof _=="function"){if(y=t.props,b=(c=_.contextType)&&i[c.__c],g=c?b?b.props.value:c.__:i,n.__c?v=(f=t.__c=n.__c).__=f.__E:("prototype"in _&&_.prototype.render?t.__c=f=new _(y,g):(t.__c=f=new ma(y,g),f.constructor=_,f.render=qEe),b&&b.sub(f),f.props=y,f.state||(f.state={}),f.context=g,f.__n=i,d=f.__d=!0,f.__h=[]),f.__s==null&&(f.__s=f.state),_.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=_l({},f.__s)),_l(f.__s,_.getDerivedStateFromProps(y,f.__s))),h=f.props,p=f.state,d)_.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_.getDerivedStateFromProps==null&&y!==h&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(y,g),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(y,f.__s,g)===!1||t.__v===n.__v){f.props=y,f.state=f.__s,t.__v!==n.__v&&(f.__d=!1),f.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),f.__h.length&&a.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(y,f.__s,g),f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(h,p,m)})}f.context=g,f.props=y,f.state=f.__s,(c=kt.__r)&&c(t),f.__d=!1,f.__v=t,f.__P=e,c=f.render(f.props,f.state,f.context),f.state=f.__s,f.getChildContext!=null&&(i=_l(_l({},i),f.getChildContext())),d||f.getSnapshotBeforeUpdate==null||(m=f.getSnapshotBeforeUpdate(h,p)),k=c!=null&&c.type===bd&&c.key==null?c.props.children:c,PG(e,Array.isArray(k)?k:[k],t,n,i,r,o,a,s,u),f.base=t.__e,t.__h=null,f.__h.length&&a.push(f),v&&(f.__E=f.__=null),f.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=HEe(n.__e,t,n,i,r,o,a,u);(c=kt.diffed)&&c(t)}catch(A){t.__v=null,(u||o!=null)&&(t.__e=s,t.__h=!!u,o[o.indexOf(s)]=null),kt.__e(A,t,n)}}function LG(e,t){kt.__c&&kt.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){kt.__e(i,n.__v)}})}function HEe(e,t,n,i,r,o,a,s){var u,c,f,d=n.props,h=t.props,p=t.type,m=0;if(p==="svg"&&(r=!0),o!=null){for(;m<o.length;m++)if((u=o[m])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,o[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=r?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),o=null,s=!1}if(p===null)d===h||s&&e.data===h||(e.data=h);else{if(o=o&&mk.call(e.childNodes),c=(d=n.props||vk).dangerouslySetInnerHTML,f=h.dangerouslySetInnerHTML,!s){if(o!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(f||c)&&(f&&(c&&f.__html==c.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(UEe(e,h,d,r,s),f)t.__k=[];else if(m=t.props.children,PG(e,Array.isArray(m)?m:[m],t,n,i,r&&p!=="foreignObject",o,a,o?o[0]:n.__k&&kd(n,0),s),o!=null)for(m=o.length;m--;)o[m]!=null&&AG(o[m]);s||("value"in h&&(m=h.value)!==void 0&&(m!==d.value||m!==e.value||p==="progress"&&!m)&&wk(e,"value",m,d.value,!1),"checked"in h&&(m=h.checked)!==void 0&&m!==e.checked&&wk(e,"checked",m,d.checked,!1))}return e}function zG(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(i){kt.__e(i,n)}}function VG(e,t,n){var i,r;if(kt.unmount&&kt.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||zG(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(o){kt.__e(o,t)}i.base=i.__P=null}if(i=e.__k)for(r=0;r<i.length;r++)i[r]&&VG(i[r],t,typeof e.type!="function");n||e.__e==null||AG(e.__e),e.__e=e.__d=void 0}function qEe(e,t,n){return this.constructor(e,n)}function UG(e,t,n){var i,r,o;kt.__&&kt.__(e,t),r=(i=typeof n=="function")?null:n&&n.__k||t.__k,o=[],qE(t,e=(!i&&n||t).__k=HE(bd,null,[e]),r||vk,vk,t.ownerSVGElement!==void 0,!i&&n?[n]:r?null:t.firstChild?mk.call(t.childNodes):null,o,!i&&n?n:r?r.__e:t.firstChild,i),LG(o,e)}mk=TG.slice,kt={__e:function(e,t){for(var n,i,r;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),r=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),r=n.__d),r)return n.__E=n}catch(o){e=o}throw e}},EG=0,ma.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=_l({},this.state),typeof e=="function"&&(e=e(_l({},n),this.props)),e&&_l(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),FG(this))},ma.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),FG(this))},ma.prototype.render=bd,Pm=[],BG=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,bk.__r=0;var KEe=0;function Ue(e,t,n,i,r){var o,a,s={};for(a in t)a=="ref"?o=t[a]:s[a]=t[a];var u={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--KEe,__source:i,__self:r};if(typeof e=="function"&&(o=e.defaultProps))for(a in o)s[a]===void 0&&(s[a]=o[a]);return kt.vnode&&kt.vnode(u),u}function WEe(e,t){try{window.localStorage[`emoji-mart.${e}`]=JSON.stringify(t)}catch{}}function GEe(e){try{const t=window.localStorage[`emoji-mart.${e}`];if(t)return JSON.parse(t)}catch{}}var Ya={set:WEe,get:GEe};const KE=new Map,JEe=[{v:15,emoji:"🫨"},{v:14,emoji:"🫠"},{v:13.1,emoji:"😶‍🌫️"},{v:13,emoji:"🥸"},{v:12.1,emoji:"🧑‍🦰"},{v:12,emoji:"🥱"},{v:11,emoji:"🥰"},{v:5,emoji:"🤩"},{v:4,emoji:"👱‍♀️"},{v:3,emoji:"🤣"},{v:2,emoji:"👋🏻"},{v:1,emoji:"🙃"}];function YEe(){for(const{v:e,emoji:t}of JEe)if(HG(t))return e}function XEe(){return!HG("🇨🇦")}function HG(e){if(KE.has(e))return KE.get(e);const t=ZEe(e);return KE.set(e,t),t}const ZEe=(()=>{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const t=25,n=20,i=Math.floor(t/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=n*2,e.canvas.height=t,r=>{e.clearRect(0,0,n*2,t),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,n,22);const o=e.getImageData(0,0,n,t).data,a=o.length;let s=0;for(;s<a&&!o[s+3];s+=4);if(s>=a)return!1;const u=n+s/4%n,c=Math.floor(s/4/n),f=e.getImageData(u,c,1,1).data;return!(o[s]!==f[0]||o[s+2]!==f[2]||e.measureText(r).width>=n)}})();var qG={latestVersion:YEe,noCountryFlags:XEe};const WE=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Wi=null;function QEe(e){Wi||(Wi=Ya.get("frequently")||{});const t=e.id||e;t&&(Wi[t]||(Wi[t]=0),Wi[t]+=1,Ya.set("last",t),Ya.set("frequently",Wi))}function $Ee({maxFrequentRows:e,perLine:t}){if(!e)return[];Wi||(Wi=Ya.get("frequently"));let n=[];if(!Wi){Wi={};for(let o in WE.slice(0,t)){const a=WE[o];Wi[a]=t-o,n.push(a)}return n}const i=e*t,r=Ya.get("last");for(let o in Wi)n.push(o);if(n.sort((o,a)=>{const s=Wi[a],u=Wi[o];return s==u?o.localeCompare(a):s-u}),n.length>i){const o=n.slice(i);n=n.slice(0,i);for(let a of o)a!=r&&delete Wi[a];r&&n.indexOf(r)==-1&&(delete Wi[n[n.length-1]],n.splice(-1,1,r)),Ya.set("frequently",Wi)}return n}var GE={add:QEe,get:$Ee,DEFAULTS:WE},KG={};KG=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Xa={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Gi=null,Jt=null;const JE={};async function WG(e){if(JE[e])return JE[e];const n=await(await fetch(e)).json();return JE[e]=n,n}let YE=null,GG=null,JG=!1;function jm(e,{caller:t}={}){return YE||(YE=new Promise(n=>{GG=n})),e&&e7e(e),YE}async function e7e(e){JG=!0;let{emojiVersion:t,set:n,locale:i}=e;if(t||(t=Xa.emojiVersion.value),n||(n=Xa.set.value),i||(i=Xa.locale.value),Jt)Jt.categories=Jt.categories.filter(u=>!u.name);else{Jt=(typeof e.data=="function"?await e.data():e.data)||await WG(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${t}/${n}.json`),Jt.emoticons={},Jt.natives={},Jt.categories.unshift({id:"frequent",emojis:[]});for(const u in Jt.aliases){const c=Jt.aliases[u],f=Jt.emojis[c];f&&(f.aliases||(f.aliases=[]),f.aliases.push(u))}Jt.originalCategories=Jt.categories}if(Gi=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?xG(KG):await WG(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let u in e.custom){u=parseInt(u);const c=e.custom[u],f=e.custom[u-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${u+1}`),c.name||(c.name=Gi.categories.custom),f&&!c.icon&&(c.target=f.target||f),Jt.categories.push(c);for(const d of c.emojis)Jt.emojis[d.id]=d}}e.categories&&(Jt.categories=Jt.originalCategories.filter(u=>e.categories.indexOf(u.id)!=-1).sort((u,c)=>{const f=e.categories.indexOf(u.id),d=e.categories.indexOf(c.id);return f-d}));let r=null,o=null;n=="native"&&(r=qG.latestVersion(),o=e.noCountryFlags||qG.noCountryFlags());let a=Jt.categories.length,s=!1;for(;a--;){const u=Jt.categories[a];if(u.id=="frequent"){let{maxFrequentRows:d,perLine:h}=e;d=d>=0?d:Xa.maxFrequentRows.value,h||(h=Xa.perLine.value),u.emojis=GE.get({maxFrequentRows:d,perLine:h})}if(!u.emojis||!u.emojis.length){Jt.categories.splice(a,1);continue}const{categoryIcons:c}=e;if(c){const d=c[u.id];d&&!u.icon&&(u.icon=d)}let f=u.emojis.length;for(;f--;){const d=u.emojis[f],h=d.id?d:Jt.emojis[d],p=()=>{u.emojis.splice(f,1)};if(!h||e.exceptEmojis&&e.exceptEmojis.includes(h.id)){p();continue}if(r&&h.version>r){p();continue}if(o&&u.id=="flags"&&!ZG.includes(h.id)){p();continue}if(!h.search){if(s=!0,h.search=","+[[h.id,!1],[h.name,!0],[h.keywords,!1],[h.emoticons,!1]].map(([v,y])=>{if(v)return(Array.isArray(v)?v:[v]).map(b=>(y?b.split(/[-|_|\s]+/):[b]).map(g=>g.toLowerCase())).flat()}).flat().filter(v=>v&&v.trim()).join(","),h.emoticons)for(const v of h.emoticons)Jt.emoticons[v]||(Jt.emoticons[v]=h.id);let m=0;for(const v of h.skins){if(!v)continue;m++;const{native:y}=v;y&&(Jt.natives[y]=h.id,h.search+=`,${y}`);const b=m==1?"":`:skin-tone-${m}:`;v.shortcodes=`:${h.id}:${b}`}}}}s&&of.reset(),GG()}function YG(e,t,n){e||(e={});const i={};for(let r in t)i[r]=XG(r,e,t,n);return i}function XG(e,t,n,i){const r=n[e];let o=i&&i.getAttribute(e)||(t[e]!=null&&t[e]!=null?t[e]:null);return r&&(o!=null&&r.value&&typeof r.value!=typeof o&&(typeof r.value=="boolean"?o=o!="false":o=r.value.constructor(o)),r.transform&&o&&(o=r.transform(o)),(o==null||r.choices&&r.choices.indexOf(o)==-1)&&(o=r.value)),o}const t7e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let XE=null;function n7e(e){return e.id?e:Jt.emojis[e]||Jt.emojis[Jt.aliases[e]]||Jt.emojis[Jt.natives[e]]}function i7e(){XE=null}async function r7e(e,{maxResults:t,caller:n}={}){if(!e||!e.trim().length)return null;t||(t=90),await jm(null,{caller:n||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((s,u,c)=>s.trim()&&c.indexOf(s)==u);if(!i.length)return;let r=XE||(XE=Object.values(Jt.emojis)),o,a;for(const s of i){if(!r.length)break;o=[],a={};for(const u of r){if(!u.search)continue;const c=u.search.indexOf(`,${s}`);c!=-1&&(o.push(u),a[u.id]||(a[u.id]=0),a[u.id]+=u.id==s?0:c+1)}r=o}return o.length<2||(o.sort((s,u)=>{const c=a[s.id],f=a[u.id];return c==f?s.id.localeCompare(u.id):c-f}),o.length>t&&(o=o.slice(0,t))),o}var of={search:r7e,get:n7e,reset:i7e,SHORTCODES_REGEX:t7e};const ZG=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function o7e(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((n,i)=>n==t[i])}async function a7e(e=1){for(let t in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function s7e(e,{skinIndex:t=0}={}){const n=e.skins[t]||(t=0,e.skins[t]),i={id:e.id,name:e.name,native:n.native,unified:n.unified,keywords:e.keywords,shortcodes:n.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=t+1),n.src&&(i.src=n.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}var _k={categories:{activity:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ue("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Ue("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ue("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ue("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Ue("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Ue("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Ue("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Ue("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Ue("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Ue("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ue("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Ue("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ue("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ue("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},search:{loupe:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ue("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Ue("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ue("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})}};function ZE(e){let{id:t,skin:n,emoji:i}=e;if(e.shortcodes){const s=e.shortcodes.match(of.SHORTCODES_REGEX);s&&(t=s[1],s[2]&&(n=s[2]))}if(i||(i=of.get(t||e.native)),!i)return e.fallback;const r=i.skins[n-1]||i.skins[0],o=r.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${r.unified}.png`:void 0),a=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return Ue("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:o?Ue("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:o}):e.set=="native"?Ue("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):Ue("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${a})`,backgroundSize:`${100*Jt.sheet.cols}% ${100*Jt.sheet.rows}%`,backgroundPosition:`${100/(Jt.sheet.cols-1)*r.x}% ${100/(Jt.sheet.rows-1)*r.y}%`}})})}const l7e=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class QG extends l7e{static get observedAttributes(){return Object.keys(this.Props)}update(t={}){for(let n in t)this.attributeChangedCallback(n,null,t[n])}attributeChangedCallback(t,n,i){if(!this.component)return;const r=XG(t,{[t]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[t]:r}):(this.component.props[t]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(t={}){if(super(),this.props=t,t.parent||t.ref){let n=null;const i=t.parent||(n=t.ref&&t.ref.current);n&&(n.innerHTML=""),i&&i.appendChild(this)}}}class u7e extends QG{setShadow(){this.attachShadow({mode:"open"})}injectStyles(t){if(!t)return;const n=document.createElement("style");n.textContent=t,this.shadowRoot.insertBefore(n,this.shadowRoot.firstChild)}constructor(t,{styles:n}={}){super(t),this.setShadow(),this.injectStyles(n)}}var $G={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:Xa.set,skin:Xa.skin};class QE extends QG{async connectedCallback(){const t=YG(this.props,$G,this);t.element=this,t.ref=n=>{this.component=n},await jm(),!this.disconnected&&UG(Ue(ZE,{...t}),this)}constructor(t){super(t)}}go(QE,"Props",$G),typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",QE);var eJ,$E=[],tJ=kt.__b,nJ=kt.__r,iJ=kt.diffed,rJ=kt.__c,oJ=kt.unmount;function f7e(){var e;for($E.sort(function(t,n){return t.__v.__b-n.__v.__b});e=$E.pop();)if(e.__P)try{e.__H.__h.forEach(Ck),e.__H.__h.forEach(e7),e.__H.__h=[]}catch(t){e.__H.__h=[],kt.__e(t,e.__v)}}kt.__b=function(e){tJ&&tJ(e)},kt.__r=function(e){nJ&&nJ(e);var t=e.__c.__H;t&&(t.__h.forEach(Ck),t.__h.forEach(e7),t.__h=[])},kt.diffed=function(e){iJ&&iJ(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&($E.push(t)!==1&&eJ===kt.requestAnimationFrame||((eJ=kt.requestAnimationFrame)||function(n){var i,r=function(){clearTimeout(o),aJ&&cancelAnimationFrame(i),setTimeout(n)},o=setTimeout(r,100);aJ&&(i=requestAnimationFrame(r))})(f7e))},kt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ck),n.__h=n.__h.filter(function(i){return!i.__||e7(i)})}catch(i){t.some(function(r){r.__h&&(r.__h=[])}),t=[],kt.__e(i,n.__v)}}),rJ&&rJ(e,t)},kt.unmount=function(e){oJ&&oJ(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(i){try{Ck(i)}catch(r){t=r}}),t&&kt.__e(t,n.__v))};var aJ=typeof requestAnimationFrame=="function";function Ck(e){var t=e.__c;typeof t=="function"&&(e.__c=void 0,t())}function e7(e){e.__c=e.__()}function c7e(e,t){for(var n in t)e[n]=t[n];return e}function sJ(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var i in t)if(i!=="__source"&&e[i]!==t[i])return!0;return!1}function Sk(e){this.props=e}(Sk.prototype=new ma).isPureReactComponent=!0,Sk.prototype.shouldComponentUpdate=function(e,t){return sJ(this.props,e)||sJ(this.state,t)};var lJ=kt.__b;kt.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),lJ&&lJ(e)};var d7e=kt.__e;kt.__e=function(e,t,n){if(e.then){for(var i,r=t;r=r.__;)if((i=r.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}d7e(e,t,n)};var uJ=kt.unmount;function t7(){this.__u=0,this.t=null,this.__b=null}function fJ(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function xk(){this.u=null,this.o=null}kt.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),uJ&&uJ(e)},(t7.prototype=new ma).__c=function(e,t){var n=t.__c,i=this;i.t==null&&(i.t=[]),i.t.push(n);var r=fJ(i.__v),o=!1,a=function(){o||(o=!0,n.__R=null,r?r(s):s())};n.__R=a;var s=function(){if(!--i.__u){if(i.state.__e){var c=i.state.__e;i.__v.__k[0]=function d(h,p,m){return h&&(h.__v=null,h.__k=h.__k&&h.__k.map(function(v){return d(v,p,m)}),h.__c&&h.__c.__P===p&&(h.__e&&m.insertBefore(h.__e,h.__d),h.__c.__e=!0,h.__c.__P=m)),h}(c,c.__c.__P,c.__c.__O)}var f;for(i.setState({__e:i.__b=null});f=i.t.pop();)f.forceUpdate()}},u=t.__h===!0;i.__u++||u||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(a,a)},t7.prototype.componentWillUnmount=function(){this.t=[]},t7.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function o(a,s,u){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),a.__c.__H=null),(a=c7e({},a)).__c!=null&&(a.__c.__P===u&&(a.__c.__P=s),a.__c=null),a.__k=a.__k&&a.__k.map(function(c){return o(c,s,u)})),a}(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__e&&HE(bd,null,e.fallback);return r&&(r.__h=null),[HE(bd,null,t.__e?null:e.children),r]};var cJ=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(xk.prototype=new ma).__e=function(e){var t=this,n=fJ(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),cJ(t,e,i)):r()};n?n(o):o()}},xk.prototype.render=function(e){this.u=null,this.o=new Map;var t=kk(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},xk.prototype.componentDidUpdate=xk.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){cJ(e,n,t)})};var h7e=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,p7e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,g7e=typeof document<"u",m7e=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};ma.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ma.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var dJ=kt.event;function v7e(){}function y7e(){return this.cancelBubble}function b7e(){return this.defaultPrevented}kt.event=function(e){return dJ&&(e=dJ(e)),e.persist=v7e,e.isPropagationStopped=y7e,e.isDefaultPrevented=b7e,e.nativeEvent=e};var hJ={configurable:!0,get:function(){return this.class}},pJ=kt.vnode;kt.vnode=function(e){var t=e.type,n=e.props,i=n;if(typeof t=="string"){var r=t.indexOf("-")===-1;for(var o in i={},n){var a=n[o];g7e&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in n&&a==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!m7e(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():r&&p7e.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():a===null&&(a=void 0),i[o]=a)}t=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=kk(n.children).forEach(function(s){s.props.selected=i.value.indexOf(s.props.value)!=-1})),t=="select"&&i.defaultValue!=null&&(i.value=kk(n.children).forEach(function(s){s.props.selected=i.multiple?i.defaultValue.indexOf(s.props.value)!=-1:i.defaultValue==s.props.value})),e.props=i,n.class!=n.className&&(hJ.enumerable="className"in n,n.className!=null&&(i.class=n.className),Object.defineProperty(i,"className",hJ))}e.$$typeof=h7e,pJ&&pJ(e)};var gJ=kt.__r;kt.__r=function(e){gJ&&gJ(e),e.__c};const k7e={light:"outline",dark:"solid"};class w7e extends Sk{renderIcon(t){const{icon:n}=t;if(n){if(n.svg)return Ue("span",{class:"flex",dangerouslySetInnerHTML:{__html:n.svg}});if(n.src)return Ue("img",{src:n.src})}const i=_k.categories[t.id]||_k.categories.custom,r=this.props.icons=="auto"?k7e[this.props.theme]:this.props.icons;return i[r]||i}render(){let t=null;return Ue("nav",{id:"nav",class:"padding","data-position":this.props.position,dir:this.props.dir,children:Ue("div",{class:"flex relative",children:[this.categories.map((n,i)=>{const r=n.name||Gi.categories[n.id],o=!this.props.unfocused&&n.id==this.state.categoryId;return o&&(t=i),Ue("button",{"aria-label":r,"aria-selected":o||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:a=>a.preventDefault(),onClick:()=>{this.props.onClick({category:n,i})},children:this.renderIcon(n)})}),Ue("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:t==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${t*100}%)`:`translateX(${t*100}%)`}})]})})}constructor(){super(),this.categories=Jt.categories.filter(t=>!t.target),this.state={categoryId:this.categories[0].id}}}class _7e extends Sk{shouldComponentUpdate(t){for(let n in t)if(n!="children"&&t[n]!=this.props[n])return!0;return!1}render(){return this.props.children}}const Ek={rowsPerRender:10};class C7e extends ma{getInitialState(t=this.props){return{skin:Ya.get("skin")||t.skin,theme:this.initTheme(t.theme)}}componentWillMount(){this.dir=Gi.rtl?"rtl":"ltr",this.refs={menu:Ja(),navigation:Ja(),scroll:Ja(),search:Ja(),searchInput:Ja(),skinToneButton:Ja(),skinToneRadio:Ja()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:t}=this.refs;t.current&&t.current.focus()}}componentWillReceiveProps(t){this.nextState||(this.nextState={});for(const n in t)this.nextState[n]=t[n];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let n=!1;for(const r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(n=!0);delete this.nextState;const i=this.getInitialState();if(n)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(t={}){await jm(this.props),this.initGrid(),this.unobserve(),this.setState(t,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var t;document.removeEventListener("click",this.handleClickOutside),(t=this.darkMedia)==null||t.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:t=[]}={}){Array.isArray(t)||(t=[t]);for(const n of this.observers)t.includes(n)||n.disconnect();this.observers=[].concat(t)}initGrid(){const{categories:t}=Jt;this.refs.categories=new Map;const n=Jt.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=n&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=n,this.grid=[],this.grid.setsize=0;const i=(r,o)=>{const a=[];a.__categoryId=o.id,a.__index=r.length,this.grid.push(a);const s=this.grid.length-1,u=s%Ek.rowsPerRender?{}:Ja();return u.index=s,u.posinset=this.grid.setsize+1,r.push(u),a};for(let r of t){const o=[];let a=i(o,r);for(let s of r.emojis)a.length==this.getPerLine()&&(a=i(o,r)),this.grid.setsize+=1,a.push(s);this.refs.categories.set(r.id,{root:Ja(),rows:o})}}initTheme(t){if(t!="auto")return t;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(t=this.props){if(!t.dynamicWidth)return;const{element:n,emojiButtonSize:i}=t,r=()=>{const{width:a}=n.getBoundingClientRect();return Math.floor(a/i)},o=new ResizeObserver(()=>{this.unobserve({except:o}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return o.observe(n),this.observers.push(o),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([t,n]){const i=this.state.searchResults||this.grid,r=i[t]&&i[t][n];if(r)return of.get(r)}observeCategories(){const t=this.refs.navigation.current;if(!t)return;const n=new Map,i=a=>{a!=t.state.categoryId&&t.setState({categoryId:a})},r={root:this.refs.scroll.current,threshold:[0,1]},o=new IntersectionObserver(a=>{for(const u of a){const c=u.target.dataset.id;n.set(c,u.intersectionRatio)}const s=[...n];for(const[u,c]of s)if(c){i(u);break}},r);for(const{root:a}of this.refs.categories.values())o.observe(a.current);this.observers.push(o)}observeRows(){const t={...this.state.visibleRows},n=new IntersectionObserver(i=>{for(const r of i){const o=parseInt(r.target.dataset.index);r.isIntersecting?t[o]=!0:delete t[o]}this.setState({visibleRows:t})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(Ek.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*Ek.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const r of i)r.current&&n.observe(r.current);this.observers.push(n)}preventDefault(t){t.preventDefault()}unfocusSearch(){const t=this.refs.searchInput.current;t&&t.blur()}navigate({e:t,input:n,left:i,right:r,up:o,down:a}){const s=this.state.searchResults||this.grid;if(!s.length)return;let[u,c]=this.state.pos;const f=(()=>{if(u==0&&c==0&&!t.repeat&&(i||o))return null;if(u==-1)return!t.repeat&&(r||a)&&n.selectionStart==n.value.length?[0,0]:null;if(i||r){let d=s[u];const h=i?-1:1;if(c+=h,!d[c]){if(u+=h,d=s[u],!d)return u=i?0:s.length-1,c=i?0:s[u].length-1,[u,c];c=i?d.length-1:0}return[u,c]}if(o||a){u+=o?-1:1;const d=s[u];return d?(d[c]||(c=d.length-1),[u,c]):(u=o?0:s.length-1,c=o?0:s[u].length-1,[u,c])}})();if(f)t.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:f,keyboard:!0},()=>{this.scrollTo({row:f[0]})})}scrollTo({categoryId:t,row:n}){const i=this.state.searchResults||this.grid;if(!i.length)return;const r=this.refs.scroll.current,o=r.getBoundingClientRect();let a=0;if(n>=0&&(t=i[n].__categoryId),t&&(a=(this.refs[t]||this.refs.categories.get(t).root).current.getBoundingClientRect().top-(o.top-r.scrollTop)+1),n>=0)if(!n)a=0;else{const s=i[n].__index,u=a+s*this.props.emojiButtonSize,c=u+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(u<r.scrollTop)a=u;else if(c>r.scrollTop+o.height)a=c-o.height;else return}this.ignoreMouse(),r.scrollTop=a}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(t){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:t||[-1,-1],keyboard:!1})}handleEmojiClick({e:t,emoji:n,pos:i}){if(this.props.onEmojiSelect&&(!n&&i&&(n=this.getEmojiByPos(i)),n)){const r=s7e(n,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&GE.add(r,this.props),this.props.onEmojiSelect(r,t)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(t){this.setState({tempSkin:t})}handleSkinClick(t){this.ignoreMouse(),this.closeSkins(),this.setState({skin:t,tempSkin:null}),Ya.set("skin",t)}renderNav(){return Ue(w7e,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const t=this.getEmojiByPos(this.state.pos),n=this.state.searchResults&&!this.state.searchResults.length;return Ue("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Ue("div",{class:"flex flex-middle flex-grow",children:[Ue("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Ue(ZE,{emoji:t,id:n?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Ue("div",{class:`margin-${this.dir[0]}`,children:t||n?Ue("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Ue("div",{class:"preview-title ellipsis",children:t?t.name:Gi.search_no_results_1}),Ue("div",{class:"preview-subtitle ellipsis color-c",children:t?t.skins[0].shortcodes:Gi.search_no_results_2})]}):Ue("div",{class:"preview-placeholder color-c",children:Gi.pick})})]}),!t&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(t,{pos:n,posinset:i,grid:r}){const o=this.props.emojiButtonSize,a=this.state.tempSkin||this.state.skin,u=(t.skins[a-1]||t.skins[0]).native,c=o7e(this.state.pos,n),f=n.concat(t.id).join("");return Ue(_7e,{selected:c,skin:a,size:o,children:Ue("button",{"aria-label":u,"aria-selected":c||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?t.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:t}),onMouseEnter:()=>this.handleEmojiOver(n),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Ue("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),Ue(ZE,{emoji:t,set:this.props.set,size:this.props.emojiSize,skin:a,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},f)}renderSearch(){const t=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return Ue("div",{children:[Ue("div",{class:"spacer"}),Ue("div",{class:"flex flex-middle",children:[Ue("div",{class:"search relative flex-grow",children:[Ue("input",{type:"search",ref:this.refs.searchInput,placeholder:Gi.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Ue("span",{class:"icon loupe flex",children:_k.search.loupe}),this.state.searchResults&&Ue("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:_k.search.delete})]}),t&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:t}=this.state;return t?Ue("div",{class:"category",ref:this.refs.search,children:[Ue("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Gi.categories.search}),Ue("div",{children:t.length?t.map((n,i)=>Ue("div",{class:"flex",children:n.map((r,o)=>this.renderEmojiButton(r,{pos:[i,o],posinset:i*this.props.perLine+o+1,grid:t}))})):Ue("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Ue("a",{onClick:this.props.onAddCustomEmoji,children:Gi.add_custom})})})]}):null}renderCategories(){const{categories:t}=Jt,n=!!this.state.searchResults,i=this.getPerLine();return Ue("div",{style:{visibility:n?"hidden":void 0,display:n?"none":void 0,height:"100%"},children:t.map(r=>{const{root:o,rows:a}=this.refs.categories.get(r.id);return Ue("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:o,children:[Ue("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Gi.categories[r.id]}),Ue("div",{class:"relative",style:{height:a.length*this.props.emojiButtonSize},children:a.map((s,u)=>{const c=s.index-s.index%Ek.rowsPerRender,f=this.state.visibleRows[c],d="current"in s?s:void 0;if(!f&&!d)return null;const h=u*i,p=h+i,m=r.emojis.slice(h,p);return m.length<i&&m.push(...new Array(i-m.length)),Ue("div",{"data-index":s.index,ref:d,class:"flex row",style:{top:u*this.props.emojiButtonSize},children:f&&m.map((v,y)=>{if(!v)return Ue("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const b=of.get(v);return this.renderEmojiButton(b,{pos:[s.index,y],posinset:s.posinset+y,grid:this.grid})})},s.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Ue("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Ue("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Gi.skins.choose,title:Gi.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Ue("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const t=this.getEmojiByPos(this.state.pos),n=t?t.name:"";return Ue("div",{"aria-live":"polite",class:"sr-only",children:n})}renderSkins(){const n=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),r={};return this.dir=="ltr"?r.right=i.right-n.right-3:r.left=n.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?r.bottom=i.bottom-n.top+6:(r.top=n.bottom-i.top+3,r.bottom="auto"),Ue("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Gi.skins.choose,class:"menu hidden","data-position":r.top?"top":"bottom",style:r,children:[...Array(6).keys()].map(o=>{const a=o+1,s=this.state.skin==a;return Ue("div",{children:[Ue("input",{type:"radio",name:"skin-tone",value:a,"aria-label":Gi.skins[a],ref:s?this.refs.skinToneRadio:null,defaultChecked:s,onChange:()=>this.handleSkinMouseOver(a),onKeyDown:u=>{(u.code=="Enter"||u.code=="Space"||u.code=="Tab")&&(u.preventDefault(),this.handleSkinClick(a))}}),Ue("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(a),onMouseEnter:()=>this.handleSkinMouseOver(a),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Ue("span",{class:`skin-tone skin-tone-${a}`}),Ue("span",{class:"margin-small-lr",children:Gi.skins[a]})]})]})})})}render(){const t=this.props.perLine*this.props.emojiButtonSize;return Ue("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${t}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&Ue("div",{class:"padding-lr",children:this.renderSearch()}),Ue("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Ue("div",{style:{width:this.props.dynamicWidth?"100%":t,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(t){super(),go(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),go(this,"handleClickOutside",n=>{const{element:i}=this.props;n.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(n))}),go(this,"handleBaseClick",n=>{this.state.showSkins&&(n.target.closest(".menu")||(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins()))}),go(this,"handleBaseKeydown",n=>{this.state.showSkins&&n.key=="Escape"&&(n.preventDefault(),n.stopImmediatePropagation(),this.closeSkins())}),go(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),go(this,"handleSearchInput",async()=>{const n=this.refs.searchInput.current;if(!n)return;const{value:i}=n,r=await of.search(i),o=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},o);const a=n.selectionStart==n.value.length?[0,0]:[-1,-1],s=[];s.setsize=r.length;let u=null;for(let c of r)(!s.length||u.length==this.getPerLine())&&(u=[],u.__categoryId="search",u.__index=s.length,s.push(u)),u.push(c);this.ignoreMouse(),this.setState({searchResults:s,pos:a},o)}),go(this,"handleSearchKeyDown",n=>{const i=n.currentTarget;switch(n.stopImmediatePropagation(),n.key){case"ArrowLeft":this.navigate({e:n,input:i,left:!0});break;case"ArrowRight":this.navigate({e:n,input:i,right:!0});break;case"ArrowUp":this.navigate({e:n,input:i,up:!0});break;case"ArrowDown":this.navigate({e:n,input:i,down:!0});break;case"Enter":n.preventDefault(),this.handleEmojiClick({e:n,pos:this.state.pos});break;case"Escape":n.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),go(this,"clearSearch",()=>{const n=this.refs.searchInput.current;n&&(n.value="",n.focus(),this.handleSearchInput())}),go(this,"handleCategoryClick",({category:n,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:n.id})}),go(this,"openSkins",n=>{const{currentTarget:i}=n,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await a7e(2);const o=this.refs.menu.current;o&&(o.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(t),visibleRows:{0:!0},...this.getInitialState(t)}}}class n7 extends u7e{async connectedCallback(){const t=YG(this.props,Xa,this);t.element=this,t.ref=n=>{this.component=n},await jm(t),!this.disconnected&&UG(Ue(C7e,{...t}),this.shadowRoot)}constructor(t){super(t,{styles:xG(mJ)})}}go(n7,"Props",Xa),typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",n7);var mJ={};mJ=`:host {
218
218
  width: min-content;
219
219
  height: 435px;
220
220
  min-height: 230px;