@pixelium/web-vue 0.0.1-beta → 0.0.2

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.
Files changed (199) hide show
  1. package/README.md +21 -10
  2. package/README.zh.md +21 -10
  3. package/dist/icon-pa.d.ts +490 -0
  4. package/dist/index.d.ts +1586 -10
  5. package/dist/pixelium-vue-icon-pa.cjs +1 -0
  6. package/dist/pixelium-vue-icon-pa.css +1 -0
  7. package/dist/pixelium-vue-icon-pa.js +10143 -0
  8. package/dist/pixelium-vue-icon-pa.umd.cjs +1 -0
  9. package/dist/pixelium-vue.cjs +12 -1
  10. package/dist/pixelium-vue.css +1 -1
  11. package/dist/pixelium-vue.js +5368 -1093
  12. package/dist/pixelium-vue.umd.cjs +12 -1
  13. package/es/aside/css.js +1 -1
  14. package/es/aside/index.js +60 -13
  15. package/es/auto-complete/css.js +2 -0
  16. package/es/auto-complete/draw.d.ts +2 -0
  17. package/es/auto-complete/draw.js +52 -0
  18. package/es/auto-complete/index.css +123 -0
  19. package/es/auto-complete/index.d.ts +35 -0
  20. package/es/auto-complete/index.js +402 -0
  21. package/es/auto-complete/type.d.ts +192 -0
  22. package/es/button/css.js +1 -1
  23. package/es/button/draw.d.ts +1 -2
  24. package/es/button/draw.js +105 -123
  25. package/es/button/index.css +24 -14
  26. package/es/button/index.js +70 -121
  27. package/es/button-group/css.js +1 -1
  28. package/es/button-group/index.d.ts +0 -1
  29. package/es/button-group/index.js +11 -37
  30. package/es/button-group/type.d.ts +1 -1
  31. package/es/col/css.js +1 -1
  32. package/es/col/index.d.ts +2 -2
  33. package/es/container/css.js +1 -1
  34. package/es/divider/css.js +1 -1
  35. package/es/empty/css.js +2 -0
  36. package/es/empty/index.css +19 -0
  37. package/es/empty/index.d.ts +17 -0
  38. package/es/empty/index.js +73 -0
  39. package/es/empty/type.d.ts +19 -0
  40. package/es/footer/css.js +1 -1
  41. package/es/grid/css.js +1 -1
  42. package/es/grid/index.js +5 -1
  43. package/es/grid-item/css.js +1 -1
  44. package/es/grid-item/index.d.ts +1 -1
  45. package/es/grid-item/index.js +7 -3
  46. package/es/header/css.js +1 -1
  47. package/es/icon/css.js +1 -1
  48. package/es/icon/index.css +0 -3
  49. package/es/icon/index.js +1 -1
  50. package/es/icons/css-pa.js +2 -0
  51. package/es/icons/icon-hn.js +1 -1
  52. package/es/icons/icon-pa.css +9 -0
  53. package/es/icons/icon-pa.d.ts +490 -0
  54. package/es/icons/icon-pa.js +17449 -0
  55. package/es/index.css +22 -8
  56. package/es/index.d.ts +18 -1
  57. package/es/index.js +63 -2
  58. package/es/input/css.js +2 -0
  59. package/es/input/draw.d.ts +2 -0
  60. package/es/input/draw.js +52 -0
  61. package/es/input/index.css +138 -0
  62. package/es/input/index.d.ts +50 -0
  63. package/es/input/index.js +432 -0
  64. package/es/input/type.d.ts +175 -0
  65. package/es/input-group/css.js +2 -0
  66. package/es/input-group/index.css +24 -0
  67. package/es/input-group/index.d.ts +17 -0
  68. package/es/input-group/index.js +40 -0
  69. package/es/input-group/type.d.ts +30 -0
  70. package/es/input-group-label/css.js +2 -0
  71. package/es/input-group-label/draw.d.ts +2 -0
  72. package/es/input-group-label/draw.js +52 -0
  73. package/es/input-group-label/index.css +50 -0
  74. package/es/input-group-label/index.d.ts +16 -0
  75. package/es/input-group-label/index.js +129 -0
  76. package/es/input-group-label/type.d.ts +30 -0
  77. package/es/input-number/css.js +2 -0
  78. package/es/input-number/draw.d.ts +2 -0
  79. package/es/input-number/draw.js +52 -0
  80. package/es/input-number/index.css +161 -0
  81. package/es/input-number/index.d.ts +47 -0
  82. package/es/input-number/index.js +543 -0
  83. package/es/input-number/type.d.ts +183 -0
  84. package/es/input-tag/css.js +2 -0
  85. package/es/input-tag/draw.d.ts +2 -0
  86. package/es/input-tag/draw.js +49 -0
  87. package/es/input-tag/index.css +133 -0
  88. package/es/input-tag/index.d.ts +73 -0
  89. package/es/input-tag/index.js +474 -0
  90. package/es/input-tag/type.d.ts +212 -0
  91. package/es/link/css.js +1 -1
  92. package/es/link/index.css +2 -5
  93. package/es/link/index.js +10 -6
  94. package/es/main/css.js +1 -1
  95. package/es/mask/css.js +2 -0
  96. package/es/mask/index.css +17 -0
  97. package/es/mask/index.d.ts +8 -0
  98. package/es/mask/index.js +117 -0
  99. package/es/mask/type.d.ts +27 -0
  100. package/es/message/css.js +1 -1
  101. package/es/message/index.css +26 -26
  102. package/es/message/index.d.ts +1 -1
  103. package/es/message/index.js +22 -50
  104. package/es/message-box/css.js +1 -1
  105. package/es/message-box/index.js +40 -30
  106. package/es/message-box/message-box-wrapped.d.ts +0 -1
  107. package/es/message-box/message-box-wrapped.js +2 -2
  108. package/es/message-box/message-box.d.ts +2 -1
  109. package/es/message-box/message-box.js +10 -8
  110. package/es/message-box/type.d.ts +14 -4
  111. package/es/option-list/css.js +2 -0
  112. package/es/option-list/index.css +57 -0
  113. package/es/option-list/index.d.ts +38 -0
  114. package/es/option-list/index.js +169 -0
  115. package/es/option-list/type.d.ts +16 -0
  116. package/es/popover/css.js +1 -0
  117. package/es/popover/index.d.ts +203 -0
  118. package/es/popover/index.js +240 -0
  119. package/es/popover/type.d.ts +100 -0
  120. package/es/popup-content/css.js +2 -0
  121. package/es/popup-content/draw.d.ts +6 -0
  122. package/es/popup-content/draw.js +151 -0
  123. package/es/popup-content/index.css +99 -0
  124. package/es/popup-content/index.d.ts +30 -0
  125. package/es/popup-content/index.js +1578 -0
  126. package/es/popup-content/type.d.ts +20 -0
  127. package/es/popup-trigger/css.js +1 -0
  128. package/es/popup-trigger/index.d.ts +22 -0
  129. package/es/popup-trigger/index.js +97 -0
  130. package/es/popup-trigger/type.d.ts +9 -0
  131. package/es/row/css.js +1 -1
  132. package/es/select/css.js +2 -0
  133. package/es/select/draw.d.ts +2 -0
  134. package/es/select/draw.js +52 -0
  135. package/es/select/index.css +152 -0
  136. package/es/select/index.d.ts +44 -0
  137. package/es/select/index.js +674 -0
  138. package/es/select/type.d.ts +252 -0
  139. package/es/share/const/event-bus-key.d.ts +4 -0
  140. package/es/share/const/event-bus-key.js +10 -0
  141. package/es/share/const/index.d.ts +4 -0
  142. package/es/share/const/index.js +11 -2
  143. package/es/share/const/provide-key.d.ts +3 -0
  144. package/es/share/const/provide-key.js +8 -0
  145. package/es/share/hook/use-click-outside-listener.d.ts +4 -0
  146. package/es/share/hook/use-click-outside-listener.js +44 -0
  147. package/es/share/hook/use-composition.d.ts +5 -0
  148. package/es/share/hook/use-composition.js +17 -0
  149. package/es/share/hook/use-controlled-mode.d.ts +6 -0
  150. package/es/share/hook/use-controlled-mode.js +25 -0
  151. package/es/share/hook/use-dark-mode.js +11 -3
  152. package/es/share/hook/use-index-of-children.d.ts +2 -1
  153. package/es/share/hook/use-index-of-children.js +25 -35
  154. package/es/share/hook/use-resize-observer.js +1 -1
  155. package/es/share/hook/use-textarea-height.d.ts +5 -0
  156. package/es/share/hook/use-textarea-height.js +116 -0
  157. package/es/share/hook/use-watch-global-css-var.d.ts +1 -0
  158. package/es/share/hook/use-watch-global-css-var.js +19 -0
  159. package/es/share/hook/use-z-index.d.ts +6 -0
  160. package/es/share/hook/use-z-index.js +32 -0
  161. package/es/share/type/index.d.ts +9 -1
  162. package/es/share/util/color.js +4 -2
  163. package/es/share/util/common.d.ts +5 -0
  164. package/es/share/util/common.js +71 -0
  165. package/es/share/util/event-bus.d.ts +1 -0
  166. package/es/share/util/event-bus.js +20 -0
  167. package/es/share/util/plot.d.ts +15 -2
  168. package/es/share/util/plot.js +200 -30
  169. package/es/share/util/render.d.ts +1 -0
  170. package/es/share/util/render.js +10 -2
  171. package/es/share/util/theme.js +23 -4
  172. package/es/space/css.js +1 -1
  173. package/es/space/index.css +5 -0
  174. package/es/space/index.js +2 -2
  175. package/es/spin/css.js +2 -0
  176. package/es/spin/index.css +66 -0
  177. package/es/spin/index.d.ts +24 -0
  178. package/es/spin/index.js +104 -0
  179. package/es/spin/type.d.ts +54 -0
  180. package/es/tag/css.js +2 -0
  181. package/es/tag/draw.d.ts +6 -0
  182. package/es/tag/draw.js +135 -0
  183. package/es/tag/index.css +372 -0
  184. package/es/tag/index.d.ts +23 -0
  185. package/es/tag/index.js +193 -0
  186. package/es/tag/type.d.ts +58 -0
  187. package/es/textarea/css.js +2 -0
  188. package/es/textarea/draw.d.ts +2 -0
  189. package/es/textarea/draw.js +13 -0
  190. package/es/textarea/index.css +108 -0
  191. package/es/textarea/index.d.ts +49 -0
  192. package/es/textarea/index.js +267 -0
  193. package/es/textarea/type.d.ts +169 -0
  194. package/es/tooltip/css.js +1 -0
  195. package/es/tooltip/index.d.ts +20 -0
  196. package/es/tooltip/index.js +228 -0
  197. package/es/tooltip/type.d.ts +77 -0
  198. package/package.json +17 -3
  199. package/es/icons/{css.js → css-hn.js} +1 -1
