PageSourceSearch

https://platform.unago.ai/assets/dist-CFvpXl73.js

js unago.ai collected 2026-10-05 13:11:00 UTC 7,775 bytes, 1 lines download raw bytes

1import{o as ae}from"./rolldown-runtime-ChpBd9eV.js";import{a as se,n as le}from"./vendor-react-DcWoBPJp.js";import{at as C,ct as de,dt as ce,it as ue,pt as E,tt as fe,ut as _}from"./vendor-ui-hcrcJjHJ.js";import{n as me,t as Se}from"./dist-C9TPdTLl.js";var d=ae(se(),1);function O(e,[t,n]){return Math.min(n,Math.max(t,e))}var h=le(),U=["PageUp","PageDown"],F=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Y={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},P="Slider",[k,he,pe]=ue(P),[$,Te]=ce(P,[pe]),[ge,T]=$(P),X=d.forwardRef((e,t)=>{const{name:n,min:o=0,max:a=100,step:l=1,orientation:r="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:g=[o],value:v,onValueChange:i=()=>{},onValueCommit:m=()=>{},inverted:w=!1,form:b,...p}=e,f=d.useRef(new Set),S=d.useRef(0),y=r==="horizontal"?ve:we,[u=[],R]=de({prop:v,defaultProp:g,onChange:x=>{[...f.current][S.current]?.focus(),i(x)}}),A=d.useRef(u);function oe(x){D(x,_e(u,x))}function re(x){D(x,S.current)}function ie(){const x=A.current[S.current];u[S.current]!==x&&m(u)}function D(x,B,{commit:V}={commit:!1}){const I=Me(l),j=O(Ce(Math.round((x-o)/l)*l+o,I),[o,a]);R((K=[])=>{const M=Re(K,j,B);if(De(M,c*l)){S.current=M.indexOf(j);const L=String(M)!==String(K);return L&&V&&m(M),L?M:K}else return K})}return(0,h.jsx)(ge,{scope:e.__scopeSlider,name:n,disabled:s,min:o,max:a,valueIndexToChangeRef:S,thumbs:f.current,values:u,orientation:r,form:b,children:(0,h.jsx)(k.Provider,{scope:e.__scopeSlider,children:(0,h.jsx)(k.Slot,{scope:e.__scopeSlider,children:(0,h.jsx)(y,{"aria-disabled":s,"data-disabled":s?"":void 0,...p,ref:t,onPointerDown:_(p.onPointerDown,()=>{s||(A.current=u)}),min:o,max:a,inverted:w,onSlideStart:s?void 0:oe,onSlideMove:s?void 0:re,onSlideEnd:s?void 0:ie,onHomeKeyDown:()=>!s&&D(o,0,{commit:!0}),onEndKeyDown:()=>!s&&D(a,u.length-1,{commit:!0}),onStepKeyDown:({event:x,direction:B})=>{if(!s){const V=U.includes(x.key)||x.shiftKey&&F.includes(x.key)?10:1,I=S.current,j=u[I];D(j+l*V*B,I,{commit:!0})}}})})})})});X.displayName=P;var[q,G]=$(P,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ve=d.forwardRef((e,t)=>{const{min:n,max:o,dir:a,inverted:l,onSlideStart:r,onSlideMove:s,onSlideEnd:c,onStepKeyDown:g,...v}=e,[i,m]=d.useState(null),w=E(t,u=>m(u)),b=d.useRef(void 0),p=fe(a),f=p==="ltr",S=f&&!l||!f&&l;function y(u){const R=b.current||i.getBoundingClientRect(),A=H([0,R.width],S?[n,o]:[o,n]);return b.current=R,A(u-R.left)}return(0,h.jsx)(q,{scope:e.__scopeSlider,startEdge:S?"left":"right",endEdge:S?"right":"left",direction:S?1:-1,size:"width",children:(0,h.jsx)(W,{dir:p,"data-orientation":"horizontal",...v,ref:w,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:u=>{const R=y(u.clientX);r?.(R)},onSlideMove:u=>{const R=y(u.clientX);s?.(R)},onSlideEnd:()=>{b.current=void 0,c?.()},onStepKeyDown:u=>{const R=Y[S?"from-left":"from-right"].includes(u.key);g?.({event:u,direction:R?-1:1})}})})}),we=d.forwardRef((e,t)=>{const{min:n,max:o,inverted:a,onSlideStart:l,onSlideMove:r,onSlideEnd:s,onStepKeyDown:c,...g}=e,v=d.useRef(null),i=E(t,v),m=d.useRef(void 0),w=!a;function b(p){const f=m.current||v.current.getBoundingClientRect(),S=H([0,f.height],w?[o,n]:[n,o]);return m.current=f,S(p-f.top)}return(0,h.jsx)(q,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:(0,h.jsx)(W,{"data-orientation":"vertical",...g,ref:i,style:{...g.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const f=b(p.clientY);l?.(f)},onSlideMove:p=>{const f=b(p.clientY);r?.(f)},onSlideEnd:()=>{m.current=void 0,s?.()},onStepKeyDown:p=>{const f=Y[w?"from-bottom":"from-top"].includes(p.key);c?.({event:p,direction:f?-1:1})}})})}),W=d.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onHomeKeyDown:r,onEndKeyDown:s,onStepKeyDown:c,...g}=e,v=T(P,n);return(0,h.jsx)(C.span,{...g,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(s(i),i.preventDefault()):U.concat(F).includes(i.key)&&(c(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const m=i.target;m.setPointerCapture(i.pointerId),i.preventDefault(),v.thumbs.has(m)?m.focus():o(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&a(i)}),onPointerUp:_(e.onPointerUp,i=>{const m=i.target;m.hasPointerCapture(i.pointerId)&&(m.releasePointerCapture(i.pointerId),l(i))})})}),J="SliderTrack",Q=d.forwardRef((e,t)=>
1{const{__scopeSlider:n,...o}=e,a=T(J,n);return(0,h.jsx)(C.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...o,ref:t})});Q.displayName=J;var N="SliderRange",Z=d.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,a=T(N,n),l=G(N,n),r=E(t,d.useRef(null)),s=a.values.length,c=a.values.map(i=>ne(i,a.min,a.max)),g=s>1?Math.min(...c):0,v=100-Math.max(...c);return(0,h.jsx)(C.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...o,ref:r,style:{...e.style,[l.startEdge]:g+"%",[l.endEdge]:v+"%"}})});Z.displayName=N;var z="SliderThumb",ee=d.forwardRef((e,t)=>{const n=he(e.__scopeSlider),[o,a]=d.useState(null),l=E(t,s=>a(s)),r=d.useMemo(()=>o?n().findIndex(s=>s.ref.current===o):-1,[n,o]);return(0,h.jsx)(xe,{...e,ref:l,index:r})}),xe=d.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:a,...l}=e,r=T(z,n),s=G(z,n),[c,g]=d.useState(null),v=E(t,y=>g(y)),i=c?r.form||!!c.closest("form"):!0,m=Se(c),w=r.values[o],b=w===void 0?0:ne(w,r.min,r.max),p=ye(o,r.values.length),f=m?.[s.size],S=f?Ee(f,b,s.direction):0;return d.useEffect(()=>{if(c)return r.thumbs.add(c),()=>{r.thumbs.delete(c)}},[c,r.thumbs]),(0,h.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${b}% + ${S}px)`},children:[(0,h.jsx)(k.ItemSlot,{scope:e.__scopeSlider,children:(0,h.jsx)(C.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":r.min,"aria-valuenow":w,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...l,ref:v,style:w===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=o})})}),i&&(0,h.jsx)(te,{name:a??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:w},o)]})});ee.displayName=z;var be="RadioBubbleInput",te=d.forwardRef(({__scopeSlider:e,value:t,...n},o)=>{const a=d.useRef(null),l=E(a,o),r=me(t);return d.useEffect(()=>{const s=a.current;if(!s)return;const c=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(c,"value").set;if(r!==t&&g){const v=new Event("input",{bubbles:!0});g.call(s,t),s.dispatchEvent(v)}},[r,t]),(0,h.jsx)(C.input,{style:{display:"none"},...n,ref:l,defaultValue:t})});te.displayName=be;function Re(e=[],t,n){const o=[...e];return o[n]=t,o.sort((a,l)=>a-l)}function ne(e,t,n){return O(100/(n-t)*(e-t),[0,100])}function ye(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function _e(e,t){if(e.length===1)return 0;const n=e.map(a=>Math.abs(a-t)),o=Math.min(...n);return n.indexOf(o)}function Ee(e,t,n){const o=e/2;return(o-H([0,50],[0,o])(t)*n)*n}function Pe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function De(e,t){if(t>0){const n=Pe(e);return Math.min(...n)>=t}return!0}function H(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Me(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Be=X,Ve=Q,ke=Z,Ne=ee;export{O as a,Ve as i,Be as n,Ne as r,ke as t};

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.