"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),y=require("../_util/PortalWrapper.js"),m=require("../_util/classNames.js"),N=require("../_util/hooks/useId.js"),l=require("../_util/type.js"),o={fill:"transparent","pointer-events":"auto"},w=t.defineComponent({name:"TourMask",props:{prefixCls:{type:String},pos:l.objectType(),rootClassName:{type:String},showMask:l.booleanType(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:l.booleanType(),animated:l.someType([Boolean,Object]),zIndex:{type:Number}},setup(d,{attrs:r}){const c=N.default();return()=>{const{prefixCls:a,open:s,rootClassName:h,pos:e,showMask:u,fill:p,animated:i,zIndex:f}=d,n=`${a}-mask-${c}`,g=typeof i=="object"?i?.placeholder:i;return t.createVNode(y.default,{visible:s,autoLock:!0},{default:()=>s&&t.createVNode("div",{...r,class:m.default(`${a}-mask`,h,r.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:f,pointerEvents:"none"},r.style]},[u?t.createVNode("svg",{style:{width:"100%",height:"100%"}},[t.createVNode("defs",null,[t.createVNode("mask",{id:n},[t.createVNode("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),e&&t.createVNode("rect",{x:e.left,y:e.top,rx:e.radius,width:e.width,height:e.height,fill:"black",class:g?`${a}-placeholder-animated`:""},null)])]),t.createVNode("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:p,mask:`url(#${n})`},null),e&&t.createVNode(t.Fragment,null,[t.createVNode("rect",{...o,x:"0",y:"0",width:"100%",height:e.top},null),t.createVNode("rect",{...o,x:"0",y:"0",width:e.left,height:"100%"},null),t.createVNode("rect",{...o,x:"0",y:e.top+e.height,width:"100%",height:`calc(100vh - ${e.top+e.height}px)`},null),t.createVNode("rect",{...o,x:e.left+e.width,y:"0",width:`calc(100vw - ${e.left+e.width}px)`,height:"100%"},null)])]):null])})}}});exports.default=w;
