You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/vueuc-CbQ6ZCvR.js

2 lines
24 KiB

9 months ago
import{a as q,o as se}from"./evtd-CI_DDEu_.js";import{k as Me,d as ce,p as G,e as Ce,g as Le}from"./seemly-B7f2tHrf.js";import{A as He,F as Se,C as Ve,d as k,p as Xe,g as Te,i as fe,H as I,G as R,P as ze,N as Z,c as _,h as A,X as Ye,b as K,E as U,n as Ee,v as Ae,I as De,J as Ne,O as _e}from"./@vue-CQsYufSu.js";import{u as ee}from"./@css-render-CQdyXCYJ.js";import{h as Pe,u as ue,o as je,i as Ue}from"./vooks-BQzJqMzq.js";import{z as qe}from"./vdirs-DL8EOfHr.js";import{R as Ke}from"./@juggle-C8OzoCMD.js";import{C as Ge}from"./css-render-Ct37b3-v.js";function ae(n,e,t="default"){const o=e[t];if(o===void 0)throw new Error(`[vueuc/${n}]: slot[${t}] is empty.`);return o()}function de(n,e=!0,t=[]){return n.forEach(o=>{if(o!==null){if(typeof o!="object"){(typeof o=="string"||typeof o=="number")&&t.push(He(String(o)));return}if(Array.isArray(o)){de(o,e,t);return}if(o.type===Se){if(o.children===null)return;Array.isArray(o.children)&&de(o.children,e,t)}else o.type!==Ve&&t.push(o)}}),t}function he(n,e,t="default"){const o=e[t];if(o===void 0)throw new Error(`[vueuc/${n}]: slot[${t}] is empty.`);const r=de(o());if(r.length===1)return r[0];throw new Error(`[vueuc/${n}]: slot[${t}] should have exactly one child.`)}let X=null;function Fe(){if(X===null&&(X=document.getElementById("v-binder-view-measurer"),X===null)){X=document.createElement("div"),X.id="v-binder-view-measurer";const{style:n}=X;n.position="fixed",n.left="0",n.right="0",n.top="0",n.bottom="0",n.pointerEvents="none",n.visibility="hidden",document.body.appendChild(X)}return X.getBoundingClientRect()}function Je(n,e){const t=Fe();return{top:e,left:n,height:0,width:0,right:t.width-n,bottom:t.height-e}}function re(n){const e=n.getBoundingClientRect(),t=Fe();return{left:e.left-t.left,top:e.top-t.top,bottom:t.height+t.top-e.bottom,right:t.width+t.left-e.right,width:e.width,height:e.height}}function Qe(n){return n.nodeType===9?null:n.parentNode}function Be(n){if(n===null)return null;const e=Qe(n);if(e===null)return null;if(e.nodeType===9)return document;if(e.nodeType===1){const{overflow:t,overflowX:o,overflowY:r}=getComputedStyle(e);if(/(auto|scroll|overlay)/.test(t+r+o))return e}return Be(e)}const Ze=k({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(n){var e;Xe("VBinder",(e=Te())===null||e===void 0?void 0:e.proxy);const t=fe("VBinder",null),o=I(null),r=i=>{o.value=i,t&&n.syncTargetWithParent&&t.setTargetRef(i)};let l=[];const v=()=>{let i=o.value;for(;i=Be(i),i!==null;)l.push(i);for(const y of l)se("scroll",y,M,!0)},m=()=>{for(const i of l)q("scroll",i,M,!0);l=[]},d=new Set,g=i=>{d.size===0&&v(),d.has(i)||d.add(i)},w=i=>{d.has(i)&&d.delete(i),d.size===0&&m()},M=()=>{Me(a)},a=()=>{d.forEach(i=>i())},c=new Set,p=i=>{c.size===0&&se("resize",window,s),c.has(i)||c.add(i)},h=i=>{c.has(i)&&c.delete(i),c.size===0&&q("resize",window,s)},s=()=>{c.forEach(i=>i())};return R(()=>{q("resize",window,s),m()}),{targetRef:o,setTargetRef:r,addScrollListener:g,removeScrollListener:w,addResizeListener:p,removeResizeListener:h}},render(){return ae("binder",this.$slots)}}),$t=Ze,Mt=k({name:"Target",setup(){const{setTargetRef:n,syncTarget:e}=fe("VBinder");return{syncTarget:e,setTargetDirective:{mounted:n,updated:n}}},render(){const{syncTarget:n,setTargetDirective:e}=this;return n?ze(he("follower",this.$slots),[[e]]):he("follower",this.$slots)}});function pe(n,e){console.error(`[vueuc/${n}]: ${e}`)}const{c:O}=Ge(),te="vueuc-style";function me(n){return n&-n}class Re{constructor(e,t){this.l=e,this.min=t;const o=new Array(e+1);for(let r=0;r<e+1;++r)o[r]=0;this.ft=o}add(e,t){if(t===0)return;const{l:o,ft:r}=this;for(e+=1;e<=o;)r[e]+=t,e+=me(e)}get(e){return this.sum(e+1)-this.sum(e)}sum(e){if(e===void 0&&(e=this.l),e<=0)return 0;const{ft:t,min:o,l:r}=this;if(e>r)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let l=e*o;for(;e>0;)l+=t[e],e-=me(e);return l}getBound(e){let t=0,o=this.l;for(;o>t;){const r=Math.floor((t+o)/2),l=this.sum(r);if(l>e){o=r;continue}else if(l<e){if(t===r)return this.sum(t+1)<=e?t+1:r;t=r}else return r}return t}}function ve