ray-template/docs/assets/chunks/Icon.CEJcCL76.js

67 lines
29 KiB
JavaScript

import{J as sr,S as Ue,a as ge,c as N,d as ee,e as me,u as ht,n as fe,h as lr,j as cr,g as se}from"./light.BQgF5P5u.js";import{i as ur}from"./isSymbol.rCNNreax.js";import{ae as vt,q as fr,h as R,a as dr,F as bt,af as hr,al as vr,am as br,d as Be,r as pr,v as Le,$ as pt,o as U,b as je,c as te,s as gr,a2 as Me,N as le,T as qe,K as gt,p as O,an as mr,L as wr,X as yr,E as Pe,V as Sr,G as zr}from"./framework.D8G7yXPy.js";import{g as de,f as Rr,p as xr,d as Ge,c as Tr,b as we}from"./element.mIVMEYq_.js";import{u as Br,s as Er}from"./DemoFrame.vue_vue_type_script_setup_true_lang.BibqOSJQ.js";function Hr(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Je=Ue?Ue.prototype:void 0,Ke=Je?Je.toString:void 0;function mt(e){if(typeof e=="string")return e;if(sr(e))return Hr(e,mt)+"";if(ur(e))return Ke?Ke.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Sn(e){return e==null?"":mt(e)}let Te=[];const wt=new WeakMap;function Or(){Te.forEach(e=>e(...wt.get(e))),Te=[]}function zn(e,...t){wt.set(e,t),!Te.includes(e)&&Te.push(e)===1&&requestAnimationFrame(Or)}function Mr(e){return e.composedPath()[0]||null}function Re(e){return e.composedPath()[0]}const Pr={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Cr(e,t,r){if(e==="mousemoveoutside"){const n=o=>{t.contains(Re(o))||r(o)};return{mousemove:n,touchstart:n}}else if(e==="clickoutside"){let n=!1;const o=d=>{n=!t.contains(Re(d))},u=d=>{n&&(t.contains(Re(d))||r(d))};return{mousedown:o,mouseup:u,touchstart:o,touchend:u}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function yt(e,t,r){const n=Pr[e];let o=n.get(t);o===void 0&&n.set(t,o=new WeakMap);let u=o.get(r);return u===void 0&&o.set(r,u=Cr(e,t,r)),u}function kr(e,t,r,n){if(e==="mousemoveoutside"||e==="clickoutside"){const o=yt(e,t,r);return Object.keys(o).forEach(u=>{he(u,document,o[u],n)}),!0}return!1}function Wr(e,t,r,n){if(e==="mousemoveoutside"||e==="clickoutside"){const o=yt(e,t,r);return Object.keys(o).forEach(u=>{re(u,document,o[u],n)}),!0}return!1}function Lr(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function r(){e.set(this,!0)}function n(){e.set(this,!0),t.set(this,!0)}function o(a,s,f){const h=a[s];return a[s]=function(){return f.apply(a,arguments),h.apply(a,arguments)},a}function u(a,s){a[s]=Event.prototype[s]}const d=new WeakMap,w=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function g(){var a;return(a=d.get(this))!==null&&a!==void 0?a:null}function y(a,s){w!==void 0&&Object.defineProperty(a,"currentTarget",{configurable:!0,enumerable:!0,get:s??w.get})}const z={bubble:{},capture:{}},v={};function k(){const a=function(s){const{type:f,eventPhase:h,bubbles:p}=s,H=Re(s);if(h===2)return;const D=h===1?"capture":"bubble";let B=H;const P=[];for(;B===null&&(B=window),P.push(B),B!==window;)B=B.parentNode||null;const I=z.capture[f],F=z.bubble[f];if(o(s,"stopPropagation",r),o(s,"stopImmediatePropagation",n),y(s,g),D==="capture"){if(I===void 0)return;for(let $=P.length-1;$>=0&&!e.has(s);--$){const G=P[$],K=I.get(G);if(K!==void 0){d.set(s,G);for(const J of K){if(t.has(s))break;J(s)}}if($===0&&!p&&F!==void 0){const J=F.get(G);if(J!==void 0)for(const pe of J){if(t.has(s))break;pe(s)}}}}else if(D==="bubble"){if(F===void 0)return;for(let $=0;$<P.length&&!e.has(s);++$){const G=P[$],K=F.get(G);if(K!==void 0){d.set(s,G);for(const J of K){if(t.has(s))break;J(s)}}}}u(s,"stopPropagation"),u(s,"stopImmediatePropagation"),y(s)};return a.displayName="evtdUnifiedHandler",a}function x(){const a=function(s){const{type:f,eventPhase:h}=s;if(h!==2)return;const p=v[f];p!==void 0&&p.forEach(H=>H(s))};return a.displayName="evtdUnifiedWindowEventHandler",a}const M=k(),W=x();function L(a,s){const f=z[a];return f[s]===void 0&&(f[s]=new Map,window.addEventListener(s,M,a==="capture")),f[s]}function V(a){return v[a]===void 0&&(v[a]=new Set,window.addEventListener(a,W)),v[a]}function _(a,s){let f=a.get(s);return f===void 0&&a.set(s,f=new Set),f}function A(a,s,f,h){const p=z[s][f];if(p!==void 0){const H=p.get(a);if(H!==void 0&&H.has(h))return!0}return!1}function j(a,s){const f=v[a];return!!(f!==void 0&&f.has(s))}function q(a,s,f,h){let p;if(typeof h=="object"&&h.once===!0?p=I=>{T(a,s,p,h),f(I)}:p=f,kr(a,s,p,h))return;const D=h===!0||typeof h=="object"&&h.capture===!0?"capture":"bubble",B=L(D,a),P=_(B,s);if(P.has(p)||P.add(p),s===window){const I=V(a);I.has(p)||I.add(p)}}function T(a,s,f,h){if(Wr(a,s,f,h))return;const H=h===!0||typeof h=="object"&&h.capture===!0,D=H?"capture":"bubble",B=L(D,a),P=_(B,s);if(s===window&&!A(s,H?"bubble":"capture",a,f)&&j(a,f)){const F=v[a];F.delete(f),F.size===0&&(window.removeEventListener(a,W),v[a]=void 0)}P.has(f)&&P.delete(f),P.size===0&&B.delete(s),B.size===0&&(window.removeEventListener(a,M,D==="capture"),z[D][a]=void 0)}return{on:q,off:T}}const{on:he,off:re}=Lr();function Rn(){return vt()!==null}const xn=typeof window<"u";function Tn(e,t){return fr(e,r=>{r!==void 0&&(t.value=r)}),R(()=>e.value===void 0?t.value:e.value)}const Dr=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function Ir(){return Dr}function Qe(e,t=!0,r=[]){return e.forEach(n=>{if(n!==null){if(typeof n!="object"){(typeof n=="string"||typeof n=="number")&&r.push(dr(String(n)));return}if(Array.isArray(n)){Qe(n,t,r);return}if(n.type===bt){if(n.children===null)return;Array.isArray(n.children)&&Qe(n.children,t,r)}else{if(n.type===hr&&t)return;r.push(n)}}}),r}function Vr(e){const t={isDeactivated:!1};let r=!1;return vr(()=>{if(t.isDeactivated=!1,!r){r=!0;return}e()}),br(()=>{t.isDeactivated=!0,r||(r=!0)}),t}function Ze(e){const{left:t,right:r,top:n,bottom:o}=de(e);return`${n} ${t} ${o} ${r}`}const et=Be({render(){var e,t;return(t=(e=this.$slots).default)==null?void 0:t.call(e)}});var _r=ge("scrollbar",`
overflow: hidden;
position: relative;
z-index: auto;
height: 100%;
width: 100%;
`,[N(">",[ge("scrollbar-container",`
width: 100%;
overflow: scroll;
height: 100%;
min-height: inherit;
max-height: inherit;
scrollbar-width: none;
`,[N("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
width: 0;
height: 0;
display: none;
`),N(">",[ge("scrollbar-content",`
box-sizing: border-box;
min-width: 100%;
`)])])]),N(">, +",[ge("scrollbar-rail",`
position: absolute;
pointer-events: none;
user-select: none;
background: var(--n-scrollbar-rail-color);
-webkit-user-select: none;
`,[ee("horizontal",`
height: var(--n-scrollbar-height);
`,[N(">",[me("scrollbar",`
height: var(--n-scrollbar-height);
border-radius: var(--n-scrollbar-border-radius);
right: 0;
`)])]),ee("horizontal--top",`
top: var(--n-scrollbar-rail-top-horizontal-top);
right: var(--n-scrollbar-rail-right-horizontal-top);
bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
left: var(--n-scrollbar-rail-left-horizontal-top);
`),ee("horizontal--bottom",`
top: var(--n-scrollbar-rail-top-horizontal-bottom);
right: var(--n-scrollbar-rail-right-horizontal-bottom);
bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
left: var(--n-scrollbar-rail-left-horizontal-bottom);
`),ee("vertical",`
width: var(--n-scrollbar-width);
`,[N(">",[me("scrollbar",`
width: var(--n-scrollbar-width);
border-radius: var(--n-scrollbar-border-radius);
bottom: 0;
`)])]),ee("vertical--left",`
top: var(--n-scrollbar-rail-top-vertical-left);
right: var(--n-scrollbar-rail-right-vertical-left);
bottom: var(--n-scrollbar-rail-bottom-vertical-left);
left: var(--n-scrollbar-rail-left-vertical-left);
`),ee("vertical--right",`
top: var(--n-scrollbar-rail-top-vertical-right);
right: var(--n-scrollbar-rail-right-vertical-right);
bottom: var(--n-scrollbar-rail-bottom-vertical-right);
left: var(--n-scrollbar-rail-left-vertical-right);
`),ee("disabled",[N(">",[me("scrollbar","pointer-events: none;")])]),N(">",[me("scrollbar",`
z-index: 1;
position: absolute;
cursor: pointer;
pointer-events: all;
background-color: var(--n-scrollbar-color);
transition: background-color .2s var(--n-scrollbar-bezier);
`,[Rr(),N("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]);function tt(e,t){console.error(`[vueuc/${e}]: ${t}`)}var ne=[],$r=function(){return ne.some(function(e){return e.activeTargets.length>0})},Xr=function(){return ne.some(function(e){return e.skippedTargets.length>0})},rt="ResizeObserver loop completed with undelivered notifications.",Ar=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:rt}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=rt),window.dispatchEvent(e)},be;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(be||(be={}));var oe=function(e){return Object.freeze(e)},Fr=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,oe(this)}return e})(),St=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,oe(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,u=t.right,d=t.bottom,w=t.left,g=t.width,y=t.height;return{x:r,y:n,top:o,right:u,bottom:d,left:w,width:g,height:y}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),De=function(e){return e instanceof SVGElement&&"getBBox"in e},zt=function(e){if(De(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,u=o.offsetWidth,d=o.offsetHeight;return!(u||d||e.getClientRects().length)},nt=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},Yr=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ve=typeof window<"u"?window:{},ye=new WeakMap,ot=/auto|scroll/,Nr=/^tb|vertical/,Ur=/msie|trident/i.test(ve.navigator&&ve.navigator.userAgent),X=function(e){return parseFloat(e||"0")},ce=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new Fr((r?t:e)||0,(r?e:t)||0)},it=oe({devicePixelContentBoxSize:ce(),borderBoxSize:ce(),contentBoxSize:ce(),contentRect:new St(0,0,0,0)}),Rt=function(e,t){if(t===void 0&&(t=!1),ye.has(e)&&!t)return ye.get(e);if(zt(e))return ye.set(e,it),it;var r=getComputedStyle(e),n=De(e)&&e.ownerSVGElement&&e.getBBox(),o=!Ur&&r.boxSizing==="border-box",u=Nr.test(r.writingMode||""),d=!n&&ot.test(r.overflowY||""),w=!n&&ot.test(r.overflowX||""),g=n?0:X(r.paddingTop),y=n?0:X(r.paddingRight),z=n?0:X(r.paddingBottom),v=n?0:X(r.paddingLeft),k=n?0:X(r.borderTopWidth),x=n?0:X(r.borderRightWidth),M=n?0:X(r.borderBottomWidth),W=n?0:X(r.borderLeftWidth),L=v+y,V=g+z,_=W+x,A=k+M,j=w?e.offsetHeight-A-e.clientHeight:0,q=d?e.offsetWidth-_-e.clientWidth:0,T=o?L+_:0,a=o?V+A:0,s=n?n.width:X(r.width)-T-q,f=n?n.height:X(r.height)-a-j,h=s+L+q+_,p=f+V+j+A,H=oe({devicePixelContentBoxSize:ce(Math.round(s*devicePixelRatio),Math.round(f*devicePixelRatio),u),borderBoxSize:ce(h,p,u),contentBoxSize:ce(s,f,u),contentRect:new St(v,g,s,f)});return ye.set(e,H),H},xt=function(e,t,r){var n=Rt(e,r),o=n.borderBoxSize,u=n.contentBoxSize,d=n.devicePixelContentBoxSize;switch(t){case be.DEVICE_PIXEL_CONTENT_BOX:return d;case be.BORDER_BOX:return o;default:return u}},jr=(function(){function e(t){var r=Rt(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=oe([r.borderBoxSize]),this.contentBoxSize=oe([r.contentBoxSize]),this.devicePixelContentBoxSize=oe([r.devicePixelContentBoxSize])}return e})(),Tt=function(e){if(zt(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},qr=function(){var e=1/0,t=[];ne.forEach(function(d){if(d.activeTargets.length!==0){var w=[];d.activeTargets.forEach(function(y){var z=new jr(y.target),v=Tt(y.target);w.push(z),y.lastReportedSize=xt(y.target,y.observedBox),v<e&&(e=v)}),t.push(function(){d.callback.call(d.observer,w,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},at=function(e){ne.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(o){o.isActive()&&(Tt(o.target)>e?r.activeTargets.push(o):r.skippedTargets.push(o))})})},Gr=function(){var e=0;for(at(e);$r();)e=qr(),at(e);return Xr()&&Ar(),e>0},Ce,Bt=[],Jr=function(){return Bt.splice(0).forEach(function(e){return e()})},Kr=function(e){if(!Ce){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Jr()}).observe(r,n),Ce=function(){r.textContent="".concat(t?t--:t++)}}Bt.push(e),Ce()},Qr=function(e){Kr(function(){requestAnimationFrame(e)})},xe=0,Zr=function(){return!!xe},en=250,tn={attributes:!0,characterData:!0,childList:!0,subtree:!0},st=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],lt=function(e){return e===void 0&&(e=0),Date.now()+e},ke=!1,rn=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=en),!ke){ke=!0;var n=lt(t);Qr(function(){var o=!1;try{o=Gr()}finally{if(ke=!1,t=n-lt(),!Zr())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,tn)};document.body?r():ve.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),st.forEach(function(r){return ve.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),st.forEach(function(r){return ve.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),We=new rn,ct=function(e){!xe&&e>0&&We.start(),xe+=e,!xe&&We.stop()},nn=function(e){return!De(e)&&!Yr(e)&&getComputedStyle(e).display==="inline"},on=(function(){function e(t,r){this.target=t,this.observedBox=r||be.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=xt(this.target,this.observedBox,!0);return nn(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),an=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Se=new WeakMap,ut=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},ze=(function(){function e(){}return e.connect=function(t,r){var n=new an(t,r);Se.set(t,n)},e.observe=function(t,r,n){var o=Se.get(t),u=o.observationTargets.length===0;ut(o.observationTargets,r)<0&&(u&&ne.push(o),o.observationTargets.push(new on(r,n&&n.box)),ct(1),We.schedule())},e.unobserve=function(t,r){var n=Se.get(t),o=ut(n.observationTargets,r),u=n.observationTargets.length===1;o>=0&&(u&&ne.splice(ne.indexOf(n),1),n.observationTargets.splice(o,1),ct(-1))},e.disconnect=function(t){var r=this,n=Se.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),sn=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ze.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nt(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ze.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!nt(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ze.unobserve(this,t)},e.prototype.disconnect=function(){ze.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();class ln{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||sn)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const r of t){const n=this.elHandlersMap.get(r.target);n!==void 0&&n(r)}}registerHandler(t,r){this.elHandlersMap.set(t,r),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const ft=new ln,dt=Be({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const r=vt().proxy;function n(o){const{onResize:u}=e;u!==void 0&&u(o)}Le(()=>{const o=r.$el;if(o===void 0){tt("resize-observer","$el does not exist.");return}if(o.nextElementSibling!==o.nextSibling&&o.nodeType===3&&o.nodeValue!==""){tt("resize-observer","$el can not be observed (it may be a text node).");return}o.nextElementSibling!==null&&(ft.registerHandler(o.nextElementSibling,n),t=!0)}),pt(()=>{t&&ft.unregisterHandler(r.$el.nextElementSibling)})},render(){return pr(this.$slots,"default")}}),cn=["onMousedown"],un=["onScroll","onWheel"],fn=["onMousedown"],dn={...ht.props,duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,internalExposeWidthCssVar:Boolean,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}},hn=Be({name:"Scrollbar",props:dn,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r,mergedRtlRef:n}=lr(e),o=Br("Scrollbar",n,t),u=O(null),d=O(null),w=O(null),g=O(null),y=O(null),z=O(null),v=O(null),k=O(null),x=O(null),M=O(null),W=O(null),L=O(0),V=O(0),_=O(!1),A=O(!1);let j=!1,q=!1,T,a,s=0,f=0,h=0,p=0;const H=Ir(),D=ht("Scrollbar","-scrollbar",_r,Er,e,t),B=R(()=>{const{value:i}=k,{value:l}=z,{value:c}=M;return i===null||l===null||c===null?0:Math.min(i,c*i/l+Ge(D.value.self.width)*1.5)}),P=R(()=>`${B.value}px`),I=R(()=>{const{value:i}=x,{value:l}=v,{value:c}=W;return i===null||l===null||c===null?0:c*i/l+Ge(D.value.self.height)*1.5}),F=R(()=>`${I.value}px`),$=R(()=>{const{value:i}=k,{value:l}=L,{value:c}=z,{value:b}=M;if(i===null||c===null||b===null)return 0;{const m=c-i;return m?l/m*(b-B.value):0}}),G=R(()=>`${$.value}px`),K=R(()=>{const{value:i}=x,{value:l}=V,{value:c}=v,{value:b}=W;if(i===null||c===null||b===null)return 0;{const m=c-i;return m?l/m*(b-I.value):0}}),J=R(()=>`${K.value}px`),pe=R(()=>{const{value:i}=k,{value:l}=z;return i!==null&&l!==null&&l>i}),Ie=R(()=>{const{value:i}=x,{value:l}=v;return i!==null&&l!==null&&l>i}),Ht=R(()=>{const{trigger:i}=e;return i==="none"||_.value}),Ot=R(()=>{const{trigger:i}=e;return i==="none"||A.value}),Q=R(()=>{const{container:i}=e;return i?i():d.value}),Mt=R(()=>{const{content:i}=e;return i?i():w.value}),Ve=(i,l)=>{if(!e.scrollable)return;if(typeof i=="number"){ie(i,l??0,0,!1,"auto");return}const{left:c,top:b,index:m,elSize:C,position:S,behavior:E,el:Y,debounce:ue=!0}=i;(c!==void 0||b!==void 0)&&ie(c??0,b??0,0,!1,E),Y!==void 0?ie(0,Y.offsetTop,Y.offsetHeight,ue,E):m!==void 0&&C!==void 0?ie(0,m*C,C,ue,E):S==="bottom"?ie(0,Number.MAX_SAFE_INTEGER,0,!1,E):S==="top"&&ie(0,0,0,!1,E)},_e=Vr(()=>{e.container||Ve({top:L.value,left:V.value})}),Pt=()=>{_e.isDeactivated||Z()},Ct=i=>{if(_e.isDeactivated)return;const{onResize:l}=e;l&&l(i),Z()},kt=(i,l)=>{if(!e.scrollable)return;const{value:c}=Q;c&&(typeof i=="object"?c.scrollBy(i):c.scrollBy(i,l||0))};function ie(i,l,c,b,m){const{value:C}=Q;if(C){if(b){const{scrollTop:S,offsetHeight:E}=C;if(l>S){l+c<=S+E||C.scrollTo({left:i,top:l+c-E,behavior:m});return}}C.scrollTo({left:i,top:l,behavior:m})}}function Wt(){Vt(),_t(),Z()}function Lt(){Ee()}function Ee(){Dt(),It()}function Dt(){a!==void 0&&window.clearTimeout(a),a=window.setTimeout(()=>{A.value=!1},e.duration)}function It(){T!==void 0&&window.clearTimeout(T),T=window.setTimeout(()=>{_.value=!1},e.duration)}function Vt(){T!==void 0&&window.clearTimeout(T),_.value=!0}function _t(){a!==void 0&&window.clearTimeout(a),A.value=!0}function $t(i){const{onScroll:l}=e;l&&l(i),$e()}function $e(){const{value:i}=Q;i&&(L.value=i.scrollTop,V.value=i.scrollLeft*(o!=null&&o.value?-1:1))}function Xt(){const{value:i}=Mt;i&&(z.value=i.offsetHeight,v.value=i.offsetWidth);const{value:l}=Q;l&&(k.value=l.offsetHeight,x.value=l.offsetWidth);const{value:c}=y,{value:b}=g;c&&(W.value=c.offsetWidth),b&&(M.value=b.offsetHeight)}function Xe(){const{value:i}=Q;i&&(L.value=i.scrollTop,V.value=i.scrollLeft*(o!=null&&o.value?-1:1),k.value=i.offsetHeight,x.value=i.offsetWidth,z.value=i.scrollHeight,v.value=i.scrollWidth);const{value:l}=y,{value:c}=g;l&&(W.value=l.offsetWidth),c&&(M.value=c.offsetHeight)}function Z(){e.scrollable&&(e.useUnifiedContainer?Xe():(Xt(),$e()))}function Ae(i){var l;return!((l=u.value)!=null&&l.contains(Mr(i)))}function At(i){i.preventDefault(),i.stopPropagation(),q=!0,he("mousemove",window,Fe,!0),he("mouseup",window,Ye,!0),f=V.value,h=o!=null&&o.value?window.innerWidth-i.clientX:i.clientX}function Fe(i){if(!q)return;T!==void 0&&window.clearTimeout(T),a!==void 0&&window.clearTimeout(a);const{value:l}=x,{value:c}=v,{value:b}=I;if(l===null||c===null)return;const m=(o!=null&&o.value?window.innerWidth-i.clientX-h:i.clientX-h)*(c-l)/(l-b),C=c-l;let S=f+m;S=Math.min(C,S),S=Math.max(S,0);const{value:E}=Q;if(E){E.scrollLeft=S*(o!=null&&o.value?-1:1);const{internalOnUpdateScrollLeft:Y}=e;Y&&Y(S)}}function Ye(i){i.preventDefault(),i.stopPropagation(),re("mousemove",window,Fe,!0),re("mouseup",window,Ye,!0),q=!1,Z(),Ae(i)&&Ee()}function Ft(i){i.preventDefault(),i.stopPropagation(),j=!0,he("mousemove",window,He,!0),he("mouseup",window,Oe,!0),s=L.value,p=i.clientY}function He(i){if(!j)return;T!==void 0&&window.clearTimeout(T),a!==void 0&&window.clearTimeout(a);const{value:l}=k,{value:c}=z,{value:b}=B;if(l===null||c===null)return;const m=(i.clientY-p)*(c-l)/(l-b),C=c-l;let S=s+m;S=Math.min(C,S),S=Math.max(S,0);const{value:E}=Q;E&&(E.scrollTop=S)}function Oe(i){i.preventDefault(),i.stopPropagation(),re("mousemove",window,He,!0),re("mouseup",window,Oe,!0),j=!1,Z(),Ae(i)&&Ee()}gr(()=>{const{value:i}=Ie,{value:l}=pe,{value:c}=t,{value:b}=y,{value:m}=g;b&&(i?b.classList.remove(`${c}-scrollbar-rail--disabled`):b.classList.add(`${c}-scrollbar-rail--disabled`)),m&&(l?m.classList.remove(`${c}-scrollbar-rail--disabled`):m.classList.add(`${c}-scrollbar-rail--disabled`))}),Le(()=>{e.container||Z()}),pt(()=>{T!==void 0&&window.clearTimeout(T),a!==void 0&&window.clearTimeout(a),re("mousemove",window,He,!0),re("mouseup",window,Oe,!0)});const Ne=R(()=>{const{common:{cubicBezierEaseInOut:i},self:{color:l,colorHover:c,height:b,width:m,borderRadius:C,railInsetHorizontalTop:S,railInsetHorizontalBottom:E,railInsetVerticalRight:Y,railInsetVerticalLeft:ue,railColor:Yt}}=D.value,{top:Nt,right:Ut,bottom:jt,left:qt}=de(S),{top:Gt,right:Jt,bottom:Kt,left:Qt}=de(E),{top:Zt,right:er,bottom:tr,left:rr}=de(o!=null&&o.value?Ze(Y):Y),{top:nr,right:or,bottom:ir,left:ar}=de(o!=null&&o.value?Ze(ue):ue);return{"--n-scrollbar-bezier":i,"--n-scrollbar-color":l,"--n-scrollbar-color-hover":c,"--n-scrollbar-border-radius":C,"--n-scrollbar-width":m,"--n-scrollbar-height":b,"--n-scrollbar-rail-top-horizontal-top":Nt,"--n-scrollbar-rail-right-horizontal-top":Ut,"--n-scrollbar-rail-bottom-horizontal-top":jt,"--n-scrollbar-rail-left-horizontal-top":qt,"--n-scrollbar-rail-top-horizontal-bottom":Gt,"--n-scrollbar-rail-right-horizontal-bottom":Jt,"--n-scrollbar-rail-bottom-horizontal-bottom":Kt,"--n-scrollbar-rail-left-horizontal-bottom":Qt,"--n-scrollbar-rail-top-vertical-right":Zt,"--n-scrollbar-rail-right-vertical-right":er,"--n-scrollbar-rail-bottom-vertical-right":tr,"--n-scrollbar-rail-left-vertical-right":rr,"--n-scrollbar-rail-top-vertical-left":nr,"--n-scrollbar-rail-right-vertical-left":or,"--n-scrollbar-rail-bottom-vertical-left":ir,"--n-scrollbar-rail-left-vertical-left":ar,"--n-scrollbar-rail-color":Yt}}),ae=r?cr("scrollbar",void 0,Ne,e):void 0;return{scrollTo:Ve,scrollBy:kt,sync:Z,syncUnifiedContainer:Xe,handleMouseEnterWrapper:Wt,handleMouseLeaveWrapper:Lt,mergedClsPrefix:t,rtlEnabled:o,containerScrollTop:L,wrapperRef:u,containerRef:d,contentRef:w,yRailRef:g,xRailRef:y,needYBar:pe,needXBar:Ie,yBarSizePx:P,xBarSizePx:F,yBarTopPx:G,xBarLeftPx:J,isShowXBar:Ht,isShowYBar:Ot,isIos:H,handleScroll:$t,handleContentResize:Pt,handleContainerResize:Ct,handleYScrollMouseDown:Ft,handleXScrollMouseDown:At,containerWidth:x,cssVars:r?void 0:Ne,themeClass:ae==null?void 0:ae.themeClass,onRender:ae==null?void 0:ae.onRender}},render(){var k;const{$slots:e,mergedClsPrefix:t,triggerDisplayManually:r,rtlEnabled:n,internalHoistYRail:o,yPlacement:u,xPlacement:d,xScrollable:w}=this;if(!this.scrollable)return(k=e.default)==null?void 0:k.call(e);const g=this.trigger==="none",y=(x,M)=>(U(),te("div",{ref:"yRailRef",class:se([`${t}-scrollbar-rail`,`${t}-scrollbar-rail--vertical`,`${t}-scrollbar-rail--vertical--${u}`,x]),"data-scrollbar-rail":!0,style:le([M||"",this.verticalRailStyle]),"aria-hidden":!0},[fe(()=>Me(g?et:qe,g?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?(U(),te("div",{key:1,class:se(`${t}-scrollbar-rail__scrollbar`),style:le({height:this.yBarSizePx,top:this.yBarTopPx}),onMousedown:this.handleYScrollMouseDown},null,46,cn)):null}))],6)),z=()=>{var x,M;return(x=this.onRender)==null||x.call(this),Me("div",gt(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${t}-scrollbar`,this.themeClass,n&&`${t}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(M=e.default)==null?void 0:M.call(e):(U(),te("div",{key:2,role:"none",ref:"containerRef",class:se([`${t}-scrollbar-container`,this.containerClass]),style:le([this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":xr(this.containerWidth)}:void 0]),onScroll:this.handleScroll,onWheel:this.onWheel},[(U(),je(dt,{onResize:this.handleContentResize},{default:()=>(U(),te("div",{ref:"contentRef",role:"none",style:le([{width:this.xScrollable?"fit-content":null},this.contentStyle]),class:se([`${t}-scrollbar-content`,this.contentClass])},[fe(()=>{var W;return(W=e.default)==null?void 0:W.call(e)})],6))},1032,["onResize"]))],46,un)),o?null:y(void 0,void 0),w&&(U(),te("div",{ref:"xRailRef",class:se([`${t}-scrollbar-rail`,`${t}-scrollbar-rail--horizontal`,`${t}-scrollbar-rail--horizontal--${d}`]),style:le(this.horizontalRailStyle),"data-scrollbar-rail":!0,"aria-hidden":!0},[fe(()=>Me(g?et:qe,g?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?(U(),te("div",{key:3,class:se(`${t}-scrollbar-rail__scrollbar`),style:le({width:this.xBarSizePx,right:n?this.xBarLeftPx:void 0,left:n?void 0:this.xBarLeftPx}),onMousedown:this.handleXScrollMouseDown},null,46,fn)):null}))],6))])},v=this.container?z():(U(),je(dt,{key:4,onResize:this.handleContainerResize},{default:z},1032,["onResize"]));return o?(U(),te(bt,{key:5},[fe(()=>v),fe(()=>y(this.themeClass,this.cssVars))],64)):v}}),Bn=hn,Et=Symbol("ray-ui-services"),En=e=>yr(Et,e),vn=()=>mr()?wr(Et,{}):{},bn={color:{type:String,default:"currentColor"},prefix:{type:String,default:"icon"},name:{type:String,required:!0},size:{type:[Number,String],default:20},width:{type:[Number,String],default:0},height:{type:[Number,String],default:0},customClassName:{type:String,default:null},depth:{type:Number,default:1},cursor:{type:String,default:"inherit"},onClick:{type:[Function,Array],default:null}},Hn=Be({name:"RIcon",props:bn,setup(e){const{iconUrl:t}=vn(),r=R(()=>t==null?void 0:t(e.name,e.prefix)),n=zr(),o=R(()=>{var w;return(w=n.value)==null?void 0:w.getIconAsset(e.name)});Le(async()=>{t||(n.value=await Sr(()=>import("./assets.BgEoDHXK.js"),[]))});const u=R(()=>({"--r-icon-width":e.width?we(e.width):we(e.size),"--r-icon-height":e.height?we(e.height):we(e.size),"--r-icon-depth":e.depth,"--r-icon-cursor":e.cursor,"--r-icon-color":e.color}));return{symbolId:r,asset:o,cssVars:u,iconClick:w=>{const{onClick:g}=e;g&&Tr(g,w)}}},render(){var e,t;return Pe("span",{class:["r-icon",this.customClassName],style:[this.cssVars],onClick:this.iconClick},[Pe("svg",gt({viewBox:(e=this.asset)==null?void 0:e.viewBox,innerHTML:(t=this.asset)==null?void 0:t.body,fill:this.color},{RIconAttribute:"r-icon","aria-hidden":!0}),[this.symbolId?Pe("use",{href:this.symbolId,fill:this.color},null):null])])}});export{Hn as R,hn as S,dt as V,et as W,Bn as X,Tn as a,re as b,zn as c,Hr as d,Vr as e,Qe as f,Mr as g,Rn as h,xn as i,he as o,En as p,ft as r,Sn as t,vn as u};