bkui-vue 0.0.1-beta.450 → 0.0.1-beta.451

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -30,7 +30,7 @@ function print() { __p += __j.call(arguments, '') }
30
30
  font-size: ${s["font-size"]};
31
31
  word-break: ${s["word-break"]};
32
32
  padding: ${s.padding};
33
- `,o.textContent=i.textContent,o};let n=!1;try{const i=window.getComputedStyle(e,null);if(i.webkitLineClamp!=="none"){const o=parseFloat(i.height),c=t(e,i);document.body.appendChild(c);const u=window.getComputedStyle(c,null).height;document.body.removeChild(c),n=o<parseFloat(u)}else n=e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight}catch(i){console.warn("There is an error when check element overflow state: ",i)}return n}const Rl={bottom:0,content:1,navi:100,fullScreen:1e3,modal:3e3,plugins:8e3,message:1e4,popper:99999};class lC{constructor(){this.storageLayerIndexValue={},this.copyDefaultValue()}getNextIndex(t){return Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,t)?(this.storageLayerIndexValue[t]=this.storageLayerIndexValue[t]+1,this.storageLayerIndexValue[t]):(this.storageLayerIndexValue.modal=this.storageLayerIndexValue.modal+1,this.storageLayerIndexValue.modal)}getModalNextIndex(){return this.getNextIndex("modal")}getMessageNextIndex(){return this.getNextIndex("message")}getFullScreenNextIndex(){return this.getNextIndex("fullScreen")}getNaviNextIndex(){return this.getNextIndex("navi")}getPopperIndex(){return Rl.popper}setDefaultZIndex(t){Object.keys(t||{}).forEach(n=>{Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue.__proto__,n)&&Object.assign(this.storageLayerIndexValue.__proto__,{[n]:t[n]})}),this.copyDefaultValue()}resetZIndex(t){Object.keys(t||{}).forEach(n=>{Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,n)&&Object.assign(this.storageLayerIndexValue,{[n]:t[n]})})}copyDefaultValue(){const t=Object.keys(Rl).reduce((n,i)=>Object.assign(n,{[i]:{value:Rl[i],writable:!0,configurable:!0}}),{});this.storageLayerIndexValue=Object.create(Rl,t)}}const ni=new lC;`${Na(16)}`;class oC{constructor(){this.timer=null,this.store=[],this.maskMap=new WeakMap}appendMaker(t){this.store.push(t),this.executeMaker()}pushMaskStyle(t,n){const i=this.getMaskMap(t);i!=null&&i.styles?i.styles.push(n):this.setMaskMap(t,W({styles:[n]},i||{}))}getMaskStyles(t){var n;return((n=this.getMaskMap(t))==null?void 0:n.styles)||[]}setMaskId(t,n){const i=this.getMaskMap(t);i?(Object.assign(i,{id:n}),this.setMaskMap(t,i)):this.setMaskMap(t,W({id:n},i||{}))}getMaskId(t){var n;return(n=this.getMaskMap(t))==null?void 0:n.id}setMaskMap(t,n){this.maskMap.set(t,n)}getMaskMap(t){return this.maskMap.get(t)}executeMaker(){this.timer&&cancelAnimationFrame(this.timer),this.timer=requestAnimationFrame(()=>{const t=this.store.pop();typeof t=="function"&&(Reflect.apply(t,this,[]),this.executeMaker())})}}const $a=new oC;class wg{constructor(t){this.multiInstance=!1,this.uniqueMaskAttrTag="",this.parentNode=document.body,this.activeInstance=void 0,this.zIndexStore=new Map,this.lastUUID=null,this.maskStyle={position:"fixed",left:0,top:0,bottom:0,right:0,display:"none","background-color":"rgba(0,0,0,.6)"},this.isInit=!1,this.maskAttrTag="auto";const{multiInstance:n=!1,maskAttrTag:i="auto",parentNode:s=document.body,maskStyle:o={},onClick:c=null}=t||{};this.parentNode=s||document,this.maskAttrTag=i,this.onClick=c,this.activeInstance=void 0,this.multiInstance=n,this.uniqueMaskAttrTag=this.getMaskAttrTag(i),$a.appendMaker(()=>{this.initInstance(o)})}setOption(t){const{parentNode:n=document.body,maskStyle:i={},onClick:s=null,maskAttrTag:o=this.maskAttrTag}=t||{};this.onClick=s,this.parentNode=n||document,this.setMaskStyle(Object.assign({},this.maskStyle,i)),this.uniqueMaskAttrTag=this.getMaskAttrTag(o)}show(t,n,i=!0,s={},o=null,c=!1){const u=o!=null?o:Na(16),f=/-?\d+/.test(`${n}`)?n:ni.getModalNextIndex();let d=Object.assign({},this.maskStyle,s||{});if(!i&&this.lastUUID){const g=this.zIndexStore.get(this.lastUUID);g&&(d=g==null?void 0:g.style)}this.storeMaskInsCfg({zIndex:f,style:W({},d),uuid:u,preUID:this.lastUUID}),Object.assign(d,{display:"block","z-index":`${f}`,"pointer-events":"all"}),this.initInstance(d),this.setMaskStyle(d),$a.pushMaskStyle(this.parentNode,W({},d)),this.backupMask.style.setProperty("z-index",`${f-1}`),i||(this.mask.style.setProperty("pointer-events","none"),t==null||t.style.setProperty("pointer-events","all")),t&&(c&&t.style.setProperty("z-index",`${f+1}`),this.activeInstance=t,this.appendContentToMask(t))}hide(t=!1,n,i){var c;const s=i!=null?i:this.lastUUID;t||(n==null||n.remove(),(c=this.activeInstance)==null||c.remove()),this.activeInstance=void 0,this.popIndexStore(s);const o=$a.getMaskStyles(this.parentNode);if(o==null||o.pop(),!(o!=null&&o.length))this.mask.style.setProperty("display","none");else{const u=o.slice(-1)[0];this.setMaskStyle(u)}}storeMaskInsCfg(t){return this.zIndexStore.set(t.uuid,t),this.lastUUID=t.uuid,this.zIndexStore.get(t.uuid)}popIndexStore(t){if(this.zIndexStore.has(t)){const n=this.zIndexStore.get(t);return this.lastUUID=n.preUID,this.zIndexStore.delete(t)}return this.lastUUID=null,!1}backupActiveInstance(){this.activeInstance&&this.backupMask.append(this.activeInstance)}backupContentElement(t){t&&this.backupMask.append(t)}getActiveContentInstance(){return this.activeInstance}initInstance(t){if(!this.isInit){this.isInit=!0;const{instance:n,isExist:i}=this.getMask();this.mask=n,this.backupMask=this.getBackupMask(),!i&&this.setMaskStyle(Object.assign({},this.maskStyle,t))}}getMask(){if(this.multiInstance)return{instance:this.createMask(),isExist:!1};let t=!0,n=this.parentNode.querySelector(`[data-bk-mask-uid='${this.uniqueMaskAttrTag}']`);return n||(t=!1,n=this.createMask(),n.addEventListener("click",i=>{i.target===n&&typeof this.onClick=="function"&&Reflect.apply(this.onClick,this,[i])},!0)),{instance:n,isExist:t}}getBackupMask(){const t="data-bk-backup-uid";let n=this.parentNode.querySelector(`[${t}]`);return n||(n=this.createMask(t)),n}createMask(t="data-bk-mask-uid"){const n=document.createElement("div");return n.setAttribute(t,this.uniqueMaskAttrTag),this.parentNode.append(n),n}setMaskStyle(t={}){this.mask&&Object.entries(t).forEach(n=>this.mask.style.setProperty(n[0],n[1]))}getMaskAttrTag(t){return/^(auto|\s+)$/i.test(t)||t===null||t===void 0||t===""?($a.getMaskId(this.parentNode)||$a.setMaskId(this.parentNode,`__bk_mask_${Na(16)}`),$a.getMaskId(this.parentNode)):t}appendContentToMask(t){this.mask.append(t)}}new wg({});class Mg{constructor(t){this.getActiveClickFnIndex=n=>{const i=s=>typeof n=="string"?s.getAttribute(this.uuidAttrName)===n:s===n;return this.clickFn.findIndex(({target:s})=>i(s))},this.getActiveClickFn=n=>{var i;return(i=this.clickFn[this.getActiveClickFnIndex(n)])==null?void 0:i.fn},this.popInstanceList=[],this.clickFn=[],this.uuidAttrName="data-bk-pop-uuid",this.activePopId=null,this.bKMaskManagerInstance=new wg({parentNode:this.getParentNode(t==null?void 0:t.transfer),onClick:this.onMaskClickFn.bind(this)})}getParentNode(t){if(typeof t=="string"){const n=document.querySelector(t);if(n)return n}return Ia(t)?t:document.body}onMaskClick(t,n){this.clickFn.push({fn:t,target:n})}show(t,n=!0,i={},s=!1,o=void 0){if(!t){console.warn("pop show error: content is null or undefined");return}const c=typeof o=="number"?o:ni.getModalNextIndex(),u=Na(16);t.setAttribute(this.uuidAttrName,u),this.popInstanceList.push({uuid:u,zIndex:c,content:t,showMask:n,appendStyle:i}),n&&this.bKMaskManagerInstance.backupActiveInstance(),this.bKMaskManagerInstance.show(t,c,n,i,u,s),this.activePopId=u}destroy(t,n=!1){var s;const i=this.getActiveClickFnIndex(t);i>=0&&((s=this.clickFn)==null||s.splice(i,1)),this.hide(t,n)}popHide(t=!0){if(this.popInstanceList.length){if(t){const n=this.popInstanceList.pop();this.bKMaskManagerInstance.popIndexStore(n.uuid),n.remove(),this.activePopId=null}if(this.popInstanceList.length){const n=this.popInstanceList.slice(-1)[0],{zIndex:i,content:s,showMask:o,appendStyle:c,uuid:u}=n;this.bKMaskManagerInstance.show(s,i,o,c,u),this.activePopId=u}else this.bKMaskManagerInstance.hide(),this.activePopId=null,this.clickFn.length=0}}hide(t,n=!1){const i=t==null?void 0:t.getAttribute(this.uuidAttrName);if(i){const s=this.popInstanceList.findIndex(o=>o.uuid===i);s>=0&&(n||this.popInstanceList[s].content.remove(),this.popInstanceList.splice(s,1),this.bKMaskManagerInstance.popIndexStore(i),this.popInstanceList.length?this.popHide(!1):(this.bKMaskManagerInstance.hide(n),this.activePopId=null,this.clickFn.length=0))}else t==null||t.remove()}onMaskClickFn(t){const n=this.getActiveClickFn(this.activePopId);n&&Reflect.apply(n,this,[t])}}new Mg;var ro={exports:{}},z9=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(z9){var P9=new Uint8Array(16);ro.exports=function(){return z9(P9),P9}}else{var V9=new Array(16);ro.exports=function(){for(var t=0,n;t<16;t++)(t&3)===0&&(n=Math.random()*4294967296),V9[t]=n>>>((t&3)<<3)&255;return V9}}var Ig=[];for(var Ql=0;Ql<256;++Ql)Ig[Ql]=(Ql+256).toString(16).substr(1);function cC(e,t){var n=t||0,i=Ig;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}var Ng=cC,uC=ro.exports,dC=Ng,J9,Pu,Vu=0,Ju=0;function fC(e,t,n){var i=t&&n||0,s=t||[];e=e||{};var o=e.node||J9,c=e.clockseq!==void 0?e.clockseq:Pu;if(o==null||c==null){var u=uC();o==null&&(o=J9=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]),c==null&&(c=Pu=(u[6]<<8|u[7])&16383)}var f=e.msecs!==void 0?e.msecs:new Date().getTime(),d=e.nsecs!==void 0?e.nsecs:Ju+1,g=f-Vu+(d-Ju)/1e4;if(g<0&&e.clockseq===void 0&&(c=c+1&16383),(g<0||f>Vu)&&e.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Vu=f,Ju=d,Pu=c,f+=122192928e5;var p=((f&268435455)*1e4+d)%4294967296;s[i++]=p>>>24&255,s[i++]=p>>>16&255,s[i++]=p>>>8&255,s[i++]=p&255;var v=f/4294967296*1e4&268435455;s[i++]=v>>>8&255,s[i++]=v&255,s[i++]=v>>>24&15|16,s[i++]=v>>>16&255,s[i++]=c>>>8|128,s[i++]=c&255;for(var y=0;y<6;++y)s[i+y]=o[y];return t||dC(s)}var hC=fC,gC=ro.exports,mC=Ng;function pC(e,t,n){var i=t&&n||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||gC)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t)for(var o=0;o<16;++o)t[i+o]=s[o];return t||mC(s)}var vC=pC,yC=hC,Lg=vC,Fd=Lg;Fd.v1=yC;Fd.v4=Lg;var $i=Fd,sn="top",jn="bottom",An="right",ln="left",Gd="auto",js=[sn,jn,An,ln],dr="start",bs="end",bC="clippingParents",kg="viewport",Xr="popper",CC="reference",R9=js.reduce(function(e,t){return e.concat([t+"-"+dr,t+"-"+bs])},[]),Tg=[].concat(js,[Gd]).reduce(function(e,t){return e.concat([t,t+"-"+dr,t+"-"+bs])},[]),wC="beforeRead",MC="read",IC="afterRead",NC="beforeMain",LC="main",kC="afterMain",TC="beforeWrite",xC="write",SC="afterWrite",DC=[wC,MC,IC,NC,LC,kC,TC,xC,SC];function ii(e){return e?(e.nodeName||"").toLowerCase():null}function Hn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fr(e){var t=Hn(e).Element;return e instanceof t||e instanceof Element}function Dn(e){var t=Hn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Zd(e){if(typeof ShadowRoot=="undefined")return!1;var t=Hn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jC(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},s=t.attributes[n]||{},o=t.elements[n];!Dn(o)||!ii(o)||(Object.assign(o.style,i),Object.keys(s).forEach(function(c){var u=s[c];u===!1?o.removeAttribute(c):o.setAttribute(c,u===!0?"":u)}))})}function AC(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],o=t.attributes[i]||{},c=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),u=c.reduce(function(f,d){return f[d]="",f},{});!Dn(s)||!ii(s)||(Object.assign(s.style,u),Object.keys(o).forEach(function(f){s.removeAttribute(f)}))})}}var EC={name:"applyStyles",enabled:!0,phase:"write",fn:jC,effect:AC,requires:["computeStyles"]};function ei(e){return e.split("-")[0]}var La=Math.max,so=Math.min,hr=Math.round;function gr(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),i=1,s=1;if(Dn(e)&&t){var o=e.offsetHeight,c=e.offsetWidth;c>0&&(i=hr(n.width)/c||1),o>0&&(s=hr(n.height)/o||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function Yd(e){var t=gr(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function xg(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zd(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Ni(e){return Hn(e).getComputedStyle(e)}function OC(e){return["table","td","th"].indexOf(ii(e))>=0}function Xi(e){return((fr(e)?e.ownerDocument:e.document)||window.document).documentElement}function So(e){return ii(e)==="html"?e:e.assignedSlot||e.parentNode||(Zd(e)?e.host:null)||Xi(e)}function Q9(e){return!Dn(e)||Ni(e).position==="fixed"?null:e.offsetParent}function zC(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Dn(e)){var i=Ni(e);if(i.position==="fixed")return null}var s=So(e);for(Zd(s)&&(s=s.host);Dn(s)&&["html","body"].indexOf(ii(s))<0;){var o=Ni(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function As(e){for(var t=Hn(e),n=Q9(e);n&&OC(n)&&Ni(n).position==="static";)n=Q9(n);return n&&(ii(n)==="html"||ii(n)==="body"&&Ni(n).position==="static")?t:n||zC(e)||t}function Ud(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function cs(e,t,n){return La(e,so(t,n))}function PC(e,t,n){var i=cs(e,t,n);return i>n?n:i}function Sg(){return{top:0,right:0,bottom:0,left:0}}function Dg(e){return Object.assign({},Sg(),e)}function jg(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var VC=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Dg(typeof t!="number"?t:jg(t,js))};function JC(e){var t,n=e.state,i=e.name,s=e.options,o=n.elements.arrow,c=n.modifiersData.popperOffsets,u=ei(n.placement),f=Ud(u),d=[ln,An].indexOf(u)>=0,g=d?"height":"width";if(!(!o||!c)){var p=VC(s.padding,n),v=Yd(o),y=f==="y"?sn:ln,b=f==="y"?jn:An,I=n.rects.reference[g]+n.rects.reference[f]-c[f]-n.rects.popper[g],k=c[f]-n.rects.reference[f],N=As(o),T=N?f==="y"?N.clientHeight||0:N.clientWidth||0:0,w=I/2-k/2,C=p[y],L=T-v[g]-p[b],S=T/2-v[g]/2+w,A=cs(C,S,L),j=f;n.modifiersData[i]=(t={},t[j]=A,t.centerOffset=A-S,t)}}function RC(e){var t=e.state,n=e.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||!xg(t.elements.popper,s)||(t.elements.arrow=s))}var QC={name:"arrow",enabled:!0,phase:"main",fn:JC,effect:RC,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mr(e){return e.split("-")[1]}var _C={top:"auto",right:"auto",bottom:"auto",left:"auto"};function WC(e){var t=e.x,n=e.y,i=window,s=i.devicePixelRatio||1;return{x:hr(t*s)/s||0,y:hr(n*s)/s||0}}function _9(e){var t,n=e.popper,i=e.popperRect,s=e.placement,o=e.variation,c=e.offsets,u=e.position,f=e.gpuAcceleration,d=e.adaptive,g=e.roundOffsets,p=e.isFixed,v=c.x,y=v===void 0?0:v,b=c.y,I=b===void 0?0:b,k=typeof g=="function"?g({x:y,y:I}):{x:y,y:I};y=k.x,I=k.y;var N=c.hasOwnProperty("x"),T=c.hasOwnProperty("y"),w=ln,C=sn,L=window;if(d){var S=As(n),A="clientHeight",j="clientWidth";if(S===Hn(n)&&(S=Xi(n),Ni(S).position!=="static"&&u==="absolute"&&(A="scrollHeight",j="scrollWidth")),S=S,s===sn||(s===ln||s===An)&&o===bs){C=jn;var z=p&&S===L&&L.visualViewport?L.visualViewport.height:S[A];I-=z-i.height,I*=f?1:-1}if(s===ln||(s===sn||s===jn)&&o===bs){w=An;var H=p&&S===L&&L.visualViewport?L.visualViewport.width:S[j];y-=H-i.width,y*=f?1:-1}}var O=Object.assign({position:u},d&&_C),B=g===!0?WC({x:y,y:I}):{x:y,y:I};if(y=B.x,I=B.y,f){var R;return Object.assign({},O,(R={},R[C]=T?"0":"",R[w]=N?"0":"",R.transform=(L.devicePixelRatio||1)<=1?"translate("+y+"px, "+I+"px)":"translate3d("+y+"px, "+I+"px, 0)",R))}return Object.assign({},O,(t={},t[C]=T?I+"px":"",t[w]=N?y+"px":"",t.transform="",t))}function HC(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=i===void 0?!0:i,o=n.adaptive,c=o===void 0?!0:o,u=n.roundOffsets,f=u===void 0?!0:u,d={placement:ei(t.placement),variation:mr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_9(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_9(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var BC={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:HC,data:{}},_l={passive:!0};function FC(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,o=s===void 0?!0:s,c=i.resize,u=c===void 0?!0:c,f=Hn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(g){g.addEventListener("scroll",n.update,_l)}),u&&f.addEventListener("resize",n.update,_l),function(){o&&d.forEach(function(g){g.removeEventListener("scroll",n.update,_l)}),u&&f.removeEventListener("resize",n.update,_l)}}var GC={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:FC,data:{}},ZC={left:"right",right:"left",bottom:"top",top:"bottom"};function Ul(e){return e.replace(/left|right|bottom|top/g,function(t){return ZC[t]})}var YC={start:"end",end:"start"};function W9(e){return e.replace(/start|end/g,function(t){return YC[t]})}function $d(e){var t=Hn(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Kd(e){return gr(Xi(e)).left+$d(e).scrollLeft}function UC(e){var t=Hn(e),n=Xi(e),i=t.visualViewport,s=n.clientWidth,o=n.clientHeight,c=0,u=0;return i&&(s=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(c=i.offsetLeft,u=i.offsetTop)),{width:s,height:o,x:c+Kd(e),y:u}}function $C(e){var t,n=Xi(e),i=$d(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=La(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=La(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),u=-i.scrollLeft+Kd(e),f=-i.scrollTop;return Ni(s||n).direction==="rtl"&&(u+=La(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:u,y:f}}function Xd(e){var t=Ni(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function Ag(e){return["html","body","#document"].indexOf(ii(e))>=0?e.ownerDocument.body:Dn(e)&&Xd(e)?e:Ag(So(e))}function us(e,t){var n;t===void 0&&(t=[]);var i=Ag(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Hn(i),c=s?[o].concat(o.visualViewport||[],Xd(i)?i:[]):i,u=t.concat(c);return s?u:u.concat(us(So(c)))}function td(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function KC(e){var t=gr(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function H9(e,t){return t===kg?td(UC(e)):fr(t)?KC(t):td($C(Xi(e)))}function XC(e){var t=us(So(e)),n=["absolute","fixed"].indexOf(Ni(e).position)>=0,i=n&&Dn(e)?As(e):e;return fr(i)?t.filter(function(s){return fr(s)&&xg(s,i)&&ii(s)!=="body"}):[]}function qC(e,t,n){var i=t==="clippingParents"?XC(e):[].concat(t),s=[].concat(i,[n]),o=s[0],c=s.reduce(function(u,f){var d=H9(e,f);return u.top=La(d.top,u.top),u.right=so(d.right,u.right),u.bottom=so(d.bottom,u.bottom),u.left=La(d.left,u.left),u},H9(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Eg(e){var t=e.reference,n=e.element,i=e.placement,s=i?ei(i):null,o=i?mr(i):null,c=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,f;switch(s){case sn:f={x:c,y:t.y-n.height};break;case jn:f={x:c,y:t.y+t.height};break;case An:f={x:t.x+t.width,y:u};break;case ln:f={x:t.x-n.width,y:u};break;default:f={x:t.x,y:t.y}}var d=s?Ud(s):null;if(d!=null){var g=d==="y"?"height":"width";switch(o){case dr:f[d]=f[d]-(t[g]/2-n[g]/2);break;case bs:f[d]=f[d]+(t[g]/2-n[g]/2);break}}return f}function Cs(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=i===void 0?e.placement:i,o=n.boundary,c=o===void 0?bC:o,u=n.rootBoundary,f=u===void 0?kg:u,d=n.elementContext,g=d===void 0?Xr:d,p=n.altBoundary,v=p===void 0?!1:p,y=n.padding,b=y===void 0?0:y,I=Dg(typeof b!="number"?b:jg(b,js)),k=g===Xr?CC:Xr,N=e.rects.popper,T=e.elements[v?k:g],w=qC(fr(T)?T:T.contextElement||Xi(e.elements.popper),c,f),C=gr(e.elements.reference),L=Eg({reference:C,element:N,strategy:"absolute",placement:s}),S=td(Object.assign({},N,L)),A=g===Xr?S:C,j={top:w.top-A.top+I.top,bottom:A.bottom-w.bottom+I.bottom,left:w.left-A.left+I.left,right:A.right-w.right+I.right},z=e.modifiersData.offset;if(g===Xr&&z){var H=z[s];Object.keys(j).forEach(function(O){var B=[An,jn].indexOf(O)>=0?1:-1,R=[sn,jn].indexOf(O)>=0?"y":"x";j[O]+=H[R]*B})}return j}function ew(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=n.boundary,o=n.rootBoundary,c=n.padding,u=n.flipVariations,f=n.allowedAutoPlacements,d=f===void 0?Tg:f,g=mr(i),p=g?u?R9:R9.filter(function(b){return mr(b)===g}):js,v=p.filter(function(b){return d.indexOf(b)>=0});v.length===0&&(v=p);var y=v.reduce(function(b,I){return b[I]=Cs(e,{placement:I,boundary:s,rootBoundary:o,padding:c})[ei(I)],b},{});return Object.keys(y).sort(function(b,I){return y[b]-y[I]})}function tw(e){if(ei(e)===Gd)return[];var t=Ul(e);return[W9(e),t,W9(t)]}function nw(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,c=n.altAxis,u=c===void 0?!0:c,f=n.fallbackPlacements,d=n.padding,g=n.boundary,p=n.rootBoundary,v=n.altBoundary,y=n.flipVariations,b=y===void 0?!0:y,I=n.allowedAutoPlacements,k=t.options.placement,N=ei(k),T=N===k,w=f||(T||!b?[Ul(k)]:tw(k)),C=[k].concat(w).reduce(function(ee,se){return ee.concat(ei(se)===Gd?ew(t,{placement:se,boundary:g,rootBoundary:p,padding:d,flipVariations:b,allowedAutoPlacements:I}):se)},[]),L=t.rects.reference,S=t.rects.popper,A=new Map,j=!0,z=C[0],H=0;H<C.length;H++){var O=C[H],B=ei(O),R=mr(O)===dr,$=[sn,jn].indexOf(B)>=0,ie=$?"width":"height",ge=Cs(t,{placement:O,boundary:g,rootBoundary:p,altBoundary:v,padding:d}),we=$?R?An:ln:R?jn:sn;L[ie]>S[ie]&&(we=Ul(we));var ce=Ul(we),oe=[];if(o&&oe.push(ge[B]<=0),u&&oe.push(ge[we]<=0,ge[ce]<=0),oe.every(function(ee){return ee})){z=O,j=!1;break}A.set(O,oe)}if(j)for(var q=b?3:1,U=function(se){var ue=C.find(function(Ie){var fe=A.get(Ie);if(fe)return fe.slice(0,se).every(function(F){return F})});if(ue)return z=ue,"break"},ne=q;ne>0;ne--){var X=U(ne);if(X==="break")break}t.placement!==z&&(t.modifiersData[i]._skip=!0,t.placement=z,t.reset=!0)}}var iw={name:"flip",enabled:!0,phase:"main",fn:nw,requiresIfExists:["offset"],data:{_skip:!1}};function B9(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function F9(e){return[sn,An,jn,ln].some(function(t){return e[t]>=0})}function aw(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,c=Cs(t,{elementContext:"reference"}),u=Cs(t,{altBoundary:!0}),f=B9(c,i),d=B9(u,s,o),g=F9(f),p=F9(d);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:g,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":g,"data-popper-escaped":p})}var rw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:aw};function sw(e,t,n){var i=ei(e),s=[ln,sn].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=o[0],u=o[1];return c=c||0,u=(u||0)*s,[ln,An].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}function lw(e){var t=e.state,n=e.options,i=e.name,s=n.offset,o=s===void 0?[0,0]:s,c=Tg.reduce(function(g,p){return g[p]=sw(p,t.rects,o),g},{}),u=c[t.placement],f=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=c}var ow={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lw};function cw(e){var t=e.state,n=e.name;t.modifiersData[n]=Eg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var uw={name:"popperOffsets",enabled:!0,phase:"read",fn:cw,data:{}};function dw(e){return e==="x"?"y":"x"}function fw(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,o=s===void 0?!0:s,c=n.altAxis,u=c===void 0?!1:c,f=n.boundary,d=n.rootBoundary,g=n.altBoundary,p=n.padding,v=n.tether,y=v===void 0?!0:v,b=n.tetherOffset,I=b===void 0?0:b,k=Cs(t,{boundary:f,rootBoundary:d,padding:p,altBoundary:g}),N=ei(t.placement),T=mr(t.placement),w=!T,C=Ud(N),L=dw(C),S=t.modifiersData.popperOffsets,A=t.rects.reference,j=t.rects.popper,z=typeof I=="function"?I(Object.assign({},t.rects,{placement:t.placement})):I,H=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(!!S){if(o){var R,$=C==="y"?sn:ln,ie=C==="y"?jn:An,ge=C==="y"?"height":"width",we=S[C],ce=we+k[$],oe=we-k[ie],q=y?-j[ge]/2:0,U=T===dr?A[ge]:j[ge],ne=T===dr?-j[ge]:-A[ge],X=t.elements.arrow,ee=y&&X?Yd(X):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Sg(),ue=se[$],Ie=se[ie],fe=cs(0,A[ge],ee[ge]),F=w?A[ge]/2-q-fe-ue-H.mainAxis:U-fe-ue-H.mainAxis,_=w?-A[ge]/2+q+fe+Ie+H.mainAxis:ne+fe+Ie+H.mainAxis,E=t.elements.arrow&&As(t.elements.arrow),G=E?C==="y"?E.clientTop||0:E.clientLeft||0:0,x=(R=O==null?void 0:O[C])!=null?R:0,V=we+F-x-G,J=we+_-x,le=cs(y?so(ce,V):ce,we,y?La(oe,J):oe);S[C]=le,B[C]=le-we}if(u){var ve,Ce=C==="x"?sn:ln,xe=C==="x"?jn:An,Ae=S[L],re=L==="y"?"height":"width",me=Ae+k[Ce],Le=Ae-k[xe],De=[sn,ln].indexOf(N)!==-1,Ye=(ve=O==null?void 0:O[L])!=null?ve:0,Ee=De?me:Ae-A[re]-j[re]-Ye+H.altAxis,Pe=De?Ae+A[re]+j[re]-Ye-H.altAxis:Le,He=y&&De?PC(Ee,Ae,Pe):cs(y?Ee:me,Ae,y?Pe:Le);S[L]=He,B[L]=He-Ae}t.modifiersData[i]=B}}var hw={name:"preventOverflow",enabled:!0,phase:"main",fn:fw,requiresIfExists:["offset"]};function gw(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function mw(e){return e===Hn(e)||!Dn(e)?$d(e):gw(e)}function pw(e){var t=e.getBoundingClientRect(),n=hr(t.width)/e.offsetWidth||1,i=hr(t.height)/e.offsetHeight||1;return n!==1||i!==1}function vw(e,t,n){n===void 0&&(n=!1);var i=Dn(t),s=Dn(t)&&pw(t),o=Xi(t),c=gr(e,s),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&((ii(t)!=="body"||Xd(o))&&(u=mw(t)),Dn(t)?(f=gr(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):o&&(f.x=Kd(o))),{x:c.left+u.scrollLeft-f.x,y:c.top+u.scrollTop-f.y,width:c.width,height:c.height}}function yw(e){var t=new Map,n=new Set,i=[];e.forEach(function(o){t.set(o.name,o)});function s(o){n.add(o.name);var c=[].concat(o.requires||[],o.requiresIfExists||[]);c.forEach(function(u){if(!n.has(u)){var f=t.get(u);f&&s(f)}}),i.push(o)}return e.forEach(function(o){n.has(o.name)||s(o)}),i}function bw(e){var t=yw(e);return DC.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function Cw(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ww(e){var t=e.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var G9={placement:"bottom",modifiers:[],strategy:"absolute"};function Z9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Mw(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,s=t.defaultOptions,o=s===void 0?G9:s;return function(u,f,d){d===void 0&&(d=o);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},G9,o),modifiersData:{},elements:{reference:u,popper:f},attributes:{},styles:{}},p=[],v=!1,y={state:g,setOptions:function(N){var T=typeof N=="function"?N(g.options):N;I(),g.options=Object.assign({},o,g.options,T),g.scrollParents={reference:fr(u)?us(u):u.contextElement?us(u.contextElement):[],popper:us(f)};var w=bw(ww([].concat(i,g.options.modifiers)));return g.orderedModifiers=w.filter(function(C){return C.enabled}),b(),y.update()},forceUpdate:function(){if(!v){var N=g.elements,T=N.reference,w=N.popper;if(!!Z9(T,w)){g.rects={reference:vw(T,As(w),g.options.strategy==="fixed"),popper:Yd(w)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(H){return g.modifiersData[H.name]=Object.assign({},H.data)});for(var C=0;C<g.orderedModifiers.length;C++){if(g.reset===!0){g.reset=!1,C=-1;continue}var L=g.orderedModifiers[C],S=L.fn,A=L.options,j=A===void 0?{}:A,z=L.name;typeof S=="function"&&(g=S({state:g,options:j,name:z,instance:y})||g)}}}},update:Cw(function(){return new Promise(function(k){y.forceUpdate(),k(g)})}),destroy:function(){I(),v=!0}};if(!Z9(u,f))return y;y.setOptions(d).then(function(k){!v&&d.onFirstUpdate&&d.onFirstUpdate(k)});function b(){g.orderedModifiers.forEach(function(k){var N=k.name,T=k.options,w=T===void 0?{}:T,C=k.effect;if(typeof C=="function"){var L=C({state:g,name:N,instance:y,options:w}),S=function(){};p.push(L||S)}})}function I(){p.forEach(function(k){return k()}),p=[]}return y}}var Iw=[GC,uw,BC,EC,ow,iw,hw,QC,rw],Og=Mw({defaultModifiers:Iw});class Nw{constructor(t,n,i){var s,o;this.isShow=!1,this.trigger=void 0,this.instance=void 0,this.always=!1,this.reference=void 0,this.referenceTarget=void 0,this.popperRefer=void 0,this.delay=50,this.isInnerPopper=!1,this.disabled=!1,this.afterShow=null,this.afterHidden=null,this.appendTo="parent",this.container=null,this.fixOnBoundary=!1,this.instanceOptions=this.initDefaultOptions(i),this.reference=this.resolveInputSelectorToHtmlElement(t),this.popperRefer=this.resolveInputSelectorToHtmlElement(n),this.referenceTarget=this.getTargetReferenceElement(),this.container=(s=this.popperRefer)==null?void 0:s.parentElement,this.isShow=!!((o=this.instanceOptions)!=null&&o.isShow),this.always=this.instanceOptions.always,this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.appendTo=this.instanceOptions.appendTo,this.afterHidden=typeof i.afterHidden=="function"?i.afterHidden:()=>{},this.afterShow=typeof i.afterShow=="function"?i.afterShow:()=>{},this.fixOnBoundary=this.instanceOptions.fixOnBoundary,this.initInstance(),this.registerEvents(),(this.isShow||this.always)&&this.show(null)}forceUpdate(){var t;(t=this.instance)==null||t.forceUpdate()}update(){var t;(t=this.instance)==null||t.update()}updateOptions(t){var n;this.instanceOptions=this.initDefaultOptions(t),this.isShow=!!((n=this.instanceOptions)!=null&&n.isShow),this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.setOptions(this.instanceOptions)}setOptions(t){var n;(n=this.instance)==null||n.setOptions(t)}destroy(){var t;(t=this.instance)==null||t.destroy()}updateDisabled(t){this.disabled=t!=null?t:!this.disabled,this.disabled&&this.hide()}show(t){var n;this.disabled||((n=this.popperRefer)==null||n.setAttribute("data-show",""),this.setOptions({modifiers:[...this.instanceOptions.modifiers||[],{name:"eventListeners",enabled:!0}]}),this.update(),this.isShow=!0,this.afterShow(),this.fixOnBoundary||this.appendToTarget())}hide(){var t;this.always||((t=this.popperRefer)==null||t.removeAttribute("data-show"),this.setOptions({modifiers:[...this.instanceOptions.modifiers||[],{name:"eventListeners",enabled:!1}]}),this.isShow=!1,this.isInnerPopper=!1,this.afterHidden(),this.fixOnBoundary||this.restorePopContent())}restorePopContent(){const t=this.getAppendToTarget();Ia(t)&&t.contains(this.popperRefer)&&this.container&&!this.container.contains(this.popperRefer)&&this.container.append(this.popperRefer)}appendToTarget(){const t=this.getAppendToTarget();Ia(t)&&t.contains(this.popperRefer)&&t.append(this.popperRefer)}getAppendToTarget(){const{appendTo:t}=this;let n=t;return t!=="parent"&&typeof t=="string"&&(n=document.querySelector(t)),n}initDefaultOptions(t){const i=yg({placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}],strategy:"absolute",onFirstUpdate:void 0,isShow:!1,theme:"dark",trigger:"hover",disabled:!1},t||{}),s=i.onFirstUpdate;return i.onFirstUpdate=o=>{typeof s=="function"&&(s.call(this,o),this.handleFirstUpdate())},i}handleFirstUpdate(){this.fixOnBoundary&&this.appendToTarget()}getTargetReferenceElement(){return this.isElement(this.reference)?this.reference.childElementCount===1?this.reference.firstElementChild:this.reference:this.reference}initInstance(){var t,n;this.referenceTarget&&(this.referenceTarget&&this.popperRefer?(this.instance=Og(this.referenceTarget,this.popperRefer,this.instanceOptions),(n=this.popperRefer)==null||n.setAttribute("data-theme",(t=this.instanceOptions.theme)!=null?t:"dark")):console.error("reference or popperRefer is null, please check html element."))}resolveInputSelectorToHtmlElement(t){if(this.isElement(t))return t;if(typeof t=="string")return document.querySelector(t);if(typeof t=="object"){if(Object.prototype.hasOwnProperty.call(t,"getBoundingClientRect"))return t}else console.error("'getBoundingClientRect' is needed when use virtual elements");return null}isElement(t){return Ia(t)}registerEvents(){if(this.isElement(this.referenceTarget)&&this.trigger==="hover"){const t=["mouseenter","focus"],n=["mouseleave","blur"],i=["mouseenter","mouseleave"];t.forEach(s=>{this.referenceTarget.addEventListener(s,o=>{s==="mouseenter"&&(this.isInnerPopper=!0),this.show(o)})}),n.forEach(s=>{this.referenceTarget.addEventListener(s,()=>{this.isInnerPopper=!1,setTimeout(()=>{!this.isInnerPopper&&this.hide()},this.delay)})}),this.isElement(this.popperRefer)&&i.forEach(s=>{this.popperRefer.addEventListener(s,()=>{s==="mouseenter"&&(this.isInnerPopper=!0),s==="mouseleave"&&this.hide()})})}this.trigger==="click"&&["click"].forEach(n=>{document.body.addEventListener(n,i=>{this.isSameElement(i.target,this.reference)||this.reference.contains(i.target)?this.show(i):this.isShow&&!this.isSameElement(i.target,this.popperRefer)&&!this.popperRefer.contains(i.target)&&this.hide()})})}isSameElement(t,n){return t&&(t===n||t===n.firstElementChild)}}/*!
33
+ `,o.textContent=i.textContent,o};let n=!1;try{const i=window.getComputedStyle(e,null);if(i.webkitLineClamp!=="none"){const o=parseFloat(i.height),c=t(e,i);document.body.appendChild(c);const u=window.getComputedStyle(c,null).height;document.body.removeChild(c),n=o<parseFloat(u)}else n=e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight}catch(i){console.warn("There is an error when check element overflow state: ",i)}return n}const Rl={bottom:0,content:1,navi:100,fullScreen:1e3,modal:3e3,plugins:8e3,message:1e4,popper:99999};class lC{constructor(){this.storageLayerIndexValue={},this.copyDefaultValue()}getNextIndex(t){return Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,t)?(this.storageLayerIndexValue[t]=this.storageLayerIndexValue[t]+1,this.storageLayerIndexValue[t]):(this.storageLayerIndexValue.modal=this.storageLayerIndexValue.modal+1,this.storageLayerIndexValue.modal)}getModalNextIndex(){return this.getNextIndex("modal")}getMessageNextIndex(){return this.getNextIndex("message")}getFullScreenNextIndex(){return this.getNextIndex("fullScreen")}getNaviNextIndex(){return this.getNextIndex("navi")}getPopperIndex(){return Rl.popper}setDefaultZIndex(t){Object.keys(t||{}).forEach(n=>{Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue.__proto__,n)&&Object.assign(this.storageLayerIndexValue.__proto__,{[n]:t[n]})}),this.copyDefaultValue()}resetZIndex(t){Object.keys(t||{}).forEach(n=>{Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,n)&&Object.assign(this.storageLayerIndexValue,{[n]:t[n]})})}copyDefaultValue(){const t=Object.keys(Rl).reduce((n,i)=>Object.assign(n,{[i]:{value:Rl[i],writable:!0,configurable:!0}}),{});this.storageLayerIndexValue=Object.create(Rl,t)}}const ni=new lC;`${Na(16)}`;class oC{constructor(){this.timer=null,this.store=[],this.maskMap=new WeakMap}appendMaker(t){this.store.push(t),this.executeMaker()}pushMaskStyle(t,n){const i=this.getMaskMap(t);i!=null&&i.styles?i.styles.push(n):this.setMaskMap(t,W({styles:[n]},i||{}))}getMaskStyles(t){var n;return((n=this.getMaskMap(t))==null?void 0:n.styles)||[]}setMaskId(t,n){const i=this.getMaskMap(t);i?(Object.assign(i,{id:n}),this.setMaskMap(t,i)):this.setMaskMap(t,W({id:n},i||{}))}getMaskId(t){var n;return(n=this.getMaskMap(t))==null?void 0:n.id}setMaskMap(t,n){this.maskMap.set(t,n)}getMaskMap(t){return this.maskMap.get(t)}executeMaker(){this.timer&&cancelAnimationFrame(this.timer),this.timer=requestAnimationFrame(()=>{const t=this.store.pop();typeof t=="function"&&(Reflect.apply(t,this,[]),this.executeMaker())})}}const $a=new oC;class wg{constructor(t){this.multiInstance=!1,this.uniqueMaskAttrTag="",this.parentNode=document.body,this.activeInstance=void 0,this.zIndexStore=new Map,this.lastUUID=null,this.maskStyle={position:"fixed",left:0,top:0,bottom:0,right:0,display:"none","background-color":"rgba(0,0,0,.6)"},this.isInit=!1,this.maskAttrTag="auto";const{multiInstance:n=!1,maskAttrTag:i="auto",parentNode:s=document.body,maskStyle:o={},onClick:c=null,popInstance:u=null}=t||{};this.parentNode=s||document,this.maskAttrTag=i,this.onClick=c,this.activeInstance=void 0,this.multiInstance=n,this.popInstance=u,this.uniqueMaskAttrTag=this.getMaskAttrTag(i),$a.appendMaker(()=>{this.initInstance(o)})}setOption(t){const{parentNode:n=document.body,maskStyle:i={},onClick:s=null,maskAttrTag:o=this.maskAttrTag}=t||{};this.onClick=s,this.parentNode=n||document,this.setMaskStyle(Object.assign({},this.maskStyle,i)),this.uniqueMaskAttrTag=this.getMaskAttrTag(o)}show(t,n,i=!0,s={},o=null,c=!1){const u=o!=null?o:Na(16),f=/-?\d+/.test(`${n}`)?n:ni.getModalNextIndex();let d=Object.assign({},this.maskStyle,s||{});if(!i&&this.lastUUID){const g=this.zIndexStore.get(this.lastUUID);g&&(d=g==null?void 0:g.style)}this.storeMaskInsCfg({zIndex:f,style:W({},d),uuid:u,preUID:this.lastUUID}),Object.assign(d,{display:"block","z-index":`${f}`,"pointer-events":"all"}),this.initInstance(d),this.catchClickEvent(),this.setMaskStyle(d),$a.pushMaskStyle(this.parentNode,W({},d)),this.backupMask.style.setProperty("z-index",`${f-1}`),i||(this.mask.style.setProperty("pointer-events","none"),t==null||t.style.setProperty("pointer-events","all")),t&&(c&&t.style.setProperty("z-index",`${f+1}`),this.activeInstance=t,this.appendContentToMask(t))}hide(t=!1,n,i){var c;const s=i!=null?i:this.lastUUID;t||(n==null||n.remove(),(c=this.activeInstance)==null||c.remove()),this.removeClickEvent(),this.activeInstance=void 0,this.popIndexStore(s);const o=$a.getMaskStyles(this.parentNode);if(o==null||o.pop(),!(o!=null&&o.length))this.mask.style.setProperty("display","none");else{const u=o.slice(-1)[0];this.setMaskStyle(u)}}storeMaskInsCfg(t){return this.zIndexStore.set(t.uuid,t),this.lastUUID=t.uuid,this.zIndexStore.get(t.uuid)}popIndexStore(t){if(this.zIndexStore.has(t)){const n=this.zIndexStore.get(t);return this.lastUUID=n.preUID,this.zIndexStore.delete(t)}return this.lastUUID=null,!1}backupActiveInstance(){this.activeInstance&&this.backupMask.append(this.activeInstance)}backupContentElement(t){t&&this.backupMask.append(t)}getActiveContentInstance(){return this.activeInstance}initInstance(t){if(!this.isInit){this.isInit=!0;const{instance:n,isExist:i}=this.getMask();this.mask=n,this.backupMask=this.getBackupMask(),!i&&this.setMaskStyle(Object.assign({},this.maskStyle,t))}}getMask(){if(this.multiInstance)return{instance:this.createMask(),isExist:!1};let t=!0,n=this.parentNode.querySelector(`[data-bk-mask-uid='${this.uniqueMaskAttrTag}']`);return n||(t=!1,n=this.createMask()),{instance:n,isExist:t}}catchClickEvent(){this.mask&&this.mask.addEventListener("click",t=>this.handleMaskClick(t),!0)}removeClickEvent(){this.mask&&this.mask.removeEventListener("click",this.handleMaskClick)}handleMaskClick(t){t.target===this.mask&&typeof this.onClick=="function"&&Reflect.apply(this.onClick,this.popInstance||this,[t])}getBackupMask(){const t="data-bk-backup-uid";let n=this.parentNode.querySelector(`[${t}]`);return n||(n=this.createMask(t)),n}createMask(t="data-bk-mask-uid"){const n=document.createElement("div");return n.setAttribute(t,this.uniqueMaskAttrTag),this.parentNode.append(n),n}setMaskStyle(t={}){this.mask&&Object.entries(t).forEach(n=>this.mask.style.setProperty(n[0],n[1]))}getMaskAttrTag(t){return/^(auto|\s+)$/i.test(t)||t===null||t===void 0||t===""?($a.getMaskId(this.parentNode)||$a.setMaskId(this.parentNode,`__bk_mask_${Na(16)}`),$a.getMaskId(this.parentNode)):t}appendContentToMask(t){this.mask.append(t)}}new wg({});class Mg{constructor(t){this.popInstanceList=[],this.clickFn=void 0,this.uuidAttrName="data-bk-pop-uuid",this.bKMaskManagerInstance=new wg({parentNode:this.getParentNode(t==null?void 0:t.transfer),popInstance:this,onClick:this.onMaskClickFn})}getParentNode(t){if(typeof t=="string"){const n=document.querySelector(t);if(n)return n}return Ia(t)?t:document.body}onMaskClick(t,n){this.clickFn={fn:t,target:n}}show(t,n=!0,i={},s=!1,o=void 0){if(!t){console.warn("pop show error: content is null or undefined");return}const c=typeof o=="number"?o:ni.getModalNextIndex(),u=Na(16);t.setAttribute(this.uuidAttrName,u),this.popInstanceList.push({uuid:u,zIndex:c,content:t,showMask:n,appendStyle:i}),n&&this.bKMaskManagerInstance.backupActiveInstance(),this.bKMaskManagerInstance.show(t,c,n,i,u,s)}destroy(t,n=!1){this.clickFn=void 0,this.hide(t,n)}popHide(t=!0){if(this.popInstanceList.length){if(t){const n=this.popInstanceList.pop();this.bKMaskManagerInstance.popIndexStore(n.uuid),n.remove()}if(this.popInstanceList.length){const n=this.popInstanceList.slice(-1)[0],{zIndex:i,content:s,showMask:o,appendStyle:c,uuid:u}=n;this.bKMaskManagerInstance.show(s,i,o,c,u)}else this.bKMaskManagerInstance.hide()}}hide(t,n=!1){const i=t==null?void 0:t.getAttribute(this.uuidAttrName);if(i){const s=this.popInstanceList.findIndex(o=>o.uuid===i);s>=0&&(n||this.popInstanceList[s].content.remove(),this.popInstanceList.splice(s,1),this.bKMaskManagerInstance.popIndexStore(i),this.popInstanceList.length?this.popHide(!1):this.bKMaskManagerInstance.hide(n))}else t==null||t.remove()}onMaskClickFn(t){const{fn:n}=this.clickFn;n&&Reflect.apply(n,this,[t])}}new Mg;var ro={exports:{}},z9=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(z9){var P9=new Uint8Array(16);ro.exports=function(){return z9(P9),P9}}else{var V9=new Array(16);ro.exports=function(){for(var t=0,n;t<16;t++)(t&3)===0&&(n=Math.random()*4294967296),V9[t]=n>>>((t&3)<<3)&255;return V9}}var Ig=[];for(var Ql=0;Ql<256;++Ql)Ig[Ql]=(Ql+256).toString(16).substr(1);function cC(e,t){var n=t||0,i=Ig;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}var Ng=cC,uC=ro.exports,dC=Ng,J9,Pu,Vu=0,Ju=0;function fC(e,t,n){var i=t&&n||0,s=t||[];e=e||{};var o=e.node||J9,c=e.clockseq!==void 0?e.clockseq:Pu;if(o==null||c==null){var u=uC();o==null&&(o=J9=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]),c==null&&(c=Pu=(u[6]<<8|u[7])&16383)}var f=e.msecs!==void 0?e.msecs:new Date().getTime(),d=e.nsecs!==void 0?e.nsecs:Ju+1,g=f-Vu+(d-Ju)/1e4;if(g<0&&e.clockseq===void 0&&(c=c+1&16383),(g<0||f>Vu)&&e.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Vu=f,Ju=d,Pu=c,f+=122192928e5;var p=((f&268435455)*1e4+d)%4294967296;s[i++]=p>>>24&255,s[i++]=p>>>16&255,s[i++]=p>>>8&255,s[i++]=p&255;var v=f/4294967296*1e4&268435455;s[i++]=v>>>8&255,s[i++]=v&255,s[i++]=v>>>24&15|16,s[i++]=v>>>16&255,s[i++]=c>>>8|128,s[i++]=c&255;for(var y=0;y<6;++y)s[i+y]=o[y];return t||dC(s)}var hC=fC,gC=ro.exports,mC=Ng;function pC(e,t,n){var i=t&&n||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||gC)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t)for(var o=0;o<16;++o)t[i+o]=s[o];return t||mC(s)}var vC=pC,yC=hC,Lg=vC,Fd=Lg;Fd.v1=yC;Fd.v4=Lg;var $i=Fd,sn="top",jn="bottom",An="right",ln="left",Gd="auto",js=[sn,jn,An,ln],dr="start",bs="end",bC="clippingParents",kg="viewport",Xr="popper",CC="reference",R9=js.reduce(function(e,t){return e.concat([t+"-"+dr,t+"-"+bs])},[]),Tg=[].concat(js,[Gd]).reduce(function(e,t){return e.concat([t,t+"-"+dr,t+"-"+bs])},[]),wC="beforeRead",MC="read",IC="afterRead",NC="beforeMain",LC="main",kC="afterMain",TC="beforeWrite",xC="write",SC="afterWrite",DC=[wC,MC,IC,NC,LC,kC,TC,xC,SC];function ii(e){return e?(e.nodeName||"").toLowerCase():null}function Hn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fr(e){var t=Hn(e).Element;return e instanceof t||e instanceof Element}function Dn(e){var t=Hn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Zd(e){if(typeof ShadowRoot=="undefined")return!1;var t=Hn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jC(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},s=t.attributes[n]||{},o=t.elements[n];!Dn(o)||!ii(o)||(Object.assign(o.style,i),Object.keys(s).forEach(function(c){var u=s[c];u===!1?o.removeAttribute(c):o.setAttribute(c,u===!0?"":u)}))})}function AC(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],o=t.attributes[i]||{},c=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),u=c.reduce(function(f,d){return f[d]="",f},{});!Dn(s)||!ii(s)||(Object.assign(s.style,u),Object.keys(o).forEach(function(f){s.removeAttribute(f)}))})}}var EC={name:"applyStyles",enabled:!0,phase:"write",fn:jC,effect:AC,requires:["computeStyles"]};function ei(e){return e.split("-")[0]}var La=Math.max,so=Math.min,hr=Math.round;function gr(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),i=1,s=1;if(Dn(e)&&t){var o=e.offsetHeight,c=e.offsetWidth;c>0&&(i=hr(n.width)/c||1),o>0&&(s=hr(n.height)/o||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function Yd(e){var t=gr(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function xg(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zd(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Ni(e){return Hn(e).getComputedStyle(e)}function OC(e){return["table","td","th"].indexOf(ii(e))>=0}function Xi(e){return((fr(e)?e.ownerDocument:e.document)||window.document).documentElement}function So(e){return ii(e)==="html"?e:e.assignedSlot||e.parentNode||(Zd(e)?e.host:null)||Xi(e)}function Q9(e){return!Dn(e)||Ni(e).position==="fixed"?null:e.offsetParent}function zC(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Dn(e)){var i=Ni(e);if(i.position==="fixed")return null}var s=So(e);for(Zd(s)&&(s=s.host);Dn(s)&&["html","body"].indexOf(ii(s))<0;){var o=Ni(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function As(e){for(var t=Hn(e),n=Q9(e);n&&OC(n)&&Ni(n).position==="static";)n=Q9(n);return n&&(ii(n)==="html"||ii(n)==="body"&&Ni(n).position==="static")?t:n||zC(e)||t}function Ud(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function cs(e,t,n){return La(e,so(t,n))}function PC(e,t,n){var i=cs(e,t,n);return i>n?n:i}function Sg(){return{top:0,right:0,bottom:0,left:0}}function Dg(e){return Object.assign({},Sg(),e)}function jg(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var VC=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Dg(typeof t!="number"?t:jg(t,js))};function JC(e){var t,n=e.state,i=e.name,s=e.options,o=n.elements.arrow,c=n.modifiersData.popperOffsets,u=ei(n.placement),f=Ud(u),d=[ln,An].indexOf(u)>=0,g=d?"height":"width";if(!(!o||!c)){var p=VC(s.padding,n),v=Yd(o),y=f==="y"?sn:ln,b=f==="y"?jn:An,I=n.rects.reference[g]+n.rects.reference[f]-c[f]-n.rects.popper[g],k=c[f]-n.rects.reference[f],N=As(o),T=N?f==="y"?N.clientHeight||0:N.clientWidth||0:0,w=I/2-k/2,C=p[y],L=T-v[g]-p[b],S=T/2-v[g]/2+w,A=cs(C,S,L),j=f;n.modifiersData[i]=(t={},t[j]=A,t.centerOffset=A-S,t)}}function RC(e){var t=e.state,n=e.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||!xg(t.elements.popper,s)||(t.elements.arrow=s))}var QC={name:"arrow",enabled:!0,phase:"main",fn:JC,effect:RC,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mr(e){return e.split("-")[1]}var _C={top:"auto",right:"auto",bottom:"auto",left:"auto"};function WC(e){var t=e.x,n=e.y,i=window,s=i.devicePixelRatio||1;return{x:hr(t*s)/s||0,y:hr(n*s)/s||0}}function _9(e){var t,n=e.popper,i=e.popperRect,s=e.placement,o=e.variation,c=e.offsets,u=e.position,f=e.gpuAcceleration,d=e.adaptive,g=e.roundOffsets,p=e.isFixed,v=c.x,y=v===void 0?0:v,b=c.y,I=b===void 0?0:b,k=typeof g=="function"?g({x:y,y:I}):{x:y,y:I};y=k.x,I=k.y;var N=c.hasOwnProperty("x"),T=c.hasOwnProperty("y"),w=ln,C=sn,L=window;if(d){var S=As(n),A="clientHeight",j="clientWidth";if(S===Hn(n)&&(S=Xi(n),Ni(S).position!=="static"&&u==="absolute"&&(A="scrollHeight",j="scrollWidth")),S=S,s===sn||(s===ln||s===An)&&o===bs){C=jn;var z=p&&S===L&&L.visualViewport?L.visualViewport.height:S[A];I-=z-i.height,I*=f?1:-1}if(s===ln||(s===sn||s===jn)&&o===bs){w=An;var H=p&&S===L&&L.visualViewport?L.visualViewport.width:S[j];y-=H-i.width,y*=f?1:-1}}var O=Object.assign({position:u},d&&_C),B=g===!0?WC({x:y,y:I}):{x:y,y:I};if(y=B.x,I=B.y,f){var R;return Object.assign({},O,(R={},R[C]=T?"0":"",R[w]=N?"0":"",R.transform=(L.devicePixelRatio||1)<=1?"translate("+y+"px, "+I+"px)":"translate3d("+y+"px, "+I+"px, 0)",R))}return Object.assign({},O,(t={},t[C]=T?I+"px":"",t[w]=N?y+"px":"",t.transform="",t))}function HC(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=i===void 0?!0:i,o=n.adaptive,c=o===void 0?!0:o,u=n.roundOffsets,f=u===void 0?!0:u,d={placement:ei(t.placement),variation:mr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_9(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_9(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var BC={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:HC,data:{}},_l={passive:!0};function FC(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,o=s===void 0?!0:s,c=i.resize,u=c===void 0?!0:c,f=Hn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(g){g.addEventListener("scroll",n.update,_l)}),u&&f.addEventListener("resize",n.update,_l),function(){o&&d.forEach(function(g){g.removeEventListener("scroll",n.update,_l)}),u&&f.removeEventListener("resize",n.update,_l)}}var GC={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:FC,data:{}},ZC={left:"right",right:"left",bottom:"top",top:"bottom"};function Ul(e){return e.replace(/left|right|bottom|top/g,function(t){return ZC[t]})}var YC={start:"end",end:"start"};function W9(e){return e.replace(/start|end/g,function(t){return YC[t]})}function $d(e){var t=Hn(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Kd(e){return gr(Xi(e)).left+$d(e).scrollLeft}function UC(e){var t=Hn(e),n=Xi(e),i=t.visualViewport,s=n.clientWidth,o=n.clientHeight,c=0,u=0;return i&&(s=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(c=i.offsetLeft,u=i.offsetTop)),{width:s,height:o,x:c+Kd(e),y:u}}function $C(e){var t,n=Xi(e),i=$d(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=La(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=La(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),u=-i.scrollLeft+Kd(e),f=-i.scrollTop;return Ni(s||n).direction==="rtl"&&(u+=La(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:u,y:f}}function Xd(e){var t=Ni(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function Ag(e){return["html","body","#document"].indexOf(ii(e))>=0?e.ownerDocument.body:Dn(e)&&Xd(e)?e:Ag(So(e))}function us(e,t){var n;t===void 0&&(t=[]);var i=Ag(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Hn(i),c=s?[o].concat(o.visualViewport||[],Xd(i)?i:[]):i,u=t.concat(c);return s?u:u.concat(us(So(c)))}function td(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function KC(e){var t=gr(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function H9(e,t){return t===kg?td(UC(e)):fr(t)?KC(t):td($C(Xi(e)))}function XC(e){var t=us(So(e)),n=["absolute","fixed"].indexOf(Ni(e).position)>=0,i=n&&Dn(e)?As(e):e;return fr(i)?t.filter(function(s){return fr(s)&&xg(s,i)&&ii(s)!=="body"}):[]}function qC(e,t,n){var i=t==="clippingParents"?XC(e):[].concat(t),s=[].concat(i,[n]),o=s[0],c=s.reduce(function(u,f){var d=H9(e,f);return u.top=La(d.top,u.top),u.right=so(d.right,u.right),u.bottom=so(d.bottom,u.bottom),u.left=La(d.left,u.left),u},H9(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Eg(e){var t=e.reference,n=e.element,i=e.placement,s=i?ei(i):null,o=i?mr(i):null,c=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,f;switch(s){case sn:f={x:c,y:t.y-n.height};break;case jn:f={x:c,y:t.y+t.height};break;case An:f={x:t.x+t.width,y:u};break;case ln:f={x:t.x-n.width,y:u};break;default:f={x:t.x,y:t.y}}var d=s?Ud(s):null;if(d!=null){var g=d==="y"?"height":"width";switch(o){case dr:f[d]=f[d]-(t[g]/2-n[g]/2);break;case bs:f[d]=f[d]+(t[g]/2-n[g]/2);break}}return f}function Cs(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=i===void 0?e.placement:i,o=n.boundary,c=o===void 0?bC:o,u=n.rootBoundary,f=u===void 0?kg:u,d=n.elementContext,g=d===void 0?Xr:d,p=n.altBoundary,v=p===void 0?!1:p,y=n.padding,b=y===void 0?0:y,I=Dg(typeof b!="number"?b:jg(b,js)),k=g===Xr?CC:Xr,N=e.rects.popper,T=e.elements[v?k:g],w=qC(fr(T)?T:T.contextElement||Xi(e.elements.popper),c,f),C=gr(e.elements.reference),L=Eg({reference:C,element:N,strategy:"absolute",placement:s}),S=td(Object.assign({},N,L)),A=g===Xr?S:C,j={top:w.top-A.top+I.top,bottom:A.bottom-w.bottom+I.bottom,left:w.left-A.left+I.left,right:A.right-w.right+I.right},z=e.modifiersData.offset;if(g===Xr&&z){var H=z[s];Object.keys(j).forEach(function(O){var B=[An,jn].indexOf(O)>=0?1:-1,R=[sn,jn].indexOf(O)>=0?"y":"x";j[O]+=H[R]*B})}return j}function ew(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=n.boundary,o=n.rootBoundary,c=n.padding,u=n.flipVariations,f=n.allowedAutoPlacements,d=f===void 0?Tg:f,g=mr(i),p=g?u?R9:R9.filter(function(b){return mr(b)===g}):js,v=p.filter(function(b){return d.indexOf(b)>=0});v.length===0&&(v=p);var y=v.reduce(function(b,I){return b[I]=Cs(e,{placement:I,boundary:s,rootBoundary:o,padding:c})[ei(I)],b},{});return Object.keys(y).sort(function(b,I){return y[b]-y[I]})}function tw(e){if(ei(e)===Gd)return[];var t=Ul(e);return[W9(e),t,W9(t)]}function nw(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,c=n.altAxis,u=c===void 0?!0:c,f=n.fallbackPlacements,d=n.padding,g=n.boundary,p=n.rootBoundary,v=n.altBoundary,y=n.flipVariations,b=y===void 0?!0:y,I=n.allowedAutoPlacements,k=t.options.placement,N=ei(k),T=N===k,w=f||(T||!b?[Ul(k)]:tw(k)),C=[k].concat(w).reduce(function(ee,se){return ee.concat(ei(se)===Gd?ew(t,{placement:se,boundary:g,rootBoundary:p,padding:d,flipVariations:b,allowedAutoPlacements:I}):se)},[]),L=t.rects.reference,S=t.rects.popper,A=new Map,j=!0,z=C[0],H=0;H<C.length;H++){var O=C[H],B=ei(O),R=mr(O)===dr,$=[sn,jn].indexOf(B)>=0,ie=$?"width":"height",ge=Cs(t,{placement:O,boundary:g,rootBoundary:p,altBoundary:v,padding:d}),we=$?R?An:ln:R?jn:sn;L[ie]>S[ie]&&(we=Ul(we));var ce=Ul(we),oe=[];if(o&&oe.push(ge[B]<=0),u&&oe.push(ge[we]<=0,ge[ce]<=0),oe.every(function(ee){return ee})){z=O,j=!1;break}A.set(O,oe)}if(j)for(var q=b?3:1,U=function(se){var ue=C.find(function(Ie){var fe=A.get(Ie);if(fe)return fe.slice(0,se).every(function(F){return F})});if(ue)return z=ue,"break"},ne=q;ne>0;ne--){var X=U(ne);if(X==="break")break}t.placement!==z&&(t.modifiersData[i]._skip=!0,t.placement=z,t.reset=!0)}}var iw={name:"flip",enabled:!0,phase:"main",fn:nw,requiresIfExists:["offset"],data:{_skip:!1}};function B9(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function F9(e){return[sn,An,jn,ln].some(function(t){return e[t]>=0})}function aw(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,c=Cs(t,{elementContext:"reference"}),u=Cs(t,{altBoundary:!0}),f=B9(c,i),d=B9(u,s,o),g=F9(f),p=F9(d);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:g,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":g,"data-popper-escaped":p})}var rw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:aw};function sw(e,t,n){var i=ei(e),s=[ln,sn].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=o[0],u=o[1];return c=c||0,u=(u||0)*s,[ln,An].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}function lw(e){var t=e.state,n=e.options,i=e.name,s=n.offset,o=s===void 0?[0,0]:s,c=Tg.reduce(function(g,p){return g[p]=sw(p,t.rects,o),g},{}),u=c[t.placement],f=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=c}var ow={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lw};function cw(e){var t=e.state,n=e.name;t.modifiersData[n]=Eg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var uw={name:"popperOffsets",enabled:!0,phase:"read",fn:cw,data:{}};function dw(e){return e==="x"?"y":"x"}function fw(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,o=s===void 0?!0:s,c=n.altAxis,u=c===void 0?!1:c,f=n.boundary,d=n.rootBoundary,g=n.altBoundary,p=n.padding,v=n.tether,y=v===void 0?!0:v,b=n.tetherOffset,I=b===void 0?0:b,k=Cs(t,{boundary:f,rootBoundary:d,padding:p,altBoundary:g}),N=ei(t.placement),T=mr(t.placement),w=!T,C=Ud(N),L=dw(C),S=t.modifiersData.popperOffsets,A=t.rects.reference,j=t.rects.popper,z=typeof I=="function"?I(Object.assign({},t.rects,{placement:t.placement})):I,H=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(!!S){if(o){var R,$=C==="y"?sn:ln,ie=C==="y"?jn:An,ge=C==="y"?"height":"width",we=S[C],ce=we+k[$],oe=we-k[ie],q=y?-j[ge]/2:0,U=T===dr?A[ge]:j[ge],ne=T===dr?-j[ge]:-A[ge],X=t.elements.arrow,ee=y&&X?Yd(X):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Sg(),ue=se[$],Ie=se[ie],fe=cs(0,A[ge],ee[ge]),F=w?A[ge]/2-q-fe-ue-H.mainAxis:U-fe-ue-H.mainAxis,_=w?-A[ge]/2+q+fe+Ie+H.mainAxis:ne+fe+Ie+H.mainAxis,E=t.elements.arrow&&As(t.elements.arrow),G=E?C==="y"?E.clientTop||0:E.clientLeft||0:0,x=(R=O==null?void 0:O[C])!=null?R:0,V=we+F-x-G,J=we+_-x,le=cs(y?so(ce,V):ce,we,y?La(oe,J):oe);S[C]=le,B[C]=le-we}if(u){var ve,Ce=C==="x"?sn:ln,xe=C==="x"?jn:An,Ae=S[L],re=L==="y"?"height":"width",me=Ae+k[Ce],Le=Ae-k[xe],De=[sn,ln].indexOf(N)!==-1,Ye=(ve=O==null?void 0:O[L])!=null?ve:0,Ee=De?me:Ae-A[re]-j[re]-Ye+H.altAxis,Pe=De?Ae+A[re]+j[re]-Ye-H.altAxis:Le,He=y&&De?PC(Ee,Ae,Pe):cs(y?Ee:me,Ae,y?Pe:Le);S[L]=He,B[L]=He-Ae}t.modifiersData[i]=B}}var hw={name:"preventOverflow",enabled:!0,phase:"main",fn:fw,requiresIfExists:["offset"]};function gw(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function mw(e){return e===Hn(e)||!Dn(e)?$d(e):gw(e)}function pw(e){var t=e.getBoundingClientRect(),n=hr(t.width)/e.offsetWidth||1,i=hr(t.height)/e.offsetHeight||1;return n!==1||i!==1}function vw(e,t,n){n===void 0&&(n=!1);var i=Dn(t),s=Dn(t)&&pw(t),o=Xi(t),c=gr(e,s),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&((ii(t)!=="body"||Xd(o))&&(u=mw(t)),Dn(t)?(f=gr(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):o&&(f.x=Kd(o))),{x:c.left+u.scrollLeft-f.x,y:c.top+u.scrollTop-f.y,width:c.width,height:c.height}}function yw(e){var t=new Map,n=new Set,i=[];e.forEach(function(o){t.set(o.name,o)});function s(o){n.add(o.name);var c=[].concat(o.requires||[],o.requiresIfExists||[]);c.forEach(function(u){if(!n.has(u)){var f=t.get(u);f&&s(f)}}),i.push(o)}return e.forEach(function(o){n.has(o.name)||s(o)}),i}function bw(e){var t=yw(e);return DC.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function Cw(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ww(e){var t=e.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var G9={placement:"bottom",modifiers:[],strategy:"absolute"};function Z9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Mw(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,s=t.defaultOptions,o=s===void 0?G9:s;return function(u,f,d){d===void 0&&(d=o);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},G9,o),modifiersData:{},elements:{reference:u,popper:f},attributes:{},styles:{}},p=[],v=!1,y={state:g,setOptions:function(N){var T=typeof N=="function"?N(g.options):N;I(),g.options=Object.assign({},o,g.options,T),g.scrollParents={reference:fr(u)?us(u):u.contextElement?us(u.contextElement):[],popper:us(f)};var w=bw(ww([].concat(i,g.options.modifiers)));return g.orderedModifiers=w.filter(function(C){return C.enabled}),b(),y.update()},forceUpdate:function(){if(!v){var N=g.elements,T=N.reference,w=N.popper;if(!!Z9(T,w)){g.rects={reference:vw(T,As(w),g.options.strategy==="fixed"),popper:Yd(w)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(H){return g.modifiersData[H.name]=Object.assign({},H.data)});for(var C=0;C<g.orderedModifiers.length;C++){if(g.reset===!0){g.reset=!1,C=-1;continue}var L=g.orderedModifiers[C],S=L.fn,A=L.options,j=A===void 0?{}:A,z=L.name;typeof S=="function"&&(g=S({state:g,options:j,name:z,instance:y})||g)}}}},update:Cw(function(){return new Promise(function(k){y.forceUpdate(),k(g)})}),destroy:function(){I(),v=!0}};if(!Z9(u,f))return y;y.setOptions(d).then(function(k){!v&&d.onFirstUpdate&&d.onFirstUpdate(k)});function b(){g.orderedModifiers.forEach(function(k){var N=k.name,T=k.options,w=T===void 0?{}:T,C=k.effect;if(typeof C=="function"){var L=C({state:g,name:N,instance:y,options:w}),S=function(){};p.push(L||S)}})}function I(){p.forEach(function(k){return k()}),p=[]}return y}}var Iw=[GC,uw,BC,EC,ow,iw,hw,QC,rw],Og=Mw({defaultModifiers:Iw});class Nw{constructor(t,n,i){var s,o;this.isShow=!1,this.trigger=void 0,this.instance=void 0,this.always=!1,this.reference=void 0,this.referenceTarget=void 0,this.popperRefer=void 0,this.delay=50,this.isInnerPopper=!1,this.disabled=!1,this.afterShow=null,this.afterHidden=null,this.appendTo="parent",this.container=null,this.fixOnBoundary=!1,this.instanceOptions=this.initDefaultOptions(i),this.reference=this.resolveInputSelectorToHtmlElement(t),this.popperRefer=this.resolveInputSelectorToHtmlElement(n),this.referenceTarget=this.getTargetReferenceElement(),this.container=(s=this.popperRefer)==null?void 0:s.parentElement,this.isShow=!!((o=this.instanceOptions)!=null&&o.isShow),this.always=this.instanceOptions.always,this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.appendTo=this.instanceOptions.appendTo,this.afterHidden=typeof i.afterHidden=="function"?i.afterHidden:()=>{},this.afterShow=typeof i.afterShow=="function"?i.afterShow:()=>{},this.fixOnBoundary=this.instanceOptions.fixOnBoundary,this.initInstance(),this.registerEvents(),(this.isShow||this.always)&&this.show(null)}forceUpdate(){var t;(t=this.instance)==null||t.forceUpdate()}update(){var t;(t=this.instance)==null||t.update()}updateOptions(t){var n;this.instanceOptions=this.initDefaultOptions(t),this.isShow=!!((n=this.instanceOptions)!=null&&n.isShow),this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.setOptions(this.instanceOptions)}setOptions(t){var n;(n=this.instance)==null||n.setOptions(t)}destroy(){var t;(t=this.instance)==null||t.destroy()}updateDisabled(t){this.disabled=t!=null?t:!this.disabled,this.disabled&&this.hide()}show(t){var n;this.disabled||((n=this.popperRefer)==null||n.setAttribute("data-show",""),this.setOptions({modifiers:[...this.instanceOptions.modifiers||[],{name:"eventListeners",enabled:!0}]}),this.update(),this.isShow=!0,this.afterShow(),this.fixOnBoundary||this.appendToTarget())}hide(){var t;this.always||((t=this.popperRefer)==null||t.removeAttribute("data-show"),this.setOptions({modifiers:[...this.instanceOptions.modifiers||[],{name:"eventListeners",enabled:!1}]}),this.isShow=!1,this.isInnerPopper=!1,this.afterHidden(),this.fixOnBoundary||this.restorePopContent())}restorePopContent(){const t=this.getAppendToTarget();Ia(t)&&t.contains(this.popperRefer)&&this.container&&!this.container.contains(this.popperRefer)&&this.container.append(this.popperRefer)}appendToTarget(){const t=this.getAppendToTarget();Ia(t)&&t.contains(this.popperRefer)&&t.append(this.popperRefer)}getAppendToTarget(){const{appendTo:t}=this;let n=t;return t!=="parent"&&typeof t=="string"&&(n=document.querySelector(t)),n}initDefaultOptions(t){const i=yg({placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}],strategy:"absolute",onFirstUpdate:void 0,isShow:!1,theme:"dark",trigger:"hover",disabled:!1},t||{}),s=i.onFirstUpdate;return i.onFirstUpdate=o=>{typeof s=="function"&&(s.call(this,o),this.handleFirstUpdate())},i}handleFirstUpdate(){this.fixOnBoundary&&this.appendToTarget()}getTargetReferenceElement(){return this.isElement(this.reference)?this.reference.childElementCount===1?this.reference.firstElementChild:this.reference:this.reference}initInstance(){var t,n;this.referenceTarget&&(this.referenceTarget&&this.popperRefer?(this.instance=Og(this.referenceTarget,this.popperRefer,this.instanceOptions),(n=this.popperRefer)==null||n.setAttribute("data-theme",(t=this.instanceOptions.theme)!=null?t:"dark")):console.error("reference or popperRefer is null, please check html element."))}resolveInputSelectorToHtmlElement(t){if(this.isElement(t))return t;if(typeof t=="string")return document.querySelector(t);if(typeof t=="object"){if(Object.prototype.hasOwnProperty.call(t,"getBoundingClientRect"))return t}else console.error("'getBoundingClientRect' is needed when use virtual elements");return null}isElement(t){return Ia(t)}registerEvents(){if(this.isElement(this.referenceTarget)&&this.trigger==="hover"){const t=["mouseenter","focus"],n=["mouseleave","blur"],i=["mouseenter","mouseleave"];t.forEach(s=>{this.referenceTarget.addEventListener(s,o=>{s==="mouseenter"&&(this.isInnerPopper=!0),this.show(o)})}),n.forEach(s=>{this.referenceTarget.addEventListener(s,()=>{this.isInnerPopper=!1,setTimeout(()=>{!this.isInnerPopper&&this.hide()},this.delay)})}),this.isElement(this.popperRefer)&&i.forEach(s=>{this.popperRefer.addEventListener(s,()=>{s==="mouseenter"&&(this.isInnerPopper=!0),s==="mouseleave"&&this.hide()})})}this.trigger==="click"&&["click"].forEach(n=>{document.body.addEventListener(n,i=>{this.isSameElement(i.target,this.reference)||this.reference.contains(i.target)?this.show(i):this.isShow&&!this.isSameElement(i.target,this.popperRefer)&&!this.popperRefer.contains(i.target)&&this.hide()})})}isSameElement(t,n){return t&&(t===n||t===n.firstElementChild)}}/*!
34
34
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
35
35
  *
36
36
  * Copyright (c) 2014-2017, Jon Schlinkert.
package/dist/index.esm.js CHANGED
@@ -5811,12 +5811,13 @@ class BkMaskManager {
5811
5811
  };
5812
5812
  this.isInit = false;
5813
5813
  this.maskAttrTag = "auto";
5814
- const { multiInstance = false, maskAttrTag = "auto", parentNode = document.body, maskStyle = {}, onClick = null } = config || {};
5814
+ const { multiInstance = false, maskAttrTag = "auto", parentNode = document.body, maskStyle = {}, onClick = null, popInstance = null } = config || {};
5815
5815
  this.parentNode = parentNode || document;
5816
5816
  this.maskAttrTag = maskAttrTag;
5817
5817
  this.onClick = onClick;
5818
5818
  this.activeInstance = void 0;
5819
5819
  this.multiInstance = multiInstance;
5820
+ this.popInstance = popInstance;
5820
5821
  this.uniqueMaskAttrTag = this.getMaskAttrTag(maskAttrTag);
5821
5822
  bkMaskMaker.appendMaker(() => {
5822
5823
  this.initInstance(maskStyle);
@@ -5853,6 +5854,7 @@ class BkMaskManager {
5853
5854
  "pointer-events": "all"
5854
5855
  });
5855
5856
  this.initInstance(style2);
5857
+ this.catchClickEvent();
5856
5858
  this.setMaskStyle(style2);
5857
5859
  bkMaskMaker.pushMaskStyle(this.parentNode, __spreadValues({}, style2));
5858
5860
  this.backupMask.style.setProperty("z-index", `${localZIndex - 1}`);
@@ -5874,6 +5876,7 @@ class BkMaskManager {
5874
5876
  content == null ? void 0 : content.remove();
5875
5877
  (_a = this.activeInstance) == null ? void 0 : _a.remove();
5876
5878
  }
5879
+ this.removeClickEvent();
5877
5880
  this.activeInstance = void 0;
5878
5881
  this.popIndexStore(uid);
5879
5882
  const maskList = bkMaskMaker.getMaskStyles(this.parentNode);
@@ -5928,19 +5931,29 @@ class BkMaskManager {
5928
5931
  if (!div) {
5929
5932
  isExist = false;
5930
5933
  div = this.createMask();
5931
- div.addEventListener("click", (e) => {
5932
- if (e.target === div) {
5933
- if (typeof this.onClick === "function") {
5934
- Reflect.apply(this.onClick, this, [e]);
5935
- }
5936
- }
5937
- }, true);
5938
5934
  }
5939
5935
  return {
5940
5936
  instance: div,
5941
5937
  isExist
5942
5938
  };
5943
5939
  }
5940
+ catchClickEvent() {
5941
+ if (this.mask) {
5942
+ this.mask.addEventListener("click", (e) => this.handleMaskClick(e), true);
5943
+ }
5944
+ }
5945
+ removeClickEvent() {
5946
+ if (this.mask) {
5947
+ this.mask.removeEventListener("click", this.handleMaskClick);
5948
+ }
5949
+ }
5950
+ handleMaskClick(e) {
5951
+ if (e.target === this.mask) {
5952
+ if (typeof this.onClick === "function") {
5953
+ Reflect.apply(this.onClick, this.popInstance || this, [e]);
5954
+ }
5955
+ }
5956
+ }
5944
5957
  getBackupMask() {
5945
5958
  const attrName = "data-bk-backup-uid";
5946
5959
  let div = this.parentNode.querySelector(`[${attrName}]`);
@@ -5976,21 +5989,13 @@ class BkMaskManager {
5976
5989
  new BkMaskManager({});
5977
5990
  class BKPopIndexManager {
5978
5991
  constructor(options) {
5979
- this.getActiveClickFnIndex = (match2) => {
5980
- const filterFn = (target) => typeof match2 === "string" ? target.getAttribute(this.uuidAttrName) === match2 : target === match2;
5981
- return this.clickFn.findIndex(({ target }) => filterFn(target));
5982
- };
5983
- this.getActiveClickFn = (match2) => {
5984
- var _a;
5985
- return (_a = this.clickFn[this.getActiveClickFnIndex(match2)]) == null ? void 0 : _a.fn;
5986
- };
5987
5992
  this.popInstanceList = [];
5988
- this.clickFn = [];
5993
+ this.clickFn = void 0;
5989
5994
  this.uuidAttrName = "data-bk-pop-uuid";
5990
- this.activePopId = null;
5991
5995
  this.bKMaskManagerInstance = new BkMaskManager({
5992
5996
  parentNode: this.getParentNode(options == null ? void 0 : options.transfer),
5993
- onClick: this.onMaskClickFn.bind(this)
5997
+ popInstance: this,
5998
+ onClick: this.onMaskClickFn
5994
5999
  });
5995
6000
  }
5996
6001
  getParentNode(transfer2) {
@@ -6006,7 +6011,7 @@ class BKPopIndexManager {
6006
6011
  return document.body;
6007
6012
  }
6008
6013
  onMaskClick(callFn, target) {
6009
- this.clickFn.push({ fn: callFn, target });
6014
+ this.clickFn = { fn: callFn, target };
6010
6015
  }
6011
6016
  show(content, showMask = true, appendStyle = {}, transfer2 = false, zindex = void 0) {
6012
6017
  if (!content) {
@@ -6019,14 +6024,9 @@ class BKPopIndexManager {
6019
6024
  this.popInstanceList.push({ uuid: uuid2, zIndex, content, showMask, appendStyle });
6020
6025
  showMask && this.bKMaskManagerInstance.backupActiveInstance();
6021
6026
  this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid2, transfer2);
6022
- this.activePopId = uuid2;
6023
6027
  }
6024
6028
  destroy(content, transfer2 = false) {
6025
- var _a;
6026
- const index2 = this.getActiveClickFnIndex(content);
6027
- if (index2 >= 0) {
6028
- (_a = this.clickFn) == null ? void 0 : _a.splice(index2, 1);
6029
- }
6029
+ this.clickFn = void 0;
6030
6030
  this.hide(content, transfer2);
6031
6031
  }
6032
6032
  popHide(removeLastContent = true) {
@@ -6035,17 +6035,13 @@ class BKPopIndexManager {
6035
6035
  const lastItem = this.popInstanceList.pop();
6036
6036
  this.bKMaskManagerInstance.popIndexStore(lastItem.uuid);
6037
6037
  lastItem.remove();
6038
- this.activePopId = null;
6039
6038
  }
6040
6039
  if (this.popInstanceList.length) {
6041
6040
  const activeItem = this.popInstanceList.slice(-1)[0];
6042
6041
  const { zIndex, content, showMask, appendStyle, uuid: uuid2 } = activeItem;
6043
6042
  this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid2);
6044
- this.activePopId = uuid2;
6045
6043
  } else {
6046
6044
  this.bKMaskManagerInstance.hide();
6047
- this.activePopId = null;
6048
- this.clickFn.length = 0;
6049
6045
  }
6050
6046
  }
6051
6047
  }
@@ -6060,8 +6056,6 @@ class BKPopIndexManager {
6060
6056
  this.bKMaskManagerInstance.popIndexStore(uuid2);
6061
6057
  if (!this.popInstanceList.length) {
6062
6058
  this.bKMaskManagerInstance.hide(transfer2);
6063
- this.activePopId = null;
6064
- this.clickFn.length = 0;
6065
6059
  } else {
6066
6060
  this.popHide(false);
6067
6061
  }
@@ -6071,7 +6065,7 @@ class BKPopIndexManager {
6071
6065
  }
6072
6066
  }
6073
6067
  onMaskClickFn(e) {
6074
- const fn2 = this.getActiveClickFn(this.activePopId);
6068
+ const { fn: fn2 } = this.clickFn;
6075
6069
  if (fn2) {
6076
6070
  Reflect.apply(fn2, this, [e]);
6077
6071
  }
package/dist/index.umd.js CHANGED
@@ -30,7 +30,7 @@ function print() { __p += __j.call(arguments, '') }
30
30
  font-size: ${s["font-size"]};
31
31
  word-break: ${s["word-break"]};
32
32
  padding: ${s.padding};
33
- `,o.textContent=i.textContent,o};let n=!1;try{const i=window.getComputedStyle(e,null);if(i.webkitLineClamp!=="none"){const o=parseFloat(i.height),c=t(e,i);document.body.appendChild(c);const u=window.getComputedStyle(c,null).height;document.body.removeChild(c),n=o<parseFloat(u)}else n=e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight}catch(i){console.warn("There is an error when check element overflow state: ",i)}return n}const Zs={bottom:0,content:1,navi:100,fullScreen:1e3,modal:3e3,plugins:8e3,message:1e4,popper:99999};class qm{constructor(){this.storageLayerIndexValue={},this.copyDefaultValue()}getNextIndex(t){return Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,t)?(this.storageLayerIndexValue[t]=this.storageLayerIndexValue[t]+1,this.storageLayerIndexValue[t]):(this.storageLayerIndexValue.modal=this.storageLayerIndexValue.modal+1,this.storageLayerIndexValue.modal)}getModalNextIndex(){return this.getNextIndex("modal")}getMessageNextIndex(){return this.getNextIndex("message")}getFullScreenNextIndex(){return this.getNextIndex("fullScreen")}getNaviNextIndex(){return this.getNextIndex("navi")}getPopperIndex(){return Zs.popper}setDefaultZIndex(t){Object.keys(t||{}).forEach(n=>{Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue.__proto__,n)&&Object.assign(this.storageLayerIndexValue.__proto__,{[n]:t[n]})}),this.copyDefaultValue()}resetZIndex(t){Object.keys(t||{}).forEach(n=>{Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,n)&&Object.assign(this.storageLayerIndexValue,{[n]:t[n]})})}copyDefaultValue(){const t=Object.keys(Zs).reduce((n,i)=>Object.assign(n,{[i]:{value:Zs[i],writable:!0,configurable:!0}}),{});this.storageLayerIndexValue=Object.create(Zs,t)}}const Zn=new qm;`${sa(16)}`;class e4{constructor(){this.timer=null,this.store=[],this.maskMap=new WeakMap}appendMaker(t){this.store.push(t),this.executeMaker()}pushMaskStyle(t,n){const i=this.getMaskMap(t);i!=null&&i.styles?i.styles.push(n):this.setMaskMap(t,W({styles:[n]},i||{}))}getMaskStyles(t){var n;return((n=this.getMaskMap(t))==null?void 0:n.styles)||[]}setMaskId(t,n){const i=this.getMaskMap(t);i?(Object.assign(i,{id:n}),this.setMaskMap(t,i)):this.setMaskMap(t,W({id:n},i||{}))}getMaskId(t){var n;return(n=this.getMaskMap(t))==null?void 0:n.id}setMaskMap(t,n){this.maskMap.set(t,n)}getMaskMap(t){return this.maskMap.get(t)}executeMaker(){this.timer&&cancelAnimationFrame(this.timer),this.timer=requestAnimationFrame(()=>{const t=this.store.pop();typeof t=="function"&&(Reflect.apply(t,this,[]),this.executeMaker())})}}const Ja=new e4;class p0{constructor(t){this.multiInstance=!1,this.uniqueMaskAttrTag="",this.parentNode=document.body,this.activeInstance=void 0,this.zIndexStore=new Map,this.lastUUID=null,this.maskStyle={position:"fixed",left:0,top:0,bottom:0,right:0,display:"none","background-color":"rgba(0,0,0,.6)"},this.isInit=!1,this.maskAttrTag="auto";const{multiInstance:n=!1,maskAttrTag:i="auto",parentNode:s=document.body,maskStyle:o={},onClick:c=null}=t||{};this.parentNode=s||document,this.maskAttrTag=i,this.onClick=c,this.activeInstance=void 0,this.multiInstance=n,this.uniqueMaskAttrTag=this.getMaskAttrTag(i),Ja.appendMaker(()=>{this.initInstance(o)})}setOption(t){const{parentNode:n=document.body,maskStyle:i={},onClick:s=null,maskAttrTag:o=this.maskAttrTag}=t||{};this.onClick=s,this.parentNode=n||document,this.setMaskStyle(Object.assign({},this.maskStyle,i)),this.uniqueMaskAttrTag=this.getMaskAttrTag(o)}show(t,n,i=!0,s={},o=null,c=!1){const u=o!=null?o:sa(16),f=/-?\d+/.test(`${n}`)?n:Zn.getModalNextIndex();let d=Object.assign({},this.maskStyle,s||{});if(!i&&this.lastUUID){const g=this.zIndexStore.get(this.lastUUID);g&&(d=g==null?void 0:g.style)}this.storeMaskInsCfg({zIndex:f,style:W({},d),uuid:u,preUID:this.lastUUID}),Object.assign(d,{display:"block","z-index":`${f}`,"pointer-events":"all"}),this.initInstance(d),this.setMaskStyle(d),Ja.pushMaskStyle(this.parentNode,W({},d)),this.backupMask.style.setProperty("z-index",`${f-1}`),i||(this.mask.style.setProperty("pointer-events","none"),t==null||t.style.setProperty("pointer-events","all")),t&&(c&&t.style.setProperty("z-index",`${f+1}`),this.activeInstance=t,this.appendContentToMask(t))}hide(t=!1,n,i){var c;const s=i!=null?i:this.lastUUID;t||(n==null||n.remove(),(c=this.activeInstance)==null||c.remove()),this.activeInstance=void 0,this.popIndexStore(s);const o=Ja.getMaskStyles(this.parentNode);if(o==null||o.pop(),!(o!=null&&o.length))this.mask.style.setProperty("display","none");else{const u=o.slice(-1)[0];this.setMaskStyle(u)}}storeMaskInsCfg(t){return this.zIndexStore.set(t.uuid,t),this.lastUUID=t.uuid,this.zIndexStore.get(t.uuid)}popIndexStore(t){if(this.zIndexStore.has(t)){const n=this.zIndexStore.get(t);return this.lastUUID=n.preUID,this.zIndexStore.delete(t)}return this.lastUUID=null,!1}backupActiveInstance(){this.activeInstance&&this.backupMask.append(this.activeInstance)}backupContentElement(t){t&&this.backupMask.append(t)}getActiveContentInstance(){return this.activeInstance}initInstance(t){if(!this.isInit){this.isInit=!0;const{instance:n,isExist:i}=this.getMask();this.mask=n,this.backupMask=this.getBackupMask(),!i&&this.setMaskStyle(Object.assign({},this.maskStyle,t))}}getMask(){if(this.multiInstance)return{instance:this.createMask(),isExist:!1};let t=!0,n=this.parentNode.querySelector(`[data-bk-mask-uid='${this.uniqueMaskAttrTag}']`);return n||(t=!1,n=this.createMask(),n.addEventListener("click",i=>{i.target===n&&typeof this.onClick=="function"&&Reflect.apply(this.onClick,this,[i])},!0)),{instance:n,isExist:t}}getBackupMask(){const t="data-bk-backup-uid";let n=this.parentNode.querySelector(`[${t}]`);return n||(n=this.createMask(t)),n}createMask(t="data-bk-mask-uid"){const n=document.createElement("div");return n.setAttribute(t,this.uniqueMaskAttrTag),this.parentNode.append(n),n}setMaskStyle(t={}){this.mask&&Object.entries(t).forEach(n=>this.mask.style.setProperty(n[0],n[1]))}getMaskAttrTag(t){return/^(auto|\s+)$/i.test(t)||t===null||t===void 0||t===""?(Ja.getMaskId(this.parentNode)||Ja.setMaskId(this.parentNode,`__bk_mask_${sa(16)}`),Ja.getMaskId(this.parentNode)):t}appendContentToMask(t){this.mask.append(t)}}new p0({});class y0{constructor(t){this.getActiveClickFnIndex=n=>{const i=s=>typeof n=="string"?s.getAttribute(this.uuidAttrName)===n:s===n;return this.clickFn.findIndex(({target:s})=>i(s))},this.getActiveClickFn=n=>{var i;return(i=this.clickFn[this.getActiveClickFnIndex(n)])==null?void 0:i.fn},this.popInstanceList=[],this.clickFn=[],this.uuidAttrName="data-bk-pop-uuid",this.activePopId=null,this.bKMaskManagerInstance=new p0({parentNode:this.getParentNode(t==null?void 0:t.transfer),onClick:this.onMaskClickFn.bind(this)})}getParentNode(t){if(typeof t=="string"){const n=document.querySelector(t);if(n)return n}return ra(t)?t:document.body}onMaskClick(t,n){this.clickFn.push({fn:t,target:n})}show(t,n=!0,i={},s=!1,o=void 0){if(!t){console.warn("pop show error: content is null or undefined");return}const c=typeof o=="number"?o:Zn.getModalNextIndex(),u=sa(16);t.setAttribute(this.uuidAttrName,u),this.popInstanceList.push({uuid:u,zIndex:c,content:t,showMask:n,appendStyle:i}),n&&this.bKMaskManagerInstance.backupActiveInstance(),this.bKMaskManagerInstance.show(t,c,n,i,u,s),this.activePopId=u}destroy(t,n=!1){var s;const i=this.getActiveClickFnIndex(t);i>=0&&((s=this.clickFn)==null||s.splice(i,1)),this.hide(t,n)}popHide(t=!0){if(this.popInstanceList.length){if(t){const n=this.popInstanceList.pop();this.bKMaskManagerInstance.popIndexStore(n.uuid),n.remove(),this.activePopId=null}if(this.popInstanceList.length){const n=this.popInstanceList.slice(-1)[0],{zIndex:i,content:s,showMask:o,appendStyle:c,uuid:u}=n;this.bKMaskManagerInstance.show(s,i,o,c,u),this.activePopId=u}else this.bKMaskManagerInstance.hide(),this.activePopId=null,this.clickFn.length=0}}hide(t,n=!1){const i=t==null?void 0:t.getAttribute(this.uuidAttrName);if(i){const s=this.popInstanceList.findIndex(o=>o.uuid===i);s>=0&&(n||this.popInstanceList[s].content.remove(),this.popInstanceList.splice(s,1),this.bKMaskManagerInstance.popIndexStore(i),this.popInstanceList.length?this.popHide(!1):(this.bKMaskManagerInstance.hide(n),this.activePopId=null,this.clickFn.length=0))}else t==null||t.remove()}onMaskClickFn(t){const n=this.getActiveClickFn(this.activePopId);n&&Reflect.apply(n,this,[t])}}new y0;var Ys={exports:{}},b0=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(b0){var C0=new Uint8Array(16);Ys.exports=function(){return b0(C0),C0}}else{var v0=new Array(16);Ys.exports=function(){for(var t=0,n;t<16;t++)(t&3)===0&&(n=Math.random()*4294967296),v0[t]=n>>>((t&3)<<3)&255;return v0}}for(var w0=[],Us=0;Us<256;++Us)w0[Us]=(Us+256).toString(16).substr(1);function t4(e,t){var n=t||0,i=w0;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}var M0=t4,n4=Ys.exports,i4=M0,I0,Cc,vc=0,wc=0;function a4(e,t,n){var i=t&&n||0,s=t||[];e=e||{};var o=e.node||I0,c=e.clockseq!==void 0?e.clockseq:Cc;if(o==null||c==null){var u=n4();o==null&&(o=I0=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]),c==null&&(c=Cc=(u[6]<<8|u[7])&16383)}var f=e.msecs!==void 0?e.msecs:new Date().getTime(),d=e.nsecs!==void 0?e.nsecs:wc+1,g=f-vc+(d-wc)/1e4;if(g<0&&e.clockseq===void 0&&(c=c+1&16383),(g<0||f>vc)&&e.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");vc=f,wc=d,Cc=c,f+=122192928e5;var p=((f&268435455)*1e4+d)%4294967296;s[i++]=p>>>24&255,s[i++]=p>>>16&255,s[i++]=p>>>8&255,s[i++]=p&255;var y=f/4294967296*1e4&268435455;s[i++]=y>>>8&255,s[i++]=y&255,s[i++]=y>>>24&15|16,s[i++]=y>>>16&255,s[i++]=c>>>8|128,s[i++]=c&255;for(var b=0;b<6;++b)s[i+b]=o[b];return t||i4(s)}var r4=a4,s4=Ys.exports,l4=M0;function o4(e,t,n){var i=t&&n||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||s4)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t)for(var o=0;o<16;++o)t[i+o]=s[o];return t||l4(s)}var c4=o4,u4=r4,N0=c4,Mc=N0;Mc.v1=u4,Mc.v4=N0;var Ei=Mc,Kt="top",wn="bottom",Mn="right",Xt="left",Ic="auto",Rr=[Kt,wn,Mn,Xt],Ra="start",Qr="end",d4="clippingParents",L0="viewport",_r="popper",f4="reference",k0=Rr.reduce(function(e,t){return e.concat([t+"-"+Ra,t+"-"+Qr])},[]),T0=[].concat(Rr,[Ic]).reduce(function(e,t){return e.concat([t,t+"-"+Ra,t+"-"+Qr])},[]),h4="beforeRead",g4="read",m4="afterRead",p4="beforeMain",y4="main",b4="afterMain",C4="beforeWrite",v4="write",w4="afterWrite",M4=[h4,g4,m4,p4,y4,b4,C4,v4,w4];function Yn(e){return e?(e.nodeName||"").toLowerCase():null}function Vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qa(e){var t=Vn(e).Element;return e instanceof t||e instanceof Element}function In(e){var t=Vn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Nc(e){if(typeof ShadowRoot=="undefined")return!1;var t=Vn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function I4(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},s=t.attributes[n]||{},o=t.elements[n];!In(o)||!Yn(o)||(Object.assign(o.style,i),Object.keys(s).forEach(function(c){var u=s[c];u===!1?o.removeAttribute(c):o.setAttribute(c,u===!0?"":u)}))})}function N4(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],o=t.attributes[i]||{},c=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),u=c.reduce(function(f,d){return f[d]="",f},{});!In(s)||!Yn(s)||(Object.assign(s.style,u),Object.keys(o).forEach(function(f){s.removeAttribute(f)}))})}}var L4={name:"applyStyles",enabled:!0,phase:"write",fn:I4,effect:N4,requires:["computeStyles"]};function Un(e){return e.split("-")[0]}var la=Math.max,$s=Math.min,_a=Math.round;function Wa(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),i=1,s=1;if(In(e)&&t){var o=e.offsetHeight,c=e.offsetWidth;c>0&&(i=_a(n.width)/c||1),o>0&&(s=_a(n.height)/o||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function Lc(e){var t=Wa(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function x0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Nc(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function di(e){return Vn(e).getComputedStyle(e)}function k4(e){return["table","td","th"].indexOf(Yn(e))>=0}function Oi(e){return((Qa(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ks(e){return Yn(e)==="html"?e:e.assignedSlot||e.parentNode||(Nc(e)?e.host:null)||Oi(e)}function S0(e){return!In(e)||di(e).position==="fixed"?null:e.offsetParent}function T4(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&In(e)){var i=di(e);if(i.position==="fixed")return null}var s=Ks(e);for(Nc(s)&&(s=s.host);In(s)&&["html","body"].indexOf(Yn(s))<0;){var o=di(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function Wr(e){for(var t=Vn(e),n=S0(e);n&&k4(n)&&di(n).position==="static";)n=S0(n);return n&&(Yn(n)==="html"||Yn(n)==="body"&&di(n).position==="static")?t:n||T4(e)||t}function kc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Hr(e,t,n){return la(e,$s(t,n))}function x4(e,t,n){var i=Hr(e,t,n);return i>n?n:i}function D0(){return{top:0,right:0,bottom:0,left:0}}function j0(e){return Object.assign({},D0(),e)}function A0(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var S4=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,j0(typeof t!="number"?t:A0(t,Rr))};function D4(e){var t,n=e.state,i=e.name,s=e.options,o=n.elements.arrow,c=n.modifiersData.popperOffsets,u=Un(n.placement),f=kc(u),d=[Xt,Mn].indexOf(u)>=0,g=d?"height":"width";if(!(!o||!c)){var p=S4(s.padding,n),y=Lc(o),b=f==="y"?Kt:Xt,C=f==="y"?wn:Mn,I=n.rects.reference[g]+n.rects.reference[f]-c[f]-n.rects.popper[g],k=c[f]-n.rects.reference[f],N=Wr(o),T=N?f==="y"?N.clientHeight||0:N.clientWidth||0:0,w=I/2-k/2,v=p[b],L=T-y[g]-p[C],S=T/2-y[g]/2+w,A=Hr(v,S,L),j=f;n.modifiersData[i]=(t={},t[j]=A,t.centerOffset=A-S,t)}}function j4(e){var t=e.state,n=e.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||!x0(t.elements.popper,s)||(t.elements.arrow=s))}var A4={name:"arrow",enabled:!0,phase:"main",fn:D4,effect:j4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ha(e){return e.split("-")[1]}var E4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function O4(e){var t=e.x,n=e.y,i=window,s=i.devicePixelRatio||1;return{x:_a(t*s)/s||0,y:_a(n*s)/s||0}}function E0(e){var t,n=e.popper,i=e.popperRect,s=e.placement,o=e.variation,c=e.offsets,u=e.position,f=e.gpuAcceleration,d=e.adaptive,g=e.roundOffsets,p=e.isFixed,y=c.x,b=y===void 0?0:y,C=c.y,I=C===void 0?0:C,k=typeof g=="function"?g({x:b,y:I}):{x:b,y:I};b=k.x,I=k.y;var N=c.hasOwnProperty("x"),T=c.hasOwnProperty("y"),w=Xt,v=Kt,L=window;if(d){var S=Wr(n),A="clientHeight",j="clientWidth";if(S===Vn(n)&&(S=Oi(n),di(S).position!=="static"&&u==="absolute"&&(A="scrollHeight",j="scrollWidth")),S=S,s===Kt||(s===Xt||s===Mn)&&o===Qr){v=wn;var z=p&&S===L&&L.visualViewport?L.visualViewport.height:S[A];I-=z-i.height,I*=f?1:-1}if(s===Xt||(s===Kt||s===wn)&&o===Qr){w=Mn;var H=p&&S===L&&L.visualViewport?L.visualViewport.width:S[j];b-=H-i.width,b*=f?1:-1}}var O=Object.assign({position:u},d&&E4),B=g===!0?O4({x:b,y:I}):{x:b,y:I};if(b=B.x,I=B.y,f){var R;return Object.assign({},O,(R={},R[v]=T?"0":"",R[w]=N?"0":"",R.transform=(L.devicePixelRatio||1)<=1?"translate("+b+"px, "+I+"px)":"translate3d("+b+"px, "+I+"px, 0)",R))}return Object.assign({},O,(t={},t[v]=T?I+"px":"",t[w]=N?b+"px":"",t.transform="",t))}function z4(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=i===void 0?!0:i,o=n.adaptive,c=o===void 0?!0:o,u=n.roundOffsets,f=u===void 0?!0:u,d={placement:Un(t.placement),variation:Ha(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,E0(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,E0(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var P4={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:z4,data:{}},Xs={passive:!0};function V4(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,o=s===void 0?!0:s,c=i.resize,u=c===void 0?!0:c,f=Vn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(g){g.addEventListener("scroll",n.update,Xs)}),u&&f.addEventListener("resize",n.update,Xs),function(){o&&d.forEach(function(g){g.removeEventListener("scroll",n.update,Xs)}),u&&f.removeEventListener("resize",n.update,Xs)}}var J4={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:V4,data:{}},R4={left:"right",right:"left",bottom:"top",top:"bottom"};function qs(e){return e.replace(/left|right|bottom|top/g,function(t){return R4[t]})}var Q4={start:"end",end:"start"};function O0(e){return e.replace(/start|end/g,function(t){return Q4[t]})}function Tc(e){var t=Vn(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function xc(e){return Wa(Oi(e)).left+Tc(e).scrollLeft}function _4(e){var t=Vn(e),n=Oi(e),i=t.visualViewport,s=n.clientWidth,o=n.clientHeight,c=0,u=0;return i&&(s=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(c=i.offsetLeft,u=i.offsetTop)),{width:s,height:o,x:c+xc(e),y:u}}function W4(e){var t,n=Oi(e),i=Tc(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=la(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=la(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),u=-i.scrollLeft+xc(e),f=-i.scrollTop;return di(s||n).direction==="rtl"&&(u+=la(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:u,y:f}}function Sc(e){var t=di(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function z0(e){return["html","body","#document"].indexOf(Yn(e))>=0?e.ownerDocument.body:In(e)&&Sc(e)?e:z0(Ks(e))}function Br(e,t){var n;t===void 0&&(t=[]);var i=z0(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Vn(i),c=s?[o].concat(o.visualViewport||[],Sc(i)?i:[]):i,u=t.concat(c);return s?u:u.concat(Br(Ks(c)))}function Dc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function H4(e){var t=Wa(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function P0(e,t){return t===L0?Dc(_4(e)):Qa(t)?H4(t):Dc(W4(Oi(e)))}function B4(e){var t=Br(Ks(e)),n=["absolute","fixed"].indexOf(di(e).position)>=0,i=n&&In(e)?Wr(e):e;return Qa(i)?t.filter(function(s){return Qa(s)&&x0(s,i)&&Yn(s)!=="body"}):[]}function F4(e,t,n){var i=t==="clippingParents"?B4(e):[].concat(t),s=[].concat(i,[n]),o=s[0],c=s.reduce(function(u,f){var d=P0(e,f);return u.top=la(d.top,u.top),u.right=$s(d.right,u.right),u.bottom=$s(d.bottom,u.bottom),u.left=la(d.left,u.left),u},P0(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function V0(e){var t=e.reference,n=e.element,i=e.placement,s=i?Un(i):null,o=i?Ha(i):null,c=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,f;switch(s){case Kt:f={x:c,y:t.y-n.height};break;case wn:f={x:c,y:t.y+t.height};break;case Mn:f={x:t.x+t.width,y:u};break;case Xt:f={x:t.x-n.width,y:u};break;default:f={x:t.x,y:t.y}}var d=s?kc(s):null;if(d!=null){var g=d==="y"?"height":"width";switch(o){case Ra:f[d]=f[d]-(t[g]/2-n[g]/2);break;case Qr:f[d]=f[d]+(t[g]/2-n[g]/2);break}}return f}function Fr(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=i===void 0?e.placement:i,o=n.boundary,c=o===void 0?d4:o,u=n.rootBoundary,f=u===void 0?L0:u,d=n.elementContext,g=d===void 0?_r:d,p=n.altBoundary,y=p===void 0?!1:p,b=n.padding,C=b===void 0?0:b,I=j0(typeof C!="number"?C:A0(C,Rr)),k=g===_r?f4:_r,N=e.rects.popper,T=e.elements[y?k:g],w=F4(Qa(T)?T:T.contextElement||Oi(e.elements.popper),c,f),v=Wa(e.elements.reference),L=V0({reference:v,element:N,strategy:"absolute",placement:s}),S=Dc(Object.assign({},N,L)),A=g===_r?S:v,j={top:w.top-A.top+I.top,bottom:A.bottom-w.bottom+I.bottom,left:w.left-A.left+I.left,right:A.right-w.right+I.right},z=e.modifiersData.offset;if(g===_r&&z){var H=z[s];Object.keys(j).forEach(function(O){var B=[Mn,wn].indexOf(O)>=0?1:-1,R=[Kt,wn].indexOf(O)>=0?"y":"x";j[O]+=H[R]*B})}return j}function G4(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=n.boundary,o=n.rootBoundary,c=n.padding,u=n.flipVariations,f=n.allowedAutoPlacements,d=f===void 0?T0:f,g=Ha(i),p=g?u?k0:k0.filter(function(C){return Ha(C)===g}):Rr,y=p.filter(function(C){return d.indexOf(C)>=0});y.length===0&&(y=p);var b=y.reduce(function(C,I){return C[I]=Fr(e,{placement:I,boundary:s,rootBoundary:o,padding:c})[Un(I)],C},{});return Object.keys(b).sort(function(C,I){return b[C]-b[I]})}function Z4(e){if(Un(e)===Ic)return[];var t=qs(e);return[O0(e),t,O0(t)]}function Y4(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,c=n.altAxis,u=c===void 0?!0:c,f=n.fallbackPlacements,d=n.padding,g=n.boundary,p=n.rootBoundary,y=n.altBoundary,b=n.flipVariations,C=b===void 0?!0:b,I=n.allowedAutoPlacements,k=t.options.placement,N=Un(k),T=N===k,w=f||(T||!C?[qs(k)]:Z4(k)),v=[k].concat(w).reduce(function(ee,se){return ee.concat(Un(se)===Ic?G4(t,{placement:se,boundary:g,rootBoundary:p,padding:d,flipVariations:C,allowedAutoPlacements:I}):se)},[]),L=t.rects.reference,S=t.rects.popper,A=new Map,j=!0,z=v[0],H=0;H<v.length;H++){var O=v[H],B=Un(O),R=Ha(O)===Ra,$=[Kt,wn].indexOf(B)>=0,ie=$?"width":"height",ge=Fr(t,{placement:O,boundary:g,rootBoundary:p,altBoundary:y,padding:d}),we=$?R?Mn:Xt:R?wn:Kt;L[ie]>S[ie]&&(we=qs(we));var ce=qs(we),oe=[];if(o&&oe.push(ge[B]<=0),u&&oe.push(ge[we]<=0,ge[ce]<=0),oe.every(function(ee){return ee})){z=O,j=!1;break}A.set(O,oe)}if(j)for(var q=C?3:1,U=function(se){var ue=v.find(function(Ne){var fe=A.get(Ne);if(fe)return fe.slice(0,se).every(function(F){return F})});if(ue)return z=ue,"break"},ne=q;ne>0;ne--){var X=U(ne);if(X==="break")break}t.placement!==z&&(t.modifiersData[i]._skip=!0,t.placement=z,t.reset=!0)}}var U4={name:"flip",enabled:!0,phase:"main",fn:Y4,requiresIfExists:["offset"],data:{_skip:!1}};function J0(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function R0(e){return[Kt,Mn,wn,Xt].some(function(t){return e[t]>=0})}function $4(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,c=Fr(t,{elementContext:"reference"}),u=Fr(t,{altBoundary:!0}),f=J0(c,i),d=J0(u,s,o),g=R0(f),p=R0(d);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:g,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":g,"data-popper-escaped":p})}var K4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$4};function X4(e,t,n){var i=Un(e),s=[Xt,Kt].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=o[0],u=o[1];return c=c||0,u=(u||0)*s,[Xt,Mn].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}function q4(e){var t=e.state,n=e.options,i=e.name,s=n.offset,o=s===void 0?[0,0]:s,c=T0.reduce(function(g,p){return g[p]=X4(p,t.rects,o),g},{}),u=c[t.placement],f=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=c}var ep={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:q4};function tp(e){var t=e.state,n=e.name;t.modifiersData[n]=V0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var np={name:"popperOffsets",enabled:!0,phase:"read",fn:tp,data:{}};function ip(e){return e==="x"?"y":"x"}function ap(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,o=s===void 0?!0:s,c=n.altAxis,u=c===void 0?!1:c,f=n.boundary,d=n.rootBoundary,g=n.altBoundary,p=n.padding,y=n.tether,b=y===void 0?!0:y,C=n.tetherOffset,I=C===void 0?0:C,k=Fr(t,{boundary:f,rootBoundary:d,padding:p,altBoundary:g}),N=Un(t.placement),T=Ha(t.placement),w=!T,v=kc(N),L=ip(v),S=t.modifiersData.popperOffsets,A=t.rects.reference,j=t.rects.popper,z=typeof I=="function"?I(Object.assign({},t.rects,{placement:t.placement})):I,H=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(!!S){if(o){var R,$=v==="y"?Kt:Xt,ie=v==="y"?wn:Mn,ge=v==="y"?"height":"width",we=S[v],ce=we+k[$],oe=we-k[ie],q=b?-j[ge]/2:0,U=T===Ra?A[ge]:j[ge],ne=T===Ra?-j[ge]:-A[ge],X=t.elements.arrow,ee=b&&X?Lc(X):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:D0(),ue=se[$],Ne=se[ie],fe=Hr(0,A[ge],ee[ge]),F=w?A[ge]/2-q-fe-ue-H.mainAxis:U-fe-ue-H.mainAxis,_=w?-A[ge]/2+q+fe+Ne+H.mainAxis:ne+fe+Ne+H.mainAxis,E=t.elements.arrow&&Wr(t.elements.arrow),G=E?v==="y"?E.clientTop||0:E.clientLeft||0:0,x=(R=O==null?void 0:O[v])!=null?R:0,V=we+F-x-G,J=we+_-x,le=Hr(b?$s(ce,V):ce,we,b?la(oe,J):oe);S[v]=le,B[v]=le-we}if(u){var ye,ve=v==="x"?Kt:Xt,Se=v==="x"?wn:Mn,Ee=S[L],re=L==="y"?"height":"width",me=Ee+k[ve],ke=Ee-k[Se],je=[Kt,Xt].indexOf(N)!==-1,$e=(ye=O==null?void 0:O[L])!=null?ye:0,Oe=je?me:Ee-A[re]-j[re]-$e+H.altAxis,Ve=je?Ee+A[re]+j[re]-$e-H.altAxis:ke,Be=b&&je?x4(Oe,Ee,Ve):Hr(b?Oe:me,Ee,b?Ve:ke);S[L]=Be,B[L]=Be-Ee}t.modifiersData[i]=B}}var rp={name:"preventOverflow",enabled:!0,phase:"main",fn:ap,requiresIfExists:["offset"]};function sp(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lp(e){return e===Vn(e)||!In(e)?Tc(e):sp(e)}function op(e){var t=e.getBoundingClientRect(),n=_a(t.width)/e.offsetWidth||1,i=_a(t.height)/e.offsetHeight||1;return n!==1||i!==1}function cp(e,t,n){n===void 0&&(n=!1);var i=In(t),s=In(t)&&op(t),o=Oi(t),c=Wa(e,s),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&((Yn(t)!=="body"||Sc(o))&&(u=lp(t)),In(t)?(f=Wa(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):o&&(f.x=xc(o))),{x:c.left+u.scrollLeft-f.x,y:c.top+u.scrollTop-f.y,width:c.width,height:c.height}}function up(e){var t=new Map,n=new Set,i=[];e.forEach(function(o){t.set(o.name,o)});function s(o){n.add(o.name);var c=[].concat(o.requires||[],o.requiresIfExists||[]);c.forEach(function(u){if(!n.has(u)){var f=t.get(u);f&&s(f)}}),i.push(o)}return e.forEach(function(o){n.has(o.name)||s(o)}),i}function dp(e){var t=up(e);return M4.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function fp(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function hp(e){var t=e.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var Q0={placement:"bottom",modifiers:[],strategy:"absolute"};function _0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function gp(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,s=t.defaultOptions,o=s===void 0?Q0:s;return function(u,f,d){d===void 0&&(d=o);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},Q0,o),modifiersData:{},elements:{reference:u,popper:f},attributes:{},styles:{}},p=[],y=!1,b={state:g,setOptions:function(N){var T=typeof N=="function"?N(g.options):N;I(),g.options=Object.assign({},o,g.options,T),g.scrollParents={reference:Qa(u)?Br(u):u.contextElement?Br(u.contextElement):[],popper:Br(f)};var w=dp(hp([].concat(i,g.options.modifiers)));return g.orderedModifiers=w.filter(function(v){return v.enabled}),C(),b.update()},forceUpdate:function(){if(!y){var N=g.elements,T=N.reference,w=N.popper;if(!!_0(T,w)){g.rects={reference:cp(T,Wr(w),g.options.strategy==="fixed"),popper:Lc(w)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(H){return g.modifiersData[H.name]=Object.assign({},H.data)});for(var v=0;v<g.orderedModifiers.length;v++){if(g.reset===!0){g.reset=!1,v=-1;continue}var L=g.orderedModifiers[v],S=L.fn,A=L.options,j=A===void 0?{}:A,z=L.name;typeof S=="function"&&(g=S({state:g,options:j,name:z,instance:b})||g)}}}},update:fp(function(){return new Promise(function(k){b.forceUpdate(),k(g)})}),destroy:function(){I(),y=!0}};if(!_0(u,f))return b;b.setOptions(d).then(function(k){!y&&d.onFirstUpdate&&d.onFirstUpdate(k)});function C(){g.orderedModifiers.forEach(function(k){var N=k.name,T=k.options,w=T===void 0?{}:T,v=k.effect;if(typeof v=="function"){var L=v({state:g,name:N,instance:b,options:w}),S=function(){};p.push(L||S)}})}function I(){p.forEach(function(k){return k()}),p=[]}return b}}var mp=[J4,np,P4,L4,ep,U4,rp,A4,K4],W0=gp({defaultModifiers:mp});class pp{constructor(t,n,i){var s,o;this.isShow=!1,this.trigger=void 0,this.instance=void 0,this.always=!1,this.reference=void 0,this.referenceTarget=void 0,this.popperRefer=void 0,this.delay=50,this.isInnerPopper=!1,this.disabled=!1,this.afterShow=null,this.afterHidden=null,this.appendTo="parent",this.container=null,this.fixOnBoundary=!1,this.instanceOptions=this.initDefaultOptions(i),this.reference=this.resolveInputSelectorToHtmlElement(t),this.popperRefer=this.resolveInputSelectorToHtmlElement(n),this.referenceTarget=this.getTargetReferenceElement(),this.container=(s=this.popperRefer)==null?void 0:s.parentElement,this.isShow=!!((o=this.instanceOptions)!=null&&o.isShow),this.always=this.instanceOptions.always,this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.appendTo=this.instanceOptions.appendTo,this.afterHidden=typeof i.afterHidden=="function"?i.afterHidden:()=>{},this.afterShow=typeof i.afterShow=="function"?i.afterShow:()=>{},this.fixOnBoundary=this.instanceOptions.fixOnBoundary,this.initInstance(),this.registerEvents(),(this.isShow||this.always)&&this.show(null)}forceUpdate(){var t;(t=this.instance)==null||t.forceUpdate()}update(){var t;(t=this.instance)==null||t.update()}updateOptions(t){var n;this.instanceOptions=this.initDefaultOptions(t),this.isShow=!!((n=this.instanceOptions)!=null&&n.isShow),this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.setOptions(this.instanceOptions)}setOptions(t){var n;(n=this.instance)==null||n.setOptions(t)}destroy(){var t;(t=this.instance)==null||t.destroy()}updateDisabled(t){this.disabled=t!=null?t:!this.disabled,this.disabled&&this.hide()}show(t){var n;this.disabled||((n=this.popperRefer)==null||n.setAttribute("data-show",""),this.setOptions({modifiers:[...this.instanceOptions.modifiers||[],{name:"eventListeners",enabled:!0}]}),this.update(),this.isShow=!0,this.afterShow(),this.fixOnBoundary||this.appendToTarget())}hide(){var t;this.always||((t=this.popperRefer)==null||t.removeAttribute("data-show"),this.setOptions({modifiers:[...this.instanceOptions.modifiers||[],{name:"eventListeners",enabled:!1}]}),this.isShow=!1,this.isInnerPopper=!1,this.afterHidden(),this.fixOnBoundary||this.restorePopContent())}restorePopContent(){const t=this.getAppendToTarget();ra(t)&&t.contains(this.popperRefer)&&this.container&&!this.container.contains(this.popperRefer)&&this.container.append(this.popperRefer)}appendToTarget(){const t=this.getAppendToTarget();ra(t)&&t.contains(this.popperRefer)&&t.append(this.popperRefer)}getAppendToTarget(){const{appendTo:t}=this;let n=t;return t!=="parent"&&typeof t=="string"&&(n=document.querySelector(t)),n}initDefaultOptions(t){const i=h0({placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}],strategy:"absolute",onFirstUpdate:void 0,isShow:!1,theme:"dark",trigger:"hover",disabled:!1},t||{}),s=i.onFirstUpdate;return i.onFirstUpdate=o=>{typeof s=="function"&&(s.call(this,o),this.handleFirstUpdate())},i}handleFirstUpdate(){this.fixOnBoundary&&this.appendToTarget()}getTargetReferenceElement(){return this.isElement(this.reference)?this.reference.childElementCount===1?this.reference.firstElementChild:this.reference:this.reference}initInstance(){var t,n;this.referenceTarget&&(this.referenceTarget&&this.popperRefer?(this.instance=W0(this.referenceTarget,this.popperRefer,this.instanceOptions),(n=this.popperRefer)==null||n.setAttribute("data-theme",(t=this.instanceOptions.theme)!=null?t:"dark")):console.error("reference or popperRefer is null, please check html element."))}resolveInputSelectorToHtmlElement(t){if(this.isElement(t))return t;if(typeof t=="string")return document.querySelector(t);if(typeof t=="object"){if(Object.prototype.hasOwnProperty.call(t,"getBoundingClientRect"))return t}else console.error("'getBoundingClientRect' is needed when use virtual elements");return null}isElement(t){return ra(t)}registerEvents(){if(this.isElement(this.referenceTarget)&&this.trigger==="hover"){const t=["mouseenter","focus"],n=["mouseleave","blur"],i=["mouseenter","mouseleave"];t.forEach(s=>{this.referenceTarget.addEventListener(s,o=>{s==="mouseenter"&&(this.isInnerPopper=!0),this.show(o)})}),n.forEach(s=>{this.referenceTarget.addEventListener(s,()=>{this.isInnerPopper=!1,setTimeout(()=>{!this.isInnerPopper&&this.hide()},this.delay)})}),this.isElement(this.popperRefer)&&i.forEach(s=>{this.popperRefer.addEventListener(s,()=>{s==="mouseenter"&&(this.isInnerPopper=!0),s==="mouseleave"&&this.hide()})})}this.trigger==="click"&&["click"].forEach(n=>{document.body.addEventListener(n,i=>{this.isSameElement(i.target,this.reference)||this.reference.contains(i.target)?this.show(i):this.isShow&&!this.isSameElement(i.target,this.popperRefer)&&!this.popperRefer.contains(i.target)&&this.hide()})})}isSameElement(t,n){return t&&(t===n||t===n.firstElementChild)}}/*!
33
+ `,o.textContent=i.textContent,o};let n=!1;try{const i=window.getComputedStyle(e,null);if(i.webkitLineClamp!=="none"){const o=parseFloat(i.height),c=t(e,i);document.body.appendChild(c);const u=window.getComputedStyle(c,null).height;document.body.removeChild(c),n=o<parseFloat(u)}else n=e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight}catch(i){console.warn("There is an error when check element overflow state: ",i)}return n}const Zs={bottom:0,content:1,navi:100,fullScreen:1e3,modal:3e3,plugins:8e3,message:1e4,popper:99999};class qm{constructor(){this.storageLayerIndexValue={},this.copyDefaultValue()}getNextIndex(t){return Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,t)?(this.storageLayerIndexValue[t]=this.storageLayerIndexValue[t]+1,this.storageLayerIndexValue[t]):(this.storageLayerIndexValue.modal=this.storageLayerIndexValue.modal+1,this.storageLayerIndexValue.modal)}getModalNextIndex(){return this.getNextIndex("modal")}getMessageNextIndex(){return this.getNextIndex("message")}getFullScreenNextIndex(){return this.getNextIndex("fullScreen")}getNaviNextIndex(){return this.getNextIndex("navi")}getPopperIndex(){return Zs.popper}setDefaultZIndex(t){Object.keys(t||{}).forEach(n=>{Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue.__proto__,n)&&Object.assign(this.storageLayerIndexValue.__proto__,{[n]:t[n]})}),this.copyDefaultValue()}resetZIndex(t){Object.keys(t||{}).forEach(n=>{Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,n)&&Object.assign(this.storageLayerIndexValue,{[n]:t[n]})})}copyDefaultValue(){const t=Object.keys(Zs).reduce((n,i)=>Object.assign(n,{[i]:{value:Zs[i],writable:!0,configurable:!0}}),{});this.storageLayerIndexValue=Object.create(Zs,t)}}const Zn=new qm;`${sa(16)}`;class e4{constructor(){this.timer=null,this.store=[],this.maskMap=new WeakMap}appendMaker(t){this.store.push(t),this.executeMaker()}pushMaskStyle(t,n){const i=this.getMaskMap(t);i!=null&&i.styles?i.styles.push(n):this.setMaskMap(t,W({styles:[n]},i||{}))}getMaskStyles(t){var n;return((n=this.getMaskMap(t))==null?void 0:n.styles)||[]}setMaskId(t,n){const i=this.getMaskMap(t);i?(Object.assign(i,{id:n}),this.setMaskMap(t,i)):this.setMaskMap(t,W({id:n},i||{}))}getMaskId(t){var n;return(n=this.getMaskMap(t))==null?void 0:n.id}setMaskMap(t,n){this.maskMap.set(t,n)}getMaskMap(t){return this.maskMap.get(t)}executeMaker(){this.timer&&cancelAnimationFrame(this.timer),this.timer=requestAnimationFrame(()=>{const t=this.store.pop();typeof t=="function"&&(Reflect.apply(t,this,[]),this.executeMaker())})}}const Ja=new e4;class p0{constructor(t){this.multiInstance=!1,this.uniqueMaskAttrTag="",this.parentNode=document.body,this.activeInstance=void 0,this.zIndexStore=new Map,this.lastUUID=null,this.maskStyle={position:"fixed",left:0,top:0,bottom:0,right:0,display:"none","background-color":"rgba(0,0,0,.6)"},this.isInit=!1,this.maskAttrTag="auto";const{multiInstance:n=!1,maskAttrTag:i="auto",parentNode:s=document.body,maskStyle:o={},onClick:c=null,popInstance:u=null}=t||{};this.parentNode=s||document,this.maskAttrTag=i,this.onClick=c,this.activeInstance=void 0,this.multiInstance=n,this.popInstance=u,this.uniqueMaskAttrTag=this.getMaskAttrTag(i),Ja.appendMaker(()=>{this.initInstance(o)})}setOption(t){const{parentNode:n=document.body,maskStyle:i={},onClick:s=null,maskAttrTag:o=this.maskAttrTag}=t||{};this.onClick=s,this.parentNode=n||document,this.setMaskStyle(Object.assign({},this.maskStyle,i)),this.uniqueMaskAttrTag=this.getMaskAttrTag(o)}show(t,n,i=!0,s={},o=null,c=!1){const u=o!=null?o:sa(16),f=/-?\d+/.test(`${n}`)?n:Zn.getModalNextIndex();let d=Object.assign({},this.maskStyle,s||{});if(!i&&this.lastUUID){const g=this.zIndexStore.get(this.lastUUID);g&&(d=g==null?void 0:g.style)}this.storeMaskInsCfg({zIndex:f,style:W({},d),uuid:u,preUID:this.lastUUID}),Object.assign(d,{display:"block","z-index":`${f}`,"pointer-events":"all"}),this.initInstance(d),this.catchClickEvent(),this.setMaskStyle(d),Ja.pushMaskStyle(this.parentNode,W({},d)),this.backupMask.style.setProperty("z-index",`${f-1}`),i||(this.mask.style.setProperty("pointer-events","none"),t==null||t.style.setProperty("pointer-events","all")),t&&(c&&t.style.setProperty("z-index",`${f+1}`),this.activeInstance=t,this.appendContentToMask(t))}hide(t=!1,n,i){var c;const s=i!=null?i:this.lastUUID;t||(n==null||n.remove(),(c=this.activeInstance)==null||c.remove()),this.removeClickEvent(),this.activeInstance=void 0,this.popIndexStore(s);const o=Ja.getMaskStyles(this.parentNode);if(o==null||o.pop(),!(o!=null&&o.length))this.mask.style.setProperty("display","none");else{const u=o.slice(-1)[0];this.setMaskStyle(u)}}storeMaskInsCfg(t){return this.zIndexStore.set(t.uuid,t),this.lastUUID=t.uuid,this.zIndexStore.get(t.uuid)}popIndexStore(t){if(this.zIndexStore.has(t)){const n=this.zIndexStore.get(t);return this.lastUUID=n.preUID,this.zIndexStore.delete(t)}return this.lastUUID=null,!1}backupActiveInstance(){this.activeInstance&&this.backupMask.append(this.activeInstance)}backupContentElement(t){t&&this.backupMask.append(t)}getActiveContentInstance(){return this.activeInstance}initInstance(t){if(!this.isInit){this.isInit=!0;const{instance:n,isExist:i}=this.getMask();this.mask=n,this.backupMask=this.getBackupMask(),!i&&this.setMaskStyle(Object.assign({},this.maskStyle,t))}}getMask(){if(this.multiInstance)return{instance:this.createMask(),isExist:!1};let t=!0,n=this.parentNode.querySelector(`[data-bk-mask-uid='${this.uniqueMaskAttrTag}']`);return n||(t=!1,n=this.createMask()),{instance:n,isExist:t}}catchClickEvent(){this.mask&&this.mask.addEventListener("click",t=>this.handleMaskClick(t),!0)}removeClickEvent(){this.mask&&this.mask.removeEventListener("click",this.handleMaskClick)}handleMaskClick(t){t.target===this.mask&&typeof this.onClick=="function"&&Reflect.apply(this.onClick,this.popInstance||this,[t])}getBackupMask(){const t="data-bk-backup-uid";let n=this.parentNode.querySelector(`[${t}]`);return n||(n=this.createMask(t)),n}createMask(t="data-bk-mask-uid"){const n=document.createElement("div");return n.setAttribute(t,this.uniqueMaskAttrTag),this.parentNode.append(n),n}setMaskStyle(t={}){this.mask&&Object.entries(t).forEach(n=>this.mask.style.setProperty(n[0],n[1]))}getMaskAttrTag(t){return/^(auto|\s+)$/i.test(t)||t===null||t===void 0||t===""?(Ja.getMaskId(this.parentNode)||Ja.setMaskId(this.parentNode,`__bk_mask_${sa(16)}`),Ja.getMaskId(this.parentNode)):t}appendContentToMask(t){this.mask.append(t)}}new p0({});class y0{constructor(t){this.popInstanceList=[],this.clickFn=void 0,this.uuidAttrName="data-bk-pop-uuid",this.bKMaskManagerInstance=new p0({parentNode:this.getParentNode(t==null?void 0:t.transfer),popInstance:this,onClick:this.onMaskClickFn})}getParentNode(t){if(typeof t=="string"){const n=document.querySelector(t);if(n)return n}return ra(t)?t:document.body}onMaskClick(t,n){this.clickFn={fn:t,target:n}}show(t,n=!0,i={},s=!1,o=void 0){if(!t){console.warn("pop show error: content is null or undefined");return}const c=typeof o=="number"?o:Zn.getModalNextIndex(),u=sa(16);t.setAttribute(this.uuidAttrName,u),this.popInstanceList.push({uuid:u,zIndex:c,content:t,showMask:n,appendStyle:i}),n&&this.bKMaskManagerInstance.backupActiveInstance(),this.bKMaskManagerInstance.show(t,c,n,i,u,s)}destroy(t,n=!1){this.clickFn=void 0,this.hide(t,n)}popHide(t=!0){if(this.popInstanceList.length){if(t){const n=this.popInstanceList.pop();this.bKMaskManagerInstance.popIndexStore(n.uuid),n.remove()}if(this.popInstanceList.length){const n=this.popInstanceList.slice(-1)[0],{zIndex:i,content:s,showMask:o,appendStyle:c,uuid:u}=n;this.bKMaskManagerInstance.show(s,i,o,c,u)}else this.bKMaskManagerInstance.hide()}}hide(t,n=!1){const i=t==null?void 0:t.getAttribute(this.uuidAttrName);if(i){const s=this.popInstanceList.findIndex(o=>o.uuid===i);s>=0&&(n||this.popInstanceList[s].content.remove(),this.popInstanceList.splice(s,1),this.bKMaskManagerInstance.popIndexStore(i),this.popInstanceList.length?this.popHide(!1):this.bKMaskManagerInstance.hide(n))}else t==null||t.remove()}onMaskClickFn(t){const{fn:n}=this.clickFn;n&&Reflect.apply(n,this,[t])}}new y0;var Ys={exports:{}},b0=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(b0){var C0=new Uint8Array(16);Ys.exports=function(){return b0(C0),C0}}else{var v0=new Array(16);Ys.exports=function(){for(var t=0,n;t<16;t++)(t&3)===0&&(n=Math.random()*4294967296),v0[t]=n>>>((t&3)<<3)&255;return v0}}for(var w0=[],Us=0;Us<256;++Us)w0[Us]=(Us+256).toString(16).substr(1);function t4(e,t){var n=t||0,i=w0;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}var M0=t4,n4=Ys.exports,i4=M0,I0,Cc,vc=0,wc=0;function a4(e,t,n){var i=t&&n||0,s=t||[];e=e||{};var o=e.node||I0,c=e.clockseq!==void 0?e.clockseq:Cc;if(o==null||c==null){var u=n4();o==null&&(o=I0=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]),c==null&&(c=Cc=(u[6]<<8|u[7])&16383)}var f=e.msecs!==void 0?e.msecs:new Date().getTime(),d=e.nsecs!==void 0?e.nsecs:wc+1,g=f-vc+(d-wc)/1e4;if(g<0&&e.clockseq===void 0&&(c=c+1&16383),(g<0||f>vc)&&e.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");vc=f,wc=d,Cc=c,f+=122192928e5;var p=((f&268435455)*1e4+d)%4294967296;s[i++]=p>>>24&255,s[i++]=p>>>16&255,s[i++]=p>>>8&255,s[i++]=p&255;var y=f/4294967296*1e4&268435455;s[i++]=y>>>8&255,s[i++]=y&255,s[i++]=y>>>24&15|16,s[i++]=y>>>16&255,s[i++]=c>>>8|128,s[i++]=c&255;for(var b=0;b<6;++b)s[i+b]=o[b];return t||i4(s)}var r4=a4,s4=Ys.exports,l4=M0;function o4(e,t,n){var i=t&&n||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||s4)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t)for(var o=0;o<16;++o)t[i+o]=s[o];return t||l4(s)}var c4=o4,u4=r4,N0=c4,Mc=N0;Mc.v1=u4,Mc.v4=N0;var Ei=Mc,Kt="top",wn="bottom",Mn="right",Xt="left",Ic="auto",Rr=[Kt,wn,Mn,Xt],Ra="start",Qr="end",d4="clippingParents",L0="viewport",_r="popper",f4="reference",k0=Rr.reduce(function(e,t){return e.concat([t+"-"+Ra,t+"-"+Qr])},[]),T0=[].concat(Rr,[Ic]).reduce(function(e,t){return e.concat([t,t+"-"+Ra,t+"-"+Qr])},[]),h4="beforeRead",g4="read",m4="afterRead",p4="beforeMain",y4="main",b4="afterMain",C4="beforeWrite",v4="write",w4="afterWrite",M4=[h4,g4,m4,p4,y4,b4,C4,v4,w4];function Yn(e){return e?(e.nodeName||"").toLowerCase():null}function Vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Qa(e){var t=Vn(e).Element;return e instanceof t||e instanceof Element}function In(e){var t=Vn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Nc(e){if(typeof ShadowRoot=="undefined")return!1;var t=Vn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function I4(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},s=t.attributes[n]||{},o=t.elements[n];!In(o)||!Yn(o)||(Object.assign(o.style,i),Object.keys(s).forEach(function(c){var u=s[c];u===!1?o.removeAttribute(c):o.setAttribute(c,u===!0?"":u)}))})}function N4(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],o=t.attributes[i]||{},c=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),u=c.reduce(function(f,d){return f[d]="",f},{});!In(s)||!Yn(s)||(Object.assign(s.style,u),Object.keys(o).forEach(function(f){s.removeAttribute(f)}))})}}var L4={name:"applyStyles",enabled:!0,phase:"write",fn:I4,effect:N4,requires:["computeStyles"]};function Un(e){return e.split("-")[0]}var la=Math.max,$s=Math.min,_a=Math.round;function Wa(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),i=1,s=1;if(In(e)&&t){var o=e.offsetHeight,c=e.offsetWidth;c>0&&(i=_a(n.width)/c||1),o>0&&(s=_a(n.height)/o||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function Lc(e){var t=Wa(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function x0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Nc(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function di(e){return Vn(e).getComputedStyle(e)}function k4(e){return["table","td","th"].indexOf(Yn(e))>=0}function Oi(e){return((Qa(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ks(e){return Yn(e)==="html"?e:e.assignedSlot||e.parentNode||(Nc(e)?e.host:null)||Oi(e)}function S0(e){return!In(e)||di(e).position==="fixed"?null:e.offsetParent}function T4(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&In(e)){var i=di(e);if(i.position==="fixed")return null}var s=Ks(e);for(Nc(s)&&(s=s.host);In(s)&&["html","body"].indexOf(Yn(s))<0;){var o=di(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function Wr(e){for(var t=Vn(e),n=S0(e);n&&k4(n)&&di(n).position==="static";)n=S0(n);return n&&(Yn(n)==="html"||Yn(n)==="body"&&di(n).position==="static")?t:n||T4(e)||t}function kc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Hr(e,t,n){return la(e,$s(t,n))}function x4(e,t,n){var i=Hr(e,t,n);return i>n?n:i}function D0(){return{top:0,right:0,bottom:0,left:0}}function j0(e){return Object.assign({},D0(),e)}function A0(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var S4=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,j0(typeof t!="number"?t:A0(t,Rr))};function D4(e){var t,n=e.state,i=e.name,s=e.options,o=n.elements.arrow,c=n.modifiersData.popperOffsets,u=Un(n.placement),f=kc(u),d=[Xt,Mn].indexOf(u)>=0,g=d?"height":"width";if(!(!o||!c)){var p=S4(s.padding,n),y=Lc(o),b=f==="y"?Kt:Xt,C=f==="y"?wn:Mn,I=n.rects.reference[g]+n.rects.reference[f]-c[f]-n.rects.popper[g],k=c[f]-n.rects.reference[f],N=Wr(o),T=N?f==="y"?N.clientHeight||0:N.clientWidth||0:0,w=I/2-k/2,v=p[b],L=T-y[g]-p[C],S=T/2-y[g]/2+w,A=Hr(v,S,L),j=f;n.modifiersData[i]=(t={},t[j]=A,t.centerOffset=A-S,t)}}function j4(e){var t=e.state,n=e.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||!x0(t.elements.popper,s)||(t.elements.arrow=s))}var A4={name:"arrow",enabled:!0,phase:"main",fn:D4,effect:j4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ha(e){return e.split("-")[1]}var E4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function O4(e){var t=e.x,n=e.y,i=window,s=i.devicePixelRatio||1;return{x:_a(t*s)/s||0,y:_a(n*s)/s||0}}function E0(e){var t,n=e.popper,i=e.popperRect,s=e.placement,o=e.variation,c=e.offsets,u=e.position,f=e.gpuAcceleration,d=e.adaptive,g=e.roundOffsets,p=e.isFixed,y=c.x,b=y===void 0?0:y,C=c.y,I=C===void 0?0:C,k=typeof g=="function"?g({x:b,y:I}):{x:b,y:I};b=k.x,I=k.y;var N=c.hasOwnProperty("x"),T=c.hasOwnProperty("y"),w=Xt,v=Kt,L=window;if(d){var S=Wr(n),A="clientHeight",j="clientWidth";if(S===Vn(n)&&(S=Oi(n),di(S).position!=="static"&&u==="absolute"&&(A="scrollHeight",j="scrollWidth")),S=S,s===Kt||(s===Xt||s===Mn)&&o===Qr){v=wn;var z=p&&S===L&&L.visualViewport?L.visualViewport.height:S[A];I-=z-i.height,I*=f?1:-1}if(s===Xt||(s===Kt||s===wn)&&o===Qr){w=Mn;var H=p&&S===L&&L.visualViewport?L.visualViewport.width:S[j];b-=H-i.width,b*=f?1:-1}}var O=Object.assign({position:u},d&&E4),B=g===!0?O4({x:b,y:I}):{x:b,y:I};if(b=B.x,I=B.y,f){var R;return Object.assign({},O,(R={},R[v]=T?"0":"",R[w]=N?"0":"",R.transform=(L.devicePixelRatio||1)<=1?"translate("+b+"px, "+I+"px)":"translate3d("+b+"px, "+I+"px, 0)",R))}return Object.assign({},O,(t={},t[v]=T?I+"px":"",t[w]=N?b+"px":"",t.transform="",t))}function z4(e){var t=e.state,n=e.options,i=n.gpuAcceleration,s=i===void 0?!0:i,o=n.adaptive,c=o===void 0?!0:o,u=n.roundOffsets,f=u===void 0?!0:u,d={placement:Un(t.placement),variation:Ha(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,E0(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,E0(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var P4={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:z4,data:{}},Xs={passive:!0};function V4(e){var t=e.state,n=e.instance,i=e.options,s=i.scroll,o=s===void 0?!0:s,c=i.resize,u=c===void 0?!0:c,f=Vn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(g){g.addEventListener("scroll",n.update,Xs)}),u&&f.addEventListener("resize",n.update,Xs),function(){o&&d.forEach(function(g){g.removeEventListener("scroll",n.update,Xs)}),u&&f.removeEventListener("resize",n.update,Xs)}}var J4={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:V4,data:{}},R4={left:"right",right:"left",bottom:"top",top:"bottom"};function qs(e){return e.replace(/left|right|bottom|top/g,function(t){return R4[t]})}var Q4={start:"end",end:"start"};function O0(e){return e.replace(/start|end/g,function(t){return Q4[t]})}function Tc(e){var t=Vn(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function xc(e){return Wa(Oi(e)).left+Tc(e).scrollLeft}function _4(e){var t=Vn(e),n=Oi(e),i=t.visualViewport,s=n.clientWidth,o=n.clientHeight,c=0,u=0;return i&&(s=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(c=i.offsetLeft,u=i.offsetTop)),{width:s,height:o,x:c+xc(e),y:u}}function W4(e){var t,n=Oi(e),i=Tc(e),s=(t=e.ownerDocument)==null?void 0:t.body,o=la(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=la(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),u=-i.scrollLeft+xc(e),f=-i.scrollTop;return di(s||n).direction==="rtl"&&(u+=la(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:c,x:u,y:f}}function Sc(e){var t=di(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function z0(e){return["html","body","#document"].indexOf(Yn(e))>=0?e.ownerDocument.body:In(e)&&Sc(e)?e:z0(Ks(e))}function Br(e,t){var n;t===void 0&&(t=[]);var i=z0(e),s=i===((n=e.ownerDocument)==null?void 0:n.body),o=Vn(i),c=s?[o].concat(o.visualViewport||[],Sc(i)?i:[]):i,u=t.concat(c);return s?u:u.concat(Br(Ks(c)))}function Dc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function H4(e){var t=Wa(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function P0(e,t){return t===L0?Dc(_4(e)):Qa(t)?H4(t):Dc(W4(Oi(e)))}function B4(e){var t=Br(Ks(e)),n=["absolute","fixed"].indexOf(di(e).position)>=0,i=n&&In(e)?Wr(e):e;return Qa(i)?t.filter(function(s){return Qa(s)&&x0(s,i)&&Yn(s)!=="body"}):[]}function F4(e,t,n){var i=t==="clippingParents"?B4(e):[].concat(t),s=[].concat(i,[n]),o=s[0],c=s.reduce(function(u,f){var d=P0(e,f);return u.top=la(d.top,u.top),u.right=$s(d.right,u.right),u.bottom=$s(d.bottom,u.bottom),u.left=la(d.left,u.left),u},P0(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function V0(e){var t=e.reference,n=e.element,i=e.placement,s=i?Un(i):null,o=i?Ha(i):null,c=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,f;switch(s){case Kt:f={x:c,y:t.y-n.height};break;case wn:f={x:c,y:t.y+t.height};break;case Mn:f={x:t.x+t.width,y:u};break;case Xt:f={x:t.x-n.width,y:u};break;default:f={x:t.x,y:t.y}}var d=s?kc(s):null;if(d!=null){var g=d==="y"?"height":"width";switch(o){case Ra:f[d]=f[d]-(t[g]/2-n[g]/2);break;case Qr:f[d]=f[d]+(t[g]/2-n[g]/2);break}}return f}function Fr(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=i===void 0?e.placement:i,o=n.boundary,c=o===void 0?d4:o,u=n.rootBoundary,f=u===void 0?L0:u,d=n.elementContext,g=d===void 0?_r:d,p=n.altBoundary,y=p===void 0?!1:p,b=n.padding,C=b===void 0?0:b,I=j0(typeof C!="number"?C:A0(C,Rr)),k=g===_r?f4:_r,N=e.rects.popper,T=e.elements[y?k:g],w=F4(Qa(T)?T:T.contextElement||Oi(e.elements.popper),c,f),v=Wa(e.elements.reference),L=V0({reference:v,element:N,strategy:"absolute",placement:s}),S=Dc(Object.assign({},N,L)),A=g===_r?S:v,j={top:w.top-A.top+I.top,bottom:A.bottom-w.bottom+I.bottom,left:w.left-A.left+I.left,right:A.right-w.right+I.right},z=e.modifiersData.offset;if(g===_r&&z){var H=z[s];Object.keys(j).forEach(function(O){var B=[Mn,wn].indexOf(O)>=0?1:-1,R=[Kt,wn].indexOf(O)>=0?"y":"x";j[O]+=H[R]*B})}return j}function G4(e,t){t===void 0&&(t={});var n=t,i=n.placement,s=n.boundary,o=n.rootBoundary,c=n.padding,u=n.flipVariations,f=n.allowedAutoPlacements,d=f===void 0?T0:f,g=Ha(i),p=g?u?k0:k0.filter(function(C){return Ha(C)===g}):Rr,y=p.filter(function(C){return d.indexOf(C)>=0});y.length===0&&(y=p);var b=y.reduce(function(C,I){return C[I]=Fr(e,{placement:I,boundary:s,rootBoundary:o,padding:c})[Un(I)],C},{});return Object.keys(b).sort(function(C,I){return b[C]-b[I]})}function Z4(e){if(Un(e)===Ic)return[];var t=qs(e);return[O0(e),t,O0(t)]}function Y4(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,c=n.altAxis,u=c===void 0?!0:c,f=n.fallbackPlacements,d=n.padding,g=n.boundary,p=n.rootBoundary,y=n.altBoundary,b=n.flipVariations,C=b===void 0?!0:b,I=n.allowedAutoPlacements,k=t.options.placement,N=Un(k),T=N===k,w=f||(T||!C?[qs(k)]:Z4(k)),v=[k].concat(w).reduce(function(ee,se){return ee.concat(Un(se)===Ic?G4(t,{placement:se,boundary:g,rootBoundary:p,padding:d,flipVariations:C,allowedAutoPlacements:I}):se)},[]),L=t.rects.reference,S=t.rects.popper,A=new Map,j=!0,z=v[0],H=0;H<v.length;H++){var O=v[H],B=Un(O),R=Ha(O)===Ra,$=[Kt,wn].indexOf(B)>=0,ie=$?"width":"height",ge=Fr(t,{placement:O,boundary:g,rootBoundary:p,altBoundary:y,padding:d}),we=$?R?Mn:Xt:R?wn:Kt;L[ie]>S[ie]&&(we=qs(we));var ce=qs(we),oe=[];if(o&&oe.push(ge[B]<=0),u&&oe.push(ge[we]<=0,ge[ce]<=0),oe.every(function(ee){return ee})){z=O,j=!1;break}A.set(O,oe)}if(j)for(var q=C?3:1,U=function(se){var ue=v.find(function(Ne){var fe=A.get(Ne);if(fe)return fe.slice(0,se).every(function(F){return F})});if(ue)return z=ue,"break"},ne=q;ne>0;ne--){var X=U(ne);if(X==="break")break}t.placement!==z&&(t.modifiersData[i]._skip=!0,t.placement=z,t.reset=!0)}}var U4={name:"flip",enabled:!0,phase:"main",fn:Y4,requiresIfExists:["offset"],data:{_skip:!1}};function J0(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function R0(e){return[Kt,Mn,wn,Xt].some(function(t){return e[t]>=0})}function $4(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,c=Fr(t,{elementContext:"reference"}),u=Fr(t,{altBoundary:!0}),f=J0(c,i),d=J0(u,s,o),g=R0(f),p=R0(d);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:d,isReferenceHidden:g,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":g,"data-popper-escaped":p})}var K4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$4};function X4(e,t,n){var i=Un(e),s=[Xt,Kt].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=o[0],u=o[1];return c=c||0,u=(u||0)*s,[Xt,Mn].indexOf(i)>=0?{x:u,y:c}:{x:c,y:u}}function q4(e){var t=e.state,n=e.options,i=e.name,s=n.offset,o=s===void 0?[0,0]:s,c=T0.reduce(function(g,p){return g[p]=X4(p,t.rects,o),g},{}),u=c[t.placement],f=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=c}var ep={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:q4};function tp(e){var t=e.state,n=e.name;t.modifiersData[n]=V0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var np={name:"popperOffsets",enabled:!0,phase:"read",fn:tp,data:{}};function ip(e){return e==="x"?"y":"x"}function ap(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,o=s===void 0?!0:s,c=n.altAxis,u=c===void 0?!1:c,f=n.boundary,d=n.rootBoundary,g=n.altBoundary,p=n.padding,y=n.tether,b=y===void 0?!0:y,C=n.tetherOffset,I=C===void 0?0:C,k=Fr(t,{boundary:f,rootBoundary:d,padding:p,altBoundary:g}),N=Un(t.placement),T=Ha(t.placement),w=!T,v=kc(N),L=ip(v),S=t.modifiersData.popperOffsets,A=t.rects.reference,j=t.rects.popper,z=typeof I=="function"?I(Object.assign({},t.rects,{placement:t.placement})):I,H=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(!!S){if(o){var R,$=v==="y"?Kt:Xt,ie=v==="y"?wn:Mn,ge=v==="y"?"height":"width",we=S[v],ce=we+k[$],oe=we-k[ie],q=b?-j[ge]/2:0,U=T===Ra?A[ge]:j[ge],ne=T===Ra?-j[ge]:-A[ge],X=t.elements.arrow,ee=b&&X?Lc(X):{width:0,height:0},se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:D0(),ue=se[$],Ne=se[ie],fe=Hr(0,A[ge],ee[ge]),F=w?A[ge]/2-q-fe-ue-H.mainAxis:U-fe-ue-H.mainAxis,_=w?-A[ge]/2+q+fe+Ne+H.mainAxis:ne+fe+Ne+H.mainAxis,E=t.elements.arrow&&Wr(t.elements.arrow),G=E?v==="y"?E.clientTop||0:E.clientLeft||0:0,x=(R=O==null?void 0:O[v])!=null?R:0,V=we+F-x-G,J=we+_-x,le=Hr(b?$s(ce,V):ce,we,b?la(oe,J):oe);S[v]=le,B[v]=le-we}if(u){var ye,ve=v==="x"?Kt:Xt,Se=v==="x"?wn:Mn,Ee=S[L],re=L==="y"?"height":"width",me=Ee+k[ve],ke=Ee-k[Se],je=[Kt,Xt].indexOf(N)!==-1,$e=(ye=O==null?void 0:O[L])!=null?ye:0,Oe=je?me:Ee-A[re]-j[re]-$e+H.altAxis,Ve=je?Ee+A[re]+j[re]-$e-H.altAxis:ke,Be=b&&je?x4(Oe,Ee,Ve):Hr(b?Oe:me,Ee,b?Ve:ke);S[L]=Be,B[L]=Be-Ee}t.modifiersData[i]=B}}var rp={name:"preventOverflow",enabled:!0,phase:"main",fn:ap,requiresIfExists:["offset"]};function sp(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lp(e){return e===Vn(e)||!In(e)?Tc(e):sp(e)}function op(e){var t=e.getBoundingClientRect(),n=_a(t.width)/e.offsetWidth||1,i=_a(t.height)/e.offsetHeight||1;return n!==1||i!==1}function cp(e,t,n){n===void 0&&(n=!1);var i=In(t),s=In(t)&&op(t),o=Oi(t),c=Wa(e,s),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&((Yn(t)!=="body"||Sc(o))&&(u=lp(t)),In(t)?(f=Wa(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):o&&(f.x=xc(o))),{x:c.left+u.scrollLeft-f.x,y:c.top+u.scrollTop-f.y,width:c.width,height:c.height}}function up(e){var t=new Map,n=new Set,i=[];e.forEach(function(o){t.set(o.name,o)});function s(o){n.add(o.name);var c=[].concat(o.requires||[],o.requiresIfExists||[]);c.forEach(function(u){if(!n.has(u)){var f=t.get(u);f&&s(f)}}),i.push(o)}return e.forEach(function(o){n.has(o.name)||s(o)}),i}function dp(e){var t=up(e);return M4.reduce(function(n,i){return n.concat(t.filter(function(s){return s.phase===i}))},[])}function fp(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function hp(e){var t=e.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var Q0={placement:"bottom",modifiers:[],strategy:"absolute"};function _0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function gp(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,s=t.defaultOptions,o=s===void 0?Q0:s;return function(u,f,d){d===void 0&&(d=o);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},Q0,o),modifiersData:{},elements:{reference:u,popper:f},attributes:{},styles:{}},p=[],y=!1,b={state:g,setOptions:function(N){var T=typeof N=="function"?N(g.options):N;I(),g.options=Object.assign({},o,g.options,T),g.scrollParents={reference:Qa(u)?Br(u):u.contextElement?Br(u.contextElement):[],popper:Br(f)};var w=dp(hp([].concat(i,g.options.modifiers)));return g.orderedModifiers=w.filter(function(v){return v.enabled}),C(),b.update()},forceUpdate:function(){if(!y){var N=g.elements,T=N.reference,w=N.popper;if(!!_0(T,w)){g.rects={reference:cp(T,Wr(w),g.options.strategy==="fixed"),popper:Lc(w)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(H){return g.modifiersData[H.name]=Object.assign({},H.data)});for(var v=0;v<g.orderedModifiers.length;v++){if(g.reset===!0){g.reset=!1,v=-1;continue}var L=g.orderedModifiers[v],S=L.fn,A=L.options,j=A===void 0?{}:A,z=L.name;typeof S=="function"&&(g=S({state:g,options:j,name:z,instance:b})||g)}}}},update:fp(function(){return new Promise(function(k){b.forceUpdate(),k(g)})}),destroy:function(){I(),y=!0}};if(!_0(u,f))return b;b.setOptions(d).then(function(k){!y&&d.onFirstUpdate&&d.onFirstUpdate(k)});function C(){g.orderedModifiers.forEach(function(k){var N=k.name,T=k.options,w=T===void 0?{}:T,v=k.effect;if(typeof v=="function"){var L=v({state:g,name:N,instance:b,options:w}),S=function(){};p.push(L||S)}})}function I(){p.forEach(function(k){return k()}),p=[]}return b}}var mp=[J4,np,P4,L4,ep,U4,rp,A4,K4],W0=gp({defaultModifiers:mp});class pp{constructor(t,n,i){var s,o;this.isShow=!1,this.trigger=void 0,this.instance=void 0,this.always=!1,this.reference=void 0,this.referenceTarget=void 0,this.popperRefer=void 0,this.delay=50,this.isInnerPopper=!1,this.disabled=!1,this.afterShow=null,this.afterHidden=null,this.appendTo="parent",this.container=null,this.fixOnBoundary=!1,this.instanceOptions=this.initDefaultOptions(i),this.reference=this.resolveInputSelectorToHtmlElement(t),this.popperRefer=this.resolveInputSelectorToHtmlElement(n),this.referenceTarget=this.getTargetReferenceElement(),this.container=(s=this.popperRefer)==null?void 0:s.parentElement,this.isShow=!!((o=this.instanceOptions)!=null&&o.isShow),this.always=this.instanceOptions.always,this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.appendTo=this.instanceOptions.appendTo,this.afterHidden=typeof i.afterHidden=="function"?i.afterHidden:()=>{},this.afterShow=typeof i.afterShow=="function"?i.afterShow:()=>{},this.fixOnBoundary=this.instanceOptions.fixOnBoundary,this.initInstance(),this.registerEvents(),(this.isShow||this.always)&&this.show(null)}forceUpdate(){var t;(t=this.instance)==null||t.forceUpdate()}update(){var t;(t=this.instance)==null||t.update()}updateOptions(t){var n;this.instanceOptions=this.initDefaultOptions(t),this.isShow=!!((n=this.instanceOptions)!=null&&n.isShow),this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.setOptions(this.instanceOptions)}setOptions(t){var n;(n=this.instance)==null||n.setOptions(t)}destroy(){var t;(t=this.instance)==null||t.destroy()}updateDisabled(t){this.disabled=t!=null?t:!this.disabled,this.disabled&&this.hide()}show(t){var n;this.disabled||((n=this.popperRefer)==null||n.setAttribute("data-show",""),this.setOptions({modifiers:[...this.instanceOptions.modifiers||[],{name:"eventListeners",enabled:!0}]}),this.update(),this.isShow=!0,this.afterShow(),this.fixOnBoundary||this.appendToTarget())}hide(){var t;this.always||((t=this.popperRefer)==null||t.removeAttribute("data-show"),this.setOptions({modifiers:[...this.instanceOptions.modifiers||[],{name:"eventListeners",enabled:!1}]}),this.isShow=!1,this.isInnerPopper=!1,this.afterHidden(),this.fixOnBoundary||this.restorePopContent())}restorePopContent(){const t=this.getAppendToTarget();ra(t)&&t.contains(this.popperRefer)&&this.container&&!this.container.contains(this.popperRefer)&&this.container.append(this.popperRefer)}appendToTarget(){const t=this.getAppendToTarget();ra(t)&&t.contains(this.popperRefer)&&t.append(this.popperRefer)}getAppendToTarget(){const{appendTo:t}=this;let n=t;return t!=="parent"&&typeof t=="string"&&(n=document.querySelector(t)),n}initDefaultOptions(t){const i=h0({placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}],strategy:"absolute",onFirstUpdate:void 0,isShow:!1,theme:"dark",trigger:"hover",disabled:!1},t||{}),s=i.onFirstUpdate;return i.onFirstUpdate=o=>{typeof s=="function"&&(s.call(this,o),this.handleFirstUpdate())},i}handleFirstUpdate(){this.fixOnBoundary&&this.appendToTarget()}getTargetReferenceElement(){return this.isElement(this.reference)?this.reference.childElementCount===1?this.reference.firstElementChild:this.reference:this.reference}initInstance(){var t,n;this.referenceTarget&&(this.referenceTarget&&this.popperRefer?(this.instance=W0(this.referenceTarget,this.popperRefer,this.instanceOptions),(n=this.popperRefer)==null||n.setAttribute("data-theme",(t=this.instanceOptions.theme)!=null?t:"dark")):console.error("reference or popperRefer is null, please check html element."))}resolveInputSelectorToHtmlElement(t){if(this.isElement(t))return t;if(typeof t=="string")return document.querySelector(t);if(typeof t=="object"){if(Object.prototype.hasOwnProperty.call(t,"getBoundingClientRect"))return t}else console.error("'getBoundingClientRect' is needed when use virtual elements");return null}isElement(t){return ra(t)}registerEvents(){if(this.isElement(this.referenceTarget)&&this.trigger==="hover"){const t=["mouseenter","focus"],n=["mouseleave","blur"],i=["mouseenter","mouseleave"];t.forEach(s=>{this.referenceTarget.addEventListener(s,o=>{s==="mouseenter"&&(this.isInnerPopper=!0),this.show(o)})}),n.forEach(s=>{this.referenceTarget.addEventListener(s,()=>{this.isInnerPopper=!1,setTimeout(()=>{!this.isInnerPopper&&this.hide()},this.delay)})}),this.isElement(this.popperRefer)&&i.forEach(s=>{this.popperRefer.addEventListener(s,()=>{s==="mouseenter"&&(this.isInnerPopper=!0),s==="mouseleave"&&this.hide()})})}this.trigger==="click"&&["click"].forEach(n=>{document.body.addEventListener(n,i=>{this.isSameElement(i.target,this.reference)||this.reference.contains(i.target)?this.show(i):this.isShow&&!this.isSameElement(i.target,this.popperRefer)&&!this.popperRefer.contains(i.target)&&this.hide()})})}isSameElement(t,n){return t&&(t===n||t===n.firstElementChild)}}/*!
34
34
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
35
35
  *
36
36
  * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -278,8 +278,8 @@ declare const _default: import("vue").DefineComponent<{
278
278
  theme: "success" | "warning" | "danger" | "primary";
279
279
  zIndex: string | number;
280
280
  draggable: boolean;
281
- multiInstance: boolean;
282
281
  showMask: boolean;
282
+ multiInstance: boolean;
283
283
  renderDirective: "if" | "show";
284
284
  quickClose: boolean;
285
285
  scrollable: boolean;
@@ -14,8 +14,8 @@ declare const BkDialog: {
14
14
  theme: "success" | "warning" | "danger" | "primary";
15
15
  zIndex: string | number;
16
16
  draggable: boolean;
17
- multiInstance: boolean;
18
17
  showMask: boolean;
18
+ multiInstance: boolean;
19
19
  renderDirective: "if" | "show";
20
20
  quickClose: boolean;
21
21
  scrollable: boolean;
@@ -159,7 +159,7 @@ declare const BkDialog: {
159
159
  onClosed?: (...args: any[]) => any;
160
160
  "onUpdate:isShow"?: (...args: any[]) => any;
161
161
  "onValue-change"?: (...args: any[]) => any;
162
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "transfer" | "width" | "height" | "maxHeight" | "extCls" | "direction" | "isShow" | "theme" | "zIndex" | "draggable" | "multiInstance" | "showMask" | "renderDirective" | "quickClose" | "scrollable" | "closeIcon" | "escClose" | "fullscreen" | "animateType" | "confirmText" | "cancelText" | "prevText" | "nextText" | "current" | "totalStep" | "headerAlign" | "footerAlign" | "isLoading">;
162
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "transfer" | "width" | "height" | "maxHeight" | "extCls" | "direction" | "isShow" | "theme" | "zIndex" | "draggable" | "showMask" | "multiInstance" | "renderDirective" | "quickClose" | "scrollable" | "closeIcon" | "escClose" | "fullscreen" | "animateType" | "confirmText" | "cancelText" | "prevText" | "nextText" | "current" | "totalStep" | "headerAlign" | "footerAlign" | "isLoading">;
163
163
  $attrs: {
164
164
  [x: string]: unknown;
165
165
  };
@@ -333,8 +333,8 @@ declare const BkDialog: {
333
333
  theme: "success" | "warning" | "danger" | "primary";
334
334
  zIndex: string | number;
335
335
  draggable: boolean;
336
- multiInstance: boolean;
337
336
  showMask: boolean;
337
+ multiInstance: boolean;
338
338
  renderDirective: "if" | "show";
339
339
  quickClose: boolean;
340
340
  scrollable: boolean;
@@ -683,8 +683,8 @@ declare const BkDialog: {
683
683
  theme: "success" | "warning" | "danger" | "primary";
684
684
  zIndex: string | number;
685
685
  draggable: boolean;
686
- multiInstance: boolean;
687
686
  showMask: boolean;
687
+ multiInstance: boolean;
688
688
  renderDirective: "if" | "show";
689
689
  quickClose: boolean;
690
690
  scrollable: boolean;
@@ -18,8 +18,8 @@ declare const BkModal: {
18
18
  isShow: boolean;
19
19
  zIndex: string | number;
20
20
  draggable: boolean;
21
- multiInstance: boolean;
22
21
  showMask: boolean;
22
+ multiInstance: boolean;
23
23
  renderDirective: "if" | "show";
24
24
  quickClose: boolean;
25
25
  scrollable: boolean;
@@ -119,7 +119,7 @@ declare const BkModal: {
119
119
  "onQuick-close"?: (...args: any[]) => any;
120
120
  onQuickClose?: (...args: any[]) => any;
121
121
  onShown?: (...args: any[]) => any;
122
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "transfer" | "width" | "height" | "maxHeight" | "extCls" | "direction" | "isShow" | "zIndex" | "draggable" | "multiInstance" | "showMask" | "renderDirective" | "quickClose" | "scrollable" | "closeIcon" | "escClose" | "fullscreen" | "animateType">;
122
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "transfer" | "width" | "height" | "maxHeight" | "extCls" | "direction" | "isShow" | "zIndex" | "draggable" | "showMask" | "multiInstance" | "renderDirective" | "quickClose" | "scrollable" | "closeIcon" | "escClose" | "fullscreen" | "animateType">;
123
123
  $attrs: {
124
124
  [x: string]: unknown;
125
125
  };
@@ -247,8 +247,8 @@ declare const BkModal: {
247
247
  isShow: boolean;
248
248
  zIndex: string | number;
249
249
  draggable: boolean;
250
- multiInstance: boolean;
251
250
  showMask: boolean;
251
+ multiInstance: boolean;
252
252
  renderDirective: "if" | "show";
253
253
  quickClose: boolean;
254
254
  scrollable: boolean;
@@ -504,8 +504,8 @@ declare const BkModal: {
504
504
  isShow: boolean;
505
505
  zIndex: string | number;
506
506
  draggable: boolean;
507
- multiInstance: boolean;
508
507
  showMask: boolean;
508
+ multiInstance: boolean;
509
509
  renderDirective: "if" | "show";
510
510
  quickClose: boolean;
511
511
  scrollable: boolean;
@@ -199,8 +199,8 @@ declare const _default: import("vue").DefineComponent<{
199
199
  isShow: boolean;
200
200
  zIndex: string | number;
201
201
  draggable: boolean;
202
- multiInstance: boolean;
203
202
  showMask: boolean;
203
+ multiInstance: boolean;
204
204
  renderDirective: "if" | "show";
205
205
  quickClose: boolean;
206
206
  scrollable: boolean;
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("lodash"),require("@popperjs/core"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["vue","lodash","@popperjs/core","vue-types"],t);else{var n="object"==typeof exports?t(require("vue"),require("lodash"),require("@popperjs/core"),require("vue-types")):t(e.vue,e.lodash,e["@popperjs/core"],e["vue-types"]);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,((e,t,n,i)=>(()=>{var r={8022:(e,t,n)=>{var i=n(4481),r=n(6426),o=r;o.v1=i,o.v4=r,e.exports=o},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var i=n||0,r=t;return[r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},4481:(e,t,n)=>{var i,r,o=n(9157),s=n(8725),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],p=(e=e||{}).node||i,d=void 0!==e.clockseq?e.clockseq:r;if(null==p||null==d){var f=o();null==p&&(p=i=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==d&&(d=r=16383&(f[6]<<8|f[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=h-a+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=h,u=v,r=d;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;l[c++]=g>>>24&255,l[c++]=g>>>16&255,l[c++]=g>>>8&255,l[c++]=255&g;var m=h/4294967296*1e4&268435455;l[c++]=m>>>8&255,l[c++]=255&m,l[c++]=m>>>24&15|16,l[c++]=m>>>16&255,l[c++]=d>>>8|128,l[c++]=255&d;for(var k=0;k<6;++k)l[c+k]=p[k];return t||s(l)}},6426:(e,t,n)=>{var i=n(9157),r=n(8725);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||r(s)}},5798:e=>{"use strict";e.exports=n},467:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:e=>{"use strict";e.exports=i}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";s.r(a),s.d(a,{AlignEnum:()=>ce,BKLAYERD_INDEX_EFAULT_VALUE:()=>H,BKLAYERTYPE:()=>R,BKPopIndexManager:()=>K,BKPopover:()=>X,BkMaskManager:()=>q,DialogTypeEnum:()=>he,DirectionEnum:()=>ve,EMPTY_OBJ:()=>Pe,InputBehaviorEnum:()=>me,InputBehaviorType:()=>je,LineStyleEnum:()=>ye,PlacementEnum:()=>pe,Placements:()=>ae,PropTypes:()=>Ne,RenderDirectiveEnum:()=>ue,RenderType:()=>fe,SizeEnum:()=>se,TagThemeEnum:()=>ge,TagThemeType:()=>Ae,ThemeEnum:()=>le,TriggerEnum:()=>de,alignType:()=>Oe,arrayEqual:()=>Ve,bKMaskManager:()=>z,bkPopIndexManager:()=>W,bkZIndexManager:()=>B,capitalize:()=>U,checkOverflow:()=>F,classes:()=>Re,clone:()=>h,debounce:()=>He,dialogTypeUnion:()=>Ee,directionType:()=>xe,elementsEqual:()=>f,filterProperty:()=>Be,finiteOrDefault:()=>p,formItemKey:()=>S,formKey:()=>M,getPopContainerId:()=>ee,hasOverflowEllipsis:()=>I,isArray:()=>u,isElement:()=>b,isEmpty:()=>o,isEmptyObj:()=>De,isFinite:()=>l,isNullOrUndef:()=>r,isObject:()=>c,lineStyleType:()=>we,maybeShowTooltip:()=>O,merge:()=>g,mergeIf:()=>m,mergerFn:()=>y,mergerIfFn:()=>k,noop:()=>Le,observerResize:()=>D,off:()=>t,on:()=>e,placementType:()=>Te,random:()=>C,renderDirectiveType:()=>Ie,renderEmptyVNode:()=>Ce,renderType:()=>Se,resolveClassName:()=>_e,scrollTop:()=>n,scrollbarWidth:()=>te,stringEnum:()=>be,triggerType:()=>Me,useForm:()=>E,useFormItem:()=>x,valueOrDefault:()=>d,withInstall:()=>Ue,withInstallProps:()=>Fe});var e=document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!0)}:function(e,t,n){e&&t&&n&&e.attachEvent("on".concat(t),n)},t=document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!0)}:function(e,t,n){e&&t&&e.detachEvent("on".concat(t),n)};function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,r=arguments.length>4?arguments[4]:void 0,o=Math.abs(t-n),s=Math.ceil(o/i*50);function a(t,n,i){if(t!==n){var o=t+i>n?n:t+i;t>n&&(o=t-i<n?n:t-i),e===window?window.scrollTo(o,o):e.scrollTop=o,window.requestAnimationFrame((function(){return a(o,n,i)}))}else null==r||r()}a(t,n,s)}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function r(e){return null==e}function o(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return""===e||!!t&&r(e)}function u(e){if(Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)}function c(e){return null!==e&&/^\[object (Object|Module)\]/.test(Object.prototype.toString.call(e))}var l=function(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)};function p(e,t){return l(e)?e:t}function d(e,t){return void 0===e?t:e}function f(e,t){var n,i,r,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],o=t[n],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function h(e){if(u(e))return e.map(h);if(c(e)){for(var t=Object.create(null),n=Object.keys(e),i=n.length,r=0;r<i;++r)t[n[r]]=h(e[n[r]]);return t}return e}function v(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function y(e,t,n,i){if(v(e)){var r=t[e],o=n[e];c(r)&&c(o)?g(r,o,i):t[e]=h(o)}}function g(e,t,n){var i=u(t)?t:[t],r=i.length;if(!c(e))return e;for(var o=(n=n||{}).merger||y,s=0;s<r;++s)if(c(t=i[s]))for(var a=Object.keys(t),l=0,p=a.length;l<p;++l)o(a[l],e,t,n);return e}function m(e,t){return g(e,t,{merger:k})}function k(e,t,n){if(v(e)){var i=t[e],r=n[e];c(i)&&c(r)?m(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=h(r))}}function b(e){try{return e instanceof HTMLElement}catch(t){return"object"===i(e)&&1===e.nodeType&&"object"===i(e.style)&&"object"===i(e.ownerDocument)}}function I(e){return e.offsetWidth<e.scrollWidth||e.offsetHeight<e.scrollHeight}function O(e,t){I(e)?e.setAttribute("title",t):e.removeAttribute("title")}var T=s(748),M=Symbol("form"),S=Symbol("formItem"),E=function(){return(0,T.inject)(M)},x=function(){return(0,T.inject)(S,void 0)};function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function j(e,t,n){return t&&A(e.prototype,t),n&&A(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var N,R,P=s(467),L="abcdefghijklmnopqrstuvwxyz0123456789",C=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L,n="",i=0;i<e;i++)n+=t[parseInt((Math.random()*t.length).toString(),10)];return n},D=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=(0,P.throttle)((function(){"function"==typeof t&&t()}),n),o=new ResizeObserver((function(){r()}));return i&&"function"==typeof t&&t(),{start:function(){o.observe(e)},stop:function(){o.disconnect(),o.unobserve(e)}}},U=function(e){return e[0].toUpperCase()+e.slice(1)};function F(e){if(!e)return!1;var t=!1;try{var n=window.getComputedStyle(e,null);if("none"!==n.webkitLineClamp){var i=parseFloat(n.height),r=function(e,t){var n=document.createElement("div"),i=parseFloat(t.width)?"".concat(Math.ceil(parseFloat(t.width)),"px"):t.width;return n.style.cssText="\n width: ".concat(i,";\n line-height: ").concat(t["line-height"],";\n font-size: ").concat(t["font-size"],";\n word-break: ").concat(t["word-break"],";\n padding: ").concat(t.padding,";\n "),n.textContent=e.textContent,n}(e,n);document.body.appendChild(r);var o=window.getComputedStyle(r,null).height;document.body.removeChild(r),t=i<parseFloat(o)}else t=e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight}catch(e){console.warn("There is an error when check element overflow state: ",e)}return t}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.BOTTOM="bottom",e.CONTENT="content",e.NAVI="navi",e.FULLSCREEN="fullScreen",e.PLUGINS="plugins",e.MODAL="modal",e.MESSAGE="message",e.POPPER="popper"}(R||(R={}));var H=(_(N={},R.BOTTOM,0),_(N,R.CONTENT,1),_(N,R.NAVI,100),_(N,R.FULLSCREEN,1e3),_(N,R.MODAL,3e3),_(N,R.PLUGINS,8e3),_(N,R.MESSAGE,1e4),_(N,R.POPPER,99999),N),B=new(function(){function e(){w(this,e),this.storageLayerIndexValue={},this.copyDefaultValue()}return j(e,[{key:"getNextIndex",value:function(e){return Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,e)?(this.storageLayerIndexValue[e]=this.storageLayerIndexValue[e]+1,this.storageLayerIndexValue[e]):(this.storageLayerIndexValue[R.MODAL]=this.storageLayerIndexValue[R.MODAL]+1,this.storageLayerIndexValue[R.MODAL])}},{key:"getModalNextIndex",value:function(){return this.getNextIndex(R.MODAL)}},{key:"getMessageNextIndex",value:function(){return this.getNextIndex(R.MESSAGE)}},{key:"getFullScreenNextIndex",value:function(){return this.getNextIndex(R.FULLSCREEN)}},{key:"getNaviNextIndex",value:function(){return this.getNextIndex(R.NAVI)}},{key:"getPopperIndex",value:function(){return H.popper}},{key:"setDefaultZIndex",value:function(e){var t=this;Object.keys(e||{}).forEach((function(n){Object.prototype.hasOwnProperty.call(t.storageLayerIndexValue.__proto__,n)&&Object.assign(t.storageLayerIndexValue.__proto__,_({},n,e[n]))})),this.copyDefaultValue()}},{key:"resetZIndex",value:function(e){var t=this;Object.keys(e||{}).forEach((function(n){Object.prototype.hasOwnProperty.call(t.storageLayerIndexValue,n)&&Object.assign(t.storageLayerIndexValue,_({},n,e[n]))}))}},{key:"copyDefaultValue",value:function(){var e=Object.keys(H).reduce((function(e,t){return Object.assign(e,_({},t,{value:H[t],writable:!0,configurable:!0}))}),{});this.storageLayerIndexValue=Object.create(H,e)}}]),e}());"__bk_mask_".concat(C(16));var V=new(function(){function e(){w(this,e),this.timer=null,this.store=[],this.maskMap=new WeakMap}return j(e,[{key:"appendMaker",value:function(e){this.store.push(e),this.executeMaker()}},{key:"pushMaskStyle",value:function(e,t){var n=this.getMaskMap(e);(null==n?void 0:n.styles)?n.styles.push(t):this.setMaskMap(e,Object.assign({styles:[t]},n||{}))}},{key:"getMaskStyles",value:function(e){var t;return(null===(t=this.getMaskMap(e))||void 0===t?void 0:t.styles)||[]}},{key:"setMaskId",value:function(e,t){var n=this.getMaskMap(e);n?(Object.assign(n,{id:t}),this.setMaskMap(e,n)):this.setMaskMap(e,Object.assign({id:t},n||{}))}},{key:"getMaskId",value:function(e){var t;return null===(t=this.getMaskMap(e))||void 0===t?void 0:t.id}},{key:"setMaskMap",value:function(e,t){this.maskMap.set(e,t)}},{key:"getMaskMap",value:function(e){return this.maskMap.get(e)}},{key:"executeMaker",value:function(){var e=this;this.timer&&cancelAnimationFrame(this.timer),this.timer=requestAnimationFrame((function(){var t=e.store.pop();"function"==typeof t&&(Reflect.apply(t,e,[]),e.executeMaker())}))}}]),e}()),q=function(){function e(t){var n=this;w(this,e),this.multiInstance=!1,this.uniqueMaskAttrTag="",this.parentNode=document.body,this.activeInstance=void 0,this.zIndexStore=new Map,this.lastUUID=null,this.maskStyle={position:"fixed",left:0,top:0,bottom:0,right:0,display:"none","background-color":"rgba(0,0,0,.6)"},this.isInit=!1,this.maskAttrTag="auto";var i=t||{},r=i.multiInstance,o=void 0!==r&&r,s=i.maskAttrTag,a=void 0===s?"auto":s,u=i.parentNode,c=void 0===u?document.body:u,l=i.maskStyle,p=void 0===l?{}:l,d=i.onClick,f=void 0===d?null:d;this.parentNode=c||document,this.maskAttrTag=a,this.onClick=f,this.activeInstance=void 0,this.multiInstance=o,this.uniqueMaskAttrTag=this.getMaskAttrTag(a),V.appendMaker((function(){n.initInstance(p)}))}return j(e,[{key:"setOption",value:function(e){var t=e||{},n=t.parentNode,i=void 0===n?document.body:n,r=t.maskStyle,o=void 0===r?{}:r,s=t.onClick,a=void 0===s?null:s,u=t.maskAttrTag,c=void 0===u?this.maskAttrTag:u;this.onClick=a,this.parentNode=i||document,this.setMaskStyle(Object.assign({},this.maskStyle,o)),this.uniqueMaskAttrTag=this.getMaskAttrTag(c)}},{key:"show",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=null!=r?r:C(16),a=/-?\d+/.test("".concat(t))?t:B.getModalNextIndex(),u=Object.assign({},this.maskStyle,i||{});if(!n&&this.lastUUID){var c=this.zIndexStore.get(this.lastUUID);c&&(u=null==c?void 0:c.style)}this.storeMaskInsCfg({zIndex:a,style:Object.assign({},u),uuid:s,preUID:this.lastUUID}),Object.assign(u,{display:"block","z-index":"".concat(a),"pointer-events":"all"}),this.initInstance(u),this.setMaskStyle(u),V.pushMaskStyle(this.parentNode,Object.assign({},u)),this.backupMask.style.setProperty("z-index","".concat(a-1)),n||(this.mask.style.setProperty("pointer-events","none"),null==e||e.style.setProperty("pointer-events","all")),e&&(o&&e.style.setProperty("z-index","".concat(a+1)),this.activeInstance=e,this.appendContentToMask(e))}},{key:"hide",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=null!=i?i:this.lastUUID;t||(null==n||n.remove(),null===(e=this.activeInstance)||void 0===e||e.remove()),this.activeInstance=void 0,this.popIndexStore(r);var o=V.getMaskStyles(this.parentNode);if(null==o||o.pop(),null==o?void 0:o.length){var s=o.slice(-1)[0];this.setMaskStyle(s)}else this.mask.style.setProperty("display","none")}},{key:"storeMaskInsCfg",value:function(e){return this.zIndexStore.set(e.uuid,e),this.lastUUID=e.uuid,this.zIndexStore.get(e.uuid)}},{key:"popIndexStore",value:function(e){if(this.zIndexStore.has(e)){var t=this.zIndexStore.get(e);return this.lastUUID=t.preUID,this.zIndexStore.delete(e)}return this.lastUUID=null,!1}},{key:"backupActiveInstance",value:function(){this.activeInstance&&this.backupMask.append(this.activeInstance)}},{key:"backupContentElement",value:function(e){e&&this.backupMask.append(e)}},{key:"getActiveContentInstance",value:function(){return this.activeInstance}},{key:"initInstance",value:function(e){if(!this.isInit){this.isInit=!0;var t=this.getMask(),n=t.instance,i=t.isExist;this.mask=n,this.backupMask=this.getBackupMask(),!i&&this.setMaskStyle(Object.assign({},this.maskStyle,e))}}},{key:"getMask",value:function(){var e=this;if(this.multiInstance)return{instance:this.createMask(),isExist:!1};var t=!0,n=this.parentNode.querySelector("[data-bk-mask-uid='".concat(this.uniqueMaskAttrTag,"']"));return n||(t=!1,(n=this.createMask()).addEventListener("click",(function(t){t.target===n&&"function"==typeof e.onClick&&Reflect.apply(e.onClick,e,[t])}),!0)),{instance:n,isExist:t}}},{key:"getBackupMask",value:function(){var e="data-bk-backup-uid",t=this.parentNode.querySelector("[".concat(e,"]"));return t||(t=this.createMask(e)),t}},{key:"createMask",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-bk-mask-uid",t=document.createElement("div");return t.setAttribute(e,this.uniqueMaskAttrTag),this.parentNode.append(t),t}},{key:"setMaskStyle",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.mask&&Object.entries(t).forEach((function(t){return e.mask.style.setProperty(t[0],t[1])}))}},{key:"getMaskAttrTag",value:function(e){return/^(auto|\s+)$/i.test(e)||null==e||""===e?(V.getMaskId(this.parentNode)||V.setMaskId(this.parentNode,"__bk_mask_".concat(C(16))),V.getMaskId(this.parentNode)):e}},{key:"appendContentToMask",value:function(e){this.mask.append(e)}}]),e}(),z=new q({}),K=function(){function e(t){var n=this;w(this,e),this.getActiveClickFnIndex=function(e){return n.clickFn.findIndex((function(t){return i=t.target,"string"==typeof e?i.getAttribute(n.uuidAttrName)===e:i===e;var i}))},this.getActiveClickFn=function(e){var t;return null===(t=n.clickFn[n.getActiveClickFnIndex(e)])||void 0===t?void 0:t.fn},this.popInstanceList=[],this.clickFn=[],this.uuidAttrName="data-bk-pop-uuid",this.activePopId=null,this.bKMaskManagerInstance=new q({parentNode:this.getParentNode(null==t?void 0:t.transfer),onClick:this.onMaskClickFn.bind(this)})}return j(e,[{key:"getParentNode",value:function(e){if("string"==typeof e){var t=document.querySelector(e);if(t)return t}return b(e)?e:document.body}},{key:"onMaskClick",value:function(e,t){this.clickFn.push({fn:e,target:t})}},{key:"show",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(e){var o="number"==typeof r?r:B.getModalNextIndex(),s=C(16);e.setAttribute(this.uuidAttrName,s),this.popInstanceList.push({uuid:s,zIndex:o,content:e,showMask:t,appendStyle:n}),t&&this.bKMaskManagerInstance.backupActiveInstance(),this.bKMaskManagerInstance.show(e,o,t,n,s,i),this.activePopId=s}else console.warn("pop show error: content is null or undefined")}},{key:"destroy",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.getActiveClickFnIndex(e);i>=0&&(null===(t=this.clickFn)||void 0===t||t.splice(i,1)),this.hide(e,n)}},{key:"popHide",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.popInstanceList.length){if(e){var t=this.popInstanceList.pop();this.bKMaskManagerInstance.popIndexStore(t.uuid),t.remove(),this.activePopId=null}if(this.popInstanceList.length){var n=this.popInstanceList.slice(-1)[0],i=n.zIndex,r=n.content,o=n.showMask,s=n.appendStyle,a=n.uuid;this.bKMaskManagerInstance.show(r,i,o,s,a),this.activePopId=a}else this.bKMaskManagerInstance.hide(),this.activePopId=null,this.clickFn.length=0}}},{key:"hide",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null==e?void 0:e.getAttribute(this.uuidAttrName);if(n){var i=this.popInstanceList.findIndex((function(e){return e.uuid===n}));i>=0&&(t||this.popInstanceList[i].content.remove(),this.popInstanceList.splice(i,1),this.bKMaskManagerInstance.popIndexStore(n),this.popInstanceList.length?this.popHide(!1):(this.bKMaskManagerInstance.hide(t),this.activePopId=null,this.clickFn.length=0))}else null==e||e.remove()}},{key:"onMaskClickFn",value:function(e){var t=this.getActiveClickFn(this.activePopId);t&&Reflect.apply(t,this,[e])}}]),e}(),W=new K;function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Y(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Z,J=s(8022),$=s(5798),X=function(){function e(t,n,i){var r,o;w(this,e),this.isShow=!1,this.trigger=void 0,this.instance=void 0,this.always=!1,this.reference=void 0,this.referenceTarget=void 0,this.popperRefer=void 0,this.delay=50,this.isInnerPopper=!1,this.disabled=!1,this.afterShow=null,this.afterHidden=null,this.appendTo="parent",this.container=null,this.fixOnBoundary=!1,this.instanceOptions=this.initDefaultOptions(i),this.reference=this.resolveInputSelectorToHtmlElement(t),this.popperRefer=this.resolveInputSelectorToHtmlElement(n),this.referenceTarget=this.getTargetReferenceElement(),this.container=null===(r=this.popperRefer)||void 0===r?void 0:r.parentElement,this.isShow=!!(null===(o=this.instanceOptions)||void 0===o?void 0:o.isShow),this.always=this.instanceOptions.always,this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.appendTo=this.instanceOptions.appendTo,this.afterHidden="function"==typeof i.afterHidden?i.afterHidden:function(){},this.afterShow="function"==typeof i.afterShow?i.afterShow:function(){},this.fixOnBoundary=this.instanceOptions.fixOnBoundary,this.initInstance(),this.registerEvents(),(this.isShow||this.always)&&this.show(null)}return j(e,[{key:"forceUpdate",value:function(){var e;null===(e=this.instance)||void 0===e||e.forceUpdate()}},{key:"update",value:function(){var e;null===(e=this.instance)||void 0===e||e.update()}},{key:"updateOptions",value:function(e){var t;this.instanceOptions=this.initDefaultOptions(e),this.isShow=!!(null===(t=this.instanceOptions)||void 0===t?void 0:t.isShow),this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.setOptions(this.instanceOptions)}},{key:"setOptions",value:function(e){var t;null===(t=this.instance)||void 0===t||t.setOptions(e)}},{key:"destroy",value:function(){var e;null===(e=this.instance)||void 0===e||e.destroy()}},{key:"updateDisabled",value:function(e){this.disabled=null!=e?e:!this.disabled,this.disabled&&this.hide()}},{key:"show",value:function(e){var t;this.disabled||(null===(t=this.popperRefer)||void 0===t||t.setAttribute("data-show",""),this.setOptions({modifiers:[].concat(Y(this.instanceOptions.modifiers||[]),[{name:"eventListeners",enabled:!0}])}),this.update(),this.isShow=!0,this.afterShow(),this.fixOnBoundary||this.appendToTarget())}},{key:"hide",value:function(){var e;this.always||(null===(e=this.popperRefer)||void 0===e||e.removeAttribute("data-show"),this.setOptions({modifiers:[].concat(Y(this.instanceOptions.modifiers||[]),[{name:"eventListeners",enabled:!1}])}),this.isShow=!1,this.isInnerPopper=!1,this.afterHidden(),this.fixOnBoundary||this.restorePopContent())}},{key:"restorePopContent",value:function(){var e=this.getAppendToTarget();b(e)&&e.contains(this.popperRefer)&&this.container&&!this.container.contains(this.popperRefer)&&this.container.append(this.popperRefer)}},{key:"appendToTarget",value:function(){var e=this.getAppendToTarget();b(e)&&e.contains(this.popperRefer)&&e.append(this.popperRefer)}},{key:"getAppendToTarget",value:function(){var e=this.appendTo,t=e;return"parent"!==e&&"string"==typeof e&&(t=document.querySelector(e)),t}},{key:"initDefaultOptions",value:function(e){var t=this,n=g({placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}],strategy:"absolute",onFirstUpdate:void 0,isShow:!1,theme:"dark",trigger:"hover",disabled:!1},e||{}),i=n.onFirstUpdate;return n.onFirstUpdate=function(e){"function"==typeof i&&(i.call(t,e),t.handleFirstUpdate())},n}},{key:"handleFirstUpdate",value:function(){this.fixOnBoundary&&this.appendToTarget()}},{key:"getTargetReferenceElement",value:function(){return this.isElement(this.reference)&&1===this.reference.childElementCount?this.reference.firstElementChild:this.reference}},{key:"initInstance",value:function(){var e,t;this.referenceTarget&&(this.referenceTarget&&this.popperRefer?(this.instance=(0,$.createPopper)(this.referenceTarget,this.popperRefer,this.instanceOptions),null===(e=this.popperRefer)||void 0===e||e.setAttribute("data-theme",null!==(t=this.instanceOptions.theme)&&void 0!==t?t:"dark")):console.error("reference or popperRefer is null, please check html element."))}},{key:"resolveInputSelectorToHtmlElement",value:function(e){if(this.isElement(e))return e;if("string"==typeof e)return document.querySelector(e);if("object"===i(e)){if(Object.prototype.hasOwnProperty.call(e,"getBoundingClientRect"))return e}else console.error("'getBoundingClientRect' is needed when use virtual elements");return null}},{key:"isElement",value:function(e){return b(e)}},{key:"registerEvents",value:function(){var e=this;this.isElement(this.referenceTarget)&&"hover"===this.trigger&&(["mouseenter","focus"].forEach((function(t){e.referenceTarget.addEventListener(t,(function(n){"mouseenter"===t&&(e.isInnerPopper=!0),e.show(n)}))})),["mouseleave","blur"].forEach((function(t){e.referenceTarget.addEventListener(t,(function(){e.isInnerPopper=!1,setTimeout((function(){!e.isInnerPopper&&e.hide()}),e.delay)}))})),this.isElement(this.popperRefer)&&["mouseenter","mouseleave"].forEach((function(t){e.popperRefer.addEventListener(t,(function(){"mouseenter"===t&&(e.isInnerPopper=!0),"mouseleave"===t&&e.hide()}))}))),"click"===this.trigger&&["click"].forEach((function(t){document.body.addEventListener(t,(function(t){e.isSameElement(t.target,e.reference)||e.reference.contains(t.target)?e.show(t):!e.isShow||e.isSameElement(t.target,e.popperRefer)||e.popperRefer.contains(t.target)||e.hide()}))}))}},{key:"isSameElement",value:function(e,t){return e&&(e===t||e===t.firstElementChild)}}]),e}(),Q=null,ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#";if(null===Q){Q="id_".concat((0,J.v4)());var t=document.createElement("div");t.setAttribute("id",Q),t.setAttribute("data-popper-id",Q),document.body.append(t)}return"".concat(e).concat(Q)};function te(){if(void 0!==Z)return Z;var e=document.createElement("div");e.className="bk-scrollbar-wrap",e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",e.appendChild(n);var i=n.offsetWidth;return e.parentNode.removeChild(e),Z=t-i}function ne(e,t){return ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ne(e,t)}function ie(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}var oe=s(210);var se,ae,ue,ce,le,pe,de,fe,he,ve,ye,ge,me,ke=(0,oe.createTypes)({});function be(e){return e.reduce((function(e,t){return e[t]=t,e}),Object.create(null))}function Ie(){return(0,oe.string)().def(ue.SHOW)}function Oe(){return(0,oe.string)().def(ce.LEFT)}function Te(){return(0,oe.string)().def(pe.BOTTOM)}function Me(){return(0,oe.string)().def(de.HOVER)}function Se(){return(0,oe.toType)("popRenderType",{}).def(fe.SHOWN)}function Ee(){return(0,oe.toType)("dialogType",{default:he.OPERATION})}function xe(){return(0,oe.toType)("direction",{}).def(ve.HORIZONTAL)}function we(){return(0,oe.toType)("lineType",{}).def(ye.DASHED)}function Ae(){return(0,oe.toType)("tagTheme",{}).def()}function je(){return(0,oe.toType)("behavior",{}).def(me.NORMAL)}!function(e){e.SMALL="small",e.LARGE="large",e.DEFAULT="default"}(se||(se={})),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}(ae||(ae={})),function(e){e.IF="if",e.SHOW="show"}(ue||(ue={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(ce||(ce={})),function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.DANGER="danger"}(le||(le={})),function(e){e.AUTO="auto",e.AUTO_START="auto-start",e.AUTO_END="auto-end",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_START="top-start",e.TOP_END="top-end",e.BOTTOM_START="bottom-start",e.BOTTOM_END="bottom-end",e.RIGHT_START="right-start",e.RIGHT_END="right-end",e.LEFT_START="left-start",e.LEFT_END="left-end"}(pe||(pe={})),function(e){e.HOVER="hover",e.CLICK="click",e.MANUAL="manual"}(de||(de={})),function(e){e.AUTO="auto",e.SHOWN="shown"}(fe||(fe={})),function(e){e.SHOW="show",e.OPERATION="operation",e.CONFIRM="confirm",e.PROCESS="process"}(he||(he={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(ve||(ve={})),function(e){e.DASHED="dashed",e.SOLID="solid"}(ye||(ye={})),function(e){e.SUCCESS="success",e.INFO="info",e.WARNING="warning",e.DANGER="danger"}(ge||(ge={})),function(e){e.SIMPLICITY="simplicity",e.NORMAL="normal"}(me||(me={}));var Ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ne(e,t)}(r,e);var t,n,i=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=re(t);if(n){var r=re(this).constructor;e=Reflect.construct(i,arguments,r)}else e=i.apply(this,arguments);return ie(this,e)});function r(){return w(this,r),i.apply(this,arguments)}return j(r,null,[{key:"size",value:function(){var e=["small","default","large"];return(0,oe.toType)("Size",{validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid theme, ".concat(t,", the theme must be one of 【").concat(e.join(" | "),"】")),1))},default:"default"})}},{key:"theme",value:function(){var e=["primary","warning","success","danger"];return(0,oe.toType)("Theme",{validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid theme, ".concat(t,", the theme must be one of 【").concat(e.join(" | "),"】")),1))}})}},{key:"placement",value:function(){var e=["top","left","right","bottom"];return(0,oe.toType)("Placements",{validator:function(t){return!(t&&!e.includes(t))},default:"top"})}},{key:"style",value:function(){return(0,oe.toType)("Style",{type:[String,Object]})}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["top-left","top-right","bottom-left","bottom-right"];return(0,oe.toType)("positions",{type:String,validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid positions, ".concat(t,", the position must be one of 【").concat(e.join(" | "),"】")),1))},default:"top-center"})}}]),r}(ke);function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.entries(e).filter((function(e){return e[1]})).map((function(e){return e[0]})).join(" ").concat(t?" ".concat(t):"")}var Pe=Object.create({}),Le=function(){},Ce=function(){return null},De=function(e){return Object.keys(e).length<1},Ue=function(e){return e.install=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.prefix,r=t.config.globalProperties.bkUIPrefix||i||"Bk";t.component(r+e.name,e)},e},Fe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return e.install=function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.prefix,a=r.config.globalProperties.bkUIPrefix||s||"Bk";i&&r.directive(a+i.name,i.directive),r.component(a+e.name,e),!n&&Object.values(t).forEach((function(e){r.component(a+e.name,e)}))},Object.keys(t).forEach((function(n){e[n]=t[n]})),e};function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"bk";return"".concat(t,"-").concat(e)}function He(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,i=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=function(){var o=this,s=arguments;if(e&&clearTimeout(e),r){var a=!e;e=setTimeout((function(){e=null}),n),a&&(t=i.apply(o,s))}else e=setTimeout((function(){i.apply(o,s)}),n);return t};return o.cancel=function(){clearTimeout(e),e=null},o}function Be(e,t){return JSON.parse(JSON.stringify(e,(function(e,n){if(!t.includes(e))return n})))}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){if(Array.isArray(e[n]))return Ve(e[n],t[n]);if(e[n]!==t[n])return!1}return!0}})(),a})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("lodash"),require("@popperjs/core"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["vue","lodash","@popperjs/core","vue-types"],t);else{var n="object"==typeof exports?t(require("vue"),require("lodash"),require("@popperjs/core"),require("vue-types")):t(e.vue,e.lodash,e["@popperjs/core"],e["vue-types"]);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,((e,t,n,i)=>(()=>{var r={8022:(e,t,n)=>{var i=n(4481),r=n(6426),o=r;o.v1=i,o.v4=r,e.exports=o},8725:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var i=n||0,r=t;return[r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],"-",r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]],r[e[i++]]].join("")}},9157:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},4481:(e,t,n)=>{var i,r,o=n(9157),s=n(8725),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],p=(e=e||{}).node||i,f=void 0!==e.clockseq?e.clockseq:r;if(null==p||null==f){var d=o();null==p&&(p=i=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==f&&(f=r=16383&(d[6]<<8|d[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,y=h-a+(v-u)/1e4;if(y<0&&void 0===e.clockseq&&(f=f+1&16383),(y<0||h>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=h,u=v,r=f;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;l[c++]=g>>>24&255,l[c++]=g>>>16&255,l[c++]=g>>>8&255,l[c++]=255&g;var m=h/4294967296*1e4&268435455;l[c++]=m>>>8&255,l[c++]=255&m,l[c++]=m>>>24&15|16,l[c++]=m>>>16&255,l[c++]=f>>>8|128,l[c++]=255&f;for(var k=0;k<6;++k)l[c+k]=p[k];return t||s(l)}},6426:(e,t,n)=>{var i=n(9157),r=n(8725);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||r(s)}},5798:e=>{"use strict";e.exports=n},467:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:e=>{"use strict";e.exports=i}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,s),n.exports}s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";s.r(a),s.d(a,{AlignEnum:()=>ce,BKLAYERD_INDEX_EFAULT_VALUE:()=>H,BKLAYERTYPE:()=>L,BKPopIndexManager:()=>K,BKPopover:()=>X,BkMaskManager:()=>q,DialogTypeEnum:()=>he,DirectionEnum:()=>ve,EMPTY_OBJ:()=>Ne,InputBehaviorEnum:()=>me,InputBehaviorType:()=>je,LineStyleEnum:()=>ye,PlacementEnum:()=>pe,Placements:()=>ae,PropTypes:()=>Re,RenderDirectiveEnum:()=>ue,RenderType:()=>de,SizeEnum:()=>se,TagThemeEnum:()=>ge,TagThemeType:()=>Ae,ThemeEnum:()=>le,TriggerEnum:()=>fe,alignType:()=>Oe,arrayEqual:()=>Ve,bKMaskManager:()=>z,bkPopIndexManager:()=>W,bkZIndexManager:()=>B,capitalize:()=>U,checkOverflow:()=>_,classes:()=>Le,clone:()=>h,debounce:()=>He,dialogTypeUnion:()=>Se,directionType:()=>we,elementsEqual:()=>d,filterProperty:()=>Be,finiteOrDefault:()=>p,formItemKey:()=>E,formKey:()=>M,getPopContainerId:()=>ee,hasOverflowEllipsis:()=>I,isArray:()=>u,isElement:()=>b,isEmpty:()=>o,isEmptyObj:()=>De,isFinite:()=>l,isNullOrUndef:()=>r,isObject:()=>c,lineStyleType:()=>xe,maybeShowTooltip:()=>O,merge:()=>g,mergeIf:()=>m,mergerFn:()=>y,mergerIfFn:()=>k,noop:()=>Pe,observerResize:()=>D,off:()=>t,on:()=>e,placementType:()=>Te,random:()=>C,renderDirectiveType:()=>Ie,renderEmptyVNode:()=>Ce,renderType:()=>Ee,resolveClassName:()=>Fe,scrollTop:()=>n,scrollbarWidth:()=>te,stringEnum:()=>be,triggerType:()=>Me,useForm:()=>S,useFormItem:()=>w,valueOrDefault:()=>f,withInstall:()=>Ue,withInstallProps:()=>_e});var e=document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!0)}:function(e,t,n){e&&t&&n&&e.attachEvent("on".concat(t),n)},t=document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!0)}:function(e,t,n){e&&t&&e.detachEvent("on".concat(t),n)};function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,r=arguments.length>4?arguments[4]:void 0,o=Math.abs(t-n),s=Math.ceil(o/i*50);function a(t,n,i){if(t!==n){var o=t+i>n?n:t+i;t>n&&(o=t-i<n?n:t-i),e===window?window.scrollTo(o,o):e.scrollTop=o,window.requestAnimationFrame((function(){return a(o,n,i)}))}else null==r||r()}a(t,n,s)}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function r(e){return null==e}function o(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return""===e||!!t&&r(e)}function u(e){if(Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)}function c(e){return null!==e&&/^\[object (Object|Module)\]/.test(Object.prototype.toString.call(e))}var l=function(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)};function p(e,t){return l(e)?e:t}function f(e,t){return void 0===e?t:e}function d(e,t){var n,i,r,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],o=t[n],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function h(e){if(u(e))return e.map(h);if(c(e)){for(var t=Object.create(null),n=Object.keys(e),i=n.length,r=0;r<i;++r)t[n[r]]=h(e[n[r]]);return t}return e}function v(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function y(e,t,n,i){if(v(e)){var r=t[e],o=n[e];c(r)&&c(o)?g(r,o,i):t[e]=h(o)}}function g(e,t,n){var i=u(t)?t:[t],r=i.length;if(!c(e))return e;for(var o=(n=n||{}).merger||y,s=0;s<r;++s)if(c(t=i[s]))for(var a=Object.keys(t),l=0,p=a.length;l<p;++l)o(a[l],e,t,n);return e}function m(e,t){return g(e,t,{merger:k})}function k(e,t,n){if(v(e)){var i=t[e],r=n[e];c(i)&&c(r)?m(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=h(r))}}function b(e){try{return e instanceof HTMLElement}catch(t){return"object"===i(e)&&1===e.nodeType&&"object"===i(e.style)&&"object"===i(e.ownerDocument)}}function I(e){return e.offsetWidth<e.scrollWidth||e.offsetHeight<e.scrollHeight}function O(e,t){I(e)?e.setAttribute("title",t):e.removeAttribute("title")}var T=s(748),M=Symbol("form"),E=Symbol("formItem"),S=function(){return(0,T.inject)(M)},w=function(){return(0,T.inject)(E,void 0)};function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function j(e,t,n){return t&&A(e.prototype,t),n&&A(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var R,L,N=s(467),P="abcdefghijklmnopqrstuvwxyz0123456789",C=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:P,n="",i=0;i<e;i++)n+=t[parseInt((Math.random()*t.length).toString(),10)];return n},D=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=(0,N.throttle)((function(){"function"==typeof t&&t()}),n),o=new ResizeObserver((function(){r()}));return i&&"function"==typeof t&&t(),{start:function(){o.observe(e)},stop:function(){o.disconnect(),o.unobserve(e)}}},U=function(e){return e[0].toUpperCase()+e.slice(1)};function _(e){if(!e)return!1;var t=!1;try{var n=window.getComputedStyle(e,null);if("none"!==n.webkitLineClamp){var i=parseFloat(n.height),r=function(e,t){var n=document.createElement("div"),i=parseFloat(t.width)?"".concat(Math.ceil(parseFloat(t.width)),"px"):t.width;return n.style.cssText="\n width: ".concat(i,";\n line-height: ").concat(t["line-height"],";\n font-size: ").concat(t["font-size"],";\n word-break: ").concat(t["word-break"],";\n padding: ").concat(t.padding,";\n "),n.textContent=e.textContent,n}(e,n);document.body.appendChild(r);var o=window.getComputedStyle(r,null).height;document.body.removeChild(r),t=i<parseFloat(o)}else t=e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight}catch(e){console.warn("There is an error when check element overflow state: ",e)}return t}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.BOTTOM="bottom",e.CONTENT="content",e.NAVI="navi",e.FULLSCREEN="fullScreen",e.PLUGINS="plugins",e.MODAL="modal",e.MESSAGE="message",e.POPPER="popper"}(L||(L={}));var H=(F(R={},L.BOTTOM,0),F(R,L.CONTENT,1),F(R,L.NAVI,100),F(R,L.FULLSCREEN,1e3),F(R,L.MODAL,3e3),F(R,L.PLUGINS,8e3),F(R,L.MESSAGE,1e4),F(R,L.POPPER,99999),R),B=new(function(){function e(){x(this,e),this.storageLayerIndexValue={},this.copyDefaultValue()}return j(e,[{key:"getNextIndex",value:function(e){return Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue,e)?(this.storageLayerIndexValue[e]=this.storageLayerIndexValue[e]+1,this.storageLayerIndexValue[e]):(this.storageLayerIndexValue[L.MODAL]=this.storageLayerIndexValue[L.MODAL]+1,this.storageLayerIndexValue[L.MODAL])}},{key:"getModalNextIndex",value:function(){return this.getNextIndex(L.MODAL)}},{key:"getMessageNextIndex",value:function(){return this.getNextIndex(L.MESSAGE)}},{key:"getFullScreenNextIndex",value:function(){return this.getNextIndex(L.FULLSCREEN)}},{key:"getNaviNextIndex",value:function(){return this.getNextIndex(L.NAVI)}},{key:"getPopperIndex",value:function(){return H.popper}},{key:"setDefaultZIndex",value:function(e){var t=this;Object.keys(e||{}).forEach((function(n){Object.prototype.hasOwnProperty.call(t.storageLayerIndexValue.__proto__,n)&&Object.assign(t.storageLayerIndexValue.__proto__,F({},n,e[n]))})),this.copyDefaultValue()}},{key:"resetZIndex",value:function(e){var t=this;Object.keys(e||{}).forEach((function(n){Object.prototype.hasOwnProperty.call(t.storageLayerIndexValue,n)&&Object.assign(t.storageLayerIndexValue,F({},n,e[n]))}))}},{key:"copyDefaultValue",value:function(){var e=Object.keys(H).reduce((function(e,t){return Object.assign(e,F({},t,{value:H[t],writable:!0,configurable:!0}))}),{});this.storageLayerIndexValue=Object.create(H,e)}}]),e}());"__bk_mask_".concat(C(16));var V=new(function(){function e(){x(this,e),this.timer=null,this.store=[],this.maskMap=new WeakMap}return j(e,[{key:"appendMaker",value:function(e){this.store.push(e),this.executeMaker()}},{key:"pushMaskStyle",value:function(e,t){var n=this.getMaskMap(e);(null==n?void 0:n.styles)?n.styles.push(t):this.setMaskMap(e,Object.assign({styles:[t]},n||{}))}},{key:"getMaskStyles",value:function(e){var t;return(null===(t=this.getMaskMap(e))||void 0===t?void 0:t.styles)||[]}},{key:"setMaskId",value:function(e,t){var n=this.getMaskMap(e);n?(Object.assign(n,{id:t}),this.setMaskMap(e,n)):this.setMaskMap(e,Object.assign({id:t},n||{}))}},{key:"getMaskId",value:function(e){var t;return null===(t=this.getMaskMap(e))||void 0===t?void 0:t.id}},{key:"setMaskMap",value:function(e,t){this.maskMap.set(e,t)}},{key:"getMaskMap",value:function(e){return this.maskMap.get(e)}},{key:"executeMaker",value:function(){var e=this;this.timer&&cancelAnimationFrame(this.timer),this.timer=requestAnimationFrame((function(){var t=e.store.pop();"function"==typeof t&&(Reflect.apply(t,e,[]),e.executeMaker())}))}}]),e}()),q=function(){function e(t){var n=this;x(this,e),this.multiInstance=!1,this.uniqueMaskAttrTag="",this.parentNode=document.body,this.activeInstance=void 0,this.zIndexStore=new Map,this.lastUUID=null,this.maskStyle={position:"fixed",left:0,top:0,bottom:0,right:0,display:"none","background-color":"rgba(0,0,0,.6)"},this.isInit=!1,this.maskAttrTag="auto";var i=t||{},r=i.multiInstance,o=void 0!==r&&r,s=i.maskAttrTag,a=void 0===s?"auto":s,u=i.parentNode,c=void 0===u?document.body:u,l=i.maskStyle,p=void 0===l?{}:l,f=i.onClick,d=void 0===f?null:f,h=i.popInstance,v=void 0===h?null:h;this.parentNode=c||document,this.maskAttrTag=a,this.onClick=d,this.activeInstance=void 0,this.multiInstance=o,this.popInstance=v,this.uniqueMaskAttrTag=this.getMaskAttrTag(a),V.appendMaker((function(){n.initInstance(p)}))}return j(e,[{key:"setOption",value:function(e){var t=e||{},n=t.parentNode,i=void 0===n?document.body:n,r=t.maskStyle,o=void 0===r?{}:r,s=t.onClick,a=void 0===s?null:s,u=t.maskAttrTag,c=void 0===u?this.maskAttrTag:u;this.onClick=a,this.parentNode=i||document,this.setMaskStyle(Object.assign({},this.maskStyle,o)),this.uniqueMaskAttrTag=this.getMaskAttrTag(c)}},{key:"show",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=null!=r?r:C(16),a=/-?\d+/.test("".concat(t))?t:B.getModalNextIndex(),u=Object.assign({},this.maskStyle,i||{});if(!n&&this.lastUUID){var c=this.zIndexStore.get(this.lastUUID);c&&(u=null==c?void 0:c.style)}this.storeMaskInsCfg({zIndex:a,style:Object.assign({},u),uuid:s,preUID:this.lastUUID}),Object.assign(u,{display:"block","z-index":"".concat(a),"pointer-events":"all"}),this.initInstance(u),this.catchClickEvent(),this.setMaskStyle(u),V.pushMaskStyle(this.parentNode,Object.assign({},u)),this.backupMask.style.setProperty("z-index","".concat(a-1)),n||(this.mask.style.setProperty("pointer-events","none"),null==e||e.style.setProperty("pointer-events","all")),e&&(o&&e.style.setProperty("z-index","".concat(a+1)),this.activeInstance=e,this.appendContentToMask(e))}},{key:"hide",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=null!=i?i:this.lastUUID;t||(null==n||n.remove(),null===(e=this.activeInstance)||void 0===e||e.remove()),this.removeClickEvent(),this.activeInstance=void 0,this.popIndexStore(r);var o=V.getMaskStyles(this.parentNode);if(null==o||o.pop(),null==o?void 0:o.length){var s=o.slice(-1)[0];this.setMaskStyle(s)}else this.mask.style.setProperty("display","none")}},{key:"storeMaskInsCfg",value:function(e){return this.zIndexStore.set(e.uuid,e),this.lastUUID=e.uuid,this.zIndexStore.get(e.uuid)}},{key:"popIndexStore",value:function(e){if(this.zIndexStore.has(e)){var t=this.zIndexStore.get(e);return this.lastUUID=t.preUID,this.zIndexStore.delete(e)}return this.lastUUID=null,!1}},{key:"backupActiveInstance",value:function(){this.activeInstance&&this.backupMask.append(this.activeInstance)}},{key:"backupContentElement",value:function(e){e&&this.backupMask.append(e)}},{key:"getActiveContentInstance",value:function(){return this.activeInstance}},{key:"initInstance",value:function(e){if(!this.isInit){this.isInit=!0;var t=this.getMask(),n=t.instance,i=t.isExist;this.mask=n,this.backupMask=this.getBackupMask(),!i&&this.setMaskStyle(Object.assign({},this.maskStyle,e))}}},{key:"getMask",value:function(){if(this.multiInstance)return{instance:this.createMask(),isExist:!1};var e=!0,t=this.parentNode.querySelector("[data-bk-mask-uid='".concat(this.uniqueMaskAttrTag,"']"));return t||(e=!1,t=this.createMask()),{instance:t,isExist:e}}},{key:"catchClickEvent",value:function(){var e=this;this.mask&&this.mask.addEventListener("click",(function(t){return e.handleMaskClick(t)}),!0)}},{key:"removeClickEvent",value:function(){this.mask&&this.mask.removeEventListener("click",this.handleMaskClick)}},{key:"handleMaskClick",value:function(e){e.target===this.mask&&"function"==typeof this.onClick&&Reflect.apply(this.onClick,this.popInstance||this,[e])}},{key:"getBackupMask",value:function(){var e="data-bk-backup-uid",t=this.parentNode.querySelector("[".concat(e,"]"));return t||(t=this.createMask(e)),t}},{key:"createMask",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-bk-mask-uid",t=document.createElement("div");return t.setAttribute(e,this.uniqueMaskAttrTag),this.parentNode.append(t),t}},{key:"setMaskStyle",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.mask&&Object.entries(t).forEach((function(t){return e.mask.style.setProperty(t[0],t[1])}))}},{key:"getMaskAttrTag",value:function(e){return/^(auto|\s+)$/i.test(e)||null==e||""===e?(V.getMaskId(this.parentNode)||V.setMaskId(this.parentNode,"__bk_mask_".concat(C(16))),V.getMaskId(this.parentNode)):e}},{key:"appendContentToMask",value:function(e){this.mask.append(e)}}]),e}(),z=new q({}),K=function(){function e(t){x(this,e),this.popInstanceList=[],this.clickFn=void 0,this.uuidAttrName="data-bk-pop-uuid",this.bKMaskManagerInstance=new q({parentNode:this.getParentNode(null==t?void 0:t.transfer),popInstance:this,onClick:this.onMaskClickFn})}return j(e,[{key:"getParentNode",value:function(e){if("string"==typeof e){var t=document.querySelector(e);if(t)return t}return b(e)?e:document.body}},{key:"onMaskClick",value:function(e,t){this.clickFn={fn:e,target:t}}},{key:"show",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(e){var o="number"==typeof r?r:B.getModalNextIndex(),s=C(16);e.setAttribute(this.uuidAttrName,s),this.popInstanceList.push({uuid:s,zIndex:o,content:e,showMask:t,appendStyle:n}),t&&this.bKMaskManagerInstance.backupActiveInstance(),this.bKMaskManagerInstance.show(e,o,t,n,s,i)}else console.warn("pop show error: content is null or undefined")}},{key:"destroy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.clickFn=void 0,this.hide(e,t)}},{key:"popHide",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.popInstanceList.length){if(e){var t=this.popInstanceList.pop();this.bKMaskManagerInstance.popIndexStore(t.uuid),t.remove()}if(this.popInstanceList.length){var n=this.popInstanceList.slice(-1)[0],i=n.zIndex,r=n.content,o=n.showMask,s=n.appendStyle,a=n.uuid;this.bKMaskManagerInstance.show(r,i,o,s,a)}else this.bKMaskManagerInstance.hide()}}},{key:"hide",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null==e?void 0:e.getAttribute(this.uuidAttrName);if(n){var i=this.popInstanceList.findIndex((function(e){return e.uuid===n}));i>=0&&(t||this.popInstanceList[i].content.remove(),this.popInstanceList.splice(i,1),this.bKMaskManagerInstance.popIndexStore(n),this.popInstanceList.length?this.popHide(!1):this.bKMaskManagerInstance.hide(t))}else null==e||e.remove()}},{key:"onMaskClickFn",value:function(e){var t=this.clickFn.fn;t&&Reflect.apply(t,this,[e])}}]),e}(),W=new K;function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Y(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Z,J=s(8022),$=s(5798),X=function(){function e(t,n,i){var r,o;x(this,e),this.isShow=!1,this.trigger=void 0,this.instance=void 0,this.always=!1,this.reference=void 0,this.referenceTarget=void 0,this.popperRefer=void 0,this.delay=50,this.isInnerPopper=!1,this.disabled=!1,this.afterShow=null,this.afterHidden=null,this.appendTo="parent",this.container=null,this.fixOnBoundary=!1,this.instanceOptions=this.initDefaultOptions(i),this.reference=this.resolveInputSelectorToHtmlElement(t),this.popperRefer=this.resolveInputSelectorToHtmlElement(n),this.referenceTarget=this.getTargetReferenceElement(),this.container=null===(r=this.popperRefer)||void 0===r?void 0:r.parentElement,this.isShow=!!(null===(o=this.instanceOptions)||void 0===o?void 0:o.isShow),this.always=this.instanceOptions.always,this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.appendTo=this.instanceOptions.appendTo,this.afterHidden="function"==typeof i.afterHidden?i.afterHidden:function(){},this.afterShow="function"==typeof i.afterShow?i.afterShow:function(){},this.fixOnBoundary=this.instanceOptions.fixOnBoundary,this.initInstance(),this.registerEvents(),(this.isShow||this.always)&&this.show(null)}return j(e,[{key:"forceUpdate",value:function(){var e;null===(e=this.instance)||void 0===e||e.forceUpdate()}},{key:"update",value:function(){var e;null===(e=this.instance)||void 0===e||e.update()}},{key:"updateOptions",value:function(e){var t;this.instanceOptions=this.initDefaultOptions(e),this.isShow=!!(null===(t=this.instanceOptions)||void 0===t?void 0:t.isShow),this.trigger=this.instanceOptions.trigger,this.disabled=this.instanceOptions.disabled,this.setOptions(this.instanceOptions)}},{key:"setOptions",value:function(e){var t;null===(t=this.instance)||void 0===t||t.setOptions(e)}},{key:"destroy",value:function(){var e;null===(e=this.instance)||void 0===e||e.destroy()}},{key:"updateDisabled",value:function(e){this.disabled=null!=e?e:!this.disabled,this.disabled&&this.hide()}},{key:"show",value:function(e){var t;this.disabled||(null===(t=this.popperRefer)||void 0===t||t.setAttribute("data-show",""),this.setOptions({modifiers:[].concat(Y(this.instanceOptions.modifiers||[]),[{name:"eventListeners",enabled:!0}])}),this.update(),this.isShow=!0,this.afterShow(),this.fixOnBoundary||this.appendToTarget())}},{key:"hide",value:function(){var e;this.always||(null===(e=this.popperRefer)||void 0===e||e.removeAttribute("data-show"),this.setOptions({modifiers:[].concat(Y(this.instanceOptions.modifiers||[]),[{name:"eventListeners",enabled:!1}])}),this.isShow=!1,this.isInnerPopper=!1,this.afterHidden(),this.fixOnBoundary||this.restorePopContent())}},{key:"restorePopContent",value:function(){var e=this.getAppendToTarget();b(e)&&e.contains(this.popperRefer)&&this.container&&!this.container.contains(this.popperRefer)&&this.container.append(this.popperRefer)}},{key:"appendToTarget",value:function(){var e=this.getAppendToTarget();b(e)&&e.contains(this.popperRefer)&&e.append(this.popperRefer)}},{key:"getAppendToTarget",value:function(){var e=this.appendTo,t=e;return"parent"!==e&&"string"==typeof e&&(t=document.querySelector(e)),t}},{key:"initDefaultOptions",value:function(e){var t=this,n=g({placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}],strategy:"absolute",onFirstUpdate:void 0,isShow:!1,theme:"dark",trigger:"hover",disabled:!1},e||{}),i=n.onFirstUpdate;return n.onFirstUpdate=function(e){"function"==typeof i&&(i.call(t,e),t.handleFirstUpdate())},n}},{key:"handleFirstUpdate",value:function(){this.fixOnBoundary&&this.appendToTarget()}},{key:"getTargetReferenceElement",value:function(){return this.isElement(this.reference)&&1===this.reference.childElementCount?this.reference.firstElementChild:this.reference}},{key:"initInstance",value:function(){var e,t;this.referenceTarget&&(this.referenceTarget&&this.popperRefer?(this.instance=(0,$.createPopper)(this.referenceTarget,this.popperRefer,this.instanceOptions),null===(e=this.popperRefer)||void 0===e||e.setAttribute("data-theme",null!==(t=this.instanceOptions.theme)&&void 0!==t?t:"dark")):console.error("reference or popperRefer is null, please check html element."))}},{key:"resolveInputSelectorToHtmlElement",value:function(e){if(this.isElement(e))return e;if("string"==typeof e)return document.querySelector(e);if("object"===i(e)){if(Object.prototype.hasOwnProperty.call(e,"getBoundingClientRect"))return e}else console.error("'getBoundingClientRect' is needed when use virtual elements");return null}},{key:"isElement",value:function(e){return b(e)}},{key:"registerEvents",value:function(){var e=this;this.isElement(this.referenceTarget)&&"hover"===this.trigger&&(["mouseenter","focus"].forEach((function(t){e.referenceTarget.addEventListener(t,(function(n){"mouseenter"===t&&(e.isInnerPopper=!0),e.show(n)}))})),["mouseleave","blur"].forEach((function(t){e.referenceTarget.addEventListener(t,(function(){e.isInnerPopper=!1,setTimeout((function(){!e.isInnerPopper&&e.hide()}),e.delay)}))})),this.isElement(this.popperRefer)&&["mouseenter","mouseleave"].forEach((function(t){e.popperRefer.addEventListener(t,(function(){"mouseenter"===t&&(e.isInnerPopper=!0),"mouseleave"===t&&e.hide()}))}))),"click"===this.trigger&&["click"].forEach((function(t){document.body.addEventListener(t,(function(t){e.isSameElement(t.target,e.reference)||e.reference.contains(t.target)?e.show(t):!e.isShow||e.isSameElement(t.target,e.popperRefer)||e.popperRefer.contains(t.target)||e.hide()}))}))}},{key:"isSameElement",value:function(e,t){return e&&(e===t||e===t.firstElementChild)}}]),e}(),Q=null,ee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#";if(null===Q){Q="id_".concat((0,J.v4)());var t=document.createElement("div");t.setAttribute("id",Q),t.setAttribute("data-popper-id",Q),document.body.append(t)}return"".concat(e).concat(Q)};function te(){if(void 0!==Z)return Z;var e=document.createElement("div");e.className="bk-scrollbar-wrap",e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",e.appendChild(n);var i=n.offsetWidth;return e.parentNode.removeChild(e),Z=t-i}function ne(e,t){return ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ne(e,t)}function ie(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}var oe=s(210);var se,ae,ue,ce,le,pe,fe,de,he,ve,ye,ge,me,ke=(0,oe.createTypes)({});function be(e){return e.reduce((function(e,t){return e[t]=t,e}),Object.create(null))}function Ie(){return(0,oe.string)().def(ue.SHOW)}function Oe(){return(0,oe.string)().def(ce.LEFT)}function Te(){return(0,oe.string)().def(pe.BOTTOM)}function Me(){return(0,oe.string)().def(fe.HOVER)}function Ee(){return(0,oe.toType)("popRenderType",{}).def(de.SHOWN)}function Se(){return(0,oe.toType)("dialogType",{default:he.OPERATION})}function we(){return(0,oe.toType)("direction",{}).def(ve.HORIZONTAL)}function xe(){return(0,oe.toType)("lineType",{}).def(ye.DASHED)}function Ae(){return(0,oe.toType)("tagTheme",{}).def()}function je(){return(0,oe.toType)("behavior",{}).def(me.NORMAL)}!function(e){e.SMALL="small",e.LARGE="large",e.DEFAULT="default"}(se||(se={})),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}(ae||(ae={})),function(e){e.IF="if",e.SHOW="show"}(ue||(ue={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(ce||(ce={})),function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.DANGER="danger"}(le||(le={})),function(e){e.AUTO="auto",e.AUTO_START="auto-start",e.AUTO_END="auto-end",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_START="top-start",e.TOP_END="top-end",e.BOTTOM_START="bottom-start",e.BOTTOM_END="bottom-end",e.RIGHT_START="right-start",e.RIGHT_END="right-end",e.LEFT_START="left-start",e.LEFT_END="left-end"}(pe||(pe={})),function(e){e.HOVER="hover",e.CLICK="click",e.MANUAL="manual"}(fe||(fe={})),function(e){e.AUTO="auto",e.SHOWN="shown"}(de||(de={})),function(e){e.SHOW="show",e.OPERATION="operation",e.CONFIRM="confirm",e.PROCESS="process"}(he||(he={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(ve||(ve={})),function(e){e.DASHED="dashed",e.SOLID="solid"}(ye||(ye={})),function(e){e.SUCCESS="success",e.INFO="info",e.WARNING="warning",e.DANGER="danger"}(ge||(ge={})),function(e){e.SIMPLICITY="simplicity",e.NORMAL="normal"}(me||(me={}));var Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ne(e,t)}(r,e);var t,n,i=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=re(t);if(n){var r=re(this).constructor;e=Reflect.construct(i,arguments,r)}else e=i.apply(this,arguments);return ie(this,e)});function r(){return x(this,r),i.apply(this,arguments)}return j(r,null,[{key:"size",value:function(){var e=["small","default","large"];return(0,oe.toType)("Size",{validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid theme, ".concat(t,", the theme must be one of 【").concat(e.join(" | "),"】")),1))},default:"default"})}},{key:"theme",value:function(){var e=["primary","warning","success","danger"];return(0,oe.toType)("Theme",{validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid theme, ".concat(t,", the theme must be one of 【").concat(e.join(" | "),"】")),1))}})}},{key:"placement",value:function(){var e=["top","left","right","bottom"];return(0,oe.toType)("Placements",{validator:function(t){return!(t&&!e.includes(t))},default:"top"})}},{key:"style",value:function(){return(0,oe.toType)("Style",{type:[String,Object]})}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["top-left","top-right","bottom-left","bottom-right"];return(0,oe.toType)("positions",{type:String,validator:function(t){return!(t&&!e.includes(t)&&(console.error("invalid positions, ".concat(t,", the position must be one of 【").concat(e.join(" | "),"】")),1))},default:"top-center"})}}]),r}(ke);function Le(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.entries(e).filter((function(e){return e[1]})).map((function(e){return e[0]})).join(" ").concat(t?" ".concat(t):"")}var Ne=Object.create({}),Pe=function(){},Ce=function(){return null},De=function(e){return Object.keys(e).length<1},Ue=function(e){return e.install=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.prefix,r=t.config.globalProperties.bkUIPrefix||i||"Bk";t.component(r+e.name,e)},e},_e=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return e.install=function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.prefix,a=r.config.globalProperties.bkUIPrefix||s||"Bk";i&&r.directive(a+i.name,i.directive),r.component(a+e.name,e),!n&&Object.values(t).forEach((function(e){r.component(a+e.name,e)}))},Object.keys(t).forEach((function(n){e[n]=t[n]})),e};function Fe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"bk";return"".concat(t,"-").concat(e)}function He(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,i=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=function(){var o=this,s=arguments;if(e&&clearTimeout(e),r){var a=!e;e=setTimeout((function(){e=null}),n),a&&(t=i.apply(o,s))}else e=setTimeout((function(){i.apply(o,s)}),n);return t};return o.cancel=function(){clearTimeout(e),e=null},o}function Be(e,t){return JSON.parse(JSON.stringify(e,(function(e,n){if(!t.includes(e))return n})))}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){if(Array.isArray(e[n]))return Ve(e[n],t[n]);if(e[n]!==t[n])return!1}return!0}})(),a})()));
@@ -1,9 +1,11 @@
1
+ import { BKPopIndexManager } from './pop-manager';
1
2
  declare type BkMaskManagerConfig = {
2
3
  multiInstance?: boolean;
3
4
  maskAttrTag?: string;
4
5
  parentNode?: HTMLElement | Document;
5
6
  maskStyle?: any;
6
7
  onClick?: (e: MouseEvent) => void;
8
+ popInstance?: BKPopIndexManager;
7
9
  };
8
10
  declare type MaskConfigStore = {
9
11
  zIndex: number;
@@ -33,6 +35,7 @@ export declare class BkMaskManager {
33
35
  private onClick;
34
36
  private isInit;
35
37
  private maskAttrTag;
38
+ private popInstance?;
36
39
  /**
37
40
  * 遮罩管理器
38
41
  *
@@ -65,6 +68,9 @@ export declare class BkMaskManager {
65
68
  * @returns 当前遮罩容器
66
69
  */
67
70
  private getMask;
71
+ private catchClickEvent;
72
+ private removeClickEvent;
73
+ private handleMaskClick;
68
74
  private getBackupMask;
69
75
  /**
70
76
  * 创建遮罩层DOM
@@ -2,8 +2,7 @@ export declare class BKPopIndexManager {
2
2
  /** 用来缓存弹出层实例 */
3
3
  private popInstanceList;
4
4
  private readonly uuidAttrName;
5
- private clickFn;
6
- private activePopId;
5
+ private clickFn?;
7
6
  private bKMaskManagerInstance;
8
7
  constructor(options?: any);
9
8
  getParentNode(transfer: any): any;
@@ -33,8 +32,6 @@ export declare class BKPopIndexManager {
33
32
  * @param content { HTMLElement } 关闭弹窗内容
34
33
  * **/
35
34
  hide(content?: HTMLElement, transfer?: boolean): void;
36
- private getActiveClickFnIndex;
37
- private getActiveClickFn;
38
35
  private onMaskClickFn;
39
36
  }
40
37
  export declare const bkPopIndexManager: BKPopIndexManager;
@@ -13,8 +13,8 @@ declare const BkSideslider: {
13
13
  isShow: boolean;
14
14
  zIndex: string | number;
15
15
  draggable: boolean;
16
- multiInstance: boolean;
17
16
  showMask: boolean;
17
+ multiInstance: boolean;
18
18
  renderDirective: "if" | "show";
19
19
  quickClose: boolean;
20
20
  scrollable: boolean;
@@ -116,7 +116,7 @@ declare const BkSideslider: {
116
116
  onClosed?: (...args: any[]) => any;
117
117
  "onUpdate:isShow"?: (...args: any[]) => any;
118
118
  "onAnimation-end"?: (...args: any[]) => any;
119
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "transfer" | "width" | "height" | "maxHeight" | "extCls" | "direction" | "isShow" | "zIndex" | "draggable" | "multiInstance" | "showMask" | "renderDirective" | "quickClose" | "scrollable" | "closeIcon" | "escClose" | "fullscreen" | "animateType">;
119
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "transfer" | "width" | "height" | "maxHeight" | "extCls" | "direction" | "isShow" | "zIndex" | "draggable" | "showMask" | "multiInstance" | "renderDirective" | "quickClose" | "scrollable" | "closeIcon" | "escClose" | "fullscreen" | "animateType">;
120
120
  $attrs: {
121
121
  [x: string]: unknown;
122
122
  };
@@ -235,8 +235,8 @@ declare const BkSideslider: {
235
235
  isShow: boolean;
236
236
  zIndex: string | number;
237
237
  draggable: boolean;
238
- multiInstance: boolean;
239
238
  showMask: boolean;
239
+ multiInstance: boolean;
240
240
  renderDirective: "if" | "show";
241
241
  quickClose: boolean;
242
242
  scrollable: boolean;
@@ -467,8 +467,8 @@ declare const BkSideslider: {
467
467
  isShow: boolean;
468
468
  zIndex: string | number;
469
469
  draggable: boolean;
470
- multiInstance: boolean;
471
470
  showMask: boolean;
471
+ multiInstance: boolean;
472
472
  renderDirective: "if" | "show";
473
473
  quickClose: boolean;
474
474
  scrollable: boolean;
@@ -191,8 +191,8 @@ declare const _default: import("vue").DefineComponent<{
191
191
  isShow: boolean;
192
192
  zIndex: string | number;
193
193
  draggable: boolean;
194
- multiInstance: boolean;
195
194
  showMask: boolean;
195
+ multiInstance: boolean;
196
196
  renderDirective: "if" | "show";
197
197
  quickClose: boolean;
198
198
  scrollable: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkui-vue",
3
- "version": "0.0.1-beta.450",
3
+ "version": "0.0.1-beta.451",
4
4
  "workspaces": {
5
5
  "packages": [
6
6
  "packages/!(**.bak)*",