12 |
- import{r as e,w as t,g as n,b as o,u as i,e as u,f as r}from"../@vue/@vue.4762a280.js";var s;const l="undefined"!=typeof window,a=e=>"boolean"==typeof e,c=e=>"number"==typeof e,d=()=>{};function f(e){return!!n()&&(o(e),!0)}function v(e,t=200,n={}){return function(e,t){return function(...n){e((()=>t.apply(this,n)),{fn:t,thisArg:this,args:n})}}(function(e,t={}){let n,o;return u=>{const r=i(e),s=i(t.maxWait);if(n&&clearTimeout(n),r<=0||void 0!==s&&s<=0)return o&&(clearTimeout(o),o=null),u();s&&!o&&(o=setTimeout((()=>{n&&clearTimeout(n),o=null,u()}),s)),n=setTimeout((()=>{o&&clearTimeout(o),o=null,u()}),r)}}(t,n),e)}function p(n,o=200,i={}){if(o<=0)return n;const u=e(n.value),r=v((()=>{u.value=n.value}),o,i);return t(n,(()=>r())),u}function m(t,n,o={}){const{immediate:u=!0}=o,r=e(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function c(){r.value=!1,a()}function d(...e){a(),r.value=!0,s=setTimeout((()=>{r.value=!1,s=null,t(...e)}),i(n))}return u&&(r.value=!0,l&&d()),f(c),{isPending:r,start:d,stop:c}}function w(e){var t;const n=i(e);return null!=(t=null==n?void 0:n.$el)?t:n}l&&(null==(s=null==window?void 0:window.navigator)?void 0:s.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const g=l?window:void 0;function b(...e){let n,o,i,u;if("string"==typeof e[0]?([o,i,u]=e,n=g):[n,o,i,u]=e,!n)return d;let r=d;const s=t((()=>w(n)),(e=>{r(),e&&(e.addEventListener(o,i,u),r=()=>{e.removeEventListener(o,i,u),r=d})}),{immediate:!0,flush:"post"}),l=()=>{s(),r()};return f(l),l}function h(t,n,o={}){const{window:i=g,ignore:u,capture:r=!0,detectIframe:s=!1}=o;if(!i)return;const l=e(!0);let a;const c=e=>{i.clearTimeout(a);const o=w(t),r=e.composedPath();o&&o!==e.target&&!r.includes(o)&&l.value&&(u&&u.length>0&&u.some((t=>{const n=w(t);return n&&(e.target===n||r.includes(n))}))||n(e))},d=[b(i,"click",c,{passive:!0,capture:r}),b(i,"pointerdown",(e=>{const n=w(t);l.value=!!n&&!e.composedPath().includes(n)}),{passive:!0}),b(i,"pointerup",(e=>{if(0===e.button){const t=e.composedPath();e.composedPath=()=>t,a=i.setTimeout((()=>c(e)),50)}}),{passive:!0}),s&&b(i,"blur",(e=>{var o;const i=w(t);"IFRAME"!==(null==(o=document.activeElement)?void 0:o.tagName)||(null==i?void 0:i.contains(document.activeElement))||n(e)}))].filter(Boolean);return()=>d.forEach((e=>e()))}const y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},T="__vueuse_ssr_handlers__";y[T]=y[T]||{},y[T];var O,E,P=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;function x(e,n,o={}){const i=o,{window:u=g}=i,r=((e,t)=>{var n={};for(var o in e)N.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&P)for(var o of P(e))t.indexOf(o)<0&&_.call(e,o)&&(n[o]=e[o]);return n})(i,["window"]);let s;const l=u&&"ResizeObserver"in u,a=()=>{s&&(s.disconnect(),s=void 0)},c=t((()=>w(e)),(e=>{a(),l&&u&&e&&(s=new ResizeObserver(n),s.observe(e,r))}),{immediate:!0,flush:"post"}),d=()=>{a(),c()};return f(d),{isSupported:l,stop:d}}function I(n,o,i,s={}){var l,a;const{passive:c=!1,eventName:d,deep:f=!1,defaultValue:v}=s,p=r(),m=i||(null==p?void 0:p.emit)||(null==(l=null==p?void 0:p.$emit)?void 0:l.bind(p))||(null==(a=null==p?void 0:p.proxy)?void 0:a.emit);let w=d;o||(o="modelValue"),w=d||w||`update:${o.toString()}`;const g=()=>void 0!==n[o]?n[o]:v;if(c){const i=e(g());return t((()=>n[o]),(e=>i.value=e)),t(i,(e=>{(e!==n[o]||f)&&m(w,e)}),{deep:f}),i}return u({get:()=>g(),set(e){m(w,e)}})}(E=O||(O={})).UP="UP",E.RIGHT="RIGHT",E.DOWN="DOWN",E.LEFT="LEFT",E.NONE="NONE";export{c as a,a as b,b as c,w as d,m as e,I as f,l as i,h as o,p as r,f as t,x as u};
|