@zeturn/watercolor-core 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2024 Watercolor UI Team
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -16,8 +16,8 @@ import { ButtonUtils } from '@zeturn/watercolor-core'
16
16
 
17
17
  ## Docs
18
18
 
19
- - https://zeturn.github.io/watercolor/docs/
19
+ - https://zeturn.github.io/watercolor/
20
20
 
21
21
  ## License
22
22
 
23
- MIT
23
+ ISC
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@zeturn/watercolor-core",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
- "main": "dist/core.umd.js",
5
+ "license": "ISC",
6
+ "main": "dist/core.es.js",
6
7
  "module": "dist/core.es.js",
7
8
  "types": "dist/index.d.ts",
8
9
  "style": "src/styles/index.css",
@@ -10,20 +11,24 @@
10
11
  ".": {
11
12
  "types": "./dist/index.d.ts",
12
13
  "import": "./dist/core.es.js",
13
- "require": "./dist/core.umd.js"
14
+ "default": "./dist/core.es.js"
14
15
  },
15
16
  "./theme.css": "./src/styles/index.css",
16
- "./theme-v2.schema.json": "./theme-v2.schema.json",
17
- "./src/*": "./src/*"
17
+ "./theme-v2.schema.json": "./theme-v2.schema.json"
18
18
  },
19
19
  "files": [
20
20
  "dist",
21
21
  "src/styles",
22
22
  "theme-v2.schema.json"
23
23
  ],
24
+ "sideEffects": [
25
+ "**/*.css"
26
+ ],
24
27
  "scripts": {
25
28
  "build": "vite build",
26
- "test": "vitest run"
29
+ "test": "vitest run",
30
+ "lint": "eslint src --ext .js,.jsx,.ts,.tsx",
31
+ "typecheck": "tsc --noEmit"
27
32
  },
