Files
evening_detective_frontend/dist/assets/Card-B7PkFxVm.js
T
2026-09-16 03:48:11 +07:00

190 lines
34 KiB
JavaScript

import{H as e,L as t,M as n,P as r,S as i,U as a,V as o,Y as s,_ as c,ct as l,j as u,tt as d,z as f}from"./auth-CwtlbtVe.js";import{$ as p,G as m,J as h,K as g,M as _,N as v,Q as y,W as b,Y as x,Z as S,o as C,r as w}from"./light-BRabMcHj.js";import{a as T,c as E,l as D,o as O,t as k}from"./resolve-slot-Bet7d-Yr.js";import{t as A}from"./call-ChHlm4-m.js";import{t as j}from"./fade-in.cssr-DOGWbHPq.js";import{r as ee,t as M}from"./light-C_KCQadh.js";import{P as N,Z as P}from"./index-hx0SCC19.js";function te(e){return e.composedPath()[0]||null}function F(e){return e.composedPath()[0]}var ne={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function re(e,t,n){if(e===`mousemoveoutside`){let e=e=>{t.contains(F(e))||n(e)};return{mousemove:e,touchstart:e}}else if(e===`clickoutside`){let e=!1,r=n=>{e=!t.contains(F(n))},i=r=>{e&&(t.contains(F(r))||n(r))};return{mousedown:r,mouseup:i,touchstart:r,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function I(e,t,n){let r=ne[e],i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=re(e,t,n)),a}function ie(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=I(e,t,n);return Object.keys(i).forEach(e=>{z(e,document,i[e],r)}),!0}return!1}function L(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=I(e,t,n);return Object.keys(i).forEach(e=>{B(e,document,i[e],r)}),!0}return!1}function R(){if(typeof window>`u`)return{on:()=>{},off:()=>{}};let e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(e,t,n){let r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function a(e,t){e[t]=Event.prototype[t]}let o=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,`currentTarget`);function c(){return o.get(this)??null}function l(e,t){s!==void 0&&Object.defineProperty(e,"currentTarget",{configurable:!0,enumerable:!0,get:t??s.get})}let u={bubble:{},capture:{}},d={};function f(){let s=function(s){let{type:d,eventPhase:f,bubbles:p}=s,m=F(s);if(f===2)return;let h=f===1?`capture`:`bubble`,g=m,_=[];for(;g===null&&(g=window),_.push(g),g!==window;)g=g.parentNode||null;let v=u.capture[d],y=u.bubble[d];if(i(s,`stopPropagation`,n),i(s,`stopImmediatePropagation`,r),l(s,c),h===`capture`){if(v===void 0)return;for(let n=_.length-1;n>=0&&!e.has(s);--n){let e=_[n],r=v.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}if(n===0&&!p&&y!==void 0){let n=y.get(e);if(n!==void 0)for(let e of n){if(t.has(s))break;e(s)}}}}else if(h===`bubble`){if(y===void 0)return;for(let n=0;n<_.length&&!e.has(s);++n){let e=_[n],r=y.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}}}a(s,`stopPropagation`),a(s,`stopImmediatePropagation`),l(s)};return s.displayName=`evtdUnifiedHandler`,s}function p(){let e=function(e){let{type:t,eventPhase:n}=e;if(n!==2)return;let r=d[t];r!==void 0&&r.forEach(t=>t(e))};return e.displayName=`evtdUnifiedWindowEventHandler`,e}let m=f(),h=p();function g(e,t){let n=u[e];return n[t]===void 0&&(n[t]=new Map,window.addEventListener(t,m,e===`capture`)),n[t]}function _(e){return d[e]===void 0&&(d[e]=new Set,window.addEventListener(e,h)),d[e]}function v(e,t){let n=e.get(t);return n===void 0&&e.set(t,n=new Set),n}function y(e,t,n,r){let i=u[t][n];if(i!==void 0){let t=i.get(e);if(t!==void 0&&t.has(r))return!0}return!1}function b(e,t){let n=d[e];return!!(n!==void 0&&n.has(t))}function x(e,t,n,r){let i;if(i=typeof r==`object`&&r.once===!0?a=>{S(e,t,i,r),n(a)}:n,ie(e,t,i,r))return;let a=v(g(r===!0||typeof r==`object`&&r.capture===!0?`capture`:`bubble`,e),t);if(a.has(i)||a.add(i),t===window){let t=_(e);t.has(i)||t.add(i)}}function S(e,t,n,r){if(L(e,t,n,r))return;let i=r===!0||typeof r==`object`&&r.capture===!0,a=i?`capture`:`bubble`,o=g(a,e),s=v(o,t);if(t===window&&!y(t,i?`bubble`:`capture`,e,n)&&b(e,n)){let t=d[e];t.delete(n),t.size===0&&(window.removeEventListener(e,h),d[e]=void 0)}s.has(n)&&s.delete(n),s.size===0&&o.delete(t),o.size===0&&(window.removeEventListener(e,m,a===`capture`),u[a][e]=void 0)}return{on:x,off:S}}var{on:z,off:B}=R(),ae=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function oe(){return ae}function se(t){let n={isDeactivated:!1},r=!1;return f(()=>{if(n.isDeactivated=!1,!r){r=!0;return}t()}),e(()=>{n.isDeactivated=!0,r||=!0}),n}function V(e,t){console.error(`[vueuc/${e}]: ${t}`)}var H=[],ce=function(){return H.some(function(e){return e.activeTargets.length>0})},le=function(){return H.some(function(e){return e.skippedTargets.length>0})},ue=`ResizeObserver loop completed with undelivered notifications.`,de=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:ue}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=ue),window.dispatchEvent(e)},U;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(U||={});var W=function(e){return Object.freeze(e)},fe=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,W(this)}return e}(),pe=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,W(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),G=function(e){return e instanceof SVGElement&&`getBBox`in e},me=function(e){if(G(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},K=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},he=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},q=typeof window<`u`?window:{},J=new WeakMap,ge=/auto|scroll/,Y=/^tb|vertical/,_e=/msie|trident/i.test(q.navigator&&q.navigator.userAgent),X=function(e){return parseFloat(e||`0`)},Z=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new fe((n?t:e)||0,(n?e:t)||0)},ve=W({devicePixelContentBoxSize:Z(),borderBoxSize:Z(),contentBoxSize:Z(),contentRect:new pe(0,0,0,0)}),ye=function(e,t){if(t===void 0&&(t=!1),J.has(e)&&!t)return J.get(e);if(me(e))return J.set(e,ve),ve;var n=getComputedStyle(e),r=G(e)&&e.ownerSVGElement&&e.getBBox(),i=!_e&&n.boxSizing===`border-box`,a=Y.test(n.writingMode||``),o=!r&&ge.test(n.overflowY||``),s=!r&&ge.test(n.overflowX||``),c=r?0:X(n.paddingTop),l=r?0:X(n.paddingRight),u=r?0:X(n.paddingBottom),d=r?0:X(n.paddingLeft),f=r?0:X(n.borderTopWidth),p=r?0:X(n.borderRightWidth),m=r?0:X(n.borderBottomWidth),h=r?0:X(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:X(n.width)-S-x,T=r?r.height:X(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=W({devicePixelContentBoxSize:Z(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:Z(E,D,a),contentBoxSize:Z(w,T,a),contentRect:new pe(d,c,w,T)});return J.set(e,O),O},be=function(e,t,n){var r=ye(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case U.DEVICE_PIXEL_CONTENT_BOX:return o;case U.BORDER_BOX:return i;default:return a}},xe=function(){function e(e){var t=ye(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=W([t.borderBoxSize]),this.contentBoxSize=W([t.contentBoxSize]),this.devicePixelContentBoxSize=W([t.devicePixelContentBoxSize])}return e}(),Se=function(e){if(me(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Ce=function(){var e=1/0,t=[];H.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new xe(t.target),i=Se(t.target);r.push(n),t.lastReportedSize=be(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},we=function(e){H.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(Se(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Te=function(){var e=0;for(we(e);ce();)e=Ce(),we(e);return le()&&de(),e>0},Q,Ee=[],De=function(){return Ee.splice(0).forEach(function(e){return e()})},Oe=function(e){if(!Q){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return De()}).observe(n,{characterData:!0}),Q=function(){n.textContent=`${t?t--:t++}`}}Ee.push(e),Q()},ke=function(e){Oe(function(){requestAnimationFrame(e)})},$=0,Ae=function(){return!!$},je=250,Me={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ne=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],Pe=function(e){return e===void 0&&(e=0),Date.now()+e},Fe=!1,Ie=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=je),!Fe){Fe=!0;var n=Pe(e);ke(function(){var r=!1;try{r=Te()}finally{if(Fe=!1,e=n-Pe(),!Ae())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,Me)};document.body?t():q.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ne.forEach(function(t){return q.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Ne.forEach(function(t){return q.removeEventListener(t,e.listener,!0)}),!0)},e}()),Le=function(e){!$&&e>0&&Ie.start(),$+=e,!$&&Ie.stop()},Re=function(e){return!G(e)&&!he(e)&&getComputedStyle(e).display===`inline`},ze=function(){function e(e,t){this.target=e,this.observedBox=t||U.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=be(this.target,this.observedBox,!0);return Re(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),Be=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),Ve=new WeakMap,He=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ue=function(){function e(){}return e.connect=function(e,t){var n=new Be(e,t);Ve.set(e,n)},e.observe=function(e,t,n){var r=Ve.get(e),i=r.observationTargets.length===0;He(r.observationTargets,t)<0&&(i&&H.push(r),r.observationTargets.push(new ze(t,n&&n.box)),Le(1),Ie.schedule())},e.unobserve=function(e,t){var n=Ve.get(e),r=He(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&H.splice(H.indexOf(n),1),n.observationTargets.splice(r,1),Le(-1))},e.disconnect=function(e){var t=this,n=Ve.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),We=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);Ue.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!K(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);Ue.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!K(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);Ue.unobserve(this,e)},e.prototype.disconnect=function(){Ue.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),Ge=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<`u`&&window.ResizeObserver||We)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(let t of e){let e=this.elHandlersMap.get(t.target);e!==void 0&&e(t)}}registerHandler(e,t){this.elHandlersMap.set(e,t),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}},Ke=u({name:`ResizeObserver`,props:{onResize:Function},setup(e){let t=!1,r=n().proxy;function i(t){let{onResize:n}=e;n!==void 0&&n(t)}a(()=>{let e=r.$el;if(e===void 0){V(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){V(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(Ge.registerHandler(e.nextElementSibling,i),t=!0)}),o(()=>{t&&Ge.unregisterHandler(r.$el.nextElementSibling)})},render(){return s(this.$slots,`default`)}});function qe(e){let{left:t,right:n,top:r,bottom:i}=E(e);return`${r} ${t} ${i} ${n}`}function Je(e){return Object.keys(e)}var Ye=u({render(){var e;return(e=this.$slots).default?.call(e)}}),Xe=g(`scrollbar`,`
overflow: hidden;
position: relative;
z-index: auto;
height: 100%;
width: 100%;
`,[m(`>`,[g(`scrollbar-container`,`
width: 100%;
overflow: scroll;
height: 100%;
min-height: inherit;
max-height: inherit;
scrollbar-width: none;
`,[m(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
width: 0;
height: 0;
display: none;
`),m(`>`,[g(`scrollbar-content`,`
box-sizing: border-box;
min-width: 100%;
`)])])]),m(`>, +`,[g(`scrollbar-rail`,`
position: absolute;
pointer-events: none;
user-select: none;
background: var(--n-scrollbar-rail-color);
-webkit-user-select: none;
`,[x(`horizontal`,`
height: var(--n-scrollbar-height);
`,[m(`>`,[h(`scrollbar`,`
height: var(--n-scrollbar-height);
border-radius: var(--n-scrollbar-border-radius);
right: 0;
`)])]),x(`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);
`),x(`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);
`),x(`vertical`,`
width: var(--n-scrollbar-width);
`,[m(`>`,[h(`scrollbar`,`
width: var(--n-scrollbar-width);
border-radius: var(--n-scrollbar-border-radius);
bottom: 0;
`)])]),x(`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);
`),x(`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);
`),x(`disabled`,[m(`>`,[h(`scrollbar`,`pointer-events: none;`)])]),m(`>`,[h(`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);
`,[j(),m(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),Ze=u({name:`Scrollbar`,props:Object.assign(Object.assign({},w.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`}}),inheritAttrs:!1,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=v(e),s=C(`Scrollbar`,r,t),c=l(null),u=l(null),f=l(null),p=l(null),m=l(null),h=l(null),g=l(null),y=l(null),b=l(null),x=l(null),S=l(null),T=l(0),D=l(0),k=l(!1),A=l(!1),j=!1,M=!1,N,P,F=0,ne=0,re=0,I=0,ie=oe(),L=w(`Scrollbar`,`-scrollbar`,Xe,ee,e,t),R=i(()=>{let{value:e}=y,{value:t}=h,{value:n}=x;return e===null||t===null||n===null?0:Math.min(e,n*e/t+O(L.value.self.width)*1.5)}),ae=i(()=>`${R.value}px`),V=i(()=>{let{value:e}=b,{value:t}=g,{value:n}=S;return e===null||t===null||n===null?0:n*e/t+O(L.value.self.height)*1.5}),H=i(()=>`${V.value}px`),ce=i(()=>{let{value:e}=y,{value:t}=T,{value:n}=h,{value:r}=x;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-R.value):0}}),le=i(()=>`${ce.value}px`),ue=i(()=>{let{value:e}=b,{value:t}=D,{value:n}=g,{value:r}=S;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-V.value):0}}),de=i(()=>`${ue.value}px`),U=i(()=>{let{value:e}=y,{value:t}=h;return e!==null&&t!==null&&t>e}),W=i(()=>{let{value:e}=b,{value:t}=g;return e!==null&&t!==null&&t>e}),fe=i(()=>{let{trigger:t}=e;return t===`none`||k.value}),pe=i(()=>{let{trigger:t}=e;return t===`none`||A.value}),G=i(()=>{let{container:t}=e;return t?t():u.value}),me=i(()=>{let{content:t}=e;return t?t():f.value}),K=(t,n)=>{if(!e.scrollable)return;if(typeof t==`number`){Y(t,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=t;(r!==void 0||i!==void 0)&&Y(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?Y(0,a*o,o,u,c):s===`bottom`?Y(0,2**53-1,0,!1,c):s===`top`&&Y(0,0,0,!1,c):Y(0,l.offsetTop,l.offsetHeight,u,c)},he=se(()=>{e.container||K({top:T.value,left:D.value})}),q=()=>{he.isDeactivated||Q()},J=t=>{if(he.isDeactivated)return;let{onResize:n}=e;n&&n(t),Q()},ge=(t,n)=>{if(!e.scrollable)return;let{value:r}=G;r&&(typeof t==`object`?r.scrollBy(t):r.scrollBy(t,n||0))};function Y(e,t,n,r,i){let{value:a}=G;if(a){if(r){let{scrollTop:r,offsetHeight:o}=a;if(t>r){t+n<=r+o||a.scrollTo({left:e,top:t+n-o,behavior:i});return}}a.scrollTo({left:e,top:t,behavior:i})}}function _e(){be(),xe(),Q()}function X(){Z()}function Z(){ve(),ye()}function ve(){P!==void 0&&window.clearTimeout(P),P=window.setTimeout(()=>{A.value=!1},e.duration)}function ye(){N!==void 0&&window.clearTimeout(N),N=window.setTimeout(()=>{k.value=!1},e.duration)}function be(){N!==void 0&&window.clearTimeout(N),k.value=!0}function xe(){P!==void 0&&window.clearTimeout(P),A.value=!0}function Se(t){let{onScroll:n}=e;n&&n(t),Ce()}function Ce(){let{value:e}=G;e&&(T.value=e.scrollTop,D.value=e.scrollLeft*(s?.value?-1:1))}function we(){let{value:e}=me;e&&(h.value=e.offsetHeight,g.value=e.offsetWidth);let{value:t}=G;t&&(y.value=t.offsetHeight,b.value=t.offsetWidth);let{value:n}=m,{value:r}=p;n&&(S.value=n.offsetWidth),r&&(x.value=r.offsetHeight)}function Te(){let{value:e}=G;e&&(T.value=e.scrollTop,D.value=e.scrollLeft*(s?.value?-1:1),y.value=e.offsetHeight,b.value=e.offsetWidth,h.value=e.scrollHeight,g.value=e.scrollWidth);let{value:t}=m,{value:n}=p;t&&(S.value=t.offsetWidth),n&&(x.value=n.offsetHeight)}function Q(){e.scrollable&&(e.useUnifiedContainer?Te():(we(),Ce()))}function Ee(e){return!c.value?.contains(te(e))}function De(e){e.preventDefault(),e.stopPropagation(),M=!0,z(`mousemove`,window,Oe,!0),z(`mouseup`,window,ke,!0),ne=D.value,re=s?.value?window.innerWidth-e.clientX:e.clientX}function Oe(t){if(!M)return;N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P);let{value:n}=b,{value:r}=g,{value:i}=V;if(n===null||r===null)return;let a=(s?.value?window.innerWidth-t.clientX-re:t.clientX-re)*(r-n)/(n-i),o=r-n,c=ne+a;c=Math.min(o,c),c=Math.max(c,0);let{value:l}=G;if(l){l.scrollLeft=c*(s?.value?-1:1);let{internalOnUpdateScrollLeft:t}=e;t&&t(c)}}function ke(e){e.preventDefault(),e.stopPropagation(),B(`mousemove`,window,Oe,!0),B(`mouseup`,window,ke,!0),M=!1,Q(),Ee(e)&&Z()}function $(e){e.preventDefault(),e.stopPropagation(),j=!0,z(`mousemove`,window,Ae,!0),z(`mouseup`,window,je,!0),F=T.value,I=e.clientY}function Ae(e){if(!j)return;N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P);let{value:t}=y,{value:n}=h,{value:r}=R;if(t===null||n===null)return;let i=(e.clientY-I)*(n-t)/(t-r),a=n-t,o=F+i;o=Math.min(a,o),o=Math.max(o,0);let{value:s}=G;s&&(s.scrollTop=o)}function je(e){e.preventDefault(),e.stopPropagation(),B(`mousemove`,window,Ae,!0),B(`mouseup`,window,je,!0),j=!1,Q(),Ee(e)&&Z()}d(()=>{let{value:e}=W,{value:n}=U,{value:r}=t,{value:i}=m,{value:a}=p;i&&(e?i.classList.remove(`${r}-scrollbar-rail--disabled`):i.classList.add(`${r}-scrollbar-rail--disabled`)),a&&(n?a.classList.remove(`${r}-scrollbar-rail--disabled`):a.classList.add(`${r}-scrollbar-rail--disabled`))}),a(()=>{e.container||Q()}),o(()=>{N!==void 0&&window.clearTimeout(N),P!==void 0&&window.clearTimeout(P),B(`mousemove`,window,Ae,!0),B(`mouseup`,window,je,!0)});let Me=i(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,colorHover:n,height:r,width:i,borderRadius:a,railInsetHorizontalTop:o,railInsetHorizontalBottom:c,railInsetVerticalRight:l,railInsetVerticalLeft:u,railColor:d}}=L.value,{top:f,right:p,bottom:m,left:h}=E(o),{top:g,right:_,bottom:v,left:y}=E(c),{top:b,right:x,bottom:S,left:C}=E(s?.value?qe(l):l),{top:w,right:T,bottom:D,left:O}=E(s?.value?qe(u):u);return{"--n-scrollbar-bezier":e,"--n-scrollbar-color":t,"--n-scrollbar-color-hover":n,"--n-scrollbar-border-radius":a,"--n-scrollbar-width":i,"--n-scrollbar-height":r,"--n-scrollbar-rail-top-horizontal-top":f,"--n-scrollbar-rail-right-horizontal-top":p,"--n-scrollbar-rail-bottom-horizontal-top":m,"--n-scrollbar-rail-left-horizontal-top":h,"--n-scrollbar-rail-top-horizontal-bottom":g,"--n-scrollbar-rail-right-horizontal-bottom":_,"--n-scrollbar-rail-bottom-horizontal-bottom":v,"--n-scrollbar-rail-left-horizontal-bottom":y,"--n-scrollbar-rail-top-vertical-right":b,"--n-scrollbar-rail-right-vertical-right":x,"--n-scrollbar-rail-bottom-vertical-right":S,"--n-scrollbar-rail-left-vertical-right":C,"--n-scrollbar-rail-top-vertical-left":w,"--n-scrollbar-rail-right-vertical-left":T,"--n-scrollbar-rail-bottom-vertical-left":D,"--n-scrollbar-rail-left-vertical-left":O,"--n-scrollbar-rail-color":d}}),Ne=n?_(`scrollbar`,void 0,Me,e):void 0;return Object.assign(Object.assign({},{scrollTo:K,scrollBy:ge,sync:Q,syncUnifiedContainer:Te,handleMouseEnterWrapper:_e,handleMouseLeaveWrapper:X}),{mergedClsPrefix:t,rtlEnabled:s,containerScrollTop:T,wrapperRef:c,containerRef:u,contentRef:f,yRailRef:p,xRailRef:m,needYBar:U,needXBar:W,yBarSizePx:ae,xBarSizePx:H,yBarTopPx:le,xBarLeftPx:de,isShowXBar:fe,isShowYBar:pe,isIos:ie,handleScroll:Se,handleContentResize:q,handleContainerResize:J,handleYScrollMouseDown:$,handleXScrollMouseDown:De,containerWidth:b,cssVars:n?void 0:Me,themeClass:Ne?.themeClass,onRender:Ne?.onRender})},render(){let{$slots:e,mergedClsPrefix:n,triggerDisplayManually:i,rtlEnabled:a,internalHoistYRail:o,yPlacement:s,xPlacement:l,xScrollable:u}=this;if(!this.scrollable)return e.default?.call(e);let d=this.trigger===`none`,f=(e,t)=>r(`div`,{ref:`yRailRef`,class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,`${n}-scrollbar-rail--vertical--${s}`,e],"data-scrollbar-rail":!0,style:[t||``,this.verticalRailStyle],"aria-hidden":!0},r(d?Ye:P,d?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?r(`div`,{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),p=()=>{var s;return(s=this.onRender)==null||s.call(this),r(`div`,t(this.$attrs,{role:`none`,ref:`wrapperRef`,class:[`${n}-scrollbar`,this.themeClass,a&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:i?void 0:this.handleMouseEnterWrapper,onMouseleave:i?void 0:this.handleMouseLeaveWrapper}),[this.container?e.default?.call(e):r(`div`,{role:`none`,ref:`containerRef`,class:[`${n}-scrollbar-container`,this.containerClass],style:[this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":D(this.containerWidth)}:void 0],onScroll:this.handleScroll,onWheel:this.onWheel},r(Ke,{onResize:this.handleContentResize},{default:()=>r(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},e)})),o?null:f(void 0,void 0),u&&r(`div`,{ref:`xRailRef`,class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`,`${n}-scrollbar-rail--horizontal--${l}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},r(d?Ye:P,d?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?r(`div`,{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:a?this.xBarLeftPx:void 0,left:a?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},m=this.container?p():r(Ke,{onResize:this.handleContainerResize},{default:p});return o?r(c,null,m,f(this.themeClass,this.cssVars)):m}}),Qe=Ze,$e=g(`card-content`,`
flex: 1;
min-width: 0;
box-sizing: border-box;
padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);
font-size: var(--n-font-size);
`),et=m([g(`card`,`
font-size: var(--n-font-size);
line-height: var(--n-line-height);
display: flex;
flex-direction: column;
width: 100%;
box-sizing: border-box;
position: relative;
border-radius: var(--n-border-radius);
background-color: var(--n-color);
color: var(--n-text-color);
word-break: break-word;
transition:
color .3s var(--n-bezier),
background-color .3s var(--n-bezier),
box-shadow .3s var(--n-bezier),
border-color .3s var(--n-bezier);
`,[b({background:`var(--n-color-modal)`}),x(`hoverable`,[m(`&:hover`,`box-shadow: var(--n-box-shadow);`)]),x(`content-segmented`,[m(`>`,[g(`card-content`,`
padding-top: var(--n-padding-bottom);
`),h(`content-scrollbar`,[m(`>`,[g(`scrollbar-container`,[m(`>`,[g(`card-content`,`
padding-top: var(--n-padding-bottom);
`)])])])])])]),x(`content-soft-segmented`,[m(`>`,[g(`card-content`,`
margin: 0 var(--n-padding-left);
padding: var(--n-padding-bottom) 0;
`),h(`content-scrollbar`,[m(`>`,[g(`scrollbar-container`,[m(`>`,[g(`card-content`,`
margin: 0 var(--n-padding-left);
padding: var(--n-padding-bottom) 0;
`)])])])])])]),x(`footer-segmented`,[m(`>`,[h(`footer`,`
padding-top: var(--n-padding-bottom);
`)])]),x(`footer-soft-segmented`,[m(`>`,[h(`footer`,`
padding: var(--n-padding-bottom) 0;
margin: 0 var(--n-padding-left);
`)])]),m(`>`,[g(`card-header`,`
box-sizing: border-box;
display: flex;
align-items: center;
font-size: var(--n-title-font-size);
padding:
var(--n-padding-top)
var(--n-padding-left)
var(--n-padding-bottom)
var(--n-padding-left);
`,[h(`main`,`
font-weight: var(--n-title-font-weight);
transition: color .3s var(--n-bezier);
flex: 1;
min-width: 0;
color: var(--n-title-text-color);
`),h(`extra`,`
display: flex;
align-items: center;
font-size: var(--n-font-size);
font-weight: 400;
transition: color .3s var(--n-bezier);
color: var(--n-text-color);
`),h(`close`,`
margin: 0 0 0 8px;
transition:
background-color .3s var(--n-bezier),
color .3s var(--n-bezier);
`)]),h(`action`,`
box-sizing: border-box;
transition:
background-color .3s var(--n-bezier),
border-color .3s var(--n-bezier);
background-clip: padding-box;
background-color: var(--n-action-color);
`),$e,g(`card-content`,[m(`&:first-child`,`
padding-top: var(--n-padding-bottom);
`)]),h(`content-scrollbar`,`
display: flex;
flex-direction: column;
`,[m(`>`,[g(`scrollbar-container`,[m(`>`,[$e])])]),m(`&:first-child >`,[g(`scrollbar-container`,[m(`>`,[g(`card-content`,`
padding-top: var(--n-padding-bottom);
`)])])])]),h(`footer`,`
box-sizing: border-box;
padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);
font-size: var(--n-font-size);
`,[m(`&:first-child`,`
padding-top: var(--n-padding-bottom);
`)]),h(`action`,`
background-color: var(--n-action-color);
padding: var(--n-padding-bottom) var(--n-padding-left);
border-bottom-left-radius: var(--n-border-radius);
border-bottom-right-radius: var(--n-border-radius);
`)]),g(`card-cover`,`
overflow: hidden;
width: 100%;
border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;
`,[m(`img`,`
display: block;
width: 100%;
`)]),x(`bordered`,`
border: 1px solid var(--n-border-color);
`,[m(`&:target`,`border-color: var(--n-color-target);`)]),x(`action-segmented`,[m(`>`,[h(`action`,[m(`&:not(:first-child)`,`
border-top: 1px solid var(--n-border-color);
`)])])]),x(`content-segmented, content-soft-segmented`,[m(`>`,[g(`card-content`,`
transition: border-color 0.3s var(--n-bezier);
`,[m(`&:not(:first-child)`,`
border-top: 1px solid var(--n-border-color);
`)]),h(`content-scrollbar`,`
transition: border-color 0.3s var(--n-bezier);
`,[m(`&:not(:first-child)`,`
border-top: 1px solid var(--n-border-color);
`)])])]),x(`footer-segmented, footer-soft-segmented`,[m(`>`,[h(`footer`,`
transition: border-color 0.3s var(--n-bezier);
`,[m(`&:not(:first-child)`,`
border-top: 1px solid var(--n-border-color);
`)])])]),x(`embedded`,`
background-color: var(--n-color-embedded);
`)]),y(g(`card`,`
background: var(--n-color-modal);
`,[x(`embedded`,`
background-color: var(--n-color-embedded-modal);
`)])),p(g(`card`,`
background: var(--n-color-popover);
`,[x(`embedded`,`
background-color: var(--n-color-embedded-popover);
`)]))]),tt={title:[String,Function],contentClass:String,contentStyle:[Object,String],contentScrollable:Boolean,headerClass:String,headerStyle:[Object,String],headerExtraClass:String,headerExtraStyle:[Object,String],footerClass:String,footerStyle:[Object,String],embedded:Boolean,segmented:{type:[Boolean,Object],default:!1},size:String,bordered:{type:Boolean,default:!0},closable:Boolean,hoverable:Boolean,role:String,onClose:[Function,Array],tag:{type:String,default:`div`},cover:Function,content:[String,Function],footer:Function,action:Function,headerExtra:Function,closeFocusable:Boolean},nt=Je(tt),rt=u({name:`Card`,props:Object.assign(Object.assign({},w.props),tt),slots:Object,setup(e){let t=()=>{let{onClose:t}=e;t&&A(t)},{inlineThemeDisabled:n,mergedClsPrefixRef:r,mergedRtlRef:a,mergedComponentPropsRef:o}=v(e),s=w(`Card`,`-card`,et,M,e,r),c=C(`Card`,a,r),l=i(()=>e.size||o?.value?.Card?.size||`medium`),u=i(()=>{let e=l.value,{self:{color:t,colorModal:n,colorTarget:r,textColor:i,titleTextColor:a,titleFontWeight:o,borderColor:c,actionColor:u,borderRadius:d,lineHeight:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,closeColorHover:g,closeColorPressed:_,closeBorderRadius:v,closeIconSize:y,closeSize:b,boxShadow:x,colorPopover:C,colorEmbedded:w,colorEmbeddedModal:T,colorEmbeddedPopover:D,[S(`padding`,e)]:O,[S(`fontSize`,e)]:k,[S(`titleFontSize`,e)]:A},common:{cubicBezierEaseInOut:j}}=s.value,{top:ee,left:M,bottom:N}=E(O);return{"--n-bezier":j,"--n-border-radius":d,"--n-color":t,"--n-color-modal":n,"--n-color-popover":C,"--n-color-embedded":w,"--n-color-embedded-modal":T,"--n-color-embedded-popover":D,"--n-color-target":r,"--n-text-color":i,"--n-line-height":f,"--n-action-color":u,"--n-title-text-color":a,"--n-title-font-weight":o,"--n-close-icon-color":p,"--n-close-icon-color-hover":m,"--n-close-icon-color-pressed":h,"--n-close-color-hover":g,"--n-close-color-pressed":_,"--n-border-color":c,"--n-box-shadow":x,"--n-padding-top":ee,"--n-padding-bottom":N,"--n-padding-left":M,"--n-font-size":k,"--n-title-font-size":A,"--n-close-size":b,"--n-close-icon-size":y,"--n-close-border-radius":v}}),d=n?_(`card`,i(()=>l.value[0]),u,e):void 0;return{rtlEnabled:c,mergedClsPrefix:r,mergedTheme:s,handleCloseClick:t,cssVars:n?void 0:u,themeClass:d?.themeClass,onRender:d?.onRender}},render(){let{segmented:e,bordered:t,hoverable:n,mergedClsPrefix:i,rtlEnabled:a,onRender:o,embedded:s,tag:c,$slots:l}=this;return o?.(),r(c,{class:[`${i}-card`,this.themeClass,s&&`${i}-card--embedded`,{[`${i}-card--rtl`]:a,[`${i}-card--content-scrollable`]:this.contentScrollable,[`${i}-card--content${typeof e!=`boolean`&&e.content===`soft`?`-soft`:``}-segmented`]:e===!0||e!==!1&&e.content,[`${i}-card--footer${typeof e!=`boolean`&&e.footer===`soft`?`-soft`:``}-segmented`]:e===!0||e!==!1&&e.footer,[`${i}-card--action-segmented`]:e===!0||e!==!1&&e.action,[`${i}-card--bordered`]:t,[`${i}-card--hoverable`]:n}],style:this.cssVars,role:this.role},T(l.cover,e=>{let t=this.cover?k([this.cover()]):e;return t&&r(`div`,{class:`${i}-card-cover`,role:`none`},t)}),T(l.header,e=>{let{title:t}=this,n=t?k(typeof t==`function`?[t()]:[t]):e;return n||this.closable?r(`div`,{class:[`${i}-card-header`,this.headerClass],style:this.headerStyle,role:`heading`},r(`div`,{class:`${i}-card-header__main`,role:`heading`},n),T(l[`header-extra`],e=>{let t=this.headerExtra?k([this.headerExtra()]):e;return t&&r(`div`,{class:[`${i}-card-header__extra`,this.headerExtraClass],style:this.headerExtraStyle},t)}),this.closable&&r(N,{clsPrefix:i,class:`${i}-card-header__close`,onClick:this.handleCloseClick,focusable:this.closeFocusable,absolute:!0})):null}),T(l.default,e=>{let{content:t}=this,n=t?k(typeof t==`function`?[t()]:[t]):e;return n?this.contentScrollable?r(Ze,{class:`${i}-card__content-scrollbar`,contentClass:[`${i}-card-content`,this.contentClass],contentStyle:this.contentStyle},n):r(`div`,{class:[`${i}-card-content`,this.contentClass],style:this.contentStyle,role:`none`},n):null}),T(l.footer,e=>{let t=this.footer?k([this.footer()]):e;return t&&r(`div`,{class:[`${i}-card__footer`,this.footerClass],style:this.footerStyle,role:`none`},t)}),T(l.action,e=>{let t=this.action?k([this.action()]):e;return t&&r(`div`,{class:`${i}-card__action`,role:`none`},t)}))}});export{Qe as a,Ke as c,z as d,te as f,Ze as i,Ge as l,nt as n,Ye as o,tt as r,Je as s,rt as t,B as u};