fischer-agentkit/src/agentkit/server/static/assets/zoom-BE7hnYTX.js

15 lines
7.3 KiB
JavaScript

import{aR as x,ba as D,z as c,U as V,b5 as W,bG as _,F as H,bi as T,L as A,b8 as g,bH as j,bI as C,f as Z,d as G,P as q,ay as J,E as Q,i as k,G as X,T as Y,c as ee,bJ as te,at as ne,K as p,aN as s}from"./index-CMOUF6MJ.js";import{w as L}from"./_plugin-vue_export-helper-BXCjjis4.js";let R=!1;try{const e=Object.defineProperty({},"passive",{get(){R=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}function Ee(e,n,o,t){if(e&&e.addEventListener){let r=t;r===void 0&&R&&(n==="touchstart"||n==="touchmove"||n==="wheel")&&(r={passive:!1}),e.addEventListener(n,o,r)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(n,o)}}}function oe(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,r=e;if(Array.isArray(e)&&(r=x(e)[0]),!r)return null;const a=D(r,n,t);return a.props=o?c(c({},a.props),n):a.props,V(typeof a.props.class!="object"),a}function Se(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e.map(t=>oe(t,n,o))}function Ce(e,n,o){T(D(e,c({},n)),o)}const M=e=>(e||[]).some(n=>W(n)?!(n.type===_||n.type===H&&!M(n.children)):!0)?e:null;function Le(e,n,o,t){var r;const a=(r=e[n])===null||r===void 0?void 0:r.call(e,o);return M(a)?a:t==null?void 0:t()}let O;function B(e){if(typeof document>"u")return 0;if(O===void 0){const n=document.createElement("div");n.style.width="100%",n.style.height="200px";const o=document.createElement("div"),t=o.style;t.position="absolute",t.top="0",t.left="0",t.pointerEvents="none",t.visibility="hidden",t.width="200px",t.height="150px",t.overflow="hidden",o.appendChild(n),document.body.appendChild(o);const r=n.offsetWidth;o.style.overflow="scroll";let a=n.offsetWidth;r===a&&(a=o.clientWidth),document.body.removeChild(o),O=r-a}return O}function P(e){const n=e.match(/^(.*)px$/),o=Number(n==null?void 0:n[1]);return Number.isNaN(o)?B():o}function Pe(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};const{width:n,height:o}=getComputedStyle(e,"::-webkit-scrollbar");return{width:P(n),height:P(o)}}const ae=`vc-util-locker-${Date.now()}`;let I=0;function re(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function ie(e){const n=Z(()=>!!e&&!!e.value);I+=1;const o=`${ae}_${I}`;A(t=>{if(g()){if(n.value){const r=B(),a=re();j(`
html body {
overflow-y: hidden;
${a?`width: calc(100% - ${r}px);`:""}
}`,o)}else C(o);t(()=>{C(o)})}},{flush:"post"})}let m=0;const v=g(),N=e=>{if(!v)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(typeof e=="object"&&e instanceof window.HTMLElement)return e}return document.body},Ie=G({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:q.any,visible:{type:Boolean,default:void 0},autoLock:ne(),didUpdate:Function},setup(e,n){let{slots:o}=n;const t=p(),r=p(),a=p(),z=p(1),y=g()&&document.createElement("div"),$=()=>{var i,l;t.value===y&&((l=(i=t.value)===null||i===void 0?void 0:i.parentNode)===null||l===void 0||l.removeChild(t.value)),t.value=null};let f=null;const h=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||t.value&&!t.value.parentNode?(f=N(e.getContainer),f?(f.appendChild(t.value),!0):!1):!0},E=()=>v?(t.value||(t.value=y,h(!0)),S(),t.value):null,S=()=>{const{wrapperClassName:i}=e;t.value&&i&&i!==t.value.className&&(t.value.className=i)};return J(()=>{S(),h()}),ie(Z(()=>e.autoLock&&e.visible&&g()&&(t.value===document.body||t.value===y))),Q(()=>{let i=!1;k([()=>e.visible,()=>e.getContainer],(l,d)=>{let[w,u]=l,[F,b]=d;v&&(f=N(e.getContainer),f===document.body&&(w&&!F?m+=1:i&&(m-=1))),i&&(typeof u=="function"&&typeof b=="function"?u.toString()!==b.toString():u!==b)&&$(),i=!0},{immediate:!0,flush:"post"}),X(()=>{h()||(a.value=L(()=>{z.value+=1}))})}),Y(()=>{const{visible:i}=e;v&&f===document.body&&(m=i&&m?m-1:m),$(),L.cancel(a.value)}),()=>{const{forceRender:i,visible:l}=e;let d=null;const w={getOpenCount:()=>m,getContainer:E};return z.value&&(i||l||r.value)&&(d=ee(te,{getContainer:E,ref:r,didUpdate:e.didUpdate},{default:()=>{var u;return(u=o.default)===null||u===void 0?void 0:u.call(o,w)}})),d}}}),se=e=>({animationDuration:e,animationFillMode:"both"}),le=e=>({animationDuration:e,animationFillMode:"both"}),ue=function(e,n,o,t){const a=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
${a}${e}-enter,
${a}${e}-appear
`]:c(c({},se(t)),{animationPlayState:"paused"}),[`${a}${e}-leave`]:c(c({},le(t)),{animationPlayState:"paused"}),[`
${a}${e}-enter${e}-enter-active,
${a}${e}-appear${e}-appear-active
`]:{animationName:n,animationPlayState:"running"},[`${a}${e}-leave${e}-leave-active`]:{animationName:o,animationPlayState:"running",pointerEvents:"none"}}},me=new s("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),ce=new s("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),K=new s("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),U=new s("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),fe=new s("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),de=new s("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),pe=new s("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),ve=new s("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),ge=new s("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),ye=new s("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),he=new s("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),we=new s("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),be={zoom:{inKeyframes:me,outKeyframes:ce},"zoom-big":{inKeyframes:K,outKeyframes:U},"zoom-big-fast":{inKeyframes:K,outKeyframes:U},"zoom-left":{inKeyframes:pe,outKeyframes:ve},"zoom-right":{inKeyframes:ge,outKeyframes:ye},"zoom-up":{inKeyframes:fe,outKeyframes:de},"zoom-down":{inKeyframes:he,outKeyframes:we}},Ne=(e,n)=>{const{antCls:o}=e,t=`${o}-${n}`,{inKeyframes:r,outKeyframes:a}=be[n];return[ue(t,r,a,n==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
${t}-enter,
${t}-appear
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${t}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};export{Ie as P,Se as a,Le as b,oe as c,Ee as d,Pe as e,ue as f,B as g,Ne as i,R as s,Ce as t,me as z};