import{u as n,i as e,g as t,b as i,d as r,r as o,e as a,f as s,n as u,h as d,j as l,k as c,w as f,p as v,l as h}from"./@vue.9084e25d.js";var p="undefined"!=typeof window;function w(n){return p?requestAnimationFrame(n):-1}function g(n){p&&cancelAnimationFrame(n)}function m(n){w((()=>w(n)))}var y=(n,e)=>({top:0,left:0,right:n,bottom:e,width:n,height:e}),b=e=>{const t=n(e);if(t===window){const n=t.innerWidth,e=t.innerHeight;return y(n,e)}return(null==t?void 0:t.getBoundingClientRect)?t.getBoundingClientRect():y(0,0)};function x(n){const a=e(n,null);if(a){const n=t(),{link:e,unlink:o,internalChildren:s}=a;e(n),i((()=>o(n)));return{parent:a,index:r((()=>s.indexOf(n)))}}return{parent:null,index:o(-1)}}var k,C,O=(n,e)=>{const t=n.indexOf(e);return-1===t?n.findIndex((n=>void 0!==e.key&&null!==e.key&&n.type===e.type&&n.key===e.key)):t};function T(n,e,t){const i=function(n){const e=[],t=n=>{Array.isArray(n)&&n.forEach((n=>{var i;h(n)&&(e.push(n),(null==(i=n.component)?void 0:i.subTree)&&(e.push(n.component.subTree),t(n.component.subTree.children)),n.children&&t(n.children))}))};return t(n),e}(n.subTree.children);t.sort(((n,e)=>O(i,n.vnode)-O(i,e.vnode)));const r=t.map((n=>n.proxy));e.sort(((n,e)=>r.indexOf(n)-r.indexOf(e)))}function E(n){const e=a([]),i=a([]),r=t();return{children:e,linkChildren:t=>{v(n,Object.assign({link:n=>{n.proxy&&(i.push(n),e.push(n.proxy),T(r,e,i))},unlink:n=>{const t=i.indexOf(n);e.splice(t,1),i.splice(t,1)},children:e,internalChildren:i},t))}}}function L(n){let e;s((()=>{n(),u((()=>{e=!0}))})),d((()=>{e&&n()}))}function j(e,t,r={}){if(!p)return;const{target:o=window,passive:a=!1,capture:s=!1}=r;let u,d=!1;const v=i=>{if(d)return;const r=n(i);r&&!u&&(r.addEventListener(e,t,{capture:s,passive:a}),u=!0)},h=i=>{if(d)return;const r=n(i);r&&u&&(r.removeEventListener(e,t,s),u=!1)};let w;return i((()=>h(o))),l((()=>h(o))),L((()=>v(o))),c(o)&&(w=f(o,((n,e)=>{h(e),v(n)}))),()=>{null==w||w(),h(o),d=!0}}function A(){if(!k&&(k=o(0),C=o(0),p)){const n=()=>{k.value=window.innerWidth,C.value=window.innerHeight};n(),window.addEventListener("resize",n,{passive:!0}),window.addEventListener("orientationchange",n,{passive:!0})}return{width:k,height:C}}var B,H=/scroll|auto|overlay/i,N=p?window:void 0;function V(n){return"HTML"!==n.tagName&&"BODY"!==n.tagName&&1===n.nodeType}function W(n,e=N){let t=n;for(;t&&t!==e&&V(t);){const{overflowY:n}=window.getComputedStyle(t);if(H.test(n))return t;t=t.parentNode}return e}function F(n,e=N){const t=o();return s((()=>{n.value&&(t.value=W(n.value,e))})),t}function R(){if(!B&&(B=o("visible"),p)){const n=()=>{B.value=document.hidden?"hidden":"visible"};n(),window.addEventListener("visibilitychange",n)}return B}var S=Symbol("van-field");function Y(n){const t=e(S,null);t&&!t.customValue.value&&(t.customValue.value=n,f(n,(()=>{t.resetValidation(),t.validateWithTrigger("onChange")})))}export{S as C,b as a,E as b,x as c,j as d,g as e,F as f,W as g,R as h,m as i,Y as j,L as o,w as r,A as u};