28
33
  "publishConfig": {
29
34
  "access": "public"
package/dist/core.umd.js DELETED
@@ -1,21 +0,0 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.WatercolorCore={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},i=2,a=[`primary`,`secondary`,`neutral`,`success`,`warning`,`error`,`info`,`purple`,`pink`,`teal`,`indigo`,`orange`,`cyan`],o=[`0`,`50`,`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`,`950`,`1000`],s=[`none`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`full`],c=`canvas.surfaceSubtle.surfaceRaised.surfaceOverlay.actionHover.actionActive.actionSelected.actionSelectedHover.actionDisabled.textPrimary.textSecondary.textTertiary.textDisabled.textInverse.borderDefault.borderStrong.borderSubtle.accent.accentHover.accentActive.accentSubtle.danger.dangerHover.dangerSubtle.backdrop.shadowSm.shadowMd.shadowLg.shadowXl.focusRing`.split(`.`),l=new WeakMap,u=e=>typeof e==`object`&&!!e&&!Array.isArray(e),d=e=>typeof e==`string`&&e.trim().length>0&&!/[;{}<>]/.test(e),f=e=>{if(!d(e))return!1;let t=e.trim();return/^#[\da-f]{3,8}$/i.test(t)||/^(?:rgb|rgba|hsl|hsla|oklch|oklab|color|color-mix|var)\(.+\)$/i.test(t)||/^(?:transparent|currentColor|black|white)$/i.test(t)},p=e=>d(e)&&(/^0$/.test(e.trim())||/^-?(?:\d+|\d*\.\d+)(?:px|rem|em|%)$/.test(e.trim())),m=e=>d(e)&&/^(?:\d+|\d*\.\d+)(?:ms|s)$/.test(e.trim()),h=e=>d(e)&&/^(?:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier\(.+\))$/.test(e.trim()),g=(e,t,n,r)=>{for(let i of Object.keys(e))t.includes(i)||r.push({path:`${n}.${i}`,message:`Unknown theme property.`})},_=e=>{if(typeof e!=`string`)return null;let t=e.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(!t)return null;let n=t[1].length===3?[...t[1]].map(e=>e+e).join(``):t[1];return[0,2,4].map(e=>Number.parseInt(n.slice(e,e+2),16))},v=(e,t)=>{let n=([e,t,n])=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},r=n(e),i=n(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)};function ee(e){let t=[],n=[];if(!u(e))return{ok:!1,errors:[{path:`$`,message:`Theme config must be an object.`}],warnings:n};if(g(e,[`$schema`,`version`,`tokens`,`modes`],`$`,t),e.version!==2&&t.push({path:`$.version`,message:`Theme config version must be 2.`}),e.$schema!==void 0&&typeof e.$schema!=`string`&&t.push({path:`$.$schema`,message:`$schema must be a string.`}),e.tokens!==void 0)if(!u(e.tokens))t.push({path:`$.tokens`,message:`tokens must be an object.`});else{g(e.tokens,[`colors`,`fonts`,`radius`,`motion`],`$.tokens`,t);let{colors:n,fonts:r,radius:i,motion:c}=e.tokens;if(n!==void 0)if(!u(n))t.push({path:`$.tokens.colors`,message:`colors must be an object.`});else{g(n,a,`$.tokens.colors`,t);for(let[e,r]of Object.entries(n))if(a.includes(e)){if(!u(r)){t.push({path:`$.tokens.colors.${e}`,message:`Palette must be an object.`});continue}g(r,o,`$.tokens.colors.${e}`,t);for(let[n,i]of Object.entries(r))o.includes(n)&&!f(i)&&t.push({path:`$.tokens.colors.${e}.${n}`,message:`Invalid CSS color.`})}}if(r!==void 0)if(!u(r))t.push({path:`$.tokens.fonts`,message:`fonts must be an object.`});else{g(r,[`english`,`chinese`,`fallback`,`mono`],`$.tokens.fonts`,t);for(let[e,n]of Object.entries(r))d(n)||t.push({path:`$.tokens.fonts.${e}`,message:`Invalid font value.`})}if(i!==void 0)if(!u(i))t.push({path:`$.tokens.radius`,message:`radius must be an object.`});else{g(i,s,`$.tokens.radius`,t);for(let[e,n]of Object.entries(i))s.includes(e)&&!p(n)&&t.push({path:`$.tokens.radius.${e}`,message:`Radius must use px, rem, em, %, or 0.`})}c!==void 0&&(u(c)?(g(c,[`fast`,`normal`,`easing`],`$.tokens.motion`,t),c.fast!==void 0&&!m(c.fast)&&t.push({path:`$.tokens.motion.fast`,message:`Invalid duration.`}),c.normal!==void 0&&!m(c.normal)&&t.push({path:`$.tokens.motion.normal`,message:`Invalid duration.`}),c.easing!==void 0&&!h(c.easing)&&t.push({path:`$.tokens.motion.easing`,message:`Invalid easing.`})):t.push({path:`$.tokens.motion`,message:`motion must be an object.`}))}if(e.modes!==void 0)if(!u(e.modes))t.push({path:`$.modes`,message:`modes must be an object.`});else{g(e.modes,[`light`,`dark`],`$.modes`,t);for(let r of[`light`,`dark`]){let i=e.modes[r];if(i===void 0)continue;if(!u(i)){t.push({path:`$.modes.${r}`,message:`Mode tokens must be an object.`});continue}g(i,c,`$.modes.${r}`,t);for(let[e,n]of Object.entries(i)){if(!c.includes(e))continue;let i=e.startsWith(`shadow`);(i?d(n):f(n))||t.push({path:`$.modes.${r}.${e}`,message:i?`Invalid shadow value.`:`Invalid CSS color.`})}let a=_(i.canvas),o=_(i.textPrimary);a&&o&&v(o,a)<4.5&&n.push({path:`$.modes.${r}.textPrimary`,message:`textPrimary and canvas have less than 4.5:1 contrast.`})}}return t.length?{ok:!1,errors:t,warnings:n}:{ok:!0,config:e,warnings:n}}var te=e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);function y(e){let t=new Map;for(let[n,r]of Object.entries(e.tokens?.colors??{}))for(let[e,i]of Object.entries(r??{}))t.set(`--wc-${n}-${e}`,i);let n=e.tokens?.fonts;if(n){n.chinese!==void 0&&t.set(`--wc-font-chinese`,n.chinese),n.english!==void 0&&t.set(`--wc-font-english`,n.english),n.mono!==void 0&&t.set(`--wc-font-mono`,n.mono);let e=[n.chinese?`"${n.chinese}"`:``,n.english?`"${n.english}"`:``,n.fallback??``].filter(Boolean).join(`, `);e&&t.set(`--wc-font-family`,e)}for(let[n,r]of Object.entries(e.tokens?.radius??{}))t.set(`--wc-radius-${n}`,r);e.tokens?.motion?.fast&&t.set(`--wc-motion-fast`,e.tokens.motion.fast),e.tokens?.motion?.normal&&t.set(`--wc-motion-normal`,e.tokens.motion.normal),e.tokens?.motion?.easing&&t.set(`--wc-ease-standard`,e.tokens.motion.easing);for(let n of[`light`,`dark`])for(let[r,i]of Object.entries(e.modes?.[n]??{}))t.set(`--wc-theme-${n}-${te(r)}`,i);return t}var ne=e=>e===void 0?typeof document>`u`?null:document.documentElement:e;function b(e){let t=ne(e);if(t){for(let e of l.get(t)??[])t.style.removeProperty(e);l.delete(t)}}function x(e,t={}){let n=ee(e);if(!n.ok)return n;let r=ne(t.target),i=y(n.config);if(r){b(r);for(let[e,t]of i)r.style.setProperty(e,t);l.set(r,new Set(i.keys()))}return{ok:!0,appliedVariables:i.size,warnings:n.warnings}}async function S(e,t={}){if(typeof e!=`string`||!e.trim()||typeof fetch>`u`)return{ok:!1,url:e,errors:[{path:`$`,message:`Theme config URL or fetch is unavailable.`}],warnings:[]};try{let n=await fetch(e,{cache:`no-store`});return n.ok?{...x(await n.json(),t),url:e}:{ok:!1,url:e,errors:[{path:`$`,message:`Theme request failed with ${n.status}.`}],warnings:[]}}catch(t){return{ok:!1,url:e,errors:[{path:`$`,message:t instanceof Error?t.message:`Theme request failed.`}],warnings:[]}}}function C(e){let t=ee(e);if(!t.ok)return t;let n=y(t.config),r=`:root{${[...n].map(([e,t])=>`${e}:${t}`).join(`;`)}}`;return{ok:!0,appliedVariables:n.size,warnings:t.warnings,css:r}}var re=[`light`,`dark`,`system`],w=`wc-mode`,T=`wc-scheme`,E=e=>typeof e==`string`&&re.includes(e),D=(e,t=!1)=>e===`system`?t?`dark`:`light`:e;function O(e,t,n){e.dataset.theme=t,e.dataset.resolvedTheme=n,e.classList.toggle(`dark`,n===`dark`),e.classList.toggle(`light`,n===`light`),e.style.colorScheme=n}function k(e={}){let t=E(e.initialMode)?e.initialMode:`system`,n=e.initialResolvedMode===`dark`,r=!1,i=null,a=null,o=null,s=typeof e.storageKey==`string`&&e.storageKey.trim()?e.storageKey:w,c=new Set,l=()=>D(t,n),u=()=>({mode:t,resolvedMode:l(),dark:l()===`dark`}),d=()=>c.forEach(e=>e(u())),f=(e=!0)=>{let n=u();if(i&&O(i,n.mode,n.resolvedMode),e)try{a?.setItem(s,t)}catch{}d()},p=e=>{n=e.matches,t===`system`&&f(!1)},m=e=>{e.key!==s||!E(e.newValue)||e.newValue===t||(t=e.newValue,f(!1))};return{get mode(){return t},get resolvedMode(){return l()},get dark(){return l()===`dark`},get started(){return r},start(){if(!(r||typeof window>`u`)){if(r=!0,i=e.target===void 0?document.documentElement:e.target,e.storage===void 0)try{a=window.localStorage}catch{a=null}else a=e.storage;if(o=typeof globalThis.matchMedia==`function`?globalThis.matchMedia(`(prefers-color-scheme: dark)`):null,n=o?.matches??n,e.readStorage!==!1)try{let n=a?.getItem(s),r=e.storageKey===void 0?a?.getItem(T):null;E(n)?t=n:(r===`light`||r===`dark`)&&(t=r,a?.setItem(s,r))}catch{}o?.addEventListener?.(`change`,p),o?.addEventListener||o?.addListener?.(p),window.addEventListener(`storage`,m),f(!1)}},setMode(e){!E(e)||e===t||(t=e,f(r))},toggleMode(){t=l()===`dark`?`light`:`dark`,f(r)},subscribe(e){return c.add(e),e(u()),()=>c.delete(e)},destroy(){o?.removeEventListener?.(`change`,p),o?.removeEventListener||o?.removeListener?.(p),typeof window<`u`&&window.removeEventListener(`storage`,m),c.clear(),o=null,a=null,i=null,r=!1}}}function A(e={}){let t=E(e.defaultMode)?e.defaultMode:`system`,n=typeof e.storageKey==`string`&&e.storageKey.trim()?e.storageKey:w;return`(()=>{const d=document.documentElement;let m=${JSON.stringify(t)};try{const s=localStorage.getItem(${JSON.stringify(n).replace(/</g,`\\u003c`)});if(s==='light'||s==='dark'||s==='system')m=s}catch{}const r=m==='system'&&matchMedia('(prefers-color-scheme: dark)').matches?'dark':m==='system'?'light':m;d.dataset.theme=m;d.dataset.resolvedTheme=r;d.classList.toggle('dark',r==='dark');d.classList.toggle('light',r==='light');d.style.colorScheme=r})()`}var j=[`none`,`2xs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`],M=[`stretch`,`start`,`center`,`end`],N=[`sm`,`md`,`lg`,`xl`,`full`],ie=[`none`,`sm`,`md`,`lg`],ae=[`start`,`center`,`end`,`between`,`around`],oe=[`equal`,`sidebar`,`sidebar-end`,`wide-start`,`wide-end`],se=[`none`,`sm`,`md`,`lg`],ce=r({VALID_VARIANTS:()=>le,buildAccordionClasses:()=>fe,normalizeVariant:()=>ue,toggleActiveItems:()=>pe}),le=[`default`,`bordered`,`filled`];function ue(e=`default`){return le.includes(e)?e:`default`}function de(e){return e?typeof e==`string`?e:Array.isArray(e)?e.filter(Boolean).join(` `):typeof e==`object`?Object.entries(e).filter(([,e])=>e).map(([e])=>e).join(` `):``:``}function fe(e=`default`,t=``){let n=ue(e),r=de(t);return[`wc-accordion`,n===`default`?``:`wc-accordion--${n}`,r].filter(Boolean).join(` `)}function pe(e=[],t,n=!1){return n?e.includes(t)?e.filter(e=>e!==t):[...e,t]:e.includes(t)?[]:[t]}var me=r({getAlertClasses:()=>he,isValidAlertType:()=>ge,isValidAlertVariant:()=>_e});function he(e,t){return[`wc-alert`,`wc-alert--${e}`,`wc-alert--${t}`]}function ge(e){return[`success`,`info`,`warning`,`error`].includes(e)}function _e(e){return[`filled`,`outlined`,`standard`,`minimal`].includes(e)}var ve=r({colorMap:()=>ye,getAppBarClasses:()=>F,positionMap:()=>P,shadowMap:()=>be}),P={fixed:`fixed top-0 left-0 right-0`,absolute:`absolute top-0 left-0 right-0`,sticky:`sticky top-0`,static:`static`,relative:`relative`},ye={primary:`bg-primary-500 text-white`,secondary:`bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100`,transparent:`bg-transparent`,inherit:`bg-inherit text-inherit`},be={0:`shadow-none`,1:`shadow-sm`,2:`shadow`,3:`shadow-md`,4:`shadow-lg`,6:`shadow-xl`,8:`shadow-2xl`,12:`shadow-2xl`,16:`shadow-2xl`,24:`shadow-2xl`},F=(e,t,n,r,i=``)=>[`w-full transition-all duration-250 z-50`,P[e]||P.fixed,ye[t]||ye.primary,r===`outlined`?`border-b border-neutral-200 dark:border-neutral-700`:be[n]||be[4],i].filter(Boolean).join(` `),xe=r({generateAvatarText:()=>Ae,getAvatarClasses:()=>Oe,getAvatarStyles:()=>ke,handleImageError:()=>je,handleImageLoad:()=>Me,isValidColor:()=>De,isValidSize:()=>Te,isValidVariant:()=>Ee,validColors:()=>we,validSizes:()=>Se,validVariants:()=>Ce}),Se=[`xs`,`sm`,`md`,`lg`,`xl`],Ce=[`circular`,`rounded`,`square`],we=[`default`,`primary`,`secondary`,`success`,`warning`,`error`];function Te(e){return typeof e==`number`?e>0:Se.includes(e)}function Ee(e){return Ce.includes(e)}function De(e){return we.includes(e)}function Oe({size:e,variant:t,color:n,src:r,imgError:i}){let a=[`wc-avatar`];return typeof e==`string`&&a.push(`wc-avatar--${e}`),a.push(`wc-avatar--${t}`),(!r||i)&&a.push(`wc-avatar--${n}`),a}function ke(e){let t={};return typeof e==`number`&&(t.width=`${e}px`,t.height=`${e}px`,t.fontSize=`${e*.4}px`),t}function Ae(e){if(!e)return``;let t=e.trim(),n=t.charAt(0);if(/[\u4e00-\u9fa5]/.test(n))return n;let r=t.split(/\s+/).filter(Boolean);return r.length===1?r[0].charAt(0).toUpperCase():(r[0].charAt(0)+r[1].charAt(0)).toUpperCase()}function je(e){e(!0)}function Me(e){e(!1)}var Ne=r({getBadgeClasses:()=>ze,getSafeVariant:()=>Re,isValidSize:()=>Le,isValidVariant:()=>Ie,validSizes:()=>Fe,validVariants:()=>Pe}),Pe=[`primary`,`secondary`,`success`,`warning`,`error`,`purple`,`orange`,`cyan`,`pink`],Fe=[`sm`,`md`,`lg`];function Ie(e){return Pe.includes(e)}function Le(e){return Fe.includes(e)}function Re(e){return Ie(e)?e:`primary`}function ze({variant:e,size:t,dot:n,className:r}){let i=[`wc-badge`,`wc-badge--${Re(e)}`];return n?i.push(`wc-badge--dot-${t}`):i.push(`wc-badge--${t}`),r&&i.push(r),i.filter(Boolean).join(` `)}var Be=r({getBannerClasses:()=>Ge,getBannerStyles:()=>Ke,handleBannerAction:()=>Je,handleBannerClose:()=>qe,isValidPosition:()=>We,isValidType:()=>Ue,validPositions:()=>He,validTypes:()=>Ve}),Ve=[`success`,`info`,`warning`,`error`],He=[`top`,`bottom`];function Ue(e){return Ve.includes(e)}function We(e){return He.includes(e)}function Ge(e,t,n){let r=[`wc-banner`,`wc-banner--${e}`,`wc-banner--${t}`];return n&&r.push(`wc-banner--sticky`),r.join(` `)}function Ke(e){return{zIndex:e}}function qe(e,t){e(!1),t&&t()}function Je(e){e&&e()}var Ye=r({getBlockquoteClasses:()=>Xe});function Xe(e=``,t=`default`,n=!0,r=!0,i=`medium`,a=`default`){let o=[`wc-blockquote`];return t&&t!==`default`&&t!==`card`&&o.push(`wc-blockquote--${t}`),n&&o.push(`wc-blockquote--no-border`),r&&o.push(`wc-blockquote--interactive`),i&&i!==`medium`&&o.push(`wc-blockquote--${i}`),a&&a!==`default`&&o.push(`wc-blockquote--${a}`),e&&o.push(e),o.filter(Boolean).join(` `)}var Ze=r({alignMap:()=>tt,directionMap:()=>$e,displayMap:()=>Qe,getBoxClasses:()=>rt,getBoxStyles:()=>it,justifyMap:()=>et,sizeVal:()=>L,spacingMap:()=>I,wrapMap:()=>nt}),I={0:`0`,1:`0.25rem`,2:`0.5rem`,3:`0.75rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,8:`2rem`,10:`2.5rem`,12:`3rem`,16:`4rem`,20:`5rem`,24:`6rem`},Qe={flex:`flex`,block:`block`,inline:`inline`,"inline-block":`inline-block`,none:`hidden`,grid:`grid`},$e={row:`flex-row`,column:`flex-col`,"row-reverse":`flex-row-reverse`,"column-reverse":`flex-col-reverse`},et={"flex-start":`justify-start`,center:`justify-center`,"flex-end":`justify-end`,"space-between":`justify-between`,"space-around":`justify-around`,"space-evenly":`justify-evenly`},tt={"flex-start":`items-start`,center:`items-center`,"flex-end":`items-end`,stretch:`items-stretch`,baseline:`items-baseline`},nt={wrap:`flex-wrap`,nowrap:`flex-nowrap`,"wrap-reverse":`flex-wrap-reverse`};function L(e){return typeof e==`number`?`${e}px`:e}function rt(e){let t=[`wc-box`];if(e.display&&Qe[e.display]&&t.push(Qe[e.display]),e.flexDirection&&$e[e.flexDirection]&&t.push($e[e.flexDirection]),e.justifyContent&&et[e.justifyContent]&&t.push(et[e.justifyContent]),e.alignItems&&tt[e.alignItems]&&t.push(tt[e.alignItems]),e.flexWrap&&nt[e.flexWrap]&&t.push(nt[e.flexWrap]),e.gap!==void 0){let n=e.gap.toString();[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`8`,`10`,`12`,`16`,`20`,`24`].includes(n)&&t.push(`gap-${n}`)}return t}function it(e){let t={};if(e.p!==void 0&&(t.padding=I[e.p]||L(e.p)),e.pt!==void 0&&(t.paddingTop=I[e.pt]||L(e.pt)),e.pr!==void 0&&(t.paddingRight=I[e.pr]||L(e.pr)),e.pb!==void 0&&(t.paddingBottom=I[e.pb]||L(e.pb)),e.pl!==void 0&&(t.paddingLeft=I[e.pl]||L(e.pl)),e.px!==void 0){let n=I[e.px]||L(e.px);t.paddingLeft=n,t.paddingRight=n}if(e.py!==void 0){let n=I[e.py]||L(e.py);t.paddingTop=n,t.paddingBottom=n}if(e.m!==void 0&&(t.margin=I[e.m]||L(e.m)),e.mt!==void 0&&(t.marginTop=I[e.mt]||L(e.mt)),e.mr!==void 0&&(t.marginRight=I[e.mr]||L(e.mr)),e.mb!==void 0&&(t.marginBottom=I[e.mb]||L(e.mb)),e.ml!==void 0&&(t.marginLeft=I[e.ml]||L(e.ml)),e.mx!==void 0){let n=I[e.mx]||L(e.mx);t.marginLeft=n,t.marginRight=n}if(e.my!==void 0){let n=I[e.my]||L(e.my);t.marginTop=n,t.marginBottom=n}return e.display&&(t.display=e.display),e.flexDirection&&(t.flexDirection=e.flexDirection),e.justifyContent&&(t.justifyContent=e.justifyContent),e.alignItems&&(t.alignItems=e.alignItems),e.flexWrap&&(t.flexWrap=e.flexWrap),e.gap!==void 0&&(t.gap=L(e.gap)),e.bgcolor&&(t.backgroundColor=e.bgcolor),e.color&&(t.color=e.color),e.border&&(t.border=e.border),e.borderRadius!==void 0&&(t.borderRadius=typeof e.borderRadius==`number`?`${e.borderRadius}px`:e.borderRadius),e.width!==void 0&&(t.width=L(e.width)),e.height!==void 0&&(t.height=L(e.height)),e.minWidth!==void 0&&(t.minWidth=L(e.minWidth)),e.minHeight!==void 0&&(t.minHeight=L(e.minHeight)),e.maxWidth!==void 0&&(t.maxWidth=L(e.maxWidth)),e.maxHeight!==void 0&&(t.maxHeight=L(e.maxHeight)),t}var at=r({getBreadcrumbClasses:()=>lt,getBreadcrumbItemClasses:()=>ut,getBreadcrumbLinkClasses:()=>dt,handleBreadcrumbClick:()=>ft,isValidVariant:()=>st,processBreadcrumbItems:()=>ct,shouldRenderAsLink:()=>pt,validVariants:()=>ot}),ot=[`default`,`minimal`];function st(e){return ot.includes(e)}function ct(e,t,n,r){let i=[...e];if(t&&i.length&&i[0].label!==`首页`&&i.unshift({label:`首页`,icon:n,href:`/`}),r>0&&i.length>r){let e=Math.max(1,r-2);i=[...i.slice(0,e),{label:`...`,disabled:!0,isEllipsis:!0},...i.slice(-1)]}return i}function lt(e){return`wc-breadcrumb wc-breadcrumb--${e}`}function ut(e,t){let n=[`wc-breadcrumb-item`];return e===t-1&&n.push(`wc-breadcrumb-item--current`),n.join(` `)}function dt(e){let t=[`wc-breadcrumb-link`];return e&&t.push(`wc-breadcrumb-link--disabled`),t.join(` `)}function ft(e,t,n,r,i){return t.disabled||t.isEllipsis||n===r-1?(e.preventDefault(),!1):(i&&i(e,t,n),!0)}function pt(e,t,n,r){return e!==t-1&&!n&&!r}var mt=r({getButtonClasses:()=>Et,getRoundedClass:()=>Ot,getSafeVariant:()=>Tt,getVariantStyles:()=>Dt,handleButtonClick:()=>kt,isValidButtonStyle:()=>wt,isValidRounded:()=>Ct,isValidSize:()=>xt,isValidType:()=>St,isValidVariant:()=>bt,validRounded:()=>yt,validSizes:()=>_t,validStyles:()=>gt,validTypes:()=>vt,validVariants:()=>ht}),ht=[`primary`,`secondary`,`filled`,`outlined`,`text`,`success`,`warning`,`error`,`info`,`purple`,`orange`,`cyan`,`pink`],gt=[`default`,`outlined`,`filled`],_t=[`xs`,`sm`,`md`,`lg`,`xl`],vt=[`button`,`submit`,`reset`],yt=[`none`,`sm`,`md`,`lg`,`full`];function bt(e){return ht.includes(e)}function xt(e){return _t.includes(e)}function St(e){return vt.includes(e)}function Ct(e){return typeof e==`boolean`||yt.includes(e)}function wt(e){return gt.includes(e)}function Tt(e){return bt(e)?e:`primary`}function Et(e){let{variant:t,size:n,disabled:r,loading:i,fullWidth:a,uppercase:o,rounded:s,buttonStyle:c=`default`}=e,l=[`wc-btn`];return l.push(`wc-btn--style-${c}`),l.push(`wc-btn--${Tt(t)}`),l.push(`wc-btn--${n}`),(r||i)&&l.push(`wc-btn--disabled`),i&&l.push(`wc-btn--loading`),a&&l.push(`wc-btn--full-width`),o&&l.push(`wc-btn--uppercase`),s===!1||s===`none`?l.push(`wc-btn--rounded-none`):typeof s==`string`?l.push(`wc-btn--rounded-${s}`):l.push(`wc-btn--rounded`),l}function Dt(e){return{}}function Ot(e){return e===!1||e===`none`?`wc-btn--rounded-none`:typeof e==`string`?`wc-btn--rounded-${e}`:`wc-btn--rounded`}function kt({event:e,disabled:t,loading:n,href:r,target:i,onClick:a}){!t&&!n&&(r&&window.open(r,i),a?.(e))}var At=r({getCardClasses:()=>Vt,getCardStyles:()=>Ht,getVueCardClasses:()=>Kt,handleCardClick:()=>Ut,isValidBorderRadius:()=>Bt,isValidColor:()=>Lt,isValidPadding:()=>zt,isValidSize:()=>Rt,isValidVariant:()=>It,validBorderRadius:()=>Ft,validColors:()=>Mt,validPaddings:()=>Pt,validSizes:()=>Nt,validVariants:()=>jt,vuePaddingClasses:()=>Gt,vueVariantClasses:()=>Wt}),jt=[`filled`,`outlined`,`minimal`,`elevated`],Mt=[`default`,`primary`,`success`,`warning`,`error`,`info`],Nt=[`small`,`medium`,`large`],Pt=[`none`,`sm`,`md`,`lg`],Ft=[`none`,`sm`,`md`,`lg`,`xl`];function It(e){return jt.includes(e)}function Lt(e){return Mt.includes(e)}function Rt(e){return Nt.includes(e)}function zt(e){return Pt.includes(e)}function Bt(e){return Ft.includes(e)}function Vt(e=``,t=`minimal`,n=`default`,r=`medium`,i=!1,a=!0){let o=[`wc-card`];return t&&o.push(`wc-card--${t}`),n&&n!==`default`&&o.push(`wc-card--${n}`),r&&r!==`medium`&&o.push(`wc-card--${r}`),i&&o.push(`wc-card--interactive`),a&&o.push(`wc-card--no-border`),e&&o.push(e),o.filter(Boolean).join(` `)}function Ht(e={}){return{backgroundColor:`var(--wc-neutral-0)`,border:`1px solid var(--wc-neutral-200)`,color:`var(--wc-neutral-900)`,...e}}function Ut(e,t,n,r){!t&&n&&r&&r(e)}var Wt={default:``,elevated:`wc-card--elevated`},Gt={none:`wc-padding-none`,sm:`wc-padding-normal`,md:`wc-padding-comfortable`,lg:`wc-padding-2`};function Kt(e){let{variant:t=`default`,padding:n=`md`}=e,r=[`wc-card`];return Wt[t]&&r.push(Wt[t]),Gt[n]&&r.push(Gt[n]),r.filter(Boolean)}var qt=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Jt=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function ee(){}ee.prototype=v.prototype;function te(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var y=te.prototype=new ee;y.constructor=te,g(y,v.prototype),y.isPureReactComponent=!0;var ne=Array.isArray;function b(){}var x={H:null,A:null,T:null,S:null},S=Object.prototype.hasOwnProperty;function C(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return C(e.type,t,e.props)}function w(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function T(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var E=/\/+/g;function D(e,t){return typeof e==`object`&&e&&e.key!=null?T(``+e.key):t.toString(36)}function O(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(b,b):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,k(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+D(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(E,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(w(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(E,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+D(a,u),c+=k(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+D(a,u++),c+=k(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return k(O(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function A(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function j(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},N={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!w(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=N,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=te,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!S.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return C(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)S.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return C(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=w,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:j}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=x.T,n={};x.T=n;try{var r=e(),i=x.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(b,M)}catch(e){M(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),x.T=t}},e.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},e.use=function(e){return x.H.use(e)},e.useActionState=function(e,t,n){return x.H.useActionState(e,t,n)},e.useCallback=function(e,t){return x.H.useCallback(e,t)},e.useContext=function(e){return x.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return x.H.useEffect(e,t)},e.useEffectEvent=function(e){return x.H.useEffectEvent(e)},e.useId=function(){return x.H.useId()},e.useImperativeHandle=function(e,t,n){return x.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return x.H.useMemo(e,t)},e.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return x.H.useReducer(e,t,n)},e.useRef=function(e){return x.H.useRef(e)},e.useState=function(e){return x.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return x.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return x.H.useTransition()},e.version=`19.2.4`})),Yt=n(((e,t)=>{process.env.NODE_ENV!==`production`&&(function(){function n(e,t){Object.defineProperty(a.prototype,e,{get:function(){console.warn(`%s(...) is deprecated in plain JavaScript React classes. %s`,t[0],t[1])}})}function r(e){return typeof e!=`object`||!e?null:(e=me&&e[me]||e[`@@iterator`],typeof e==`function`?e:null)}function i(e,t){e=(e=e.constructor)&&(e.displayName||e.name)||`ReactClass`;var n=e+`.`+t;he[n]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),he[n]=!0)}function a(e,t,n){this.props=e,this.context=t,this.refs=ve,this.updater=n||ge}function o(){}function s(e,t,n){this.props=e,this.context=t,this.refs=ve,this.updater=n||ge}function c(){}function l(e){return``+e}function u(e){try{l(e);var t=!1}catch{t=!0}if(t){t=console;var n=t.error,r=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return n.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,r),l(e)}}function d(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===be?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case N:return`Fragment`;case ae:return`Profiler`;case ie:return`StrictMode`;case le:return`Suspense`;case ue:return`SuspenseList`;case pe:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case M:return`Portal`;case se:return e.displayName||`Context`;case oe:return(e._context.displayName||`Context`)+`.Consumer`;case ce:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case de:return t=e.displayName||null,t===null?d(e.type)||`Memo`:t;case fe:t=e._payload,e=e._init;try{return d(e(t))}catch{}}return null}function f(e){if(e===N)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===fe)return`<...>`;try{var t=d(e);return t?`<`+t+`>`:`<...>`}catch{return`<...>`}}function p(){var e=F.A;return e===null?null:e.getOwner()}function m(){return Error(`react-stack-top-frame`)}function h(e){if(xe.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function g(e,t){function n(){Ce||(Ce=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function _(){var e=d(this.type);return Te[e]||(Te[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function v(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:j,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,`ref`,{enumerable:!1,value:null}):Object.defineProperty(e,`ref`,{enumerable:!1,get:_}),e._store={},Object.defineProperty(e._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,`_debugInfo`,{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,`_debugStack`,{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,`_debugTask`,{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function ee(e,t){return t=v(e.type,t,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(t._store.validated=e._store.validated),t}function te(e){y(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===fe&&(e._payload.status===`fulfilled`?y(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function y(e){return typeof e==`object`&&!!e&&e.$$typeof===j}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}function b(e,t){return typeof e==`object`&&e&&e.key!=null?(u(e.key),ne(``+e.key)):t.toString(36)}function x(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(c,c):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function S(e,t,n,i,a){var o=typeof e;(o===`undefined`||o===`boolean`)&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case`bigint`:case`string`:case`number`:s=!0;break;case`object`:switch(e.$$typeof){case j:case M:s=!0;break;case fe:return s=e._init,S(s(e._payload),t,n,i,a)}}if(s){s=e,a=a(s);var c=i===``?`.`+b(s,0):i;return ye(a)?(n=``,c!=null&&(n=c.replace(ke,`$&/`)+`/`),S(a,t,n,``,function(e){return e})):a!=null&&(y(a)&&(a.key!=null&&(s&&s.key===a.key||u(a.key)),n=ee(a,n+(a.key==null||s&&s.key===a.key?``:(``+a.key).replace(ke,`$&/`)+`/`)+c),i!==``&&s!=null&&y(s)&&s.key==null&&s._store&&!s._store.validated&&(n._store.validated=2),a=n),t.push(a)),1}if(s=0,c=i===``?`.`:i+`:`,ye(e))for(var l=0;l<e.length;l++)i=e[l],o=c+b(i,l),s+=S(i,t,n,o,a);else if(l=r(e),typeof l==`function`)for(l===e.entries&&(Oe||console.warn(`Using Maps as children is not supported. Use an array of keyed ReactElements instead.`),Oe=!0),e=l.call(e),l=0;!(i=e.next()).done;)i=i.value,o=c+b(i,l++),s+=S(i,t,n,o,a);else if(o===`object`){if(typeof e.then==`function`)return S(x(e),t,n,i,a);throw t=String(e),Error(`Objects are not valid as a React child (found: `+(t===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:t)+`). If you meant to render a collection of children, use an array instead.`)}return s}function C(e,t,n){if(e==null)return e;var r=[],i=0;return S(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._ioInfo;t!=null&&(t.start=t.end=performance.now()),t=e._result;var n=t();if(n.then(function(t){if(e._status===0||e._status===-1){e._status=1,e._result=t;var r=e._ioInfo;r!=null&&(r.end=performance.now()),n.status===void 0&&(n.status=`fulfilled`,n.value=t)}},function(t){if(e._status===0||e._status===-1){e._status=2,e._result=t;var r=e._ioInfo;r!=null&&(r.end=performance.now()),n.status===void 0&&(n.status=`rejected`,n.reason=t)}}),t=e._ioInfo,t!=null){t.value=n;var r=n.displayName;typeof r==`string`&&(t.name=r)}e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return t=e._result,t===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
-
3
- Your code should look like:
4
- const MyComponent = lazy(() => import('./MyComponent'))
5
-
6
- Did you accidentally put curly braces around the import?`,t),`default`in t||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
-
8
- Your code should look like:
9
- const MyComponent = lazy(() => import('./MyComponent'))`,t),t.default;throw e._result}function w(){var e=F.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
10
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
11
- 2. You might be breaking the Rules of Hooks
12
- 3. You might have more than one copy of React in the same app
13
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function T(){F.asyncTransitions--}function E(e){if(Me===null)try{var n=(`require`+Math.random()).slice(0,7);Me=(t&&t[n]).call(t,`timers`).setImmediate}catch{Me=function(e){!1===je&&(je=!0,typeof MessageChannel>`u`&&console.error(`This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.`));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}return Me(e)}function D(e){return 1<e.length&&typeof AggregateError==`function`?AggregateError(e):e[0]}function O(e,t){t!==Ne-1&&console.error(`You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. `),Ne=t}function k(e,t,n){var r=F.actQueue;if(r!==null)if(r.length!==0)try{A(r),E(function(){return k(e,t,n)});return}catch(e){F.thrownErrors.push(e)}else F.actQueue=null;0<F.thrownErrors.length?(r=D(F.thrownErrors),F.thrownErrors.length=0,n(r)):t(e)}function A(e){if(!Fe){Fe=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{F.didUsePromise=!1;var r=n(!1);if(r!==null){if(F.didUsePromise){e[t]=n,e.splice(0,t);return}n=r}else break}while(1)}e.length=0}catch(n){e.splice(0,t+1),F.thrownErrors.push(n)}finally{Fe=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var j=Symbol.for(`react.transitional.element`),M=Symbol.for(`react.portal`),N=Symbol.for(`react.fragment`),ie=Symbol.for(`react.strict_mode`),ae=Symbol.for(`react.profiler`),oe=Symbol.for(`react.consumer`),se=Symbol.for(`react.context`),ce=Symbol.for(`react.forward_ref`),le=Symbol.for(`react.suspense`),ue=Symbol.for(`react.suspense_list`),de=Symbol.for(`react.memo`),fe=Symbol.for(`react.lazy`),pe=Symbol.for(`react.activity`),me=Symbol.iterator,he={},ge={isMounted:function(){return!1},enqueueForceUpdate:function(e){i(e,`forceUpdate`)},enqueueReplaceState:function(e){i(e,`replaceState`)},enqueueSetState:function(e){i(e,`setState`)}},_e=Object.assign,ve={};Object.freeze(ve),a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};var P={isMounted:[`isMounted`,`Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.`],replaceState:[`replaceState`,`Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).`]};for(Le in P)P.hasOwnProperty(Le)&&n(Le,P[Le]);o.prototype=a.prototype,P=s.prototype=new o,P.constructor=s,_e(P,a.prototype),P.isPureReactComponent=!0;var ye=Array.isArray,be=Symbol.for(`react.client.reference`),F={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},xe=Object.prototype.hasOwnProperty,Se=console.createTask?console.createTask:function(){return null};P={react_stack_bottom_frame:function(e){return e()}};var Ce,we,Te={},Ee=P.react_stack_bottom_frame.bind(P,m)(),De=Se(f(m)),Oe=!1,ke=/\/+/g,Ae=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},je=!1,Me=null,Ne=0,Pe=!1,Fe=!1,Ie=typeof queueMicrotask==`function`?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:E;P=Object.freeze({__proto__:null,c:function(e){return w().useMemoCache(e)}});var Le={map:C,forEach:function(e,t,n){C(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return C(e,function(){t++}),t},toArray:function(e){return C(e,function(e){return e})||[]},only:function(e){if(!y(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=pe,e.Children=Le,e.Component=a,e.Fragment=N,e.Profiler=ae,e.PureComponent=s,e.StrictMode=ie,e.Suspense=le,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,e.__COMPILER_RUNTIME=P,e.act=function(e){var t=F.actQueue,n=Ne;Ne++;var r=F.actQueue=t===null?[]:t,i=!1;try{var a=e()}catch(e){F.thrownErrors.push(e)}if(0<F.thrownErrors.length)throw O(t,n),e=D(F.thrownErrors),F.thrownErrors.length=0,e;if(typeof a==`object`&&a&&typeof a.then==`function`){var o=a;return Ie(function(){i||Pe||(Pe=!0,console.error(`You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);`))}),{then:function(e,a){i=!0,o.then(function(i){if(O(t,n),n===0){try{A(r),E(function(){return k(i,e,a)})}catch(e){F.thrownErrors.push(e)}if(0<F.thrownErrors.length){var o=D(F.thrownErrors);F.thrownErrors.length=0,a(o)}}else e(i)},function(e){O(t,n),0<F.thrownErrors.length?(e=D(F.thrownErrors),F.thrownErrors.length=0,a(e)):a(e)})}}}var s=a;if(O(t,n),n===0&&(A(r),r.length!==0&&Ie(function(){i||Pe||(Pe=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),F.actQueue=null),0<F.thrownErrors.length)throw e=D(F.thrownErrors),F.thrownErrors.length=0,e;return{then:function(e,t){i=!0,n===0?(F.actQueue=r,E(function(){return k(s,e,t)})):e(s)}}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.captureOwnerStack=function(){var e=F.getCurrentStack;return e===null?null:e()},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_e({},e.props),i=e.key,a=e._owner;if(t!=null){var o;a:{if(xe.call(t,`ref`)&&(o=Object.getOwnPropertyDescriptor(t,`ref`).get)&&o.isReactWarning){o=!1;break a}o=t.ref!==void 0}for(s in o&&(a=p()),h(t)&&(u(t.key),i=``+t.key),t)!xe.call(t,s)||s===`key`||s===`__self`||s===`__source`||s===`ref`&&t.ref===void 0||(r[s]=t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){o=Array(s);for(var c=0;c<s;c++)o[c]=arguments[c+2];r.children=o}for(r=v(e.type,i,r,a,e._debugStack,e._debugTask),i=2;i<arguments.length;i++)te(arguments[i]);return r},e.createContext=function(e){return e={$$typeof:se,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:oe,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},e.createElement=function(e,t,n){for(var r=2;r<arguments.length;r++)te(arguments[r]);r={};var i=null;if(t!=null)for(c in we||!(`__self`in t)||`key`in t||(we=!0,console.warn(`Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform`)),h(t)&&(u(t.key),i=``+t.key),t)xe.call(t,c)&&c!==`key`&&c!==`__self`&&c!==`__source`&&(r[c]=t[c]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];Object.freeze&&Object.freeze(o),r.children=o}if(e&&e.defaultProps)for(c in a=e.defaultProps,a)r[c]===void 0&&(r[c]=a[c]);i&&g(r,typeof e==`function`?e.displayName||e.name||`Unknown`:e);var c=1e4>F.recentlyCreatedOwnerStacks++;return v(e,i,r,p(),c?Error(`react-stack-top-frame`):Ee,c?Se(f(e)):De)},e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){e!=null&&e.$$typeof===de?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e==`function`?e.length!==0&&e.length!==2&&console.error(`forwardRef render functions accept exactly two parameters: props and ref. %s`,e.length===1?`Did you forget to use the ref parameter?`:`Any additional parameter will be undefined.`):console.error(`forwardRef requires a render function but was given %s.`,e===null?`null`:typeof e),e!=null&&e.defaultProps!=null&&console.error(`forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?`);var t={$$typeof:ce,render:e},n;return Object.defineProperty(t,`displayName`,{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,`name`,{value:t}),e.displayName=t)}}),t},e.isValidElement=y,e.lazy=function(e){e={_status:-1,_result:e};var t={$$typeof:fe,_payload:e,_init:re},n={name:`lazy`,start:-1,end:-1,value:null,owner:null,debugStack:Error(`react-stack-top-frame`),debugTask:console.createTask?console.createTask(`lazy()`):null};return e._ioInfo=n,t._debugInfo=[{awaited:n}],t},e.memo=function(e,t){e??console.error(`memo: The first argument must be a component. Instead received: %s`,e===null?`null`:typeof e),t={$$typeof:de,type:e,compare:t===void 0?null:t};var n;return Object.defineProperty(t,`displayName`,{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,`name`,{value:t}),e.displayName=t)}}),t},e.startTransition=function(e){var t=F.T,n={};n._updatedFibers=new Set,F.T=n;try{var r=e(),i=F.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&(F.asyncTransitions++,r.then(T,T),r.then(c,Ae))}catch(e){Ae(e)}finally{t===null&&n._updatedFibers&&(e=n._updatedFibers.size,n._updatedFibers.clear(),10<e&&console.warn(`Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.`)),t!==null&&n.types!==null&&(t.types!==null&&t.types!==n.types&&console.error(`We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.`),t.types=n.types),F.T=t}},e.unstable_useCacheRefresh=function(){return w().useCacheRefresh()},e.use=function(e){return w().use(e)},e.useActionState=function(e,t,n){return w().useActionState(e,t,n)},e.useCallback=function(e,t){return w().useCallback(e,t)},e.useContext=function(e){var t=w();return e.$$typeof===oe&&console.error(`Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?`),t.useContext(e)},e.useDebugValue=function(e,t){return w().useDebugValue(e,t)},e.useDeferredValue=function(e,t){return w().useDeferredValue(e,t)},e.useEffect=function(e,t){return e??console.warn(`React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?`),w().useEffect(e,t)},e.useEffectEvent=function(e){return w().useEffectEvent(e)},e.useId=function(){return w().useId()},e.useImperativeHandle=function(e,t,n){return w().useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return e??console.warn(`React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?`),w().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return e??console.warn(`React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?`),w().useLayoutEffect(e,t)},e.useMemo=function(e,t){return w().useMemo(e,t)},e.useOptimistic=function(e,t){return w().useOptimistic(e,t)},e.useReducer=function(e,t,n){return w().useReducer(e,t,n)},e.useRef=function(e){return w().useRef(e)},e.useState=function(e){return w().useState(e)},e.useSyncExternalStore=function(e,t,n){return w().useSyncExternalStore(e,t,n)},e.useTransition=function(){return w().useTransition()},e.version=`19.2.4`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),Xt=n(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Jt():t.exports=Yt()})),Zt=n((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===w?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case ee:return`Profiler`;case v:return`StrictMode`;case b:return`Suspense`;case x:return`SuspenseList`;case re:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case y:return e.displayName||`Context`;case te:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case S:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case C:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===C)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=T.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(E.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){k||(k=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function l(){var e=t(this.type);return A[e]||(A[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,`ref`,{enumerable:!1,value:null}):Object.defineProperty(e,`ref`,{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,`_debugInfo`,{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,`_debugStack`,{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,`_debugTask`,{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(D(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`);else f(p);if(E.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,N[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
14
- let props = %s;
15
- <%s {...props} />
16
- React keys must be passed directly to JSX without using spread:
17
- let props = %s;
18
- <%s key={someKey} {...props} />`,o,p,m,p),N[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===C&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=Xt(),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),te=Symbol.for(`react.consumer`),y=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),b=Symbol.for(`react.suspense`),x=Symbol.for(`react.suspense_list`),S=Symbol.for(`react.memo`),C=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),w=Symbol.for(`react.client.reference`),T=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=Object.prototype.hasOwnProperty,D=Array.isArray,O=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var k,A={},j=m.react_stack_bottom_frame.bind(m,o)(),M=O(i(o)),N={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>T.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):j,r?O(i(e)):M)},e.jsxs=function(e,t,n){var r=1e4>T.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):j,r?O(i(e)):M)}})()})),Qt=n(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=qt():t.exports=Zt()})),$t=r({generateCheckboxId:()=>pn,getCheckboxClasses:()=>cn,getCheckboxStyles:()=>ln,handleCheckboxChange:()=>un,handleCheckboxKeyDown:()=>dn,isValidColor:()=>on,isValidLabelPlacement:()=>sn,isValidSize:()=>an,renderCheckboxIcon:()=>fn,validColors:()=>nn,validLabelPlacements:()=>rn,validSizes:()=>tn}),en=Qt(),tn=[`sm`,`md`,`lg`],nn=[`primary`,`secondary`,`success`,`warning`,`error`],rn=[`start`,`end`];function an(e){return tn.includes(e)}function on(e){return nn.includes(e)}function sn(e){return rn.includes(e)}function cn(e){let{size:t=`md`,color:n=`primary`,labelPlacement:r=`end`,checked:i=!1,indeterminate:a=!1,disabled:o=!1,isFocused:s=!1,className:c=``}=e,l=[`wc-checkbox`];return l.push(`wc-checkbox--${t}`),l.push(`wc-checkbox--${n}`),l.push(`wc-checkbox--label-${r}`),i&&l.push(`wc-checkbox--checked`),a&&l.push(`wc-checkbox--indeterminate`),o&&l.push(`wc-checkbox--disabled`),s&&l.push(`wc-checkbox--focused`),c&&l.push(c),l.filter(Boolean)}function ln(e){let{checked:t,indeterminate:n,color:r,style:i={}}=e,a={...i};return t||n?(a.borderColor=`var(--wc-${r}-500)`,a.backgroundColor=`var(--wc-${r}-500)`):(a.borderColor=`var(--wc-neutral-300)`,a.backgroundColor=`transparent`),a}function un(e,t,n,r,i,a){!t&&a&&a({target:{name:r,value:i,checked:!n},preventDefault:()=>{},stopPropagation:()=>{}})}function dn(e,t){(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),t(e))}function fn(e,t,n,r,i){return e?n||(0,en.jsx)(`svg`,{className:`wc-checkbox__icon`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,en.jsx)(`path`,{d:`M19 13H5v-2h14v2z`})}):t?r||(0,en.jsx)(`svg`,{className:`wc-checkbox__icon`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,en.jsx)(`path`,{d:`M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`})}):i||null}function pn(e,t){return e||t||`checkbox-${Math.random().toString(36).substr(2,9)}`}var mn=r({calculateCircleParams:()=>bn,calculateStrokeDashoffset:()=>xn,formatDisplayValue:()=>wn,getAriaProps:()=>Tn,getCircleClasses:()=>Cn,getCircularProgressClasses:()=>Sn,isValidColor:()=>vn,isValidValue:()=>yn,isValidVariant:()=>_n,validColors:()=>gn,validVariants:()=>hn}),hn=[`determinate`,`indeterminate`],gn=[`primary`,`secondary`,`success`,`warning`,`error`,`inherit`];function _n(e){return hn.includes(e)}function vn(e){return gn.includes(e)}function yn(e){return typeof e==`number`&&e>=0&&e<=100}function bn(e,t){let n=typeof e==`string`?parseInt(e,10):e,r=n/2,i=(n-t)/2;return{sizeNumber:n,center:r,radius:i,circumference:2*Math.PI*i}}function xn(e,t,n){return e===`determinate`?n-t/100*n:0}function Sn(e){let{color:t=`primary`,variant:n=`indeterminate`,overlay:r=!1,centered:i=!1,inline:a=!1,className:o=``}=e,s=[`wc-circular-progress`];return s.push(`wc-circular-progress--${t}`),n===`indeterminate`&&s.push(`wc-circular-progress--indeterminate`),r&&s.push(`wc-circular-progress--overlay`),i&&s.push(`wc-circular-progress--centered`),a&&s.push(`wc-circular-progress--inline`),o&&s.push(o),s.filter(Boolean)}function Cn(e){let t=[`wc-circular-progress-circle`];return e===`indeterminate`&&t.push(`wc-circular-progress-circle--indeterminate`),t.filter(Boolean)}function wn(e){return Math.round(e)}function Tn(e){let{value:t=0,variant:n}=e,r={role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100};return n===`determinate`&&(r[`aria-valuenow`]=t),r}var En=r({getColorPickerClasses:()=>Mn,getLuminance:()=>Ln,getPreviewStyles:()=>Pn,handleColorChange:()=>Nn,hexToRgb:()=>Fn,isDarkColor:()=>Rn,isValidHexColor:()=>jn,isValidShape:()=>An,isValidSize:()=>kn,rgbToHex:()=>In,validShapes:()=>On,validSizes:()=>Dn}),Dn=[`sm`,`md`,`lg`],On=[`circle`,`square`,`rounded`];function kn(e){return Dn.includes(e)}function An(e){return On.includes(e)}function jn(e){return/^#([0-9A-F]{3}){1,2}$/i.test(e)}function Mn(e){let{size:t=`md`,shape:n=`circle`,disabled:r=!1,className:i=``}=e,a=[`wc-color-picker`];return a.push(`wc-color-picker--${t}`),a.push(`wc-color-picker--${n}`),r&&a.push(`wc-color-picker--disabled`),i&&a.push(i),a.filter(Boolean)}function Nn(e,t,n){!t&&n&&n(e.target.value)}function Pn(e){return{backgroundColor:e}}function Fn(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function In(e,t,n){return`#`+((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}function Ln(e){let t=Fn(e);return t?.299*t.r+.587*t.g+.114*t.b:0}function Rn(e){return Ln(e)<128}var zn=r({getContainerClasses:()=>Un,getTailwindContainerClasses:()=>Wn,isValidMaxWidth:()=>Vn,validMaxWidths:()=>Bn,widthMap:()=>Hn}),Bn=[`xs`,`sm`,`md`,`lg`,`xl`,`2xl`];function Vn(e){return Bn.includes(e)}var Hn={xs:`max-w-xs`,sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-4xl`,xl:`max-w-6xl`,"2xl":`max-w-7xl`};function Un(e){let{maxWidth:t=`lg`,fluid:n=!1,fixed:r=!1,className:i=``}=e,a=[`wc-container`];return n?a.push(`wc-container--fluid`):r?a.push(`wc-container--fixed`):t&&Vn(t)&&a.push(`wc-container--${t}`),i&&a.push(i),a.filter(Boolean)}function Wn(e){let{maxWidth:t=`lg`,fluid:n=!1,fixed:r=!1,className:i=``}=e,a=[`mx-auto px-4 sm:px-6 lg:px-8`];return n||r?a.push(`w-full`):t&&Hn[t]&&a.push(Hn[t]),i&&a.push(i),a.filter(Boolean)}var Gn=r({copyToClipboard:()=>$n,getCopyClasses:()=>Xn,getCurrentLabel:()=>Zn,getTooltipClasses:()=>tr,getTooltipText:()=>Qn,handleCopyOperation:()=>er,isValidSize:()=>Yn,isValidVariant:()=>Jn,validSizes:()=>qn,validVariants:()=>Kn}),Kn=[`default`,`primary`,`secondary`,`success`,`warning`,`error`],qn=[`sm`,`md`,`lg`];function Jn(e){return Kn.includes(e)}function Yn(e){return qn.includes(e)}function Xn(e){let{variant:t=`default`,size:n=`md`,copied:r=!1,copyError:i=!1,className:a=``}=e,o=[`wc-copy`];return o.push(`wc-copy--${t}`),o.push(`wc-copy--${n}`),r&&o.push(`wc-copy--copied`),i&&o.push(`wc-copy--error`),a&&o.push(a),o.filter(Boolean)}function Zn(e,t,n,r){return t?`错误`:e?r:n}function Qn(e,t,n,r){return t?r:e?n:``}async function $n(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0;{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}}catch(e){return console.warn(`复制失败:`,e),!1}}async function er(e,t,n,r,i,a,o,s){await $n(e)?(r(!0),i(!1),t(e)):(r(!1),i(!0),n(Error(`复制失败`))),o&&a&&(a(!0),setTimeout(()=>a(!1),1500)),setTimeout(()=>{r(!1),i(!1)},s)}function tr(e,t){let n=`wc-copy-tooltip`;return e&&(n+=` wc-copy-tooltip--success`),t&&(n+=` wc-copy-tooltip--error`),n}var nr=r({formatDate:()=>rr,generateCalendarDays:()=>lr,getDatePickerClasses:()=>dr,getDayClasses:()=>fr,getDaysInMonth:()=>sr,getFirstDayOfMonth:()=>cr,isDateInRange:()=>ur,isSameDate:()=>or,isToday:()=>ar,parseDate:()=>ir});function rr(e,t=`YYYY-MM-DD`){if(!e||!(e instanceof Date))return``;let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,`0`),i=String(e.getDate()).padStart(2,`0`);return t.replace(`YYYY`,n).replace(`MM`,r).replace(`DD`,i)}function ir(e){if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t}function ar(e){if(!e)return!1;let t=new Date;return e.toDateString()===t.toDateString()}function or(e,t){return!e||!t?!1:e.toDateString()===t.toDateString()}function sr(e,t){return new Date(e,t+1,0).getDate()}function cr(e,t){return new Date(e,t,1).getDay()}function lr(e){let t=e.getFullYear(),n=e.getMonth(),r=new Date(t,n,1),i=new Date(t,n+1,0),a=r.getDay(),o=i.getDate(),s=[],c=new Date(t,n-1,0);for(let e=a-1;e>=0;e--)s.push({day:c.getDate()-e,month:`prev`,date:new Date(t,n-1,c.getDate()-e)});for(let e=1;e<=o;e++)s.push({day:e,month:`current`,date:new Date(t,n,e)});let l=42-s.length;for(let e=1;e<=l;e++)s.push({day:e,month:`next`,date:new Date(t,n+1,e)});return s}function ur(e,t,n){return!(!e||t&&e<t||n&&e>n)}function dr(e=`md`,t=`default`,n=!1,r=!1,i=!1){let a=[`wc-datepicker-wrapper`,`wc-datepicker-wrapper--${e}`,`wc-datepicker-wrapper--${t}`];return n&&a.push(`wc-datepicker-wrapper--disabled`),r&&a.push(`wc-datepicker-wrapper--focused`),i&&a.push(`wc-datepicker-wrapper--open`),a.join(` `)}function fr(e,t){let n=[`wc-datepicker-day`];return e.month===`prev`&&n.push(`wc-datepicker-day--prev`),e.month===`next`&&n.push(`wc-datepicker-day--next`),e.month===`current`&&n.push(`wc-datepicker-day--current`),t&&or(e.date,t)&&n.push(`wc-datepicker-day--selected`),ar(e.date)&&n.push(`wc-datepicker-day--today`),n.join(` `)}var pr=r({getDividerClasses:()=>gr,validOrientations:()=>hr,validVariants:()=>mr}),mr=[`solid`,`dashed`,`dotted`],hr=[`horizontal`,`vertical`],gr=({variant:e=`solid`,orientation:t=`horizontal`,flexItem:n=!1,className:r=``})=>{let i=[`wc-divider`];return mr.includes(e)&&i.push(`wc-divider--${e}`),hr.includes(t)&&i.push(`wc-divider--${t}`),n&&i.push(`wc-divider--flex-item`),r&&i.push(r),i.join(` `)},_r=r({getFeatureCardClasses:()=>wr,getFeatureContentClasses:()=>Er,getFeatureDescriptionClasses:()=>Or,getFeatureIconClasses:()=>Tr,getFeatureTitleClasses:()=>Dr,handleCtaClick:()=>Ar,handleFeatureClick:()=>kr,isValidAlignment:()=>xr,isValidBackground:()=>Cr,isValidSize:()=>Sr,renderIcon:()=>jr,validAlignments:()=>vr,validBackgrounds:()=>br,validSizes:()=>yr}),vr=[`left`,`center`],yr=[`sm`,`md`,`lg`],br=[`default`,`transparent`,`white`,`gray`,`primary`];function xr(e){return vr.includes(e)}function Sr(e){return yr.includes(e)}function Cr(e){return br.includes(e)}var wr=({align:e,size:t,background:n,reverse:r,vertical:i,clickable:a,disabled:o,className:s})=>[`wc-feature-card`,a&&`wc-feature-card--clickable`,o&&`wc-feature-card--disabled`,r&&`wc-feature-card--reverse`,i&&`wc-feature-card--vertical`,`wc-feature-card--${t}`,`wc-feature-card--${n}`,`wc-feature-card--${e}`,s].filter(Boolean);function Tr(e){return[`wc-feature-icon`,`wc-feature-icon--${e}`].filter(Boolean)}function Er(e){return[`wc-feature-content`,`wc-feature-content--${e}`].filter(Boolean)}function Dr(e){return[`wc-feature-title`,`wc-feature-title--${e}`].filter(Boolean)}var Or=e=>[`wc-feature-description`,`wc-feature-description--${e}`].filter(Boolean);function kr(e,t,n){!t&&n&&n(e)}function Ar(e,t){e.stopPropagation(),t&&t(e)}function jr(e){return e}var Mr=r({formatFeedTime:()=>Fr,getFeedItemClasses:()=>Pr,getFeedListClasses:()=>Nr,getFeedStats:()=>Vr,groupFeedByDate:()=>Br,handleFeedItemClick:()=>Ir,processFeedChildren:()=>Lr,searchFeedItems:()=>zr,validateFeedData:()=>Rr});function Nr(e=`list`,t=`md`,n=``){let r=[`wc-feed-list`];return e&&r.push(e),t!==`md`&&r.push(`wc-feed-list--${t}`),n&&r.push(n),r.filter(Boolean).join(` `)}function Pr(e=`list`,t=!1,n=!1){let r=[`wc-feed-item`];return e&&r.push(e),t&&r.push(`wc-feed-item--active`),n&&r.push(`wc-feed-item--disabled`),r.join(` `)}function Fr(e,t={}){let{format:n=`relative`,locale:r=`zh-CN`}=t;if(!e)return``;let i=new Date(e),a=new Date,o=a.getTime()-i.getTime();if(n===`relative`||n===`mixed`&&o<10080*60*1e3){let e=Math.floor(o/1e3),t=Math.floor(e/60),n=Math.floor(t/60),r=Math.floor(n/24);if(e<60)return`刚刚`;if(t<60)return`${t}分钟前`;if(n<24)return`${n}小时前`;if(r<7)return`${r}天前`}let s={year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`};return i.getFullYear()===a.getFullYear()&&delete s.year,i.toLocaleDateString(r,s)}function Ir(e,t,n){if(e.disabled){n.preventDefault();return}t&&typeof t==`function`&&t(e,n)}function Lr(e=[],t={}){let{maxDepth:n=5,currentDepth:r=0,showAvatar:i=!0,variant:a=`list`}=t;return!Array.isArray(e)||r>=n?[]:e.map(e=>({...e,depth:r+1,showAvatar:i&&r<3,children:Lr(e.children,{...t,currentDepth:r+1})}))}function Rr(e){return Array.isArray(e)?e.every(e=>!(!e.id&&!e.time||!e.author||!e.text||e.children&&!Array.isArray(e.children))):!1}function zr(e,t,n={}){let{fields:r=[`author`,`text`],caseSensitive:i=!1,includeChildren:a=!0}=n;if(!t.trim())return e;let o=i?t:t.toLowerCase(),s=e=>r.some(t=>{let n=e[t];return n?(i?n:n.toLowerCase()).includes(o):!1})?!0:a&&e.children?e.children.some(s):!1;return e.filter(s)}function Br(e,t=`day`){let n={};e.forEach(e=>{let r=new Date(e.time),i;switch(t){case`day`:i=r.toDateString();break;case`week`:let e=new Date(r);e.setDate(r.getDate()-r.getDay()),i=e.toDateString();break;case`month`:i=`${r.getFullYear()}-${r.getMonth()}`;break;default:i=r.toDateString()}n[i]||(n[i]=[]),n[i].push(e)});let r={};return Object.keys(n).sort((e,t)=>new Date(t)-new Date(e)).forEach(e=>{r[e]=n[e].sort((e,t)=>new Date(t.time)-new Date(e.time))}),r}function Vr(e){let t={totalItems:0,totalReplies:0,uniqueAuthors:new Set,dateRange:{earliest:null,latest:null}},n=(e,r=!1)=>{e.forEach(e=>{r?t.totalReplies++:t.totalItems++,t.uniqueAuthors.add(e.author);let i=new Date(e.time);(!t.dateRange.earliest||i<t.dateRange.earliest)&&(t.dateRange.earliest=i),(!t.dateRange.latest||i>t.dateRange.latest)&&(t.dateRange.latest=i),e.children&&n(e.children,!0)})};return n(e),{...t,uniqueAuthors:t.uniqueAuthors.size}}var Hr=r({checkFileSizes:()=>Gr,createFilePreview:()=>Qr,formatFileSize:()=>Kr,generateFileId:()=>ei,getFileInputClasses:()=>Ur,getFileTypeIcon:()=>qr,getFilesFromDragEvent:()=>Yr,handleDragEvents:()=>Jr,isDragSupported:()=>Xr,readFile:()=>Zr,uploadFile:()=>$r,validateFiles:()=>Wr}),Ur=e=>`wc-file-input-wrapper variant-${e}`;function Wr(e,t=``){if(!t)return{valid:[...e],invalid:[]};let n=t.split(`,`).map(e=>e.trim()),r=[],i=[];return Array.from(e).forEach(e=>{n.some(t=>{if(t.startsWith(`.`))return e.name.toLowerCase().endsWith(t.toLowerCase());if(t.includes(`/`)){if(t.endsWith(`/*`)){let n=t.substring(0,t.length-2);return e.type.startsWith(n)}return e.type===t}return!1})?r.push(e):i.push(e)}),{valid:r,invalid:i}}function Gr(e,t=1/0,n=1/0){let r=[],i=[],a=0;return e.forEach(e=>{e.size>t?i.push(e):(r.push(e),a+=e.size)}),{valid:r,oversized:i,totalOverflow:a>n,totalSize:a}}function Kr(e,t=2){if(e===0)return`0 B`;let n=1024,r=t<0?0:t,i=[`B`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],a=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/n**+a).toFixed(r))+` `+i[a]}function qr(e){let{type:t,name:n}=e;return t.startsWith(`image/`)?`🖼️`:t.includes(`pdf`)?`📄`:t.includes(`word`)||n.endsWith(`.docx`)||n.endsWith(`.doc`)?`📝`:t.includes(`excel`)||n.endsWith(`.xlsx`)||n.endsWith(`.xls`)?`📊`:t.includes(`powerpoint`)||n.endsWith(`.pptx`)||n.endsWith(`.ppt`)?`📈`:t.includes(`zip`)||t.includes(`rar`)||t.includes(`tar`)?`🗜️`:t.startsWith(`audio/`)?`🎵`:t.startsWith(`video/`)?`🎬`:[`.js`,`.ts`,`.jsx`,`.tsx`,`.html`,`.css`,`.scss`,`.json`,`.xml`].some(e=>n.endsWith(e))?`💻`:t.startsWith(`text/`)||n.endsWith(`.txt`)?`📋`:`📁`}function Jr(e,t={}){let{onDragEnter:n,onDragLeave:r,onDragOver:i,onDrop:a}=t;switch(e.preventDefault(),e.stopPropagation(),e.type){case`dragenter`:n&&n(e);break;case`dragleave`:r&&r(e);break;case`dragover`:i&&i(e);break;case`drop`:a&&a(e);break}}function Yr(e){let t=[];return e.dataTransfer.items?Array.from(e.dataTransfer.items).forEach(e=>{if(e.kind===`file`){let n=e.getAsFile();n&&t.push(n)}}):Array.from(e.dataTransfer.files).forEach(e=>{t.push(e)}),t}function Xr(){let e=document.createElement(`div`);return`draggable`in e||`ondragstart`in e&&`ondrop`in e}function Zr(e,t=`dataURL`){return new Promise((n,r)=>{let i=new FileReader;switch(i.onload=e=>n(e.target.result),i.onerror=e=>r(e),t){case`text`:i.readAsText(e);break;case`dataURL`:i.readAsDataURL(e);break;case`arrayBuffer`:i.readAsArrayBuffer(e);break;case`binaryString`:i.readAsBinaryString(e);break;default:i.readAsDataURL(e)}})}async function Qr(e){if(e.type.startsWith(`image/`))try{return await Zr(e,`dataURL`)}catch{return null}return null}function $r(e,t,n={}){let{method:r=`POST`,headers:i={},fieldName:a=`file`,data:o={},onProgress:s,signal:c}=n;return new Promise((n,l)=>{let u=new XMLHttpRequest,d=new FormData;d.append(a,e),Object.keys(o).forEach(e=>{d.append(e,o[e])}),s&&u.upload.addEventListener(`progress`,e=>{e.lengthComputable&&s(e.loaded/e.total*100,e)}),u.addEventListener(`load`,()=>{if(u.status>=200&&u.status<300)try{n(JSON.parse(u.responseText))}catch{n(u.responseText)}else l(Error(`Upload failed: ${u.status} ${u.statusText}`))}),u.addEventListener(`error`,()=>{l(Error(`Upload failed`))}),c&&c.addEventListener(`abort`,()=>{u.abort(),l(Error(`Upload cancelled`))}),Object.keys(i).forEach(e=>{u.setRequestHeader(e,i[e])}),u.open(r,t),u.send(d)})}function ei(e){return`${Date.now()}_${Math.random().toString(36).substr(2,9)}_${e.name.replace(/[^a-zA-Z0-9.-]/g,`_`)}`}var ti=r({createFieldUpdater:()=>ui,createFormContext:()=>oi,deserializeFormData:()=>hi,getFormControlClasses:()=>ni,getFormControlLabelClasses:()=>ri,getFormGroupClasses:()=>ii,getFormHelperTextClasses:()=>ai,getNestedValue:()=>fi,handleFormSubmit:()=>li,resetForm:()=>di,serializeFormData:()=>mi,setNestedValue:()=>pi,validateForm:()=>ci,validateFormField:()=>si});function ni({fullWidth:e=!1,margin:t=`normal`,disabled:n=!1,error:r=!1,className:i=``}={}){let a=[`form-control`];return e&&a.push(`form-control--full-width`),t!==`normal`&&a.push(`form-control--margin-${t}`),n&&a.push(`form-control--disabled`),r&&a.push(`form-control--error`),i&&a.push(i),a.filter(Boolean).join(` `)}function ri({labelPlacement:e=`end`,disabled:t=!1,className:n=``}={}){let r=[`form-control-label`,`form-control-label--placement-${e}`];return t&&r.push(`form-control-label--disabled`),n&&r.push(n),r.filter(Boolean).join(` `)}function ii({row:e=!1,className:t=``}={}){let n=[`form-group`];return e?n.push(`form-group--row`):n.push(`form-group--column`),t&&n.push(t),n.filter(Boolean).join(` `)}function ai({variant:e=`standard`,className:t=``}={}){let n=[`form-helper-text`];return e!==`standard`&&n.push(`form-helper-text--${e}`),t&&n.push(t),n.filter(Boolean).join(` `)}function oi(e={},t={}){let{disabled:n=!1,error:r=!1,required:i=!1,variant:a=`outlined`,size:o=`md`}=t;return{disabled:n,error:r,required:i,variant:a,size:o,...e}}function si(e,t={}){let n=[],{required:r=!1,minLength:i,maxLength:a,min:o,max:s,pattern:c,email:l=!1,url:u=!1,custom:d=[]}=t;if(r&&(e==null||e===``))return n.push(`此字段为必填项`),{isValid:!1,errors:n};if(e==null||e===``)return{isValid:!0,errors:[]};let f=String(e);if(i!==void 0&&f.length<i&&n.push(`最少需要${i}个字符`),a!==void 0&&f.length>a&&n.push(`最多允许${a}个字符`),o!==void 0){let t=Number(e);!isNaN(t)&&t<o&&n.push(`值不能小于${o}`)}if(s!==void 0){let t=Number(e);!isNaN(t)&&t>s&&n.push(`值不能大于${s}`)}if(c&&((typeof c==`string`?new RegExp(c):c).test(f)||n.push(`格式不正确`)),l&&(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)||n.push(`请输入有效的邮箱地址`)),u)try{new URL(f)}catch{n.push(`请输入有效的URL地址`)}return Array.isArray(d)&&d.forEach(t=>{if(typeof t==`function`){let r=t(e);r!==!0&&n.push(r||`验证失败`)}}),{isValid:n.length===0,errors:n}}function ci(e,t){let n={},r=!0;return Object.keys(t).forEach(i=>{let a=e[i],o=t[i],s=si(a,o);s.isValid||(n[i]=s.errors,r=!1)}),{isValid:r,errors:n}}async function li(e,t,n={}){e.preventDefault();let{validationSchema:r,onSubmit:i,onError:a,onValidationError:o,transform:s}=n;try{let e=t;if(s&&typeof s==`function`&&(e=s(t)),r){let t=ci(e,r);if(!t.isValid)return o&&o(t.errors),{success:!1,errors:t.errors}}return i?{success:!0,data:await i(e)}:{success:!0,data:e}}catch(e){return a&&a(e),{success:!1,error:e}}}function ui(e){return(t,n)=>{e(e=>({...e,[t]:n}))}}function di(e={},t,n){t&&t(e),n&&n({})}function fi(e,t){return t.split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)}function pi(e,t,n){let r=t.split(`.`),i={...e},a=i;for(let e=0;e<r.length-1;e++){let t=r[e];!a[t]||typeof a[t]!=`object`?a[t]={}:a[t]={...a[t]},a=a[t]}return a[r[r.length-1]]=n,i}function mi(e){let t=new URLSearchParams;return Object.keys(e).forEach(n=>{let r=e[n];r!=null&&r!==``&&(Array.isArray(r)?r.forEach(e=>t.append(n,e)):t.append(n,r))}),t.toString()}function hi(e){let t=new URLSearchParams(e),n={};for(let[e,r]of t.entries())n[e]?Array.isArray(n[e])?n[e].push(r):n[e]=[n[e],r]:n[e]=r;return n}var gi=r({ALIGN_ITEMS_MAP:()=>bi,BREAKPOINTS:()=>_i,DIRECTION_MAP:()=>vi,JUSTIFY_CONTENT_MAP:()=>yi,VALID_SPACING_VALUES:()=>xi,calculateGridItemWidth:()=>Pi,createGridConfig:()=>Ii,debugGridConfig:()=>Bi,formatGridProps:()=>Ni,getBreakpointClasses:()=>Ti,getBreakpointInfo:()=>Fi,getContainerClasses:()=>Si,getGridClasses:()=>Di,getGridContainerStyles:()=>Ri,getGridItemStyles:()=>zi,getItemClasses:()=>Ci,getSpacingClasses:()=>wi,getWidthClass:()=>Ei,isValidAlignItems:()=>Ai,isValidBreakpointValue:()=>ji,isValidDirection:()=>Oi,isValidJustifyContent:()=>ki,isValidSpacing:()=>Mi,mergeGridClasses:()=>Li}),_i={xs:`xs`,sm:`sm`,md:`md`,lg:`lg`,xl:`xl`},vi={row:`wc-grid-container--row`,column:`wc-grid-container--column`,"row-reverse":`wc-grid-container--row-reverse`,"column-reverse":`wc-grid-container--column-reverse`},yi={"flex-start":`wc-grid-container--justify-start`,center:`wc-grid-container--justify-center`,"flex-end":`wc-grid-container--justify-end`,"space-between":`wc-grid-container--justify-between`,"space-around":`wc-grid-container--justify-around`,"space-evenly":`wc-grid-container--justify-evenly`},bi={"flex-start":`wc-grid-container--align-start`,center:`wc-grid-container--align-center`,"flex-end":`wc-grid-container--align-end`,stretch:`wc-grid-container--align-stretch`,baseline:`wc-grid-container--align-baseline`},xi=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`],Si=e=>{let{direction:t=`row`,justifyContent:n=`flex-start`,alignItems:r=`stretch`,spacing:i=0}=e,a=[`wc-grid`,`wc-grid-container`];return vi[t]&&a.push(vi[t]),yi[n]&&a.push(yi[n]),bi[r]&&a.push(bi[r]),a.push(...wi(i)),a},Ci=e=>{let{xs:t,sm:n,md:r,lg:i,xl:a}=e,o=[`wc-grid`,`wc-grid-item`];return Object.entries(_i).forEach(([t,n])=>{let r=e[t];r!==void 0&&o.push(...Ti(r,n))}),o},wi=e=>{let t=Number(e);return[`wc-grid-container--spacing-${Number.isFinite(t)?Math.max(0,Math.min(12,Math.round(t))):0}`]},Ti=(e,t)=>{if(e===!1||e==null)return[];if(e===`auto`)return[`wc-grid-item--${t}-auto`];if(e===!0)return[`wc-grid-item--${t}-true`];let n=Number(e);return Number.isFinite(n)&&n>=1&&n<=12?[`wc-grid-item--${t}-${Math.round(n)}`]:[]},Ei=e=>{switch(e){case 100:return`full`;case 50:return`1/2`;case 25:return`1/4`;case 75:return`3/4`;case 33:return`1/3`;case 67:return`2/3`;case 17:return`1/6`;case 83:return`5/6`;default:return`[${e}%]`}},Di=e=>{let{container:t=!1,item:n=!1,className:r=``}=e,i=[];return t&&i.push(...Si(e)),n&&i.push(...Ci(e)),r&&i.push(r),i},Oi=e=>Object.keys(vi).includes(e),ki=e=>Object.keys(yi).includes(e),Ai=e=>Object.keys(bi).includes(e),ji=e=>e==null||e===`auto`||e===!0?!0:typeof e==`number`?e>=1&&e<=12:!1,Mi=e=>{if(e==null)return!0;let t=Number(e);return!isNaN(t)&&t>=0},Ni=e=>{let t={...e};return t.spacing!==void 0&&(t.spacing=Number(t.spacing)||0),[`xs`,`sm`,`md`,`lg`,`xl`].forEach(e=>{let n=t[e];if(n!=null&&n!==!1&&n!==`auto`&&n!==!0){let r=Number(n);isNaN(r)||(t[e]=Math.max(1,Math.min(12,r)))}}),t},Pi=(e,t=12)=>e<=0||t<=0?0:Math.round(e/t*100),Fi=e=>{let t={};return Object.entries(_i).forEach(([n,r])=>{e[n]!==void 0&&(t[n]={value:e[n],prefix:r,classes:Ti(e[n],r)})}),t},Ii=(e={})=>{let{container:t=!1,item:n=!1,spacing:r=0,direction:i=`row`,justifyContent:a=`flex-start`,alignItems:o=`stretch`,breakpoints:s={}}=e;return{container:t,item:n,spacing:r,direction:i,justifyContent:a,alignItems:o,...s}},Li=(...e)=>e.filter(Boolean).join(` `).split(` `).filter((e,t,n)=>n.indexOf(e)===t).join(` `),Ri=e=>{let{spacing:t=0,style:n={}}=e,r={...n};return t>0&&!xi.includes(t.toString())&&(r.gap=`${t*.25}rem`),r},zi=e=>{let{style:t={}}=e;return{...t}},Bi=e=>{let t=Di(e),n=Fi(e);return{props:Ni(e),classes:t,breakpointInfo:n,validation:{direction:Oi(e.direction),justifyContent:ki(e.justifyContent),alignItems:Ai(e.alignItems),spacing:Mi(e.spacing),breakpoints:{xs:ji(e.xs),sm:ji(e.sm),md:ji(e.md),lg:ji(e.lg),xl:ji(e.xl)}}}},Vi=r({DEFAULT_CONFIG:()=>Hi,VALID_POSITIONS:()=>Ui,VALID_SIZES:()=>Wi,VALID_TRIGGERS:()=>Ki,VALID_VARIANTS:()=>Gi,adjustForCollision:()=>sa,calculateOffset:()=>na,calculateOptimalPosition:()=>ta,createEventHandlers:()=>ia,createHoverCardConfig:()=>fa,createVisibilityController:()=>ra,debounce:()=>ua,debugHoverCardConfig:()=>pa,formatContent:()=>ca,generateHoverCardId:()=>la,getContentClasses:()=>Yi,getContentStyle:()=>Xi,getHoverCardClasses:()=>qi,getTriggerClasses:()=>Ji,handleKeyboard:()=>oa,handleOutsideClick:()=>aa,isValidPosition:()=>Zi,isValidSize:()=>Qi,isValidTrigger:()=>ea,isValidVariant:()=>$i,throttle:()=>da}),Hi={position:`bottom`,size:`md`,variant:`outlined`,showArrow:!0,trigger:`hover`,delay:300,hideDelay:100,disabled:!1,closeOnOutsideClick:!0,closeOnEscape:!0,zIndex:1e3},Ui=[`top`,`bottom`,`left`,`right`],Wi=[`sm`,`md`,`lg`,`xl`],Gi=[`outlined`,`filled`,`minimal`,`elevated`],Ki=[`hover`,`click`,`focus`,`manual`],qi=e=>{let{className:t=``}=e,n=[`hover-card-container`];return t&&n.push(t),n},Ji=e=>{let{disabled:t=!1,className:n=``}=e,r=[`hover-card-trigger`];return t&&r.push(`hover-card-trigger--disabled`),n&&r.push(n),r},Yi=e=>{let{position:t=`bottom`,size:n=`md`,variant:r=`outlined`,visible:i=!1,showArrow:a=!0,className:o=``}=e,s=[`hover-card-content`,`hover-card-content--${t}`,`hover-card-content--${n}`,`hover-card-content--${r}`];return i&&s.push(`hover-card-content--visible`),a||s.push(`hover-card-content--no-arrow`),o&&s.push(o),s},Xi=e=>{let{zIndex:t=1e3,maxWidth:n,minWidth:r}=e,i={zIndex:t};return n&&(i.maxWidth=typeof n==`number`?`${n}px`:n),r&&(i.minWidth=typeof r==`number`?`${r}px`:r),i},Zi=e=>Ui.includes(e),Qi=e=>Wi.includes(e),$i=e=>Gi.includes(e),ea=e=>Ki.includes(e),ta=(e,t,n=`bottom`)=>{if(!e||!t)return n;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a={width:window.innerWidth,height:window.innerHeight},o=r.top,s=a.height-r.bottom,c=r.left,l=a.width-r.right,u=i.width||320,d=i.height||200;switch(n){case`top`:if(o>=d)return`top`;break;case`bottom`:if(s>=d)return`bottom`;break;case`left`:if(c>=u)return`left`;break;case`right`:if(l>=u)return`right`;break}let f={top:o,bottom:s,left:c,right:l};return Object.keys(f).reduce((e,t)=>f[e]>f[t]?e:t)},na=(e,t,n)=>{if(!e||!t)return{x:0,y:0};let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a={x:0,y:0};switch(n){case`top`:a.x=(r.width-i.width)/2,a.y=-(i.height+8);break;case`bottom`:a.x=(r.width-i.width)/2,a.y=r.height+8;break;case`left`:a.x=-(i.width+8),a.y=(r.height-i.height)/2;break;case`right`:a.x=r.width+8,a.y=(r.height-i.height)/2;break}return a},ra=(e={})=>{let{delay:t=300,hideDelay:n=100}=e,r=!1,i=null,a=null,o=new Set,s=()=>{o.forEach(e=>e(r))},c=()=>{clearTimeout(a),!r&&(i=setTimeout(()=>{r=!0,s()},t))},l=()=>{clearTimeout(i),r&&(a=setTimeout(()=>{r=!1,s()},n))};return{show:c,hide:l,toggle:()=>{r?l():c()},setVisible:e=>{clearTimeout(i),clearTimeout(a),e!==r&&(r=e,s())},isVisible:()=>r,subscribe:e=>(o.add(e),()=>o.delete(e)),cleanup:()=>{clearTimeout(i),clearTimeout(a),o.clear()}}},ia=(e,t)=>{let n={};switch(e){case`hover`:n.onMouseEnter=()=>t.show(),n.onMouseLeave=()=>t.hide(),n.onFocus=()=>t.show(),n.onBlur=()=>t.hide();break;case`click`:n.onClick=()=>t.toggle();break;case`focus`:n.onFocus=()=>t.show(),n.onBlur=()=>t.hide();break;case`manual`:break}return n},aa=(e,t)=>{let n=n=>{e&&!e.contains(n.target)&&t()};return document.addEventListener(`mousedown`,n),()=>{document.removeEventListener(`mousedown`,n)}},oa=e=>{let t=t=>{t.key===`Escape`&&e()};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},sa=(e,t)=>{if(!e)return{};let n=e.getBoundingClientRect(),r={width:window.innerWidth,height:window.innerHeight},i={};return n.right>r.width?i.left=`${r.width-n.width-8}px`:n.left<0&&(i.left=`8px`),n.bottom>r.height?i.top=`${r.height-n.height-8}px`:n.top<0&&(i.top=`8px`),i},ca=e=>typeof e==`string`?{body:e}:typeof e==`object`&&e?{title:``,subtitle:``,body:``,avatar:null,stats:[],actions:[],...e}:{body:String(e||``)},la=(e=`hover-card`)=>`${e}-${Math.random().toString(36).substr(2,9)}`,ua=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e.apply(null,r),t)}},da=(e,t)=>{let n=0;return(...r)=>{let i=Date.now();i-n>=t&&(n=i,e.apply(null,r))}},fa=(e={})=>({...Hi,...e}),pa=e=>{let t=fa(e);return{config:t,validation:{position:Zi(t.position),size:Qi(t.size),variant:$i(t.variant),trigger:ea(t.trigger)},classes:{container:qi(t),trigger:Ji(t),content:Yi(t)},styles:{content:Xi(t)}}},ma=r({ASPECT_RATIOS:()=>va,DEFAULT_CONFIG:()=>ha,VALID_LAYOUTS:()=>ga,VALID_SIZES:()=>_a,calculatePagination:()=>xa,createGalleryConfig:()=>Va,createLazyLoadObserver:()=>La,createLightboxManager:()=>ka,createMasonryLayout:()=>Fa,debugGalleryConfig:()=>Ha,downloadImage:()=>Ta,filterImages:()=>ja,formatFileSize:()=>Ra,formatImageData:()=>Ca,generateImageId:()=>wa,getGalleryClasses:()=>ya,getGridStyle:()=>ba,getImageDimensions:()=>Oa,getImageStats:()=>Pa,groupImagesByTag:()=>Ma,handleLightboxKeyboard:()=>Aa,isImageInViewport:()=>Ia,isValidLayout:()=>za,isValidSize:()=>Ba,preloadImage:()=>Ea,preloadImages:()=>Da,sortImages:()=>Na,validateImage:()=>Sa}),ha={layout:`grid`,size:`md`,columns:3,gap:16,showInfo:!0,showCount:!0,showDownload:!1,showPagination:!1,itemsPerPage:12,lazyLoad:!0,loading:!1},ga=[`grid`,`masonry`,`carousel`],_a=[`sm`,`md`,`lg`,`xl`],va={sm:`75%`,md:`66.67%`,lg:`56.25%`,xl:`50%`},ya=e=>{let{layout:t=`grid`,size:n=`md`,loading:r=!1,className:i=``}=e,a=[`image-gallery`,`gallery-layout-${t}`,`gallery-size-${n}`];return r&&a.push(`gallery-loading`),i&&a.push(i),a},ba=e=>{let{columns:t=3,gap:n=16}=e;return{gridTemplateColumns:`repeat(${t}, 1fr)`,gap:`${n}px`}},xa=(e,t,n)=>{let r=e.length,i=Math.ceil(r/n),a=(t-1)*n,o=Math.min(a+n,r);return{totalItems:r,totalPages:i,currentPage:t,startIndex:a,endIndex:o,paginatedItems:e.slice(a,o),hasNextPage:t<i,hasPrevPage:t>1}},Sa=e=>!e||typeof e!=`object`?!1:!!e.src,Ca=e=>({id:null,src:``,thumbnail:null,alt:``,title:``,description:``,...e}),wa=(e=`img`,t=0)=>`${e}-${t}-${Date.now()}`,Ta=(e,t)=>{if(!e||!e.src){console.warn(`Invalid image for download`);return}let n=document.createElement(`a`);n.href=e.src,n.download=t||e.title||`image`,n.target=`_blank`,document.body.appendChild(n),n.click(),document.body.removeChild(n)},Ea=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e}),Da=e=>{let t=e.map(e=>Ea(e.thumbnail||e.src).catch(()=>null));return Promise.allSettled(t)},Oa=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>{t({width:r.naturalWidth,height:r.naturalHeight,aspectRatio:r.naturalWidth/r.naturalHeight})},r.onerror=n,r.src=e}),ka=()=>{let e=!1,t=0,n=[];return{open:(r,i)=>{e||(e=!0,t=r,n=i,document.body.style.overflow=`hidden`)},close:()=>{e&&(e=!1,t=0,n=[],document.body.style.overflow=``)},next:()=>{!e||t>=n.length-1||t++},prev:()=>{!e||t<=0||t--},goTo:r=>{!e||r<0||r>=n.length||(t=r)},getCurrentImage:()=>e?n[t]:null,get isOpen(){return e},get currentIndex(){return t},get images(){return n}}},Aa=(e,t)=>{if(t.isOpen)switch(e.key){case`ArrowLeft`:e.preventDefault(),t.prev();break;case`ArrowRight`:e.preventDefault(),t.next();break;case`Escape`:e.preventDefault(),t.close();break;case`Home`:e.preventDefault(),t.goTo(0);break;case`End`:e.preventDefault(),t.goTo(t.images.length-1);break}},ja=(e,t)=>{if(!t||!t.trim())return e;let n=t.toLowerCase().trim();return e.filter(e=>{let t=(e.title||``).toLowerCase(),r=(e.description||``).toLowerCase(),i=(e.alt||``).toLowerCase();return t.includes(n)||r.includes(n)||i.includes(n)})},Ma=e=>{let t={};return e.forEach(e=>{(e.tags||[`其他`]).forEach(n=>{t[n]||(t[n]=[]),t[n].push(e)})}),t},Na=(e,t=`date`,n=`desc`)=>[...e].sort((e,r)=>{let i,a;switch(t){case`title`:i=(e.title||``).toLowerCase(),a=(r.title||``).toLowerCase();break;case`date`:i=new Date(e.date||0),a=new Date(r.date||0);break;case`size`:i=e.fileSize||0,a=r.fileSize||0;break;default:return 0}return i<a?n===`asc`?-1:1:i>a?n===`asc`?1:-1:0}),Pa=e=>{let t=e.length,n=e.filter(e=>e.title).length,r=e.filter(e=>e.description).length,i=e.reduce((e,t)=>e+(t.fileSize||0),0);return{total:t,withTitles:n,withDescriptions:r,totalSize:i,averageSize:t>0?i/t:0}},Fa=(e,t=3)=>{let n=Array(t).fill(0),r=Array(t).fill().map(()=>[]);return e.forEach((e,t)=>{let i=n.indexOf(Math.min(...n));r[i].push({...e,index:t});let a=e.aspectRatio||1;n[i]+=1/a}),r},Ia=(e,t=0)=>{if(!e)return!1;let n=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth;return n.bottom>=-t&&n.right>=-t&&n.top<=r+t&&n.left<=i+t},La=(e,t={})=>new IntersectionObserver(e,{root:null,rootMargin:`50px`,threshold:.01,...t}),Ra=e=>{if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/t**+r).toFixed(2))+` `+n[r]},za=e=>ga.includes(e),Ba=e=>_a.includes(e),Va=(e={})=>({...ha,...e}),Ha=e=>{let t=Va(e);return{config:t,stats:Pa(t.images||[]),validation:{layout:za(t.layout),size:Ba(t.size),imagesValid:(t.images||[]).every(Sa)},pagination:t.showPagination?xa(t.images||[],1,t.itemsPerPage):null}},Ua=r({DEFAULT_CONFIG:()=>Wa,VALID_COLORS:()=>Ja,VALID_INPUT_TYPES:()=>Ga,VALID_SIZES:()=>Ka,VALID_VARIANTS:()=>qa,checkPasswordStrength:()=>fo,createFocusManager:()=>po,createInputConfig:()=>go,debounce:()=>mo,debugInputConfig:()=>_o,formatInputValue:()=>io,formatPhoneNumber:()=>uo,generateInputId:()=>ro,getAutocompleteSuggestions:()=>lo,getContainerClasses:()=>Za,getHelperTextClasses:()=>Qa,getInputClasses:()=>Ya,getLabelClasses:()=>Xa,isValidColor:()=>no,isValidEmail:()=>oo,isValidInputType:()=>$a,isValidPhone:()=>co,isValidSize:()=>eo,isValidUrl:()=>so,isValidVariant:()=>to,throttle:()=>ho,validateInput:()=>ao}),Wa={type:`text`,size:`md`,variant:`filled`,color:`primary`,autoComplete:`off`,multiline:!1,rows:4,fullWidth:!1,disabled:!1,readonly:!1,required:!1,error:!1},Ga=[`text`,`password`,`email`,`number`,`tel`,`url`,`search`,`date`,`time`,`datetime-local`,`month`,`week`,`color`,`range`,`file`,`hidden`],Ka=[`sm`,`md`,`lg`],qa=[`outlined`,`filled`,`standard`],Ja=[`primary`,`secondary`,`success`,`warning`,`error`],Ya=e=>{let{size:t=`md`,variant:n=`filled`,error:r=!1,disabled:i=!1,readonly:a=!1,focused:o=!1,hasValue:s=!1,fullWidth:c=!1,startAdornment:l=null,endAdornment:u=null,className:d=``}=e,f=[`wc-input`];return f.push(`wc-input--${t}`),f.push(`wc-input--${n}`),r&&f.push(`wc-input--error`),i&&f.push(`wc-input--disabled`),a&&f.push(`wc-input--readonly`),o&&f.push(`wc-input--focused`),s&&f.push(`wc-input--has-value`),c&&f.push(`wc-input--full-width`),l&&f.push(`wc-input--has-start-adornment`),u&&f.push(`wc-input--has-end-adornment`),d&&f.push(d),f},Xa=e=>{let{focused:t=!1,hasValue:n=!1,error:r=!1,required:i=!1}=e,a=[`wc-input-label`];return(t||n)&&a.push(`wc-input-label--active`),r&&a.push(`wc-input-label--error`),a},Za=e=>{let{fullWidth:t=!1,floating:n=!1}=e,r=[`wc-input-container`];return t&&r.push(`wc-input-container--full-width`),n&&r.push(`wc-input-container--floating`),r},Qa=e=>{let{error:t=!1}=e,n=[`wc-input-helper-text`];return t&&n.push(`wc-input-helper-text--error`),n},$a=e=>Ga.includes(e),eo=e=>Ka.includes(e),to=e=>qa.includes(e),no=e=>Ja.includes(e),ro=(e=`input`)=>`${e}-${Math.random().toString(36).substr(2,9)}`,io=(e,t)=>{if(e==null)return``;switch(t){case`number`:return isNaN(e)?``:String(e);case`email`:return String(e).toLowerCase().trim();case`tel`:return String(e).replace(/\D/g,``);default:return String(e)}},ao=(e,t={})=>{let n=[],{required:r=!1,minLength:i=0,maxLength:a=1/0,pattern:o=null,min:s=null,max:c=null,type:l=`text`}=t;if(r&&(!e||String(e).trim()===``)&&n.push(`此字段为必填项`),e&&String(e).trim()!==``){let t=String(e);if(t.length<i&&n.push(`最少需要${i}个字符`),t.length>a&&n.push(`最多允许${a}个字符`),l===`number`){let t=parseFloat(e);isNaN(t)?n.push(`请输入有效数字`):(s!==null&&t<s&&n.push(`值不能小于${s}`),c!==null&&t>c&&n.push(`值不能大于${c}`))}switch(o&&((o instanceof RegExp?o:new RegExp(o)).test(t)||n.push(`输入格式不正确`)),l){case`email`:oo(t)||n.push(`请输入有效的邮箱地址`);break;case`url`:so(t)||n.push(`请输入有效的URL`);break;case`tel`:co(t)||n.push(`请输入有效的电话号码`);break}}return{valid:n.length===0,errors:n}},oo=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),so=e=>{try{return new URL(e),!0}catch{return!1}},co=e=>/^[\d\s\-\+\(\)]+$/.test(e)&&e.replace(/\D/g,``).length>=10,lo=(e,t)=>{if(!e||!t||!Array.isArray(t))return[];let n=e.toLowerCase().trim();return t.filter(e=>{let t=typeof e==`string`?e:e.label||e.value;return t&&t.toLowerCase().includes(n)}).slice(0,10)},uo=(e,t=`default`)=>{let n=e.replace(/\D/g,``);switch(t){case`us`:if(n.length===10)return`(${n.slice(0,3)}) ${n.slice(3,6)}-${n.slice(6)}`;break;case`china`:if(n.length===11)return`${n.slice(0,3)} ${n.slice(3,7)} ${n.slice(7)}`;break;default:return e}return e},fo=e=>{if(!e)return{score:0,level:`weak`,suggestions:[]};let t=0,n=[];e.length>=8?t+=1:n.push(`至少8个字符`),/[a-z]/.test(e)?t+=1:n.push(`包含小写字母`),/[A-Z]/.test(e)?t+=1:n.push(`包含大写字母`),/\d/.test(e)?t+=1:n.push(`包含数字`),/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(e)?t+=1:n.push(`包含特殊字符`);let r=`weak`;return t>=4?r=`strong`:t>=3&&(r=`medium`),{score:t,level:r,suggestions:n}},po=e=>({focus:()=>{e&&typeof e.focus==`function`&&e.focus()},blur:()=>{e&&typeof e.blur==`function`&&e.blur()},select:()=>{e&&typeof e.select==`function`&&e.select()},setCursorPosition:t=>{e&&typeof e.setSelectionRange==`function`&&e.setSelectionRange(t,t)}}),mo=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e.apply(null,r),t)}},ho=(e,t)=>{let n=0;return(...r)=>{let i=Date.now();i-n>=t&&(n=i,e.apply(null,r))}},go=(e={})=>({...Wa,...e}),_o=e=>{let t=go(e);return{config:t,validation:{type:$a(t.type),size:eo(t.size),variant:to(t.variant),color:no(t.color)},classes:{input:Ya(t),label:Xa(t),container:Za(t),helperText:Qa(t)}}},vo=r({DEFAULT_CONFIG:()=>yo,calculateVirtualization:()=>Mo,createDragHandler:()=>Po,createListConfig:()=>Io,debounce:()=>Fo,debugListConfig:()=>Ro,filterListItems:()=>Do,formatListItem:()=>To,generateListItemId:()=>Eo,getListClasses:()=>bo,getListItemClasses:()=>xo,getListItemIconClasses:()=>So,getListItemTextClasses:()=>Co,getListStats:()=>Lo,groupListItems:()=>ko,handleListKeyboard:()=>No,handleListSelection:()=>jo,highlightSearchText:()=>Ao,sortListItems:()=>Oo,validateListItem:()=>wo}),yo={dense:!1,disablePadding:!1,button:!1,disabled:!1,divider:!1,selected:!1,disableGutters:!1},bo=e=>{let{dense:t=!1,disablePadding:n=!1,variant:r,className:i=``}=e,a=[`list`];return t&&a.push(`list--dense`),n&&a.push(`list--no-padding`),r&&a.push(`list--${r}`),i&&a.push(i),a},xo=e=>{let{button:t=!1,disabled:n=!1,divider:r=!1,dense:i=!1,selected:a=!1,disableGutters:o=!1,draggable:s=!1,multiselect:c=!1,className:l=``}=e,u=[`list-item`];return t&&u.push(`list-item--button`),n&&u.push(`list-item--disabled`),r&&u.push(`list-item--divider`),i&&u.push(`list-item--dense`),a&&u.push(`list-item--selected`),o&&u.push(`list-item--no-gutters`),s&&u.push(`list-item--draggable`),c&&u.push(`list-item--multiselect`),l&&u.push(l),u},So=e=>{let{position:t=`start`,className:n=``}=e,r=[`list-item-icon`];return t&&r.push(`list-item-icon--${t}`),n&&r.push(n),r},Co=e=>{let{inset:t=!1,className:n=``}=e,r=[`list-item-text`];return t&&r.push(`list-item-text--inset`),n&&r.push(n),r},wo=e=>!e||typeof e!=`object`?!1:!!(e.id||e.key),To=(e,t=0)=>({title:``,subtitle:``,avatar:null,icon:null,action:null,disabled:!1,divider:!1,selected:!1,...e,id:e.id||e.key||`list-item-${t}`}),Eo=(e=`list-item`,t=0)=>`${e}-${t}-${Date.now()}`,Do=(e,t,n=[`title`,`subtitle`])=>{if(!t||!t.trim())return e;let r=t.toLowerCase().trim();return e.filter(e=>n.some(t=>{let n=e[t];return n&&String(n).toLowerCase().includes(r)}))},Oo=(e,t=`title`,n=`asc`)=>[...e].sort((e,r)=>{let i=e[t],a=r[t];return i<a?n===`asc`?-1:1:i>a?n===`asc`?1:-1:0}),ko=(e,t)=>{let n={};return e.forEach(e=>{let r=e[t]||`其他`;n[r]||(n[r]=[]),n[r].push(e)}),n},Ao=(e,t)=>{if(!t||!t.trim())return e;let n=RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)})`,`gi`);return e.replace(n,`<span class="list-item-text-highlight">$1</span>`)},jo=(e,t,n=!1)=>{if(!n)return[t];let r=t.id||t.key;return e.some(e=>(e.id||e.key)===r)?e.filter(e=>(e.id||e.key)!==r):[...e,t]},Mo=e=>{let{itemCount:t,itemHeight:n,containerHeight:r,scrollTop:i=0,overscan:a=5}=e,o=Math.ceil(r/n),s=Math.max(0,Math.floor(i/n)-a);return{startIndex:s,endIndex:Math.min(t-1,s+o+a*2),visibleCount:o,totalHeight:t*n,offsetY:s*n}},No=(e,t)=>{let{currentIndex:n=0,itemCount:r=0,onSelect:i,onMove:a,circular:o=!1}=t,s=n;switch(e.key){case`ArrowDown`:e.preventDefault(),s=n+1,s>=r&&(s=o?0:r-1),a?.(s);break;case`ArrowUp`:e.preventDefault(),s=n-1,s<0&&(s=o?r-1:0),a?.(s);break;case`Home`:e.preventDefault(),a?.(0);break;case`End`:e.preventDefault(),a?.(r-1);break;case`Enter`:case` `:e.preventDefault(),i?.(n);break}},Po=e=>{let t=null,n=-1;return{handleDragStart:(e,r,i)=>{t=r,n=i,e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,``)},handleDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`},handleDrop:(r,i)=>{r.preventDefault(),n!==-1&&n!==i&&e?.(n,i),t=null,n=-1},handleDragEnd:()=>{t=null,n=-1},getDraggedItem:()=>t,getDraggedIndex:()=>n}},Fo=(e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e.apply(null,r),t)}},Io=(e={})=>({...yo,...e}),Lo=e=>{let t=e.length,n=e.filter(e=>e.selected).length;return{total:t,selected:n,disabled:e.filter(e=>e.disabled).length,withIcons:e.filter(e=>e.icon).length,withAvatars:e.filter(e=>e.avatar).length,selectionRate:t>0?n/t:0}},Ro=e=>{let t=Io(e),n=t.items||[];return{config:t,stats:Lo(n),classes:{list:bo(t),listItem:xo(t),listItemIcon:So(t),listItemText:Co(t)},validation:{allItemsValid:n.every(wo)}}},zo=r({createOutsideClickListener:()=>ns,getArrowClasses:()=>Qo,getMenuButtonClasses:()=>Xo,getMenuClasses:()=>Jo,getMenuItemClasses:()=>Zo,getMenuMenuClasses:()=>Yo,getMenuPositionStyles:()=>rs,handleClickOutside:()=>$o,handleItemClick:()=>ts,handleKeyNavigation:()=>as,handleMenuToggle:()=>es,isValidPlacement:()=>Wo,isValidSize:()=>Go,isValidTrigger:()=>Ko,isValidVariant:()=>qo,processMenuItems:()=>is,validPlacements:()=>Bo,validSizes:()=>Vo,validTriggers:()=>Ho,validVariants:()=>Uo}),Bo=[`bottom-start`,`bottom-end`,`top-start`,`top-end`,`left`,`right`],Vo=[`sm`,`md`,`lg`],Ho=[`click`,`hover`],Uo=[`default`,`text`,`outlined`,`card`];function Wo(e){return Bo.includes(e)}function Go(e){return Vo.includes(e)}function Ko(e){return Ho.includes(e)}function qo(e){return Uo.includes(e)}var Jo=({size:e,variant:t,disabled:n,className:r})=>{let i=[`wc-menu`,`wc-menu--${e}`,`wc-menu--${t}`];return n&&i.push(`wc-menu--disabled`),r&&i.push(r),i},Yo=(e,t)=>[`wc-menu__menu`,`wc-menu__menu--${e}`,t],Xo=({disabled:e})=>[`wc-menu__button`,e?`wc-menu__button--disabled`:``],Zo=e=>{let t=[`wc-menu__item`];return e.divider&&t.push(`wc-menu__divider`),e.disabled&&t.push(`wc-menu__item--disabled`),e.selected&&t.push(`wc-menu__item--selected`),e.danger&&t.push(`wc-menu__item--danger`),t},Qo=e=>[`wc-menu__arrow`,e?`wc-menu__arrow--open`:``];function $o(e,t,n){t&&!t.contains(e.target)&&n&&n()}var es=(e,t,n,r,i)=>{t||(n(!e),e?i&&i():r&&r())},ts=(e,t,n,r,i)=>{e.disabled||e.divider||(n&&n(e,t),r(!1),i&&i())},ns=e=>{let t=t=>{e(t)};return{add:()=>document.addEventListener(`click`,t),remove:()=>document.removeEventListener(`click`,t)}};function rs(e){let t={position:`absolute`,zIndex:1e3};switch(e){case`bottom-start`:t.top=`100%`,t.left=0,t.marginTop=`4px`;break;case`bottom-end`:t.top=`100%`,t.right=0,t.marginTop=`4px`;break;case`top-start`:t.bottom=`100%`,t.left=0,t.marginBottom=`4px`;break;case`top-end`:t.bottom=`100%`,t.right=0,t.marginBottom=`4px`;break;case`left`:t.top=0,t.right=`100%`,t.marginRight=`4px`;break;case`right`:t.top=0,t.left=`100%`,t.marginLeft=`4px`;break;default:t.top=`100%`,t.left=0,t.marginTop=`4px`}return t}function is(e){return e.map((e,t)=>({...e,key:e.key||t,id:e.id||`menu-item-${t}`}))}function as(e,t,n,r,i,a){let{key:o}=e;switch(o){case`ArrowDown`:e.preventDefault(),r(n<t.length-1?n+1:0);break;case`ArrowUp`:e.preventDefault(),r(n>0?n-1:t.length-1);break;case`Enter`:case` `:if(e.preventDefault(),n>=0){let e=t[n];ts(e,n,i,()=>{},a)}break;case`Escape`:e.preventDefault(),a&&a();break}}var os=r({createFocusTrap:()=>_s,focusDialog:()=>gs,generateId:()=>ys,getMaxWidth:()=>ds,getModalClasses:()=>ls,getModalStyles:()=>fs,getOverlayClasses:()=>us,handleKeyDown:()=>hs,handleModalClose:()=>ps,handleOverlayClick:()=>ms,isClickOutside:()=>bs,isValidSize:()=>cs,manageBodyScroll:()=>vs,validSizes:()=>ss}),ss=[`xs`,`sm`,`md`,`lg`,`xl`];function cs(e){return ss.includes(e)}function ls({size:e=`md`,fullWidth:t=!1,fullScreen:n=!1,scroll:r=`paper`,position:i=`center`,className:a=``}={}){let o=[`wc-modal`];return e&&!n&&o.push(`wc-modal--${e}`),n&&o.push(`wc-modal--fullscreen`),t&&!n&&o.push(`wc-modal--full-width`),r===`body`?o.push(`wc-modal--scroll-body`):o.push(`wc-modal--scroll-paper`),i&&i!==`center`&&o.push(`wc-modal--${i}`),a&&o.push(a),o.filter(Boolean).join(` `)}function us({centered:e=!0,position:t=`center`}={}){let n=[`wc-modal-overlay`];return(e||t===`center`)&&n.push(`wc-modal-overlay--centered`),t&&t!==`center`&&n.push(`wc-modal-overlay--${t}`),n.join(` `)}function ds(e){let t={xs:`320px`,sm:`448px`,md:`512px`,lg:`672px`,xl:`896px`};return t[e]||t.md}function fs({size:e=`md`,fullWidth:t=!1,fullScreen:n=!1,scroll:r=`paper`}={}){let i={};if(!n){let n=ds(e);n&&(i.maxWidth=n,t||(i.margin=`0 auto`)),i.marginTop=`32px`,i.marginBottom=`32px`}return i.maxHeight=r===`body`?`100vh`:`90vh`,i}function ps(e,t,n=0){e(!1),t&&(n>0?setTimeout(()=>{t()},n):t())}function ms(e,t){e&&t()}function hs(e,t,n){e.key===`Escape`&&t&&n()}function gs(e){if(e){let t=e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`);t.length>0?t[0].focus():e.focus()}}function _s(e){if(!e)return()=>{};let t=e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`),n=t[0],r=t[t.length-1],i=e=>{e.key===`Tab`&&(e.shiftKey?document.activeElement===n&&(e.preventDefault(),r?.focus()):document.activeElement===r&&(e.preventDefault(),n?.focus()))};return e.addEventListener(`keydown`,i),()=>{e.removeEventListener(`keydown`,i)}}function vs(e){e?document.body.style.overflow=`hidden`:document.body.style.overflow=``}function ys(e=`modal`){return`${e}-${Math.random().toString(36).substr(2,9)}`}function bs(e,t){return t&&!t.contains(e.target)}var xs=r({NumberAnimationController:()=>ws,easingFunctions:()=>Ss,numberFormatUtils:()=>Cs,presets:()=>Ts,utils:()=>Es}),Ss={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:-1+(4-2*e)*e,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1- --e*e*e*e,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2},Cs={formatNumber(e,t={}){let{precision:n=0,showSeparator:r=!1,locale:i=``,prefix:a=``,suffix:o=``,currency:s=``,percentage:c=!1,scientific:l=!1,compact:u=!1}=t,d=Number(e);if(isNaN(d))return`0`;if(c)return d*=100,`${d.toFixed(n)}%`;if(l)return d.toExponential(n);if(u)return this.formatCompactNumber(d,n);if(s)return new Intl.NumberFormat(i||`zh-CN`,{style:`currency`,currency:s,minimumFractionDigits:n,maximumFractionDigits:n}).format(d);let f=d.toFixed(n);return r?`${a}${Number(f).toLocaleString(i||void 0,{minimumFractionDigits:n,maximumFractionDigits:n})}${o}`:`${a}${f}${o}`},formatCompactNumber(e,t=1){for(let n of[{value:0xe8d4a51000,symbol:`T`},{value:1e9,symbol:`B`},{value:1e6,symbol:`M`},{value:1e3,symbol:`K`}])if(Math.abs(e)>=n.value)return(e/n.value).toFixed(t)+n.symbol;return e.toFixed(t)},clampValue(e,t=-1/0,n=1/0){return Math.max(t,Math.min(n,e))}},ws=class{constructor(e={}){this.options={duration:3e3,easing:`easeOutQuart`,onUpdate:null,onComplete:null,...e},this.startTime=null,this.rafId=null,this.isRunning=!1,this.isPaused=!1,this.pausedTime=0}start(e,t){this.from=e,this.to=t,this.startTime=null,this.pausedTime=0,this.isRunning=!0,this.isPaused=!1,this.rafId=requestAnimationFrame(this.step.bind(this))}step(e){if(!this.isRunning)return;this.startTime===null&&(this.startTime=e-this.pausedTime);let t=e-this.startTime,n=Math.min(t/this.options.duration,1),r=(Ss[this.options.easing]||Ss.easeOutQuart)(n),i=this.from+(this.to-this.from)*r;this.options.onUpdate&&this.options.onUpdate(i,n),n<1?this.rafId=requestAnimationFrame(this.step.bind(this)):this.complete()}pause(){this.isRunning&&!this.isPaused&&(this.isPaused=!0,this.pausedTime=performance.now()-this.startTime,this.cancel())}resume(){this.isPaused&&(this.isPaused=!1,this.rafId=requestAnimationFrame(this.step.bind(this)))}stop(){this.isRunning=!1,this.isPaused=!1,this.cancel()}complete(){this.isRunning=!1,this.isPaused=!1,this.options.onUpdate&&this.options.onUpdate(this.to,1),this.options.onComplete&&this.options.onComplete()}cancel(){this.rafId&&=(cancelAnimationFrame(this.rafId),null)}destroy(){this.stop(),this.options.onUpdate=null,this.options.onComplete=null}},Ts={fast:{duration:1e3,easing:`easeOutQuad`},normal:{duration:2e3,easing:`easeOutQuart`},slow:{duration:4e3,easing:`easeOutCubic`},bouncy:{duration:2500,easing:`easeOutSine`},counter:{duration:3e3,easing:`easeOutExpo`}},Es={createAnimation(e={}){return new ws(e)},getPreset(e){return Ts[e]||Ts.normal},isAnimationSupported(){return typeof requestAnimationFrame<`u`},shouldReduceMotion(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches},debug(e,t){process.env.NODE_ENV===`development`&&console.log(`[NumberAnimation] ${e}`,t)}},Ds=r({PaginationController:()=>Rs,calculateDataRange:()=>Ps,calculateTotalPages:()=>Ms,colors:()=>As,default:()=>Bs,formatPaginationInfo:()=>Ls,generatePageItems:()=>Fs,getPaginationClasses:()=>Is,shapes:()=>js,sizes:()=>Os,utils:()=>zs,validateCurrentPage:()=>Ns,variants:()=>ks}),Os={SM:`sm`,MD:`md`,LG:`lg`,XL:`xl`},ks={DEFAULT:`default`,MINIMAL:`minimal`,OUTLINED:`outlined`,COMPACT:`compact`},As={PRIMARY:`primary`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`},js={DEFAULT:`default`,ROUNDED:`rounded`,SQUARE:`square`};function Ms(e,t){return e<=0||t<=0?1:Math.ceil(e/t)}function Ns(e,t){let n=Number(e);return isNaN(n)?1:Math.max(1,Math.min(t,Math.floor(n)))}function Ps(e,t,n){let r=Ns(e,Ms(n,t));return{start:(r-1)*t+1,end:Math.min(r*t,n),total:n,currentPage:r,pageSize:t,totalPages:Ms(n,t)}}function Fs(e={}){let{currentPage:t=1,totalPages:n=1,siblingCount:r=1,boundaryCount:i=1,showFirstLast:a=!0,showPrevNext:o=!0}=e,s=Ns(t,n),c=[];if(a&&s>1&&c.push({type:`first`,page:1,label:`First`,disabled:!1}),o&&c.push({type:`prev`,page:Math.max(1,s-1),label:`Previous`,disabled:s===1}),n<=r*2+3+i*2)for(let e=1;e<=n;e++)c.push({type:`page`,page:e,label:e.toString(),active:e===s,disabled:!1});else{let e=Math.max(s-r,i+2),t=Math.min(s+r,n-i-1),a=e>i+2,o=t<n-i-1;for(let e=1;e<=i;e++)c.push({type:`page`,page:e,label:e.toString(),active:e===s,disabled:!1});a&&c.push({type:`ellipsis`,page:null,label:`...`,disabled:!0});for(let n=e;n<=t;n++)c.push({type:`page`,page:n,label:n.toString(),active:n===s,disabled:!1});o&&c.push({type:`ellipsis`,page:null,label:`...`,disabled:!0});for(let e=n-i+1;e<=n;e++)c.push({type:`page`,page:e,label:e.toString(),active:e===s,disabled:!1})}return o&&c.push({type:`next`,page:Math.min(n,s+1),label:`Next`,disabled:s===n}),a&&s<n&&c.push({type:`last`,page:n,label:`Last`,disabled:!1}),c}function Is(e={}){let{size:t=Os.MD,variant:n=ks.DEFAULT,color:r=As.PRIMARY,shape:i=js.DEFAULT,className:a=``}=e,o=[`wc-pagination`];return t&&Os[t.toUpperCase()]&&o.push(`wc-pagination--${t}`),n&&n!==ks.DEFAULT&&o.push(`wc-pagination--${n}`),r&&r!==As.PRIMARY&&o.push(`wc-pagination--${r}`),i&&i!==js.DEFAULT&&o.push(`wc-pagination--${i}`),a&&o.push(a),o.join(` `)}function Ls(e,t={}){let{template:n=`Showing {start} to {end} of {total} entries`,locale:r=`en-US`}=t,{start:i,end:a,total:o}=e,s=e=>new Intl.NumberFormat(r).format(e);return n.replace(`{start}`,s(i)).replace(`{end}`,s(a)).replace(`{total}`,s(o))}var Rs=class{constructor(e={}){this.options={total:0,pageSize:10,currentPage:1,siblingCount:1,boundaryCount:1,showFirstLast:!0,showPrevNext:!0,showInfo:!0,showSizeChanger:!1,pageSizeOptions:[10,20,50,100],onChange:null,onPageSizeChange:null,...e},this.state={currentPage:this.options.currentPage,pageSize:this.options.pageSize,total:this.options.total}}getState(){return{...this.state,totalPages:this.getTotalPages(),range:this.getDataRange(),items:this.getPageItems()}}setTotal(e){this.state.total=Math.max(0,Number(e)||0);let t=this.getTotalPages();this.state.currentPage>t&&this.setCurrentPage(t)}setPageSize(e){let t=Math.max(1,Number(e)||10),n=this.state.pageSize;this.state.pageSize=t;let r=(this.state.currentPage-1)*n+1,i=Math.ceil(r/t);this.setCurrentPage(i),this.options.onPageSizeChange?.(t,this.getState())}setCurrentPage(e){let t=Ns(e,this.getTotalPages());t!==this.state.currentPage&&(this.state.currentPage=t,this.options.onChange?.(t,this.getState()))}goToFirst(){this.setCurrentPage(1)}goToLast(){this.setCurrentPage(this.getTotalPages())}goToPrev(){this.setCurrentPage(this.state.currentPage-1)}goToNext(){this.setCurrentPage(this.state.currentPage+1)}getTotalPages(){return Ms(this.state.total,this.state.pageSize)}getDataRange(){return Ps(this.state.currentPage,this.state.pageSize,this.state.total)}getPageItems(){return Fs({currentPage:this.state.currentPage,totalPages:this.getTotalPages(),siblingCount:this.options.siblingCount,boundaryCount:this.options.boundaryCount,showFirstLast:this.options.showFirstLast,showPrevNext:this.options.showPrevNext})}handlePageClick(e){if(!(e.disabled||e.page===null))switch(e.type){case`first`:this.goToFirst();break;case`last`:this.goToLast();break;case`prev`:this.goToPrev();break;case`next`:this.goToNext();break;case`page`:this.setCurrentPage(e.page);break}}reset(){this.setCurrentPage(1)}updateOptions(e){Object.assign(this.options,e)}},zs={createController(e={}){return new Rs(e)},generatePageSizeOptions(e=[10,20,50,100]){return e.map(e=>({value:e,label:`${e} / page`}))},calculateOffset(e,t){return(e-1)*t},calculatePageFromOffset(e,t){return Math.floor(e/t)+1},isMobile(){return window.innerWidth<=768},getMobileConfig(e={}){return{...e,siblingCount:Math.min(e.siblingCount||1,0),boundaryCount:Math.min(e.boundaryCount||1,1),showFirstLast:!1}},debug(e,t){process.env.NODE_ENV===`development`&&console.log(`[Pagination] ${e}`,t)}},Bs={PaginationController:Rs,calculateTotalPages:Ms,validateCurrentPage:Ns,calculateDataRange:Ps,generatePageItems:Fs,getPaginationClasses:Is,formatPaginationInfo:Ls,utils:zs,sizes:Os,variants:ks,colors:As,shapes:js},Vs=r({accessibilityUtils:()=>Zs,animationUtils:()=>Qs,colors:()=>Ks,default:()=>ec,devUtils:()=>$s,elevationMap:()=>Hs,getElevationClass:()=>Ys,getPaperClasses:()=>qs,getRecommendedElevation:()=>Xs,shapes:()=>Ws,sizes:()=>Gs,validateElevation:()=>Js,variants:()=>Us}),Hs={0:`none`,1:`xs`,2:`sm`,3:`md`,4:`lg`,5:`xl`,6:`2xl`},Us={ELEVATION:`elevation`,OUTLINED:`outlined`},Ws={SQUARE:`square`,ROUNDED_SM:`rounded-sm`,ROUNDED_LG:`rounded-lg`,ROUNDED_XL:`rounded-xl`,ROUNDED_2XL:`rounded-2xl`,ROUNDED_FULL:`rounded-full`},Gs={SM:`sm`,MD:`md`,LG:`lg`,XL:`xl`},Ks={DEFAULT:`default`,PRIMARY:`primary`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,INFO:`info`};function qs(e={}){let{variant:t=Us.ELEVATION,elevation:n=1,square:r=!1,shape:i=null,size:a=null,color:o=Ks.DEFAULT,hoverable:s=!1,clickable:c=!1,gradient:l=!1,frosted:u=!1,textured:d=!1,className:f=``}=e,p=[`wc-paper`];if(t===Us.OUTLINED)p.push(`wc-paper--outlined`);else{p.push(`wc-paper--elevation`);let e=Math.max(0,Math.min(24,Math.floor(Number(n)||0)));p.push(`wc-paper--elevation-${e}`)}return r?p.push(`wc-paper--square`):i&&Ws[i.toUpperCase()]&&p.push(`wc-paper--${i}`),a&&Gs[a.toUpperCase()]&&p.push(`wc-paper--${a}`),o!==Ks.DEFAULT&&Ks[o.toUpperCase()]&&p.push(`wc-paper--${o}`),s&&p.push(`wc-paper--hoverable`),c&&p.push(`wc-paper--clickable`),l&&p.push(`wc-paper--gradient`),u&&p.push(`wc-paper--frosted`),d&&p.push(`wc-paper--textured`),f&&p.push(f),p.join(` `)}function Js(e){let t=Number(e);return isNaN(t)?1:Math.max(0,Math.min(24,Math.floor(t)))}function Ys(e){return`wc-paper--elevation-${Js(e)}`}function Xs(e={}){let{hasHeader:t=!1,hasFooter:n=!1,isInteractive:r=!1,contentLength:i=0,isModal:a=!1,isFloating:o=!1}=e,s=1;return(t||n)&&(s+=1),r&&(s+=1),i>500&&(s+=1),a?s=24:o&&(s=Math.max(s,12)),Js(s)}var Zs={addKeyboardSupport(e,t){if(!e||typeof t!=`function`)return;let n=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t(e))};return e.addEventListener(`keydown`,n),e.setAttribute(`tabindex`,`0`),e.setAttribute(`role`,`button`),()=>{e.removeEventListener(`keydown`,n)}},setAriaLabels(e,t={}){let{label:n,describedBy:r,expanded:i,haspopup:a,selected:o,disabled:s}=t;n&&e.setAttribute(`aria-label`,n),r&&e.setAttribute(`aria-describedby`,r),i!==void 0&&e.setAttribute(`aria-expanded`,i),a&&e.setAttribute(`aria-haspopup`,a),o!==void 0&&e.setAttribute(`aria-selected`,o),s!==void 0&&e.setAttribute(`aria-disabled`,s)}},Qs={shouldReduceMotion(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches},createHoverAnimation(e,t={}){let{scale:n=1.02,duration:r=200}=t,i=()=>{e.style.transform=`scale(${n})`},a=()=>{e.style.transform=`scale(1)`};return e.style.transition=`transform ${r}ms ease`,e.addEventListener(`mouseenter`,i),e.addEventListener(`mouseleave`,a),()=>{e.removeEventListener(`mouseenter`,i),e.removeEventListener(`mouseleave`,a)}}},$s={logConfig(e){process.env.NODE_ENV===`development`&&console.log(`Paper Config:`,e)},validateConfig(e){let t=[],n=[];return(e.elevation<0||e.elevation>24)&&n.push(`Elevation should be between 0 and 24`),e.variant&&!Object.values(Us).includes(e.variant)&&t.push(`Invalid variant: ${e.variant}`),{errors:t,warnings:n,isValid:t.length===0}}},ec={getPaperClasses:qs,validateElevation:Js,getElevationClass:Ys,getRecommendedElevation:Xs,accessibilityUtils:Zs,animationUtils:Qs,devUtils:$s,variants:Us,shapes:Ws,sizes:Gs,colors:Ks,elevationMap:Hs},tc=r({PopoverController:()=>oc,calculatePopoverPosition:()=>rc,default:()=>cc,detectCollisionAndAdjust:()=>ic,getPopoverClasses:()=>ac,placements:()=>R,sizes:()=>nc,triggers:()=>z,utils:()=>sc}),R={TOP:`top`,BOTTOM:`bottom`,LEFT:`left`,RIGHT:`right`,TOP_START:`top-start`,TOP_END:`top-end`,BOTTOM_START:`bottom-start`,BOTTOM_END:`bottom-end`,LEFT_START:`left-start`,LEFT_END:`left-end`,RIGHT_START:`right-start`,RIGHT_END:`right-end`},z={CLICK:`click`,HOVER:`hover`,FOCUS:`focus`,MANUAL:`manual`},nc={SM:`sm`,MD:`md`,LG:`lg`};function rc(e,t,n=R.BOTTOM,r=8){if(!e||!t)return{top:0,left:0};let i=e.getBoundingClientRect(),a=t.getBoundingClientRect();window.innerWidth,window.innerHeight;let o=0,s=0;switch(n){case R.TOP:o=i.top-a.height-r,s=i.left+(i.width-a.width)/2;break;case R.TOP_START:o=i.top-a.height-r,s=i.left;break;case R.TOP_END:o=i.top-a.height-r,s=i.right-a.width;break;case R.BOTTOM:o=i.bottom+r,s=i.left+(i.width-a.width)/2;break;case R.BOTTOM_START:o=i.bottom+r,s=i.left;break;case R.BOTTOM_END:o=i.bottom+r,s=i.right-a.width;break;case R.LEFT:o=i.top+(i.height-a.height)/2,s=i.left-a.width-r;break;case R.LEFT_START:o=i.top,s=i.left-a.width-r;break;case R.LEFT_END:o=i.bottom-a.height,s=i.left-a.width-r;break;case R.RIGHT:o=i.top+(i.height-a.height)/2,s=i.right+r;break;case R.RIGHT_START:o=i.top,s=i.right+r;break;case R.RIGHT_END:o=i.bottom-a.height,s=i.right+r;break}return o+=window.scrollY,s+=window.scrollX,{top:o,left:s}}function ic(e,t,n){if(!t)return{position:e,finalPlacement:n};let r=t.getBoundingClientRect(),i={width:window.innerWidth,height:window.innerHeight},{top:a,left:o}=e,s=n;return o+r.width>i.width&&(n.includes(`right`)?s=n.replace(`right`,`left`):o=i.width-r.width-16),o<0&&(n.includes(`left`)?s=n.replace(`left`,`right`):o=16),a+r.height>i.height+window.scrollY&&(n.includes(`bottom`)?s=n.replace(`bottom`,`top`):a=i.height+window.scrollY-r.height-16),a<window.scrollY&&(n.includes(`top`)?s=n.replace(`top`,`bottom`):a=window.scrollY+16),{position:{top:a,left:o},finalPlacement:s}}function ac(e={}){let{size:t=nc.MD,placement:n=R.BOTTOM,noArrow:r=!1,className:i=``}=e,a=[`wc-popover-container`],o=[`wc-popover-trigger`],s=[`wc-popover-content`];t&&nc[t.toUpperCase()]&&s.push(`wc-popover-content--${t}`);let c=n.split(`-`)[0];return s.push(`wc-popover-content--${c}`),r&&s.push(`wc-popover-content--no-arrow`),i&&a.push(i),{container:a.join(` `),trigger:o.join(` `),content:s.join(` `)}}var oc=class{constructor(e={}){this.options={trigger:z.CLICK,placement:R.BOTTOM,offset:8,delay:0,hideDelay:0,autoClose:!0,closeOnOutsideClick:!0,closeOnEscape:!0,...e},this.isOpen=!1,this.triggerElement=null,this.popoverElement=null,this.timeouts=new Set,this.eventCleanups=[],this.handleTriggerClick=this.handleTriggerClick.bind(this),this.handleTriggerMouseEnter=this.handleTriggerMouseEnter.bind(this),this.handleTriggerMouseLeave=this.handleTriggerMouseLeave.bind(this),this.handleTriggerFocus=this.handleTriggerFocus.bind(this),this.handleTriggerBlur=this.handleTriggerBlur.bind(this),this.handleOutsideClick=this.handleOutsideClick.bind(this),this.handleEscapeKey=this.handleEscapeKey.bind(this),this.handleResize=this.handleResize.bind(this),this.handleScroll=this.handleScroll.bind(this)}init(e,t){this.triggerElement=e,this.popoverElement=t,this.bindEvents()}bindEvents(){if(!this.triggerElement)return;let{trigger:e}=this.options;(e===z.CLICK||e===z.MANUAL)&&this.addEventListener(this.triggerElement,`click`,this.handleTriggerClick),e===z.HOVER&&(this.addEventListener(this.triggerElement,`mouseenter`,this.handleTriggerMouseEnter),this.addEventListener(this.triggerElement,`mouseleave`,this.handleTriggerMouseLeave)),e===z.FOCUS&&(this.addEventListener(this.triggerElement,`focus`,this.handleTriggerFocus),this.addEventListener(this.triggerElement,`blur`,this.handleTriggerBlur)),this.options.closeOnOutsideClick&&this.addEventListener(document,`mousedown`,this.handleOutsideClick),this.options.closeOnEscape&&this.addEventListener(document,`keydown`,this.handleEscapeKey),this.addEventListener(window,`resize`,this.handleResize),this.addEventListener(window,`scroll`,this.handleScroll,!0)}addEventListener(e,t,n,r=!1){e.addEventListener(t,n,r),this.eventCleanups.push(()=>{e.removeEventListener(t,n,r)})}open(){if(this.isOpen)return;this.clearTimeouts();let e=()=>{this.isOpen=!0,this.updatePosition(),this.options.onOpen?.()};if(this.options.delay>0){let t=setTimeout(e,this.options.delay);this.timeouts.add(t)}else e()}close(){if(!this.isOpen)return;this.clearTimeouts();let e=()=>{this.isOpen=!1,this.options.onClose?.()};if(this.options.hideDelay>0){let t=setTimeout(e,this.options.hideDelay);this.timeouts.add(t)}else e()}toggle(){this.isOpen?this.close():this.open()}updatePosition(){if(!this.triggerElement||!this.popoverElement||!this.isOpen)return;let{placement:e,offset:t}=this.options,{position:n,finalPlacement:r}=ic(rc(this.triggerElement,this.popoverElement,e,t),this.popoverElement,e);this.popoverElement.style.top=`${n.top}px`,this.popoverElement.style.left=`${n.left}px`,this.updateArrowDirection(r)}updateArrowDirection(e){if(!this.popoverElement)return;let t=e.split(`-`)[0],n=this.popoverElement.className.split(` `).filter(e=>!e.startsWith(`wc-popover-content--top`)&&!e.startsWith(`wc-popover-content--bottom`)&&!e.startsWith(`wc-popover-content--left`)&&!e.startsWith(`wc-popover-content--right`));n.push(`wc-popover-content--${t}`),this.popoverElement.className=n.join(` `)}clearTimeouts(){this.timeouts.forEach(e=>clearTimeout(e)),this.timeouts.clear()}handleTriggerClick(e){e.preventDefault(),this.toggle()}handleTriggerMouseEnter(){this.open()}handleTriggerMouseLeave(){this.close()}handleTriggerFocus(){this.open()}handleTriggerBlur(){this.close()}handleOutsideClick(e){this.isOpen&&(this.triggerElement?.contains(e.target)||this.popoverElement?.contains(e.target)||this.close())}handleEscapeKey(e){e.key===`Escape`&&this.isOpen&&this.close()}handleResize(){this.isOpen&&this.updatePosition()}handleScroll(){this.isOpen&&this.updatePosition()}destroy(){this.close(),this.clearTimeouts(),this.eventCleanups.forEach(e=>e()),this.eventCleanups=[],this.triggerElement=null,this.popoverElement=null,this.options.onOpen=null,this.options.onClose=null}},sc={createController(e={}){return new oc(e)},isPopoverSupported(){return typeof HTMLElement.prototype.showPopover==`function`},getBestPlacement(e,t,n=[R.BOTTOM,R.TOP,R.RIGHT,R.LEFT]){if(!e||!t)return n[0];for(let r of n){let{finalPlacement:n}=ic(rc(e,t,r),t,r);if(n===r)return r}return n[0]},debug(e,t){process.env.NODE_ENV===`development`&&console.log(`[Popover] ${e}`,t)}},cc={PopoverController:oc,calculatePopoverPosition:rc,detectCollisionAndAdjust:ic,getPopoverClasses:ac,utils:sc,placements:R,triggers:z,sizes:nc},lc=r({BILLING_PERIODS:()=>V,BUTTON_VARIANTS:()=>dc,CURRENCY_SYMBOLS:()=>fc,PRICING_SIZES:()=>B,PRICING_VARIANTS:()=>uc,calculateDiscountPrice:()=>hc,comparePlans:()=>xc,debounce:()=>Oc,debugPlans:()=>Ac,default:()=>jc,filterPlans:()=>Ec,findCheapestPlan:()=>Cc,findMostExpensivePlan:()=>wc,findPopularPlan:()=>Sc,formatPeriod:()=>mc,formatPrice:()=>pc,getAccessibilityProps:()=>Dc,getPlanButtonClasses:()=>bc,getPlanCardClasses:()=>yc,getPricingGridClasses:()=>vc,sortPlans:()=>Tc,throttle:()=>kc,validatePlan:()=>gc,validatePlans:()=>_c}),uc={STANDARD:`standard`,OUTLINED:`outlined`,FILLED:`filled`,MINIMAL:`minimal`,ELEVATED:`elevated`,GRADIENT:`gradient`,ANIMATED:`animated`},B={SM:`sm`,MD:`md`,LG:`lg`,XL:`xl`},dc={PRIMARY:`primary`,OUTLINED:`outlined`,GHOST:`ghost`,SECONDARY:`secondary`},fc={USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`,CNY:`¥`,KRW:`₩`},V={MONTHLY:`monthly`,YEARLY:`yearly`,WEEKLY:`weekly`,DAILY:`daily`,LIFETIME:`lifetime`};function pc(e,t={}){let{currency:n=`USD`,locale:r=`en-US`,showCurrency:i=!0,showDecimals:a=!0,customSymbol:o=null}=t;if(e==null||e===``||e===0)return`免费`;let s=typeof e==`string`?parseFloat(e):e;if(isNaN(s))return e.toString();if(o)return`${o}${a?s.toFixed(2):Math.round(s)}`;if(!i)return a?s.toFixed(2):Math.round(s).toString();try{return new Intl.NumberFormat(r,{style:`currency`,currency:n,minimumFractionDigits:a?2:0,maximumFractionDigits:a?2:0}).format(s)}catch{return`${fc[n]||`$`}${a?s.toFixed(2):Math.round(s)}`}}function mc(e,t=`zh-CN`){return{"zh-CN":{[V.MONTHLY]:`/月`,[V.YEARLY]:`/年`,[V.WEEKLY]:`/周`,[V.DAILY]:`/天`,[V.LIFETIME]:`终身`},"en-US":{[V.MONTHLY]:`/month`,[V.YEARLY]:`/year`,[V.WEEKLY]:`/week`,[V.DAILY]:`/day`,[V.LIFETIME]:`lifetime`}}[t]?.[e]||e}function hc(e,t){return typeof e!=`number`||typeof t!=`number`?e:e*(1-(t>1?t/100:t))}function gc(e){let t=[],n=[];return e?((!e.name||typeof e.name!=`string`)&&t.push(`计划名称是必需的且必须是字符串`),(e.price===void 0||e.price===null)&&t.push(`价格是必需的`),e.price!==0&&!e.price&&e.price!==`免费`&&n.push(`价格值可能无效`),e.features&&!Array.isArray(e.features)&&t.push(`功能列表必须是数组`),e.features&&e.features.length===0&&n.push(`功能列表为空`),e.button&&typeof e.button!=`string`&&t.push(`按钮文本必须是字符串`),{isValid:t.length===0,errors:t,warnings:n}):(t.push(`计划对象不能为空`),{isValid:!1,errors:t,warnings:n})}function _c(e){if(!Array.isArray(e))return{isValid:!1,errors:[`计划列表必须是数组`],warnings:[]};if(e.length===0)return{isValid:!1,errors:[`计划列表不能为空`],warnings:[]};let t=[],n=[];return e.forEach((e,r)=>{let i=gc(e);i.errors.forEach(e=>{t.push(`计划 ${r+1}: ${e}`)}),i.warnings.forEach(e=>{n.push(`计划 ${r+1}: ${e}`)})}),{isValid:t.length===0,errors:t,warnings:n}}function vc(e={}){let{columns:t=3,size:n=B.MD,className:r=``}=e,i=[`pricing-grid`];return t>=1&&t<=4&&i.push(`pricing-grid--${t}-col`),n!==B.MD&&i.push(`pricing-grid--${n}`),r&&i.push(r),i.join(` `)}function yc(e={}){let{popular:t=!1,variant:n=uc.STANDARD,size:r=B.MD,className:i=``}=e,a=[`plan-card`];return t&&a.push(`plan-card--popular`),n!==uc.STANDARD&&a.push(`plan-card--${n}`),r!==B.MD&&a.push(`plan-card--${r}`),i&&a.push(i),a.join(` `)}function bc(e={}){let{variant:t=dc.PRIMARY,size:n=B.MD,className:r=``}=e,i=[`plan-btn`];return t!==dc.PRIMARY&&i.push(`plan-btn--${t}`),n!==B.MD&&i.push(`plan-btn--${n}`),r&&i.push(r),i.join(` `)}function xc(e,t){if(!e||!t)return{error:`需要两个有效的计划进行比较`};let n=typeof e.price==`number`?e.price:parseFloat(e.price)||0,r=typeof t.price==`number`?t.price:parseFloat(t.price)||0,i=e.features||[],a=t.features||[],o=i.filter(e=>a.includes(e)),s=i.filter(e=>!a.includes(e)),c=a.filter(e=>!i.includes(e));return{priceDifference:n-r,cheaperPlan:n<r?e.name:r<n?t.name:null,moreExpensivePlan:n>r?e.name:r>n?t.name:null,commonFeatures:o,uniqueFeatures:{[e.name]:s,[t.name]:c},featureCount:{[e.name]:i.length,[t.name]:a.length}}}function Sc(e){return!Array.isArray(e)||e.length===0?null:e.find(e=>e.popular)||null}function Cc(e){return!Array.isArray(e)||e.length===0?null:e.reduce((e,t)=>(typeof t.price==`number`?t.price:parseFloat(t.price)||0)<(typeof e.price==`number`?e.price:parseFloat(e.price)||0)?t:e)}function wc(e){return!Array.isArray(e)||e.length===0?null:e.reduce((e,t)=>(typeof t.price==`number`?t.price:parseFloat(t.price)||0)>(typeof e.price==`number`?e.price:parseFloat(e.price)||0)?t:e)}function Tc(e,t=`price`,n=`asc`){return Array.isArray(e)?[...e].sort((e,r)=>{let i,a;switch(t){case`price`:i=typeof e.price==`number`?e.price:parseFloat(e.price)||0,a=typeof r.price==`number`?r.price:parseFloat(r.price)||0;break;case`name`:i=e.name?.toLowerCase()||``,a=r.name?.toLowerCase()||``;break;case`features`:i=(e.features||[]).length,a=(r.features||[]).length;break;default:return 0}return i<a?n===`asc`?-1:1:i>a?n===`asc`?1:-1:0}):[]}function Ec(e,t={}){return Array.isArray(e)?e.filter(e=>{if(t.minPrice!==void 0&&(typeof e.price==`number`?e.price:parseFloat(e.price)||0)<t.minPrice||t.maxPrice!==void 0&&(typeof e.price==`number`?e.price:parseFloat(e.price)||0)>t.maxPrice)return!1;if(t.requiredFeatures&&Array.isArray(t.requiredFeatures)){let n=e.features||[];if(!t.requiredFeatures.every(e=>n.some(t=>t.toLowerCase().includes(e.toLowerCase()))))return!1}if(t.popularOnly&&!e.popular)return!1;if(t.searchTerm){let n=t.searchTerm.toLowerCase(),r=e.name?.toLowerCase().includes(n),i=(e.features||[]).some(e=>e.toLowerCase().includes(n));if(!r&&!i)return!1}return!0}):[]}function Dc(e,t){let n={role:`article`,"aria-labelledby":`plan-${t}-name`,"aria-describedby":`plan-${t}-price plan-${t}-features`};return e.popular&&(n[`aria-label`]=`推荐计划: ${e.name}`),n}function Oc(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{clearTimeout(n),e(...r)},t)}}function kc(e,t){let n;return function(...r){n||(e.apply(this,r),n=!0,setTimeout(()=>n=!1,t))}}function Ac(e){if(!Array.isArray(e))return{error:`计划数据不是数组`};let t={totalPlans:e.length,popularPlans:e.filter(e=>e.popular).length,validPlans:0,invalidPlans:0,priceRange:{min:1/0,max:-1/0},averageFeatures:0,issues:[]},n=0;return e.forEach((e,r)=>{let i=gc(e);i.isValid?t.validPlans++:(t.invalidPlans++,t.issues.push({planIndex:r,planName:e.name||`未命名`,errors:i.errors}));let a=typeof e.price==`number`?e.price:parseFloat(e.price)||0;a>0&&(t.priceRange.min=Math.min(t.priceRange.min,a),t.priceRange.max=Math.max(t.priceRange.max,a)),e.features&&Array.isArray(e.features)&&(n+=e.features.length)}),t.averageFeatures=e.length>0?(n/e.length).toFixed(1):0,t.priceRange.min===1/0&&(t.priceRange={min:0,max:0}),t}var jc={PRICING_VARIANTS:uc,PRICING_SIZES:B,BUTTON_VARIANTS:dc,CURRENCY_SYMBOLS:fc,BILLING_PERIODS:V,formatPrice:pc,formatPeriod:mc,calculateDiscountPrice:hc,validatePlan:gc,validatePlans:_c,getPricingGridClasses:vc,getPlanCardClasses:yc,getPlanButtonClasses:bc,comparePlans:xc,findPopularPlan:Sc,findCheapestPlan:Cc,findMostExpensivePlan:wc,sortPlans:Tc,filterPlans:Ec,getAccessibilityProps:Dc,debounce:Oc,throttle:kc,debugPlans:Ac},Mc=r({ProgressController:()=>Bc,animations:()=>U,calculatePercentage:()=>Ic,colors:()=>H,createCircularProgressCSS:()=>Vc,default:()=>Uc,formatProgressText:()=>Lc,getColorByProgress:()=>zc,getProgressClasses:()=>Rc,sizes:()=>Nc,types:()=>Pc,utils:()=>Hc,validateProgress:()=>Fc}),H={PRIMARY:`primary`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,PURPLE:`purple`,ORANGE:`orange`,CYAN:`cyan`,PINK:`pink`},Nc={SM:`sm`,MD:`md`,LG:`lg`,XL:`xl`},Pc={LINEAR:`linear`,CIRCULAR:`circular`},U={NONE:`none`,PULSE:`pulse`,STRIPED:`striped`,STRIPED_ANIMATED:`striped-animated`,INDETERMINATE:`indeterminate`,LOADING:`loading`};function Fc(e,t=0,n=100){let r=Number(e);return isNaN(r)?t:Math.max(t,Math.min(n,r))}function Ic(e,t){return t<=0?0:Math.round(e/t*100)}function Lc(e,t={}){let{showPercent:n=!0,showFraction:r=!1,total:i=100,precision:a=0,suffix:o=``,prefix:s=``}=t,c=Fc(e,0,i);return r?`${s}${c}/${i}${o}`:n?`${s}${Ic(c,i).toFixed(a)}%${o}`:`${s}${c.toFixed(a)}${o}`}function Rc(e={}){let{size:t=Nc.MD,color:n=H.PRIMARY,type:r=Pc.LINEAR,animation:i=U.NONE,striped:a=!1,animated:o=!1,gradient:s=!1,glow:c=!1,indeterminate:l=!1,className:u=``}=e,d=[`wc-progress-wrapper`],f=[`wc-progress`],p=[`wc-progress__bar`];return t&&Nc[t.toUpperCase()]&&f.push(`wc-progress--${t}`),r===Pc.CIRCULAR&&f.push(`wc-progress--circular`),n&&H[n.toUpperCase()]&&p.push(`wc-progress__bar--${n}`),l?f.push(`wc-progress--indeterminate`):((o||i===U.PULSE)&&p.push(`wc-progress__bar--animated`),(a||i===U.STRIPED)&&p.push(`wc-progress__bar--striped`),i===U.STRIPED_ANIMATED&&p.push(`wc-progress__bar--striped-animated`),i===U.LOADING&&f.push(`wc-progress--loading`)),s&&p.push(`wc-progress__bar--gradient`),c&&p.push(`wc-progress__bar--glow`),u&&d.push(u),{wrapper:d.join(` `),container:f.join(` `),bar:p.join(` `)}}function zc(e,t=[]){let n=[{value:25,color:H.ERROR},{value:50,color:H.WARNING},{value:75,color:H.PRIMARY},{value:100,color:H.SUCCESS}],r=t.length>0?t:n;for(let t of r)if(e<=t.value)return t.color;return H.SUCCESS}var Bc=class{constructor(e={}){this.options={duration:2e3,easing:`ease-out`,onUpdate:null,onComplete:null,autoStart:!1,...e},this.currentValue=0,this.targetValue=0,this.isRunning=!1,this.startTime=null,this.rafId=null}setProgress(e,t=!0){let n=Fc(e);if(this.targetValue=n,!t){this.currentValue=n,this.options.onUpdate?.(n),n===100&&this.options.onComplete?.(n);return}this.isRunning||this.start()}increment(e=10,t=!0){let n=this.currentValue+e;this.setProgress(n,t)}decrement(e=10,t=!0){let n=this.currentValue-e;this.setProgress(n,t)}start(){this.isRunning||(this.isRunning=!0,this.startTime=performance.now(),this.animate())}stop(){this.isRunning=!1,this.rafId&&=(cancelAnimationFrame(this.rafId),null)}reset(){this.stop(),this.currentValue=0,this.targetValue=0,this.options.onUpdate?.(0)}complete(){this.setProgress(100)}animate(){if(!this.isRunning)return;let e=performance.now()-this.startTime,t=Math.min(e/this.options.duration,1),n=this.applyEasing(t),r=this.currentValue,i=r+(this.targetValue-r)*n;this.currentValue=i,this.options.onUpdate?.(i),t<1?this.rafId=requestAnimationFrame(()=>this.animate()):(this.currentValue=this.targetValue,this.isRunning=!1,this.options.onUpdate?.(this.targetValue),this.targetValue===100&&this.options.onComplete?.(this.targetValue))}applyEasing(e){switch(this.options.easing){case`ease-in`:return e*e;case`ease-out`:return 1-(1-e)**2;case`ease-in-out`:return e<.5?2*e*e:1-(-2*e+2)**2/2;default:return e}}destroy(){this.stop(),this.options.onUpdate=null,this.options.onComplete=null}};function Vc(e,t=H.PRIMARY){let n=e/100*360;return{background:`conic-gradient(
19
- var(--wc-progress-${t}) ${n}deg,
20
- var(--wc-progress-bg) ${n}deg
21
- )`}}var Hc={createController(e={}){return new Bc(e)},shouldReduceMotion(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches},estimateRemainingTime(e,t,n){if(e<=0)return 1/0;let r=e/(Date.now()-n);return(t-e)/r},formatTime(e){if(e===1/0)return`∞`;let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}:${(n%60).toString().padStart(2,`0`)}:${(t%60).toString().padStart(2,`0`)}`:n>0?`${n}:${(t%60).toString().padStart(2,`0`)}`:`${t}s`},debug(e,t){process.env.NODE_ENV===`development`&&console.log(`[Progress] ${e}`,t)}},Uc={ProgressController:Bc,validateProgress:Fc,calculatePercentage:Ic,formatProgressText:Lc,getProgressClasses:Rc,getColorByProgress:zc,createCircularProgressCSS:Vc,utils:Hc,colors:H,sizes:Nc,types:Pc,animations:U},Wc=r({RADIO_COLORS:()=>Gc,RADIO_ORIENTATIONS:()=>qc,RADIO_SIZES:()=>W,RADIO_VARIANTS:()=>Kc,RadioGroupManager:()=>al,createRadioChangeHandler:()=>rl,createRadioKeyboardHandler:()=>il,default:()=>cl,findSelectedOption:()=>Zc,getNextRadioOption:()=>Qc,getPreviousRadioOption:()=>$c,getRadioAccessibilityProps:()=>ol,getRadioButtonClasses:()=>tl,getRadioClasses:()=>el,getRadioGroupAccessibilityProps:()=>sl,getRadioGroupClasses:()=>nl,normalizeRadioOptions:()=>Xc,validateRadioGroupConfig:()=>Yc,validateRadioValue:()=>Jc}),W={SM:`sm`,MD:`md`,LG:`lg`},Gc={PRIMARY:`primary`,SECONDARY:`secondary`,SUCCESS:`success`,ERROR:`error`,WARNING:`warning`,INFO:`info`},Kc={STANDARD:`standard`,OUTLINED:`outlined`,CARD:`card`,BUTTON:`button`},qc={VERTICAL:`vertical`,HORIZONTAL:`horizontal`,INLINE:`inline`};function Jc(e,t=[]){return t.length===0?!0:t.some(t=>(typeof t==`object`?t.value:t)===e)}function Yc(e={}){let t=[],n=[],{options:r=[],value:i,name:a}=e;return Array.isArray(r)?r.length===0&&n.push(`选项数组为空`):t.push(`选项必须是数组`),(!a||typeof a!=`string`)&&t.push(`单选按钮组必须有名称`),i!=null&&(Jc(i,r)||n.push(`当前值不在可选项中`)),Array.isArray(r)&&r.forEach((e,r)=>{typeof e==`object`&&(e.hasOwnProperty(`value`)||t.push(`选项 ${r+1} 缺少 value 属性`),!e.hasOwnProperty(`label`)&&!e.hasOwnProperty(`children`)&&n.push(`选项 ${r+1} 缺少 label 或 children 属性`))}),{isValid:t.length===0,errors:t,warnings:n}}function Xc(e=[]){return e.map((e,t)=>typeof e==`string`||typeof e==`number`?{value:e,label:String(e),id:`radio-option-${t}`,disabled:!1}:typeof e==`object`&&e?{value:e.value,label:e.label||String(e.value),id:e.id||`radio-option-${t}`,disabled:!!e.disabled,description:e.description,...e}:{value:e,label:`Invalid Option`,id:`radio-option-${t}`,disabled:!0})}function Zc(e,t=[]){return Xc(t).find(t=>t.value===e)||null}function Qc(e,t=[],n=!0){let r=Xc(t).filter(e=>!e.disabled);if(r.length===0)return null;let i=r.findIndex(t=>t.value===e);if(i===-1)return r[0];let a=i+1;return a>=r.length?n?r[0]:null:r[a]}function $c(e,t=[],n=!0){let r=Xc(t).filter(e=>!e.disabled);if(r.length===0)return null;let i=r.findIndex(t=>t.value===e);if(i===-1)return r[r.length-1];let a=i-1;return a<0?n?r[r.length-1]:null:r[a]}function el(e={}){let{size:t=W.MD,variant:n=Kc.STANDARD,disabled:r=!1,checked:i=!1,focused:a=!1,className:o=``}=e,s=[`wc-radio`];return t!==W.MD&&s.push(`wc-radio--${t}`),n!==Kc.STANDARD&&s.push(`wc-radio--${n}`),r&&s.push(`wc-radio--disabled`),i&&s.push(`wc-radio--checked`),a&&s.push(`wc-radio--focused`),o&&s.push(o),s.join(` `)}function tl(e={}){let{size:t=W.MD,color:n=Gc.PRIMARY,checked:r=!1,className:i=``}=e,a=[`wc-radio__button`];return a.push(`wc-radio__button--${t}`),a.push(`wc-radio__button--${n}`),r&&a.push(`wc-radio__button--checked`),i&&a.push(i),a.join(` `)}function nl(e={}){let{orientation:t=qc.VERTICAL,size:n=W.MD,disabled:r=!1,className:i=``}=e,a=[`wc-radio-group`];return t!==qc.VERTICAL&&a.push(`wc-radio-group--${t}`),n!==W.MD&&a.push(`wc-radio-group--${n}`),r&&a.push(`wc-radio-group--disabled`),i&&a.push(i),a.join(` `)}function rl(e,t={}){let{disabled:n=!1,value:r}=t;return function(t){if(n)return;let i=t.target?t.target.value:r;e?.(i,t)}}function il(e,t=[],n){return function(r){let i=null;switch(r.key){case`ArrowDown`:case`ArrowRight`:i=Qc(n,t);break;case`ArrowUp`:case`ArrowLeft`:i=$c(n,t);break;case`Home`:i=Xc(t).filter(e=>!e.disabled)[0]||null;break;case`End`:let e=Xc(t).filter(e=>!e.disabled);i=e[e.length-1]||null;break;default:return}i&&(r.preventDefault(),e?.(i.value,r))}}var al=class{constructor(e={}){this.options={name:``,value:null,options:[],disabled:!1,required:!1,onChange:null,...e},this.state={value:this.options.value,focused:!1,touched:!1}}getState(){return{...this.state,selectedOption:this.getSelectedOption(),isValid:this.isValid()}}setValue(e){if(this.options.disabled)return;let t=this.state.value;this.state.value=e,this.state.touched=!0,t!==e&&this.options.onChange?.(e,this.getState())}getSelectedOption(){return Zc(this.state.value,this.options.options)}isValid(){return this.options.required&&(this.state.value===null||this.state.value===void 0)?!1:Jc(this.state.value,this.options.options)}getErrors(){let e=[];return this.options.required&&(this.state.value===null||this.state.value===void 0)&&e.push(`请选择一个选项`),Jc(this.state.value,this.options.options)||e.push(`选择的值无效`),e}reset(){this.state.value=this.options.value,this.state.focused=!1,this.state.touched=!1}updateOptions(e){Object.assign(this.options,e)}handleFocus(){this.state.focused=!0}handleBlur(){this.state.focused=!1}moveToNext(){let e=Qc(this.state.value,this.options.options);e&&this.setValue(e.value)}moveToPrevious(){let e=$c(this.state.value,this.options.options);e&&this.setValue(e.value)}};function ol(e={}){let{checked:t=!1,disabled:n=!1,required:r=!1,invalid:i=!1,describedBy:a=``,labelledBy:o=``}=e,s={role:`radio`,"aria-checked":t,"aria-disabled":n,tabIndex:t?0:-1};return r&&(s[`aria-required`]=`true`),i&&(s[`aria-invalid`]=`true`),a&&(s[`aria-describedby`]=a),o&&(s[`aria-labelledby`]=o),s}function sl(e={}){let{label:t=``,required:n=!1,invalid:r=!1,errorId:i=``,helpId:a=``}=e,o={role:`radiogroup`};t&&(o[`aria-label`]=t),n&&(o[`aria-required`]=`true`),r&&(o[`aria-invalid`]=`true`);let s=[];return i&&s.push(i),a&&s.push(a),s.length>0&&(o[`aria-describedby`]=s.join(` `)),o}var cl={RADIO_SIZES:W,RADIO_COLORS:Gc,RADIO_VARIANTS:Kc,RADIO_ORIENTATIONS:qc,validateRadioValue:Jc,validateRadioGroupConfig:Yc,normalizeRadioOptions:Xc,findSelectedOption:Zc,getNextRadioOption:Qc,getPreviousRadioOption:$c,getRadioClasses:el,getRadioButtonClasses:tl,getRadioGroupClasses:nl,createRadioChangeHandler:rl,createRadioKeyboardHandler:il,RadioGroupManager:al,getRadioAccessibilityProps:ol,getRadioGroupAccessibilityProps:sl},ll=r({RATING_COLORS:()=>dl,RATING_ICONS:()=>fl,RATING_SIZES:()=>ul,RATING_VARIANTS:()=>pl,calculateFillPercentage:()=>vl,calculateRatingFromPosition:()=>yl,createCustomIcon:()=>Cl,createRatingClickHandler:()=>wl,createRatingHoverHandlers:()=>Tl,createRatingKeyboardHandler:()=>El,debounce:()=>jl,default:()=>Nl,formatRating:()=>Dl,formatRatingDescription:()=>Ol,generateRatingItems:()=>_l,getRatingAccessibilityProps:()=>kl,getRatingClasses:()=>bl,getRatingIcon:()=>Sl,getRatingItemAccessibilityProps:()=>Al,getRatingItemClasses:()=>xl,normalizeRating:()=>hl,throttle:()=>Ml,validateRating:()=>ml,validateRatingConfig:()=>gl}),ul={SM:`sm`,MD:`md`,LG:`lg`,XL:`xl`},dl={PRIMARY:`primary`,SECONDARY:`secondary`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,INFO:`info`},fl={STAR:`star`,HEART:`heart`,THUMBS:`thumbs`,CUSTOM:`custom`},pl={STANDARD:`standard`,OUTLINED:`outlined`,FILLED:`filled`,ANIMATED:`animated`,GLOW:`glow`,BOUNCE:`bounce`};function ml(e,t=5,n=0){return typeof e!=`number`||isNaN(e)?!1:e>=n&&e<=t}function hl(e,t=5,n=0,r=1){if(typeof e!=`number`||isNaN(e))return n;let i=Math.max(n,Math.min(t,e));return r>0?Math.round(i/r)*r:i}function gl(e={}){let t=[],n=[],{max:r=5,min:i=0,step:a=1,value:o=0}=e;return(typeof r!=`number`||r<=0)&&t.push(`最大评分必须是大于0的数字`),(typeof i!=`number`||i<0)&&t.push(`最小评分必须是大于等于0的数字`),i>=r&&t.push(`最小评分必须小于最大评分`),(typeof a!=`number`||a<=0)&&t.push(`步长必须是大于0的数字`),ml(o,r,i)||n.push(`当前评分值超出有效范围`),{isValid:t.length===0,errors:t,warnings:n}}function _l(e=5,t=0,n=0){let r=[];for(let i=1;i<=e;i++){let e=i<=(n||t),a=i<=t,o=n>0&&i<=n;r.push({index:i,value:i,active:e,filled:a,hovered:o,empty:!e})}return r}function vl(e,t){return e>=t?100:e>t-1?(e-(t-1))*100:0}function yl(e,t,n=5,r=!1){let i=t.getBoundingClientRect(),a=e.clientX-i.left,o=i.width,s=Math.max(0,Math.min(1,a/o))*n;return s=r?Math.round(s*2)/2:Math.ceil(s),Math.max(0,Math.min(n,s))}function bl(e={}){let{size:t=ul.MD,color:n=dl.WARNING,variant:r=pl.STANDARD,readonly:i=!1,disabled:a=!1,vertical:o=!1,compact:s=!1,className:c=``}=e,l=[`wc-rating`];return t!==ul.MD&&l.push(`wc-rating--${t}`),n!==dl.WARNING&&l.push(`wc-rating--${n}`),r!==pl.STANDARD&&l.push(`wc-rating--${r}`),i&&l.push(`wc-rating--readonly`),a&&l.push(`wc-rating--disabled`),o&&l.push(`wc-rating--vertical`),s&&l.push(`wc-rating--compact`),c&&l.push(c),l.join(` `)}function xl(e={}){let{active:t=!1,filled:n=!1,hovered:r=!1,disabled:i=!1,size:a=ul.MD,className:o=``}=e,s=[`wc-rating-item`];return t&&s.push(`active`),n&&s.push(`filled`),r&&s.push(`hovered`),i&&s.push(`disabled`),a!==ul.MD&&s.push(`wc-rating-item--${a}`),o&&s.push(o),s.join(` `)}function Sl(e=fl.STAR,t=!1){let n={[fl.STAR]:{filled:`★`,empty:`☆`},[fl.HEART]:{filled:`♥`,empty:`♡`},[fl.THUMBS]:{filled:`👍`,empty:`👍`}},r=n[e]||n[fl.STAR];return t?r.filled:r.empty}function Cl(e,t=!1){let n={star:t?`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>`:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>`,heart:t?`<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>`:`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>`};return n[e]||n.star}function wl(e,t={}){let{readonly:n=!1,allowClear:r=!0}=t;return function(t,i){if(n)return;let a=t;r&&t===i&&(a=0),e?.(a)}}function Tl(e,t={}){let{readonly:n=!1}=t;return{onMouseEnter(t){n||e?.(t)},onMouseLeave(){n||e?.(0)}}}function El(e,t={}){let{max:n=5,min:r=0,readonly:i=!1}=t;return function(t,a){if(i)return;let o=a;switch(t.key){case`ArrowRight`:case`ArrowUp`:o=Math.min(n,a+1);break;case`ArrowLeft`:case`ArrowDown`:o=Math.max(r,a-1);break;case`Home`:o=r;break;case`End`:o=n;break;case`Enter`:case` `:e?.(a);return;default:return}t.preventDefault(),e?.(o)}}function Dl(e,t=5,n={}){let{showMax:r=!0,precision:i=1,locale:a=`zh-CN`}=n,o=Number(e).toFixed(i);return r?`${o}/${t}`:o}function Ol(e,t=5,n=[]){n.length===0&&(n=[`很差`,`较差`,`一般`,`良好`,`优秀`].slice(0,t));let r=Math.floor(e)-1;return n[r]||``}function kl(e,t=5,n=!1){let r={role:n?`img`:`radiogroup`,"aria-label":`评分 ${e} 分,满分 ${t} 分`,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e};return n&&(r[`aria-readonly`]=`true`),r}function Al(e,t,n=!1){let r={role:`radio`,"aria-checked":e===t?`true`:`false`,"aria-label":`${e} 星`,"aria-setsize":void 0,"aria-posinset":e};return n?(r.tabIndex=-1,r[`aria-hidden`]=`true`):r.tabIndex=e===t?0:-1,r}function jl(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{clearTimeout(n),e(...r)},t)}}function Ml(e,t){let n;return function(...r){n||(e.apply(this,r),n=!0,setTimeout(()=>n=!1,t))}}var Nl={RATING_SIZES:ul,RATING_COLORS:dl,RATING_ICONS:fl,RATING_VARIANTS:pl,validateRating:ml,normalizeRating:hl,validateRatingConfig:gl,generateRatingItems:_l,calculateFillPercentage:vl,calculateRatingFromPosition:yl,getRatingClasses:bl,getRatingItemClasses:xl,getRatingIcon:Sl,createCustomIcon:Cl,createRatingClickHandler:wl,createRatingHoverHandlers:Tl,createRatingKeyboardHandler:El,formatRating:Dl,formatRatingDescription:Ol,getRatingAccessibilityProps:kl,getRatingItemAccessibilityProps:Al,debounce:jl,throttle:Ml},Pl=r({KEY_CODES:()=>G,SELECT_SIZES:()=>Fl,SELECT_VARIANTS:()=>Il,debounce:()=>tu,default:()=>ru,filterOptions:()=>zl,getAriaAttributes:()=>eu,getContainerClasses:()=>Zl,getOptionClasses:()=>Ql,getSelectClasses:()=>Xl,getVirtualScrollData:()=>nu,groupOptions:()=>Rl,handleKeyboardNavigation:()=>Gl,handleMultipleSelection:()=>Ul,handleSingleSelection:()=>Hl,highlightText:()=>Bl,normalizeOptions:()=>Ll,removeFromSelection:()=>Wl,validateValue:()=>$l}),Fl={sm:`sm`,md:`md`,lg:`lg`},Il={outlined:`outlined`,filled:`filled`,standard:`standard`},G={ENTER:13,ESCAPE:27,SPACE:32,ARROW_UP:38,ARROW_DOWN:40,HOME:36,END:35,TAB:9};function Ll(e=[]){return e.map((e,t)=>typeof e==`string`||typeof e==`number`?{value:e,label:String(e),id:`option-${t}`,disabled:!1}:{value:e.value,label:e.label||String(e.value),id:e.id||`option-${t}`,disabled:!!e.disabled,description:e.description,group:e.group,...e})}function Rl(e=[]){let t={},n=[];e.forEach(e=>{e.group?(t[e.group]||(t[e.group]=[]),t[e.group].push(e)):n.push(e)});let r=[];return n.length>0&&r.push(...n),Object.keys(t).forEach(e=>{r.push({type:`group`,label:e,options:t[e]})}),r}function zl(e=[],t=``,n={}){let{searchFields:r=[`label`,`value`],caseSensitive:i=!1,matchStart:a=!1,highlightMatch:o=!1}=n;if(!t.trim())return e;let s=i?t:t.toLowerCase();return e.filter(e=>r.some(t=>{let n=e[t];if(!n)return!1;let r=i?String(n):String(n).toLowerCase();return a?r.startsWith(s):r.includes(s)})).map(e=>o?{...e,highlightedLabel:Bl(e.label,t,i)}:e)}function Bl(e,t,n=!1){if(!t.trim())return e;let r=n?`g`:`gi`,i=RegExp(`(${Vl(t)})`,r);return e.replace(i,`<mark>$1</mark>`)}function Vl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Hl(e,t){return e===t?null:e}function Ul(e,t=[],n={}){let{maxSelections:r=1/0,allowDeselect:i=!0}=n;return t.includes(e)?i?t.filter(t=>t!==e):t:t.length>=r?t:[...t,e]}function Wl(e,t=[]){return t.filter(t=>t!==e)}function Gl(e,t=[],n=-1,r={}){let{loop:i=!0,skipDisabled:a=!0}=r,o=e.keyCode||e.which,s=n,c=null;switch(o){case G.ARROW_DOWN:e.preventDefault(),s=Kl(t,n,1,{loop:i,skipDisabled:a}),c=`navigate`;break;case G.ARROW_UP:e.preventDefault(),s=Kl(t,n,-1,{loop:i,skipDisabled:a}),c=`navigate`;break;case G.HOME:e.preventDefault(),s=ql(t),c=`navigate`;break;case G.END:e.preventDefault(),s=Jl(t),c=`navigate`;break;case G.ENTER:case G.SPACE:e.preventDefault(),c=`select`;break;case G.ESCAPE:e.preventDefault(),c=`close`;break;case G.TAB:c=`close`;break;default:e.key&&e.key.length===1&&(s=Yl(t,e.key,n),c=`navigate`);break}return{index:s,action:c,option:t[s]||null}}function Kl(e,t,n,r={}){let{loop:i=!0,skipDisabled:a=!0}=r,o=t+n;for(;o>=0&&o<e.length;){let t=e[o];if(!a||!t.disabled)return o;o+=n}return i?n>0?ql(e):Jl(e):t}function ql(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return 0}function Jl(e){for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return e.length-1}function Yl(e,t,n=-1){let r=t.toLowerCase();for(let t=n+1;t<e.length;t++){let n=e[t];if(!n.disabled&&n.label.toLowerCase().startsWith(r))return t}for(let t=0;t<=n;t++){let n=e[t];if(!n.disabled&&n.label.toLowerCase().startsWith(r))return t}return n}function Xl(e={}){let{size:t=`md`,variant:n=`outlined`,disabled:r=!1,error:i=!1,focused:a=!1,open:o=!1,fullWidth:s=!1}=e,c=[`wc-select`];return s&&c.push(`wc-select--full-width`),r&&c.push(`wc-select--disabled`),c.join(` `)}function Zl(e={}){let{size:t=`md`,variant:n=`outlined`,error:r=!1,focused:i=!1,open:a=!1}=e,o=[`wc-select__container`];return o.push(`wc-select__container--${t}`),o.push(`wc-select__container--${n}`),r&&o.push(`wc-select__container--error`),i&&o.push(`wc-select__container--focused`),a&&o.push(`wc-select__container--open`),o.join(` `)}function Ql(e={},t=!1,n=!1){let r=[`wc-select__option`];return t&&r.push(`wc-select__option--selected`),n&&r.push(`wc-select__option--focused`),e.disabled&&r.push(`wc-select__option--disabled`),r.join(` `)}function $l(e,t=[],n={}){let{required:r=!1,multiple:i=!1}=n,a=[];if(r&&(i?(!Array.isArray(e)||e.length===0)&&a.push(`This field is required`):(e==null||e===``)&&a.push(`This field is required`)),e!=null&&e!==``){let n=t.map(e=>e.value);if(i){if(Array.isArray(e)){let t=e.filter(e=>!n.includes(e));t.length>0&&a.push(`Invalid options: ${t.join(`, `)}`)}}else n.includes(e)||a.push(`Invalid option selected`)}return{isValid:a.length===0,errors:a}}function eu(e={}){let{id:t,open:n=!1,multiple:r=!1,disabled:i=!1,error:a=!1,describedBy:o,labelledBy:s}=e;return{role:`combobox`,"aria-expanded":n,"aria-haspopup":`listbox`,"aria-multiselectable":r||void 0,"aria-disabled":i||void 0,"aria-invalid":a||void 0,"aria-describedby":o,"aria-labelledby":s,"aria-controls":n?`${t}-listbox`:void 0}}function tu(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function nu(e=[],t={}){let{containerHeight:n=250,itemHeight:r=32,overscan:i=5}=t,a=e.length,o=Math.ceil(n/r);return{totalItems:a,visibleItems:o,totalHeight:a*r,itemHeight:r,overscan:i,getVisibleRange:e=>{let t=Math.max(0,Math.floor(e/r)-i);return{start:t,end:Math.min(a,t+o+i*2)}}}}var ru={SELECT_SIZES:Fl,SELECT_VARIANTS:Il,KEY_CODES:G,normalizeOptions:Ll,groupOptions:Rl,filterOptions:zl,highlightText:Bl,handleSingleSelection:Hl,handleMultipleSelection:Ul,removeFromSelection:Wl,handleKeyboardNavigation:Gl,getSelectClasses:Xl,getContainerClasses:Zl,getOptionClasses:Ql,validateValue:$l,getAriaAttributes:eu,debounce:tu,getVirtualScrollData:nu},iu=r({KEY_CODES:()=>K,SLIDER_COLORS:()=>su,SLIDER_ORIENTATIONS:()=>au,SLIDER_SIZES:()=>ou,clamp:()=>cu,createDragHandler:()=>xu,default:()=>Du,formatValue:()=>yu,generateMarks:()=>_u,getAriaAttributes:()=>Tu,getMarkPosition:()=>vu,getPositionFromEvent:()=>pu,getRangeTrackPosition:()=>hu,getSliderClasses:()=>Su,getThumbClasses:()=>Cu,getThumbPosition:()=>mu,getValidValue:()=>fu,handleKeyboardNavigation:()=>gu,parseValue:()=>bu,percentageToValue:()=>uu,roundToStep:()=>du,throttle:()=>Eu,validateConfig:()=>wu,valueToPercentage:()=>lu}),au={horizontal:`horizontal`,vertical:`vertical`},ou={sm:`sm`,md:`md`,lg:`lg`},su={primary:`primary`,secondary:`secondary`,success:`success`,warning:`warning`,error:`error`},K={ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,HOME:36,END:35,PAGE_UP:33,PAGE_DOWN:34};function cu(e,t,n){return Math.min(Math.max(e,t),n)}function lu(e,t,n){return n===t?0:(e-t)/(n-t)*100}function uu(e,t,n){return t+e/100*(n-t)}function du(e,t,n=0){return t<=0?e:n+Math.round((e-n)/t)*t}function fu(e,t,n,r=1){return du(cu(e,t,n),r,t)}function pu(e,t,n=`horizontal`){let r=t.getBoundingClientRect(),i=e.clientX||e.touches&&e.touches[0].clientX,a=e.clientY||e.touches&&e.touches[0].clientY,o;return o=n===`vertical`?(r.bottom-a)/r.height*100:(i-r.left)/r.width*100,cu(o,0,100)}function mu(e,t,n,r=`horizontal`){let i=lu(e,t,n);return r===`vertical`?{bottom:`${i}%`,left:`50%`}:{left:`${i}%`,top:`50%`}}function hu(e,t,n,r,i=`horizontal`){let a=lu(e,n,r),o=lu(t,n,r)-a;return i===`vertical`?{bottom:`${a}%`,height:`${o}%`,width:`100%`}:{left:`${a}%`,width:`${o}%`,height:`100%`}}function gu(e,t,n={}){let{min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,largeStep:s=a*10}=n,c=e.keyCode||e.which,l=t;switch(c){case K.ARROW_LEFT:case K.ARROW_DOWN:(o===`horizontal`&&c===K.ARROW_LEFT||o===`vertical`&&c===K.ARROW_DOWN)&&(l=t-a);break;case K.ARROW_RIGHT:case K.ARROW_UP:(o===`horizontal`&&c===K.ARROW_RIGHT||o===`vertical`&&c===K.ARROW_UP)&&(l=t+a);break;case K.HOME:l=r;break;case K.END:l=i;break;case K.PAGE_UP:l=t+s;break;case K.PAGE_DOWN:l=t-s;break;default:return null}return e.preventDefault(),fu(l,r,i,a)}function _u(e,t,n){if(typeof n==`number`){let r=n,i=(t-e)/(r-1);return Array.from({length:r},(t,n)=>({value:e+n*i,label:e+n*i}))}return Array.isArray(n)?n.map(e=>typeof e==`number`?{value:e,label:e}:e):[]}function vu(e,t,n,r=`horizontal`){let i=lu(e,t,n);return r===`vertical`?{bottom:`${i}%`,left:`50%`}:{left:`${i}%`,top:`50%`}}function yu(e,t={}){let{precision:n=0,prefix:r=``,suffix:i=``,formatter:a=null}=t;return a&&typeof a==`function`?a(e):`${r}${Number(e).toFixed(n)}${i}`}function bu(e,t=0){let n=parseFloat(e);return isNaN(n)?t:n}function xu(e={}){let{onDragStart:t=()=>{},onDrag:n=()=>{},onDragEnd:r=()=>{},trackElement:i=null,orientation:a=`horizontal`,min:o=0,max:s=100,step:c=1}=e,l=!1,u=0,d=e=>{l=!0,u=m(e),t(u,e),document.addEventListener(`mousemove`,f),document.addEventListener(`mouseup`,p),document.addEventListener(`touchmove`,f,{passive:!1}),document.addEventListener(`touchend`,p)},f=e=>{l&&(e.preventDefault(),n(m(e),e))},p=e=>{l&&(l=!1,r(m(e),e),document.removeEventListener(`mousemove`,f),document.removeEventListener(`mouseup`,p),document.removeEventListener(`touchmove`,f),document.removeEventListener(`touchend`,p))},m=e=>i?fu(uu(pu(e,i,a),o,s),o,s,c):u;return{handleStart:d,handleMove:f,handleEnd:p,isDragging:()=>l}}function Su(e={}){let{size:t=`md`,color:n=`primary`,orientation:r=`horizontal`,disabled:i=!1,variant:a=`default`}=e,o=[`wc-slider`];return o.push(`wc-slider--${t}`),o.push(`wc-slider--${n}`),o.push(`wc-slider--${r}`),i&&o.push(`wc-slider--disabled`),a!==`default`&&o.push(`wc-slider--${a}`),o.join(` `)}function Cu(e={}){let{dragging:t=!1,focused:n=!1,position:r=`single`}=e,i=[`wc-slider__thumb`];return t&&i.push(`wc-slider__thumb--dragging`),n&&i.push(`wc-slider__thumb--focused`),r!==`single`&&i.push(`wc-slider__thumb--${r}`),i.join(` `)}function wu(e={}){let{min:t=0,max:n=100,step:r=1,value:i}=e,a=[];if(t>=n&&a.push(`Minimum value must be less than maximum value`),r<=0&&a.push(`Step must be greater than 0`),i!==void 0)if(Array.isArray(i))if(i.length!==2)a.push(`Range value must be an array of exactly 2 values`);else{let[e,r]=i;e>r&&a.push(`Range start value must be less than or equal to end value`),(e<t||r>n)&&a.push(`Range values must be within min and max bounds`)}else (i<t||i>n)&&a.push(`Value must be within min and max bounds`);return{isValid:a.length===0,errors:a}}function Tu(e={}){let{value:t,min:n=0,max:r=100,step:i=1,orientation:a=`horizontal`,disabled:o=!1,labelledBy:s,describedBy:c}=e;return{role:`slider`,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":t,"aria-valuetext":yu(t),"aria-orientation":a,"aria-disabled":o||void 0,"aria-labelledby":s,"aria-describedby":c,tabIndex:o?-1:0}}function Eu(e,t=16){let n,r=0;return function(...i){let a=Date.now();a-r>t?(e.apply(this,i),r=a):(clearTimeout(n),n=setTimeout(()=>{e.apply(this,i),r=Date.now()},t-(a-r)))}}var Du={SLIDER_ORIENTATIONS:au,SLIDER_SIZES:ou,SLIDER_COLORS:su,KEY_CODES:K,clamp:cu,valueToPercentage:lu,percentageToValue:uu,roundToStep:du,getValidValue:fu,getPositionFromEvent:pu,getThumbPosition:mu,getRangeTrackPosition:hu,handleKeyboardNavigation:gu,generateMarks:_u,getMarkPosition:vu,formatValue:yu,parseValue:bu,createDragHandler:xu,getSliderClasses:Su,getThumbClasses:Cu,validateConfig:wu,getAriaAttributes:Tu,throttle:Eu},Ou=r({ANIMATION_TYPES:()=>ku,COLOR_MAP:()=>ju,DEFAULT_DURATION:()=>Mu,ICON_MAP:()=>Au,PERSIST_DURATION:()=>-1,SNACKBAR_POSITIONS:()=>q,SNACKBAR_SEVERITIES:()=>J,SNACKBAR_VARIANTS:()=>Y,SnackbarManager:()=>Nu,calculateProgress:()=>Yu,createErrorSnackbar:()=>Qu,debounceSnackbar:()=>td,formatDuration:()=>$u,getAnimationByPosition:()=>Ju,getAriaAttributes:()=>Zu,getContainerClasses:()=>Ku,getDefaultManager:()=>X,getSnackbarClasses:()=>qu,getSnackbarColors:()=>Uu,getSnackbarIcon:()=>Hu,hide:()=>Bu,hideAll:()=>Vu,isValidPosition:()=>Wu,isValidSeverity:()=>Gu,show:()=>zu,showError:()=>Lu,showInfo:()=>Ru,showSuccess:()=>Fu,showWarning:()=>Iu,truncateMessage:()=>ed,validateOptions:()=>Xu}),q={topLeft:`top-left`,topCenter:`top-center`,topRight:`top-right`,bottomLeft:`bottom-left`,bottomCenter:`bottom-center`,bottomRight:`bottom-right`},J={success:`success`,warning:`warning`,error:`error`,info:`info`,default:`default`},Y={filled:`filled`,outlined:`outlined`,minimal:`minimal`,elevated:`elevated`,standard:`standard`},ku={slideUp:`slide-up`,slideDown:`slide-down`,slideLeft:`slide-left`,slideRight:`slide-right`,fade:`fade`},Au={success:`✓`,info:`ℹ`,warning:`⚠`,error:`✕`},ju={info:{bg:`#e8f4ff`,text:`#0070f3`,border:`#1a8cff`},success:{bg:`#ecfdf5`,text:`#047857`,border:`#10b981`},warning:{bg:`#fffbeb`,text:`#b45309`,border:`#f59e0b`},error:{bg:`#fef2f2`,text:`#b91c1c`,border:`#ef4444`}},Mu=6e3,Nu=class{constructor(e={}){this.snackbars=new Map,this.queue=[],this.maxVisible=e.maxVisible||5,this.defaultPosition=e.defaultPosition||q.bottomLeft,this.defaultDuration=e.defaultDuration||6e3,this.nextId=1,this.containers=new Map}show(e={}){let t=this.createSnackbar(e);return this.shouldQueue(t)?(this.queue.push(t),t.id):(this.displaySnackbar(t),t.id)}hide(e){this.snackbars.get(e)&&this.removeSnackbar(e)}hideAll(){Array.from(this.snackbars.keys()).forEach(e=>{this.hide(e)}),this.queue=[]}createSnackbar(e){return{id:`snackbar-${this.nextId++}`,timestamp:Date.now(),message:e.message||``,title:e.title||``,severity:e.severity||J.info,variant:e.variant||Y.filled,position:e.position||this.defaultPosition,duration:e.duration===void 0?this.defaultDuration:e.duration,persistent:e.duration===-1,showCloseButton:e.showCloseButton!==!1,showIcon:e.showIcon!==!1,showProgress:e.showProgress!==!1,closable:e.closable!==!1,actions:e.actions||[],onClose:e.onClose,onAction:e.onAction,autoHideDuration:e.autoHideDuration||this.defaultDuration,...e}}shouldQueue(e){return this.getVisibleCount(e.position)>=this.maxVisible}getVisibleCount(e){return Array.from(this.snackbars.values()).filter(t=>t.position===e).length}displaySnackbar(e){this.snackbars.set(e.id,e),!e.persistent&&e.duration>0&&(e.timer=setTimeout(()=>{this.removeSnackbar(e.id)},e.duration)),this.processQueue()}removeSnackbar(e){let t=this.snackbars.get(e);t&&(t.timer&&clearTimeout(t.timer),typeof t.onClose==`function`&&t.onClose(t),this.snackbars.delete(e),this.processQueue())}processQueue(){if(this.queue.length!==0)for(let e=0;e<this.queue.length;e++){let t=this.queue[e];if(!this.shouldQueue(t)){this.queue.splice(e,1),this.displaySnackbar(t);break}}}pauseTimer(e){let t=this.snackbars.get(e);t&&t.timer&&(clearTimeout(t.timer),t.pausedAt=Date.now(),t.timer=null)}resumeTimer(e){let t=this.snackbars.get(e);if(t&&t.pausedAt&&!t.persistent){let n=t.pausedAt-t.timestamp,r=Math.max(0,t.duration-n);r>0?t.timer=setTimeout(()=>{this.removeSnackbar(e)},r):this.removeSnackbar(e),t.pausedAt=null}}getSnackbarsByPosition(e){return Array.from(this.snackbars.values()).filter(t=>t.position===e).sort((e,t)=>e.timestamp-t.timestamp)}getSnackbar(e){return this.snackbars.get(e)}},Pu=null;function X(){return Pu||=new Nu,Pu}function Fu(e,t={}){return X().show({message:e,severity:J.success,...t})}function Iu(e,t={}){return X().show({message:e,severity:J.warning,...t})}function Lu(e,t={}){return X().show({message:e,severity:J.error,...t})}function Ru(e,t={}){return X().show({message:e,severity:J.info,...t})}function zu(e,t={}){return X().show({message:e,...t})}function Bu(e){X().hide(e)}function Vu(){X().hideAll()}function Hu(e){return Au[e]||Au.info}function Uu(e){return ju[e]||ju.info}function Wu(e){return Object.values(q).includes(e)}function Gu(e){return Object.values(J).includes(e)}function Ku(e={}){let{position:t=q.bottomLeft}=e,n={[q.topLeft]:`top-4 left-4 items-start`,[q.topCenter]:`top-4 left-1/2 transform -translate-x-1/2 items-center`,[q.topRight]:`top-4 right-4 items-end`,[q.bottomLeft]:`bottom-4 left-4 items-start flex-col-reverse`,[q.bottomCenter]:`bottom-4 left-1/2 transform -translate-x-1/2 items-center flex-col-reverse`,[q.bottomRight]:`bottom-4 right-4 items-end flex-col-reverse`};return`fixed z-50 pointer-events-none flex flex-col gap-2 ${n[t]||n[q.bottomLeft]}`}function qu(e={}){let{severity:t=J.info,variant:n=Y.filled,className:r=``}=e,i=``;return i=n===Y.filled?{[J.success]:`bg-success-500 text-white border border-success-500`,[J.info]:`bg-primary-500 text-white border border-primary-500`,[J.warning]:`bg-warning-500 text-white border border-warning-500`,[J.error]:`bg-error-500 text-white border border-error-500`}[t]||`bg-neutral-800 text-white border border-neutral-700`:n===Y.outlined&&{[J.success]:`bg-white dark:bg-neutral-800 border-success-500 text-success-600 dark:text-success-400 border-l-4`,[J.info]:`bg-white dark:bg-neutral-800 border-primary-500 text-primary-600 dark:text-primary-400 border-l-4`,[J.warning]:`bg-white dark:bg-neutral-800 border-warning-500 text-warning-600 dark:text-warning-400 border-l-4`,[J.error]:`bg-white dark:bg-neutral-800 border-error-500 text-error-600 dark:text-error-400 border-l-4`}[t]||`bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 text-neutral-900 dark:text-neutral-100`,`pointer-events-auto max-w-sm w-full rounded-lg shadow-lg p-4 transition-all duration-300 ease-in-out ${i} ${r}`.trim()}function Ju(e,t=`enter`){return{[q.topLeft]:t===`enter`?`animate-slide-down`:`animate-slide-up`,[q.topCenter]:t===`enter`?`animate-slide-down`:`animate-slide-up`,[q.topRight]:t===`enter`?`animate-slide-down`:`animate-slide-up`,[q.bottomLeft]:t===`enter`?`animate-slide-up`:`animate-slide-down`,[q.bottomCenter]:t===`enter`?`animate-slide-up`:`animate-slide-down`,[q.bottomRight]:t===`enter`?`animate-slide-up`:`animate-slide-down`}[e]||`animate-fade`}function Yu(e,t){return t<=0?0:Math.max(0,Math.min(100,100-e/t*100))}function Xu(e={}){let t={...e};return Wu(t.position)||(t.position=q.bottomLeft),Gu(t.severity)||(t.severity=J.info),Object.values(Y).includes(t.variant)||(t.variant=Y.filled),(typeof t.duration!=`number`||t.duration<0)&&(t.duration=Mu),t.closable=t.closable!==!1,t.showIcon=t.showIcon!==!1,t.showProgress=!!t.showProgress,t.onClose&&typeof t.onClose!=`function`&&delete t.onClose,t.onAction&&typeof t.onAction!=`function`&&delete t.onAction,t}function Zu(e={}){let{severity:t=J.info,message:n=``,title:r=``}=e;return{role:{[J.error]:`alert`,[J.warning]:`alert`,[J.success]:`status`,[J.info]:`status`}[t]||`status`,"aria-live":t===J.error?`assertive`:`polite`,"aria-atomic":`true`,"aria-label":r||n||`${t} notification`}}function Qu(e,t={}){return Lu(e.message||`An unexpected error occurred`,{title:t.title||`Error`,duration:t.duration||8e3,showIcon:!0,...t})}function $u(e){return e<0?`Persistent`:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function ed(e,t=200){return typeof e==`string`?e.length<=t?e:e.substring(0,t-3)+`...`:``}function td(e,t=500){let n,r=new Map;return function(...i){let[a]=i,o=Date.now();r.has(a)&&o-r.get(a)<t||(r.set(a,o),clearTimeout(n),n=setTimeout(()=>{e.apply(this,i)},100))}}var nd=r({getAnimationType:()=>pd,getSafeStatus:()=>ld,getStatusClasses:()=>ud,getStatusColor:()=>fd,getStatusText:()=>dd,isValidSize:()=>cd,isValidStatus:()=>sd,statusConfig:()=>od,validAnimationTypes:()=>ad,validSizes:()=>id,validStatuses:()=>rd}),rd=[`default`,`success`,`error`,`warning`,`info`,`pending`,`processing`,`cancelled`],id=[`sm`,`md`,`lg`],ad=[`auto`,`pulse`,`spin`,`bounce`,`blink`,`shake`,`breathe`,`ripple`,`glow`],od={default:{text:`默认`,color:`var(--wc-text-tertiary)`},success:{text:`成功`,color:`var(--wc-text-success)`},error:{text:`失败`,color:`var(--wc-text-error)`},warning:{text:`警告`,color:`var(--wc-text-warning)`},info:{text:`信息`,color:`var(--wc-text-info)`},pending:{text:`等待中`,color:`var(--wc-text-brand)`},processing:{text:`进行中`,color:`var(--wc-text-info)`},cancelled:{text:`已取消`,color:`var(--wc-text-disabled)`}};function sd(e){return rd.includes(e)}function cd(e){return id.includes(e)}function ld(e){return sd(e)?e:`default`}function ud({status:e,size:t,showText:n,animated:r,animationType:i=`auto`,className:a}){let o=ld(e),s=[`wc-status`,`wc-status--${o}`,`wc-status--${t}`];if(n&&s.push(`wc-status--with-text`),r){let e=pd(o,i);s.push(`wc-status--animated`,`wc-status--${e}`)}return a&&s.push(a),s.filter(Boolean).join(` `)}function dd(e){return od[e]?.text||od.default.text}function fd(e){return(od[e]||od.default).color}function pd(e,t=`auto`){return t!==`auto`&&ad.includes(t)?t:{processing:`spin`,pending:`pulse`,success:`bounce`,error:`shake`,warning:`blink`,info:`ripple`,cancelled:`breathe`,default:`glow`}[e]||`pulse`}var md=r({KEY_CODES:()=>vd,SWITCH_COLORS:()=>gd,SWITCH_SIZES:()=>hd,SWITCH_VARIANTS:()=>_d,createFormField:()=>Fd,debounceChange:()=>Ld,default:()=>Ud,extractFormData:()=>Id,formatValue:()=>zd,getAccessibilityDescription:()=>Md,getAriaAttributes:()=>jd,getSwitchClasses:()=>Ed,getSwitchState:()=>xd,getThumbClasses:()=>Od,getThumbPosition:()=>Nd,getTrackBackground:()=>Pd,getTrackClasses:()=>Dd,handleBlur:()=>Td,handleClick:()=>Sd,handleFocus:()=>wd,handleKeyDown:()=>Cd,handleStateChange:()=>bd,isInteractive:()=>Hd,parseValue:()=>Bd,shouldShowLoading:()=>Vd,throttleChange:()=>Rd,toggleState:()=>yd,validateProps:()=>kd,validateValue:()=>Ad}),hd={sm:`sm`,md:`md`,lg:`lg`},gd={primary:`primary`,secondary:`secondary`,success:`success`,warning:`warning`,error:`error`},_d={default:`default`,rounded:`rounded`,square:`square`,flat:`flat`,outline:`outline`,ios:`ios`,material:`material`},vd={SPACE:32,ENTER:13};function yd(e,t=!1){return t?e:!e}function bd(e,t,n={}){let{disabled:r=!1,loading:i=!1}=n;return r||i?!1:typeof t==`function`?(t(e),!0):!1}function xd(e={}){let{checked:t=!1,defaultChecked:n=!1,controlled:r=!1}=e;return{isControlled:r||t!==void 0,value:r?t:n,defaultValue:n}}function Sd(e,t,n,r={}){let{disabled:i=!1,loading:a=!1,preventDefault:o=!0}=r;if(o&&e.preventDefault(),i||a)return t;let s=!t;return bd(s,n,r)?s:t}function Cd(e,t,n,r={}){let{disabled:i=!1,loading:a=!1}=r,o=e.keyCode||e.which;if(i||a)return t;if(o===vd.SPACE||o===vd.ENTER){e.preventDefault();let i=!t;if(bd(i,n,r))return i}return t}function wd(e,t,n={}){let{disabled:r=!1}=n;r||typeof t==`function`&&t(e)}function Td(e,t,n={}){let{disabled:r=!1}=n;r||typeof t==`function`&&t(e)}function Ed(e={}){let{size:t=`md`,color:n=`primary`,variant:r=`default`,disabled:i=!1,loading:a=!1,error:o=!1,fullWidth:s=!1}=e,c=[`wc-switch`];return c.push(`wc-switch--${t}`),c.push(`wc-switch--${n}`),r!==`default`&&c.push(`wc-switch--${r}`),i&&c.push(`wc-switch--disabled`),a&&c.push(`wc-switch--loading`),o&&c.push(`wc-switch--error`),s&&c.push(`wc-switch--full-width`),c.join(` `)}function Dd(e={}){let{variant:t=`default`}=e,n=[`wc-switch__track`];return t!==`default`&&n.push(`wc-switch__track--${t}`),n.join(` `)}function Od(e={}){let{variant:t=`default`,loading:n=!1}=e,r=[`wc-switch__thumb`];return t!==`default`&&r.push(`wc-switch__thumb--${t}`),n&&r.push(`wc-switch__thumb--loading`),r.join(` `)}function kd(e={}){let{size:t=`md`,color:n=`primary`,variant:r=`default`,checked:i,defaultChecked:a}=e,o=[],s=[];return Object.values(hd).includes(t)||o.push(`Invalid size: ${t}. Must be one of: ${Object.values(hd).join(`, `)}`),Object.values(gd).includes(n)||o.push(`Invalid color: ${n}. Must be one of: ${Object.values(gd).join(`, `)}`),Object.values(_d).includes(r)||o.push(`Invalid variant: ${r}. Must be one of: ${Object.values(_d).join(`, `)}`),i!==void 0&&a!==void 0&&s.push(`Both checked and defaultChecked props provided. Component will be controlled.`),{isValid:o.length===0,errors:o,warnings:s}}function Ad(e,t={}){let{required:n=!1}=t,r=[];return n&&!e&&r.push(`This field is required`),e!==void 0&&typeof e!=`boolean`&&r.push(`Value must be a boolean`),{isValid:r.length===0,errors:r}}function jd(e={}){let{checked:t=!1,disabled:n=!1,loading:r=!1,labelledBy:i,describedBy:a,label:o}=e;return{role:`switch`,"aria-checked":t,"aria-disabled":n||r||void 0,"aria-labelledby":i,"aria-describedby":a,"aria-label":o&&!i?o:void 0,tabIndex:n?-1:0}}function Md(e={}){let{checked:t=!1,disabled:n=!1,loading:r=!1,label:i=`Switch`}=e,a=`${i} switch`;return n?a+=`, disabled`:r&&(a+=`, loading`),a+=t?`, on`:`, off`,a}function Nd(e,t={}){let{trackWidth:n=44,thumbSize:r=20,thumbOffset:i=2}=t,a=n-r-i*2;return{transform:e?`translateX(${a}px)`:`translateX(0)`,transition:`transform 0.2s ease`}}function Pd(e,t={}){let{checkedColor:n=`var(--wc-primary-500)`,uncheckedColor:r=`var(--wc-neutral-300)`}=t;return e?n:r}function Fd(e={}){let{name:t,value:n=!1,required:r=!1,disabled:i=!1}=e;return{name:t,value:n,type:`checkbox`,checked:n,required:r,disabled:i,validity:{valid:!r||n,valueMissing:r&&!n}}}function Id(e={}){let{name:t,value:n}=e;return t?{[t]:n}:{}}function Ld(e,t=100){let n;return function(r,...i){clearTimeout(n),n=setTimeout(()=>{e(r,...i)},t)}}function Rd(e,t=100){let n=0;return function(r,...i){let a=Date.now();a-n>=t&&(e(r,...i),n=a)}}function zd(e,t={}){let{trueLabel:n=`On`,falseLabel:r=`Off`,formatter:i=null}=t;return i&&typeof i==`function`?i(e):e?n:r}function Bd(e){if(typeof e==`boolean`)return e;if(typeof e==`string`){let t=e.toLowerCase();return t===`true`||t===`on`||t===`1`}return typeof e==`number`?e!==0:!!e}function Vd(e={}){let{loading:t=!1,disabled:n=!1}=e;return t&&!n}function Hd(e={}){let{disabled:t=!1,loading:n=!1}=e;return!t&&!n}var Ud={SWITCH_SIZES:hd,SWITCH_COLORS:gd,SWITCH_VARIANTS:_d,KEY_CODES:vd,toggleState:yd,handleStateChange:bd,getSwitchState:xd,handleClick:Sd,handleKeyDown:Cd,handleFocus:wd,handleBlur:Td,getSwitchClasses:Ed,getTrackClasses:Dd,getThumbClasses:Od,validateProps:kd,validateValue:Ad,getAriaAttributes:jd,getAccessibilityDescription:Md,getThumbPosition:Nd,getTrackBackground:Pd,createFormField:Fd,extractFormData:Id,debounceChange:Ld,throttleChange:Rd,formatValue:zd,parseValue:Bd,shouldShowLoading:Vd,isInteractive:Hd},Wd=r({CELL_ALIGNMENTS:()=>qd,CELL_VARIANTS:()=>Kd,PADDING_VARIANTS:()=>Jd,SORT_DIRECTIONS:()=>Z,TABLE_SIZES:()=>Gd,applyDateFilter:()=>tf,applyFilterType:()=>$d,applyNumberFilter:()=>ef,default:()=>vf,filterData:()=>Qd,formatCellValue:()=>gf,getNestedValue:()=>mf,getNextSortDirection:()=>Zd,getPageInfo:()=>cf,getTableCellClasses:()=>pf,getTableClasses:()=>uf,getTableContainerClasses:()=>lf,getTableHeadClasses:()=>df,getTableRowClasses:()=>ff,handleRowSelection:()=>nf,handleSelectAll:()=>rf,isAllSelected:()=>af,isSomeSelected:()=>of,paginateData:()=>sf,setNestedValue:()=>hf,sortData:()=>Yd,toggleSortDirection:()=>Xd,validateTableProps:()=>_f}),Gd={sm:`sm`,md:`md`,lg:`lg`},Kd={head:`head`,body:`body`,footer:`footer`},qd={inherit:`inherit`,left:`left`,center:`center`,right:`right`,justify:`justify`},Z={asc:`asc`,desc:`desc`,none:!1},Jd={normal:`normal`,checkbox:`checkbox`,none:`none`,dense:`dense`};function Yd(e,t,n,r=null){if(!e||!Array.isArray(e)||!t)return e;let i=[...e];return i.sort((e,i)=>{let a=mf(e,t),o=mf(i,t);if(r&&typeof r==`function`){let t=r(a,o,e,i);return n===Z.desc?-t:t}if(a==null&&o==null)return 0;if(a==null)return 1;if(o==null)return-1;typeof a!=`number`&&typeof o!=`number`&&(a=String(a).toLowerCase(),o=String(o).toLowerCase());let s=0;return a<o?s=-1:a>o&&(s=1),n===Z.desc?-s:s}),i}function Xd(e){switch(e){case Z.asc:return Z.desc;case Z.desc:return Z.none;default:return Z.asc}}function Zd(e,t=!0){return t?Xd(e):e===Z.asc?Z.desc:Z.asc}function Qd(e,t={}){return!e||!Array.isArray(e)||!t?e:e.filter(e=>Object.entries(t).every(([t,n])=>{if(!n||typeof n==`string`&&n.trim()===``)return!0;let r=mf(e,t);return typeof n==`function`?n(r,e):typeof n==`object`&&n.type?$d(r,n):String(r||``).toLowerCase().includes(String(n).toLowerCase())}))}function $d(e,t){let{type:n,value:r,operator:i=`equals`}=t;switch(n){case`number`:return ef(Number(e),Number(r),i);case`date`:return tf(new Date(e),new Date(r),i);case`boolean`:return!!e==!!r;case`array`:return Array.isArray(r)?r.includes(e):e===r;default:return String(e||``).toLowerCase().includes(String(r||``).toLowerCase())}}function ef(e,t,n){if(isNaN(e)||isNaN(t))return!1;switch(n){case`equals`:return e===t;case`not_equals`:return e!==t;case`greater_than`:return e>t;case`greater_than_or_equal`:return e>=t;case`less_than`:return e<t;case`less_than_or_equal`:return e<=t;default:return e===t}}function tf(e,t,n){if(!(e instanceof Date)||!(t instanceof Date)||isNaN(e.getTime())||isNaN(t.getTime()))return!1;let r=e.getTime(),i=t.getTime();switch(n){case`equals`:return r===i;case`not_equals`:return r!==i;case`after`:return r>i;case`after_or_equal`:return r>=i;case`before`:return r<i;case`before_or_equal`:return r<=i;default:return r===i}}function nf(e=[],t,n=!0){return n?e.includes(t)?e.filter(e=>e!==t):[...e,t]:e.includes(t)?[]:[t]}function rf(e,t=[],n=(e,t)=>t){if(!e||!Array.isArray(e))return t;let r=e.map(n);return r.every(e=>t.includes(e))?[]:r}function af(e,t=[],n=(e,t)=>t){return!e||!Array.isArray(e)||e.length===0?!1:e.map(n).every(e=>t.includes(e))}function of(e=[]){return e.length>0}function sf(e,t=0,n=10){if(!e||!Array.isArray(e))return{data:[],totalItems:0,totalPages:0,currentPage:t,pageSize:n,hasNextPage:!1,hasPreviousPage:!1};let r=e.length,i=Math.ceil(r/n),a=t*n,o=a+n;return{data:e.slice(a,o),totalItems:r,totalPages:i,currentPage:t,pageSize:n,hasNextPage:t<i-1,hasPreviousPage:t>0,startIndex:a,endIndex:Math.min(o,r)}}function cf(e,t,n){let r=Math.ceil(e/n);return{totalPages:r,startItem:t*n+1,endItem:Math.min((t+1)*n,e),totalItems:e,hasNextPage:t<r-1,hasPreviousPage:t>0}}function lf(e={}){let{stickyHeader:t=!1,noBorder:n=!1,rounded:r=!1,flat:i=!1}=e,a=[`wc-table-container`];return t&&a.push(`wc-table-container--sticky`),n&&a.push(`wc-table-container--no-border`),r&&a.push(`wc-table-container--rounded`),i&&a.push(`wc-table-container--flat`),a.join(` `)}function uf(e={}){let{size:t=`md`,hover:n=!1,striped:r=!1,dense:i=!1,loading:a=!1,fixed:o=!1,compact:s=!1,spacious:c=!1,noWrap:l=!1,breakAll:u=!1,breakWord:d=!1}=e,f=[`wc-table`];return f.push(`wc-table--${t}`),n&&f.push(`wc-table--hover`),r&&f.push(`wc-table--striped`),i&&f.push(`wc-table--dense`),a&&f.push(`wc-table--loading`),o&&f.push(`wc-table--fixed`),s&&f.push(`wc-table--compact`),c&&f.push(`wc-table--spacious`),l&&f.push(`wc-table--no-wrap`),u&&f.push(`wc-table--break-all`),d&&f.push(`wc-table--break-word`),f.join(` `)}function df(e={}){let{sticky:t=!1}=e,n=[`wc-table-head`];return t&&n.push(`wc-table-head--sticky`),n.join(` `)}function ff(e={}){let{hover:t=!1,selected:n=!1,clickable:r=!1}=e,i=[`wc-table-row`];return(t||r)&&i.push(`wc-table-row--hover`),n&&i.push(`wc-table-row--selected`),r&&i.push(`wc-table-row--clickable`),i.join(` `)}function pf(e={}){let{variant:t=`body`,size:n=`medium`,align:r=`inherit`,valign:i=`inherit`,padding:a=`normal`,sortDirection:o=!1,numeric:s=!1,stickyLeft:c=!1,stickyRight:l=!1,selectable:u=!1}=e,d=[`wc-table-cell`];return d.push(`wc-table-cell--${t}`),d.push(`wc-table-cell--${n}`),r!==`inherit`&&d.push(`wc-table-cell--align-${r}`),i!==`inherit`&&d.push(`wc-table-cell--valign-${i}`),d.push(`wc-table-cell--padding-${a}`),o&&(d.push(`wc-table-cell--sortable`),o!==!0&&d.push(`wc-table-cell--sort-${o}`)),s&&d.push(`wc-table-cell--numeric`),c&&d.push(`wc-table-cell--sticky-left`),l&&d.push(`wc-table-cell--sticky-right`),u&&d.push(`wc-table-cell--selectable`),d.join(` `)}function mf(e,t){if(!(!e||!t))return t.split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)}function hf(e,t,n){if(!e||!t)return e;let r=t.split(`.`),i=r.pop(),a=r.reduce((e,t)=>((!e[t]||typeof e[t]!=`object`)&&(e[t]={}),e[t]),e);return a[i]=n,e}function gf(e,t={}){let{type:n=`string`,format:r,locale:i=`en-US`,currency:a=`USD`,decimals:o,dateFormat:s=`short`}=t;if(e==null)return``;switch(n){case`number`:return new Intl.NumberFormat(i,{minimumFractionDigits:o,maximumFractionDigits:o}).format(Number(e));case`currency`:return new Intl.NumberFormat(i,{style:`currency`,currency:a}).format(Number(e));case`percentage`:return new Intl.NumberFormat(i,{style:`percent`,minimumFractionDigits:o||1,maximumFractionDigits:o||1}).format(Number(e)/100);case`date`:let t=new Date(e);return isNaN(t.getTime())?String(e):r?t.toLocaleDateString(i,r):t.toLocaleDateString(i,{dateStyle:s});case`boolean`:return e?`Yes`:`No`;default:return String(e)}}function _f(e={}){let t=[];return e.size&&!Object.values(Gd).includes(e.size)&&t.push(`Invalid size: ${e.size}`),e.data&&!Array.isArray(e.data)&&t.push(`Data must be an array`),{isValid:t.length===0,errors:t,warnings:[]}}var vf={TABLE_SIZES:Gd,CELL_VARIANTS:Kd,CELL_ALIGNMENTS:qd,SORT_DIRECTIONS:Z,PADDING_VARIANTS:Jd,sortData:Yd,toggleSortDirection:Xd,getNextSortDirection:Zd,filterData:Qd,applyFilterType:$d,applyNumberFilter:ef,applyDateFilter:tf,handleRowSelection:nf,handleSelectAll:rf,isAllSelected:af,isSomeSelected:of,paginateData:sf,getPageInfo:cf,getTableContainerClasses:lf,getTableClasses:uf,getTableHeadClasses:df,getTableRowClasses:ff,getTableCellClasses:pf,getNestedValue:mf,setNestedValue:hf,formatCellValue:gf,validateTableProps:_f},yf=r({KEY_CODES:()=>$,TAB_ORIENTATIONS:()=>Q,TAB_SIZES:()=>xf,TAB_VARIANTS:()=>bf,TabManager:()=>Sf,animateTabContent:()=>Nf,createTabIdGenerator:()=>Vf,createTabState:()=>Mf,debounceTabChange:()=>zf,default:()=>Uf,findFirstEnabledTab:()=>Ef,findLastEnabledTab:()=>Df,findNextEnabledTab:()=>wf,findPreviousEnabledTab:()=>Tf,getTabAriaAttributes:()=>Ff,getTabClasses:()=>Af,getTabContentClasses:()=>jf,getTabPanelAriaAttributes:()=>If,getTabsAriaAttributes:()=>Pf,getTabsClasses:()=>kf,getTabsWrapperClasses:()=>Of,handleKeyboardNavigation:()=>Cf,scrollTabIntoView:()=>Hf,throttleTabChange:()=>Bf,validateTabProps:()=>Rf,validateTabs:()=>Lf}),bf={default:`default`,pills:`pills`,underline:`underline`,bordered:`bordered`,segmented:`segmented`,minimal:`minimal`,filled:`filled`},xf={sm:`sm`,md:`md`,lg:`lg`},Q={horizontal:`horizontal`,vertical:`vertical`},$={ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,HOME:36,END:35,ENTER:13,SPACE:32},Sf=class{constructor(e={}){this.tabs=[],this.activeIndex=e.activeIndex||0,this.orientation=e.orientation||Q.horizontal,this.variant=e.variant||bf.default,this.size=e.size||xf.md,this.allowKeyboardNavigation=e.allowKeyboardNavigation!==!1,this.lazy=e.lazy||!1,this.keepAlive=e.keepAlive||!1,this.onChange=e.onChange,this.onTabLoad=e.onTabLoad,this.loadedTabs=new Set}addTab(e){let t=this.tabs.length;return this.tabs.push({id:e.id||`tab-${t}`,title:e.title,content:e.content,disabled:e.disabled||!1,closable:e.closable||!1,icon:e.icon,badge:e.badge,loading:e.loading||!1,...e}),t}removeTab(e){if(e<0||e>=this.tabs.length)return!1;let t=e===this.activeIndex;return this.tabs.splice(e,1),this.loadedTabs.delete(e),t&&this.tabs.length>0?(this.activeIndex=Math.min(this.activeIndex,this.tabs.length-1),this.notifyChange(this.activeIndex)):e<this.activeIndex&&this.activeIndex--,!0}setActiveTab(e){return e<0||e>=this.tabs.length||this.tabs[e].disabled?!1:(this.activeIndex=e,this.markTabAsLoaded(e),this.notifyChange(e),!0)}getActiveTab(){return this.tabs[this.activeIndex]||null}getTab(e){return this.tabs[e]||null}markTabAsLoaded(e){this.loadedTabs.add(e),this.onTabLoad&&typeof this.onTabLoad==`function`&&this.onTabLoad(e,this.tabs[e])}isTabLoaded(e){return!this.lazy||this.loadedTabs.has(e)}notifyChange(e){this.onChange&&typeof this.onChange==`function`&&this.onChange(e,this.tabs[e])}updateTab(e,t){return e<0||e>=this.tabs.length?!1:(Object.assign(this.tabs[e],t),!0)}};function Cf(e,t,n,r=Q.horizontal){if(!n||n.length===0)return t;let i=e.keyCode||e.which,a=r===Q.horizontal,o=t;switch(i){case $.ARROW_LEFT:a&&(o=Tf(t,n),e.preventDefault());break;case $.ARROW_RIGHT:a&&(o=wf(t,n),e.preventDefault());break;case $.ARROW_UP:a||(o=Tf(t,n),e.preventDefault());break;case $.ARROW_DOWN:a||(o=wf(t,n),e.preventDefault());break;case $.HOME:o=Ef(n),e.preventDefault();break;case $.END:o=Df(n),e.preventDefault();break}return o}function wf(e,t){for(let n=1;n<t.length;n++){let r=(e+n)%t.length;if(!t[r].disabled)return r}return e}function Tf(e,t){for(let n=1;n<t.length;n++){let r=(e-n+t.length)%t.length;if(!t[r].disabled)return r}return e}function Ef(e){for(let t=0;t<e.length;t++)if(!e[t].disabled)return t;return 0}function Df(e){for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return e.length-1}function Of(e={}){let{orientation:t=Q.horizontal,animated:n=!1}=e,r=[`wc-tabs-wrapper`];return t===Q.vertical&&r.push(`wc-tabs-wrapper--vertical`),n&&r.push(`wc-tabs-wrapper--animated`),r.join(` `)}function kf(e={}){let{variant:t=bf.default,size:n=xf.md,scrollable:r=!1,rounded:i=!1,square:a=!1,animated:o=!1}=e,s=[`wc-tabs`];return s.push(`wc-tabs--${t}`),s.push(`wc-tabs--${n}`),r&&s.push(`wc-tabs--scrollable`),i&&s.push(`wc-tabs--rounded`),a&&s.push(`wc-tabs--square`),o&&s.push(`wc-tabs--animated`),s.join(` `)}function Af(e={}){let{active:t=!1,disabled:n=!1,loading:r=!1,closable:i=!1}=e,a=[`wc-tab`];return t&&a.push(`wc-tab--active`),n&&a.push(`wc-tab--disabled`),r&&a.push(`wc-tab--loading`),i&&a.push(`wc-tab--closable`),a.join(` `)}function jf(e={}){let{noPadding:t=!1,animated:n=!1}=e,r=[`wc-tab-content`];return t&&r.push(`wc-tab-content--no-padding`),n&&r.push(`wc-tab-content--animated`),r.join(` `)}function Mf(e={}){let{defaultActiveIndex:t=0,controlled:n=!1,onChange:r}=e,i=t,a=[];return{get activeIndex(){return i},setActiveIndex(e){n||(i=e,this.notifyListeners(e)),r&&typeof r==`function`&&r(e)},addListener(e){a.push(e)},removeListener(e){a=a.filter(t=>t!==e)},notifyListeners(e){a.forEach(t=>{typeof t==`function`&&t(e)})}}}function Nf(e,t={}){let{duration:n=300,easing:r=`ease-out`,direction:i=`fade`}=t;if(!e||typeof e.animate!=`function`)return Promise.resolve();let a=[];switch(i){case`fade`:a=[{opacity:0,transform:`translateY(8px)`},{opacity:1,transform:`translateY(0)`}];break;case`slide-left`:a=[{opacity:0,transform:`translateX(20px)`},{opacity:1,transform:`translateX(0)`}];break;case`slide-right`:a=[{opacity:0,transform:`translateX(-20px)`},{opacity:1,transform:`translateX(0)`}];break;default:a=[{opacity:0},{opacity:1}]}return e.animate(a,{duration:n,easing:r,fill:`both`}).finished}function Pf(e={}){let{orientation:t=Q.horizontal,label:n=`Tabs`}=e;return{role:`tablist`,"aria-label":n,"aria-orientation":t}}function Ff(e={}){let{id:t,panelId:n,active:r=!1,disabled:i=!1,index:a}=e;return{role:`tab`,id:t||`tab-${a}`,"aria-controls":n||`panel-${a}`,"aria-selected":r,"aria-disabled":i||void 0,tabIndex:r?0:-1}}function If(e={}){let{id:t,tabId:n,active:r=!1,index:i}=e;return{role:`tabpanel`,id:t||`panel-${i}`,"aria-labelledby":n||`tab-${i}`,hidden:!r||void 0,tabIndex:r?0:-1}}function Lf(e){let t=[],n=[];return Array.isArray(e)?(e.length===0&&n.push(`No tabs provided`),e.forEach((n,r)=>{n.title||t.push(`Tab at index ${r} is missing a title`),n.id&&e.filter(e=>e.id===n.id).length>1&&t.push(`Duplicate tab ID: ${n.id}`)}),{isValid:t.length===0,errors:t,warnings:n}):(t.push(`Tabs must be an array`),{isValid:!1,errors:t,warnings:n})}function Rf(e={}){let t=[];return e.variant&&!Object.values(bf).includes(e.variant)&&t.push(`Invalid variant: ${e.variant}`),e.size&&!Object.values(xf).includes(e.size)&&t.push(`Invalid size: ${e.size}`),e.orientation&&!Object.values(Q).includes(e.orientation)&&t.push(`Invalid orientation: ${e.orientation}`),e.activeIndex!==void 0&&e.tabs&&(e.activeIndex<0||e.activeIndex>=e.tabs.length)&&t.push(`Active index is out of bounds`),{isValid:t.length===0,errors:t,warnings:[]}}function zf(e,t=100){let n;return function(r,i,...a){clearTimeout(n),n=setTimeout(()=>{e(r,i,...a)},t)}}function Bf(e,t=100){let n=0;return function(r,i,...a){let o=Date.now();o-n>=t&&(e(r,i,...a),n=o)}}function Vf(e=`tab`){let t=0;return function(){return`${e}-${++t}`}}function Hf(e,t,n={}){if(!e||!t)return;let{behavior:r=`smooth`,block:i=`nearest`,inline:a=`center`}=n;e.scrollIntoView({behavior:r,block:i,inline:a})}var Uf={TAB_VARIANTS:bf,TAB_SIZES:xf,TAB_ORIENTATIONS:Q,KEY_CODES:$,TabManager:Sf,handleKeyboardNavigation:Cf,findNextEnabledTab:wf,findPreviousEnabledTab:Tf,findFirstEnabledTab:Ef,findLastEnabledTab:Df,getTabsWrapperClasses:Of,getTabsClasses:kf,getTabClasses:Af,getTabContentClasses:jf,createTabState:Mf,animateTabContent:Nf,getTabsAriaAttributes:Pf,getTabAriaAttributes:Ff,getTabPanelAriaAttributes:If,validateTabs:Lf,validateTabProps:Rf,debounceTabChange:zf,throttleTabChange:Bf,createTabIdGenerator:Vf,scrollTabIntoView:Hf},Wf=r({focusInput:()=>np,formatInputValue:()=>Zf,generateInputId:()=>Yf,getTextFieldClasses:()=>Gf,getTextFieldContainerClasses:()=>Kf,getTextFieldInputClasses:()=>Jf,getTextFieldLabelClasses:()=>qf,handleInputBlur:()=>ep,handleInputChange:()=>Qf,handleInputFocus:()=>$f,handleKeyDown:()=>tp,validateInput:()=>Xf});function Gf({variant:e=`outlined`,size:t=`md`,error:n=!1,disabled:r=!1,focused:i=!1,hasValue:a=!1,fullWidth:o=!1,multiline:s=!1,floatingLabel:c=!1,className:l=``}={}){let u=[`wc-textfield`];return o&&u.push(`wc-textfield--full-width`),s&&u.push(`wc-textfield--multiline`),c&&u.push(`wc-textfield--floating-label`),l&&u.push(l),u.filter(Boolean).join(` `)}function Kf({variant:e=`outlined`,size:t=`md`,error:n=!1,disabled:r=!1,focused:i=!1,hasValue:a=!1}={}){let o=[`wc-textfield__container`,`wc-textfield__container--${e}`,`wc-textfield__container--${t}`];return n&&o.push(`wc-textfield__container--error`),r&&o.push(`wc-textfield__container--disabled`),i&&o.push(`wc-textfield__container--focused`),a&&o.push(`wc-textfield__container--has-value`),o.join(` `)}function qf({size:e=`md`,error:t=!1,focused:n=!1,active:r=!1}={}){let i=[`wc-textfield__label`,`wc-textfield__label--${e}`];return t&&i.push(`wc-textfield__label--error`),n&&i.push(`wc-textfield__label--focused`),r&&i.push(`wc-textfield__label--active`),i.join(` `)}function Jf({size:e=`md`,multiline:t=!1}={}){let n=[`wc-textfield__input`,`wc-textfield__input--${e}`];return t&&n.push(`wc-textfield__textarea`),n.join(` `)}function Yf(e=``,t=`textfield`){return`${t}-${e||Math.random().toString(36).substr(2,9)}`}function Xf(e,t={}){let{required:n=!1,minLength:r,maxLength:i,pattern:a,email:o=!1,url:s=!1,number:c=!1,custom:l}=t;if(n&&(!e||e.trim()===``))return{isValid:!1,error:`此字段为必填项`};if(!e||e.trim()===``)return{isValid:!0,error:``};if(r&&e.length<r)return{isValid:!1,error:`最少需要${r}个字符`};if(i&&e.length>i)return{isValid:!1,error:`最多允许${i}个字符`};if(a&&!new RegExp(a).test(e))return{isValid:!1,error:`格式不正确`};if(o&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return{isValid:!1,error:`请输入有效的邮箱地址`};if(s)try{new URL(e)}catch{return{isValid:!1,error:`请输入有效的URL地址`}}if(c&&isNaN(Number(e)))return{isValid:!1,error:`请输入有效的数字`};if(l&&typeof l==`function`){let t=l(e);if(t!==!0)return{isValid:!1,error:t||`验证失败`}}return{isValid:!0,error:``}}function Zf(e,t={}){let{type:n=`text`,uppercase:r=!1,lowercase:i=!1,trim:a=!0,removeSpaces:o=!1,phone:s=!1,currency:c=!1}=t;if(!e)return e;let l=String(e);if(a&&(l=l.trim()),o&&(l=l.replace(/\s/g,``)),r?l=l.toUpperCase():i&&(l=l.toLowerCase()),s&&(l=l.replace(/\D/g,``),l.length>3&&l.length<=7?l=l.replace(/(\d{3})(\d+)/,`$1-$2`):l.length>7&&(l=l.replace(/(\d{3})(\d{4})(\d+)/,`$1-$2-$3`))),c){let e=parseFloat(l.replace(/[^\d.-]/g,``));isNaN(e)||(l=e.toLocaleString(`zh-CN`,{style:`currency`,currency:`CNY`}))}return l}function Qf(e,t,n={}){let{target:r}=e,{value:i}=r,{formatOptions:a,validationRules:o,debounce:s=0}=n,c=i;a&&(c=Zf(i,a),c!==i&&(r.value=c));let l={isValid:!0,error:``};o&&(l=Xf(c,o));let u=()=>{t&&t({value:c,originalValue:i,event:e,validation:l})};s>0?(clearTimeout(Qf.debounceTimer),Qf.debounceTimer=setTimeout(u,s)):u()}function $f(e,t,n={}){t&&t(e,n)}function ep(e,t,n={}){t&&t(e,n)}function tp(e,t={}){let{key:n}=e,{onEnter:r,onEscape:i,onTab:a,onArrowUp:o,onArrowDown:s,custom:c={}}=t;switch(n){case`Enter`:r&&r(e);break;case`Escape`:i&&i(e);break;case`Tab`:a&&a(e);break;case`ArrowUp`:o&&o(e);break;case`ArrowDown`:s&&s(e);break;default:c[n]&&c[n](e)}}function np(e,t={}){let{selectAll:n=!1,cursorPosition:r}=t;e&&(e.focus(),n?e.select():typeof r==`number`&&e.setSelectionRange(r,r))}var rp=r({getToolbarClasses:()=>ip}),ip=(e,t,n=``)=>{let r=[`flex items-center w-full`];return e===`dense`?r.push(`min-h-12 py-2`):r.push(`min-h-16 py-3`),t||r.push(`px-4 sm:px-6 lg:px-8`),n&&r.push(n),r.join(` `)},ap=r({getPlacementClass:()=>lp,placementClasses:()=>op,validPlacements:()=>sp,validatePlacement:()=>cp}),op={top:`wc-tooltip--top`,bottom:`wc-tooltip--bottom`,left:`wc-tooltip--left`,right:`wc-tooltip--right`},sp=[`top`,`bottom`,`left`,`right`];function cp(e){return sp.includes(e)}function lp(e){return op[e]||op.top}var up=r({TypingAnimator:()=>dp}),dp=class{constructor(e,t={}){this.text=e,this.speed=t.speed||100,this.pause=t.pause||1500,this.loop=t.loop||!1,this.erase=t.erase||!1,this.index=0,this.direction=1,this.timer=null,this.onUpdate=t.onUpdate||(()=>{})}step(){this.direction===1?this.index<this.text.length?(this.index+=1,this.onUpdate(this.text.slice(0,this.index))):this.loop?this.erase?this.direction=-1:(this.stop(),setTimeout(()=>{this.index=0,this.onUpdate(``),this.start()},this.pause)):this.stop():this.index>0?(--this.index,this.onUpdate(this.text.slice(0,this.index))):this.direction=1}start(){this.stop(),this.timer=setInterval(()=>this.step(),this.speed)}stop(){this.timer&&=(clearInterval(this.timer),null)}reset(){this.stop(),this.index=0,this.direction=1,this.onUpdate(``)}updateText(e){this.text=e,this.reset(),this.start()}},fp=r({alignClassMap:()=>gp,buildTypographyClasses:()=>yp,colorClassMap:()=>hp,getComponent:()=>vp,lineHeightMap:()=>_p,variantClassMap:()=>mp,variantMap:()=>pp}),pp={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,caption:`span`,overline:`span`,button:`span`},mp={h1:`wc-typography--h1`,h2:`wc-typography--h2`,h3:`wc-typography--h3`,h4:`wc-typography--h4`,h5:`wc-typography--h5`,h6:`wc-typography--h6`,subtitle1:`wc-typography--subtitle1`,subtitle2:`wc-typography--subtitle2`,body1:`wc-typography--body1`,body2:`wc-typography--body2`,caption:`wc-typography--caption`,overline:`wc-typography--overline`,button:`wc-typography--button`},hp={inherit:`wc-typography--color-inherit`,primary:`wc-typography--color-primary`,secondary:`wc-typography--color-secondary`,success:`wc-typography--color-success`,warning:`wc-typography--color-warning`,error:`wc-typography--color-error`,textPrimary:`wc-typography--color-text-primary`,textSecondary:`wc-typography--color-text-secondary`,textDisabled:`wc-typography--color-text-disabled`},gp={left:`wc-typography--align-left`,center:`wc-typography--align-center`,right:`wc-typography--align-right`,justify:`wc-typography--align-justify`},_p={h1:`1.2`,h2:`1.2`,h3:`1.3`,h4:`1.3`,h5:`1.4`,h6:`1.4`,subtitle1:`1.5`,subtitle2:`1.5`,body1:`1.6`,body2:`1.6`,caption:`1.4`,overline:`1.4`,button:`1.4`};function vp(e,t){return t||pp[e]||`p`}function yp(e,t,n,r,i,a=``){return[`wc-typography`,mp[e],hp[t],n===`inherit`?null:gp[n],r?`wc-typography--gutter-bottom`:null,i?`wc-typography--no-wrap`:null,a].filter(Boolean).join(` `)}var bp=r({calculateSeekPosition:()=>Sp,formatTime:()=>xp,toggleFullscreen:()=>Cp});function xp(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function Sp(e,t){let n=e.currentTarget.getBoundingClientRect();return(e.clientX-n.left)/n.width*t}function Cp(e){e&&(document.fullscreenElement?document.exitFullscreen?.():e.requestFullscreen?.())}var wp=r({createCanvasUrl:()=>Dp,createWatermarkStyle:()=>Op,defaultProps:()=>Tp,resolveColor:()=>Ep}),Tp={content:``,cross:!1,debug:!1,fontSize:14,fontFamily:`sans-serif`,fontStyle:`normal`,fontVariant:``,fontWeight:400,fontColor:`var(--wc-neutral-500, rgba(128,128,128,.3))`,fullscreen:!1,globalRotate:0,lineHeight:14,height:64,width:200,image:void 0,imageHeight:void 0,imageWidth:void 0,imageOpacity:1,rotate:0,selectable:!0,textAlign:`center`,xGap:48,yGap:48,xOffset:0,yOffset:0,zIndex:10};function Ep(e){if(typeof e==`string`&&e.startsWith(`var(`)){let t=e.match(/--[^, )]+/);if(t)return getComputedStyle(document.documentElement).getPropertyValue(t[0]).trim()||e}return e}function Dp(e){let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=e.width,i=e.height;if(!e.image&&e.content){n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`;let t=e.content.split(/\n/),a=Math.max(...t.map(e=>n.measureText(e).width)),o=e.lineHeight*t.length;r=Math.max(r,Math.ceil(a)),i=Math.max(i,Math.ceil(o))}if(r+=e.xGap,i+=e.yGap,t.width=r,t.height=i,e.image)return new Promise(r=>{let i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{t.width=(e.imageWidth||i.width)+e.xGap,t.height=(e.imageHeight||i.height)+e.yGap,n.clearRect(0,0,t.width,t.height),n.globalAlpha=e.imageOpacity,n.translate(t.width/2,t.height/2),n.rotate(e.rotate*Math.PI/180);let a=e.imageWidth||i.width,o=e.imageHeight||i.height;n.drawImage(i,-a/2,-o/2,a,o),r(t.toDataURL())},i.src=e.image});let a=(e.content||``).split(/\n/);n.textAlign=e.textAlign||`center`,n.textBaseline=`middle`,n.fillStyle=e.fontColor.startsWith(`var(`)?Ep(e.fontColor):e.fontColor,n.font=`${e.fontStyle} ${e.fontVariant} ${e.fontWeight} ${e.fontSize}px ${e.fontFamily}`,n.translate(r/2,i/2),n.rotate(e.rotate*Math.PI/180);let o=-(a.length-1)*e.lineHeight/2;return a.forEach((t,r)=>{let i=o+r*e.lineHeight;n.fillText(t,0,i)}),Promise.resolve(t.toDataURL())}function Op(e,t){let n={position:e.fullscreen?`fixed`:`absolute`,top:0,left:0,width:e.fullscreen?`100vw`:`100%`,height:e.fullscreen?`100vh`:`100%`,pointerEvents:e.selectable?`none`:`auto`,backgroundImage:`url(${t})`,backgroundRepeat:`repeat`,backgroundPosition:`${e.xOffset}px ${e.yOffset}px`,zIndex:e.zIndex,transform:`rotate(${e.globalRotate}deg)`,mixBlendMode:`multiply`};return e.debug&&(n.outline=`1px dashed red`),e.cross||(n.overflow=`hidden`),n}Object.defineProperty(e,`AccordionUtils`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(e,`AlertUtils`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(e,`AppBarUtils`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(e,`AvatarUtils`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(e,`BadgeUtils`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(e,`BannerUtils`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(e,`BlockquoteUtils`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(e,`BoxUtils`,{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(e,`BreadcrumbUtils`,{enumerable:!0,get:function(){return at}}),Object.defineProperty(e,`ButtonUtils`,{enumerable:!0,get:function(){return mt}}),e.COMPOSITION_ALIGNS=M,e.COMPOSITION_GAPS=j,Object.defineProperty(e,`CardUtils`,{enumerable:!0,get:function(){return At}}),Object.defineProperty(e,`CheckboxUtils`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(e,`CircularProgressUtils`,{enumerable:!0,get:function(){return mn}}),Object.defineProperty(e,`ColorPickerUtils`,{enumerable:!0,get:function(){return En}}),Object.defineProperty(e,`ContainerUtils`,{enumerable:!0,get:function(){return zn}}),Object.defineProperty(e,`CopyUtils`,{enumerable:!0,get:function(){return Gn}}),Object.defineProperty(e,`DatePickerUtils`,{enumerable:!0,get:function(){return nr}}),Object.defineProperty(e,`DividerUtils`,{enumerable:!0,get:function(){return pr}}),Object.defineProperty(e,`FeatureUtils`,{enumerable:!0,get:function(){return _r}}),Object.defineProperty(e,`FeedUtils`,{enumerable:!0,get:function(){return Mr}}),Object.defineProperty(e,`FileInputUtils`,{enumerable:!0,get:function(){return Hr}}),Object.defineProperty(e,`FormUtils`,{enumerable:!0,get:function(){return ti}}),Object.defineProperty(e,`GridUtils`,{enumerable:!0,get:function(){return gi}}),Object.defineProperty(e,`HoverCardUtils`,{enumerable:!0,get:function(){return Vi}}),e.INLINE_JUSTIFY=ae,Object.defineProperty(e,`ImageGalleryUtils`,{enumerable:!0,get:function(){return ma}}),Object.defineProperty(e,`InputUtils`,{enumerable:!0,get:function(){return Ua}}),e.LEGACY_THEME_STORAGE_KEY=T,Object.defineProperty(e,`ListUtils`,{enumerable:!0,get:function(){return vo}}),Object.defineProperty(e,`MenuUtils`,{enumerable:!0,get:function(){return zo}}),Object.defineProperty(e,`ModalUtils`,{enumerable:!0,get:function(){return os}}),Object.defineProperty(e,`NumberAnimationUtils`,{enumerable:!0,get:function(){return xs}}),e.PAGE_GUTTERS=ie,e.PAGE_SIZES=N,Object.defineProperty(e,`PaginationUtils`,{enumerable:!0,get:function(){return Ds}}),Object.defineProperty(e,`PaperUtils`,{enumerable:!0,get:function(){return Vs}}),Object.defineProperty(e,`PopoverUtils`,{enumerable:!0,get:function(){return tc}}),Object.defineProperty(e,`PricingTableUtils`,{enumerable:!0,get:function(){return lc}}),Object.defineProperty(e,`ProgressUtils`,{enumerable:!0,get:function(){return Mc}}),Object.defineProperty(e,`RadioUtils`,{enumerable:!0,get:function(){return Wc}}),Object.defineProperty(e,`RatingUtils`,{enumerable:!0,get:function(){return ll}}),e.SPLIT_COLLAPSE=se,e.SPLIT_RATIOS=oe,Object.defineProperty(e,`SelectUtils`,{enumerable:!0,get:function(){return Pl}}),Object.defineProperty(e,`SliderUtils`,{enumerable:!0,get:function(){return iu}}),Object.defineProperty(e,`SnackbarUtils`,{enumerable:!0,get:function(){return Ou}}),Object.defineProperty(e,`StatusUtils`,{enumerable:!0,get:function(){return nd}}),Object.defineProperty(e,`SwitchUtils`,{enumerable:!0,get:function(){return md}}),e.THEME_CONFIG_VERSION=i,e.THEME_MODES=re,e.THEME_STORAGE_KEY=w,Object.defineProperty(e,`TableUtils`,{enumerable:!0,get:function(){return Wd}}),Object.defineProperty(e,`TabsUtils`,{enumerable:!0,get:function(){return yf}}),Object.defineProperty(e,`TextFieldUtils`,{enumerable:!0,get:function(){return Wf}}),Object.defineProperty(e,`ToolbarUtils`,{enumerable:!0,get:function(){return rp}}),Object.defineProperty(e,`TooltipUtils`,{enumerable:!0,get:function(){return ap}}),Object.defineProperty(e,`TypingTextUtils`,{enumerable:!0,get:function(){return up}}),Object.defineProperty(e,`TypographyUtils`,{enumerable:!0,get:function(){return fp}}),Object.defineProperty(e,`VideoPlayerUtils`,{enumerable:!0,get:function(){return bp}}),Object.defineProperty(e,`WatermarkUtils`,{enumerable:!0,get:function(){return wp}}),e.applyThemeConfig=x,e.applyThemeMode=O,e.createThemeController=k,e.createThemeInitScript=A,e.isThemeMode=E,e.loadThemeConfig=S,e.resetThemeConfig=b,e.resolveThemeMode=D,e.serializeThemeConfig=C,e.validateThemeConfig=ee});