2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
|
import{u as ye,g as he,e as be,f as ue,i as Pe,n as ce,j as Se,r as g,w as F,s as fe,k as de,l as V,b as A}from"./@vue.c3e77981.js";var Ee=Object.defineProperty,$e=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,q=(e,t,r)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ne=(e,t)=>{for(var r in t||(t={}))Ie.call(t,r)&&q(e,r,t[r]);if(J)for(var r of J(t))je.call(t,r)&&q(e,r,t[r]);return e},Te=(e,t)=>$e(e,Fe(t));function It(e,t){var r;const n=fe();return de(()=>{n.value=e()},Te(Ne({},t),{flush:(r=t==null?void 0:t.flush)!=null?r:"sync"})),V(n)}var H;const C=typeof window<"u",De=e=>typeof e<"u",jt=e=>typeof e=="boolean",pe=e=>typeof e=="function",Nt=e=>typeof e=="number",Ce=e=>typeof e=="string",D=()=>{},Ae=C&&((H=window==null?void 0:window.navigator)==null?void 0:H.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function $(e){return typeof e=="function"?e():ye(e)}function z(e,t){function r(...n){return new Promise((a,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(a).catch(o)})}return r}const ve=e=>e();function Re(e,t={}){let r,n,a=D;const o=s=>{clearTimeout(s),a(),a=D};return s=>{const u=$(e),f=$(t.maxWait);return r&&o(r),u<=0||f!==void 0&&f<=0?(n&&(o(n),n=null),Promise.resolve(s())):new Promise((p,v)=>{a=t.rejectOnCancel?v:p,f&&!n&&(n=setTimeout(()=>{r&&o(r),n=null,p(s())},f)),r=setTimeout(()=>{n&&o(n),n=null,p(s())},u)})}}function Me(e,t=!0,r=!0,n=!1){let a=0,o,l=!0,s=D,u;const f=()=>{o&&(clearTimeout(o),o=void 0,s(),s=D)};return v=>{const i=$(e),c=Date.now()-a,d=()=>u=v();return f(),i<=0?(a=Date.now(),d()):(c>i&&(r||!l)?(a=Date.now(),d()):t&&(u=new Promise((_,P)=>{s=n?P:_,o=setTimeout(()=>{a=Date.now(),l=!0,_(d()),f()},Math.max(0,i-c))})),!r&&!o&&(o=setTimeout(()=>l=!0,i)),l=!1,u)}}function ke(e=ve){const t=g(!0);function r(){t.value=!1}function n(){t.value=!0}const a=(...o)=>{t.value&&e(...o)};return{isActive:V(t),pause:r,resume:n,eventFilter:a}}function xe(e){return e}function R(e){return he()?(be(e),!0):!1}function Le(e,t=200,r={}){return z(Re(t,r),e)}function Tt(e,t=200,r={}){const n=g(e.value),a=Le(()=>{n.value=e.value},t,r);return F(e,()=>a()),n}function Dt(e,t=200,r=!1,n=!0,a=!1){return z(Me(t,r,n,a),e)}function Ve(e){return typeof e=="function"?A(e):g(e)}function W(e,t=!0){ue()?Pe(e):t?e():ce(e)}function Ct(e,t,r={}){const{immediate:n=!0}=r,a=g(!1);let o=null;function l(){o&&(clearTimeout(o),o=null)}function s(){a.value=!1,l()}function u(...f){l(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=null,e(...f)},$(t))}return n&&(a.value=!0,C&&u()),R(s),{isPending:V(a),start:u,stop:s}}function At(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,a=Se(e),o=g(e);function l(s){if(arguments.length)return o.value=s,o.value;{const u=$(r);return o.value=o.value===u?$(n):u,o.value}}return a?l:[o,l]}var B=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Qe=(e,t)=>{var r={};for(var n in e)ze.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&B)for(var n of B(e))t.indexOf(n)<0&&We.call(e,n)&&(r[n]=e[n]);return r};function Je(e,t,r={}){const n=r,{eventFilter:a=ve}=n,o=Qe(n,["eventFilter"]);return F(e,z(a,t),o)}var qe=Object.defineProperty,He=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,U=(e,t,r)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ue=(e,t)=>{for(var r in t||(t={}))me.call(t,r)&&U(e,r,t[r]);if(M)for(var r of M(t))_e.call(t,r)&&U(e,r,t[r]);return e},Ge=(e,t)=>He(e,Be(t)),Ke=(e,t)=>{var r={};for(var n in e)me.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&M)for(var n of M(e))t.indexOf(n)<0&&_e.call(e,n)&&(r[n]=e[n]);return r};function Xe(e,t,r={}){const n=r,{eventFilter:a}=n,o=Ke(n,["eventFilter"]),{eventFilter:l,pause:s,resume:u,isActive:f}=ke(a);return{stop:Je(e,t,Ge(Ue({},o),{eventFilter:l})),pause:s,resume:u,isActive:f}}function N
|