PageSourceSearch

https://andalsoftware.com/assets/use-transform-DPyvJSI2.js

js andalsoftware.com collected 2026-10-04 13:33:33 UTC 8,358 bytes, 1 lines download raw bytes

1import{r as h}from"./vendor-GPGsv0WI.js";import{f as m,c as L,b as $,d as F,e as X,p as q,v as Q,g as R,h as Z,n as Y,r as ee,j as te,k as P,l as p,o as S}from"./PageWrapper-Cgfsujtc.js";import{i as se,u as x,a as j,M as ne}from"./index-Bi-eA3Wq.js";function U(e,t){let s;const n=()=>{const{currentTime:r}=t,c=(r===null?0:r.value)/100;s!==c&&e(c),s=c};return m.preUpdate(n,!0),()=>L(n)}function re(...e){const t=!Array.isArray(e[0]),s=t?0:-1,n=e[0+s],r=e[1+s],l=e[2+s],c=e[3+s],o=$(r,l,c);return t?o(n):o}function A(e){return typeof window>"u"?!1:e?F():X()}const le=50,C=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ce=()=>({time:0,x:C(),y:C()}),oe={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function H(e,t,s,n){const r=s[t],{length:l,position:c}=oe[t],o=r.current,f=s.time;r.current=Math.abs(e[`scroll${c}`]),r.scrollLength=e[`scroll${l}`]-e[`client${l}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=q(0,r.scrollLength,r.current);const i=n-f;r.velocity=i>le?0:Q(r.current-o,i)}function ie(e,t,s){H(e,"x",t,s),H(e,"y",t,s),t.time=s}function fe(e,t){const s={x:0,y:0};let n=e;for(;n&&n!==t;)if(se(n))s.x+=n.offsetLeft,s.y+=n.offsetTop,n=n.offsetParent;else if(n.tagName==="svg"){const r=n.getBoundingClientRect();n=n.parentElement;const l=n.getBoundingClientRect();s.x+=r.left-l.left,s.y+=r.top-l.top}else if(n instanceof SVGGraphicsElement){const{x:r,y:l}=n.getBBox();s.x+=r,s.y+=l;let c=null,o=n.parentNode;for(;!c;)o.tagName==="svg"&&(c=o),o=n.parentNode;n=c}else break;return s}const W={start:0,center:.5,end:1};function b(e,t,s=0){let n=0;if(e in W&&(e=W[e]),typeof e=="string"){const r=parseFloat(e);e.endsWith("px")?n=r:e.endsWith("%")?e=r/100:e.endsWith("vw")?n=r/100*document.documentElement.clientWidth:e.endsWith("vh")?n=r/100*document.documentElement.clientHeight:e=r}return typeof e=="number"&&(n=t*e),s+n}const ue=[0,0];function ae(e,t,s,n){let r=Array.isArray(e)?e:ue,l=0,c=0;return typeof e=="number"?r=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?r=e.split(" "):r=[e,W[e]?e:"0"]),l=b(r[0],s,n),c=b(r[1],t),l-c}const w={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},de={x:0,y:0};function he(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function ge(e,t,s){const{offset:n=w.All}=s,{target:r=e,axis:l="y"}=s,c=l==="y"?"height":"width",o=r!==e?fe(r,e):de,f=r===e?{width:e.scrollWidth,height:e.scrollHeight}:he(r),i={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let u=!t[l].interpolate;const d=n.length;for(let a=0;a<d;a++){const y=ae(n[a],i[c],f[c],o[l]);!u&&y!==t[l].interpolatorOffsets[a]&&(u=!0),t[l].offset[a]=y}u&&(t[l].interpolate=$(t[l].offset,R(n),{clamp:!1}),t[l].interpolatorOffsets=[...t[l].offset]),t[l].progress=Z(0,1,t[l].interpolate(t[l].current))}function me(e,t=e,s){if(s.x.targetOffset=0,s.y.targetOffset=0,t!==e){let n=t;for(;n&&n!==e;)s.x.targetOffset+=n.offsetLeft,s.y.targetOffset+=n.offsetTop,n=n.offsetParent}s.x.targetLength=t===e?t.scrollWidth:t.clientWidth,s.y.targetLength=t===e?t.scrollHeight:t.clientHeight,s.x.containerLength=e.clientWidth,s.y.containerLength=e.clientHeight}function ye(e,t,s,n={}){return{measure:r=>{me(e,n.target,s),ie(e,s,r),(n.offset||n.target)&&ge(e,s,n)},notify:()=>t(s)}}const g=new WeakMap,B=new WeakMap,T=new WeakMap,M=new WeakMap,v=new WeakMap,O=e=>e===document.scrollingElement?window:e;function G(e,{container:t=document.scrollingElement,trackContentSize:s=!1,...n}={}){if(!t)return Y;let r=T.get(t);r||(r=new Set,T.set(t,r));const l=ce(),c=ye(t,e,l,n);if(r.add(c),!g.has(t)){const f=()=>{for(const a of r)a.measure(te.timestamp);m.preUpdate(i)},i=()=>{for(const a of r)a.notify()},u=()=>m.read(f);g.set(t,u);const d=O(t);window.addEventListener("resize",u),t!==document.documentElement&&B.set(t,ee(t,u)),d.addEventListener("scroll",u),u()}if(s&&!v.has(t)){const f=g.get(t),i={width:t.scrollWidth,height:t.scrollHeight};M.set(t,i);const u=()=>{const a=t.scrollWidth,y=t.scrollHeight;(i.width!==a||i.height!==y)&&(f(),i.width=a,i.height=y)},d=m.read(u,!0);v.set(t,d)}const o=g.get(t);return m.read(o,!1,!0),()=>{var d;L(o);const f=T.get(t);if(!f||(f.delete(c),f.size))return;const i=g.get(t);g.delete(t),i&&(O(t).removeEventListener("scroll",i),(d=B.get(t))==null||d(),window.removeEventListener("resize",i));const u=v.get(t);u&&(L(u),v.delete(t)),M.delete(t)}}const pe=[[w.Enter,"entry"],[w.Exit,"exit"],[w.Any,"cover"],[w.All,"contain"]],V={start:0,end:1};function we(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const s=V[t[0]],n=V[t[1]];if(!(s===void 0||n===void 0))return[s,n]}function xe(e){if(e.length!==2)return;const t=[];for(const s of e)if(Array.isArray(s))t.push(s);else if(typeof s=="string"){const n=we(s);if(!n)return;t.push(n)}else return;return t}function ve(e,t){const s=xe(e);if(!s)return!1;for(let n=0;n<2;n++){const r=s[n],l=t[n];if(r[0]!==l[0]||r[1]!==l[1])return!1}return!0}function k(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,s]of pe)if(ve(e,t))return{rangeStart:`${s} 0%`,rangeEnd:`${s} 100%`}}const z=new Map;function I(e){const t={value:0},s=G(n=>{t.value=n[e.axis].progress*100},e);return{currentTime:t,cancel:s}}function K({source:e,container:t,...s}){const{axis:n}=s;e&&(t=e);let r=z.get(t);r||(r=new Map,z.set(t,r));const l=s.target??"self";let c=r.get(l);c||(c={},r.set(l,c));const o=n+(s.offset??[]).join(",");return c[o]||(s.target&&A(s.target)?k(s.offset)?c[o]=new ViewTimeline({subject:s.target,axis:n}):c[o]=I({container:t,...s}):A()?c[o]=new ScrollTimeline({source:t,axis:n}):c[o]=I({container:t,...s})),c[o]}function Ee(e,t){const s=K(t),n=t.target?k(t.offset):void 0,r=t.target?A(t.target)&&!!n:A();return e.attachTimeline({timeline:r?s:void 0,...n&&r&&{rangeStart:n.rangeStart,rangeEnd:n.rangeEnd},observe:l=>(l.pause(),U(c=>{l.time=l.iterationDuration*c},s))})}function Le(e){return e.length===2}function Ae(e,t){return Le(e)?G(s=>{e(s[t.axis].progress,s)},t):U(e,K(t))}function J(e,{axis:t="y",container:s=document.scrollingElement,...n}={}){if(!s)return Y;const r={axis:t,container:s,...n};return typeof e=="function"?Ae(e,r):Ee(e,r)}const Se=()=>({scrollX:p(0),scrollY:p(0),scrollXProgress:p(0),scrollYProgress:p(0)}),E=e=>e?!e.current:!1;function N(e,t,s,n){return{factory:r=>J(r,{...t,axis:e,container:(s==null?void 0:s.current)||void 0,target:(n==null?void 0:n.current)||void 0}),times:[0,1],keyframes:[0,1],ease:r=>r,duration:1}}function Te(e,t){return typeof window>"u"?!1:e?F()&&!!k(t):X()}function Me({container:e,target:t,...s}={}){const n=x(Se);Te(t,s.offset)&&(n.scrollXProgress.accelerate=N("x",s,e,t),n.scrollYProgress.accelerate=N("y",s,e,t));const r=h.useRef(null),l=h.useRef(!1),c=h.useCallback(()=>(r.current=J((o,{x:f,y:i})=>{n.scrollX.set(f.current),n.scrollXProgress.set(f.progress),n.scrollY.set(i.current),n.scrollYProgress.set(i.progress)},{...s,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var o;(o=r.current)==null||o.call(r)}),[e,t,JSON.stringify(s.offset)]);return j(()=>
1{if(l.current=!1,E(e)||E(t)){l.current=!0;return}else return c()},[c]),h.useEffect(()=>{if(l.current)return P(!E(e)),P(!E(t)),c()},[c]),n}function We(e){const t=x(()=>p(e)),{isStatic:s}=h.useContext(ne);if(s){const[,n]=h.useState(e);h.useEffect(()=>t.on("change",n),[])}return t}function _(e,t){const s=We(t()),n=()=>s.set(t());return n(),j(()=>{const r=()=>m.preRender(n,!1,!0),l=e.map(c=>c.on("change",r));return()=>{l.forEach(c=>c()),L(n)}}),s}function ke(e){S.current=[],e();const t=_(S.current,e);return S.current=void 0,t}function Pe(e,t,s,n){if(typeof e=="function")return ke(e);if(s!==void 0&&!Array.isArray(s)&&typeof t!="function")return Ce(e,t,s,n);const c=typeof t=="function"?t:re(t,s,n),o=Array.isArray(e)?D(e,c):D([e],([i])=>c(i)),f=Array.isArray(e)?void 0:e.accelerate;return f&&!f.isTransformed&&typeof t!="function"&&Array.isArray(s)&&(n==null?void 0:n.clamp)!==!1&&(o.accelerate={...f,times:t,keyframes:s,isTransformed:!0}),o}function D(e,t){const s=x(()=>[]);return _(e,()=>{s.length=0;const n=e.length;for(let r=0;r<n;r++)s[r]=e[r].get();return t(s)})}function Ce(e,t,s,n){const r=x(()=>Object.keys(s)),l=x(()=>({}));for(const c of r)l[c]=Pe(e,t,s[c],n);return l}export{Pe as a,We as b,Me as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.