2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
import{a7 as p,h as l,l as g,g as m,ae as y,j as h,O as w,af as T,ag as S}from"./framework.3f630664.js";var c;const v=typeof window<"u",D=e=>typeof e<"u",F=e=>typeof e=="function",N=e=>typeof e=="string",O=()=>{};v&&((c=window==null?void 0:window.navigator)!=null&&c.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function f(e){return typeof e=="function"?e():g(e)}function R(e){return e}function _(e,u){var s;if(typeof e=="number")return e+u;const o=((s=e.match(/^-?[0-9]+\.?[0-9]*/))==null?void 0:s[0])||"",t=e.slice(o.length),n=parseFloat(o)+u;return Number.isNaN(n)?e:n+t}function b(e){return T()?(S(e),!0):!1}function x(e){return typeof e=="function"?m(e):l(e)}function A(e,u=!0){y()?h(e):u?e():w(e)}function I(e,u,s={}){const{immediate:o=!0}=s,t=l(!1);let n=null;function i(){n&&(clearTimeout(n),n=null)}function r(){t.value=!1,i()}function a(...d){i(),t.value=!0,n=setTimeout(()=>{t.value=!1,n=null,e(...d)},f(u))}return o&&(t.value=!0,v&&a()),b(r),{isPending:t,start:a,stop:r}}function M(e=!1,u={}){const{truthyValue:s=!0,falsyValue:o=!1}=u,t=p(e),n=l(e);function i(r){if(arguments.length)return n.value=r,n.value;{const a=f(s);return n.value=n.value===a?f(o):a,n.value}}return t?i:[n,i]}export{N as a,R as b,D as c,F as d,_ as e,x as f,b as g,I as h,v as i,O as n,f as r,A as t,M as u};
|