@@ -1 +1,12 @@
1
- (function(x,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(x=typeof globalThis<"u"?globalThis:x||self,r(x.PixeliumVue={},x.Vue))})(this,(function(x,r){"use strict";var Et=Object.defineProperty;var It=(x,r,U)=>r in x?Et(x,r,{enumerable:!0,configurable:!0,writable:!0,value:U}):x[r]=U;var pe=(x,r,U)=>It(x,typeof r!="symbol"?r+"":r,U);const U=r.defineComponent({props:{size:{},color:{}},setup(t){const e=t;return(o,n)=>(r.openBlock(),r.createElementBlock("svg",{class:"px-icon-hn",style:r.normalizeStyle({color:e.color,fontSize:e.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...n[0]||(n[0]=[r.createElementVNode("path",{d:"M23 9v6h-1v2h-3v-2h1V9h-1V7h-1V6h-1V5h-2V4h-2V3h-1V1h3v1h2v1h2v1h1v1h1v2h1v2z"},null,-1)])],4))}});function Ue(t,e,o,n){let s=Math.atan2(e,t);return s<0&&(s+=Math.PI*2),s>=o&&s<=n}function We(t,e,o,n,s,a,l,u){const c=[[e,o],[-e,o],[e,-o],[-e,-o],[o,e],[-o,e],[o,-e],[-o,-e]];for(const[i,h]of c)Ue(i,h,a,l)&&t.fillRect(n+i,s+h,u,u)}function z(t,e,o,n,s=0,a=Math.PI*2,l){let u=0,c=n,i=3-2*n;for(;u<=c+l;)We(t,u,c,e,o,s,a,l),u+=l,i>0?(c-=l,i+=4*(u-c)+10):i+=4*u+6}function je(t,e,o,n){const s=t.getImageData(0,0,t.canvas.width,t.canvas.height),a=s.data,l=(o*t.canvas.width+e)*4,u=a[l],c=a[l+1],i=a[l+2],h=a[l+3];if(!(u===0&&c===0&&i===0&&h===0)||n.r===0&&n.g===0&&n.b===0&&n.a===0)return;const m=[[e,o]];for(;m.length;){const f=m.pop();if(!f)continue;const[d,_]=f,g=(_*t.canvas.width+d)*4;d<0||d>=t.canvas.width||_<0||_>=t.canvas.height||a[g]!==u||a[g+1]!==c||a[g+2]!==i||a[g+3]!==h||(a[g]=n.r,a[g+1]=n.g,a[g+2]=n.b,a[g+3]=n.a,m.push([d+1,_]),m.push([d-1,_]),m.push([d,_+1]),m.push([d,_-1]))}t.putImageData(s,0,0)}const I={r:0,g:0,b:0,a:0},ne=3e3;var W=(t=>(t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t))(W||{});const P=()=>typeof window<"u";function he(t){if(!Number.isInteger(t)||t<=0)throw new RangeError("max must be a positive integer");const e=new Map;return{get(o){const n=e.get(o);if(n!==void 0)return e.delete(o),e.set(o,n),n},set(o,n){e.has(o)?e.delete(o):e.size>=t&&e.delete(e.keys().next().value),e.set(o,n)},delete(o){return e.delete(o)},clear(){e.clear()},has(o){return e.has(o)},get size(){return e.size}}}const ge=he(120);function X(t){const e=ge.get(t);if(e)return{...e};let o={r:0,g:0,b:0,a:255};if(t.startsWith("rgb(")||t.startsWith("rgba(")){const n=t.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)/i);n&&(o.r=parseInt(n[1],10),o.g=parseInt(n[2],10),o.b=parseInt(n[3],10),n[4]&&(o.a=Math.round(parseFloat(n[4])*255)))}else t.startsWith("#")&&(t=t.slice(1),t.length===3?(o.r=parseInt(t[0]+t[0],16),o.g=parseInt(t[1]+t[1],16),o.b=parseInt(t[2]+t[2],16)):t.length===4?(o.r=parseInt(t[0]+t[0],16),o.g=parseInt(t[1]+t[1],16),o.b=parseInt(t[2]+t[2],16),o.a=parseInt(t[3]+t[3],16)):t.length===6?(o.r=parseInt(t.slice(0,2),16),o.g=parseInt(t.slice(2,4),16),o.b=parseInt(t.slice(4,6),16)):t.length===8&&(o.r=parseInt(t.slice(0,2),16),o.g=parseInt(t.slice(2,4),16),o.b=parseInt(t.slice(4,6),16),o.a=parseInt(t.slice(6,8),16)));return ge.set(t,o),{...o}}const p=(t,e)=>P()?X(getComputedStyle(document.documentElement).getPropertyValue(`--px-${t}-${e}`)):I;function re(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function qe(t,e,o,n=255){const s=t/255,a=e/255,l=o/255,u=re(s),c=re(a),i=re(l);let h=u*.41239079926595934+c*.357584339383878+i*.1804807884018343,m=u*.21263900587151027+c*.715168678767756+i*.07219231536073371,f=u*.01933081871559182+c*.11919477979462598+i*.9505321522496607,d=.819022437996703*h+.3619062600528904*m-.1288737815209879*f,_=.0329836539323885*h+.9292868615863434*m+.0361446663506424*f,g=.0481771893596242*h+.2642395317527308*m+.6335478284694309*f;d=Math.cbrt(d),_=Math.cbrt(_),g=Math.cbrt(g);const E=.210454268309314*d+.7936177747023054*_-.0040720430116193*g,T=1.9779985324311684*d-2.42859224204858*_+.450593709617411*g,B=.0259040424655478*d+.7827717124575296*_-.8086757549230774*g,y=Math.sqrt(T*T+B*B);let k=Math.atan2(B,T)*180/Math.PI;return k<0&&(k+=360),{l:E,c:y,h:k,a:n}}function oe(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function F(t,e,o,n=255){const s=o*Math.PI/180,a=e*Math.cos(s),l=e*Math.sin(s);let u=t+.3963377773761749*a+.2158037573099136*l,c=t-.1055613458156586*a-.0638541728258133*l,i=t-.0894841775298119*a-1.2914855480194092*l;u=u*u*u,c=c*c*c,i=i*i*i;const h=1.2268798758459243*u-.5578149944602171*c+.2813910456659647*i,m=-.0405757452148008*u+1.112286803280317*c-.0717110580655164*i,f=-.0763729366746601*u-.4214933324022432*c+1.5869240198367816*i,d=3.2409699419045226*h-1.537383177570094*m-.4986107602930034*f,_=-.9692436362808796*h+1.8759675015077202*m+.04155505740717559*f,g=.05563007969699366*h-.20397695888897652*m+1.0569715142428786*f,E=oe(d),T=oe(_),B=oe(g);return{r:Math.round(E*255),g:Math.round(T*255),b:Math.round(B*255),a:n}}function Xe(t,e,o){const{r:n,g:s,b:a}=F(e,t,o);return n>=0&&n<=255&&s>=0&&s<=255&&a>=0&&a<=255}function se(t,e){let n=0,s=2;for(;s-n>1e-6;){const a=(n+s)/2;Xe(a,t,e)?n=a:s=a}return n}const ve=he(60);function Q(t,e,o,n=255,s=!1){const a=`${t},${e},${o},${n},${s}`,l=ve.get(a);if(l)return l;const u=qe(t,e,o,n);let c=[];const i=u.c<.049?0:.049,h=s?Math.min(Math.max(u.l,.05),.85):Math.min(Math.max(u.l,.15),.95),m=Math.min(Math.max(u.c,i),se(h,u.h)),f=Math.min(h+.35,s?.85:.9),d=Math.max(h-.35,s?.1:.15),_=s?(h-d)/4:(f-h)/4,g=(m-i)/4,E=s?(f-h)/3:(h-d)/3,T=(m-i)/3;for(let B=0;B<5;B++){const y=h+(s?-1:1)*_*(5-B),k=Math.min(m-g*(5-B),se(y,u.h)),A=u.h,$=F(y,k,A,n);c.push($)}c.push(F(h,m,u.h,n));for(let B=0;B<4;B++){const y=h-(s?-1:1)*E*(B+1),k=Math.min(m-T*(B+1),se(y,u.h)),A=u.h,$=F(y,k,A,n);c.push($)}return ve.set(a,c),c}const V=t=>`rgba(${t.r}, ${t.g}, ${t.b}, ${+(t.a/255)})`,ae=r.defineComponent({name:"ButtonGroup",__name:"index",props:{borderRadius:null,shape:{default:"default"},size:{default:"medium"},disabled:{type:Boolean,default:!1},loading:{type:Boolean},variant:{default:"primary"}},setup(t){const e=t;r.provide("px-button-group-props",e);const o=r.ref(null),n=()=>{r.nextTick(()=>{o.value&&o.value.querySelectorAll("[data-px-button]").forEach(s=>s.dispatchEvent(new CustomEvent("slot-changed")))})};if(P()){const s=new MutationObserver(n);r.onMounted(()=>{r.nextTick(()=>{o.value&&s.observe(o.value,{childList:!0})}),n()}),r.onBeforeUnmount(()=>{s.disconnect()})}return(s,a)=>(r.openBlock(),r.createElementBlock("div",{class:"pixelium px-button-group",ref_key:"slotWrapper",ref:o},[r.renderSlot(s.$slots,"default")],512))}}),Qe=new RegExp("[-_\\s]|(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|(\\d+)");function Je(t){return t.split(Qe).filter(Boolean)}function Ke(t){const e=Je(t);let o="";const n=e.length;for(let s=0;s<n;s++)o+=e[s].toLowerCase()+(s<n-1?"-":"");return o}function _e(t){return typeof t=="function"}function J(t){return typeof t=="string"||t instanceof String}function H(t){return typeof t=="number"||t instanceof Number}function le(t){return Array.isArray(t)}function G(t){return t==null}function ye(...t){return t.reduce((e,o)=>{if(G(o))return e;const n=Object.keys(o);for(const s of n){const a=e[s],l=o[s];(G(a)||!G(l))&&(e[s]=l)}return e},{})}typeof process<"u"&&process.env.NODE_ENV;function Ye(t,e,o,n="primary",s,a,l){if(s)switch(o){case"text":return t?I:l?s[1]:a&&!e?s[0]:I;case"outline":return I;case"plain":return t?s[0]:l?s[2]:a&&!e?s[1]:s[0];default:return t?s[1]:l?s[5]:a&&!e?s[4]:s[5]}else if(n!=="info")switch(o){case"text":return t?I:l?p(n,2):a&&!e?p(n,1):I;case"outline":return I;case"plain":return t?p(n,1):l?p(n,3):a&&!e?p(n,2):p(n,1);default:return t?p(n,2):l?p(n,6):a&&!e?p(n,5):p(n,6)}else switch(o){case"outline":return I;case"text":return t?I:l?p("neutral",3):a&&!e?p("neutral",2):I;case"plain":return t?p("neutral",1):l?p("neutral",4):a&&!e?p("neutral",3):p("neutral",1);default:return t?p("neutral",1):l?p("neutral",3):a&&!e?p("neutral",2):p("neutral",1)}}function Ze(t,e,o,n="primary",s,a,l){if(s)switch(o){case"text":return t?I:l?s[1]:a&&!e?s[0]:I;case"plain":return t?s[1]:l?s[3]:a&&!e?s[2]:s[1];case"outline":return t?s[1]:l?s[6]:a&&!e?s[4]:s[5];default:return t?p("neutral",8):p("neutral",10)}else if(n!=="info")switch(o){case"text":return t?I:l?p(n,2):a&&!e?p(n,1):I;case"plain":return t?p(n,2):l?p(n,4):a&&!e?p(n,3):p(n,2);case"outline":return t?p(n,1):l?p(n,7):a&&!e?p(n,5):p(n,6);default:return t?p("neutral",8):p("neutral",10)}else{switch(o){case"text":return t?I:l?p("neutral",3):a&&!e?p("neutral",2):I;case"plain":return t?p("neutral",5):l?p("neutral",9):a&&!e?p("neutral",8):p("neutral",7);case"outline":return t?p("neutral",6):l?p("neutral",8):a&&!e?p("neutral",9):p("neutral",10)}return t?p("neutral",8):p("neutral",10)}}const ze=(t,e,o,n,s,a,l,u,c,i,h,m)=>{t.fillStyle=`rgba(${l.r}, ${l.g}, ${l.b}, ${l.a/255})`;for(let d=0;d<4;d++)s[d]>u&&(!(d===1||d===2)||i&&(m||c==="text")||!i)&&z(t,n[d][0],n[d][1],s[d],a[d][0],a[d][1],u);n[1][0]+u>n[0][0]&&t.fillRect(n[0][0],0,n[1][0]-n[0][0]+u,u),n[2][1]+u>n[1][1]&&(i&&(m||c==="text")||!i)&&t.fillRect(e-u,n[1][1],u,n[2][1]-n[1][1]+u),n[3][0]<n[2][0]+u&&t.fillRect(n[3][0],o-u,n[2][0]-n[3][0]+u,u),!(i&&!h&&c!=="text")&&n[3][1]+u>n[0][1]&&t.fillRect(0,n[0][1],u,n[3][1]-n[0][1]+u),i&&!h&&c!=="text"&&t.fillRect(u/2,0,u/2,o),i&&!m&&c!=="text"&&t.fillRect(e-2*u-1,0,u,o)};function xe(t,e,o="primary",n,s,a){return n?t?n[0]:a?n[6]:s&&!e?n[3]:n[4]:o!=="info"?t?p(o,1):a?p(o,7):s&&!e?p(o,4):p(o,5):t?p("neutral",2):a?p("neutral",5):s&&!e?p("neutral",4):p("neutral",3)}function S(t,e){return Math.ceil((-6+Math.sqrt(36-48*t+32*t*e))/(8*t))*t}const Fe=(t,e,o,n,s,a,l,u,c,i,h="primary",m,f,d,_,g,E)=>{const T=S(l,s[2]),B=S(l,s[3]),y=S(l,s[1]),k=S(l,s[0]),A=+!(f&&!d&&i!=="text");if(!E||u){const $=xe(u,c,h,m,g,E);t.fillStyle=`rgba(${$.r}, ${$.g}, ${$.b}, ${$.a/255})`;for(let v=1;v<3;v++)s[v]>l&&z(t,n[v][0]-l,n[v][1],s[v],a[v][0],a[v][1],l);const D=n[2][0]+l-n[3][0]+B*A+T;D>0&&t.fillRect(n[3][0]-B*A,o-l*2,D,l);const O=n[2][1]+l-n[1][1]+y+T;O>0&&t.fillRect(e-l*2-(_?0:+f*l*1),n[1][1]-y,l,O)}else{const $=xe(u,c,h,m,g,E);t.fillStyle=`rgba(${$.r}, ${$.g}, ${$.b}, ${$.a/255})`,s[0]>l&&z(t,n[0][0]+l,n[0][1],s[0],a[0][0],a[0][1],l),s[3]>l&&z(t,n[3][0]+l,n[3][1],s[3],a[3][0],a[3][1],l);const D=n[1][0]+l-n[0][0]+y+k*A;D>0&&t.fillRect(n[0][0]-k*A,l,D,l);const O=l+n[3][1]-n[0][1]+B+k;O>0&&t.fillRect(l,n[0][1]-k,l,O)}},M=(t,e,o)=>H(e)?Math.max(e,o):Math.max(t.height*parseFloat(e)/100,o),N=t=>Array(4).fill(t),Se=(t,e,o)=>{if(!e)return N(o);if(!le(e))return N(M(t,e,o));switch(e.length){case 1:return N(M(t,e[0],o));case 2:{const n=M(t,e[0],o),s=M(t,e[1],o);return[n,s,n,s]}case 3:{const n=M(t,e[0],o),s=M(t,e[2],o),a=M(t,e[1],o);return[n,a,s,a]}default:return e.map(n=>M(t,n,o))}},et=(t,e,o,n,s)=>{if(!e)return N(o);if(!le(e)){const a=M(t,e,o);return s?[o,a,a,o]:n?[a,o,o,a]:N(o)}switch(e.length){case 1:const a=M(t,e[0],o);return s?[o,a,a,o]:n?[a,o,o,a]:N(o);case 2:{const l=M(t,e[0],o),u=M(t,e[1],o);return s?[o,u,u,o]:n?[l,o,o,l]:N(o)}case 3:{const l=M(t,e[0],o),u=M(t,e[2],o),c=M(t,e[1],o);return s?[o,c,u,o]:n?[l,o,o,c]:N(o)}default:return s?[o,M(t,e[1],o),M(t,e[2],o),o]:n?[M(t,e[0],o),o,o,M(t,e[3],o)]:N(o)}},tt=(t,e,o,n,s,a,l)=>{if(s){if(o)return et(t,o,e,a,l);switch(n){case"round":const u=N(M(t,"50%",e));return l?u.map((c,i)=>i<1||i>2?e:c):a?u.map((c,i)=>i>0&&i<3?e:c):N(e);default:return N(e)}}else{if(o)return Se(t,o,e);switch(n){case"round":case"circle":return N(M(t,"50%",e));default:return N(e)}}},nt=(t,e,o,n,s,a)=>{if(!(!t||e==="primary")){if(o)return V(e==="plain"?t[2]:t[1]);if(n)return V(t[5]);if(a&&e!=="plain")return V(t[6]);switch(e){case"text":return V(t[5]);case"outline":return V(s?t[4]:t[5]);case"plain":return V(t[5]);default:return}}},be=new WeakMap,K=new WeakMap,rt=t=>()=>{const e=K.get(t);e==null||e.forEach(o=>o())},j=()=>{const t=r.ref(!1),e=r.ref(void 0);function o(s){t.value=s.matches}if(P()){const s=window.matchMedia("(prefers-color-scheme: dark)");o(s),s.addEventListener("change",o),r.onBeforeUnmount(()=>{s.removeEventListener("change",o)})}const n=()=>{if(P()){let s=!1,a=!1;document.documentElement.className.split(" ").forEach(l=>{l==="dark"&&(s=!0),l==="light"&&(a=!0)}),e.value=s?!0:a?!1:void 0}};return P()&&(r.onMounted(()=>{const s=be.get(document.documentElement)||new MutationObserver(rt(document.documentElement));be.set(document.documentElement,s),s.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),K.set(document.documentElement,[...K.get(document.documentElement)||[],n]),n()}),r.onBeforeUnmount(()=>{K.set(document.documentElement,(K.get(document.documentElement)||[]).filter(s=>s!==n))})),r.computed(()=>e.value??t.value)},we=(t,e,o=!0)=>{if(!P())return null;const n=new ResizeObserver(e);return r.onMounted(()=>{setTimeout(()=>{o&&e(),t.value&&n.observe(t.value)})}),r.onBeforeUnmount(()=>{n.disconnect()}),n},ot=["disabled","type","autofocus"],ke=r.defineComponent({name:"Button",__name:"index",props:{borderRadius:null,shape:{default:"default"},size:{default:"medium"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},theme:{default:"primary"},color:null,block:{type:Boolean,default:!1},nativeType:{default:"button"},autofocus:{type:Boolean,default:!1}},setup(t){var v;const e=t,o=r.getCurrentInstance(),n=r.ref(((v=o==null?void 0:o.parent)==null?void 0:v.type)===ae),s=r.ref(!1),a=r.ref(!1),l=r.inject("px-button-group-props"),u=r.computed(()=>n.value&&l?l.borderRadius:e.borderRadius),c=r.computed(()=>n.value&&l?l.variant:e.variant),i=r.computed(()=>n.value&&l?l.size:e.size),h=r.computed(()=>n.value&&l?l.shape:e.shape),m=r.computed(()=>n.value&&l&&l.disabled||e.disabled),f=()=>{if(o&&o.vnode.el instanceof HTMLElement){const w=o.vnode.el.parentElement;if(w&&w.children.length){const b=[...w.children];s.value=b.indexOf(o.vnode.el)===w.children.length-1,a.value=b.indexOf(o.vnode.el)===0}else s.value=!1,a.value=!1}},d=r.useSlots(),_=r.ref(!1),g=r.ref(!1),E=w=>{_.value=w},T=w=>{g.value=w},B=j(),y=r.ref(null),k=r.ref(null);r.onMounted(()=>{setTimeout(()=>{k.value&&k.value.addEventListener("slot-changed",A),f()})});const A=()=>{setTimeout(()=>{f(),O()})};r.onBeforeUnmount(()=>{k.value&&k.value.removeEventListener("slot-changed",A)});const $=r.computed(()=>{if(!e.color)return null;const w=X(e.color);return Q(w.r,w.g,w.b,w.a,B.value)}),D=r.computed(()=>nt($.value,c.value,m.value,e.loading,_.value,g.value));r.watch([u,h,m,()=>e.loading,c,()=>e.theme,$,_,g,B],()=>{setTimeout(()=>{f(),O()})});const O=()=>{const w=getComputedStyle(document.documentElement),b=parseInt(w.getPropertyValue("--px-bit"));if(!y.value||!k.value)return;const L=y.value.getContext("2d",{willReadFrequently:!0}),C=k.value.getBoundingClientRect();if(y.value.width=C.width,y.value.height=C.height,!L)return;const R=tt(y.value,b,u.value,h.value,n.value,a.value,s.value),Vt=Ze(m.value,e.loading,c.value,e.theme,$.value,_.value,g.value),q=[[R[0],R[0]],[y.value.width-R[1]-b,R[1]],[y.value.width-R[2]-b,y.value.height-R[2]-b],[R[3],y.value.height-R[3]-b]],Ge=[[Math.PI,Math.PI*3/2],[Math.PI*3/2,Math.PI*2],[0,Math.PI/2],[Math.PI/2,Math.PI]];c.value==="primary"&&Fe(L,y.value.width,y.value.height,q,R,Ge,b,m.value,e.loading,c.value,e.theme,$.value,n.value,a.value,s.value,_.value,g.value),ze(L,y.value.width,y.value.height,q,R,Ge,Vt,b,c.value,n.value,a.value,s.value);const Ht=Ye(m.value,e.loading,c.value,e.theme,$.value,_.value,g.value);je(L,Math.round((q[0][0]+q[1][0])/2),Math.round((q[0][1]+q[2][1])/2),Ht)};return we(k,O),(w,b)=>(r.openBlock(),r.createElementBlock("button",{disabled:m.value||e.loading,class:r.normalizeClass(["pixelium px-button",{"px-button__block":!n.value&&!!e.block,"px-button__circle":h.value==="circle","px-button__square":h.value==="square","px-button__loading":e.loading,"px-button__large":i.value==="large","px-button__small":i.value==="small","px-button__outline":c.value==="outline","px-button__plain":c.value==="plain","px-button__text":c.value==="text","px-button__disabled":m.value,"px-button__custom":$.value,"px-button__inner":n.value,[`px-button__${e.theme||"primary"}`]:!0}]),style:r.normalizeStyle({color:D.value}),ref_key:"buttonRef",ref:k,"data-px-button":"",onMouseenter:b[0]||(b[0]=L=>E(!0)),onMouseleave:b[1]||(b[1]=L=>E(!1)),onMousedown:b[2]||(b[2]=L=>T(!0)),onMouseup:b[3]||(b[3]=L=>T(!1)),type:e.nativeType,autofocus:e.autofocus},[r.createElementVNode("canvas",{ref_key:"canvasRef",ref:y,class:"px-button-canvas"},null,512),r.unref(d).icon||e.loading?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["px-button-icon-wrapper",{"px-button-icon-wrapper__last":!r.unref(d).default}])},[e.loading?(r.openBlock(),r.createBlock(r.unref(U),{key:0,class:r.normalizeClass(["px-button-icon",{"px-button-icon__loading":e.loading}]),style:r.normalizeStyle({fill:D.value})},null,8,["class","style"])):r.renderSlot(w.$slots,"icon",{key:1})],2)):r.createCommentVNode("",!0),r.renderSlot(w.$slots,"default")],46,ot))}}),st=["href","target"],Be=r.defineComponent({name:"Link",__name:"index",props:{disabled:{type:Boolean},loading:{type:Boolean},theme:null,color:null,href:null,target:null},setup(t){const e=t,o=r.useSlots(),n=j(),s=r.computed(()=>{if(!e.color)return null;const f=X(e.color);return Q(f.r,f.g,f.b,f.a,n.value)}),a=r.ref(!1),l=r.ref(!1),u=f=>{a.value=f},c=f=>{l.value=f},i=(f,d,_,g,E)=>{if(f)return V(d?f[1]:_?f[5]:E?f[6]:g?f[4]:f[5])},h=r.computed(()=>i(s.value,e.disabled,e.loading,a.value,l.value)),m=f=>{(e.disabled||e.loading)&&f.preventDefault()};return(f,d)=>(r.openBlock(),r.createElementBlock("a",{class:r.normalizeClass(["pixelium px-link",{"px-link__loading":e.loading,"px-link__disabled":e.disabled,"px-link__custom":s.value,[`px-link__${e.theme||"primary"}`]:!0}]),style:r.normalizeStyle({color:h.value}),onMouseenter:d[0]||(d[0]=_=>u(!0)),onMouseleave:d[1]||(d[1]=_=>u(!1)),onMousedown:d[2]||(d[2]=_=>c(!0)),onMouseup:d[3]||(d[3]=_=>c(!1)),href:e.href,target:e.target,onClick:m},[r.unref(o).icon||e.loading?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["px-link-icon-wrapper",{"px-link-icon-wrapper__last":!r.unref(o).default}])},[e.loading?(r.openBlock(),r.createBlock(r.unref(U),{key:0,class:r.normalizeClass(["px-link-icon",{"px-link-icon__loading":e.loading}]),style:r.normalizeStyle({fill:h.value})},null,8,["class","style"])):r.renderSlot(f.$slots,"icon",{key:1})],2)):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"default")],46,st))}}),at=r.defineComponent({props:{size:{},color:{}},setup(t){const e=t;return(o,n)=>(r.openBlock(),r.createElementBlock("svg",{class:"px-icon-hn",style:r.normalizeStyle({color:e.color,fontSize:e.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...n[0]||(n[0]=[r.createElementVNode("path",{d:"M22 9V7h-1V5h-1V4h-1V3h-2V2h-2V1H9v1H7v1H5v1H4v1H3v2H2v2H1v6h1v2h1v2h1v1h1v1h2v1h2v1h6v-1h2v-1h2v-1h1v-1h1v-2h1v-2h1V9zM11 6h2v2h-2zm-1 9h1v-5h-1V9h3v6h1v2h-4z"},null,-1),r.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1)])],4))}}),lt=r.defineComponent({props:{size:{},color:{}},setup(t){const e=t;return(o,n)=>(r.openBlock(),r.createElementBlock("svg",{class:"px-icon-hn",style:r.normalizeStyle({color:e.color,fontSize:e.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...n[0]||(n[0]=[r.createElementVNode("path",{d:"M22 20v-2h-1v-2h-1v-2h-1v-2h-1v-2h-1V8h-1V6h-1V4h-1V2h-1V1h-2v1h-1v2H9v2H8v2H7v2H6v2H5v2H4v2H3v2H2v2H1v2h1v1h20v-1h1v-2zm-12-9h4v3h-1v3h-2v-3h-1zm1 7h2v2h-2z"},null,-1)])],4))}}),ut=r.defineComponent({props:{size:{},color:{}},setup(t){const e=t;return(o,n)=>(r.openBlock(),r.createElementBlock("svg",{class:"px-icon-hn",style:r.normalizeStyle({color:e.color,fontSize:e.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...n[0]||(n[0]=[r.createElementVNode("path",{d:"M22 8V7h-1V6h-1V5h-1V4h-1V3h-1V2h-1V1H8v1H7v1H6v1H5v1H4v1H3v1H2v1H1v8h1v1h1v1h1v1h1v1h1v1h1v1h1v1h8v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1V8zm-6 9h-2v-1h-1v-1h-2v1h-1v1H8v-1H7v-2h1v-1h1v-2H8v-1H7V8h1V7h2v1h1v1h2V8h1V7h2v1h1v2h-1v1h-1v2h1v1h1v2h-1z"},null,-1)])],4))}}),ct=r.defineComponent({props:{size:{},color:{}},setup(t){const e=t;return(o,n)=>(r.openBlock(),r.createElementBlock("svg",{class:"px-icon-hn",style:r.normalizeStyle({color:e.color,fontSize:e.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...n[0]||(n[0]=[r.createElementVNode("path",{d:"M22 9V7h-1V5h-1V4h-1V3h-2V2h-2V1H9v1H7v1H5v1H4v1H3v2H2v2H1v6h1v2h1v2h1v1h1v1h2v1h2v1h6v-1h2v-1h2v-1h1v-1h1v-2h1v-2h1V9zm-4 3h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-2v-1H9v-1H8v-1H7v-1H6v-2h1v-1h2v1h1v1h2v-1h1v-1h1v-1h1V9h1V8h2v1h1v2h-1z"},null,-1)])],4))}}),it=r.defineComponent({props:{size:{},color:{}},setup(t){const e=t;return(o,n)=>(r.openBlock(),r.createElementBlock("svg",{class:"px-icon-hn",style:r.normalizeStyle({color:e.color,fontSize:e.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...n[0]||(n[0]=[r.createElementVNode("path",{d:"M14 13h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-2v1h-1v1H9v1H8v1H7v1H6v1H5v1H4v1H3v-1H2v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-2H9v-1H8V9H7V8H6V7H5V6H4V5H3V4H2V3h1V2h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h2V9h1V8h1V7h1V6h1V5h1V4h1V3h1V2h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1z"},null,-1)])],4))}}),ft=r.defineComponent({__name:"index",props:{content:{default:""},icon:null,duration:{default:3e3},id:null,type:{default:"normal"},color:null,closable:{type:Boolean}},emits:["close"],setup(t,{expose:e,emit:o}){const n=t,s=r.ref(!1),a=r.ref(!1),l=v=>{a.value=v},u=v=>{s.value=v},c=r.ref(!1);let i;r.onMounted(()=>{c.value=!0,h()}),r.onBeforeUnmount(()=>{clearTimeout(i)});function h(){i=setTimeout(()=>f(),n.duration)}function m(){clearTimeout(i),i=void 0}function f(){c.value=!1}const d=o,_=()=>{d("close",n.id),m()},g=r.ref(),E=r.ref(),T=v=>{if(!v)return"normal";switch(v){case"info":return"primary";case"error":return"danger";default:return v}},B=j(),y=r.computed(()=>{if(!n.color)return null;const v=X(n.color);return Q(v.r,v.g,v.b,v.a,B.value)}),k=r.computed(()=>y.value?V(y.value[5]):void 0),A=r.computed(()=>{if(y.value)return a.value?V(y.value[6]):s.value?V(y.value[4]):V(y.value[5])});function $(v="normal",w){if(w)return w[5];{const b=T(v);return b==="normal"?p("neutral",10):b==="loading"?p("neutral",8):p(b,6)}}const D=(v,w,b,L,C)=>{v.fillStyle=`rgba(${L.r}, ${L.g}, ${L.b}, ${L.a/255})`,v.fillRect(C,0,w-2*C,C),v.fillRect(w-C,C,C,b-2*C),v.fillRect(C,b-C,w-2*C,C),v.fillRect(0,C,C,b-2*C);const R=p("neutral",1);v.fillStyle=`rgba(${R.r}, ${R.g}, ${R.b}, ${R.a/255})`,v.fillRect(C,C,w-2*C,b-2*C)},O=()=>{const v=getComputedStyle(document.documentElement),w=parseInt(v.getPropertyValue("--px-bit"));if(!g.value||!E.value)return;const b=g.value.getContext("2d",{willReadFrequently:!0}),L=E.value.getBoundingClientRect();if(g.value.width=L.width,g.value.height=L.height,!b)return;const C=$(n.type,y.value);D(b,g.value.width,g.value.height,C,w)};return we(E,O),r.watch([()=>n.type,y,B],()=>{setTimeout(()=>{O()})}),e({close:f}),()=>r.createVNode(r.Transition,{name:"px-message-fade",onAfterLeave:_},{default:()=>[c.value&&r.createVNode("div",{ref:v=>E.value=v,onMouseenter:m,onMouseleave:h,class:{"px-message":!0,pixelium:!0,[`px-message__${n.type||"primary"}`]:!0}},[(!!n.icon||n.type&&n.type!=="normal"&&n.type!=="sakura")&&r.createVNode("div",{class:"px-message-icon-wrapper"},[n.icon?n.icon():n.type==="info"?r.createVNode(at,{class:"px-message-icon",style:{fill:k.value}},null):n.type==="success"?r.createVNode(ct,{class:"px-message-icon",style:{fill:k.value}},null):n.type==="warning"?r.createVNode(lt,{class:"px-message-icon",style:{fill:k.value}},null):n.type==="error"?r.createVNode(ut,{class:"px-message-icon",style:{fill:k.value}},null):n.type==="loading"&&r.createVNode(U,{class:"px-message-icon px-message-icon__loading",style:{fill:k.value}},null)]),r.createVNode("span",{class:"px-message-content",style:{color:k.value}},[J(n.content)?n.content:n.content()]),n.closable&&r.createVNode("div",{class:"px-message-close-wrapper"},[r.createVNode(it,{class:"px-message-icon",style:{fill:A.value},onMouseenter:u(!0),onMouseleave:u(!1),onMousedown:l(!0),onMouseup:l(!1),onClick:f},null)]),r.createVNode("canvas",{ref:v=>g.value=v,class:"px-message-canvas"},null)])]})}}),dt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ue=(t=21)=>{let e="",o=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=dt[o[t]&63];return e};const Ce=r.defineComponent({name:"MessageBoxInner",__name:"message-box",props:{messages:{},position:{},zIndex:{default:ne},root:{},"onUpdate:messages":{}},emits:["close"],setup(t,{expose:e,emit:o}){const n=t,s=r.useModel(n,"messages"),a=o,l=r.computed(()=>s.value.map(i=>({...i,id:i.id??ue()}))),u=i=>{if(!G(i)){if(n["onUpdate:messages"]){const h=l.value.findIndex(m=>m.id===i);if(h>=0){const m=[...l.value];m.splice(h,1),s.value=m}}a("close",i)}},c=r.ref([]);return e({close:i=>{var m;const h=l.value.findIndex(f=>f.id===i);h!==-1&&((m=c.value[h])==null||m.close())}}),(i,h)=>(r.openBlock(),r.createElementBlock("div",{class:"px-message-box",style:r.normalizeStyle({zIndex:n.zIndex})},[r.createElementVNode("div",{class:r.normalizeClass(["px-message-box-container",{[`px-message-box-container__${r.unref(Ke)(n.position||"top")}`]:!0}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,m=>(r.openBlock(),r.createBlock(ft,{key:m.id,duration:m.duration,content:m.content,id:m.id,onClose:u,type:m.type,color:m.color,icon:m.icon,closable:m.closable,ref_for:!0,ref_key:"messageRef",ref:c},null,8,["duration","content","id","type","color","icon","closable"]))),128))],2)],4))}}),$e=r.defineComponent({name:"MessageBox",__name:"message-box-wrapped",props:{messages:null,position:null,zIndex:{default:ne},root:{default:"body"},"onUpdate:messages":{type:Function},onClose:{type:Function}},setup(t,{expose:e}){const o=t,n=r.useAttrs(),s=r.ref(null);return e({close:a=>{var l;(l=s.value)==null||l.close(a)}}),(a,l)=>(r.openBlock(),r.createBlock(r.Teleport,{to:o.root},[r.createVNode(Ce,r.mergeProps({...o,...r.unref(n)},{ref_key:"messageBoxRef",ref:s}),null,16)],8,["to"]))}});class mt{constructor(e){pe(this,"messages");pe(this,"messageBox");this.messages=r.ref([]),this.messageBox=r.createVNode(Ce,{messages:this.messages.value,zIndex:e.zIndex,position:e.position,onClose:a=>{const l=this.messages.value.findIndex(u=>u.id===a);l>=0&&this.messages.value.splice(l,1)}});const o=(J(e.root)?document.querySelector(e.root):e.root)||document.body,n=ue(),s=document.createElement("div");s.id=n,s.className="px-message-box-wrapper",o.appendChild(s),r.render(this.messageBox,s)}push(e){const o=e.id??ue();return this.messages.value.push({...e,id:o}),o}close(e){var o,n;(n=(o=this.messageBox.component)==null?void 0:o.exposed)==null||n.close(e)}clear(){this.messages.value.length=0}}const ce={top:void 0,bottom:void 0,topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},Y=t=>{(J(t)||_e(t))&&(t={content:t});const e=t.position||"top",o=ce[e]?ce[e]:ce[e]=new mt({position:e,zIndex:ne,root:t.root||"body"}),n=o.push({content:t.content,icon:t.icon,duration:t.duration||3e3,type:t.type||"normal",color:t.color,closable:t.closable});return{close:()=>o.close(n),clear:()=>o.clear()}};["info","success","warning","error","loading","sakura","normal"].forEach(t=>{Y[t]=e=>((J(e)||_e(e))&&(e={content:e}),Y({...e,type:t}))});const ee=()=>{const t=r.ref(0);function e(){P()&&(t.value=window.innerWidth)}e();const o=r.computed(()=>{let n;return t.value<=576?n=W.XS:t.value<=768?n=W.SM:t.value<=992?n=W.MD:t.value<=1200?n=W.LG:t.value<=1600?n=W.XL:n=W.XXL,n});return P()&&(window.addEventListener("resize",e),r.onBeforeUnmount(()=>{window.removeEventListener("resize",e)})),[o,t]},pt={class:"pixelium px-row"},ie=r.defineComponent({name:"Row",__name:"index",props:{gutter:{default:0},justify:{default:"start"},align:{default:"start"},wrap:{type:Boolean,default:!0}},setup(t){const e=t,[o]=ee(),n=r.computed(()=>{if(H(e.gutter))return{x:e.gutter,y:e.gutter};if("x"in e.gutter||"y"in e.gutter)return{x:e.gutter.x||0,y:e.gutter.y||0};const s=e.gutter[o.value];return H(s)?{x:s,y:s}:ye({x:0,y:0},s)});return r.provide("px-row-provide",n),(s,a)=>(r.openBlock(),r.createElementBlock("div",pt,[r.createElementVNode("div",{class:r.normalizeClass(["px-row-inner",{[`px-row__justify-${e.justify}`]:!0,[`px-row__align-${e.align}`]:!0,"px-row__wrap":!!e.wrap}]),style:r.normalizeStyle({marginLeft:n.value?-n.value.x/2+"px":void 0,marginRight:n.value?-n.value.x/2+"px":void 0,marginTop:n.value?-n.value.y/2+"px":void 0,marginBottom:n.value?-n.value.y/2+"px":void 0})},[r.renderSlot(s.$slots,"default")],6)]))}}),Me=r.defineComponent({name:"Col",__name:"index",props:{offset:{default:0},span:{default:24}},setup(t){var c;const e=t,[o]=ee(),n=r.computed(()=>H(e.offset)?e.offset:e.offset[o.value]||0),s=r.computed(()=>H(e.span)?e.span:e.span[o.value]||24),a=r.getCurrentInstance(),u=r.ref(((c=a==null?void 0:a.parent)==null?void 0:c.type)===ie).value&&r.inject("px-row-provide")||r.ref({x:0,y:0});return(i,h)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pixelium px-col",{[`px-col__span-${s.value}`]:!0,[`px-col__offset-${n.value}`]:!0}]),style:r.normalizeStyle({paddingLeft:r.unref(u)?r.unref(u).x/2+"px":void 0,paddingRight:r.unref(u)?r.unref(u).x/2+"px":void 0,paddingTop:r.unref(u)?r.unref(u).y/2+"px":void 0,paddingBottom:r.unref(u)?r.unref(u).y/2+"px":void 0})},[r.renderSlot(i.$slots,"default")],6))}}),Ve=r.defineComponent({name:"Divider",__name:"index",props:{direction:{default:"horizontal"},variant:{default:"solid"},margin:null,size:null},setup(t){const e=t,o=r.computed(()=>{if(!G(e.margin))return H(e.margin)?`${e.margin}px`:e.margin}),n=r.computed(()=>{if(!G(e.size))return H(e.size)?`${e.size}px`:e.size});return(s,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pixelium px-divider",{[`px-divider__${e.direction}`]:!0,[`px-divider__${e.variant}`]:!0}]),style:r.normalizeStyle({marginLeft:e.direction==="vertical"?o.value:void 0,marginRight:e.direction==="vertical"?o.value:void 0,marginTop:e.direction==="horizontal"?o.value:void 0,marginBottom:e.direction==="horizontal"?o.value:void 0,borderBottomWidth:e.direction==="horizontal"?n.value:void 0,borderRightWidth:e.direction==="vertical"?n.value:void 0})},null,6))}}),ht=(t,e)=>!!(t&&t.shapeFlag&1),gt=(t,e)=>!!(t&&t.shapeFlag&6),vt=(t,e)=>!!(t&&t.shapeFlag&8),_t=(t,e)=>!!(t&&t.shapeFlag&16),yt=(t,e)=>!!(t&&t.shapeFlag&32),te=t=>{var o,n;const e=[];for(const s of t??[])ht(s)||gt(s)||vt(s)?e.push(s):_t(s,s.children)?e.push(...te(s.children)):yt(s,s.children)?e.push(...te((n=(o=s.children).default)==null?void 0:n.call(o))):le(s)&&e.push(...te(s));return e},He=r.defineComponent({name:"Space",__name:"index",props:{margin:{default:"medium"},direction:{default:"horizontal"},justify:{default:"start"},align:null,wrap:{type:Boolean,default:!0},inline:{type:Boolean,default:!1}},setup(t){var l;const e=t,o=r.computed(()=>e.align?e.align:e.direction==="horizontal"?"center":"stretch"),n=r.useSlots(),s=te(((l=n.default)==null?void 0:l.call(n))||[]),a=r.computed(()=>{if(!(!e.margin||e.margin==="small"||e.margin==="medium"||e.margin==="large")){if(H(e.margin))return{x:e.margin,y:e.margin};if("x"in e.margin||"y"in e.margin){const u=H(e.margin.x)?e.margin.x:0,c=H(e.margin.y)?e.margin.y:0;return{x:u,y:c}}}});return()=>r.createVNode("div",{class:{pixelium:!0,"px-space":!0,"px-space__inline":!!e.inline}},[r.createVNode("div",{class:{"px-space-inner":!0,"px-space__small":e.margin==="small","px-space__large":e.margin==="large",[`px-space__justify-${e.justify}`]:!0,[`px-space__align-${o.value}`]:!0,[`px-space__${e.direction}`]:!0,"px-space__wrap":!!e.wrap},style:{marginTop:a.value?-a.value.y/2+"px":void 0,marginBottom:a.value?-a.value.y/2+"px":void 0,marginLeft:a.value?-a.value.x/2+"px":void 0,marginRight:a.value?-a.value.x/2+"px":void 0}},[s.map((u,c)=>r.createVNode(r.Fragment,{key:u.key||`px-space-item-${c}`},[r.createVNode("div",{class:"px-space-item",style:{marginTop:a.value?a.value.y/2+"px":void 0,marginBottom:a.value?a.value.y/2+"px":void 0,marginLeft:a.value?a.value.x/2+"px":void 0,marginRight:a.value?a.value.x/2+"px":void 0}},[u])]))])])}}),fe=r.defineComponent({name:"Grid",__name:"index",props:{column:{default:24},gutter:{default:0}},setup(t){const e=t,[o]=ee(),n=r.computed(()=>{if(H(e.gutter))return{x:e.gutter,y:e.gutter};if("x"in e.gutter||"y"in e.gutter)return{x:e.gutter.x||0,y:e.gutter.y||0};const l=e.gutter[o.value];return H(l)?{x:l,y:l}:ye({x:0,y:0},l)}),s=r.computed(()=>H(e.column)?e.column:e.column[o.value]||24),a=r.ref([]);return r.provide("px-grid-provide",{column:s,gutter:n,itemsStat:a}),(l,u)=>(r.openBlock(),r.createElementBlock("div",{class:"pixelium px-grid",style:r.normalizeStyle({gridTemplateColumns:`repeat(${s.value}, minmax(0, 1fr))`,gap:n.value?`${n.value.y}px ${n.value.x}px`:void 0})},[r.renderSlot(l.$slots,"default")],4))}}),de=new WeakMap,Z=new WeakMap,xt=t=>()=>{const e=Z.get(t);e==null||e.forEach(o=>o())},bt=()=>{const t=r.ref(-1),e=r.getCurrentInstance(),o=()=>{if(e&&e.vnode.el instanceof HTMLElement){const s=e.vnode.el.parentElement;if(s&&s.children.length){const a=[...s.children];t.value=a.indexOf(e.vnode.el)}}};let n=null;return P()&&(r.onMounted(()=>{setTimeout(()=>{var s;if(n=((s=e==null?void 0:e.vnode)==null?void 0:s.el)instanceof HTMLElement?e.vnode.el.parentElement:null,n){const a=de.get(n)||new MutationObserver(xt(n));de.set(n,a),Z.set(n,[...Z.get(n)||[],o]),a.observe(n,{childList:!0})}o()})}),r.onUpdated(()=>{setTimeout(()=>{o()})}),r.onBeforeUnmount(()=>{var s;n&&((s=de.get(n))==null||s.disconnect(),Z.set(n,(Z.get(n)||[]).filter(a=>a!==o)))})),t},Ee=r.defineComponent({name:"GridItem",__name:"index",props:{offset:{default:0},span:null},setup(t){var m;const e=r.getCurrentInstance(),n=r.ref(((m=e==null?void 0:e.parent)==null?void 0:m.type)===fe).value?r.inject("px-grid-provide"):void 0,s=t,a=r.useId(),l=bt(),[u]=ee(),c=r.computed(()=>H(s.offset)?s.offset:s.offset[u.value]||0),i=r.computed(()=>s.span===void 0?(n==null?void 0:n.column.value)||24:H(s.span)?s.span:s.span[u.value]||24);r.onMounted(()=>{n==null||n.itemsStat.value.push({id:a,index:l.value,offset:c.value,span:i.value})}),r.watch([l,c,i],()=>{const f=n==null?void 0:n.itemsStat.value.find(d=>d.id===a);f?(f.index=l.value,f.offset=c.value,f.span=i.value):n==null||n.itemsStat.value.push({id:a,index:l.value,offset:c.value,span:i.value})}),r.onBeforeUnmount(()=>{const f=n==null?void 0:n.itemsStat.value.findIndex(d=>d.id===a);f!==void 0&&f>-1&&(n==null||n.itemsStat.value.splice(f,1))});const h=r.computed(()=>{if(!n)return;if(c.value+i.value>n.column.value)return`${c.value+1} / span ${i.value}`;const f=n.itemsStat.value.filter(g=>g.index!==-1&&g.index<l.value);if(f.length===0)return`${c.value+1} / span ${i.value}`;let d=0;return f.forEach(g=>{if(g.span+g.offset>=n.column.value){d=0;return}d+=g.span+g.offset,d>n.column.value?d=g.span+g.offset:d===n.column.value&&(d=0)}),d+c.value+i.value>n.column.value?`${c.value+1} / span ${i.value}`:`${d+c.value+1} / span ${i.value}`});return(f,d)=>(r.openBlock(),r.createElementBlock("div",{class:"pixelium px-grid-item",style:r.normalizeStyle({gridColumn:h.value})},[r.renderSlot(f.$slots,"default")],4))}}),me=r.defineComponent({name:"Container",__name:"index",props:{direction:null},setup(t){const e=r.ref(0);r.provide("px-container-provide",e);const o=t;return(n,s)=>(r.openBlock(),r.createElementBlock("section",{class:r.normalizeClass(["pixelium px-container",{"px-container__has-aside":!!e.value,[`px-container__${o.direction}`]:!!o.direction}])},[r.renderSlot(n.$slots,"default")],2))}}),wt={class:"pixelium px-main"},Ie=r.defineComponent({name:"Main",__name:"index",setup(t){return(e,o)=>(r.openBlock(),r.createElementBlock("main",wt,[r.renderSlot(e.$slots,"default")]))}}),Le=r.defineComponent({name:"Aside",__name:"index",props:{width:null,bordered:{type:Boolean,default:!1},side:{default:"left"},dark:{type:Boolean,default:!1}},setup(t){var u;const e=r.getCurrentInstance(),n=r.ref(((u=e==null?void 0:e.parent)==null?void 0:u.type)===me).value?r.inject("px-container-provide"):void 0;r.onMounted(()=>{n&&(n.value+=1)}),r.onBeforeUnmount(()=>{n&&(n.value-=1)});const s=t,a=j(),l=r.computed(()=>G(s.width)?void 0:H(s.width)?`${s.width}px`:s.width);return(c,i)=>(r.openBlock(),r.createElementBlock("aside",{class:r.normalizeClass(["pixelium px-aside",{"px-aside__dark":!r.unref(a)&&!!s.dark,"px-aside__bordered":!!s.bordered,[`px-aside__${s.side}`]:!0}]),style:r.normalizeStyle({width:l.value})},[r.renderSlot(c.$slots,"default")],6))}}),Te=r.defineComponent({name:"Header",__name:"index",props:{minHeight:null,bordered:{type:Boolean},dark:{type:Boolean,default:!1}},setup(t){const e=t,o=j(),n=r.computed(()=>G(e.minHeight)?void 0:H(e.minHeight)?`${e.minHeight}px`:e.minHeight);return(s,a)=>(r.openBlock(),r.createElementBlock("header",{class:r.normalizeClass(["pixelium px-header",{"px-header__dark":!r.unref(o)&&!!e.dark,"px-header__bordered":!!e.bordered}]),style:r.normalizeStyle({minHeight:n.value})},[r.renderSlot(s.$slots,"default")],6))}}),Re=r.defineComponent({name:"Footer",__name:"index",props:{minHeight:null,bordered:{type:Boolean},dark:{type:Boolean,default:!1}},setup(t){const e=t,o=j(),n=r.computed(()=>G(e.minHeight)?void 0:H(e.minHeight)?`${e.minHeight}px`:e.minHeight);return(s,a)=>(r.openBlock(),r.createElementBlock("footer",{class:r.normalizeClass(["pixelium px-footer",{"px-footer__dark":!r.unref(o)&&!!e.dark,"px-footer__bordered":!!e.bordered}]),style:r.normalizeStyle({minHeight:n.value})},[r.renderSlot(s.$slots,"default")],6))}});typeof process<"u"&&process.env.NODE_ENV;const kt="Pixelium";function Ne(t){throw new Error(`[${kt}] ${t}`)}const Bt=(t,e)=>{var n,s;if(!P())return;const o={light:[],dark:[]};if(J(e)){const a=X(e);o.light=Q(a.r,a.g,a.b,a.a,!1).map(l=>V(l)),o.dark=Q(a.r,a.g,a.b,a.a,!0).map(l=>V(l))}else(n=e.light)!=null&&n.length&&e.light.length!==10&&Ne("The length of color.light does not match the required number of CSS color palette (10)."),(s=e.dark)!=null&&s.length&&e.dark.length!==10&&Ne("The length of color.dark does not match the required number of CSS color palette (10)."),o.light=e.light||[],o.dark=e.dark||[];o.light.forEach((a,l)=>{document.documentElement.style.setProperty(`--px-${t}-light-custom-${l+1}`,a)}),o.dark.forEach((a,l)=>{document.documentElement.style.setProperty(`--px-${t}-dark-custom-${l+1}`,a)})},Pe=t=>{if(!P())return;const e=document.documentElement;e.classList.remove("light","dark"),t!=="unset"&&e.classList.add(t)};function Ae(t){const e=r.ref(!1);if(P()){let u=function(i){e.value=i.matches};const c=window.matchMedia("(prefers-color-scheme: dark)");u(c),c.addEventListener("change",u),r.onBeforeUnmount(()=>{c.removeEventListener("change",u)})}const o=r.ref(t||e.value?"dark":"light");t&&Pe(o.value);const n=()=>{o.value=o.value==="unset"?e.value?"light":"dark":o.value==="light"?"dark":"light"},s=()=>{o.value="unset"},a=()=>{o.value=e.value?"dark":"light"},l=r.watch(o,Pe,{flush:"post"});return r.onScopeDispose(()=>{l()}),[o,n,s,a]}const Oe=r.defineComponent({name:"Icon",__name:"index",props:{size:{default:"1em"},color:{default:"currentColor"},rotate:{default:0},spin:{type:Boolean,default:!1},flip:{default:"none"}},setup(t){const e=t,o=r.computed(()=>{let s=1,a=1;return(e.flip==="horizontal"||e.flip==="both")&&(s=-1),(e.flip==="vertical"||e.flip==="both")&&(a=-1),`scale(${s}, ${a}) rotate(${e.rotate}deg)`}),n=r.computed(()=>H(e.size)?`${e.size}px`:e.size);return(s,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({"pixelium px-icon":!0,"px-icon__spin":!!e.spin}),style:r.normalizeStyle({height:n.value,width:n.value,fontSize:n.value,color:e.color,transform:o.value})},[r.renderSlot(s.$slots,"default")],6))}}),Ct=[ke,ae,Be,$e,ie,Me,Ve,He,fe,Ee,me,Ie,Le,Te,Re,Oe],$t="Px",De=(t,e={prefix:$t})=>{Ct.forEach(o=>{o.name&&t.component(e.prefix+o.name,o)}),e.attachToApp!==!1&&(t.config.globalProperties.PixeliumVue={message:Y,useThemeMode:Ae}),e.attachToWindow!==!1&&P()&&(window.$message=Y)},Mt={install:De};x.Aside=Le,x.Button=ke,x.ButtonGroup=ae,x.Col=Me,x.Container=me,x.Divider=Ve,x.Footer=Re,x.Grid=fe,x.GridItem=Ee,x.Header=Te,x.Icon=Oe,x.Link=Be,x.Main=Ie,x.Message=Y,x.MessageBox=$e,x.Row=ie,x.Space=He,x.default=Mt,x.install=De,x.setThemeColor=Bt,x.useThemeMode=Ae,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(O,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(O=typeof globalThis<"u"?globalThis:O||self,e(O.PixeliumVue={},O.Vue))})(this,(function(O,e){"use strict";var Br=Object.defineProperty;var Rr=(O,e,be)=>e in O?Br(O,e,{enumerable:!0,configurable:!0,writable:!0,value:be}):O[e]=be;var Lt=(O,e,be)=>Rr(O,typeof e!="symbol"?e+"":e,be);const be=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M23 9v6h-1v2h-3v-2h1V9h-1V7h-1V6h-1V5h-2V4h-2V3h-1V1h3v1h2v1h2v1h1v1h1v2h1v2z"},null,-1)])],4))}}),_o=/\.|\[(\d+)\]/;function Co(n){return n.split(_o).filter(Boolean)}function sn(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ft(n){return n!==null&&(typeof n=="object"||typeof n=="function")}function xo(n,o,l){const t=Co(o),r=t.length;let a=n;for(let c=0;c<r;c++)if(ft(a))a=a[t[c]];else return l;return l??a}function pt(n){return typeof n=="function"}function Vo(n,o,l={}){const{start:t="{",end:r="}"}=l,a=new RegExp(`${sn(t)}(.*?)${sn(r)}`,"g");return n.replace(a,(c,s)=>(pt(o)?o(s):xo(o,s))??c)}function he(n){return typeof n=="string"||n instanceof String}function Bo(n){return n===null}function te(n){return typeof n=="number"||n instanceof Number}function Ro(n){return n===void 0}function De(n){return Array.isArray(n)}function Mo(n){return te(n)&&(typeof n=="number"?n===1/0||n===-1/0:n.valueOf()===1/0||n.valueOf()===-1/0)}function Dt(n){return te(n)&&(typeof n=="number"?Number.isNaN(n):Number.isNaN(n.valueOf()))}function ue(n){return n==null}function cn(...n){return n.reduce((o,l)=>{if(ue(l))return o;const t=Object.keys(l);for(const r of t){const a=o[r],c=l[r];(ue(a)||!ue(c))&&(o[r]=c)}return o},{})}function Ho(n,o,l){let t,r;const{immediate:a=!1,maxWait:c}=l||{};return function(...s){c!==void 0&&!r&&(r=setTimeout(()=>{r=void 0,n.apply(this,s)},c)),!t&&a&&n.apply(this,s),t&&clearTimeout(t),t=setTimeout(()=>{r&&(clearTimeout(r),r=void 0),n.apply(this,s)},o)}}typeof process<"u"&&process.env.NODE_ENV;const fe={r:0,g:0,b:0,a:0},un=20;var Se=(n=>(n.XS="xs",n.SM="sm",n.MD="md",n.LG="lg",n.XL="xl",n.XXL="xxl",n))(Se||{});const ze="group",Ae=[[Math.PI,Math.PI*3/2],[Math.PI*3/2,Math.PI*2],[0,Math.PI/2],[Math.PI/2,Math.PI]],mt=(n,o,l)=>Math.max(o,Math.min(l,n)),ve=(n,o)=>Array(o).fill(n),At=(n,o=[])=>{if(!n)return[...o];const l=n.toLowerCase(),t=o.length,r=[];for(let a=0;a<t;a++){const c=o[a];if(ft(c))if("type"in c&&c.type===ze){const s=At(n,c.children);s.length&&r.push({...c,children:s})}else c.label.toLowerCase().includes(l)&&r.push(c);else c.toLowerCase().includes(l)&&r.push(c)}return r},xt=(n,o,l=!1)=>{if(!n)return[];const t=o.length,r=[];for(let a=0;a<t;a++){const c=o[a];if(ft(c)){if("type"in c&&c.type===ze){const s=xt(n,c.children,l);if(s.length){r.push(s[0],c);break}}else if(l&&c.label===n||c.value===n){r.push(c);break}}else if(c===n){r.push(c);break}}return r},J=()=>typeof window<"u";function Eo(n,o,l,t){let r=Math.atan2(o,n);return r<0&&(r+=Math.PI*2),r>=l&&r<=t}function To(n,o,l,t,r,a,c,s){const i=[[o,l],[-o,l],[o,-l],[-o,-l],[l,o],[-l,o],[l,-o],[-l,-o]];for(const[f,d]of i)Eo(f,d,a,c)&&n.fillRect(t+f,r+d,s,s)}function xe(n,o,l,t,r=0,a=Math.PI*2,c){let s=0,i=t,f=3-2*t;for(;s<=i+c;)To(n,s,i,o,l,r,a,c),s+=c,f>0?(i-=c,f+=4*(s-i)+10):f+=4*s+6}function Oe(n,o,l,t){const r=n.canvas.width,a=n.canvas.height;if(r<=0||a<=0)return;const c=n.getImageData(0,0,r,a),s=new Uint32Array(c.data.buffer),i=t.a<<24|t.b<<16|t.g<<8|t.r,f=l*r+o,d=s[f];if(d===i)return;const u=[],p=g(o,l,1);p&&u.push({...p,dy:1});const m=g(o,l-1,-1);for(m&&u.push({...m,dy:-1});u.length;){const{y:h,left:y,right:k,dy:b}=u.pop(),v=h+b;if(v<0||v>=a)continue;let _=y;for(;_<=k;){for(;_<=k&&s[v*r+_]!==d;)_++;if(_>k)break;const C=_,V=g(C,v,b);V&&u.push(V),_=V?V.right+1:C+1}}n.putImageData(c,0,0);function g(h,y,k){let b=h;for(;b>0&&s[y*r+b-1]===d;)b--;let v=h;for(;v<r-1&&s[y*r+v+1]===d;)v++;for(let _=b;_<=v;_++)s[y*r+_]=i;return{y,left:b,right:v,dy:k}}}const ce=(n,o,l)=>te(o)?Math.max(o,l):Math.max(n.height*parseFloat(o)/100,l),$o=(n,o,l)=>{if(!o)return ve(l,4);if(!De(o))return ve(ce(n,o,l),4);switch(o.length){case 1:return ve(ce(n,o[0],l),4);case 2:{const t=ce(n,o[0],l),r=ce(n,o[1],l);return[t,r,t,r]}case 3:{const t=ce(n,o[0],l),r=ce(n,o[2],l),a=ce(n,o[1],l);return[t,a,r,a]}default:return o.map(t=>ce(n,t,l))}},No=(n,o,l,t,r)=>{if(!o)return ve(l,4);if(!De(o)){const a=ce(n,o,l);return r?[l,a,a,l]:t?[a,l,l,a]:ve(l,4)}switch(o.length){case 1:const a=ce(n,o[0],l);return r?[l,a,a,l]:t?[a,l,l,a]:ve(l,4);case 2:{const c=ce(n,o[0],l),s=ce(n,o[1],l);return r?[l,s,s,l]:t?[c,l,l,c]:ve(l,4)}case 3:{const c=ce(n,o[0],l),s=ce(n,o[2],l),i=ce(n,o[1],l);return r?[l,i,s,l]:t?[c,l,l,i]:ve(l,4)}default:return r?[l,ce(n,o[1],l),ce(n,o[2],l),l]:t?[ce(n,o[0],l),l,l,ce(n,o[3],l)]:ve(l,4)}},qe=(n,o,l,t,r="medium",a=!1,c=!1,s=!1)=>{if(!J())return ve(o,4);if(a){if(l)return No(n,l,o,c,s);const i=getComputedStyle(document.documentElement),f=parseInt(i.getPropertyValue(`--px-${r}-base-size`))+2*o;switch(t){case"round":let d=ce(n,"50%",o);d=mt(d,o,f/2),d=Math.max(Math.round(d/o)*o,o);const u=ve(d,4);return s?u.map((p,m)=>m<1||m>2?o:p):c?u.map((p,m)=>m>0&&m<3?o:p):ve(o,4);default:return ve(o,4)}}else{if(l)return $o(n,l,o);switch(t){case"round":case"circle":let i=ce(n,"50%",o);return i=Math.max(Math.round(i/o)*o,o),ve(i,4);default:return ve(o,4)}}};function ht(n,o){return Math.ceil((-6+Math.sqrt(36-48*n+32*n*o))/(8*n))*n}const _e=()=>{if(!J())return 4;const n=getComputedStyle(document.documentElement);return parseInt(n.getPropertyValue("--px-bit"))},Fe=(n,o,l,t,r=0,a=0)=>[[n[0],n[0]],[o-r-n[1]-t,n[1]],[o-r-n[2]-t,l-a-n[2]-t],[n[3],l-a-n[3]-t]],Re=(n,o)=>{if(!o.value||!n.value)return;const l=o.value.getContext("2d",{willReadFrequently:!0});if(!l)return;l.imageSmoothingEnabled=!1;const t=n.value.getBoundingClientRect();if(!(t.width<=0||t.height<=0))return o.value.width=t.width,o.value.height=t.height,{ctx:l,width:o.value.width,height:o.value.height,rect:t,canvas:o.value}};function dn(n){if(!Number.isInteger(n)||n<=0)throw new RangeError("max must be a positive integer");const o=new Map;return{get(l){const t=o.get(l);if(t!==void 0)return o.delete(l),o.set(l,t),t},set(l,t){o.has(l)?o.delete(l):o.size>=n&&o.delete(o.keys().next().value),o.set(l,t)},delete(l){return o.delete(l)},clear(){o.clear()},has(l){return o.has(l)},get size(){return o.size}}}const fn=dn(120);function et(n){const o=fn.get(n);if(o)return{...o};let l={r:0,g:0,b:0,a:255};if(n.startsWith("rgb(")||n.startsWith("rgba(")){const t=n.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)/i);t&&(l.r=parseInt(t[1],10),l.g=parseInt(t[2],10),l.b=parseInt(t[3],10),t[4]&&(l.a=Math.round(parseFloat(t[4])*255)))}else n.startsWith("#")&&(n=n.slice(1),n.length===3?(l.r=parseInt(n[0]+n[0],16),l.g=parseInt(n[1]+n[1],16),l.b=parseInt(n[2]+n[2],16)):n.length===4?(l.r=parseInt(n[0]+n[0],16),l.g=parseInt(n[1]+n[1],16),l.b=parseInt(n[2]+n[2],16),l.a=parseInt(n[3]+n[3],16)):n.length===6?(l.r=parseInt(n.slice(0,2),16),l.g=parseInt(n.slice(2,4),16),l.b=parseInt(n.slice(4,6),16)):n.length===8&&(l.r=parseInt(n.slice(0,2),16),l.g=parseInt(n.slice(2,4),16),l.b=parseInt(n.slice(4,6),16),l.a=parseInt(n.slice(6,8),16)));return fn.set(n,l),{...l}}const w=(n,o)=>J()?et(getComputedStyle(document.documentElement).getPropertyValue(`--px-${n}-${o}`)):fe;function Ot(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Po(n,o,l,t=255){const r=n/255,a=o/255,c=l/255,s=Ot(r),i=Ot(a),f=Ot(c);let d=s*.41239079926595934+i*.357584339383878+f*.1804807884018343,u=s*.21263900587151027+i*.715168678767756+f*.07219231536073371,p=s*.01933081871559182+i*.11919477979462598+f*.9505321522496607,m=.819022437996703*d+.3619062600528904*u-.1288737815209879*p,g=.0329836539323885*d+.9292868615863434*u+.0361446663506424*p,h=.0481771893596242*d+.2642395317527308*u+.6335478284694309*p;m=Math.cbrt(m),g=Math.cbrt(g),h=Math.cbrt(h);const y=.210454268309314*m+.7936177747023054*g-.0040720430116193*h,k=1.9779985324311684*m-2.42859224204858*g+.450593709617411*h,b=.0259040424655478*m+.7827717124575296*g-.8086757549230774*h,v=Math.sqrt(k*k+b*b);let _=Math.atan2(b,k)*180/Math.PI;return _<0&&(_+=360),{l:y,c:v,h:_,a:t}}function Ft(n){return n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055}function Vt(n,o,l,t=255){const r=l*Math.PI/180,a=o*Math.cos(r),c=o*Math.sin(r);let s=n+.3963377773761749*a+.2158037573099136*c,i=n-.1055613458156586*a-.0638541728258133*c,f=n-.0894841775298119*a-1.2914855480194092*c;s=s*s*s,i=i*i*i,f=f*f*f;const d=1.2268798758459243*s-.5578149944602171*i+.2813910456659647*f,u=-.0405757452148008*s+1.112286803280317*i-.0717110580655164*f,p=-.0763729366746601*s-.4214933324022432*i+1.5869240198367816*f,m=3.2409699419045226*d-1.537383177570094*u-.4986107602930034*p,g=-.9692436362808796*d+1.8759675015077202*u+.04155505740717559*p,h=.05563007969699366*d-.20397695888897652*u+1.0569715142428786*p,y=Ft(m),k=Ft(g),b=Ft(h);return{r:Math.round(y*255),g:Math.round(k*255),b:Math.round(b*255),a:t}}function Io(n,o,l){const{r:t,g:r,b:a}=Vt(o,n,l);return t>=0&&t<=255&&r>=0&&r<=255&&a>=0&&a<=255}function Gt(n,o){let t=0,r=2;for(;r-t>1e-6;){const a=(t+r)/2;Io(a,n,o)?t=a:r=a}return t}const pn=dn(60);function ot(n,o,l,t=255,r=!1){const a=`${n},${o},${l},${t},${r}`,c=pn.get(a);if(c)return c;const s=Po(n,o,l,t);let i=[];const f=s.c<.049?0:.049,d=r?Math.min(Math.max(s.l,.05),.85):Math.min(Math.max(s.l,.15),.95),u=Math.min(Math.max(s.c,f),Gt(d,s.h)),p=Math.min(d+.35,r?.85:.9),m=Math.max(d-.35,r?.1:.15),g=r?(d-m)/4:(p-d)/4,h=(u-f)/4,y=r?(p-d)/3:(d-m)/3,k=(u-f)/3;for(let b=0;b<5;b++){const v=d+(r?-1:1)*g*(5-b),_=Math.min(u-h*(5-b),Gt(v,s.h)),C=s.h,V=Vt(v,_,C,t);i.push(V)}i.push(Vt(d,u,s.h,t));for(let b=0;b<4;b++){const v=d-(r?-1:1)*y*(b+1),_=Math.min(u-k*(b+1),Gt(v,s.h)),C=s.h,V=Vt(v,_,C,t);i.push(V)}return pn.set(a,i),i}const F=n=>`rgba(${n.r}, ${n.g}, ${n.b}, ${n.a/255})`;function Lo(n){return{all:n=n||new Map,on:function(o,l){var t=n.get(o);t?t.push(l):n.set(o,[l])},off:function(o,l){var t=n.get(o);t&&(l?t.splice(t.indexOf(l)>>>0,1):n.set(o,[]))},emit:function(o,l){var t=n.get(o);t&&t.slice().map(function(r){r(l)}),(t=n.get("*"))&&t.slice().map(function(r){r(o,l)})}}}const lt=Lo(),Ge=n=>{const o=e.ref(-1),l=e.ref(!1),t=e.ref(!1),r=e.getCurrentInstance(),a=()=>{if(r&&r.vnode.el instanceof HTMLElement){const c=r.vnode.el.parentElement;if(c&&c.children.length){const s=[...c.children];o.value=s.indexOf(r.vnode.el),l.value=o.value===c.children.length-1,t.value=o.value===0}else o.value=-1,l.value=!1,t.value=!1}};return J()&&(lt.on(n,a),e.onMounted(()=>{e.nextTick(()=>{a()})}),e.onUpdated(()=>{a()}),e.onBeforeUnmount(()=>{lt.off(n,a)})),[o,t,l]},Wt=n=>{e.onUpdated(()=>{lt.emit(n)})},mn="px-button-group-update",hn="px-grid-update",Ut="px-global-css-var-change",Ye="px-input-group-update",gn="px-button-group-provide",Ke="px-input-group-provide",yn="px-grid-provide",Do={class:"pixelium px-button-group"},jt=e.defineComponent({name:"ButtonGroup",__name:"index",props:{borderRadius:null,shape:{default:"default"},size:{default:"medium"},disabled:{type:Boolean,default:!1},loading:{type:Boolean},variant:null},setup(n){const o=n;return e.provide(gn,o),Wt(mn),(l,t)=>(e.openBlock(),e.createElementBlock("div",Do,[e.renderSlot(l.$slots,"default")]))}}),Ao={class:"pixelium px-input-group",ref:"slotWrapper"},We=e.defineComponent({name:"InputGroup",__name:"index",props:{borderRadius:null,shape:{default:"default"},size:{default:"medium"},disabled:{type:Boolean,default:!1}},setup(n){const o=n;return e.provide(Ke,o),Wt(Ye),(l,t)=>(e.openBlock(),e.createElementBlock("div",Ao,[e.renderSlot(l.$slots,"default")],512))}});function Oo(n,o,l,t="primary",r,a,c){if(r)switch(l){case"text":return n?fe:c?r[1]:a&&!o?r[0]:fe;case"outline":return fe;case"plain":return n?r[0]:c?r[2]:a&&!o?r[1]:r[0];default:return n?r[1]:c?r[5]:a&&!o?r[4]:r[5]}else if(t!=="info")switch(l){case"text":return n?fe:c?w(t,2):a&&!o?w(t,1):fe;case"outline":return fe;case"plain":return n?w(t,1):c?w(t,3):a&&!o?w(t,2):w(t,1);default:return n?w(t,2):c?w(t,6):a&&!o?w(t,5):w(t,6)}else switch(l){case"outline":return fe;case"text":return n?fe:c?w("neutral",3):a&&!o?w("neutral",2):fe;case"plain":return n?w("neutral",1):c?w("neutral",4):a&&!o?w("neutral",3):w("neutral",1);default:return n?w("neutral",1):c?w("neutral",3):a&&!o?w("neutral",2):w("neutral",1)}}function Fo(n,o,l,t="primary",r,a,c){if(r)switch(l){case"text":return n?fe:c?r[1]:a&&!o?r[0]:fe;case"plain":return n?r[1]:c?r[3]:a&&!o?r[2]:r[1];case"outline":return n?r[0]:c?r[6]:a&&!o?r[4]:r[5];default:return n?w("neutral",8):w("neutral",10)}else if(t!=="info")switch(l){case"text":return n?fe:c?w(t,2):a&&!o?w(t,1):fe;case"plain":return n?w(t,2):c?w(t,4):a&&!o?w(t,3):w(t,2);case"outline":return n?w(t,1):c?w(t,7):a&&!o?w(t,5):w(t,6);default:return n?w("neutral",8):w("neutral",10)}else{switch(l){case"text":return n?fe:c?w("neutral",3):a&&!o?w("neutral",2):fe;case"plain":return n?w("neutral",5):c?w("neutral",9):a&&!o?w("neutral",8):w("neutral",7);case"outline":return n?w("neutral",6):c?w("neutral",8):a&&!o?w("neutral",9):w("neutral",10)}return n?w("neutral",8):w("neutral",10)}}const Go=(n,o,l,t,r,a,c,s,i,f,d,u)=>{n.fillStyle=F(c);for(let m=0;m<4;m++)r[m]>s&&(!(m===1||m===2)||f&&(u||i==="text")||!f)&&xe(n,t[m][0],t[m][1],r[m],a[m][0],a[m][1],s);t[1][0]+s>t[0][0]&&n.fillRect(t[0][0],0,t[1][0]-t[0][0]+s,s),t[2][1]+s>t[1][1]&&(f&&(u||i==="text")||!f)&&n.fillRect(o-s,t[1][1],s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s&&n.fillRect(t[3][0],l-s,t[2][0]-t[3][0]+s,s),!(f&&!d&&i!=="text")&&t[3][1]+s>t[0][1]&&n.fillRect(0,t[0][1],s,t[3][1]-t[0][1]+s),f&&!d&&i!=="text"&&n.fillRect(s/2,0,s/2,l),f&&!u&&i!=="text"&&n.fillRect(o-2*s-1,0,s,l)};function vn(n,o,l="primary",t,r,a){return t?n?t[0]:a?t[6]:r&&!o?t[3]:t[4]:l!=="info"?n?w(l,1):a?w(l,7):r&&!o?w(l,4):w(l,5):n?w("neutral",2):a?w("neutral",5):r&&!o?w("neutral",4):w("neutral",3)}const Wo=(n,o,l,t,r,a,c,s,i,f="primary",d,u,p,m,g,h)=>{const y=ht(c,r[2]),k=ht(c,r[3]),b=ht(c,r[1]),v=ht(c,r[0]),_=+!(u&&!p),C=+!u||u&&m;if(!h||s){const V=vn(s,i,f,d,g,h);n.fillStyle=F(V),r[1]>c&&(xe(n,t[1][0]-c,t[1][1],r[1],a[1][0],a[1][1],c),n.globalCompositeOperation="destination-out",n.fillRect(t[1][0]-c,0,v,c),n.globalCompositeOperation="source-over"),r[2]>c&&(xe(n,t[2][0]-c,t[2][1],r[2],a[2][0],a[2][1],c),n.globalCompositeOperation="destination-out",n.fillRect(t[2][0]-c,l-c,k,c),n.globalCompositeOperation="source-over");const x=t[2][0]+c-t[3][0]+k*_+y*+C-1*+!C;x>0&&n.fillRect(t[3][0]-k*_,l-c*2,x,c);const H=t[2][1]+c-t[1][1]+b+y;H>0&&n.fillRect(o-c*2-(m?0:+u*c*1),t[1][1]-b,c,H)}else{const V=vn(s,i,f,d,g,h);n.fillStyle=F(V),r[0]>c&&(xe(n,t[0][0]+c,t[0][1],r[0],a[0][0],a[0][1],c),n.globalCompositeOperation="destination-out",n.fillRect(t[0][0]+c,0,b,c),n.globalCompositeOperation="source-over"),r[3]>c&&(xe(n,t[3][0]+c,t[3][1],r[3],a[3][0],a[3][1],c),n.globalCompositeOperation="destination-out",n.fillRect(t[3][0]+c,l-c,y,c),n.globalCompositeOperation="source-over");const x=t[1][0]+c-t[0][0]+b*+C+v*_-1*+!C;x>0&&n.fillRect(t[0][0]-v*_,c,x,c);const H=c+t[3][1]-t[0][1]+k+v;H>0&&n.fillRect(c,t[0][1]-v,c,H)}},Uo=(n,o,l,t,r,a)=>{if(!(!n||o==="primary")){if(l)return F(o==="plain"?n[2]:n[1]);if(t)return F(n[5]);if(a&&o!=="plain")return F(n[6]);switch(o){case"text":return F(n[5]);case"outline":return F(r?n[4]:n[5]);case"plain":return F(n[5]);default:return}}},wn=new WeakMap,gt=new WeakMap,jo=n=>()=>{const o=gt.get(n);o==null||o.forEach(l=>l())},we=()=>{const n=e.ref(!1),o=e.ref(void 0);function l(r){n.value=r.matches}if(J()){const r=window.matchMedia("(prefers-color-scheme: dark)");l(r),r.addEventListener("change",l),e.onBeforeUnmount(()=>{r.removeEventListener("change",l)})}const t=()=>{if(J()){let r=!1,a=!1;document.documentElement.className.split(" ").forEach(c=>{c==="dark"&&(r=!0),c==="light"&&(a=!0)}),o.value=r?!0:a?!1:void 0}};return J()&&(e.onMounted(()=>{const r=wn.get(document.documentElement)||new MutationObserver(jo(document.documentElement));wn.set(document.documentElement,r),r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),gt.set(document.documentElement,[...gt.get(document.documentElement)||[],t]),t()}),e.onBeforeUnmount(()=>{gt.set(document.documentElement,(gt.get(document.documentElement)||[]).filter(r=>r!==t))})),e.computed(()=>o.value??n.value)},Ve=(n,o,l)=>{if(!J())return null;const t=new ResizeObserver(o);return e.onMounted(()=>{setTimeout(()=>{l&&o(),n.value&&t.observe(n.value)})}),e.onBeforeUnmount(()=>{t.disconnect()}),t},Me=n=>{if(!J())return;const o=()=>{n()};lt.on(Ut,o),e.onBeforeUnmount(()=>{lt.off(Ut,o)})},Xo=["disabled","type","autofocus"],bn=e.defineComponent({name:"Button",__name:"index",props:{borderRadius:null,shape:{default:"default"},size:{default:"medium"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},theme:{default:"primary"},color:null,block:{type:Boolean,default:!1},nativeType:{default:"button"},autofocus:{type:Boolean,default:!1}},setup(n){var $,A;const o=n,l=e.getCurrentInstance(),t=e.ref((($=l==null?void 0:l.parent)==null?void 0:$.type)===jt),r=e.ref(((A=l==null?void 0:l.parent)==null?void 0:A.type)===We),[a,c,s]=t.value?Ge(mn):r.value?Ge(Ye):[e.ref(0),e.ref(!1),e.ref(!1)],i=e.inject(gn),f=e.inject(Ke),d=e.computed(()=>t.value&&i?i.borderRadius:r.value&&f?f.borderRadius:o.borderRadius),u=e.computed(()=>t.value&&i&&i.variant||o.variant),p=e.computed(()=>t.value&&i?i.size:r.value&&f?f.size:o.size),m=e.computed(()=>t.value&&i?i.shape:r.value&&f?f.shape:o.shape),g=e.computed(()=>t.value&&i?i.disabled||o.disabled:r.value&&f&&f.disabled||o.disabled),h=e.computed(()=>t.value&&i&&i.loading||o.loading),y=e.useSlots(),k=e.ref(!1),b=e.ref(!1),v=T=>{k.value=T},_=T=>{b.value=T},C=we(),V=e.shallowRef(null),x=e.shallowRef(null);e.onMounted(()=>{e.nextTick(()=>{L()})});const H=e.computed(()=>{if(!o.color)return null;const T=et(o.color);return ot(T.r,T.g,T.b,T.a,C.value)}),E=e.computed(()=>Uo(H.value,u.value,g.value,h.value,k.value,b.value));e.watch([d,m,g,h,u,()=>o.theme,H,k,b,C],()=>{L()}),e.watch([c,s],()=>{L()});const L=()=>{const T=Re(x,V);if(!T)return;const I=_e(),{ctx:U,width:K,height:N,canvas:j}=T,D=qe(j,I,d.value,m.value,p.value||"medium",t.value||r.value,c.value,s.value),ie=Fo(g.value,h.value,u.value,o.theme,H.value,k.value,b.value),ne=Fe(D,K,N,I),se=Ae;u.value==="primary"&&Wo(U,K,N,ne,D,se,I,g.value,h.value,o.theme,H.value,t.value||r.value,c.value,s.value,k.value,b.value),Go(U,K,N,ne,D,se,ie,I,u.value,t.value||r.value,c.value,s.value);const S=Oo(g.value,h.value,u.value,o.theme,H.value,k.value,b.value);Oe(U,Math.round(K/2),Math.round(N/2),S)};return Ve(x,L),Me(L),(T,I)=>(e.openBlock(),e.createElementBlock("button",{disabled:g.value||h.value,class:e.normalizeClass(["pixelium px-button",{"px-button__block":!(t.value||r.value)&&!!o.block,"px-button__circle":m.value==="circle","px-button__square":m.value==="square","px-button__loading":h.value,"px-button__large":p.value==="large","px-button__small":p.value==="small","px-button__outline":u.value==="outline","px-button__plain":u.value==="plain","px-button__text":u.value==="text","px-button__disabled":g.value,"px-button__custom":H.value,"px-button__inner":t.value||r.value,[`px-button__${o.theme||"primary"}`]:!0}]),style:e.normalizeStyle({color:E.value}),ref_key:"buttonRef",ref:x,onMouseenter:I[0]||(I[0]=U=>v(!0)),onMouseleave:I[1]||(I[1]=U=>v(!1)),onMousedown:I[2]||(I[2]=U=>_(!0)),onMouseup:I[3]||(I[3]=U=>_(!1)),type:o.nativeType,autofocus:o.autofocus},[e.createElementVNode("canvas",{ref_key:"canvasRef",ref:V,class:"px-button-canvas"},null,512),e.unref(y).icon||h.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-button-icon-wrapper",{"px-button-icon-wrapper__last":!e.unref(y).default}])},[h.value?(e.openBlock(),e.createBlock(e.unref(be),{key:0,class:"px-button-icon px-animation__loading",style:e.normalizeStyle({fill:E.value})},null,8,["style"])):e.renderSlot(T.$slots,"icon",{key:1})],2)):e.createCommentVNode("",!0),e.renderSlot(T.$slots,"default")],46,Xo))}}),qo=["href","target"],kn=e.defineComponent({name:"Link",__name:"index",props:{disabled:{type:Boolean},loading:{type:Boolean},theme:null,color:null,href:null,target:null},setup(n){const o=n,l=e.useSlots(),t=we(),r=e.computed(()=>{if(!o.color)return null;const p=et(o.color);return ot(p.r,p.g,p.b,p.a,t.value)}),a=e.ref(!1),c=e.ref(!1),s=p=>{a.value=p},i=p=>{c.value=p},f=(p,m,g,h,y)=>{if(p)return F(m?p[1]:g?p[5]:y?p[6]:h?p[4]:p[5])},d=e.computed(()=>f(r.value,o.disabled,o.loading,a.value,c.value)),u=p=>{(o.disabled||o.loading)&&p.preventDefault()};return(p,m)=>(e.openBlock(),e.createElementBlock("a",{class:e.normalizeClass(["pixelium px-link",{"px-link__loading":o.loading,"px-link__disabled":o.disabled,"px-link__custom":r.value,[`px-link__${o.theme||"primary"}`]:!0}]),style:e.normalizeStyle({color:d.value}),onMouseenter:m[0]||(m[0]=g=>s(!0)),onMouseleave:m[1]||(m[1]=g=>s(!1)),onMousedown:m[2]||(m[2]=g=>i(!0)),onMouseup:m[3]||(m[3]=g=>i(!1)),href:o.href,target:o.target,onClick:u},[e.unref(l).icon||o.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-link-icon-wrapper",{"px-link-icon-wrapper__last":!e.unref(l).default}])},[o.loading?(e.openBlock(),e.createBlock(e.unref(be),{key:0,class:"px-link-icon px-animation__loading",style:e.normalizeStyle({fill:d.value})},null,8,["style"])):e.renderSlot(p.$slots,"icon",{key:1})],2)):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"default")],46,qo))}}),Yo=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M22 9V7h-1V5h-1V4h-1V3h-2V2h-2V1H9v1H7v1H5v1H4v1H3v2H2v2H1v6h1v2h1v2h1v1h1v1h2v1h2v1h6v-1h2v-1h2v-1h1v-1h1v-2h1v-2h1V9zM11 6h2v2h-2zm-1 9h1v-5h-1V9h3v6h1v2h-4z"},null,-1),e.createElementVNode("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1)])],4))}}),Ko=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M22 20v-2h-1v-2h-1v-2h-1v-2h-1v-2h-1V8h-1V6h-1V4h-1V2h-1V1h-2v1h-1v2H9v2H8v2H7v2H6v2H5v2H4v2H3v2H2v2H1v2h1v1h20v-1h1v-2zm-12-9h4v3h-1v3h-2v-3h-1zm1 7h2v2h-2z"},null,-1)])],4))}}),Qo=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M22 8V7h-1V6h-1V5h-1V4h-1V3h-1V2h-1V1H8v1H7v1H6v1H5v1H4v1H3v1H2v1H1v8h1v1h1v1h1v1h1v1h1v1h1v1h1v1h8v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1V8zm-6 9h-2v-1h-1v-1h-2v1h-1v1H8v-1H7v-2h1v-1h1v-2H8v-1H7V8h1V7h2v1h1v1h2V8h1V7h2v1h1v2h-1v1h-1v2h1v1h1v2h-1z"},null,-1)])],4))}}),Jo=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M22 9V7h-1V5h-1V4h-1V3h-2V2h-2V1H9v1H7v1H5v1H4v1H3v2H2v2H1v6h1v2h1v2h1v1h1v1h2v1h2v1h6v-1h2v-1h2v-1h1v-1h1v-2h1v-2h1V9zm-4 3h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-2v-1H9v-1H8v-1H7v-1H6v-2h1v-1h2v1h1v1h2v-1h1v-1h1v-1h1V9h1V8h2v1h1v2h-1z"},null,-1)])],4))}}),tt=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M22 9V7h-1V5h-1V4h-1V3h-2V2h-2V1H9v1H7v1H5v1H4v1H3v2H2v2H1v6h1v2h1v2h1v1h1v1h2v1h2v1h6v-1h2v-1h2v-1h1v-1h1v-2h1v-2h1V9zm-8 7v-1h-1v-1h-2v1h-1v1H9v1H8v-1H7v-1h1v-1h1v-1h1v-2H9v-1H8V9H7V8h1V7h1v1h1v1h1v1h2V9h1V8h1V7h1v1h1v1h-1v1h-1v1h-1v2h1v1h1v1h1v1h-1v1h-1v-1z"},null,-1)])],4))}}),Zo=e.defineComponent({__name:"index",props:{content:{default:""},icon:null,duration:{default:3e3},id:null,type:{default:"normal"},color:null,closable:{type:Boolean}},emits:["close"],setup(n,{expose:o,emit:l}){const t=n,r=e.ref(!1),a=e.ref(!1),c=E=>{a.value=E},s=E=>{r.value=E},i=e.ref(!1);let f;e.onMounted(()=>{i.value=!0,d()}),e.onBeforeUnmount(()=>{clearTimeout(f)});function d(){f=setTimeout(()=>p(),t.duration)}function u(){clearTimeout(f),f=void 0}function p(){i.value=!1}const m=l,g=()=>{m("close",t.id),u()},h=e.shallowRef(null),y=e.shallowRef(null),k=E=>{if(!E)return"normal";switch(E){case"info":return"primary";case"error":return"danger";default:return E}},b=we(),v=e.computed(()=>{if(!t.color)return null;const E=et(t.color);return ot(E.r,E.g,E.b,E.a,b.value)}),_=e.computed(()=>v.value?F(v.value[5]):void 0),C=e.computed(()=>{if(v.value)return a.value?F(v.value[6]):r.value?F(v.value[4]):F(v.value[5])});function V(E="normal",L){if(L)return L[5];{const $=k(E);return $==="normal"?w("neutral",10):$==="loading"?w("neutral",8):w($,6)}}const x=(E,L,$,A,T)=>{E.fillStyle=F(A),E.fillRect(T,0,L-2*T,T),E.fillRect(L-T,T,T,$-2*T),E.fillRect(T,$-T,L-2*T,T),E.fillRect(0,T,T,$-2*T);const I=w("neutral",1);E.fillStyle=F(I),E.fillRect(T,T,L-2*T,$-2*T)},H=()=>{const E=Re(y,h);if(!E)return;const{ctx:L,width:$,height:A}=E,T=_e(),I=V(t.type,v.value);x(L,$,A,I,T)};return Ve(y,H),Me(H),e.watch([()=>t.type,v,b],()=>{setTimeout(()=>{H()})}),o({close:p}),()=>e.createVNode(e.Transition,{name:"px-message-fade",onAfterLeave:g},{default:()=>[i.value&&e.createVNode("div",{ref:E=>y.value=E,onMouseenter:u,onMouseleave:d,class:{"px-message":!0,pixelium:!0,[`px-message__${t.type||"primary"}`]:!0}},[(!!t.icon||t.type&&t.type!=="normal"&&t.type!=="sakura")&&e.createVNode("div",{class:"px-message-icon-wrapper"},[t.icon?t.icon():t.type==="info"?e.createVNode(Yo,{class:"px-message-icon",style:{fill:_.value}},null):t.type==="success"?e.createVNode(Jo,{class:"px-message-icon",style:{fill:_.value}},null):t.type==="warning"?e.createVNode(Ko,{class:"px-message-icon",style:{fill:_.value}},null):t.type==="error"?e.createVNode(Qo,{class:"px-message-icon",style:{fill:_.value}},null):t.type==="loading"&&e.createVNode(be,{class:"px-message-icon px-animation__loading",style:{fill:_.value}},null)]),e.createVNode("span",{class:"px-message-content",style:{color:_.value}},[he(t.content)?t.content:t.content()]),t.closable&&e.createVNode("div",{class:"px-message-close-wrapper"},[e.createVNode(tt,{class:"px-message-icon",style:{fill:C.value},onMouseenter:s(!0),onMouseleave:s(!1),onMousedown:c(!0),onMouseup:c(!1),onClick:p},null)]),e.createVNode("canvas",{ref:E=>h.value=E,class:"px-message-canvas"},null)])]})}}),So="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Xt=(n=21)=>{let o="",l=crypto.getRandomValues(new Uint8Array(n|=0));for(;n--;)o+=So[l[n]&63];return o};const zo={message:{start:3e3},popup:{start:1e3}},qt={};function el(n,o){return qt[n]||(qt[n]={max:o.start,count:0,initial:o.start}),qt[n]}function _n(n="popup"){const o=zo[n],l=el(n,o),t=e.ref(++l.max);l.count++;const r=()=>(t.value=++l.max,t.value),a=()=>{--l.count===0&&(l.max=l.initial)};return e.onUnmounted(a),[t,r,a]}const Cn=e.defineComponent({name:"MessageBoxInner",__name:"message-box",props:{messages:{},placement:{default:"top"},position:{default:"top"},zIndex:{},root:{},"onUpdate:messages":{}},emits:["close"],setup(n,{expose:o,emit:l}){const t=n,[r]=_n("message"),a=e.useModel(t,"messages"),c=l,s=e.computed(()=>a.value.map(d=>({...d,id:d.id??Xt()}))),i=d=>{if(!ue(d)){if(t["onUpdate:messages"]){const u=s.value.findIndex(p=>p.id===d);if(u>=0){const p=[...s.value];p.splice(u,1),a.value=p}}c("close",d)}},f=e.shallowRef([]);return o({close:d=>{var p;const u=s.value.findIndex(m=>m.id===d);u!==-1&&((p=f.value[u])==null||p.close())}}),(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"px-message-box",style:e.normalizeStyle({zIndex:t.zIndex??e.unref(r)})},[e.createElementVNode("div",{class:e.normalizeClass(["px-message-box-container",{[`px-message-box-container__${t.placement||t.position||"top"}`]:!0}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,p=>(e.openBlock(),e.createBlock(Zo,{key:p.id,duration:p.duration,content:p.content,id:p.id,onClose:i,type:p.type,color:p.color,icon:p.icon,closable:p.closable,ref_for:!0,ref_key:"messageRef",ref:f},null,8,["duration","content","id","type","color","icon","closable"]))),128))],2)],4))}}),xn=e.defineComponent({name:"MessageBox",__name:"message-box-wrapped",props:{messages:null,placement:null,position:null,zIndex:null,root:{default:"body"},"onUpdate:messages":{type:Function},onClose:{type:Function}},setup(n,{expose:o}){const l=n,t=e.useAttrs(),r=e.ref(null);return o({close:a=>{var c;(c=r.value)==null||c.close(a)}}),(a,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:l.root},[e.createVNode(Cn,e.mergeProps({...l,...e.unref(t)},{ref_key:"messageBoxRef",ref:r}),null,16)],8,["to"]))}});class tl{constructor(o){Lt(this,"messages");Lt(this,"messageBox");Lt(this,"container",null);this.messages=e.ref([]),this.messageBox=e.createVNode(Cn,{messages:this.messages.value,placement:o.placement,onClose:r=>{const a=this.messages.value.findIndex(c=>c.id===r);a>=0&&this.messages.value.splice(a,1)}});const l=(he(o.root)?document.querySelector(o.root):o.root)||document.body,t=Xt();this.container=document.createElement("div"),this.container.id=t,this.container.className="px-message-box-wrapper",l.appendChild(this.container),e.render(this.messageBox,this.container)}push(o){const l=o.id??Xt();return this.messages.value.push({...o,id:l}),l}close(o){var l,t;(t=(l=this.messageBox.component)==null?void 0:l.exposed)==null||t.close(o)}clear(){this.messages.value.length=0}unmount(){if(this.container){const o=this.container;e.render(this.messageBox,o),e.nextTick(()=>{o.remove(),this.container=null})}}}const Yt={top:void 0,bottom:void 0,"top-left":void 0,"top-right":void 0,"bottom-left":void 0,"bottom-right":void 0},yt=n=>{(he(n)||pt(n))&&(n={content:n});const o=n.placement||n.position||"top",l=Yt[o]?Yt[o]:Yt[o]=new tl({placement:o,root:n.root||"body"}),t=l.push({content:n.content,icon:n.icon,duration:n.duration||3e3,type:n.type||"normal",color:n.color,closable:n.closable});return{close:()=>l.close(t),clear:()=>l.clear()}};["info","success","warning","error","loading","sakura","normal"].forEach(n=>{yt[n]=o=>((he(o)||pt(o))&&(o={content:o}),yt({...o,type:n}))});const Bt=()=>{const n=e.ref(0);function o(){J()&&(n.value=window.innerWidth)}o();const l=e.computed(()=>{let t;return n.value<=576?t=Se.XS:n.value<=768?t=Se.SM:n.value<=992?t=Se.MD:n.value<=1200?t=Se.LG:n.value<=1600?t=Se.XL:t=Se.XXL,t});return J()&&(window.addEventListener("resize",o),e.onBeforeUnmount(()=>{window.removeEventListener("resize",o)})),[l,n]},nl={class:"pixelium px-row"},Kt=e.defineComponent({name:"Row",__name:"index",props:{gutter:{default:0},justify:{default:"start"},align:{default:"start"},wrap:{type:Boolean,default:!0}},setup(n){const o=n,[l]=Bt(),t=e.computed(()=>{if(te(o.gutter))return{x:o.gutter,y:o.gutter};if("x"in o.gutter||"y"in o.gutter)return{x:o.gutter.x||0,y:o.gutter.y||0};const r=o.gutter[l.value];return te(r)?{x:r,y:r}:cn({x:0,y:0},r)});return e.provide("px-row-provide",t),(r,a)=>(e.openBlock(),e.createElementBlock("div",nl,[e.createElementVNode("div",{class:e.normalizeClass(["px-row-inner",{[`px-row__justify-${o.justify}`]:!0,[`px-row__align-${o.align}`]:!0,"px-row__wrap":!!o.wrap}]),style:e.normalizeStyle({marginLeft:t.value?-t.value.x/2+"px":void 0,marginRight:t.value?-t.value.x/2+"px":void 0,marginTop:t.value?-t.value.y/2+"px":void 0,marginBottom:t.value?-t.value.y/2+"px":void 0})},[e.renderSlot(r.$slots,"default")],6)]))}}),Vn=e.defineComponent({name:"Col",__name:"index",props:{offset:{default:0},span:{default:24}},setup(n){var i;const o=n,[l]=Bt(),t=e.computed(()=>te(o.offset)?o.offset:o.offset[l.value]||0),r=e.computed(()=>te(o.span)?o.span:o.span[l.value]||24),a=e.getCurrentInstance(),s=e.ref(((i=a==null?void 0:a.parent)==null?void 0:i.type)===Kt).value&&e.inject("px-row-provide")||e.ref({x:0,y:0});return(f,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pixelium px-col",{[`px-col__span-${r.value}`]:!0,[`px-col__offset-${t.value}`]:!0}]),style:e.normalizeStyle({paddingLeft:e.unref(s)?e.unref(s).x/2+"px":void 0,paddingRight:e.unref(s)?e.unref(s).x/2+"px":void 0,paddingTop:e.unref(s)?e.unref(s).y/2+"px":void 0,paddingBottom:e.unref(s)?e.unref(s).y/2+"px":void 0})},[e.renderSlot(f.$slots,"default")],6))}}),Bn=e.defineComponent({name:"Divider",__name:"index",props:{direction:{default:"horizontal"},variant:{default:"solid"},margin:null,size:null},setup(n){const o=n,l=e.computed(()=>{if(!ue(o.margin))return te(o.margin)?`${o.margin}px`:o.margin}),t=e.computed(()=>{if(!ue(o.size))return te(o.size)?`${o.size}px`:o.size});return(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pixelium px-divider",{[`px-divider__${o.direction}`]:!0,[`px-divider__${o.variant}`]:!0}]),style:e.normalizeStyle({marginLeft:o.direction==="vertical"?l.value:void 0,marginRight:o.direction==="vertical"?l.value:void 0,marginTop:o.direction==="horizontal"?l.value:void 0,marginBottom:o.direction==="horizontal"?l.value:void 0,borderBottomWidth:o.direction==="horizontal"?t.value:void 0,borderRightWidth:o.direction==="vertical"?t.value:void 0})},null,6))}}),ol=(n,o)=>!!(n&&n.shapeFlag&1),ll=(n,o)=>!!(n&&n.shapeFlag&6),al=(n,o)=>!!(n&&n.shapeFlag&8),rl=(n,o)=>!!(n&&n.shapeFlag&16),sl=(n,o)=>!!(n&&n.shapeFlag&32),cl=n=>n.type===e.Text,vt=n=>{var l,t;const o=[];for(const r of n??[])ol(r)||ll(r)||al(r)?o.push(r):rl(r,r.children)?o.push(...vt(r.children)):sl(r,r.children)?o.push(...vt((t=(l=r.children).default)==null?void 0:t.call(l))):De(r)&&o.push(...vt(r));return o},Rn=e.defineComponent({name:"Space",__name:"index",props:{margin:{default:"medium"},direction:{default:"horizontal"},justify:{default:"start"},align:null,wrap:{type:Boolean,default:!0},inline:{type:Boolean,default:!1}},setup(n){const o=n,l=e.computed(()=>o.align?o.align:o.direction==="horizontal"?"center":"stretch"),t=e.useSlots(),r=e.computed(()=>{if(!(!o.margin||o.margin==="small"||o.margin==="medium"||o.margin==="large")){if(te(o.margin))return{x:o.margin,y:o.margin};if("x"in o.margin||"y"in o.margin){const a=te(o.margin.x)?o.margin.x:0,c=te(o.margin.y)?o.margin.y:0;return{x:a,y:c}}}});return()=>{var c;const a=vt(((c=t.default)==null?void 0:c.call(t))||[]);return e.createVNode("div",{class:{pixelium:!0,"px-space":!0,"px-space__inline":!!o.inline}},[e.createVNode("div",{class:{"px-space-inner":!0,"px-space__small":o.margin==="small","px-space__large":o.margin==="large",[`px-space__justify-${o.justify}`]:!0,[`px-space__align-${l.value}`]:!0,[`px-space__${o.direction}`]:!0,"px-space__wrap":!!o.wrap},style:{marginTop:r.value?-r.value.y/2+"px":void 0,marginBottom:r.value?-r.value.y/2+"px":void 0,marginLeft:r.value?-r.value.x/2+"px":void 0,marginRight:r.value?-r.value.x/2+"px":void 0}},[a.map((s,i)=>e.createVNode(e.Fragment,{key:s.key||`px-space-item-${i}`},[e.createVNode("div",{class:"px-space-item",style:{marginTop:r.value?r.value.y/2+"px":void 0,marginBottom:r.value?r.value.y/2+"px":void 0,marginLeft:r.value?r.value.x/2+"px":void 0,marginRight:r.value?r.value.x/2+"px":void 0}},[s])]))])])}}}),Qt=e.defineComponent({name:"Grid",__name:"index",props:{column:{default:24},gutter:{default:0}},setup(n){const o=n,[l]=Bt(),t=e.computed(()=>{if(te(o.gutter))return{x:o.gutter,y:o.gutter};if("x"in o.gutter||"y"in o.gutter)return{x:o.gutter.x||0,y:o.gutter.y||0};const c=o.gutter[l.value];return te(c)?{x:c,y:c}:cn({x:0,y:0},c)}),r=e.computed(()=>te(o.column)?o.column:o.column[l.value]||24),a=e.ref([]);return e.provide(yn,{column:r,gutter:t,itemsStat:a}),Wt(hn),(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"pixelium px-grid",style:e.normalizeStyle({gridTemplateColumns:`repeat(${r.value}, minmax(0, 1fr))`,gap:t.value?`${t.value.y}px ${t.value.x}px`:void 0})},[e.renderSlot(c.$slots,"default")],4))}}),Mn=e.defineComponent({name:"GridItem",__name:"index",props:{offset:{default:0},span:null},setup(n){var u;const o=e.getCurrentInstance(),t=e.ref(((u=o==null?void 0:o.parent)==null?void 0:u.type)===Qt).value?e.inject(yn):void 0,r=n,a=e.useId(),[c]=Ge(hn),[s]=Bt(),i=e.computed(()=>te(r.offset)?r.offset:r.offset[s.value]||0),f=e.computed(()=>r.span===void 0?(t==null?void 0:t.column.value)||24:te(r.span)?r.span:r.span[s.value]||24);e.onMounted(()=>{t==null||t.itemsStat.value.push({id:a,index:c.value,offset:i.value,span:f.value})}),e.watch([c,i,f],()=>{const p=t==null?void 0:t.itemsStat.value.find(m=>m.id===a);p?(p.index=c.value,p.offset=i.value,p.span=f.value):t==null||t.itemsStat.value.push({id:a,index:c.value,offset:i.value,span:f.value})}),e.onBeforeUnmount(()=>{const p=t==null?void 0:t.itemsStat.value.findIndex(m=>m.id===a);p!==void 0&&p>-1&&(t==null||t.itemsStat.value.splice(p,1))});const d=e.computed(()=>{if(!t)return;if(i.value+f.value>t.column.value)return`${i.value+1} / span ${f.value}`;const p=t.itemsStat.value.filter(h=>h.index!==-1&&h.index<c.value);if(p.length===0)return`${i.value+1} / span ${f.value}`;let m=0;return p.forEach(h=>{if(h.span+h.offset>=t.column.value){m=0;return}m+=h.span+h.offset,m>t.column.value?m=h.span+h.offset:m===t.column.value&&(m=0)}),m+i.value+f.value>t.column.value?`${i.value+1} / span ${f.value}`:`${m+i.value+1} / span ${f.value}`});return(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"pixelium px-grid-item",style:e.normalizeStyle({gridColumn:d.value})},[e.renderSlot(p.$slots,"default")],4))}}),Jt=e.defineComponent({name:"Container",__name:"index",props:{direction:null},setup(n){const o=e.ref(0);e.provide("px-container-provide",o);const l=n;return(t,r)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["pixelium px-container",{"px-container__has-aside":!!o.value,[`px-container__${l.direction}`]:!!l.direction}])},[e.renderSlot(t.$slots,"default")],2))}}),il={class:"pixelium px-main"},Hn=e.defineComponent({name:"Main",__name:"index",setup(n){return(o,l)=>(e.openBlock(),e.createElementBlock("main",il,[e.renderSlot(o.$slots,"default")]))}}),En=e.defineComponent({name:"Aside",__name:"index",props:{width:null,bordered:{type:Boolean,default:!1},side:{default:"left"},dark:{type:Boolean,default:!1}},setup(n){var s;const o=e.getCurrentInstance(),t=e.ref(((s=o==null?void 0:o.parent)==null?void 0:s.type)===Jt).value?e.inject("px-container-provide"):void 0;e.onMounted(()=>{t&&(t.value+=1)}),e.onBeforeUnmount(()=>{t&&(t.value-=1)});const r=n,a=we(),c=e.computed(()=>ue(r.width)?void 0:te(r.width)?`${r.width}px`:r.width);return(i,f)=>(e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(["pixelium px-aside",{"px-aside__dark":!e.unref(a)&&!!r.dark,"px-aside__bordered":!!r.bordered,[`px-aside__${r.side}`]:!0}]),style:e.normalizeStyle({width:c.value})},[e.renderSlot(i.$slots,"default")],6))}}),Tn=e.defineComponent({name:"Header",__name:"index",props:{minHeight:null,bordered:{type:Boolean},dark:{type:Boolean,default:!1}},setup(n){const o=n,l=we(),t=e.computed(()=>ue(o.minHeight)?void 0:te(o.minHeight)?`${o.minHeight}px`:o.minHeight);return(r,a)=>(e.openBlock(),e.createElementBlock("header",{class:e.normalizeClass(["pixelium px-header",{"px-header__dark":!e.unref(l)&&!!o.dark,"px-header__bordered":!!o.bordered}]),style:e.normalizeStyle({minHeight:t.value})},[e.renderSlot(r.$slots,"default")],6))}}),$n=e.defineComponent({name:"Footer",__name:"index",props:{minHeight:null,bordered:{type:Boolean},dark:{type:Boolean,default:!1}},setup(n){const o=n,l=we(),t=e.computed(()=>ue(o.minHeight)?void 0:te(o.minHeight)?`${o.minHeight}px`:o.minHeight);return(r,a)=>(e.openBlock(),e.createElementBlock("footer",{class:e.normalizeClass(["pixelium px-footer",{"px-footer__dark":!e.unref(l)&&!!o.dark,"px-footer__bordered":!!o.bordered}]),style:e.normalizeStyle({minHeight:t.value})},[e.renderSlot(r.$slots,"default")],6))}});typeof process<"u"&&process.env.NODE_ENV;const ul="Pixelium";function Nn(n){throw new Error(`[${ul}] ${n}`)}const dl=(n,o)=>{var t,r;if(!J())return;const l={light:[],dark:[]};if(he(o)){const a=et(o);l.light=ot(a.r,a.g,a.b,a.a,!1).map(c=>F(c)),l.dark=ot(a.r,a.g,a.b,a.a,!0).map(c=>F(c))}else{if((t=o.light)!=null&&t.length&&o.light.length!==10)return Nn("The length of color.light does not match the required number of CSS color palette (10).");if((r=o.dark)!=null&&r.length&&o.dark.length!==10)return Nn("The length of color.dark does not match the required number of CSS color palette (10).");l.light=o.light||[],l.dark=o.dark||[]}l.light.forEach((a,c)=>{document.documentElement.style.setProperty(`--px-${n}-light-custom-${c+1}`,a)}),l.dark.forEach((a,c)=>{document.documentElement.style.setProperty(`--px-${n}-dark-custom-${c+1}`,a)}),lt.emit(Ut)},Pn=n=>{if(!J())return;const o=document.documentElement;o.classList.remove("light","dark"),n!=="unset"&&o.classList.add(n)};function In(n){const o=e.ref(!1);if(J()){let s=function(f){o.value=f.matches};const i=window.matchMedia("(prefers-color-scheme: dark)");s(i),i.addEventListener("change",s),e.onBeforeUnmount(()=>{i.removeEventListener("change",s)})}const l=e.ref(n||o.value?"dark":"light");n&&Pn(l.value);const t=()=>{l.value=l.value==="unset"?o.value?"light":"dark":l.value==="light"?"dark":"light"},r=()=>{l.value="unset"},a=()=>{l.value=o.value?"dark":"light"},c=e.watch(l,Pn,{flush:"post"});return e.onScopeDispose(()=>{c()}),[l,t,r,a]}const Ln=e.defineComponent({name:"Icon",__name:"index",props:{size:{default:"1em"},color:{default:"currentColor"},rotate:{default:0},spin:{type:Boolean,default:!1},flip:{default:"none"}},setup(n){const o=n,l=e.computed(()=>{let r=1,a=1;return(o.flip==="horizontal"||o.flip==="both")&&(r=-1),(o.flip==="vertical"||o.flip==="both")&&(a=-1),`scale(${r}, ${a}) rotate(${o.rotate}deg)`}),t=e.computed(()=>te(o.size)?`${o.size}px`:o.size);return(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"pixelium px-icon":!0,"px-animation__loading":!!o.spin}),style:e.normalizeStyle({height:t.value,width:t.value,fontSize:t.value,color:o.color,transform:l.value})},[e.renderSlot(r.$slots,"default")],6))}}),fl=(n,o,l,t,r,a,c,s,i,f,d)=>{n.fillStyle=F(c);for(let u=0;u<4;u++)r[u]<=s||(!(u===1||u===2)||i&&d||!i)&&xe(n,t[u][0],t[u][1],r[u],a[u][0],a[u][1],s);t[1][0]+s>t[0][0]&&n.fillRect(t[0][0],0,t[1][0]-t[0][0]+s,s),t[2][1]+s>t[1][1]&&(i&&d||!i)&&n.fillRect(o-s,t[1][1],s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s&&n.fillRect(t[3][0],l-s,t[2][0]-t[3][0]+s,s),t[3][1]+s>t[0][1]&&!(i&&!f)&&n.fillRect(0,t[0][1],s,t[3][1]-t[0][1]+s),i&&!f&&n.fillRect(s/2,0,s/2,l),i&&!d&&n.fillRect(o-2*s-1,0,s,l)};function at({afterComposition:n}){const o=e.ref(!1);return[o,r=>{o.value=!0},r=>{o.value&&(o.value=!1,e.nextTick(()=>n(r)))}]}const pl=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M16 11h1v2h-1zM16 13v2h-1v1h-2v-1h1v-1h1v-1zM16 9v2h-1v-1h-1V9h-1V8h2v1zM11 16h2v1h-2zM11 15v1H9v-1H8v-2h1v1h1v1zM13 7v1h-1v3h-1v1H8v1H7v-2h1V9h1V8h2V7z"},null,-1),e.createElementVNode("path",{d:"M22 11V9h-1V8h-1V7h-1V6h-2V5H7v1H5v1H4v1H3v1H2v2H1v2h1v2h1v1h1v1h1v1h2v1h10v-1h2v-1h1v-1h1v-1h1v-2h1v-2zm-1 3h-1v1h-1v1h-1v1h-2v1H8v-1H7v-1H5v-1H4v-1H3v-4h1V9h1V8h1V7h2V6h8v1h2v1h1v1h1v1h1z"},null,-1)])],4))}}),ml=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M15 13h1v2h-1v1h-2v-1h1v-1h1zM16 11h1v2h-1z"},null,-1),e.createElementVNode("path",{d:"M23 11v2h-1v2h-1v1h-1v1h-1v1h-2v1H9v-1h7v-1h2v-1h1v-1h1v-1h1v-4h-1V9h-1V8h2v1h1v2zM2 13H1v-2h1V9h1V8h1V7h1V6h2V5h8v1H8v1H6v1H5v1H4v1H3v4h1v1h1v1H3v-1H2z"},null,-1),e.createElementVNode("path",{d:"M13 7v1h-1v1h-1v1h-1v1H9v1H8v1H7v-2h1V9h1V8h2V7zM9 17H8v1H7v1H6v1H5v1H4v1H3v-1H2v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1V9h1V8h1V7h1V6h1V5h1V4h1V3h1V2h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1H9zM11 16h2v1h-2z"},null,-1)])],4))}}),Qe=(n,o,l,t)=>{const r=e.computed(()=>o[n]!==void 0),a=r.value?o[n]:t!=null&&t.defaultField?o[t.defaultField]:null,c=e.ref(t!=null&&t.transform?t==null?void 0:t.transform(a):a),s=async i=>{r.value?(l(`update:${n}`,i),await e.nextTick(),c.value=t!=null&&t.transform?t==null?void 0:t.transform(o[n]):o[n]):c.value=t!=null&&t.transform?t==null?void 0:t.transform(i):i};return e.watch(()=>o[n],i=>{c.value=t!=null&&t.transform?t==null?void 0:t.transform(i):i}),[c,s,r]},hl={key:0,class:"px-input-prefix-wrapper"},gl=["value","placeholder","disabled","autofocus","type"],yl={key:1,class:"px-input-close-wrapper"},vl={key:1,class:"px-input-icon-placeholder"},wl={key:2,class:"px-input-password-wrapper"},bl={key:3,class:"px-input-count-wrapper"},kl={key:4,class:"px-input-loading-wrapper"},_l={key:5,class:"px-input-suffix-wrapper"},Dn=e.defineComponent({name:"Input",__name:"index",props:{modelValue:null,defaultValue:null,placeholder:null,password:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{default:"medium"},shape:{default:"default"},borderRadius:null,maxLength:null,showCount:{type:Boolean,default:!1},countGraphemes:{type:Function},sliceGraphemes:{type:Function},status:{default:"normal"},autofocus:{type:Boolean},nativeType:null},emits:["input","update:modelValue","change","clear","blur","focus"],setup(n,{expose:o,emit:l}){var Z;const t=n,r=l,[a,c,s]=at({afterComposition:X=>{e.nextTick(()=>{H(X)})}}),i=e.getCurrentInstance(),f=e.ref(((Z=i==null?void 0:i.parent)==null?void 0:Z.type)===We),[d,u,p]=f.value?Ge(Ye):[e.ref(0),e.ref(!1),e.ref(!1)],m=e.inject(Ke),g=e.computed(()=>f.value&&m?m.borderRadius:t.borderRadius),h=e.computed(()=>f.value&&m?m.size:t.size),y=e.computed(()=>f.value&&m?m.shape:t.shape),k=e.computed(()=>f.value&&m&&m.disabled||t.disabled),[b,v]=Qe("modelValue",t,r,{defaultField:"defaultValue",transform:X=>X||""}),_=e.shallowRef(null),C=e.shallowRef(null),V=e.shallowRef(null),x=e.computed(()=>t.countGraphemes?t.countGraphemes(b.value):b.value.length),H=async X=>{let le=X.target.value;b.value=le,!a.value&&(r("input",le,X),t.maxLength&&(t.countGraphemes&&t.sliceGraphemes?(await e.nextTick(),le=t.sliceGraphemes(b.value,t.maxLength)):le=b.value.slice(0,t.maxLength)),v(le))},E=async()=>{await v(""),r("change",""),r("clear","")},L=X=>{const re=X.target;r("change",re.value,X)},$=e.ref(!1),A=()=>{$.value=!1},T=()=>{$.value=!0},I=()=>{var X;(X=V.value)==null||X.focus()},U=e.ref(!1),K=()=>{U.value=!0},N=()=>{U.value=!1},j=e.computed(()=>t.clearable&&!k.value&&!t.readonly),D=e.ref(!1),ie=()=>{D.value=!D.value},ne=e.computed(()=>t.nativeType?t.nativeType:t.password?D.value?"text":"password":"text"),se=e.useSlots();o({focus:()=>{var X;(X=V.value)==null||X.focus()},blur:()=>{var X;(X=V.value)==null||X.blur()},clear:()=>E(),select:()=>{var X;(X=V.value)==null||X.select()}});const S=we();e.watch([u,p,g,y,h,k,()=>se,S,$,U],()=>{setTimeout(()=>{oe()})});const oe=()=>{const X=Re(_,C);if(!X)return;const{ctx:re,width:le,height:me,canvas:G}=X,R=_e(),W=qe(G,R,g.value,y.value,h.value||"medium",f.value,u.value,p.value),Y=t.status!=="normal"?w(t.status==="error"?"danger":t.status,6):(U.value||$.value)&&!k.value&&!t.readonly?w("primary",6):w("neutral",10),z=Fe(W,le,me,R);fl(re,le,me,z,W,Ae,Y,R,f.value,u.value,p.value);const pe=k.value?w("neutral",6):w("neutral",1);Oe(re,Math.round(le/2),Math.round(me/2),pe)};return e.onMounted(()=>{e.nextTick(()=>{oe()})}),Ve(_,oe),Me(oe),(X,re)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pixelium px-input",{[`px-input__${h.value}`]:!!h.value,[`px-input__${y.value}`]:!!y.value,"px-input__inner":f.value,"px-input__disabled":!!k.value}]),ref_key:"wrapperRef",ref:_,onClick:I,onMouseenter:K,onMouseleave:N},[e.unref(se).prefix?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(X.$slots,"prefix")])):e.createCommentVNode("",!0),e.createElementVNode("input",{class:"px-input-inner",value:e.unref(b),ref_key:"inputRef",ref:V,placeholder:t.placeholder,disabled:k.value||t.readonly,autofocus:n.autofocus,type:ne.value,onInput:e.withModifiers(H,["stop"]),onChange:e.withModifiers(L,["stop"]),onBlur:A,onFocus:T,onCompositionstart:re[0]||(re[0]=(...le)=>e.unref(c)&&e.unref(c)(...le)),onCompositionend:re[1]||(re[1]=(...le)=>e.unref(s)&&e.unref(s)(...le))},null,40,gl),j.value?(e.openBlock(),e.createElementBlock("div",yl,[U.value&&e.unref(b)?(e.openBlock(),e.createBlock(e.unref(tt),{key:0,class:"px-input-icon",onClick:E})):(e.openBlock(),e.createElementBlock("div",vl))])):e.createCommentVNode("",!0),t.password?(e.openBlock(),e.createElementBlock("div",wl,[D.value?(e.openBlock(),e.createBlock(e.unref(ml),{key:1,class:"px-input-icon",onClick:ie})):(e.openBlock(),e.createBlock(e.unref(pl),{key:0,class:"px-input-icon",onClick:ie}))])):e.createCommentVNode("",!0),t.showCount?(e.openBlock(),e.createElementBlock("div",bl,[e.renderSlot(X.$slots,"count",{value:e.unref(b),count:x.value,maxLength:t.maxLength},()=>[e.createElementVNode("span",null,e.toDisplayString(x.value)+e.toDisplayString(e.unref(ue)(t.maxLength)?"":" / "+t.maxLength),1)])])):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createElementBlock("div",kl,[e.createVNode(e.unref(be),{class:"px-input-icon px-animation__loading"})])):e.createCommentVNode("",!0),e.unref(se).suffix?(e.openBlock(),e.createElementBlock("div",_l,[e.renderSlot(X.$slots,"suffix")])):e.createCommentVNode("",!0),e.createElementVNode("canvas",{class:"px-input-canvas",ref_key:"canvasRef",ref:C},null,512)],34))}}),Cl=(n,o,l,t,r,a,c,s,i,f,d)=>{n.fillStyle=F(c);for(let u=0;u<4;u++)r[u]<=s||(!(u===1||u===2)||i&&d||!i)&&xe(n,t[u][0],t[u][1],r[u],a[u][0],a[u][1],s);t[1][0]+s>t[0][0]&&n.fillRect(t[0][0],0,t[1][0]-t[0][0]+s,s),t[2][1]+s>t[1][1]&&(i&&d||!i)&&n.fillRect(o-s,t[1][1],s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s&&n.fillRect(t[3][0],l-s,t[2][0]-t[3][0]+s,s),t[3][1]+s>t[0][1]&&!(i&&!f)&&n.fillRect(0,t[0][1],s,t[3][1]-t[0][1]+s),i&&!f&&n.fillRect(s/2,0,s/2,l),i&&!d&&n.fillRect(o-2*s-1,0,s,l)},An=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M1 11h22v2H1z"},null,-1)])],4))}}),On=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M23 11v2H13v10h-2V13H1v-2h10V1h2v10z"},null,-1)])],4))}}),xl={key:0,class:"px-input-number-prefix-wrapper"},Vl=["value","placeholder","disabled","autofocus"],Bl={key:2,class:"px-input-number-close-wrapper"},Rl={key:1,class:"px-input-number-icon-placeholder"},Ml={key:4,class:"px-input-number-loading-wrapper"},Hl={key:5,class:"px-input-number-suffix-wrapper"},Fn=e.defineComponent({name:"InputNumber",__name:"index",props:{modelValue:null,defaultValue:null,placeholder:null,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},max:{default:Number.MAX_SAFE_INTEGER},min:{default:Number.MIN_SAFE_INTEGER},step:{default:1},precision:null,strickStep:{type:Boolean,default:!1},format:{type:Function},allowInput:{type:Function},parse:{type:Function},clearable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{default:"medium"},shape:{default:"default"},borderRadius:null,buttonPlacement:{default:"end"},status:{default:"normal"},autofocus:{type:Boolean}},emits:["input","update:modelValue","change","clear","blur","focus"],setup(n,{expose:o,emit:l}){var Xe;const t=n,r=l,a=e.getCurrentInstance(),c=e.ref(((Xe=a==null?void 0:a.parent)==null?void 0:Xe.type)===We),[s,i,f]=c.value?Ge(Ye):[e.ref(0),e.ref(!1),e.ref(!1)],d=e.inject(Ke),u=e.computed(()=>c.value&&d?d.borderRadius:t.borderRadius),p=e.computed(()=>c.value&&d?d.size:t.size),m=e.computed(()=>c.value&&d?d.shape:t.shape),g=e.computed(()=>c.value&&d&&d.disabled||t.disabled),h=/^[+-]?\d+(?:\.\d*)?$/,y=B=>{Dt(B)&&(B=0),te(t.precision)&&(B=parseFloat(B.toFixed(mt(Math.round(t.precision),0,100))));const Q=t.min??Number.MIN_SAFE_INTEGER,de=t.max??Number.MAX_SAFE_INTEGER;if(B=mt(B,Q,de),t.strickStep&&!Mo(t.step)&&!Dt(t.step)&&t.step!==0){let ge=Math.round(B/t.step)*t.step;ge<Q&&(ge=Math.ceil(B/t.step)*t.step),ge>de&&(ge=Math.floor(B/t.step)*t.step),B=ge}return B},k=B=>t.format?t.format(B):Dt(B)||ue(B)?"":te(t.precision)?B.toFixed(mt(Math.round(t.precision),0,100)):B+"",b=B=>t.allowInput?t.allowInput(B):B.length?h.test(B):!0,v=B=>t.parse?t.parse(B):B.length?parseFloat(B):0,[_,C]=Qe("modelValue",t,r,{defaultField:"defaultValue",transform:B=>{if(!ue(B)){const Q=y(B);return Q!==B&&r("update:modelValue",Q),Q}return B}}),V=e.ref(k(_.value)),[x,H,E]=at({afterComposition:B=>{e.nextTick(()=>{I(B)})}}),L=e.shallowRef(null),$=e.shallowRef(null),A=e.shallowRef(null),T=B=>{V.value=B};e.watch(_,B=>{N.value||T(k(B))});const I=async B=>{const de=B.target.value;if(x.value)return;if(!b(de)){A.value&&(A.value.value=V.value);return}V.value=de;const ge=y(v(de));r("input",ge,B),await C(ge)},U=async()=>{const B=y(0);await C(B),T(k(_.value)),r("change",B),r("clear",B)},K=B=>{const Q=B.target,de=v(Q.value);T(k(_.value)),r("change",de,B)},N=e.ref(!1),j=()=>{T(k(_.value)),N.value=!1},D=()=>{N.value=!0},ie=e.computed(()=>t.clearable&&!g.value&&!t.readonly),ne=e.useSlots();o({focus:()=>{var B;(B=A.value)==null||B.focus()},blur:()=>{var B;(B=A.value)==null||B.blur()},clear:()=>U(),select:()=>{var B;(B=A.value)==null||B.select()}});const se=e.computed(()=>t.readonly||g.value||_.value&&_.value>=t.max),S=e.computed(()=>t.readonly||g.value||_.value&&_.value<=t.min),oe=async()=>{if(se.value)return;let B=_.value;ue(B)&&(B=y(0));const Q=y(B+t.step);await C(Q),T(k(_.value))},Z=async()=>{if(S.value)return;let B=_.value;ue(B)&&(B=y(0));const Q=y(B-t.step);await C(Q),T(k(_.value))},X=e.computed(()=>t.buttonPlacement==="both"||t.buttonPlacement==="both-reverse"||t.buttonPlacement==="end"||t.buttonPlacement==="end-reverse"),re=e.computed(()=>t.buttonPlacement==="both-reverse"||t.buttonPlacement==="end"||t.buttonPlacement==="end-reverse"),le=e.computed(()=>t.buttonPlacement==="both"||t.buttonPlacement==="end"||t.buttonPlacement==="end-reverse"),me=e.computed(()=>t.buttonPlacement==="both"||t.buttonPlacement==="both-reverse"||t.buttonPlacement==="start"||t.buttonPlacement==="start-reverse"),G=e.computed(()=>t.buttonPlacement==="both"||t.buttonPlacement==="start"||t.buttonPlacement==="start-reverse"),R=e.computed(()=>t.buttonPlacement==="both-reverse"||t.buttonPlacement==="start"||t.buttonPlacement==="start-reverse"),W=B=>{B.detail>1&&B.preventDefault()},Y=()=>{var B;(B=A.value)==null||B.focus()},z=e.ref(!1),ee=()=>{z.value=!0},pe=()=>{z.value=!1},je=we();e.watch([()=>t.status,u,m,p,g,()=>ne,i,f,je,z,N],()=>{setTimeout(()=>{$e()})});const $e=()=>{const B=Re(L,$);if(!B)return;const{ctx:Q,width:de,height:ge,canvas:It}=B,dt=_e(),M=qe(It,dt,u.value,m.value,p.value||"medium",c.value,i.value,f.value),P=t.status!=="normal"?w(t.status==="error"?"danger":t.status,6):(z.value||N.value)&&!g.value&&!t.readonly?w("primary",6):w("neutral",10),q=Fe(M,de,ge,dt);Cl(Q,de,ge,q,M,Ae,P,dt,c.value,i.value,f.value);const ke=g.value?w("neutral",6):w("neutral",1);Oe(Q,Math.round(de/2),Math.round(ge/2),ke)};return e.onMounted(()=>{e.nextTick(()=>{$e()})}),Ve(L,$e),Me($e),(B,Q)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pixelium px-input-number",{[`px-input-number__${p.value}`]:!!p.value,[`px-input-number__${m.value}`]:!!m.value,"px-input-number__inner":c.value,"px-input-number__disabled":!!g.value}]),ref_key:"wrapperRef",ref:L,onClick:Y,onMouseenter:ee,onMouseleave:pe},[e.unref(ne).prefix?(e.openBlock(),e.createElementBlock("div",xl,[e.renderSlot(B.$slots,"prefix")])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["px-input-number-setting-prefix-wrapper",t.buttonPlacement==="start-reverse"&&"px-input-number-setting-prefix-wrapper__reverse"])},[G.value?(e.openBlock(),e.createBlock(e.unref(On),{key:0,class:e.normalizeClass(["px-input-number-icon",se.value&&"px-input-number-icon__disabled"]),onClick:oe,onMousedown:W},null,8,["class"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createBlock(e.unref(An),{key:1,class:e.normalizeClass(["px-input-number-icon",S.value&&"px-input-number-icon__disabled"]),onClick:Z,onMousedown:W},null,8,["class"])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",{class:"px-input-number-inner",value:V.value,ref_key:"inputRef",ref:A,placeholder:t.placeholder,disabled:g.value||t.readonly,autofocus:n.autofocus,onInput:e.withModifiers(I,["stop"]),onChange:e.withModifiers(K,["stop"]),onBlur:j,onFocus:D,onCompositionstart:Q[0]||(Q[0]=(...de)=>e.unref(H)&&e.unref(H)(...de)),onCompositionend:Q[1]||(Q[1]=(...de)=>e.unref(E)&&e.unref(E)(...de))},null,40,Vl),ie.value?(e.openBlock(),e.createElementBlock("div",Bl,[z.value&&V.value?(e.openBlock(),e.createBlock(e.unref(tt),{key:0,class:"px-input-number-icon",onClick:U})):(e.openBlock(),e.createElementBlock("div",Rl))])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["px-input-number-setting-suffix-wrapper",t.buttonPlacement==="end-reverse"&&"px-input-number-setting-suffix-wrapper__reverse"])},[re.value?(e.openBlock(),e.createBlock(e.unref(On),{key:0,class:e.normalizeClass(["px-input-number-icon",se.value&&"px-input-number-icon__disabled"]),onClick:oe,onMousedown:W},null,8,["class"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createBlock(e.unref(An),{key:1,class:e.normalizeClass(["px-input-number-icon",S.value&&"px-input-number-icon__disabled"]),onClick:Z,onMousedown:W},null,8,["class"])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createElementBlock("div",Ml,[e.createVNode(e.unref(be),{class:"px-input-number-icon px-animation__loading"})])):e.createCommentVNode("",!0),e.unref(ne).suffix?(e.openBlock(),e.createElementBlock("div",Hl,[e.renderSlot(B.$slots,"suffix")])):e.createCommentVNode("",!0),e.createElementVNode("canvas",{class:"px-input-number-canvas",ref_key:"canvasRef",ref:$},null,512)],34))}}),El=(n,o,l,t,r,a)=>{n.fillStyle=F(t),n.fillRect(a,0,o-2*a,a),n.fillRect(o-a,a,a,l-2*a),n.fillRect(a,l-a,o-2*a,a),n.fillRect(0,a,a,l-2*a),n.fillStyle=F(r),n.fillRect(a,a,o-2*a,l-2*a)};let He=null;const Tl=`
2
+ position:absolute!important;
3
+ top:-9999px!important;
4
+ left:-9999px!important;
5
+ overflow:hidden!important;
6
+ opacity:0!important;
7
+ pointer-events:none!important;
8
+ width:{width}px!important;
9
+ min-height:0!important;
10
+ height:0!important;
11
+ z-index:-9999!important;
12
+ `,$l=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","padding-left","padding-right","border-width","box-sizing"];function Nl(n){const o=window.getComputedStyle(n),l=o.getPropertyValue("box-sizing"),t=parseFloat(o.getPropertyValue("padding-top"))+parseFloat(o.getPropertyValue("padding-bottom")),r=parseFloat(o.getPropertyValue("border-top-width"))+parseFloat(o.getPropertyValue("border-bottom-width"));return{sizingStyle:$l.map(c=>`${c}:${o.getPropertyValue(c)}`).join(";"),paddingSize:t,borderSize:r,boxSizing:l}}function Pl(n,o=1,l=1/0){He||(He=document.createElement("textarea"),document.body.appendChild(He));const{sizingStyle:t,paddingSize:r,borderSize:a,boxSizing:c}=Nl(n),s=n.getBoundingClientRect().width;He.setAttribute("style",`${t};${Vo(Tl,p=>p==="width"?String(s):"")}`),He.value="";let i=He.scrollHeight-r;const f=i*o+(c==="border-box"?r+a:0),d=i*l+(c==="border-box"?r+a:0);He.value=n.value||n.placeholder||"";let u=He.scrollHeight;return u+=+(c==="border-box")*a,u=mt(u,f,d),{height:u,minHeight:f,maxHeight:d}}let Zt=0;function Il(n,o,l){return Pl(n,o,l)}function Ll(){Zt--,He&&Zt<=0&&(He.remove(),He=null)}function Dl(){Zt++}const Al=(n,o)=>{const l=e.ref(void 0),t=e.ref(void 0),r=e.ref(void 0),a=()=>{if(J()&&n.value){const c=Il(n.value,o.minRows||1,o.maxRows||1/0);l.value=c.height,r.value=c.maxHeight,t.value=c.minHeight}};return J()&&(Dl(),Ve(n,a,!0),e.onBeforeUnmount(()=>{Ll()})),[l,t,r,a]},Ol=["value","placeholder","disabled","autofocus","rows"],Fl={class:"px-textarea-addition-wrapper"},Gl={key:0,class:"px-textarea-close-wrapper"},Wl={key:1,class:"px-textarea-count-wrapper"},Ul={key:2,class:"px-textarea-loading-wrapper"},Gn=e.defineComponent({name:"Textarea",__name:"index",props:{modelValue:null,defaultValue:null,rows:null,minRows:{default:1},maxRows:{default:1/0},autoResize:{type:Boolean,default:!1},resize:{type:Boolean,default:!0},placeholder:null,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{default:"medium"},maxLength:null,showCount:{type:Boolean,default:!1},countGraphemes:{type:Function},sliceGraphemes:{type:Function},status:{default:"normal"},autofocus:{type:Boolean}},emits:["input","update:modelValue","change","clear","blur","focus"],setup(n,{expose:o,emit:l}){const t=n,r=l,[a,c,s]=at({afterComposition:N=>{e.nextTick(()=>{b(N)})}}),[i,f]=Qe("modelValue",t,r,{defaultField:"defaultValue",transform:N=>N||""}),d=e.shallowRef(null),u=e.shallowRef(null),p=e.shallowRef(null),[m,g,h,y]=Al(p,t),k=e.computed(()=>i.value?t.countGraphemes?t.countGraphemes(i.value):i.value.length:0),b=async N=>{let D=N.target.value;i.value=D,!a.value&&(t.maxLength&&(t.countGraphemes&&t.sliceGraphemes?(await e.nextTick(),D=t.sliceGraphemes(D,t.maxLength)):D=D.slice(0,t.maxLength)),i.value=D,r("input",D,N),f(D))},v=async()=>{await f(""),r("change",""),r("clear","")},_=N=>{const j=N.target;y(),r("change",j.value,N)},C=e.ref(!1),V=()=>{t.autoResize&&p.value&&m.value&&(p.value.style.height=m.value+"px")};e.watch(m,()=>{V()});const x=()=>{V(),C.value=!1},H=()=>{V(),C.value=!0},E=e.computed(()=>t.clearable&&C.value&&!t.disabled&&!t.readonly&&!!i.value),L=()=>{var N;(N=p.value)==null||N.focus()},$=e.ref(!1),A=()=>{$.value=!0},T=()=>{$.value=!1};o({focus:()=>{var N;(N=p.value)==null||N.focus()},blur:()=>{var N;(N=p.value)==null||N.blur()},clear:()=>v(),select:()=>{var N;(N=p.value)==null||N.select()}});const I=we();e.watch([()=>t.size,()=>t.disabled,I,$,C],()=>{setTimeout(()=>{K()})});const U=()=>{const N=Re(d,u);if(!N)return;const{ctx:j,width:D,height:ie}=N,ne=_e(),se=t.status!=="normal"?w(t.status==="error"?"danger":t.status,6):($.value||C.value)&&!t.disabled&&!t.readonly?w("primary",6):w("neutral",10),S=t.disabled?w("neutral",6):w("neutral",1);El(j,D,ie,se,S,ne)},K=Ho(U,0,{maxWait:50});return e.onMounted(()=>{e.nextTick(()=>{U()}),setTimeout(()=>{V()})}),Ve(d,K),Me(K),(N,j)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pixelium px-textarea",{[`px-textarea__${t.size}`]:!!t.size,"px-textarea__disabled":!!t.disabled,"px-textarea__resize":!!t.resize}]),ref_key:"wrapperRef",ref:d,onClick:L,onMouseenter:A,onMouseleave:T},[e.createElementVNode("textarea",{class:"px-textarea-inner",value:e.unref(i),ref_key:"inputRef",ref:p,placeholder:t.placeholder,disabled:t.disabled||t.readonly,autofocus:n.autofocus,rows:t.rows,style:e.normalizeStyle({minHeight:e.unref(g)?e.unref(g)+"px":void 0,maxHeight:e.unref(h)?e.unref(h)+"px":void 0}),onInput:e.withModifiers(b,["stop"]),onChange:e.withModifiers(_,["stop"]),onBlur:x,onFocus:H,onCompositionstart:j[0]||(j[0]=(...D)=>e.unref(c)&&e.unref(c)(...D)),onCompositionend:j[1]||(j[1]=(...D)=>e.unref(s)&&e.unref(s)(...D))},null,44,Ol),e.createElementVNode("div",Fl,[E.value?(e.openBlock(),e.createElementBlock("div",Gl,[e.createVNode(e.unref(tt),{class:"px-textarea-icon",onClick:v})])):e.createCommentVNode("",!0),t.showCount?(e.openBlock(),e.createElementBlock("div",Wl,[e.renderSlot(N.$slots,"count",{value:e.unref(i),count:k.value,maxLength:t.maxLength},()=>[e.createElementVNode("span",null,e.toDisplayString(k.value)+e.toDisplayString(e.unref(ue)(t.maxLength)?"":" / "+t.maxLength),1)])])):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createElementBlock("div",Ul,[e.createVNode(e.unref(be),{class:"px-textarea-icon px-animation__loading"})])):e.createCommentVNode("",!0)]),e.createElementVNode("canvas",{class:"px-textarea-canvas",ref_key:"canvasRef",ref:u},null,512)],34))}});function jl(n,o,l="primary",t){if(t)switch(o){case"outline":return fe;case"plain":return t[0];default:return n?t[1]:t[5]}else if(l!=="info")switch(o){case"outline":return fe;case"plain":return w(l,1);default:return n?w(l,2):w(l,6)}else switch(o){case"outline":return fe;case"plain":return w("neutral",1);default:return n?w("neutral",7):w("neutral",8)}}function Xl(n,o,l="primary",t){if(t)switch(o){case"plain":return t[1];case"outline":return n?t[0]:t[5];default:return n?t[0]:t[4]}else if(l!=="info")switch(o){case"plain":return w(l,2);case"outline":return n?w(l,1):w(l,6);default:return n?w(l,1):w(l,5)}else{switch(o){case"plain":return n?w("neutral",5):w("neutral",7);case"outline":return n?w("neutral",7):w("neutral",9)}return n?w("neutral",5):w("neutral",7)}}const ql=(n,o,l,t,r,a,c,s)=>{n.fillStyle=F(c);for(let i=0;i<4;i++)r[i]>s&&xe(n,t[i][0],t[i][1],r[i],a[i][0],a[i][1],s);t[1][0]+s>t[0][0]&&n.fillRect(t[0][0],0,t[1][0]-t[0][0]+s,s),t[2][1]+s>t[1][1]&&n.fillRect(o-s,t[1][1],s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s&&n.fillRect(t[3][0],l-s,t[2][0]-t[3][0]+s,s),t[3][1]+s>t[0][1]&&n.fillRect(0,t[0][1],s,t[3][1]-t[0][1]+s)},Yl=(n,o,l)=>{if(!(!n||o==="primary")){if(l)return F(o==="plain"?n[2]:n[1]);switch(o){case"outline":return F(n[5]);case"plain":return F(n[5]);default:return}}},Kl=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-hn",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M14 13h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-2v1h-1v1H9v1H8v1H7v1H6v1H5v1H4v1H3v-1H2v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-1h1v-2H9v-1H8V9H7V8H6V7H5V6H4V5H3V4H2V3h1V2h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h2V9h1V8h1V7h1V6h1V5h1V4h1V3h1V2h1v1h1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1z"},null,-1)])],4))}}),Ql={key:0,class:"px-tag-icon-wrapper"},Pe=e.defineComponent({name:"Tag",__name:"index",props:{borderRadius:null,shape:{default:"default"},size:{default:"medium"},disabled:{type:Boolean,default:!1},variant:{default:"primary"},theme:{default:"primary"},color:null,closable:{type:Boolean}},emits:["close"],setup(n,{emit:o}){const l=n,t=o,r=e.ref(!1),a=e.ref(!1),c=h=>{r.value=h},s=h=>{a.value=h},i=we(),f=e.shallowRef(null),d=e.shallowRef(null);e.onMounted(()=>{e.nextTick(()=>{g()})});const u=e.computed(()=>{if(!l.color)return null;const h=et(l.color);return ot(h.r,h.g,h.b,h.a,i.value)}),p=e.computed(()=>Yl(u.value,l.variant,l.disabled)),m=h=>{l.disabled||t("close",h)};e.watch([()=>l.borderRadius,()=>l.shape,()=>l.disabled,()=>l.variant,()=>l.theme,u,i],()=>{g()});const g=()=>{const h=Re(d,f);if(!h)return;const{ctx:y,width:k,height:b,canvas:v}=h,_=_e(),C=qe(v,_,l.borderRadius,l.shape,"medium",!1,!1,!1),V=Xl(l.disabled,l.variant,l.theme,u.value),x=Fe(C,k,b,_);ql(y,k,b,x,C,Ae,V,_);const E=jl(l.disabled,l.variant,l.theme,u.value);Oe(y,Math.round(k/2),Math.round(b/2),E)};return Ve(d,g),Me(g),(h,y)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["pixelium px-tag",{"px-tag__large":l.size==="large","px-tag__small":l.size==="small","px-tag__outline":l.variant==="outline","px-tag__plain":l.variant==="plain","px-tag__disabled":l.disabled,"px-tag__custom":u.value,[`px-tag__${l.theme||"primary"}`]:!0}]),style:e.normalizeStyle({color:p.value}),ref_key:"tagRef",ref:d},[e.createElementVNode("canvas",{ref_key:"canvasRef",ref:f,class:"px-tag-canvas"},null,512),e.renderSlot(h.$slots,"default"),l.closable?(e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(e.unref(Kl),{onMousedown:y[0]||(y[0]=k=>s(!0)),onMouseup:y[1]||(y[1]=k=>s(!1)),onMouseenter:y[2]||(y[2]=k=>c(!0)),onMouseleave:y[3]||(y[3]=k=>c(!1)),onClick:m,class:"px-tag-icon",style:e.normalizeStyle({fill:p.value})},null,8,["style"])])):e.createCommentVNode("",!0)],6))}}),Jl=(n,o,l,t,r,a,c,s,i,f,d)=>{n.fillStyle=F(c);for(let p=0;p<4;p++)r[p]>s&&(!(p===1||p===2)||i&&d||!i)&&xe(n,t[p][0],t[p][1],r[p],a[p][0],a[p][1],s);t[1][0]+s>t[0][0]&&n.fillRect(t[0][0],0,t[1][0]-t[0][0]+s,s),t[2][1]+s>t[1][1]&&(i&&d||!i)&&n.fillRect(o-s,t[1][1],s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s&&n.fillRect(t[3][0],l-s,t[2][0]-t[3][0]+s,s),!(i&&!f)&&t[3][1]+s>t[0][1]&&n.fillRect(0,t[0][1],s,t[3][1]-t[0][1]+s),i&&!f&&n.fillRect(s/2,0,s/2,l),i&&!d&&n.fillRect(o-2*s-1,0,s,l)},Wn=e.defineComponent({name:"InputGroupLabel",__name:"index",props:{backgroundColor:null,borderRadius:null,shape:{default:"default"},size:{default:"medium"}},setup(n){var k;const o=n,l=e.getCurrentInstance(),t=e.ref(((k=l==null?void 0:l.parent)==null?void 0:k.type)===We),[r,a,c]=t.value?Ge(Ye):[e.ref(0),e.ref(!1),e.ref(!1)],s=e.inject(Ke),i=e.computed(()=>t.value&&s?s.borderRadius:o.borderRadius),f=e.computed(()=>t.value&&s?s.size:o.size),d=e.computed(()=>t.value&&s?s.shape:o.shape),u=e.ref(!1),p=e.ref(!1),m=we(),g=e.shallowRef(null),h=e.shallowRef(null);e.onMounted(()=>{e.nextTick(()=>{y()})}),e.watch([i,d,u,p,m],()=>{y()}),e.watch([a,c],()=>{y()});const y=()=>{const b=Re(h,g);if(!b)return;const{ctx:v,width:_,height:C,canvas:V}=b,x=_e(),H=qe(V,x,i.value,d.value,f.value||"medium",t.value,a.value,c.value),E=w("neutral",10),L=Fe(H,_,C,x);Jl(v,_,C,L,H,Ae,E,x,t.value,a.value,c.value);const A=o.backgroundColor?et(o.backgroundColor):w("neutral",3);Oe(v,Math.round(_/2),Math.round(C/2),A)};return Ve(h,y),Me(y),(b,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pixelium px-input-group-label",{"px-input-group-label__large":f.value==="large","px-input-group-label__small":f.value==="small","px-input-group-label__inner":t.value}]),ref_key:"labelRef",ref:h},[e.createElementVNode("canvas",{ref_key:"canvasRef",ref:g,class:"px-input-group-label-canvas"},null,512),e.renderSlot(b.$slots,"default")],2))}}),Zl=(n,o,l,t,r,a,c,s,i,f,d)=>{n.fillStyle=F(c);for(let u=0;u<4;u++)r[u]<=s||(!(u===1||u===2)||i&&d||!i)&&xe(n,t[u][0],t[u][1],r[u],a[u][0],a[u][1],s);if(t[1][0]+s>t[0][0]){const u=i&&!d?t[1][0]-t[0][0]+s/2+1:t[1][0]-t[0][0]+s;n.fillRect(t[0][0],0,u,s)}if(t[2][1]+s>t[1][1]&&(i&&d||!i)&&n.fillRect(o-s,t[1][1],s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s){const u=i&&!d?t[2][0]-t[3][0]+s/2:t[2][0]-t[3][0]+s;n.fillRect(t[3][0],l-s,u,s)}t[3][1]+s>t[0][1]&&!(i&&!f)&&n.fillRect(0,t[0][1],s,t[3][1]-t[0][1]+s),i&&!f&&n.fillRect(s/2,0,s/2,l),i&&!d&&n.fillRect(o-2*s-1,0,s/2+1,l)},wt=Math.min,rt=Math.max,Rt=Math.round,Ie=n=>({x:n,y:n}),Sl={left:"right",right:"left",bottom:"top",top:"bottom"},zl={start:"end",end:"start"};function St(n,o,l){return rt(n,wt(o,l))}function bt(n,o){return typeof n=="function"?n(o):n}function nt(n){return n.split("-")[0]}function kt(n){return n.split("-")[1]}function Un(n){return n==="x"?"y":"x"}function zt(n){return n==="y"?"height":"width"}const ea=new Set(["top","bottom"]);function Je(n){return ea.has(nt(n))?"y":"x"}function en(n){return Un(Je(n))}function ta(n,o,l){l===void 0&&(l=!1);const t=kt(n),r=en(n),a=zt(r);let c=r==="x"?t===(l?"end":"start")?"right":"left":t==="start"?"bottom":"top";return o.reference[a]>o.floating[a]&&(c=Mt(c)),[c,Mt(c)]}function na(n){const o=Mt(n);return[tn(n),o,tn(o)]}function tn(n){return n.replace(/start|end/g,o=>zl[o])}const jn=["left","right"],Xn=["right","left"],oa=["top","bottom"],la=["bottom","top"];function aa(n,o,l){switch(n){case"top":case"bottom":return l?o?Xn:jn:o?jn:Xn;case"left":case"right":return o?oa:la;default:return[]}}function ra(n,o,l,t){const r=kt(n);let a=aa(nt(n),l==="start",t);return r&&(a=a.map(c=>c+"-"+r),o&&(a=a.concat(a.map(tn)))),a}function Mt(n){return n.replace(/left|right|bottom|top/g,o=>Sl[o])}function sa(n){return{top:0,right:0,bottom:0,left:0,...n}}function qn(n){return typeof n!="number"?sa(n):{top:n,right:n,bottom:n,left:n}}function Ht(n){const{x:o,y:l,width:t,height:r}=n;return{width:t,height:r,top:l,left:o,right:o+t,bottom:l+r,x:o,y:l}}function Yn(n,o,l){let{reference:t,floating:r}=n;const a=Je(o),c=en(o),s=zt(c),i=nt(o),f=a==="y",d=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,p=t[s]/2-r[s]/2;let m;switch(i){case"top":m={x:d,y:t.y-r.height};break;case"bottom":m={x:d,y:t.y+t.height};break;case"right":m={x:t.x+t.width,y:u};break;case"left":m={x:t.x-r.width,y:u};break;default:m={x:t.x,y:t.y}}switch(kt(o)){case"start":m[c]-=p*(l&&f?-1:1);break;case"end":m[c]+=p*(l&&f?-1:1);break}return m}const ca=async(n,o,l)=>{const{placement:t="bottom",strategy:r="absolute",middleware:a=[],platform:c}=l,s=a.filter(Boolean),i=await(c.isRTL==null?void 0:c.isRTL(o));let f=await c.getElementRects({reference:n,floating:o,strategy:r}),{x:d,y:u}=Yn(f,t,i),p=t,m={},g=0;for(let h=0;h<s.length;h++){const{name:y,fn:k}=s[h],{x:b,y:v,data:_,reset:C}=await k({x:d,y:u,initialPlacement:t,placement:p,strategy:r,middlewareData:m,rects:f,platform:c,elements:{reference:n,floating:o}});d=b??d,u=v??u,m={...m,[y]:{...m[y],..._}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(f=C.rects===!0?await c.getElementRects({reference:n,floating:o,strategy:r}):C.rects),{x:d,y:u}=Yn(f,p,i)),h=-1)}return{x:d,y:u,placement:p,strategy:r,middlewareData:m}};async function Kn(n,o){var l;o===void 0&&(o={});const{x:t,y:r,platform:a,rects:c,elements:s,strategy:i}=n,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:m=0}=bt(o,n),g=qn(m),y=s[p?u==="floating"?"reference":"floating":u],k=Ht(await a.getClippingRect({element:(l=await(a.isElement==null?void 0:a.isElement(y)))==null||l?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:f,rootBoundary:d,strategy:i})),b=u==="floating"?{x:t,y:r,width:c.floating.width,height:c.floating.height}:c.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),_=await(a.isElement==null?void 0:a.isElement(v))?await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1}:{x:1,y:1},C=Ht(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:v,strategy:i}):b);return{top:(k.top-C.top+g.top)/_.y,bottom:(C.bottom-k.bottom+g.bottom)/_.y,left:(k.left-C.left+g.left)/_.x,right:(C.right-k.right+g.right)/_.x}}const ia=n=>({name:"arrow",options:n,async fn(o){const{x:l,y:t,placement:r,rects:a,platform:c,elements:s,middlewareData:i}=o,{element:f,padding:d=0}=bt(n,o)||{};if(f==null)return{};const u=qn(d),p={x:l,y:t},m=en(r),g=zt(m),h=await c.getDimensions(f),y=m==="y",k=y?"top":"left",b=y?"bottom":"right",v=y?"clientHeight":"clientWidth",_=a.reference[g]+a.reference[m]-p[m]-a.floating[g],C=p[m]-a.reference[m],V=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let x=V?V[v]:0;(!x||!await(c.isElement==null?void 0:c.isElement(V)))&&(x=s.floating[v]||a.floating[g]);const H=_/2-C/2,E=x/2-h[g]/2-1,L=wt(u[k],E),$=wt(u[b],E),A=L,T=x-h[g]-$,I=x/2-h[g]/2+H,U=St(A,I,T),K=!i.arrow&&kt(r)!=null&&I!==U&&a.reference[g]/2-(I<A?L:$)-h[g]/2<0,N=K?I<A?I-A:I-T:0;return{[m]:p[m]+N,data:{[m]:U,centerOffset:I-U-N,...K&&{alignmentOffset:N}},reset:K}}}),ua=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(o){var l,t;const{placement:r,middlewareData:a,rects:c,initialPlacement:s,platform:i,elements:f}=o,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...y}=bt(n,o);if((l=a.arrow)!=null&&l.alignmentOffset)return{};const k=nt(r),b=Je(s),v=nt(s)===s,_=await(i.isRTL==null?void 0:i.isRTL(f.floating)),C=p||(v||!h?[Mt(s)]:na(s)),V=g!=="none";!p&&V&&C.push(...ra(s,h,g,_));const x=[s,...C],H=await Kn(o,y),E=[];let L=((t=a.flip)==null?void 0:t.overflows)||[];if(d&&E.push(H[k]),u){const I=ta(r,c,_);E.push(H[I[0]],H[I[1]])}if(L=[...L,{placement:r,overflows:E}],!E.every(I=>I<=0)){var $,A;const I=((($=a.flip)==null?void 0:$.index)||0)+1,U=x[I];if(U&&(!(u==="alignment"?b!==Je(U):!1)||L.every(j=>Je(j.placement)===b?j.overflows[0]>0:!0)))return{data:{index:I,overflows:L},reset:{placement:U}};let K=(A=L.filter(N=>N.overflows[0]<=0).sort((N,j)=>N.overflows[1]-j.overflows[1])[0])==null?void 0:A.placement;if(!K)switch(m){case"bestFit":{var T;const N=(T=L.filter(j=>{if(V){const D=Je(j.placement);return D===b||D==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(D=>D>0).reduce((D,ie)=>D+ie,0)]).sort((j,D)=>j[1]-D[1])[0])==null?void 0:T[0];N&&(K=N);break}case"initialPlacement":K=s;break}if(r!==K)return{reset:{placement:K}}}return{}}}},da=new Set(["left","top"]);async function fa(n,o){const{placement:l,platform:t,elements:r}=n,a=await(t.isRTL==null?void 0:t.isRTL(r.floating)),c=nt(l),s=kt(l),i=Je(l)==="y",f=da.has(c)?-1:1,d=a&&i?-1:1,u=bt(o,n);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof g=="number"&&(m=s==="end"?g*-1:g),i?{x:m*d,y:p*f}:{x:p*f,y:m*d}}const pa=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var l,t;const{x:r,y:a,placement:c,middlewareData:s}=o,i=await fa(o,n);return c===((l=s.offset)==null?void 0:l.placement)&&(t=s.arrow)!=null&&t.alignmentOffset?{}:{x:r+i.x,y:a+i.y,data:{...i,placement:c}}}}},ma=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:l,y:t,placement:r}=o,{mainAxis:a=!0,crossAxis:c=!1,limiter:s={fn:y=>{let{x:k,y:b}=y;return{x:k,y:b}}},...i}=bt(n,o),f={x:l,y:t},d=await Kn(o,i),u=Je(nt(r)),p=Un(u);let m=f[p],g=f[u];if(a){const y=p==="y"?"top":"left",k=p==="y"?"bottom":"right",b=m+d[y],v=m-d[k];m=St(b,m,v)}if(c){const y=u==="y"?"top":"left",k=u==="y"?"bottom":"right",b=g+d[y],v=g-d[k];g=St(b,g,v)}const h=s.fn({...o,[p]:m,[u]:g});return{...h,data:{x:h.x-l,y:h.y-t,enabled:{[p]:a,[u]:c}}}}}};function Et(){return typeof window<"u"}function st(n){return Qn(n)?(n.nodeName||"").toLowerCase():"#document"}function Be(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function Ue(n){var o;return(o=(Qn(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function Qn(n){return Et()?n instanceof Node||n instanceof Be(n).Node:!1}function Ee(n){return Et()?n instanceof Element||n instanceof Be(n).Element:!1}function Le(n){return Et()?n instanceof HTMLElement||n instanceof Be(n).HTMLElement:!1}function Jn(n){return!Et()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Be(n).ShadowRoot}const ha=new Set(["inline","contents"]);function _t(n){const{overflow:o,overflowX:l,overflowY:t,display:r}=Te(n);return/auto|scroll|overlay|hidden|clip/.test(o+t+l)&&!ha.has(r)}const ga=new Set(["table","td","th"]);function ya(n){return ga.has(st(n))}const va=[":popover-open",":modal"];function Tt(n){return va.some(o=>{try{return n.matches(o)}catch{return!1}})}const wa=["transform","translate","scale","rotate","perspective"],ba=["transform","translate","scale","rotate","perspective","filter"],ka=["paint","layout","strict","content"];function nn(n){const o=on(),l=Ee(n)?Te(n):n;return wa.some(t=>l[t]?l[t]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!o&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!o&&(l.filter?l.filter!=="none":!1)||ba.some(t=>(l.willChange||"").includes(t))||ka.some(t=>(l.contain||"").includes(t))}function _a(n){let o=Ze(n);for(;Le(o)&&!ct(o);){if(nn(o))return o;if(Tt(o))return null;o=Ze(o)}return null}function on(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ca=new Set(["html","body","#document"]);function ct(n){return Ca.has(st(n))}function Te(n){return Be(n).getComputedStyle(n)}function $t(n){return Ee(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Ze(n){if(st(n)==="html")return n;const o=n.assignedSlot||n.parentNode||Jn(n)&&n.host||Ue(n);return Jn(o)?o.host:o}function Zn(n){const o=Ze(n);return ct(o)?n.ownerDocument?n.ownerDocument.body:n.body:Le(o)&&_t(o)?o:Zn(o)}function Sn(n,o,l){var t;o===void 0&&(o=[]);const r=Zn(n),a=r===((t=n.ownerDocument)==null?void 0:t.body),c=Be(r);return a?(ln(c),o.concat(c,c.visualViewport||[],_t(r)?r:[],[])):o.concat(r,Sn(r,[]))}function ln(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function zn(n){const o=Te(n);let l=parseFloat(o.width)||0,t=parseFloat(o.height)||0;const r=Le(n),a=r?n.offsetWidth:l,c=r?n.offsetHeight:t,s=Rt(l)!==a||Rt(t)!==c;return s&&(l=a,t=c),{width:l,height:t,$:s}}function eo(n){return Ee(n)?n:n.contextElement}function it(n){const o=eo(n);if(!Le(o))return Ie(1);const l=o.getBoundingClientRect(),{width:t,height:r,$:a}=zn(o);let c=(a?Rt(l.width):l.width)/t,s=(a?Rt(l.height):l.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!s||!Number.isFinite(s))&&(s=1),{x:c,y:s}}const xa=Ie(0);function to(n){const o=Be(n);return!on()||!o.visualViewport?xa:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Va(n,o,l){return o===void 0&&(o=!1),!l||o&&l!==Be(n)?!1:o}function Ct(n,o,l,t){o===void 0&&(o=!1),l===void 0&&(l=!1);const r=n.getBoundingClientRect(),a=eo(n);let c=Ie(1);o&&(t?Ee(t)&&(c=it(t)):c=it(n));const s=Va(a,l,t)?to(a):Ie(0);let i=(r.left+s.x)/c.x,f=(r.top+s.y)/c.y,d=r.width/c.x,u=r.height/c.y;if(a){const p=Be(a),m=t&&Ee(t)?Be(t):t;let g=p,h=ln(g);for(;h&&t&&m!==g;){const y=it(h),k=h.getBoundingClientRect(),b=Te(h),v=k.left+(h.clientLeft+parseFloat(b.paddingLeft))*y.x,_=k.top+(h.clientTop+parseFloat(b.paddingTop))*y.y;i*=y.x,f*=y.y,d*=y.x,u*=y.y,i+=v,f+=_,g=Be(h),h=ln(g)}}return Ht({width:d,height:u,x:i,y:f})}function Nt(n,o){const l=$t(n).scrollLeft;return o?o.left+l:Ct(Ue(n)).left+l}function no(n,o){const l=n.getBoundingClientRect(),t=l.left+o.scrollLeft-Nt(n,l),r=l.top+o.scrollTop;return{x:t,y:r}}function Ba(n){let{elements:o,rect:l,offsetParent:t,strategy:r}=n;const a=r==="fixed",c=Ue(t),s=o?Tt(o.floating):!1;if(t===c||s&&a)return l;let i={scrollLeft:0,scrollTop:0},f=Ie(1);const d=Ie(0),u=Le(t);if((u||!u&&!a)&&((st(t)!=="body"||_t(c))&&(i=$t(t)),Le(t))){const m=Ct(t);f=it(t),d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}const p=c&&!u&&!a?no(c,i):Ie(0);return{width:l.width*f.x,height:l.height*f.y,x:l.x*f.x-i.scrollLeft*f.x+d.x+p.x,y:l.y*f.y-i.scrollTop*f.y+d.y+p.y}}function Ra(n){return Array.from(n.getClientRects())}function Ma(n){const o=Ue(n),l=$t(n),t=n.ownerDocument.body,r=rt(o.scrollWidth,o.clientWidth,t.scrollWidth,t.clientWidth),a=rt(o.scrollHeight,o.clientHeight,t.scrollHeight,t.clientHeight);let c=-l.scrollLeft+Nt(n);const s=-l.scrollTop;return Te(t).direction==="rtl"&&(c+=rt(o.clientWidth,t.clientWidth)-r),{width:r,height:a,x:c,y:s}}const oo=25;function Ha(n,o){const l=Be(n),t=Ue(n),r=l.visualViewport;let a=t.clientWidth,c=t.clientHeight,s=0,i=0;if(r){a=r.width,c=r.height;const d=on();(!d||d&&o==="fixed")&&(s=r.offsetLeft,i=r.offsetTop)}const f=Nt(t);if(f<=0){const d=t.ownerDocument,u=d.body,p=getComputedStyle(u),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(t.clientWidth-u.clientWidth-m);g<=oo&&(a-=g)}else f<=oo&&(a+=f);return{width:a,height:c,x:s,y:i}}const Ea=new Set(["absolute","fixed"]);function Ta(n,o){const l=Ct(n,!0,o==="fixed"),t=l.top+n.clientTop,r=l.left+n.clientLeft,a=Le(n)?it(n):Ie(1),c=n.clientWidth*a.x,s=n.clientHeight*a.y,i=r*a.x,f=t*a.y;return{width:c,height:s,x:i,y:f}}function lo(n,o,l){let t;if(o==="viewport")t=Ha(n,l);else if(o==="document")t=Ma(Ue(n));else if(Ee(o))t=Ta(o,l);else{const r=to(n);t={x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}return Ht(t)}function ao(n,o){const l=Ze(n);return l===o||!Ee(l)||ct(l)?!1:Te(l).position==="fixed"||ao(l,o)}function $a(n,o){const l=o.get(n);if(l)return l;let t=Sn(n,[]).filter(s=>Ee(s)&&st(s)!=="body"),r=null;const a=Te(n).position==="fixed";let c=a?Ze(n):n;for(;Ee(c)&&!ct(c);){const s=Te(c),i=nn(c);!i&&s.position==="fixed"&&(r=null),(a?!i&&!r:!i&&s.position==="static"&&!!r&&Ea.has(r.position)||_t(c)&&!i&&ao(n,c))?t=t.filter(d=>d!==c):r=s,c=Ze(c)}return o.set(n,t),t}function Na(n){let{element:o,boundary:l,rootBoundary:t,strategy:r}=n;const c=[...l==="clippingAncestors"?Tt(o)?[]:$a(o,this._c):[].concat(l),t],s=c[0],i=c.reduce((f,d)=>{const u=lo(o,d,r);return f.top=rt(u.top,f.top),f.right=wt(u.right,f.right),f.bottom=wt(u.bottom,f.bottom),f.left=rt(u.left,f.left),f},lo(o,s,r));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}}function Pa(n){const{width:o,height:l}=zn(n);return{width:o,height:l}}function Ia(n,o,l){const t=Le(o),r=Ue(o),a=l==="fixed",c=Ct(n,!0,a,o);let s={scrollLeft:0,scrollTop:0};const i=Ie(0);function f(){i.x=Nt(r)}if(t||!t&&!a)if((st(o)!=="body"||_t(r))&&(s=$t(o)),t){const m=Ct(o,!0,a,o);i.x=m.x+o.clientLeft,i.y=m.y+o.clientTop}else r&&f();a&&!t&&r&&f();const d=r&&!t&&!a?no(r,s):Ie(0),u=c.left+s.scrollLeft-i.x-d.x,p=c.top+s.scrollTop-i.y-d.y;return{x:u,y:p,width:c.width,height:c.height}}function an(n){return Te(n).position==="static"}function ro(n,o){if(!Le(n)||Te(n).position==="fixed")return null;if(o)return o(n);let l=n.offsetParent;return Ue(n)===l&&(l=l.ownerDocument.body),l}function so(n,o){const l=Be(n);if(Tt(n))return l;if(!Le(n)){let r=Ze(n);for(;r&&!ct(r);){if(Ee(r)&&!an(r))return r;r=Ze(r)}return l}let t=ro(n,o);for(;t&&ya(t)&&an(t);)t=ro(t,o);return t&&ct(t)&&an(t)&&!nn(t)?l:t||_a(n)||l}const La=async function(n){const o=this.getOffsetParent||so,l=this.getDimensions,t=await l(n.floating);return{reference:Ia(n.reference,await o(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Da(n){return Te(n).direction==="rtl"}const Aa={convertOffsetParentRelativeRectToViewportRelativeRect:Ba,getDocumentElement:Ue,getClippingRect:Na,getOffsetParent:so,getElementRects:La,getClientRects:Ra,getDimensions:Pa,getScale:it,isElement:Ee,isRTL:Da},Oa=pa,Fa=ma,Ga=ua,Wa=ia,Ua=(n,o,l)=>{const t=new Map,r={platform:Aa,...l},a={...r.platform,_c:t};return ca(n,o,{...r,platform:a})};function ja(n){return n==="light"?w("neutral",10):w("neutral",9)}function Xa(n){return n==="light"?w("neutral",1):w("neutral",10)}const qa=(n,o,l,t,r,a,c,s,i,f,d,u)=>{n.fillStyle=F(c);for(let p=0;p<4;p++)r[p]>s&&xe(n,t[p][0]+u,t[p][1]+d,r[p],a[p][0],a[p][1],s);t[1][0]+s>t[0][0]&&n.fillRect(t[0][0]+u,d,t[1][0]-t[0][0]+s,s),t[2][1]+s>t[1][1]&&n.fillRect(o-i-s+u,t[1][1]+d,s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s&&n.fillRect(t[3][0]+u,l-f-s+d,t[2][0]-t[3][0]+s,s),t[3][1]+s>t[0][1]&&n.fillRect(u,t[0][1]+d,s,t[3][1]-t[0][1]+s)},Ya=(n,o,l,t,r,a,c,s,i,f)=>{switch(c){case"right":{const d=f-a/2,u=[0,s==="start"?Math.floor(d):s==="end"?Math.ceil(d):Math.round(d)];for(let p=0;p<4;p++){const m=p>1?p-1:p;n.fillStyle=F(t);const g=Math.max(0,u[1]-m*a),h=Math.min(l,u[1]+m*a),y=u[0]+p*a;n.fillRect(y,g,a,a),n.fillRect(y,h,a,a),n.fillStyle=F(r),h-g-a>0&&n.fillRect(y,g+a,a,h-g-a)}break}case"left":{const d=f-a/2,u=[Math.round(o-a),s==="start"?Math.floor(d):s==="end"?Math.ceil(d):Math.round(d)];for(let p=0;p<4;p++){const m=p>1?p-1:p;n.fillStyle=F(t);const g=Math.max(0,u[1]-m*a),h=Math.min(l-a,u[1]+m*a),y=u[0]-p*a;n.fillRect(y,g,a,a),n.fillRect(y,h,a,a),n.fillStyle=F(r),h-g-a>0&&n.fillRect(y,g+a,a,h-g-a)}break}case"bottom":{const d=i-a/2,u=[s==="start"?Math.floor(d):s==="end"?Math.ceil(d):Math.round(d),0];for(let p=0;p<4;p++){const m=p>1?p-1:p;n.fillStyle=F(t);const g=Math.max(0,u[0]-m*a),h=Math.min(u[0]+m*a,o-a),y=u[1]+p*a;n.fillRect(g,y,a,a),n.fillRect(h,y,a,a),n.fillStyle=F(r),h-g-a>0&&n.fillRect(g+a,y,h-g-a,a)}break}case"top":default:{const d=i-a/2,u=[s==="start"?Math.floor(d):s==="end"?Math.ceil(d):Math.round(d),Math.round(l-a)];for(let p=0;p<4;p++){const m=p>1?p-1:p;n.fillStyle=F(t);const g=Math.max(0,u[0]-m*a),h=Math.min(u[0]+m*a,o-a),y=u[1]-p*a;n.fillRect(g,y,a,a),n.fillRect(h,y,a,a),n.fillStyle=F(r),h-g-a>0&&n.fillRect(g+a,y,h-g-a,a)}break}}},Ka=250,co=e.defineComponent({name:"PopupContent",__name:"index",props:{content:null,visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean},placement:{default:"top"},offset:{default:8},variant:{default:"light"},arrow:{type:Boolean,default:!0},zIndex:null,target:null,root:{default:"body"},borderRadius:null,widthEqual:{type:Boolean,default:!1},contentStyle:null},emits:["contentMouseenter","contentMouseleave"],setup(n,{expose:o,emit:l}){const t=n,[r,a]=_n("popup"),c=e.ref(!1),s=e.shallowRef(null),i=e.shallowRef(null),f=e.shallowRef(null),d=e.ref({}),u=e.ref({}),p=e.ref(void 0),m=e.ref(void 0),g=e.ref(void 0),h=e.computed(()=>t.placement.split("-")[0]),y=e.computed(()=>t.placement.split("-")[1]||"middle"),k=e.ref(void 0);async function b($){if(!J()||!s.value||!i.value||!f.value)return;const A=getComputedStyle(s.value),T=parseFloat(A.borderLeftWidth)+parseFloat(A.borderRightWidth),I=T/2,U=(parseFloat(A.borderTopWidth)+parseFloat(A.borderBottomWidth))/2;if((h.value==="top"||h.value==="bottom")&&t.widthEqual){const X=getComputedStyle($),re=X.boxSizing,le=A.boxSizing,me=parseFloat(X.paddingLeft)+parseFloat(X.paddingRight),G=parseFloat(A.paddingLeft)+parseFloat(A.paddingRight),R=parseFloat(X.borderLeftWidth)+parseFloat(X.borderRightWidth),W=parseFloat(X.width);re==="border-box"?le==="border-box"?k.value=W:k.value=W-G-T:le==="border-box"?k.value=W+me+R:k.value=W-G-T+me+R,await e.nextTick()}else k.value=void 0;const K=_e(),N=Math.max(t.borderRadius||K,K),j=Math.max(0,N-ht(K,N)+K),D=await Ua($,s.value,{placement:t.placement,middleware:[Oa(t.offset),Fa(),Ga(),Wa({element:i.value,padding:j})]}),{x:ie,y:ne,middlewareData:se,placement:S}=D;d.value={left:`${ie}px`,top:`${ne}px`};const{x:oe,y:Z}=se.arrow??{};g.value=S.split("-")[0],u.value={left:oe?`${oe+I}px`:void 0,top:Z?`${Z+U}px`:void 0},p.value=oe?oe+I:void 0,m.value=Z?Z+U:void 0,e.nextTick(()=>{t.visible&&(c.value=!0)})}async function v($){setTimeout(()=>{b($)})}async function _(){setTimeout(()=>{c.value=!1,g.value=void 0},Ka)}const C=$=>{J()&&($?(a(),t.target instanceof HTMLElement?v(t.target):t.target&&t.target.el instanceof HTMLElement&&v(t.target.el)):_())};e.watch(()=>t.visible,$=>{C(!!$)});const V=l,x=$=>{V("contentMouseenter",$)},H=$=>{V("contentMouseleave",$)};o({updateRenderState:()=>{e.nextTick(()=>{C(!!t.visible)})},content:s});const E=we();e.onMounted(()=>{e.nextTick(()=>{L(),C(!!t.visible)})}),e.watch([E,g,p,m,c,()=>t.variant,()=>t.arrow],()=>{L()});const L=()=>{if(!g.value)return;const $=Re(s,f);if(!$)return;const{ctx:A,width:T,height:I}=$,U=_e(),K=ve(Math.max(t.borderRadius||U,U),4),N=t.arrow?U*3:0,j=g.value==="left"||g.value==="right"?N:0,D=g.value==="top"||g.value==="bottom"?N:0,ie=ja(t.variant),ne=Fe(K,T,I,U,j,D),se=Ae,S=g.value==="bottom"?N:0,oe=g.value==="right"?N:0;qa(A,T,I,ne,K,se,ie,U,j,D,S,oe);const Z=Xa(t.variant);Oe(A,Math.round((T-j)/2+oe),Math.round((I-D)/2+S),Z),t.arrow&&Ya(A,T,I,ie,Z,U,g.value,y.value,p.value||0,m.value||0)};return Ve(s,L),Me(L),($,A)=>(e.openBlock(),e.createBlock(e.Teleport,{to:t.root||"body"},[e.createVNode(e.Transition,{name:"px-popup-content-fade__"+h.value},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",e.mergeProps({ref_key:"contentRef",ref:s,class:{pixelium:!0,"px-popup-content":!0,"px-popup-content__arrow":!!t.arrow,[`px-popup-content__${g.value||h.value}`]:!0,[`px-popup-content__${t.variant}`]:!0},style:{...d.value,visibility:c.value?"visible":"hidden",pointerEvents:c.value?"auto":"none",zIndex:t.zIndex??e.unref(r),width:e.unref(te)(k.value)?`${k.value}px`:void 0,...t.contentStyle}},$.$attrs,{onMouseenter:x,onMouseleave:H}),[e.renderSlot($.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)]),e.createElementVNode("div",{class:"px-popup-content-arrow",style:e.normalizeStyle(u.value),ref_key:"arrowRef",ref:i},null,4),e.createElementVNode("canvas",{class:"px-popup-content-canvas",ref_key:"canvasRef",ref:f},null,512)],16),[[e.vShow,t.visible]])]),_:3},8,["name"])],8,["to"]))}}),io=(n,o)=>o?o.contains(n):!0,uo=n=>{if(pt(n)){const o=n();return o instanceof HTMLElement?o:null}return n.value?n.value instanceof HTMLElement?n.value:n.value.el&&n.value.el instanceof HTMLElement?n.value.el:null:null},fo=(n,o)=>{const l=t=>{const r=t.target;if(!(r instanceof HTMLElement)||(De(n)?n.length===0:!pt(n)&&!n.value))return;(De(n)?n.reduce((c,s)=>c||io(r,uo(s)),!1):io(r,uo(n)))||o(t)};e.onMounted(()=>{document.addEventListener("click",l)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",l)})},po=e.defineComponent({name:"PopupTrigger",__name:"index",props:{trigger:{default:"hover"},disabled:{type:Boolean}},emits:["close","open"],setup(n,{expose:o,emit:l}){const t=n,r=l,a=e.shallowRef(null);async function c(u,p){J()&&(u.el instanceof HTMLElement?a.value=u:a.value=null),!t.disabled&&r("open",u,p)}async function s(u){t.disabled||r("close",u)}const i=e.useSlots();fo(a,u=>{t.trigger==="click"&&s(u)});const d=e.shallowRef(null);return o({firstVNode:d}),()=>{var p;const u=vt(((p=i.default)==null?void 0:p.call(i))||[]);return e.createVNode(e.Fragment,null,[u.map((m,g)=>{if(cl(m)){const h=t.trigger==="click"?e.createVNode("span",{onClick:y=>c(h,y)},[m]):e.createVNode("span",{onMouseenter:y=>c(h,y),onMouseleave:y=>s(y)},[m]);return g===0&&(d.value=h,a.value||(a.value=h)),h}else{const h=e.cloneVNode(m,e.mergeProps(m.props||{},t.trigger==="click"?{onClick:y=>c(h,y)}:{onMouseenter:y=>c(h,y),onMouseleave:y=>s(y)}));return h.ref=m.ref,g===0&&(d.value=h,a.value||(a.value=h)),h}})])}}}),Qa=16,Ja=300,ut=e.defineComponent({name:"Popover",__name:"index",props:{content:null,visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean,default:void 0},placement:{default:"top"},trigger:{default:"hover"},offset:{default:8},variant:{default:"light"},arrow:{type:Boolean,default:!0},disabled:{type:Boolean},zIndex:null,root:{default:"body"},widthEqual:{type:Boolean,default:!1},contentStyle:null},emits:["update:visible","close","open"],setup(n,{expose:o,emit:l}){const t=n,r=e.computed(()=>t.visible!==void 0),a=r.value?t.visible:t.defaultVisible,c=e.ref(ue(a)?!1:a),s=e.shallowRef(),i=e.shallowRef(),f=l,d=e.shallowRef(null);let u;async function p(x,H){u&&(u(),u=void 0),await m(x),f("open",H)}async function m(x,H=!1){J()&&(v==null||v.disconnect(),x.el instanceof HTMLElement?d.value=x:d.value=null,d.value&&d.value.el instanceof HTMLElement&&(v==null||v.observe(d.value.el))),r.value&&!H?(f("update:visible",!0),await e.nextTick(()=>{}),c.value=!!t.visible):c.value=!0}async function g(x){if(t.trigger==="click"){if(s.value&&s.value.content&&s.value.content.contains(x.target)||!c.value)return}else{u&&(u(),u=void 0);const{resolve:H,reject:E,promise:L}=Promise.withResolvers();u=E,setTimeout(()=>{H()},Ja);try{await L}catch{return}}r.value?(f("update:visible",!1),await e.nextTick(()=>{}),c.value=!!t.visible):c.value=!1,f("close",x)}const h=()=>{t.trigger!=="click"&&u&&(u(),u=void 0)},y=x=>{t.trigger!=="click"&&g(x)},k=()=>{J()&&!d.value&&i.value&&i.value.firstVNode&&(v==null||v.disconnect(),d.value=i.value.firstVNode,d.value.el instanceof HTMLElement&&(v==null||v.observe(d.value.el)))},b=x=>{x?(k(),d.value&&m(d.value,!0)):c.value=!1};e.watch(()=>t.visible,()=>{b(!!t.visible)});const v=J()?new ResizeObserver(()=>{_()}):null;e.onMounted(()=>{e.nextTick(()=>{c.value&&_()})});const _=()=>{var x;k(),J()&&((x=s.value)==null||x.updateRenderState())};o({triggerContent:s,updateRenderState:_});const C=e.useSlots(),V=x=>{var H;return J()?((H=d.value)==null?void 0:H.el)instanceof HTMLElement:!1};return()=>{var x;return e.createVNode(e.Fragment,null,[e.createVNode(po,{trigger:t.trigger,disabled:t.disabled,onClose:g,onOpen:p,ref:H=>i.value=H},{default:()=>{var H;return[(H=C.default)==null?void 0:H.call(C)]}}),e.createVNode(co,{visible:c.value,content:t.content,zIndex:t.zIndex,variant:t.variant,placement:t.placement,arrow:t.arrow,offset:t.offset,borderRadius:Qa,root:t.root,widthEqual:t.widthEqual,target:V((x=d.value)==null?void 0:x.el)?d.value.el:null,onContentMouseenter:h,onContentMouseleave:y,contentStyle:t.contentStyle,ref:H=>s.value=H},{content:C.content})])}}}),Za={key:0,class:"px-input-tag-prefix-wrapper"},Sa={class:"px-input-tag-content"},za={class:"px-input-tag-content"},er=["value","placeholder","disabled","autofocus"],tr={key:1,class:"px-input-tag-close-wrapper"},nr={key:1,class:"px-input-tag-icon-placeholder"},or={key:2,class:"px-input-tag-loading-wrapper"},lr={key:3,class:"px-input-tag-suffix-wrapper"},mo=e.defineComponent({name:"InputTag",__name:"index",props:{modelValue:null,defaultValue:null,inputValue:null,defaultInputValue:null,placeholder:null,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{default:"medium"},shape:{default:"default"},borderRadius:null,maxLength:null,collapseTags:{type:Boolean,default:!1},maxDisplayTags:null,collapseTagsPopover:{type:Boolean,default:!0},tagTheme:{default:"info"},tagVariant:{default:"plain"},tagColor:null,status:{default:"normal"},autofocus:{type:Boolean}},emits:["update:modelValue","tagAdd","tagClose","change","input","update:inputValue","inputChange","clear","blur","focus"],setup(n,{expose:o,emit:l}){var G;const t=n,r=l,[a,c,s]=at({afterComposition:R=>{e.nextTick(()=>{L(R)})}}),i=e.getCurrentInstance(),f=e.ref(((G=i==null?void 0:i.parent)==null?void 0:G.type)===We),[d,u,p]=f.value?Ge(Ye):[e.ref(0),e.ref(!1),e.ref(!1)],m=e.inject(Ke),g=e.computed(()=>f.value&&m?m.borderRadius:t.borderRadius),h=e.computed(()=>f.value&&m?m.size:t.size),y=e.computed(()=>f.value&&m?m.shape:t.shape),k=e.computed(()=>f.value&&m&&m.disabled||t.disabled),b=e.computed(()=>h.value==="small"?"small":"medium"),[v,_]=Qe("modelValue",t,r,{defaultField:"defaultValue",transform:R=>De(R)?[...R]:[]}),[C,V]=Qe("inputValue",t,r,{defaultField:"defaultInputValue",transform:R=>R||""}),x=e.shallowRef(null),H=e.shallowRef(null),E=e.shallowRef(null),L=async R=>{const Y=R.target.value;C.value=Y,!a.value&&(r("input",Y,R),V(Y))},$=async()=>{const R=[];await _(R),await V(""),r("clear",R),r("change",R),r("inputChange","")},A=async(R,W)=>{const Y=v.value?[...v.value]:[],z=Y.splice(R,1);await _(Y),r("tagClose",z[0],R,W),r("change",Y)},T=R=>{const W=R.target;r("inputChange",W.value,R)},I=e.ref(!1),U=async()=>{I.value=!1,await V(""),r("inputChange","")},K=()=>{I.value=!0},N=async R=>{const W=(C.value||"").trim();if(!W||t.maxLength&&v.value&&v.value.length>=t.maxLength)return;const Y=v.value?[...v.value]:[];Y.push(W),await _(Y),await V(""),r("tagAdd",W,R),r("change",Y),r("inputChange","")},j=()=>{var R;(R=E.value)==null||R.focus()},D=e.ref(!1),ie=()=>{D.value=!0},ne=()=>{D.value=!1},se=e.computed(()=>t.clearable&&!k.value&&!t.readonly),S=e.computed(()=>!k.value&&!t.readonly),oe=e.useSlots();o({focus:()=>{var R;(R=E.value)==null||R.focus()},blur:()=>{var R;(R=E.value)==null||R.blur()},clear:()=>$()});const Z=e.computed(()=>!!t.collapseTags&&te(t.maxDisplayTags)&&t.maxDisplayTags>=0),X=e.computed(()=>v.value?Z.value?v.value.slice(0,t.maxDisplayTags):v.value:[]),re=e.computed(()=>v.value?Z.value?v.value.slice(t.maxDisplayTags):[]:[]),le=we();e.watch([u,p,g,y,h,k,()=>oe,le,I,D],()=>{setTimeout(()=>{me()})});const me=()=>{const R=Re(x,H);if(!R)return;const{ctx:W,width:Y,height:z,canvas:ee}=R,pe=_e(),je=qe(ee,pe,g.value,y.value,h.value||"medium",f.value,u.value,p.value),$e=t.status!=="normal"?w(t.status==="error"?"danger":t.status,6):(D.value||I.value)&&!k.value&&!t.readonly?w("primary",6):w("neutral",10),Xe=Fe(je,Y,z,pe);Zl(W,Y,z,Xe,je,Ae,$e,pe,f.value,u.value,p.value);const Q=k.value?w("neutral",6):w("neutral",1);Oe(W,Math.round(Y/2),Math.round(z/2),Q)};return e.onMounted(()=>{e.nextTick(()=>{me()})}),Ve(x,me),Me(me),(R,W)=>{var Y;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pixelium px-input-tag",{[`px-input-tag__${h.value}`]:!!h.value,[`px-input-tag__${y.value}`]:!!y.value,"px-input-tag__inner":f.value,"px-input-tag__disabled":!!k.value}]),ref_key:"wrapperRef",ref:x,onClick:j,onMouseenter:ie,onMouseleave:ne},[e.unref(oe).prefix?(e.openBlock(),e.createElementBlock("div",Za,[e.renderSlot(R.$slots,"prefix")])):e.createCommentVNode("",!0),e.createElementVNode("div",Sa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(z,ee)=>(e.openBlock(),e.createBlock(Pe,{key:ee,size:b.value,variant:t.tagVariant,theme:t.tagTheme,closable:S.value,disabled:k.value,color:t.tagColor,onClose:pe=>A(ee,pe)},{default:e.withCtx(()=>[e.renderSlot(R.$slots,"tag",{tag:z,index:ee},()=>[e.createTextVNode(e.toDisplayString(z),1)])]),_:2},1032,["size","variant","theme","closable","disabled","color","onClose"]))),128)),re.value.length&&Z.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.collapseTagsPopover?(e.openBlock(),e.createBlock(ut,{key:1},{content:e.withCtx(()=>[e.createElementVNode("div",za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(z,ee)=>(e.openBlock(),e.createBlock(Pe,{key:ee,size:b.value,variant:t.tagVariant,theme:t.tagTheme,closable:S.value,disabled:k.value,color:t.tagColor,onClose:pe=>A(ee+Math.floor(t.maxDisplayTags),pe)},{default:e.withCtx(()=>[e.renderSlot(R.$slots,"tag",{tag:z,index:ee+Math.floor(t.maxDisplayTags)},()=>[e.createTextVNode(e.toDisplayString(z),1)])]),_:2},1032,["size","variant","theme","closable","disabled","color","onClose"]))),128))])]),default:e.withCtx(()=>[e.createVNode(Pe,{size:b.value,variant:t.tagVariant,theme:t.tagTheme,disabled:k.value,color:t.tagColor},{default:e.withCtx(()=>[e.renderSlot(R.$slots,"tag",{tag:`+${re.value.length}`,index:-1},()=>[e.createTextVNode("+"+e.toDisplayString(re.value.length),1)])]),_:3},8,["size","variant","theme","disabled","color"])]),_:3})):(e.openBlock(),e.createBlock(Pe,{key:0,size:b.value,variant:t.tagVariant,theme:t.tagTheme,disabled:k.value,color:t.tagColor},{default:e.withCtx(()=>[e.renderSlot(R.$slots,"tag",{tag:`+${re.value.length}`,index:-1},()=>[e.createTextVNode("+"+e.toDisplayString(re.value.length),1)])]),_:3},8,["size","variant","theme","disabled","color"]))],64)):e.createCommentVNode("",!0),e.createElementVNode("input",{class:"px-input-tag-inner",value:e.unref(C),ref_key:"inputRef",ref:E,placeholder:e.unref(v)&&e.unref(v).length?"":t.placeholder,disabled:k.value||t.readonly,autofocus:n.autofocus,onInput:e.withModifiers(L,["stop"]),onChange:e.withModifiers(T,["stop"]),onBlur:U,onFocus:K,onCompositionstart:W[0]||(W[0]=(...z)=>e.unref(c)&&e.unref(c)(...z)),onCompositionend:W[1]||(W[1]=(...z)=>e.unref(s)&&e.unref(s)(...z)),onKeydown:e.withKeys(N,["enter"])},null,40,er)]),se.value?(e.openBlock(),e.createElementBlock("div",tr,[D.value&&((Y=e.unref(v))!=null&&Y.length)?(e.openBlock(),e.createBlock(e.unref(tt),{key:0,class:"px-input-tag-icon",onClick:$})):(e.openBlock(),e.createElementBlock("div",nr))])):e.createCommentVNode("",!0),t.loading?(e.openBlock(),e.createElementBlock("div",or,[e.createVNode(e.unref(be),{class:"px-input-tag-icon px-animation__loading"})])):e.createCommentVNode("",!0),e.unref(oe).suffix?(e.openBlock(),e.createElementBlock("div",lr,[e.renderSlot(R.$slots,"suffix")])):e.createCommentVNode("",!0),e.createElementVNode("canvas",{class:"px-input-tag-canvas",ref_key:"canvasRef",ref:H},null,512)],34)}}}),ar=16,rr=300,ho=e.defineComponent({name:"Tooltip",__name:"index",props:{content:null,visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean,default:void 0},placement:{default:"top"},trigger:{default:"hover"},offset:{default:8},variant:{default:"dark"},arrow:{type:Boolean,default:!0},disabled:{type:Boolean},zIndex:null,root:{default:"body"}},emits:["update:visible","close","open"],setup(n,{emit:o}){const l=n,t=e.computed(()=>l.visible!==void 0),r=t.value?l.visible:l.defaultVisible,a=e.ref(ue(r)?!1:r),c=e.shallowRef(),s=e.shallowRef(),i=o,f=e.shallowRef(null);let d;async function u(V,x){d&&(d(),d=void 0),await p(V),i("open",x)}async function p(V,x=!1){J()&&(b==null||b.disconnect(),V.el instanceof HTMLElement?f.value=V:f.value=null,f.value&&f.value.el instanceof HTMLElement&&(b==null||b.observe(f.value.el))),t.value&&!x?(i("update:visible",!0),await e.nextTick(()=>{}),a.value=!!l.visible):a.value=!0}async function m(V){if(l.trigger==="click"){if(c.value&&c.value.content&&c.value.content.contains(V.target)||!a.value)return}else{d&&(d(),d=void 0);const{resolve:x,reject:H,promise:E}=Promise.withResolvers();d=H,setTimeout(()=>{x()},rr);try{await E}catch{return}}t.value?(i("update:visible",!1),await e.nextTick(()=>{}),a.value=!!l.visible):a.value=!1,i("close",V)}const g=()=>{l.trigger!=="click"&&d&&(d(),d=void 0)},h=V=>{l.trigger!=="click"&&m(V)},y=()=>{J()&&!f.value&&s.value&&s.value.firstVNode&&(b==null||b.disconnect(),f.value=s.value.firstVNode,f.value.el instanceof HTMLElement&&(b==null||b.observe(f.value.el)))},k=V=>{V?(y(),f.value&&p(f.value,!0)):a.value=!1};e.watch(()=>l.visible,()=>{k(!!l.visible)});const b=J()?new ResizeObserver(()=>{v()}):null;e.onMounted(()=>{e.nextTick(()=>{a.value&&v()})});const v=()=>{var V;y(),J()&&((V=c.value)==null||V.updateRenderState())},_=e.useSlots(),C=V=>{var x;return J()?((x=f.value)==null?void 0:x.el)instanceof HTMLElement:!1};return()=>{var V;return e.createVNode(e.Fragment,null,[e.createVNode(po,{trigger:l.trigger,disabled:l.disabled,onClose:m,onOpen:u,ref:x=>s.value=x},{default:()=>{var x;return[(x=_.default)==null?void 0:x.call(_)]}}),e.createVNode(co,{visible:a.value,content:l.content,zIndex:l.zIndex,variant:l.variant,placement:l.placement,arrow:l.arrow,offset:l.offset,borderRadius:ar,root:l.root,target:C((V=f.value)==null?void 0:V.el)?f.value.el:null,onContentMouseenter:g,onContentMouseleave:h,ref:x=>c.value=x},{content:_.content})])}}}),sr=e.defineComponent({props:{size:{},color:{}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("svg",{class:"px-icon-pa",style:e.normalizeStyle({color:o.color,fontSize:o.size+"px"}),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M11 22h10V8h-2V6h-2v2h-2V6h2V4h-2V2H3v12h2V4h8v6h6v10h-8zm-4-2H5v2H3v-2h2v-2H3v-2h2v2h2v-2h2v2H7zm0 0h2v2H7z"},null,-1)])],4))}}),cr={class:"pixelium px-empty"},ir={class:"px-empty-icon-wrapper"},ur={class:"px-empty-description"},Pt=e.defineComponent({name:"Empty",__name:"index",props:{description:{default:"No Data"}},setup(n){const o=n;return(l,t)=>(e.openBlock(),e.createElementBlock("div",cr,[e.createElementVNode("div",ir,[e.renderSlot(l.$slots,"image",{},()=>[e.createVNode(e.unref(sr),{class:"px-empty-icon"})])]),e.createElementVNode("div",ur,[e.renderSlot(l.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(o.description),1)])])]))}}),dr=(n,o,l,t,r,a,c,s,i,f,d)=>{n.fillStyle=F(c);for(let u=0;u<4;u++)r[u]<=s||(!(u===1||u===2)||i&&d||!i)&&xe(n,t[u][0],t[u][1],r[u],a[u][0],a[u][1],s);t[1][0]+s>t[0][0]&&n.fillRect(t[0][0],0,t[1][0]-t[0][0]+s,s),t[2][1]+s>t[1][1]&&(i&&d||!i)&&n.fillRect(o-s,t[1][1],s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s&&n.fillRect(t[3][0],l-s,t[2][0]-t[3][0]+s,s),t[3][1]+s>t[0][1]&&!(i&&!f)&&n.fillRect(0,t[0][1],s,t[3][1]-t[0][1]+s),i&&!f&&n.fillRect(s/2,0,s/2,l),i&&!d&&n.fillRect(o-2*s-1,0,s,l)},fr={class:"px-option-list"},pr=["onClick"],mr=["onClick"],hr={key:2,class:"px-option-list-item-group"},gr={class:"px-option-list-item-group-label"},yr=["onClick"],vr=["onClick"],go=e.defineComponent({name:"OptionList",__name:"index",props:{options:{default:()=>[]},activeValues:{default:()=>[]}},emits:["select"],setup(n,{emit:o}){const l=n,t=o,r=(i,f)=>{t("select",i,i,f)},a=(i,f)=>{i.disabled||t("select",i.value,i,f)},c=i=>he(i)?i:"type"in i&&i.type===ze?i.key:i.label,s=i=>l.activeValues.length?he(i)?l.activeValues.includes(i):l.activeValues.includes(i.value):!1;return(i,f)=>(e.openBlock(),e.createElementBlock("ul",fr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,d=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c(d)},[e.unref(he)(d)?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass(["px-option-list-item",{"px-option-list-item__active":s(d)}]),onClick:u=>r(d,u)},[e.renderSlot(i.$slots,"option",{option:d},()=>[e.createTextVNode(e.toDisplayString(d),1)])],10,pr)):e.unref(ft)(d)&&!("type"in d&&d.type===e.unref(ze))?(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["px-option-list-item",{"px-option-list-item__disabled":d.disabled,"px-option-list-item__active":s(d)}]),onClick:u=>a(d,u)},[e.renderSlot(i.$slots,"option",{option:d},()=>[e.createTextVNode(e.toDisplayString(d.label),1)])],10,mr)):(e.openBlock(),e.createElementBlock("li",hr,[e.createElementVNode("div",gr,[e.renderSlot(i.$slots,"group-label",{option:d},()=>[e.createTextVNode(e.toDisplayString(d.label),1)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.children,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c(u)},[e.unref(he)(u)?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass(["px-option-list-item",{"px-option-list-item__active":s(u)}]),onClick:p=>r(u,p)},[e.renderSlot(i.$slots,"option",{option:u},()=>[e.createTextVNode(e.toDisplayString(u),1)])],10,yr)):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["px-option-list-item",{"px-option-list-item__disabled":u.disabled,"px-option-list-item__active":s(u)}]),onClick:p=>a(u,p)},[e.renderSlot(i.$slots,"option",{option:u},()=>[e.createTextVNode(e.toDisplayString(u.label),1)])],10,vr))],64))),128))]))],64))),128))]))}}),yo=e.defineComponent({name:"AutoComplete",__name:"index",props:{modelValue:null,defaultValue:null,options:{default:()=>[]},placeholder:null,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},showPopoverEmpty:{type:Boolean,default:!1},shouldShowPopover:{type:Function},filter:{type:Function},append:{type:Boolean,default:!1},size:{default:"medium"},shape:{default:"default"},borderRadius:null,status:{default:"normal"},autofocus:{type:Boolean}},emits:["input","update:modelValue","change","clear","blur","focus","select"],setup(n,{expose:o,emit:l}){var me;const t=e.useAttrs(),r=_e(),a=n,c=l,[s,i,f]=at({afterComposition:G=>{e.nextTick(()=>{$(G)})}}),d=e.getCurrentInstance(),u=e.ref(((me=d==null?void 0:d.parent)==null?void 0:me.type)===We),[p,m,g]=u.value?Ge(Ye):[e.ref(0),e.ref(!1),e.ref(!1)],h=e.inject(Ke),y=e.computed(()=>u.value&&h?h.borderRadius:a.borderRadius),k=e.computed(()=>u.value&&h?h.size:a.size),b=e.computed(()=>u.value&&h?h.shape:a.shape),v=e.computed(()=>u.value&&h&&h.disabled||a.disabled),[_,C]=Qe("modelValue",a,c,{defaultField:"defaultValue",transform:G=>G||""}),V=e.shallowRef(null),x=e.shallowRef(null),H=e.shallowRef(null),E=async()=>{if(await e.nextTick(),a.shouldShowPopover){Z.value=!!a.shouldShowPopover(_.value||"",oe.value);return}_.value&&(!a.showPopoverEmpty&&oe.value.length||a.showPopoverEmpty)?Z.value=!0:Z.value=!1},L=async()=>{Z.value=!1},$=async G=>{G.stopPropagation();const W=G.target.value;_.value=W,!s.value&&(c("input",W,G),await C(W),E())},A=async()=>{await C(""),c("change",""),c("clear","")},T=G=>{G.stopPropagation();const R=G.target;c("change",R.value,G)},I=e.ref(!1),U=()=>{I.value=!1},K=()=>{I.value=!0},N=()=>{var G;(G=H.value)==null||G.focus()},j=e.ref(!1),D=()=>{j.value=!0},ie=()=>{j.value=!1},ne=e.computed(()=>a.clearable&&!v.value&&!a.readonly),se=async(G,R,W)=>{const Y=a.append?_.value+G:G;await C(Y),L(),c("select",Y,R,W)},S=e.useSlots(),oe=e.computed(()=>a.filter?a.filter(_.value||"",a.options||[]):!_.value||!_.value.trim()?[]:At(_.value,a.options||[]));o({focus:()=>{var G;(G=H.value)==null||G.focus()},blur:()=>{var G;(G=H.value)==null||G.blur()},clear:()=>A(),select:()=>{var G;(G=H.value)==null||G.select()}});const Z=e.ref(!1),X=G=>{G||(Z.value=G)},re=we();e.watch([m,g,y,b,k,v,()=>S,re,I,j],()=>{setTimeout(()=>{le()})});const le=()=>{const G=Re(V,x);if(!G)return;const{ctx:R,width:W,height:Y,canvas:z}=G,ee=_e(),pe=qe(z,ee,y.value,b.value,k.value||"medium",u.value,m.value,g.value),je=a.status!=="normal"?w(a.status==="error"?"danger":a.status,6):(j.value||I.value)&&!v.value&&!a.readonly?w("primary",6):w("neutral",10),$e=Fe(pe,W,Y,ee);dr(R,W,Y,$e,pe,Ae,je,ee,u.value,m.value,g.value);const B=v.value?w("neutral",6):w("neutral",1);Oe(R,Math.round(W/2),Math.round(Y/2),B)};return e.onMounted(()=>{e.nextTick(()=>{le()})}),Ve(V,le),Me(le),()=>{const G=e.createVNode(e.Fragment,null,[S.prefix&&e.createVNode("div",{class:"px-auto-complete-prefix-wrapper"},[S.prefix()]),e.createVNode("input",{ref:H,class:"px-auto-complete-inner",value:_.value,placeholder:a.placeholder,disabled:v.value||a.readonly,autofocus:a.autofocus,onInput:$,onChange:T,onBlur:U,onFocus:K,onCompositionstart:i,onCompositionend:f},null),ne.value&&e.createVNode("div",{class:"px-auto-complete-close-wrapper"},[j.value&&_.value?e.createVNode(tt,{class:"px-auto-complete-icon",onClick:A},null):e.createVNode("div",{class:"px-auto-complete-icon-placeholder"},null)]),a.loading&&e.createVNode("div",{class:"px-auto-complete-loading-wrapper"},[e.createVNode(be,{class:"px-auto-complete-icon px-animation__loading"},null)]),S.suffix&&e.createVNode("div",{class:"px-auto-complete-suffix-wrapper"},[S.suffix()]),e.createVNode("canvas",{ref:x,class:"px-auto-complete-canvas"},null)]),R={},W=d==null?void 0:d.vnode.scopeId,Y=d==null?void 0:d.vnode.scopeId;return W&&(R[W]=""),Y&&(R[Y]=""),e.createVNode(ut,{placement:"bottom",offset:0,"width-equal":!0,arrow:!1,visible:Z.value,"onUpdate:visible":X,trigger:"click",contentStyle:{padding:`${r}px`}},{default:()=>e.h("div",{ref:V,class:["pixelium px-auto-complete",k.value&&`px-auto-complete__${k.value}`,b.value&&`px-auto-complete__${b.value}`,{"px-auto-complete__inner":u.value},{"px-auto-complete__disabled":v.value}],onClick:N,onMouseenter:D,onMouseleave:ie,...R,...t},[G]),content:()=>oe.value.length?e.createVNode(go,{options:oe.value,onSelect:se},{"group-label":({option:ee})=>S["group-label"]?S["group-label"]({option:ee}):ee.label,option:({option:ee})=>S.option?S.option({option:ee}):he(ee)?ee:ee.label}):e.createVNode("div",{class:"px-auto-complete-empty"},[e.createVNode(Pt,null,null)])})}}}),rn=e.defineComponent({name:"Mask",__name:"index",props:{color:null,step:{default:1},lineWidth:{default:2},grid:{type:Boolean,default:!0},zIndex:{default:un}},setup(n){const o=we(),l=n,t=e.shallowRef(null),r=e.shallowRef(null),a=()=>{const i=w("neutral",8);return i.a=Math.floor(255*.5),F(i)},c=e.ref(a()),s=()=>{if(!l.grid)return;const i=Re(r,t);if(!i)return;const{ctx:f,width:d,height:u}=i,p=l.lineWidth;f.clearRect(0,0,d,u),f.strokeStyle=l.color||c.value,f.lineWidth=p;const m=Math.max(1,l.step);for(let g=0;g<=d;g+=m+p)f.beginPath(),f.moveTo(g,0),f.lineTo(g,u),f.stroke();for(let g=0;g<=u;g+=m+p)f.beginPath(),f.moveTo(0,g),f.lineTo(d,g),f.stroke()};return e.onMounted(()=>{e.nextTick(()=>{s()})}),Ve(r,s),Me(()=>{s(),c.value=a()}),e.watch([o,c,()=>l.grid,()=>l.color,()=>l.step,()=>l.lineWidth],()=>{c.value=a(),s()}),(i,f)=>(e.openBlock(),e.createElementBlock("div",{class:"pixelium px-mask",style:e.normalizeStyle({zIndex:l.zIndex,backgroundColor:l.grid?void 0:l.color||c.value}),ref_key:"wrapperRef",ref:r},[l.grid?(e.openBlock(),e.createElementBlock("canvas",{key:0,ref_key:"canvasRef",ref:t,class:"px-mask-canvas"},null,512)):e.createCommentVNode("",!0)],4))}}),wr={class:"px-spin-content"},vo=e.defineComponent({name:"Spin",__name:"index",props:{loading:{type:Boolean,default:void 0},size:{default:"medium"},maskColor:null,maskStep:{default:1},maskLineWidth:{default:2},maskGrid:{type:Boolean,default:!0},zIndex:{default:un}},setup(n){const o=n,l=e.useSlots(),t=e.computed(()=>te(o.size)?`${o.size}px`:void 0),r=e.computed(()=>l.default?!!o.loading:o.loading!==!1);return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pixelium px-spin",{[`px-spin__${o.size}`]:e.unref(he)(o.size)}]),style:e.normalizeStyle({minWidth:t.value,minHeight:t.value})},[e.renderSlot(a.$slots,"default"),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"px-spin-cover",style:e.normalizeStyle({zIndex:o.zIndex})},[e.unref(l).default?(e.openBlock(),e.createBlock(rn,{key:0,"z-index":0,color:o.maskColor,step:o.maskStep,"line-width":o.maskLineWidth,grid:o.maskGrid},null,8,["color","step","line-width","grid"])):e.createCommentVNode("",!0),e.createElementVNode("div",wr,[e.createElementVNode("div",{class:e.normalizeClass(["px-spin-icon-wrapper",{"px-spin-icon-wrapper__last":!e.unref(l).description,[`px-spin-icon-wrapper__${o.size}`]:e.unref(he)(o.size)}]),style:e.normalizeStyle({fontSize:t.value})},[e.renderSlot(a.$slots,"icon",{},()=>[e.createVNode(e.unref(be),{class:"px-spin-icon px-animation__loading",style:e.normalizeStyle({width:t.value,height:t.value})},null,8,["style"])])],6),e.renderSlot(a.$slots,"description")])],4)):e.createCommentVNode("",!0)],6))}}),br=(n,o,l,t,r,a,c,s,i,f,d)=>{n.fillStyle=F(c);for(let u=0;u<4;u++)r[u]<=s||(!(u===1||u===2)||i&&d||!i)&&xe(n,t[u][0],t[u][1],r[u],a[u][0],a[u][1],s);t[1][0]+s>t[0][0]&&n.fillRect(t[0][0],0,t[1][0]-t[0][0]+s,s),t[2][1]+s>t[1][1]&&(i&&d||!i)&&n.fillRect(o-s,t[1][1],s,t[2][1]-t[1][1]+s),t[3][0]<t[2][0]+s&&n.fillRect(t[3][0],l-s,t[2][0]-t[3][0]+s,s),t[3][1]+s>t[0][1]&&!(i&&!f)&&n.fillRect(0,t[0][1],s,t[3][1]-t[0][1]+s),i&&!f&&n.fillRect(s/2,0,s/2,l),i&&!d&&n.fillRect(o-2*s-1,0,s,l)},wo=250,bo=e.defineComponent({name:"Select",__name:"index",props:{modelValue:null,defaultValue:null,options:{default:()=>[]},placeholder:null,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},inputValue:null,defaultInputValue:null,filterable:{type:Boolean,default:!1},shouldShowPopover:{type:Function},filter:{type:Function},creatable:{type:Boolean},collapseTags:{type:Boolean,default:!1},maxDisplayTags:null,collapseTagsPopover:{type:Boolean,default:!0},tagTheme:{default:"info"},tagVariant:{default:"plain"},tagColor:null,size:{default:"medium"},shape:{default:"default"},borderRadius:null,status:{default:"normal"}},emits:["input","update:modelValue","update:inputValue","change","inputChange","clear","blur","focus","select","tagClose"],setup(n,{expose:o,emit:l}){var dt;const t=e.useAttrs(),r=_e(),a=n,c=l,[s,i,f]=at({afterComposition:M=>{e.nextTick(()=>{j(M)})}}),d=e.getCurrentInstance(),u=e.ref(((dt=d==null?void 0:d.parent)==null?void 0:dt.type)===We),[p,m,g]=u.value?Ge(Ye):[e.ref(0),e.ref(!1),e.ref(!1)],h=e.inject(Ke),y=e.computed(()=>u.value&&h?h.borderRadius:a.borderRadius),k=e.computed(()=>u.value&&h?h.size:a.size),b=e.computed(()=>u.value&&h?h.shape:a.shape),v=e.computed(()=>u.value&&h&&h.disabled||a.disabled),_=M=>Bo(M)||Ro(M)||a.multiple&&De(M)&&M.length===0,[C,V]=Qe("modelValue",a,c,{defaultField:"defaultValue",transform:M=>a.multiple?ue(M)?void 0:De(M)?[...M]:[M]:M}),[x,H]=Qe("inputValue",a,c,{defaultField:"defaultInputValue",transform:M=>M||""}),E=e.computed(()=>{if(!a.multiple)return[];if(!a.options.length)return[];if(_(C.value))return[];const M=new Map;return a.options.forEach(P=>{if(he(P))M.set(P,P);else{if("type"in P&&P.type===ze)return P.children.some(q=>{he(q)?M.set(q,q):M.set(q.value,q.label)});M.set(P.value,P.label)}}),C.value.map(P=>M.has(P)?M.get(P):String(P))}),L=e.computed(()=>{if(a.multiple||!a.options.length||_(C.value))return"";let M=String(C.value);return a.options.some(P=>he(P)?C.value===P:"type"in P&&P.type===ze?P.children.some(q=>he(q)?C.value===q:q.value===C.value?(M=q.label,!0):!1):P.value===C.value?(M=P.label,!0):!1),M}),$=e.shallowRef(null),A=e.shallowRef(null),T=e.shallowRef(null),I=e.shallowRef(null),U=e.shallowRef(null);e.watch(()=>a.multiple,(M,P)=>{V(M&&!P?[C.value]:C.value[0]||null)});const K=async()=>{if(await e.nextTick(),a.shouldShowPopover){Y.value=!!a.shouldShowPopover(x.value||"",W.value);return}Y.value=!0},N=async()=>{Y.value=!1},j=async M=>{M.stopPropagation();const q=M.target.value;x.value=q,!s.value&&(c("input",q,M),H(q),await c("update:inputValue",q),K())},D=async()=>{await new Promise(P=>{setTimeout(()=>{P()})});const M=a.multiple?[]:null;await H(""),await V(M),c("change",M),c("clear",M),c("inputChange","")},ie=M=>{M.stopPropagation();const P=M.target;c("inputChange",P.value,M)},ne=e.ref(!1),se=()=>{ne.value=!0,e.nextTick(()=>{if(T.value&&a.filterable){if(T.value.focus(),a.multiple)return;const M=_(C.value)?x.value||"":L.value;H(M)}}),K(),c("focus")},S=M=>{var q;const P=M.target;(P instanceof HTMLElement||P instanceof SVGElement)&&(q=U.value)!=null&&q.$el.contains(P)||se()},oe=async()=>{var M;ne.value=!1,Y.value=!1,(M=T.value)==null||M.blur(),setTimeout(async()=>{await H(""),c("inputChange","")},wo),c("blur")};fo([$,()=>{var M,P;return(P=(M=I.value)==null?void 0:M.triggerContent)==null?void 0:P.content}],oe);const Z=e.ref(!1),X=()=>{Z.value=!0},re=()=>{Z.value=!1},le=e.computed(()=>a.clearable&&!v.value&&!a.readonly),me=M=>{if(a.multiple)if(De(C.value)){const P=[...C.value],q=P.findIndex(ye=>ye===M);return q===-1?P.push(M):P.splice(q,1),P}else return[M];else return M},G=async(M,P,q)=>{await new Promise(ae=>{setTimeout(()=>{ae()})});const ye=me(M),ke="";await V(ye),a.multiple||(ne.value=!1,N(),c("select",ye,P,q),setTimeout(async()=>{await H(ke)},wo))},R=e.useSlots(),W=e.computed(()=>{const M=a.options||[];if(!a.filterable)return M;let P=[];return a.filter?P=a.filter(x.value||"",M):P=At(x.value||"",M),a.multiple&&(_(C.value)||C.value.forEach(q=>{const ye=xt(q,P),ke=xt(q,M);if(!ye.length)if(!ke.length)P.push(q);else if(ke.length===1)P.push(ke[0]);else{const ae=ke[1],Ne=P.findIndex(Ce=>ft(Ce)&&"type"in Ce&&Ce.type===ze&&Ce.key===ae.key);Ne?P[Ne].children.push(ke[0]):P.push({...ae,children:[ke[0]]})}})),a.creatable&&x.value&&(xt(x.value,P,!0).length||P.push(x.value)),P});o({focus:se,blur:oe,clear:()=>D()});const Y=e.ref(!1),z=M=>{M||(Y.value=M)},ee=e.computed(()=>_(C.value)&&(!a.multiple&&!L.value||a.multiple)),pe=e.computed(()=>k.value==="small"?"small":"medium"),je=e.computed(()=>!v.value&&!a.readonly),$e=async(M,P)=>{const q=[...C.value],ye=q.findIndex(ke=>ke===M);ye!==-1&&(q.splice(ye,1),await V(q),c("tagClose",M,P),c("change",q))},Xe=e.computed(()=>!!a.collapseTags&&te(a.maxDisplayTags)&&a.maxDisplayTags>=0),B=e.computed(()=>a.multiple?a.options.length?ue(C.value)?[]:Xe.value?C.value.slice(0,a.maxDisplayTags):C.value:[]:[]),Q=e.computed(()=>a.multiple?a.options.length?ue(C.value)?[]:Xe.value?C.value.slice(a.maxDisplayTags):[]:[]:[]),de=we();e.watch([m,g,y,b,k,v,()=>R,de,ne,Z],()=>{setTimeout(()=>{ge()})});const ge=()=>{const M=Re($,A);if(!M)return;const{ctx:P,width:q,height:ye,canvas:ke}=M,ae=_e(),Ne=qe(ke,ae,y.value,b.value,k.value||"medium",u.value,m.value,g.value),Ce=a.status!=="normal"?w(a.status==="error"?"danger":a.status,6):(Z.value||ne.value)&&!v.value&&!a.readonly?w("primary",6):w("neutral",10),xr=Fe(Ne,q,ye,ae);br(P,q,ye,xr,Ne,Ae,Ce,ae,u.value,m.value,g.value);const Vr=v.value?w("neutral",6):w("neutral",1);Oe(P,Math.round(q/2),Math.round(ye/2),Vr)};e.onMounted(()=>{e.nextTick(()=>{ge()})}),Ve($,ge),Me(ge);const It=M=>{M.stopPropagation()};return()=>{const M=e.createVNode(e.Fragment,null,[R.prefix&&e.createVNode("div",{class:"px-select-prefix-wrapper"},[R.prefix()]),e.createVNode("div",{class:"px-select-content"},[a.multiple&&B.value.map((ae,Ne)=>e.createVNode(Pe,{key:ae,size:pe.value,variant:a.tagVariant,theme:a.tagTheme,closable:je.value,disabled:v.value,color:a.tagColor,onClose:Ce=>$e(ae,Ce)},{default:()=>R.tag?R.tag({value:ae,label:E.value[Ne],index:Ne}):E.value[Ne]})),a.multiple&&!!Q.value.length&&Xe.value&&e.createVNode(e.Fragment,null,[a.collapseTagsPopover?e.createVNode(ut,null,{default:()=>e.createVNode(Pe,{size:pe.value,variant:a.tagVariant,theme:a.tagTheme,disabled:v.value,color:a.tagColor},{default:()=>R.tag?R.tag({value:null,label:`+${Q.value.length}`,index:-1}):`+${Q.value.length}`}),content:()=>e.createVNode("div",{class:"px-input-tag-content"},[Q.value.map((ae,Ne)=>e.createVNode(Pe,{key:ae,size:pe.value,variant:a.tagVariant,theme:a.tagTheme,disabled:v.value,color:a.tagColor,closable:je.value,onClose:Ce=>$e(ae,Ce)},{default:()=>{const Ce=Ne+Math.floor(a.maxDisplayTags);return R.tag?R.tag({value:ae,label:E.value[Ce],index:Ce}):E.value[Ce]}}))])}):e.createVNode(Pe,{size:pe.value,variant:a.tagVariant,theme:a.tagTheme,disabled:v.value,color:a.tagColor},{default:()=>R.tag?R.tag({value:null,label:`+${Q.value.length}`,index:-1}):`+${Q.value.length}`})]),e.withDirectives(e.createVNode("input",{ref:T,class:"px-select-inner",value:x.value,disabled:v.value||a.readonly,onInput:j,onChange:ie,onFocus:It,onBlur:It,onCompositionstart:i,onCompositionend:f,placeholder:ee.value?a.placeholder:""},null),[[e.vShow,a.filterable&&ne.value]]),e.withDirectives(e.createVNode("div",{class:{"px-select-placeholder":!0}},[a.placeholder]),[[e.vShow,ee.value&&(!a.filterable||!ne.value)]]),!a.multiple&&e.withDirectives(e.createVNode("div",{class:{"px-select-label":!0,"px-select-label__disabled":v.value}},[L.value]),[[e.vShow,!ee.value&&(!a.filterable||!ne.value)]])]),le.value&&e.createVNode("div",{class:"px-select-close-wrapper"},[Z.value&&!_(C.value)?e.createVNode(tt,{class:"px-select-icon",onClick:D,ref:ae=>{U.value=ae}},null):e.createVNode("div",{class:"px-select-icon-placeholder"},null)]),a.loading&&e.createVNode("div",{class:"px-select-loading-wrapper"},[e.createVNode(be,{class:"px-select-icon px-animation__loading"},null)]),R.suffix&&e.createVNode("div",{class:"px-select-suffix-wrapper"},[R.suffix()]),e.createVNode("canvas",{ref:A,class:"px-select-canvas"},null)]),P={},q=d==null?void 0:d.vnode.scopeId,ye=d==null?void 0:d.vnode.scopeId;return q&&(P[q]=""),ye&&(P[ye]=""),e.createVNode(ut,{placement:"bottom",offset:0,"width-equal":!0,arrow:!1,visible:Y.value,"onUpdate:visible":z,trigger:"click",contentStyle:{padding:`${r}px`},ref:I},{default:()=>e.h("div",{ref:$,class:["pixelium px-select",k.value&&`px-select__${k.value}`,b.value&&`px-select__${b.value}`,{"px-select__inner":u.value},{"px-select__disabled":v.value}],onClick:S,onMouseenter:X,onMouseleave:re,...P,...t},[M]),content:()=>W.value.length?e.createVNode(go,{options:W.value,onSelect:G,activeValues:a.multiple?C.value:[C.value]},{"group-label":({option:ae})=>R["group-label"]?R["group-label"]({option:ae}):ae.label,option:({option:ae})=>R.option?R.option({option:ae}):he(ae)?ae:ae.label}):e.createVNode("div",{class:"px-select-empty"},[e.createVNode(Pt,null,null)])})}}}),kr=[bn,jt,kn,xn,Kt,Vn,Bn,Rn,Qt,Mn,Jt,Hn,En,Tn,$n,Ln,Dn,Fn,Gn,We,Wn,Pe,mo,ho,ut,Pt,yo,rn,vo,bo],_r="Px",ko=(n,o={prefix:_r})=>{kr.forEach(l=>{l.name&&n.component(o.prefix+l.name,l)}),o.attachToApp!==!1&&(n.config.globalProperties.PixeliumVue={message:yt,useThemeMode:In}),o.attachToWindow!==!1&&J()&&(window.$message=yt)},Cr={install:ko};O.Aside=En,O.AutoComplete=yo,O.Button=bn,O.ButtonGroup=jt,O.Col=Vn,O.Container=Jt,O.Divider=Bn,O.Empty=Pt,O.Footer=$n,O.Grid=Qt,O.GridItem=Mn,O.Header=Tn,O.Icon=Ln,O.Input=Dn,O.InputGroup=We,O.InputGroupLabel=Wn,O.InputNumber=Fn,O.InputTag=mo,O.Link=kn,O.Main=Hn,O.Mask=rn,O.Message=yt,O.MessageBox=xn,O.Popover=ut,O.Row=Kt,O.Select=bo,O.Space=Rn,O.Spin=vo,O.Tag=Pe,O.Textarea=Gn,O.Tooltip=ho,O.default=Cr,O.install=ko,O.setThemeColor=dl,O.useThemeMode=In,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/es/aside/css.js CHANGED
@@ -1,2 +1,2 @@
1
- import './index.css'
2
1
  import '../index.css'
2
+ import './index.css'
package/es/aside/index.js CHANGED
@@ -2,30 +2,60 @@ import './css.js'
2
2
  import { defineComponent, getCurrentInstance, ref, inject, onMounted, onBeforeUnmount, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, renderSlot } from "vue";
3
3
  import { _ as _sfc_main$1 } from "../container/index.js";
4
4
  import { u as useDarkMode } from "../share/hook/use-dark-mode.js";
5
- const Y = new RegExp("[-_\\s]|(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|(\\d+)");
6
- function A(n) {
7
- return n.split(Y).filter(Boolean);
8
- }
9
- function On(n) {
10
- const e = A(n);
11
- let t = "";
12
- const s = e.length;
13
- for (let o = 0; o < s; o++)
14
- t += e[o].toLowerCase() + (o < s - 1 ? "-" : "");
15
- return t;
5
+ const Q = /\.|\[(\d+)\]/;
6
+ function M(n) {
7
+ return n.split(Q).filter(Boolean);
8
+ }
9
+ function U(n) {
10
+ return n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
11
+ }
12
+ function d(n) {
13
+ return n !== null && (typeof n == "object" || typeof n == "function");
14
+ }
15
+ function f(n, e, t) {
16
+ const s = M(e), o = s.length;
17
+ let c = n;
18
+ for (let i = 0; i < o; i++)
19
+ if (d(c))
20
+ c = c[s[i]];
21
+ else
22
+ return t;
23
+ return t ?? c;
16
24
  }
17
25
  function m(n) {
18
26
  return typeof n == "function";
19
27
  }
28
+ function Cn(n, e, t = {}) {
29
+ const { start: s = "{", end: o = "}" } = t, c = new RegExp(
30
+ `${U(s)}(.*?)${U(o)}`,
31
+ "g"
32
+ );
33
+ return n.replace(c, (i, r) => {
34
+ const l = m(e) ? e(r) : f(e, r);
35
+ return l ?? i;
36
+ });
37
+ }
20
38
  function p(n) {
21
39
  return typeof n == "string" || n instanceof String;
22
40
  }
41
+ function Pn(n) {
42
+ return n === null;
43
+ }
23
44
  function k(n) {
24
45
  return typeof n == "number" || n instanceof Number;
25
46
  }
47
+ function en(n) {
48
+ return n === void 0;
49
+ }
26
50
  function $(n) {
27
51
  return Array.isArray(n);
28
52
  }
53
+ function R(n) {
54
+ return k(n) && (typeof n == "number" ? n === 1 / 0 || n === -1 / 0 : n.valueOf() === 1 / 0 || n.valueOf() === -1 / 0);
55
+ }
56
+ function z(n) {
57
+ return k(n) && (typeof n == "number" ? Number.isNaN(n) : Number.isNaN(n.valueOf()));
58
+ }
29
59
  function N(n) {
30
60
  return n == null;
31
61
  }
@@ -41,6 +71,17 @@ function Gn(...n) {
41
71
  return e;
42
72
  }, {});
43
73
  }
74
+ function Ne(n, e, t) {
75
+ let s, o;
76
+ const { immediate: c = false, maxWait: i } = t || {};
77
+ return function(...l) {
78
+ i !== void 0 && !o && (o = setTimeout(() => {
79
+ o = void 0, n.apply(this, l);
80
+ }, i)), !s && c && n.apply(this, l), s && clearTimeout(s), s = setTimeout(() => {
81
+ o && (clearTimeout(o), o = void 0), n.apply(this, l);
82
+ }, e);
83
+ };
84
+ }
44
85
  // @ts-ignore
45
86
  typeof process < "u" && process.env.NODE_ENV !== "production";
46
87
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -96,11 +137,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
137
  });
97
138
  export {
98
139
  $,
140
+ Cn as C,
99
141
  Gn as G,
100
142
  N,
101
- On as O,
143
+ Pn as P,
144
+ R,
102
145
  _sfc_main as _,
146
+ Ne as a,
147
+ d,
148
+ en as e,
103
149
  k,
104
150
  m,
105
- p
151
+ p,
152
+ z
106
153
  };
@@ -0,0 +1,2 @@
1
+ import '../index.css'
2
+ import './index.css'
@@ -0,0 +1,2 @@
1
+ import type { RgbaColor } from '../share/type';
2
+ export declare const drawBorder: (ctx: CanvasRenderingContext2D, width: number, height: number, center: [number, number][], borderRadius: number[], rad: [number, number][], borderColor: RgbaColor, pixelSize: number, inner: boolean, first: boolean, last: boolean) => void;