New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bpui/popover

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bpui/popover - npm Package Compare versions

Comparing version 1.1.13 to 1.1.14

20

dist/index.common.js
/*!
* bpui popover v1.1.13
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v1.1.14
* Copyright (c) 2021 Copyright bpuioint.lee@live.com All Rights Reserved.
* Released under the MIT License.

@@ -986,3 +986,2 @@ */

this.directionData = 'top';
this.offsetTop -= port.height;
this.offsetTop -= 8;

@@ -1000,6 +999,7 @@ } else if (directionData == 'bottom') {

if (offset.top + port.height / 2 > viewPort.height / 2) {
directionData = 'top';
this.directionData = 'top';
this.offsetTop -= port.height;
this.offsetTop -= 8;
} else {
directionData = 'bottom';
this.directionData = 'bottom';

@@ -1010,4 +1010,3 @@ this.offsetTop += port.height;

this.offsetTop = parseInt(this.offsetTop);
this.offsetTop += 'px'; // arrow.
this.offsetTop = parseInt(this.offsetTop); // arrow.

@@ -1043,3 +1042,3 @@ var arrowOffset;

this.offsetTop = parseInt(mainOffset + docOffset.top) + 'px';
this.offsetLeft = directionData == 'right' ? offset.left + port.width - 6 : offset.left - main.clientWidth - 6;
this.offsetLeft = directionData == 'right' ? offset.left + port.width + 6 : offset.left - main.clientWidth - 6 - 6;
this.offsetLeft += docOffset.left;

@@ -1062,3 +1061,10 @@ this.offsetLeft = parseInt(this.offsetLeft);

var cw = parseInt(main.clientWidth || 50);
var ch = parseInt(main.clientHeight || 50);
if (directionData == 'top') {
this.offsetTop -= ch + 6;
}
this.offsetTop += 'px';
var _mainOffset = parseInt(arrowOffset - cw / 2);

@@ -1065,0 +1071,0 @@

/*!
* bpui popover v1.1.13
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v1.1.14
* Copyright (c) 2021 Copyright bpuioint.lee@live.com All Rights Reserved.
* Released under the MIT License.
*/
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("@bpui/libs")),r=t(require("@bpui/dialog"));function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t,e){return t(e={exports:{}},e.exports),e.exports}var c=function(t){return t&&t.Math==Math&&t},a=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof s&&s)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},l=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,d={f:p&&!h.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:h},g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b={}.toString,v=function(t){return b.call(t).slice(8,-1)},y="".split,w=u((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==v(t)?y.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},_=function(t){return w(m(t))},T=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t,e){if(!T(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!T(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!T(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!T(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},S=function(t){return Object(m(t))},j={}.hasOwnProperty,A=Object.hasOwn||function(t,e){return j.call(S(t),e)},E=a.document,L=T(E)&&T(E.createElement),P=!l&&!u((function(){return 7!=Object.defineProperty((t="div",L?E.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),x=Object.getOwnPropertyDescriptor,k={f:l?x:function(t,e){if(t=_(t),e=O(e,!0),P)try{return x(t,e)}catch(t){}if(A(t,e))return g(!d.f.call(t,e),t[e])}},C=function(t){if(!T(t))throw TypeError(String(t)+" is not an object");return t},R=Object.defineProperty,I={f:l?R:function(t,e,r){if(C(t),e=O(e,!0),C(r),P)try{return R(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},D=l?function(t,e,r){return I.f(t,e,g(1,r))}:function(t,e,r){return t[e]=r,t},M=function(t,e){try{D(a,t,e)}catch(r){a[t]=e}return e},B=a["__core-js_shared__"]||M("__core-js_shared__",{}),H=Function.toString;"function"!=typeof B.inspectSource&&(B.inspectSource=function(t){return H.call(t)});var F,N,V,W,z=B.inspectSource,q=a.WeakMap,G="function"==typeof q&&/native code/.test(z(q)),U=f((function(t){(t.exports=function(t,e){return B[t]||(B[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),X=0,K=Math.random(),Y=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+K).toString(36)},J=U("keys"),Q={},Z=a.WeakMap;if(G||B.state){var tt=B.state||(B.state=new Z),et=tt.get,rt=tt.has,ot=tt.set;F=function(t,e){if(rt.call(tt,t))throw new TypeError("Object already initialized");return e.facade=t,ot.call(tt,t,e),e},N=function(t){return et.call(tt,t)||{}},V=function(t){return rt.call(tt,t)}}else{var it=J[W="state"]||(J[W]=Y(W));Q[it]=!0,F=function(t,e){if(A(t,it))throw new TypeError("Object already initialized");return e.facade=t,D(t,it,e),e},N=function(t){return A(t,it)?t[it]:{}},V=function(t){return A(t,it)}}var nt,st,ft={set:F,get:N,has:V,enforce:function(t){return V(t)?N(t):F(t,{})},getterFor:function(t){return function(e){var r;if(!T(e)||(r=N(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ct=f((function(t){var e=ft.get,r=ft.enforce,o=String(String).split("String");(t.exports=function(t,e,i,n){var s,f=!!n&&!!n.unsafe,c=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof i&&("string"!=typeof e||A(i,"name")||D(i,"name",e),(s=r(i)).source||(s.source=o.join("string"==typeof e?e:""))),t!==a?(f?!u&&t[e]&&(c=!0):delete t[e],c?t[e]=i:D(t,e,i)):c?t[e]=i:M(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||z(this)}))})),at=a,ut=function(t){return"function"==typeof t?t:void 0},lt=function(t,e){return arguments.length<2?ut(at[t])||ut(a[t]):at[t]&&at[t][e]||a[t]&&a[t][e]},ht=Math.ceil,pt=Math.floor,dt=function(t){return isNaN(t=+t)?0:(t>0?pt:ht)(t)},gt=Math.min,bt=function(t){return t>0?gt(dt(t),9007199254740991):0},vt=Math.max,yt=Math.min,wt=function(t){return function(e,r,o){var i,n=_(e),s=bt(n.length),f=function(t,e){var r=dt(t);return r<0?vt(r+e,0):yt(r,e)}(o,s);if(t&&r!=r){for(;s>f;)if((i=n[f++])!=i)return!0}else for(;s>f;f++)if((t||f in n)&&n[f]===r)return t||f||0;return!t&&-1}},mt={includes:wt(!0),indexOf:wt(!1)}.indexOf,_t=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),Tt={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=_(t),i=0,n=[];for(r in o)!A(Q,r)&&A(o,r)&&n.push(r);for(;e.length>i;)A(o,r=e[i++])&&(~mt(n,r)||n.push(r));return n}(t,_t)}},Ot={f:Object.getOwnPropertySymbols},St=lt("Reflect","ownKeys")||function(t){var e=Tt.f(C(t)),r=Ot.f;return r?e.concat(r(t)):e},jt=function(t,e){for(var r=St(e),o=I.f,i=k.f,n=0;n<r.length;n++){var s=r[n];A(t,s)||o(t,s,i(e,s))}},At=/#|\.prototype\./,Et=function(t,e){var r=Lt[$t(t)];return r==xt||r!=Pt&&("function"==typeof e?u(e):!!e)},$t=Et.normalize=function(t){return String(t).replace(At,".").toLowerCase()},Lt=Et.data={},Pt=Et.NATIVE="N",xt=Et.POLYFILL="P",kt=Et,Ct=k.f,Rt=Array.isArray||function(t){return"Array"==v(t)},It=function(t,e,r){var o=O(e);o in t?I.f(t,o,g(0,r)):t[o]=r},Dt=lt("navigator","userAgent")||"",Mt=a.process,Bt=Mt&&Mt.versions,Ht=Bt&&Bt.v8;Ht?st=(nt=Ht.split("."))[0]<4?1:nt[0]+nt[1]:Dt&&(!(nt=Dt.match(/Edge\/(\d+)/))||nt[1]>=74)&&(nt=Dt.match(/Chrome\/(\d+)/))&&(st=nt[1]);var Ft,Nt=st&&+st,Vt=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Nt&&Nt<41})),Wt=Vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,zt=U("wks"),qt=a.Symbol,Gt=Wt?qt:qt&&qt.withoutSetter||Y,Ut=function(t){return A(zt,t)&&(Vt||"string"==typeof zt[t])||(Vt&&A(qt,t)?zt[t]=qt[t]:zt[t]=Gt("Symbol."+t)),zt[t]},Xt=Ut("species"),Kt=function(t,e){var r;return Rt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Rt(r.prototype)?T(r)&&null===(r=r[Xt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Yt=Ut("species"),Jt=Ut("isConcatSpreadable"),Qt=Nt>=51||!u((function(){var t=[];return t[Jt]=!1,t.concat()[0]!==t})),Zt=(Ft="concat",Nt>=51||!u((function(){var t=[];return(t.constructor={})[Yt]=function(){return{foo:1}},1!==t[Ft](Boolean).foo}))),te=function(t){if(!T(t))return!1;var e=t[Jt];return void 0!==e?!!e:Rt(t)};function ee(t,e,r,o,i,n,s,f,c,a){"boolean"!=typeof s&&(c=f,f=s,s=!1);var u,l="function"==typeof r?r.options:r;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),o&&(l._scopeId=o),n?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},l._ssrRegister=u):e&&(u=s?function(t){e.call(this,a(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,f(t))}),u)if(l.functional){var h=l.render;l.render=function(t,e){return u.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return r}!function(t,e){var r,o,i,n,s,f=t.target,c=t.global,u=t.stat;if(r=c?a:u?a[f]||M(f,{}):(a[f]||{}).prototype)for(o in e){if(n=e[o],i=t.noTargetGet?(s=Ct(r,o))&&s.value:r[o],!kt(c?o:f+(u?".":"#")+o,t.forced)&&void 0!==i){if(typeof n==typeof i)continue;jt(n,i)}(t.sham||i&&i.sham)&&D(n,"sham",!0),ct(r,o,n,t)}}({target:"Array",proto:!0,forced:!Qt||!Zt},{concat:function(t){var e,r,o,i,n,s=S(this),f=Kt(s,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(te(n=-1===e?s:arguments[e])){if(c+(i=bt(n.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in n&&It(f,c,n[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");It(f,c++,n)}return f.length=c,f}});var re={components:{widget:r.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){n(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(t){var r;t&&(r=e.dom.isVueObject(t)?t.$el:t,$(r).off("mouseover",this._onTrigger),$(r).off("mouseleave",this._onTriggerHide),$(r).off("click",this._onTrigger),this.ges&&(this.ges.dispose(),this.ges=null))},_bindEvent:function(t){var r,o=this;if(this._removeEvent(t),t)if(r=e.dom.isVueObject(t)?t.$el:t,"hover"==this.trigger)e.device.browserIsMobile()?$(r).on("click",this._onTrigger):($(r).on("mouseover",this._onTrigger),$(r).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var i=(e.device.browserIsMobile(),"click");$(r).off(i,this._onTrigger).on(i,this._onTrigger)}else"long-press"==this.trigger&&(this.ges=new e.Gesture(r),this.ges.enablePressRecognizer({duration:600}),this.ges.on("press",function(t){n(this,o),e.device.vibrate(10),this._onTrigger(t)}.bind(this)))},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){n(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(t){var r=this,o=this.bind;if(this.bind){var i;i=e.dom.isVueObject(o)?o.$el:o;var s=e.dom.getElementOffset(i),f={};f.height=i.clientHeight,f.width=i.clientWidth;var c,a=e.dom.getViewPort(),u=e.dom.getDocumentOffset();this.offsetTop=s.top+u.top,"top"==t?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):"bottom"==t?(this.directionData="bottom",this.offsetTop+=f.height):"left"==t?(this.directionData="left",this.offsetLeft=s.left+f.width):"right"==t?(this.directionData="right",this.offsetLeft=s.left+f.width):s.top+f.height/2>a.height/2?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=f.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",c="left"==t||"right"==t?parseInt(s.top+f.height/2):parseInt(s.left+f.width/2);var l=this.$refs.main;e.dom.probeDom(400,function(){return n(this,r),l.clientWidth>0}.bind(this),function(){if(n(this,r),"left"==t||"right"==t){var e=parseInt(c-l.clientHeight/2);e<10&&(e=10),e+l.clientHeight>a.height-10&&(e=a.height-10-l.clientHeight),this.offsetTop=parseInt(e+u.top)+"px",this.offsetLeft="right"==t?s.left+f.width-6:s.left-l.clientWidth-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-e-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(l.clientWidth||50),i=parseInt(c-o/2);i<10&&(i=10),i+o>a.width-10&&(i=a.width-10-o),this.offsetLeft=parseInt(i)+"px",this.offsetArrowLeft=parseInt(c-i)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>o-22&&(this.offsetArrowLeft=o-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){n(this,t)}.bind(this))}}},oe=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1,appendToBody:!0},on:{"update:visible":function(e){t.visibleReal=e}}},[r("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),r("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};oe._withStripped=!0;var ie={bpPopover:ee({render:oe,staticRenderFns:[]},void 0,re,void 0,!1,void 0,!1,void 0,void 0,void 0)};module.exports=ie;
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("@bpui/libs")),r=t(require("@bpui/dialog"));function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t,e){return t(e={exports:{}},e.exports),e.exports}var c=function(t){return t&&t.Math==Math&&t},a=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof s&&s)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},l=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,d={f:p&&!h.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:h},g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b={}.toString,v=function(t){return b.call(t).slice(8,-1)},y="".split,w=u((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==v(t)?y.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},_=function(t){return w(m(t))},T=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t,e){if(!T(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!T(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!T(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!T(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},S=function(t){return Object(m(t))},j={}.hasOwnProperty,A=Object.hasOwn||function(t,e){return j.call(S(t),e)},E=a.document,L=T(E)&&T(E.createElement),P=!l&&!u((function(){return 7!=Object.defineProperty((t="div",L?E.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),x=Object.getOwnPropertyDescriptor,k={f:l?x:function(t,e){if(t=_(t),e=O(e,!0),P)try{return x(t,e)}catch(t){}if(A(t,e))return g(!d.f.call(t,e),t[e])}},C=function(t){if(!T(t))throw TypeError(String(t)+" is not an object");return t},I=Object.defineProperty,R={f:l?I:function(t,e,r){if(C(t),e=O(e,!0),C(r),P)try{return I(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},D=l?function(t,e,r){return R.f(t,e,g(1,r))}:function(t,e,r){return t[e]=r,t},M=function(t,e){try{D(a,t,e)}catch(r){a[t]=e}return e},B=a["__core-js_shared__"]||M("__core-js_shared__",{}),H=Function.toString;"function"!=typeof B.inspectSource&&(B.inspectSource=function(t){return H.call(t)});var F,N,V,W,z=B.inspectSource,q=a.WeakMap,G="function"==typeof q&&/native code/.test(z(q)),U=f((function(t){(t.exports=function(t,e){return B[t]||(B[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),X=0,K=Math.random(),Y=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+K).toString(36)},J=U("keys"),Q={},Z=a.WeakMap;if(G||B.state){var tt=B.state||(B.state=new Z),et=tt.get,rt=tt.has,ot=tt.set;F=function(t,e){if(rt.call(tt,t))throw new TypeError("Object already initialized");return e.facade=t,ot.call(tt,t,e),e},N=function(t){return et.call(tt,t)||{}},V=function(t){return rt.call(tt,t)}}else{var it=J[W="state"]||(J[W]=Y(W));Q[it]=!0,F=function(t,e){if(A(t,it))throw new TypeError("Object already initialized");return e.facade=t,D(t,it,e),e},N=function(t){return A(t,it)?t[it]:{}},V=function(t){return A(t,it)}}var nt,st,ft={set:F,get:N,has:V,enforce:function(t){return V(t)?N(t):F(t,{})},getterFor:function(t){return function(e){var r;if(!T(e)||(r=N(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ct=f((function(t){var e=ft.get,r=ft.enforce,o=String(String).split("String");(t.exports=function(t,e,i,n){var s,f=!!n&&!!n.unsafe,c=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof i&&("string"!=typeof e||A(i,"name")||D(i,"name",e),(s=r(i)).source||(s.source=o.join("string"==typeof e?e:""))),t!==a?(f?!u&&t[e]&&(c=!0):delete t[e],c?t[e]=i:D(t,e,i)):c?t[e]=i:M(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||z(this)}))})),at=a,ut=function(t){return"function"==typeof t?t:void 0},lt=function(t,e){return arguments.length<2?ut(at[t])||ut(a[t]):at[t]&&at[t][e]||a[t]&&a[t][e]},ht=Math.ceil,pt=Math.floor,dt=function(t){return isNaN(t=+t)?0:(t>0?pt:ht)(t)},gt=Math.min,bt=function(t){return t>0?gt(dt(t),9007199254740991):0},vt=Math.max,yt=Math.min,wt=function(t){return function(e,r,o){var i,n=_(e),s=bt(n.length),f=function(t,e){var r=dt(t);return r<0?vt(r+e,0):yt(r,e)}(o,s);if(t&&r!=r){for(;s>f;)if((i=n[f++])!=i)return!0}else for(;s>f;f++)if((t||f in n)&&n[f]===r)return t||f||0;return!t&&-1}},mt={includes:wt(!0),indexOf:wt(!1)}.indexOf,_t=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),Tt={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=_(t),i=0,n=[];for(r in o)!A(Q,r)&&A(o,r)&&n.push(r);for(;e.length>i;)A(o,r=e[i++])&&(~mt(n,r)||n.push(r));return n}(t,_t)}},Ot={f:Object.getOwnPropertySymbols},St=lt("Reflect","ownKeys")||function(t){var e=Tt.f(C(t)),r=Ot.f;return r?e.concat(r(t)):e},jt=function(t,e){for(var r=St(e),o=R.f,i=k.f,n=0;n<r.length;n++){var s=r[n];A(t,s)||o(t,s,i(e,s))}},At=/#|\.prototype\./,Et=function(t,e){var r=Lt[$t(t)];return r==xt||r!=Pt&&("function"==typeof e?u(e):!!e)},$t=Et.normalize=function(t){return String(t).replace(At,".").toLowerCase()},Lt=Et.data={},Pt=Et.NATIVE="N",xt=Et.POLYFILL="P",kt=Et,Ct=k.f,It=Array.isArray||function(t){return"Array"==v(t)},Rt=function(t,e,r){var o=O(e);o in t?R.f(t,o,g(0,r)):t[o]=r},Dt=lt("navigator","userAgent")||"",Mt=a.process,Bt=Mt&&Mt.versions,Ht=Bt&&Bt.v8;Ht?st=(nt=Ht.split("."))[0]<4?1:nt[0]+nt[1]:Dt&&(!(nt=Dt.match(/Edge\/(\d+)/))||nt[1]>=74)&&(nt=Dt.match(/Chrome\/(\d+)/))&&(st=nt[1]);var Ft,Nt=st&&+st,Vt=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Nt&&Nt<41})),Wt=Vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,zt=U("wks"),qt=a.Symbol,Gt=Wt?qt:qt&&qt.withoutSetter||Y,Ut=function(t){return A(zt,t)&&(Vt||"string"==typeof zt[t])||(Vt&&A(qt,t)?zt[t]=qt[t]:zt[t]=Gt("Symbol."+t)),zt[t]},Xt=Ut("species"),Kt=function(t,e){var r;return It(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!It(r.prototype)?T(r)&&null===(r=r[Xt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Yt=Ut("species"),Jt=Ut("isConcatSpreadable"),Qt=Nt>=51||!u((function(){var t=[];return t[Jt]=!1,t.concat()[0]!==t})),Zt=(Ft="concat",Nt>=51||!u((function(){var t=[];return(t.constructor={})[Yt]=function(){return{foo:1}},1!==t[Ft](Boolean).foo}))),te=function(t){if(!T(t))return!1;var e=t[Jt];return void 0!==e?!!e:It(t)};function ee(t,e,r,o,i,n,s,f,c,a){"boolean"!=typeof s&&(c=f,f=s,s=!1);var u,l="function"==typeof r?r.options:r;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),o&&(l._scopeId=o),n?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},l._ssrRegister=u):e&&(u=s?function(t){e.call(this,a(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,f(t))}),u)if(l.functional){var h=l.render;l.render=function(t,e){return u.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return r}!function(t,e){var r,o,i,n,s,f=t.target,c=t.global,u=t.stat;if(r=c?a:u?a[f]||M(f,{}):(a[f]||{}).prototype)for(o in e){if(n=e[o],i=t.noTargetGet?(s=Ct(r,o))&&s.value:r[o],!kt(c?o:f+(u?".":"#")+o,t.forced)&&void 0!==i){if(typeof n==typeof i)continue;jt(n,i)}(t.sham||i&&i.sham)&&D(n,"sham",!0),ct(r,o,n,t)}}({target:"Array",proto:!0,forced:!Qt||!Zt},{concat:function(t){var e,r,o,i,n,s=S(this),f=Kt(s,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(te(n=-1===e?s:arguments[e])){if(c+(i=bt(n.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in n&&Rt(f,c,n[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Rt(f,c++,n)}return f.length=c,f}});var re={components:{widget:r.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){n(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(t){var r;t&&(r=e.dom.isVueObject(t)?t.$el:t,$(r).off("mouseover",this._onTrigger),$(r).off("mouseleave",this._onTriggerHide),$(r).off("click",this._onTrigger),this.ges&&(this.ges.dispose(),this.ges=null))},_bindEvent:function(t){var r,o=this;if(this._removeEvent(t),t)if(r=e.dom.isVueObject(t)?t.$el:t,"hover"==this.trigger)e.device.browserIsMobile()?$(r).on("click",this._onTrigger):($(r).on("mouseover",this._onTrigger),$(r).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var i=(e.device.browserIsMobile(),"click");$(r).off(i,this._onTrigger).on(i,this._onTrigger)}else"long-press"==this.trigger&&(this.ges=new e.Gesture(r),this.ges.enablePressRecognizer({duration:600}),this.ges.on("press",function(t){n(this,o),e.device.vibrate(10),this._onTrigger(t)}.bind(this)))},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){n(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(t){var r=this,o=this.bind;if(this.bind){var i;i=e.dom.isVueObject(o)?o.$el:o;var s=e.dom.getElementOffset(i),f={};f.height=i.clientHeight,f.width=i.clientWidth;var c,a=e.dom.getViewPort(),u=e.dom.getDocumentOffset();this.offsetTop=s.top+u.top,"top"==t?(this.directionData="top",this.offsetTop-=8):"bottom"==t?(this.directionData="bottom",this.offsetTop+=f.height):"left"==t?(this.directionData="left",this.offsetLeft=s.left+f.width):"right"==t?(this.directionData="right",this.offsetLeft=s.left+f.width):s.top+f.height/2>a.height/2?(t="top",this.directionData="top",this.offsetTop-=8):(t="bottom",this.directionData="bottom",this.offsetTop+=f.height),this.offsetTop=parseInt(this.offsetTop),c="left"==t||"right"==t?parseInt(s.top+f.height/2):parseInt(s.left+f.width/2);var l=this.$refs.main;e.dom.probeDom(400,function(){return n(this,r),l.clientWidth>0}.bind(this),function(){if(n(this,r),"left"==t||"right"==t){var e=parseInt(c-l.clientHeight/2);e<10&&(e=10),e+l.clientHeight>a.height-10&&(e=a.height-10-l.clientHeight),this.offsetTop=parseInt(e+u.top)+"px",this.offsetLeft="right"==t?s.left+f.width+6:s.left-l.clientWidth-6-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-e-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(l.clientWidth||50),i=parseInt(l.clientHeight||50);"top"==t&&(this.offsetTop-=i+6),this.offsetTop+="px";var h=parseInt(c-o/2);h<10&&(h=10),h+o>a.width-10&&(h=a.width-10-o),this.offsetLeft=parseInt(h)+"px",this.offsetArrowLeft=parseInt(c-h)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>o-22&&(this.offsetArrowLeft=o-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){n(this,t)}.bind(this))}}},oe=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1,appendToBody:!0},on:{"update:visible":function(e){t.visibleReal=e}}},[r("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),r("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};oe._withStripped=!0;var ie={bpPopover:ee({render:oe,staticRenderFns:[]},void 0,re,void 0,!1,void 0,!1,void 0,void 0,void 0)};module.exports=ie;
/*!
* bpui popover v1.1.13
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v1.1.14
* Copyright (c) 2021 Copyright bpuioint.lee@live.com All Rights Reserved.
* Released under the MIT License.

@@ -982,3 +982,2 @@ */

this.directionData = 'top';
this.offsetTop -= port.height;
this.offsetTop -= 8;

@@ -996,6 +995,7 @@ } else if (directionData == 'bottom') {

if (offset.top + port.height / 2 > viewPort.height / 2) {
directionData = 'top';
this.directionData = 'top';
this.offsetTop -= port.height;
this.offsetTop -= 8;
} else {
directionData = 'bottom';
this.directionData = 'bottom';

@@ -1006,4 +1006,3 @@ this.offsetTop += port.height;

this.offsetTop = parseInt(this.offsetTop);
this.offsetTop += 'px'; // arrow.
this.offsetTop = parseInt(this.offsetTop); // arrow.

@@ -1039,3 +1038,3 @@ var arrowOffset;

this.offsetTop = parseInt(mainOffset + docOffset.top) + 'px';
this.offsetLeft = directionData == 'right' ? offset.left + port.width - 6 : offset.left - main.clientWidth - 6;
this.offsetLeft = directionData == 'right' ? offset.left + port.width + 6 : offset.left - main.clientWidth - 6 - 6;
this.offsetLeft += docOffset.left;

@@ -1058,3 +1057,10 @@ this.offsetLeft = parseInt(this.offsetLeft);

var cw = parseInt(main.clientWidth || 50);
var ch = parseInt(main.clientHeight || 50);
if (directionData == 'top') {
this.offsetTop -= ch + 6;
}
this.offsetTop += 'px';
var _mainOffset = parseInt(arrowOffset - cw / 2);

@@ -1061,0 +1067,0 @@

/*!
* bpui popover v1.1.13
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v1.1.14
* Copyright (c) 2021 Copyright bpuioint.lee@live.com All Rights Reserved.
* Released under the MIT License.
*/
import t from"@bpui/libs";import e from"@bpui/dialog";function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t,e){return t(e={exports:{}},e.exports),e.exports}var f=function(t){return t&&t.Math==Math&&t},c=f("object"==typeof globalThis&&globalThis)||f("object"==typeof window&&window)||f("object"==typeof self&&self)||f("object"==typeof n&&n)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g={}.toString,b=function(t){return g.call(t).slice(8,-1)},v="".split,y=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==b(t)?v.call(t,""):Object(t)}:Object,w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return y(w(t))},_=function(t){return"object"==typeof t?null!==t:"function"==typeof t},T=function(t,e){if(!_(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!_(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},O=function(t){return Object(w(t))},S={}.hasOwnProperty,j=Object.hasOwn||function(t,e){return S.call(O(t),e)},A=c.document,E=_(A)&&_(A.createElement),L=!u&&!a((function(){return 7!=Object.defineProperty((t="div",E?A.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),P=Object.getOwnPropertyDescriptor,x={f:u?P:function(t,e){if(t=m(t),e=T(e,!0),L)try{return P(t,e)}catch(t){}if(j(t,e))return d(!p.f.call(t,e),t[e])}},k=function(t){if(!_(t))throw TypeError(String(t)+" is not an object");return t},C=Object.defineProperty,R={f:u?C:function(t,e,r){if(k(t),e=T(e,!0),k(r),L)try{return C(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},I=u?function(t,e,r){return R.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},D=function(t,e){try{I(c,t,e)}catch(r){c[t]=e}return e},M=c["__core-js_shared__"]||D("__core-js_shared__",{}),B=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return B.call(t)});var H,F,N,V,W=M.inspectSource,z=c.WeakMap,G="function"==typeof z&&/native code/.test(W(z)),U=s((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),X=0,q=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+q).toString(36)},Y=U("keys"),J={},Q=c.WeakMap;if(G||M.state){var Z=M.state||(M.state=new Q),tt=Z.get,et=Z.has,rt=Z.set;H=function(t,e){if(et.call(Z,t))throw new TypeError("Object already initialized");return e.facade=t,rt.call(Z,t,e),e},F=function(t){return tt.call(Z,t)||{}},N=function(t){return et.call(Z,t)}}else{var ot=Y[V="state"]||(Y[V]=K(V));J[ot]=!0,H=function(t,e){if(j(t,ot))throw new TypeError("Object already initialized");return e.facade=t,I(t,ot,e),e},F=function(t){return j(t,ot)?t[ot]:{}},N=function(t){return j(t,ot)}}var it,nt,st={set:H,get:F,has:N,enforce:function(t){return N(t)?F(t):H(t,{})},getterFor:function(t){return function(e){var r;if(!_(e)||(r=F(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ft=s((function(t){var e=st.get,r=st.enforce,o=String(String).split("String");(t.exports=function(t,e,i,n){var s,f=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof i&&("string"!=typeof e||j(i,"name")||I(i,"name",e),(s=r(i)).source||(s.source=o.join("string"==typeof e?e:""))),t!==c?(f?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=i:I(t,e,i)):a?t[e]=i:D(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||W(this)}))})),ct=c,at=function(t){return"function"==typeof t?t:void 0},ut=function(t,e){return arguments.length<2?at(ct[t])||at(c[t]):ct[t]&&ct[t][e]||c[t]&&c[t][e]},lt=Math.ceil,ht=Math.floor,pt=function(t){return isNaN(t=+t)?0:(t>0?ht:lt)(t)},dt=Math.min,gt=function(t){return t>0?dt(pt(t),9007199254740991):0},bt=Math.max,vt=Math.min,yt=function(t){return function(e,r,o){var i,n=m(e),s=gt(n.length),f=function(t,e){var r=pt(t);return r<0?bt(r+e,0):vt(r,e)}(o,s);if(t&&r!=r){for(;s>f;)if((i=n[f++])!=i)return!0}else for(;s>f;f++)if((t||f in n)&&n[f]===r)return t||f||0;return!t&&-1}},wt={includes:yt(!0),indexOf:yt(!1)}.indexOf,mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=m(t),i=0,n=[];for(r in o)!j(J,r)&&j(o,r)&&n.push(r);for(;e.length>i;)j(o,r=e[i++])&&(~wt(n,r)||n.push(r));return n}(t,mt)}},Tt={f:Object.getOwnPropertySymbols},Ot=ut("Reflect","ownKeys")||function(t){var e=_t.f(k(t)),r=Tt.f;return r?e.concat(r(t)):e},St=function(t,e){for(var r=Ot(e),o=R.f,i=x.f,n=0;n<r.length;n++){var s=r[n];j(t,s)||o(t,s,i(e,s))}},jt=/#|\.prototype\./,At=function(t,e){var r=$t[Et(t)];return r==Pt||r!=Lt&&("function"==typeof e?a(e):!!e)},Et=At.normalize=function(t){return String(t).replace(jt,".").toLowerCase()},$t=At.data={},Lt=At.NATIVE="N",Pt=At.POLYFILL="P",xt=At,kt=x.f,Ct=Array.isArray||function(t){return"Array"==b(t)},Rt=function(t,e,r){var o=T(e);o in t?R.f(t,o,d(0,r)):t[o]=r},It=ut("navigator","userAgent")||"",Dt=c.process,Mt=Dt&&Dt.versions,Bt=Mt&&Mt.v8;Bt?nt=(it=Bt.split("."))[0]<4?1:it[0]+it[1]:It&&(!(it=It.match(/Edge\/(\d+)/))||it[1]>=74)&&(it=It.match(/Chrome\/(\d+)/))&&(nt=it[1]);var Ht,Ft=nt&&+nt,Nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ft&&Ft<41})),Vt=Nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Wt=U("wks"),zt=c.Symbol,Gt=Vt?zt:zt&&zt.withoutSetter||K,Ut=function(t){return j(Wt,t)&&(Nt||"string"==typeof Wt[t])||(Nt&&j(zt,t)?Wt[t]=zt[t]:Wt[t]=Gt("Symbol."+t)),Wt[t]},Xt=Ut("species"),qt=function(t,e){var r;return Ct(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ct(r.prototype)?_(r)&&null===(r=r[Xt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Kt=Ut("species"),Yt=Ut("isConcatSpreadable"),Jt=Ft>=51||!a((function(){var t=[];return t[Yt]=!1,t.concat()[0]!==t})),Qt=(Ht="concat",Ft>=51||!a((function(){var t=[];return(t.constructor={})[Kt]=function(){return{foo:1}},1!==t[Ht](Boolean).foo}))),Zt=function(t){if(!_(t))return!1;var e=t[Yt];return void 0!==e?!!e:Ct(t)};function te(t,e,r,o,i,n,s,f,c,a){"boolean"!=typeof s&&(c=f,f=s,s=!1);var u,l="function"==typeof r?r.options:r;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),o&&(l._scopeId=o),n?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},l._ssrRegister=u):e&&(u=s?function(t){e.call(this,a(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,f(t))}),u)if(l.functional){var h=l.render;l.render=function(t,e){return u.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return r}!function(t,e){var r,o,i,n,s,f=t.target,a=t.global,u=t.stat;if(r=a?c:u?c[f]||D(f,{}):(c[f]||{}).prototype)for(o in e){if(n=e[o],i=t.noTargetGet?(s=kt(r,o))&&s.value:r[o],!xt(a?o:f+(u?".":"#")+o,t.forced)&&void 0!==i){if(typeof n==typeof i)continue;St(n,i)}(t.sham||i&&i.sham)&&I(n,"sham",!0),ft(r,o,n,t)}}({target:"Array",proto:!0,forced:!Jt||!Qt},{concat:function(t){var e,r,o,i,n,s=O(this),f=qt(s,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(Zt(n=-1===e?s:arguments[e])){if(c+(i=gt(n.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in n&&Rt(f,c,n[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Rt(f,c++,n)}return f.length=c,f}});var ee={components:{widget:e.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){i(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(e){var r;e&&(r=t.dom.isVueObject(e)?e.$el:e,$(r).off("mouseover",this._onTrigger),$(r).off("mouseleave",this._onTriggerHide),$(r).off("click",this._onTrigger),this.ges&&(this.ges.dispose(),this.ges=null))},_bindEvent:function(e){var r,o=this;if(this._removeEvent(e),e)if(r=t.dom.isVueObject(e)?e.$el:e,"hover"==this.trigger)t.device.browserIsMobile()?$(r).on("click",this._onTrigger):($(r).on("mouseover",this._onTrigger),$(r).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var n=(t.device.browserIsMobile(),"click");$(r).off(n,this._onTrigger).on(n,this._onTrigger)}else"long-press"==this.trigger&&(this.ges=new t.Gesture(r),this.ges.enablePressRecognizer({duration:600}),this.ges.on("press",function(e){i(this,o),t.device.vibrate(10),this._onTrigger(e)}.bind(this)))},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){i(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(e){var r=this,o=this.bind;if(this.bind){var n;n=t.dom.isVueObject(o)?o.$el:o;var s=t.dom.getElementOffset(n),f={};f.height=n.clientHeight,f.width=n.clientWidth;var c,a=t.dom.getViewPort(),u=t.dom.getDocumentOffset();this.offsetTop=s.top+u.top,"top"==e?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):"bottom"==e?(this.directionData="bottom",this.offsetTop+=f.height):"left"==e?(this.directionData="left",this.offsetLeft=s.left+f.width):"right"==e?(this.directionData="right",this.offsetLeft=s.left+f.width):s.top+f.height/2>a.height/2?(this.directionData="top",this.offsetTop-=f.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=f.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",c="left"==e||"right"==e?parseInt(s.top+f.height/2):parseInt(s.left+f.width/2);var l=this.$refs.main;t.dom.probeDom(400,function(){return i(this,r),l.clientWidth>0}.bind(this),function(){if(i(this,r),"left"==e||"right"==e){var t=parseInt(c-l.clientHeight/2);t<10&&(t=10),t+l.clientHeight>a.height-10&&(t=a.height-10-l.clientHeight),this.offsetTop=parseInt(t+u.top)+"px",this.offsetLeft="right"==e?s.left+f.width-6:s.left-l.clientWidth-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-t-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(l.clientWidth||50),n=parseInt(c-o/2);n<10&&(n=10),n+o>a.width-10&&(n=a.width-10-o),this.offsetLeft=parseInt(n)+"px",this.offsetArrowLeft=parseInt(c-n)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>o-22&&(this.offsetArrowLeft=o-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){i(this,t)}.bind(this))}}},re=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1,appendToBody:!0},on:{"update:visible":function(e){t.visibleReal=e}}},[r("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),r("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};re._withStripped=!0;var oe={bpPopover:te({render:re,staticRenderFns:[]},void 0,ee,void 0,!1,void 0,!1,void 0,void 0,void 0)};export default oe;
import t from"@bpui/libs";import e from"@bpui/dialog";function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t,e){return t(e={exports:{}},e.exports),e.exports}var f=function(t){return t&&t.Math==Math&&t},c=f("object"==typeof globalThis&&globalThis)||f("object"==typeof window&&window)||f("object"==typeof self&&self)||f("object"==typeof n&&n)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g={}.toString,b=function(t){return g.call(t).slice(8,-1)},v="".split,y=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==b(t)?v.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},w=function(t){return y(m(t))},_=function(t){return"object"==typeof t?null!==t:"function"==typeof t},T=function(t,e){if(!_(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!_(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},O=function(t){return Object(m(t))},S={}.hasOwnProperty,j=Object.hasOwn||function(t,e){return S.call(O(t),e)},A=c.document,E=_(A)&&_(A.createElement),L=!u&&!a((function(){return 7!=Object.defineProperty((t="div",E?A.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),P=Object.getOwnPropertyDescriptor,x={f:u?P:function(t,e){if(t=w(t),e=T(e,!0),L)try{return P(t,e)}catch(t){}if(j(t,e))return d(!p.f.call(t,e),t[e])}},k=function(t){if(!_(t))throw TypeError(String(t)+" is not an object");return t},C=Object.defineProperty,I={f:u?C:function(t,e,r){if(k(t),e=T(e,!0),k(r),L)try{return C(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},R=u?function(t,e,r){return I.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},D=function(t,e){try{R(c,t,e)}catch(r){c[t]=e}return e},M=c["__core-js_shared__"]||D("__core-js_shared__",{}),B=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return B.call(t)});var H,F,N,V,W=M.inspectSource,z=c.WeakMap,G="function"==typeof z&&/native code/.test(W(z)),U=s((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),X=0,q=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+q).toString(36)},Y=U("keys"),J={},Q=c.WeakMap;if(G||M.state){var Z=M.state||(M.state=new Q),tt=Z.get,et=Z.has,rt=Z.set;H=function(t,e){if(et.call(Z,t))throw new TypeError("Object already initialized");return e.facade=t,rt.call(Z,t,e),e},F=function(t){return tt.call(Z,t)||{}},N=function(t){return et.call(Z,t)}}else{var ot=Y[V="state"]||(Y[V]=K(V));J[ot]=!0,H=function(t,e){if(j(t,ot))throw new TypeError("Object already initialized");return e.facade=t,R(t,ot,e),e},F=function(t){return j(t,ot)?t[ot]:{}},N=function(t){return j(t,ot)}}var it,nt,st={set:H,get:F,has:N,enforce:function(t){return N(t)?F(t):H(t,{})},getterFor:function(t){return function(e){var r;if(!_(e)||(r=F(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ft=s((function(t){var e=st.get,r=st.enforce,o=String(String).split("String");(t.exports=function(t,e,i,n){var s,f=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof i&&("string"!=typeof e||j(i,"name")||R(i,"name",e),(s=r(i)).source||(s.source=o.join("string"==typeof e?e:""))),t!==c?(f?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=i:R(t,e,i)):a?t[e]=i:D(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||W(this)}))})),ct=c,at=function(t){return"function"==typeof t?t:void 0},ut=function(t,e){return arguments.length<2?at(ct[t])||at(c[t]):ct[t]&&ct[t][e]||c[t]&&c[t][e]},lt=Math.ceil,ht=Math.floor,pt=function(t){return isNaN(t=+t)?0:(t>0?ht:lt)(t)},dt=Math.min,gt=function(t){return t>0?dt(pt(t),9007199254740991):0},bt=Math.max,vt=Math.min,yt=function(t){return function(e,r,o){var i,n=w(e),s=gt(n.length),f=function(t,e){var r=pt(t);return r<0?bt(r+e,0):vt(r,e)}(o,s);if(t&&r!=r){for(;s>f;)if((i=n[f++])!=i)return!0}else for(;s>f;f++)if((t||f in n)&&n[f]===r)return t||f||0;return!t&&-1}},mt={includes:yt(!0),indexOf:yt(!1)}.indexOf,wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=w(t),i=0,n=[];for(r in o)!j(J,r)&&j(o,r)&&n.push(r);for(;e.length>i;)j(o,r=e[i++])&&(~mt(n,r)||n.push(r));return n}(t,wt)}},Tt={f:Object.getOwnPropertySymbols},Ot=ut("Reflect","ownKeys")||function(t){var e=_t.f(k(t)),r=Tt.f;return r?e.concat(r(t)):e},St=function(t,e){for(var r=Ot(e),o=I.f,i=x.f,n=0;n<r.length;n++){var s=r[n];j(t,s)||o(t,s,i(e,s))}},jt=/#|\.prototype\./,At=function(t,e){var r=$t[Et(t)];return r==Pt||r!=Lt&&("function"==typeof e?a(e):!!e)},Et=At.normalize=function(t){return String(t).replace(jt,".").toLowerCase()},$t=At.data={},Lt=At.NATIVE="N",Pt=At.POLYFILL="P",xt=At,kt=x.f,Ct=Array.isArray||function(t){return"Array"==b(t)},It=function(t,e,r){var o=T(e);o in t?I.f(t,o,d(0,r)):t[o]=r},Rt=ut("navigator","userAgent")||"",Dt=c.process,Mt=Dt&&Dt.versions,Bt=Mt&&Mt.v8;Bt?nt=(it=Bt.split("."))[0]<4?1:it[0]+it[1]:Rt&&(!(it=Rt.match(/Edge\/(\d+)/))||it[1]>=74)&&(it=Rt.match(/Chrome\/(\d+)/))&&(nt=it[1]);var Ht,Ft=nt&&+nt,Nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ft&&Ft<41})),Vt=Nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Wt=U("wks"),zt=c.Symbol,Gt=Vt?zt:zt&&zt.withoutSetter||K,Ut=function(t){return j(Wt,t)&&(Nt||"string"==typeof Wt[t])||(Nt&&j(zt,t)?Wt[t]=zt[t]:Wt[t]=Gt("Symbol."+t)),Wt[t]},Xt=Ut("species"),qt=function(t,e){var r;return Ct(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ct(r.prototype)?_(r)&&null===(r=r[Xt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Kt=Ut("species"),Yt=Ut("isConcatSpreadable"),Jt=Ft>=51||!a((function(){var t=[];return t[Yt]=!1,t.concat()[0]!==t})),Qt=(Ht="concat",Ft>=51||!a((function(){var t=[];return(t.constructor={})[Kt]=function(){return{foo:1}},1!==t[Ht](Boolean).foo}))),Zt=function(t){if(!_(t))return!1;var e=t[Yt];return void 0!==e?!!e:Ct(t)};function te(t,e,r,o,i,n,s,f,c,a){"boolean"!=typeof s&&(c=f,f=s,s=!1);var u,l="function"==typeof r?r.options:r;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),o&&(l._scopeId=o),n?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},l._ssrRegister=u):e&&(u=s?function(t){e.call(this,a(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,f(t))}),u)if(l.functional){var h=l.render;l.render=function(t,e){return u.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return r}!function(t,e){var r,o,i,n,s,f=t.target,a=t.global,u=t.stat;if(r=a?c:u?c[f]||D(f,{}):(c[f]||{}).prototype)for(o in e){if(n=e[o],i=t.noTargetGet?(s=kt(r,o))&&s.value:r[o],!xt(a?o:f+(u?".":"#")+o,t.forced)&&void 0!==i){if(typeof n==typeof i)continue;St(n,i)}(t.sham||i&&i.sham)&&R(n,"sham",!0),ft(r,o,n,t)}}({target:"Array",proto:!0,forced:!Jt||!Qt},{concat:function(t){var e,r,o,i,n,s=O(this),f=qt(s,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(Zt(n=-1===e?s:arguments[e])){if(c+(i=gt(n.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in n&&It(f,c,n[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");It(f,c++,n)}return f.length=c,f}});var ee={components:{widget:e.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){i(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(e){var r;e&&(r=t.dom.isVueObject(e)?e.$el:e,$(r).off("mouseover",this._onTrigger),$(r).off("mouseleave",this._onTriggerHide),$(r).off("click",this._onTrigger),this.ges&&(this.ges.dispose(),this.ges=null))},_bindEvent:function(e){var r,o=this;if(this._removeEvent(e),e)if(r=t.dom.isVueObject(e)?e.$el:e,"hover"==this.trigger)t.device.browserIsMobile()?$(r).on("click",this._onTrigger):($(r).on("mouseover",this._onTrigger),$(r).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var n=(t.device.browserIsMobile(),"click");$(r).off(n,this._onTrigger).on(n,this._onTrigger)}else"long-press"==this.trigger&&(this.ges=new t.Gesture(r),this.ges.enablePressRecognizer({duration:600}),this.ges.on("press",function(e){i(this,o),t.device.vibrate(10),this._onTrigger(e)}.bind(this)))},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){i(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(e){var r=this,o=this.bind;if(this.bind){var n;n=t.dom.isVueObject(o)?o.$el:o;var s=t.dom.getElementOffset(n),f={};f.height=n.clientHeight,f.width=n.clientWidth;var c,a=t.dom.getViewPort(),u=t.dom.getDocumentOffset();this.offsetTop=s.top+u.top,"top"==e?(this.directionData="top",this.offsetTop-=8):"bottom"==e?(this.directionData="bottom",this.offsetTop+=f.height):"left"==e?(this.directionData="left",this.offsetLeft=s.left+f.width):"right"==e?(this.directionData="right",this.offsetLeft=s.left+f.width):s.top+f.height/2>a.height/2?(e="top",this.directionData="top",this.offsetTop-=8):(e="bottom",this.directionData="bottom",this.offsetTop+=f.height),this.offsetTop=parseInt(this.offsetTop),c="left"==e||"right"==e?parseInt(s.top+f.height/2):parseInt(s.left+f.width/2);var l=this.$refs.main;t.dom.probeDom(400,function(){return i(this,r),l.clientWidth>0}.bind(this),function(){if(i(this,r),"left"==e||"right"==e){var t=parseInt(c-l.clientHeight/2);t<10&&(t=10),t+l.clientHeight>a.height-10&&(t=a.height-10-l.clientHeight),this.offsetTop=parseInt(t+u.top)+"px",this.offsetLeft="right"==e?s.left+f.width+6:s.left-l.clientWidth-6-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-t-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(l.clientWidth||50),n=parseInt(l.clientHeight||50);"top"==e&&(this.offsetTop-=n+6),this.offsetTop+="px";var h=parseInt(c-o/2);h<10&&(h=10),h+o>a.width-10&&(h=a.width-10-o),this.offsetLeft=parseInt(h)+"px",this.offsetArrowLeft=parseInt(c-h)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>o-22&&(this.offsetArrowLeft=o-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){i(this,t)}.bind(this))}}},re=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1,appendToBody:!0},on:{"update:visible":function(e){t.visibleReal=e}}},[r("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),r("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};re._withStripped=!0;var oe={bpPopover:te({render:re,staticRenderFns:[]},void 0,ee,void 0,!1,void 0,!1,void 0,void 0,void 0)};export default oe;
/*!
* bpui popover v1.1.13
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v1.1.14
* Copyright (c) 2021 Copyright bpuioint.lee@live.com All Rights Reserved.
* Released under the MIT License.

@@ -988,3 +988,2 @@ */

this.directionData = 'top';
this.offsetTop -= port.height;
this.offsetTop -= 8;

@@ -1002,6 +1001,7 @@ } else if (directionData == 'bottom') {

if (offset.top + port.height / 2 > viewPort.height / 2) {
directionData = 'top';
this.directionData = 'top';
this.offsetTop -= port.height;
this.offsetTop -= 8;
} else {
directionData = 'bottom';
this.directionData = 'bottom';

@@ -1012,4 +1012,3 @@ this.offsetTop += port.height;

this.offsetTop = parseInt(this.offsetTop);
this.offsetTop += 'px'; // arrow.
this.offsetTop = parseInt(this.offsetTop); // arrow.

@@ -1045,3 +1044,3 @@ var arrowOffset;

this.offsetTop = parseInt(mainOffset + docOffset.top) + 'px';
this.offsetLeft = directionData == 'right' ? offset.left + port.width - 6 : offset.left - main.clientWidth - 6;
this.offsetLeft = directionData == 'right' ? offset.left + port.width + 6 : offset.left - main.clientWidth - 6 - 6;
this.offsetLeft += docOffset.left;

@@ -1064,3 +1063,10 @@ this.offsetLeft = parseInt(this.offsetLeft);

var cw = parseInt(main.clientWidth || 50);
var ch = parseInt(main.clientHeight || 50);
if (directionData == 'top') {
this.offsetTop -= ch + 6;
}
this.offsetTop += 'px';
var _mainOffset = parseInt(arrowOffset - cw / 2);

@@ -1067,0 +1073,0 @@

/*!
* bpui popover v1.1.13
* Copyright (c) 2021 Copyright bpoint.lee@live.com All Rights Reserved.
* bpui popover v1.1.14
* Copyright (c) 2021 Copyright bpuioint.lee@live.com All Rights Reserved.
* Released under the MIT License.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@bpui/libs"),require("@bpui/dialog")):"function"==typeof define&&define.amd?define(["@bpui/libs","@bpui/dialog"],e):(t=t||self).bpPopover=e(t.bpLibs,t.bpDialog)}(this,(function(t,e){"use strict";function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t,e){return t(e={exports:{}},e.exports),e.exports}var s=function(t){return t&&t.Math==Math&&t},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g={}.toString,b=function(t){return g.call(t).slice(8,-1)},v="".split,y=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==b(t)?v.call(t,""):Object(t)}:Object,w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return y(w(t))},_=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t,e){if(!_(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!_(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},T=function(t){return Object(w(t))},S={}.hasOwnProperty,j=Object.hasOwn||function(t,e){return S.call(T(t),e)},A=c.document,E=_(A)&&_(A.createElement),P=!u&&!a((function(){return 7!=Object.defineProperty((t="div",E?A.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),L=Object.getOwnPropertyDescriptor,x={f:u?L:function(t,e){if(t=m(t),e=O(e,!0),P)try{return L(t,e)}catch(t){}if(j(t,e))return d(!p.f.call(t,e),t[e])}},k=function(t){if(!_(t))throw TypeError(String(t)+" is not an object");return t},C=Object.defineProperty,R={f:u?C:function(t,e,r){if(k(t),e=O(e,!0),k(r),P)try{return C(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},I=u?function(t,e,r){return R.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},D=function(t,e){try{I(c,t,e)}catch(r){c[t]=e}return e},M=c["__core-js_shared__"]||D("__core-js_shared__",{}),B=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return B.call(t)});var H,F,N,V,W=M.inspectSource,z=c.WeakMap,q="function"==typeof z&&/native code/.test(W(z)),G=f((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),U=0,X=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++U+X).toString(36)},Y=G("keys"),J={},Q=c.WeakMap;if(q||M.state){var Z=M.state||(M.state=new Q),tt=Z.get,et=Z.has,rt=Z.set;H=function(t,e){if(et.call(Z,t))throw new TypeError("Object already initialized");return e.facade=t,rt.call(Z,t,e),e},F=function(t){return tt.call(Z,t)||{}},N=function(t){return et.call(Z,t)}}else{var ot=Y[V="state"]||(Y[V]=K(V));J[ot]=!0,H=function(t,e){if(j(t,ot))throw new TypeError("Object already initialized");return e.facade=t,I(t,ot,e),e},F=function(t){return j(t,ot)?t[ot]:{}},N=function(t){return j(t,ot)}}var it,nt,ft={set:H,get:F,has:N,enforce:function(t){return N(t)?F(t):H(t,{})},getterFor:function(t){return function(e){var r;if(!_(e)||(r=F(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},st=f((function(t){var e=ft.get,r=ft.enforce,o=String(String).split("String");(t.exports=function(t,e,i,n){var f,s=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof i&&("string"!=typeof e||j(i,"name")||I(i,"name",e),(f=r(i)).source||(f.source=o.join("string"==typeof e?e:""))),t!==c?(s?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=i:I(t,e,i)):a?t[e]=i:D(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||W(this)}))})),ct=c,at=function(t){return"function"==typeof t?t:void 0},ut=function(t,e){return arguments.length<2?at(ct[t])||at(c[t]):ct[t]&&ct[t][e]||c[t]&&c[t][e]},lt=Math.ceil,ht=Math.floor,pt=function(t){return isNaN(t=+t)?0:(t>0?ht:lt)(t)},dt=Math.min,gt=function(t){return t>0?dt(pt(t),9007199254740991):0},bt=Math.max,vt=Math.min,yt=function(t){return function(e,r,o){var i,n=m(e),f=gt(n.length),s=function(t,e){var r=pt(t);return r<0?bt(r+e,0):vt(r,e)}(o,f);if(t&&r!=r){for(;f>s;)if((i=n[s++])!=i)return!0}else for(;f>s;s++)if((t||s in n)&&n[s]===r)return t||s||0;return!t&&-1}},wt={includes:yt(!0),indexOf:yt(!1)}.indexOf,mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=m(t),i=0,n=[];for(r in o)!j(J,r)&&j(o,r)&&n.push(r);for(;e.length>i;)j(o,r=e[i++])&&(~wt(n,r)||n.push(r));return n}(t,mt)}},Ot={f:Object.getOwnPropertySymbols},Tt=ut("Reflect","ownKeys")||function(t){var e=_t.f(k(t)),r=Ot.f;return r?e.concat(r(t)):e},St=function(t,e){for(var r=Tt(e),o=R.f,i=x.f,n=0;n<r.length;n++){var f=r[n];j(t,f)||o(t,f,i(e,f))}},jt=/#|\.prototype\./,At=function(t,e){var r=Pt[Et(t)];return r==Lt||r!=$t&&("function"==typeof e?a(e):!!e)},Et=At.normalize=function(t){return String(t).replace(jt,".").toLowerCase()},Pt=At.data={},$t=At.NATIVE="N",Lt=At.POLYFILL="P",xt=At,kt=x.f,Ct=Array.isArray||function(t){return"Array"==b(t)},Rt=function(t,e,r){var o=O(e);o in t?R.f(t,o,d(0,r)):t[o]=r},It=ut("navigator","userAgent")||"",Dt=c.process,Mt=Dt&&Dt.versions,Bt=Mt&&Mt.v8;Bt?nt=(it=Bt.split("."))[0]<4?1:it[0]+it[1]:It&&(!(it=It.match(/Edge\/(\d+)/))||it[1]>=74)&&(it=It.match(/Chrome\/(\d+)/))&&(nt=it[1]);var Ht,Ft=nt&&+nt,Nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ft&&Ft<41})),Vt=Nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Wt=G("wks"),zt=c.Symbol,qt=Vt?zt:zt&&zt.withoutSetter||K,Gt=function(t){return j(Wt,t)&&(Nt||"string"==typeof Wt[t])||(Nt&&j(zt,t)?Wt[t]=zt[t]:Wt[t]=qt("Symbol."+t)),Wt[t]},Ut=Gt("species"),Xt=function(t,e){var r;return Ct(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ct(r.prototype)?_(r)&&null===(r=r[Ut])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Kt=Gt("species"),Yt=Gt("isConcatSpreadable"),Jt=Ft>=51||!a((function(){var t=[];return t[Yt]=!1,t.concat()[0]!==t})),Qt=(Ht="concat",Ft>=51||!a((function(){var t=[];return(t.constructor={})[Kt]=function(){return{foo:1}},1!==t[Ht](Boolean).foo}))),Zt=function(t){if(!_(t))return!1;var e=t[Yt];return void 0!==e?!!e:Ct(t)};function te(t,e,r,o,i,n,f,s,c,a){"boolean"!=typeof f&&(c=s,s=f,f=!1);var u,l="function"==typeof r?r.options:r;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),o&&(l._scopeId=o),n?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},l._ssrRegister=u):e&&(u=f?function(t){e.call(this,a(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),u)if(l.functional){var h=l.render;l.render=function(t,e){return u.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return r}!function(t,e){var r,o,i,n,f,s=t.target,a=t.global,u=t.stat;if(r=a?c:u?c[s]||D(s,{}):(c[s]||{}).prototype)for(o in e){if(n=e[o],i=t.noTargetGet?(f=kt(r,o))&&f.value:r[o],!xt(a?o:s+(u?".":"#")+o,t.forced)&&void 0!==i){if(typeof n==typeof i)continue;St(n,i)}(t.sham||i&&i.sham)&&I(n,"sham",!0),st(r,o,n,t)}}({target:"Array",proto:!0,forced:!Jt||!Qt},{concat:function(t){var e,r,o,i,n,f=T(this),s=Xt(f,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(Zt(n=-1===e?f:arguments[e])){if(c+(i=gt(n.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in n&&Rt(s,c,n[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Rt(s,c++,n)}return s.length=c,s}});var ee={components:{widget:e.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){i(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(e){var r;e&&(r=t.dom.isVueObject(e)?e.$el:e,$(r).off("mouseover",this._onTrigger),$(r).off("mouseleave",this._onTriggerHide),$(r).off("click",this._onTrigger),this.ges&&(this.ges.dispose(),this.ges=null))},_bindEvent:function(e){var r,o=this;if(this._removeEvent(e),e)if(r=t.dom.isVueObject(e)?e.$el:e,"hover"==this.trigger)t.device.browserIsMobile()?$(r).on("click",this._onTrigger):($(r).on("mouseover",this._onTrigger),$(r).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var n=(t.device.browserIsMobile(),"click");$(r).off(n,this._onTrigger).on(n,this._onTrigger)}else"long-press"==this.trigger&&(this.ges=new t.Gesture(r),this.ges.enablePressRecognizer({duration:600}),this.ges.on("press",function(e){i(this,o),t.device.vibrate(10),this._onTrigger(e)}.bind(this)))},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){i(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(e){var r=this,o=this.bind;if(this.bind){var n;n=t.dom.isVueObject(o)?o.$el:o;var f=t.dom.getElementOffset(n),s={};s.height=n.clientHeight,s.width=n.clientWidth;var c,a=t.dom.getViewPort(),u=t.dom.getDocumentOffset();this.offsetTop=f.top+u.top,"top"==e?(this.directionData="top",this.offsetTop-=s.height,this.offsetTop-=8):"bottom"==e?(this.directionData="bottom",this.offsetTop+=s.height):"left"==e?(this.directionData="left",this.offsetLeft=f.left+s.width):"right"==e?(this.directionData="right",this.offsetLeft=f.left+s.width):f.top+s.height/2>a.height/2?(this.directionData="top",this.offsetTop-=s.height,this.offsetTop-=8):(this.directionData="bottom",this.offsetTop+=s.height),this.offsetTop=parseInt(this.offsetTop),this.offsetTop+="px",c="left"==e||"right"==e?parseInt(f.top+s.height/2):parseInt(f.left+s.width/2);var l=this.$refs.main;t.dom.probeDom(400,function(){return i(this,r),l.clientWidth>0}.bind(this),function(){if(i(this,r),"left"==e||"right"==e){var t=parseInt(c-l.clientHeight/2);t<10&&(t=10),t+l.clientHeight>a.height-10&&(t=a.height-10-l.clientHeight),this.offsetTop=parseInt(t+u.top)+"px",this.offsetLeft="right"==e?f.left+s.width-6:f.left-l.clientWidth-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-t-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(l.clientWidth||50),n=parseInt(c-o/2);n<10&&(n=10),n+o>a.width-10&&(n=a.width-10-o),this.offsetLeft=parseInt(n)+"px",this.offsetArrowLeft=parseInt(c-n)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>o-22&&(this.offsetArrowLeft=o-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){i(this,t)}.bind(this))}}},re=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1,appendToBody:!0},on:{"update:visible":function(e){t.visibleReal=e}}},[r("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),r("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};re._withStripped=!0;return{bpPopover:te({render:re,staticRenderFns:[]},void 0,ee,void 0,!1,void 0,!1,void 0,void 0,void 0)}}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@bpui/libs"),require("@bpui/dialog")):"function"==typeof define&&define.amd?define(["@bpui/libs","@bpui/dialog"],e):(t=t||self).bpPopover=e(t.bpLibs,t.bpDialog)}(this,(function(t,e){"use strict";function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(t,e){return t(e={exports:{}},e.exports),e.exports}var s=function(t){return t&&t.Math==Math&&t},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g={}.toString,b=function(t){return g.call(t).slice(8,-1)},v="".split,y=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==b(t)?v.call(t,""):Object(t)}:Object,w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return y(w(t))},_=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t,e){if(!_(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!_(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!_(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")},T=function(t){return Object(w(t))},S={}.hasOwnProperty,j=Object.hasOwn||function(t,e){return S.call(T(t),e)},A=c.document,E=_(A)&&_(A.createElement),P=!u&&!a((function(){return 7!=Object.defineProperty((t="div",E?A.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),L=Object.getOwnPropertyDescriptor,x={f:u?L:function(t,e){if(t=m(t),e=O(e,!0),P)try{return L(t,e)}catch(t){}if(j(t,e))return d(!p.f.call(t,e),t[e])}},k=function(t){if(!_(t))throw TypeError(String(t)+" is not an object");return t},C=Object.defineProperty,I={f:u?C:function(t,e,r){if(k(t),e=O(e,!0),k(r),P)try{return C(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},R=u?function(t,e,r){return I.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},D=function(t,e){try{R(c,t,e)}catch(r){c[t]=e}return e},M=c["__core-js_shared__"]||D("__core-js_shared__",{}),B=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return B.call(t)});var H,F,N,V,W=M.inspectSource,z=c.WeakMap,q="function"==typeof z&&/native code/.test(W(z)),G=f((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),U=0,X=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++U+X).toString(36)},Y=G("keys"),J={},Q=c.WeakMap;if(q||M.state){var Z=M.state||(M.state=new Q),tt=Z.get,et=Z.has,rt=Z.set;H=function(t,e){if(et.call(Z,t))throw new TypeError("Object already initialized");return e.facade=t,rt.call(Z,t,e),e},F=function(t){return tt.call(Z,t)||{}},N=function(t){return et.call(Z,t)}}else{var ot=Y[V="state"]||(Y[V]=K(V));J[ot]=!0,H=function(t,e){if(j(t,ot))throw new TypeError("Object already initialized");return e.facade=t,R(t,ot,e),e},F=function(t){return j(t,ot)?t[ot]:{}},N=function(t){return j(t,ot)}}var it,nt,ft={set:H,get:F,has:N,enforce:function(t){return N(t)?F(t):H(t,{})},getterFor:function(t){return function(e){var r;if(!_(e)||(r=F(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},st=f((function(t){var e=ft.get,r=ft.enforce,o=String(String).split("String");(t.exports=function(t,e,i,n){var f,s=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof i&&("string"!=typeof e||j(i,"name")||R(i,"name",e),(f=r(i)).source||(f.source=o.join("string"==typeof e?e:""))),t!==c?(s?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=i:R(t,e,i)):a?t[e]=i:D(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||W(this)}))})),ct=c,at=function(t){return"function"==typeof t?t:void 0},ut=function(t,e){return arguments.length<2?at(ct[t])||at(c[t]):ct[t]&&ct[t][e]||c[t]&&c[t][e]},lt=Math.ceil,ht=Math.floor,pt=function(t){return isNaN(t=+t)?0:(t>0?ht:lt)(t)},dt=Math.min,gt=function(t){return t>0?dt(pt(t),9007199254740991):0},bt=Math.max,vt=Math.min,yt=function(t){return function(e,r,o){var i,n=m(e),f=gt(n.length),s=function(t,e){var r=pt(t);return r<0?bt(r+e,0):vt(r,e)}(o,f);if(t&&r!=r){for(;f>s;)if((i=n[s++])!=i)return!0}else for(;f>s;s++)if((t||s in n)&&n[s]===r)return t||s||0;return!t&&-1}},wt={includes:yt(!0),indexOf:yt(!1)}.indexOf,mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),_t={f:Object.getOwnPropertyNames||function(t){return function(t,e){var r,o=m(t),i=0,n=[];for(r in o)!j(J,r)&&j(o,r)&&n.push(r);for(;e.length>i;)j(o,r=e[i++])&&(~wt(n,r)||n.push(r));return n}(t,mt)}},Ot={f:Object.getOwnPropertySymbols},Tt=ut("Reflect","ownKeys")||function(t){var e=_t.f(k(t)),r=Ot.f;return r?e.concat(r(t)):e},St=function(t,e){for(var r=Tt(e),o=I.f,i=x.f,n=0;n<r.length;n++){var f=r[n];j(t,f)||o(t,f,i(e,f))}},jt=/#|\.prototype\./,At=function(t,e){var r=Pt[Et(t)];return r==Lt||r!=$t&&("function"==typeof e?a(e):!!e)},Et=At.normalize=function(t){return String(t).replace(jt,".").toLowerCase()},Pt=At.data={},$t=At.NATIVE="N",Lt=At.POLYFILL="P",xt=At,kt=x.f,Ct=Array.isArray||function(t){return"Array"==b(t)},It=function(t,e,r){var o=O(e);o in t?I.f(t,o,d(0,r)):t[o]=r},Rt=ut("navigator","userAgent")||"",Dt=c.process,Mt=Dt&&Dt.versions,Bt=Mt&&Mt.v8;Bt?nt=(it=Bt.split("."))[0]<4?1:it[0]+it[1]:Rt&&(!(it=Rt.match(/Edge\/(\d+)/))||it[1]>=74)&&(it=Rt.match(/Chrome\/(\d+)/))&&(nt=it[1]);var Ht,Ft=nt&&+nt,Nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Ft&&Ft<41})),Vt=Nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Wt=G("wks"),zt=c.Symbol,qt=Vt?zt:zt&&zt.withoutSetter||K,Gt=function(t){return j(Wt,t)&&(Nt||"string"==typeof Wt[t])||(Nt&&j(zt,t)?Wt[t]=zt[t]:Wt[t]=qt("Symbol."+t)),Wt[t]},Ut=Gt("species"),Xt=function(t,e){var r;return Ct(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Ct(r.prototype)?_(r)&&null===(r=r[Ut])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Kt=Gt("species"),Yt=Gt("isConcatSpreadable"),Jt=Ft>=51||!a((function(){var t=[];return t[Yt]=!1,t.concat()[0]!==t})),Qt=(Ht="concat",Ft>=51||!a((function(){var t=[];return(t.constructor={})[Kt]=function(){return{foo:1}},1!==t[Ht](Boolean).foo}))),Zt=function(t){if(!_(t))return!1;var e=t[Yt];return void 0!==e?!!e:Ct(t)};function te(t,e,r,o,i,n,f,s,c,a){"boolean"!=typeof f&&(c=s,s=f,f=!1);var u,l="function"==typeof r?r.options:r;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),o&&(l._scopeId=o),n?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},l._ssrRegister=u):e&&(u=f?function(t){e.call(this,a(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),u)if(l.functional){var h=l.render;l.render=function(t,e){return u.call(e),h(t,e)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,u):[u]}return r}!function(t,e){var r,o,i,n,f,s=t.target,a=t.global,u=t.stat;if(r=a?c:u?c[s]||D(s,{}):(c[s]||{}).prototype)for(o in e){if(n=e[o],i=t.noTargetGet?(f=kt(r,o))&&f.value:r[o],!xt(a?o:s+(u?".":"#")+o,t.forced)&&void 0!==i){if(typeof n==typeof i)continue;St(n,i)}(t.sham||i&&i.sham)&&R(n,"sham",!0),st(r,o,n,t)}}({target:"Array",proto:!0,forced:!Jt||!Qt},{concat:function(t){var e,r,o,i,n,f=T(this),s=Xt(f,0),c=0;for(e=-1,o=arguments.length;e<o;e++)if(Zt(n=-1===e?f:arguments[e])){if(c+(i=gt(n.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,c++)r in n&&It(s,c,n[r])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");It(s,c++,n)}return s.length=c,s}});var ee={components:{widget:e.bpWidget},props:{visible:Boolean,mask:{default:!1,type:Boolean},maskClose:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object,direction:{default:"auto",type:String},trigger:{type:String},bind:{}},computed:{pStyle:function(){return this.pageStyle?"string"==typeof this.pageStyle?"left:".concat(this.offsetLeft,";top:").concat(this.offsetTop,";")+this.pageStyle:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({left:this.offsetLeft,top:this.offsetTop},this.pageStyle):{left:this.offsetLeft,top:this.offsetTop}}},data:function(){return{visibleReal:!1,directionData:"auto",offsetTop:0,offsetLeft:0,offsetArrowLeft:null,offsetArrowTop:null,offsetArrowBottom:null,offsetArrowRight:null}},watch:{visible:function(t,e){this.visibleReal!=t&&(this.visibleReal=t,t!=e&&t&&this._show(this.direction))},visibleReal:function(t){this.$emit("update:visible",t)},bind:function(t,e){this._removeEvent(e),this._bindEvent(t)}},beforeMount:function(){this.visibleReal=this.visible},beforeDestroy:function(){$("body").off("click",this._hide)},mounted:function(){var t=this;this.$nextTick(function(){i(this,t),this.$parent.$forceUpdate()}.bind(this))},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()},_removeEvent:function(e){var r;e&&(r=t.dom.isVueObject(e)?e.$el:e,$(r).off("mouseover",this._onTrigger),$(r).off("mouseleave",this._onTriggerHide),$(r).off("click",this._onTrigger),this.ges&&(this.ges.dispose(),this.ges=null))},_bindEvent:function(e){var r,o=this;if(this._removeEvent(e),e)if(r=t.dom.isVueObject(e)?e.$el:e,"hover"==this.trigger)t.device.browserIsMobile()?$(r).on("click",this._onTrigger):($(r).on("mouseover",this._onTrigger),$(r).on("mouseleave",this._onTriggerHide));else if("click"==this.trigger){var n=(t.device.browserIsMobile(),"click");$(r).off(n,this._onTrigger).on(n,this._onTrigger)}else"long-press"==this.trigger&&(this.ges=new t.Gesture(r),this.ges.enablePressRecognizer({duration:600}),this.ges.on("press",function(e){i(this,o),t.device.vibrate(10),this._onTrigger(e)}.bind(this)))},_onTrigger:function(t){var e=this;this.visibleReal=!0,setTimeout(function(){i(this,e),$("body").off("click",this._hide).on("click",this._hide)}.bind(this),10),this._show(this.direction)},_onTriggerHide:function(t){this.visibleReal=!1,$("body").off("click",this._hide)},_show:function(e){var r=this,o=this.bind;if(this.bind){var n;n=t.dom.isVueObject(o)?o.$el:o;var f=t.dom.getElementOffset(n),s={};s.height=n.clientHeight,s.width=n.clientWidth;var c,a=t.dom.getViewPort(),u=t.dom.getDocumentOffset();this.offsetTop=f.top+u.top,"top"==e?(this.directionData="top",this.offsetTop-=8):"bottom"==e?(this.directionData="bottom",this.offsetTop+=s.height):"left"==e?(this.directionData="left",this.offsetLeft=f.left+s.width):"right"==e?(this.directionData="right",this.offsetLeft=f.left+s.width):f.top+s.height/2>a.height/2?(e="top",this.directionData="top",this.offsetTop-=8):(e="bottom",this.directionData="bottom",this.offsetTop+=s.height),this.offsetTop=parseInt(this.offsetTop),c="left"==e||"right"==e?parseInt(f.top+s.height/2):parseInt(f.left+s.width/2);var l=this.$refs.main;t.dom.probeDom(400,function(){return i(this,r),l.clientWidth>0}.bind(this),function(){if(i(this,r),"left"==e||"right"==e){var t=parseInt(c-l.clientHeight/2);t<10&&(t=10),t+l.clientHeight>a.height-10&&(t=a.height-10-l.clientHeight),this.offsetTop=parseInt(t+u.top)+"px",this.offsetLeft="right"==e?f.left+s.width+6:f.left-l.clientWidth-6-6,this.offsetLeft+=u.left,this.offsetLeft=parseInt(this.offsetLeft),this.offsetLeft+="px",this.offsetArrowLeft=null,this.offsetArrowBottom=null,this.offsetArrowTop=parseInt(c-t-6),this.offsetArrowTop<10?this.offsetArrowTop=10:this.offsetArrowTop>l.clientHeight-22&&(this.offsetArrowTop=parseInt(l.clientHeight-22)),this.offsetArrowTop+="px",this.offsetArrowRight=null}else{var o=parseInt(l.clientWidth||50),n=parseInt(l.clientHeight||50);"top"==e&&(this.offsetTop-=n+6),this.offsetTop+="px";var h=parseInt(c-o/2);h<10&&(h=10),h+o>a.width-10&&(h=a.width-10-o),this.offsetLeft=parseInt(h)+"px",this.offsetArrowLeft=parseInt(c-h)-6,this.offsetArrowLeft<10?this.offsetArrowLeft=10:this.offsetArrowLeft>o-22&&(this.offsetArrowLeft=o-22),this.offsetArrowLeft+="px",this.offsetArrowBottom=null,this.offsetArrowTop=null,this.offsetArrowRight=null}}.bind(this))}},_hide:function(){var t=this;$("body").off("click",this._hide),this.hide().then(function(e){i(this,t)}.bind(this))}}},re=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("widget",{ref:"widget",staticClass:"bp-popover",attrs:{visible:t.visibleReal,maskClose:t.maskClose,mask:t.mask,preventEvent:!1,hideBodyScroll:!1,appendToBody:!0},on:{"update:visible":function(e){t.visibleReal=e}}},[r("div",{ref:"main",staticClass:"bp-popover__main",class:t.pageClass,style:t.pStyle,attrs:{direction:t.directionData}},[t._t("default"),t._v(" "),r("div",{staticClass:"bp-popover__arrow",style:{left:t.offsetArrowLeft,top:t.offsetArrowTop,right:t.offsetArrowRight,bottom:t.offsetArrowBottom}})],2)])};re._withStripped=!0;return{bpPopover:te({render:re,staticRenderFns:[]},void 0,ee,void 0,!1,void 0,!1,void 0,void 0,void 0)}}));

@@ -37,3 +37,3 @@ {

"name": "@bpui/popover",
"version": "1.1.13"
"version": "1.1.14"
}
'use strict';
/**
* Copyright (c) 2020 Copyright bp All Rights Reserved.
* Copyright (c) 2020 Copyright bpui All Rights Reserved.
* Author: lipengxiang

@@ -6,0 +6,0 @@ * Date: 2020-02-17 14:52

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc