cck-ui 0.0.1 → 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 (51) hide show
  1. package/dist/index.full.js +39 -1448
  2. package/dist/index.full.min.js +3 -15
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +3 -15
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +7 -1414
  7. package/es/packages/components/button/src/button-custom.mjs +2 -2
  8. package/es/packages/components/button/src/button-custom.mjs.map +1 -1
  9. package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs +15 -15
  10. package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  11. package/es/packages/components/button/src/use-button.mjs +3 -3
  12. package/es/packages/components/button/src/use-button.mjs.map +1 -1
  13. package/es/packages/components/form/src/hooks/use-form-common-props.mjs +4 -4
  14. package/es/packages/components/form/src/hooks/use-form-common-props.mjs.map +1 -1
  15. package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs +6 -6
  16. package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  17. package/es/packages/hooks/use-namespace/index.mjs +4 -4
  18. package/es/packages/hooks/use-namespace/index.mjs.map +1 -1
  19. package/es/packages/hooks/use-prop/index.mjs +3 -3
  20. package/es/packages/hooks/use-prop/index.mjs.map +1 -1
  21. package/es/packages/hooks/use-theme/index.mjs +3 -3
  22. package/es/packages/hooks/use-theme/index.mjs.map +1 -1
  23. package/lib/_virtual/_rolldown/runtime.js +0 -33
  24. package/lib/packages/components/button/src/button-custom.js +4 -4
  25. package/lib/packages/components/button/src/button-custom.js.map +1 -1
  26. package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js +19 -19
  27. package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js.map +1 -1
  28. package/lib/packages/components/button/src/use-button.js +3 -3
  29. package/lib/packages/components/button/src/use-button.js.map +1 -1
  30. package/lib/packages/components/form/src/hooks/use-form-common-props.js +6 -6
  31. package/lib/packages/components/form/src/hooks/use-form-common-props.js.map +1 -1
  32. package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js +8 -8
  33. package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  34. package/lib/packages/hooks/use-namespace/index.js +4 -4
  35. package/lib/packages/hooks/use-namespace/index.js.map +1 -1
  36. package/lib/packages/hooks/use-prop/index.js +3 -3
  37. package/lib/packages/hooks/use-prop/index.js.map +1 -1
  38. package/lib/packages/hooks/use-theme/index.js +3 -3
  39. package/lib/packages/hooks/use-theme/index.js.map +1 -1
  40. package/package.json +14 -6
  41. package/es/_virtual/_rolldown/runtime.mjs +0 -27
  42. package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs +0 -22
  43. package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs.map +0 -1
  44. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js +0 -66
  45. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js.map +0 -1
  46. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js +0 -56
  47. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js.map +0 -1
  48. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js +0 -18
  49. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js.map +0 -1
  50. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js +0 -14
  51. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js.map +0 -1
@@ -1,21 +1,9 @@
1
- /*! CCK UI v0.0.1 */
2
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.CckUi={}))})(this,function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let t=Symbol(`INSTALLED_KEY`),n=e=>({install:n=>{n[t]||(n[t]=!0,e.forEach(e=>n.use(e)))}});function r(e,t){a(e)&&(e=`100%`);let n=o(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(e=t===360?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t)),e)}function i(e){return Math.min(1,Math.max(0,e))}function a(e){return typeof e==`string`&&e.indexOf(`.`)!==-1&&parseFloat(e)===1}function o(e){return typeof e==`string`&&e.indexOf(`%`)!==-1}function s(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function c(e){return Number(e)<=1?`${Number(e)*100}%`:e}function l(e){return e.length===1?`0`+e:String(e)}function u(e,t,n){return{r:r(e,255)*255,g:r(t,255)*255,b:r(n,255)*255}}function d(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);let i=Math.max(e,t,n),a=Math.min(e,t,n),o=0,s=0,c=(i+a)/2;if(i===a)s=0,o=0;else{let r=i-a;switch(s=c>.5?r/(2-i-a):r/(i+a),i){case e:o=(t-n)/r+(t<n?6:0);break;case t:o=(n-e)/r+2;break;case n:o=(e-t)/r+4;break;default:break}o/=6}return{h:o,s,l:c}}function f(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ee(e,t,n){let i,a,o;if(e=r(e,360),t=r(t,100),n=r(n,100),t===0)a=n,o=n,i=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=f(s,r,e+1/3),a=f(s,r,e),o=f(s,r,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function te(e,t,n){e=r(e,255),t=r(t,255),n=r(n,255);let i=Math.max(e,t,n),a=Math.min(e,t,n),o=0,s=i,c=i-a,l=i===0?0:c/i;if(i===a)o=0;else{switch(i){case e:o=(t-n)/c+(t<n?6:0);break;case t:o=(n-e)/c+2;break;case n:o=(e-t)/c+4;break;default:break}o/=6}return{h:o,s:l,v:s}}function ne(e,t,n){e=r(e,360)*6,t=r(t,100),n=r(n,100);let i=Math.floor(e),a=e-i,o=n*(1-t),s=n*(1-a*t),c=n*(1-(1-a)*t),l=i%6,u=[n,s,o,o,c,n][l],d=[c,n,n,s,o,o][l],f=[o,o,c,n,n,s][l];return{r:u*255,g:d*255,b:f*255}}function re(e,t,n,r){let i=[l(Math.round(e).toString(16)),l(Math.round(t).toString(16)),l(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(``)}function ie(e,t,n,r,i){let a=[l(Math.round(e).toString(16)),l(Math.round(t).toString(16)),l(Math.round(n).toString(16)),l(se(r))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join(``)}function ae(e,t,n,r){let i=e/100,a=t/100,o=n/100,s=r/100;return{r:255*(1-i)*(1-s),g:255*(1-a)*(1-s),b:255*(1-o)*(1-s)}}function oe(e,t,n){let r=1-e/255,i=1-t/255,a=1-n/255,o=Math.min(r,i,a);return o===1?(r=0,i=0,a=0):(r=(r-o)/(1-o)*100,i=(i-o)/(1-o)*100,a=(a-o)/(1-o)*100),o*=100,{c:Math.round(r),m:Math.round(i),y:Math.round(a),k:Math.round(o)}}function se(e){return Math.round(parseFloat(e)*255).toString(16)}function ce(e){return p(e)/255}function p(e){return parseInt(e,16)}function le(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}let ue={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,goldenrod:`#daa520`,gold:`#ffd700`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavenderblush:`#fff0f5`,lavender:`#e6e6fa`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`};function de(e){let t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,l=!1;return typeof e==`string`&&(e=fe(e)),typeof e==`object`&&(h(e.r)&&h(e.g)&&h(e.b)?(t=u(e.r,e.g,e.b),o=!0,l=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):h(e.h)&&h(e.s)&&h(e.v)?(r=c(e.s),i=c(e.v),t=ne(e.h,r,i),o=!0,l=`hsv`):h(e.h)&&h(e.s)&&h(e.l)?(r=c(e.s),a=c(e.l),t=ee(e.h,r,a),o=!0,l=`hsl`):h(e.c)&&h(e.m)&&h(e.y)&&h(e.k)&&(t=ae(e.c,e.m,e.y,e.k),o=!0,l=`cmyk`),Object.prototype.hasOwnProperty.call(e,`a`)&&(n=e.a)),n=s(n),{ok:o,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}let m={CSS_UNIT:RegExp(`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`),rgb:RegExp(`rgb[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),rgba:RegExp(`rgba[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hsl:RegExp(`hsl[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hsla:RegExp(`hsla[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hsv:RegExp(`hsv[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hsva:RegExp(`hsva[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),cmyk:RegExp(`cmyk[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function fe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(ue[e])e=ue[e],t=!0;else if(e===`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};let n=m.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=m.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=m.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=m.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=m.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=m.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=m.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=m.hex8.exec(e),n?{r:p(n[1]),g:p(n[2]),b:p(n[3]),a:ce(n[4]),format:t?`name`:`hex8`}:(n=m.hex6.exec(e),n?{r:p(n[1]),g:p(n[2]),b:p(n[3]),format:t?`name`:`hex`}:(n=m.hex4.exec(e),n?{r:p(n[1]+n[1]),g:p(n[2]+n[2]),b:p(n[3]+n[3]),a:ce(n[4]+n[4]),format:t?`name`:`hex8`}:(n=m.hex3.exec(e),n?{r:p(n[1]+n[1]),g:p(n[2]+n[2]),b:p(n[3]+n[3]),format:t?`name`:`hex`}:!1))))))))))}function h(e){return typeof e==`number`?!Number.isNaN(e):m.CSS_UNIT.test(e)}var g=class e{constructor(t=``,n={}){if(t instanceof e)return t;typeof t==`number`&&(t=le(t)),this.originalInput=t;let r=de(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){let e=this.toRgb(),t,n,r,i=e.r/255,a=e.g/255,o=e.b/255;return t=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,n=a<=.03928?a/12.92:((a+.055)/1.055)**2.4,r=o<=.03928?o/12.92:((o+.055)/1.055)**2.4,.2126*t+.7152*n+.0722*r}getAlpha(){return this.a}setAlpha(e){return this.a=s(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:e}=this.toHsl();return e===0}toHsv(){let e=te(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){let e=te(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${n}%, ${r}%)`:`hsva(${t}, ${n}%, ${r}%, ${this.roundA})`}toHsl(){let e=d(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){let e=d(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${n}%, ${r}%)`:`hsla(${t}, ${n}%, ${r}%, ${this.roundA})`}toHex(e=!1){return re(this.r,this.g,this.b,e)}toHexString(e=!1){return`#`+this.toHex(e)}toHex8(e=!1){return ie(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return`#`+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${n})`:`rgba(${e}, ${t}, ${n}, ${this.roundA})`}toPercentageRgb(){let e=e=>`${Math.round(r(e,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){let e=e=>Math.round(r(e,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...oe(this.r,this.g,this.b)}}toCmykString(){let{c:e,m:t,y:n,k:r}=oe(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${n}, ${r})`}toName(){if(this.a===0)return`transparent`;if(this.a<1)return!1;let e=`#`+re(this.r,this.g,this.b,!1);for(let[t,n]of Object.entries(ue))if(e===n)return t;return!1}toString(e){let t=!!e;e??=this.format;let n=!1,r=this.a<1&&this.a>=0;return!t&&r&&(e.startsWith(`hex`)||e===`name`)?e===`name`&&this.a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),e===`cmyk`&&(n=this.toCmykString()),n||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new e(this.toString())}lighten(t=10){let n=this.toHsl();return n.l+=t/100,n.l=i(n.l),new e(n)}brighten(t=10){let n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)}darken(t=10){let n=this.toHsl();return n.l-=t/100,n.l=i(n.l),new e(n)}tint(e=10){return this.mix(`white`,e)}shade(e=10){return this.mix(`black`,e)}desaturate(t=10){let n=this.toHsl();return n.s-=t/100,n.s=i(n.s),new e(n)}saturate(t=10){let n=this.toHsl();return n.s+=t/100,n.s=i(n.s),new e(n)}greyscale(){return this.desaturate(100)}spin(t){let n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)}mix(t,n=50){let r=this.toRgb(),i=new e(t).toRgb(),a=n/100;return new e({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})}analogous(t=6,n=30){let r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a}complement(){let t=this.toHsl();return t.h=(t.h+180)%360,new e(t)}monochromatic(t=6){let n=this.toHsv(),{h:r}=n,{s:i}=n,{v:a}=n,o=[],s=1/t;for(;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+s)%1;return o}splitcomplement(){let t=this.toHsl(),{h:n}=t;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){let n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){let n=this.toHsl(),{h:r}=n,i=[this],a=360/t;for(let o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i}equals(t){let n=new e(t);return this.format===`cmyk`||n.format===`cmyk`?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}};let pe=[8,15,30,55,78,95,95,92,88,85],me=[95,88,75,62,50,40,32,27,22,18],he=new Map;function ge(e){let t=new g(e);return t.isValid?t.toHexString():null}function _e(e){let t=new g(e).format;return t===`name`?`hex`:t}function _(e){let t=ge(e);if(!t)throw Error(`Invalid color: ${e}`);let n=_e(e),r=`${t}|${n}`;if(he.has(r))return he.get(r);let i=new g(e);if(!i.isValid)throw Error(`Invalid color: ${e}`);let{h:a}=i.toHsl(),o=[];for(let e=0;e<10;e++){let t=new g({h:a,s:pe[e]/100,l:me[e]/100}),r;switch(n){case`hex`:r=t.toHexString();break;case`rgb`:r=t.toRgbString();break;case`hsl`:r=t.toHslString();break;case`hsv`:r=t.toHsvString();break;default:r=t.toHexString()}o.push(r)}return he.set(r,o),o}function ve(e,t){if(Number.isNaN(Number(t)))throw TypeError(`Invalid alpha: ${t}`);let n=new g(e);if(!n.isValid)throw Error(`Invalid color: ${e}`);let r=_e(e);n.setAlpha(t);let i;switch(r){case`rgb`:i=n.toRgbString();break;case`hsl`:i=n.toHslString();break;case`hsv`:i=n.toHsvString();break;default:i=n.toRgbString()}return i}
1
+ /*! CCK UI v0.0.2 */
2
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.CckUi={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let n=Symbol(`INSTALLED_KEY`),r=e=>({install:t=>{t[n]||(t[n]=!0,e.forEach(e=>t.use(e)))}});function i(e,t){o(e)&&(e=`100%`);let n=s(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(e=t===360?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t)),e)}function a(e){return Math.min(1,Math.max(0,e))}function o(e){return typeof e==`string`&&e.indexOf(`.`)!==-1&&parseFloat(e)===1}function s(e){return typeof e==`string`&&e.indexOf(`%`)!==-1}function c(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function l(e){return Number(e)<=1?`${Number(e)*100}%`:e}function u(e){return e.length===1?`0`+e:String(e)}function d(e,t,n){return{r:i(e,255)*255,g:i(t,255)*255,b:i(n,255)*255}}function f(e,t,n){e=i(e,255),t=i(t,255),n=i(n,255);let r=Math.max(e,t,n),a=Math.min(e,t,n),o=0,s=0,c=(r+a)/2;if(r===a)s=0,o=0;else{let i=r-a;switch(s=c>.5?i/(2-r-a):i/(r+a),r){case e:o=(t-n)/i+(t<n?6:0);break;case t:o=(n-e)/i+2;break;case n:o=(e-t)/i+4;break;default:break}o/=6}return{h:o,s,l:c}}function p(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function m(e,t,n){let r,a,o;if(e=i(e,360),t=i(t,100),n=i(n,100),t===0)a=n,o=n,r=n;else{let i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;r=p(s,i,e+1/3),a=p(s,i,e),o=p(s,i,e-1/3)}return{r:r*255,g:a*255,b:o*255}}function h(e,t,n){e=i(e,255),t=i(t,255),n=i(n,255);let r=Math.max(e,t,n),a=Math.min(e,t,n),o=0,s=r,c=r-a,l=r===0?0:c/r;if(r===a)o=0;else{switch(r){case e:o=(t-n)/c+(t<n?6:0);break;case t:o=(n-e)/c+2;break;case n:o=(e-t)/c+4;break;default:break}o/=6}return{h:o,s:l,v:s}}function ee(e,t,n){e=i(e,360)*6,t=i(t,100),n=i(n,100);let r=Math.floor(e),a=e-r,o=n*(1-t),s=n*(1-a*t),c=n*(1-(1-a)*t),l=r%6,u=[n,s,o,o,c,n][l],d=[c,n,n,s,o,o][l],f=[o,o,c,n,n,s][l];return{r:u*255,g:d*255,b:f*255}}function g(e,t,n,r){let i=[u(Math.round(e).toString(16)),u(Math.round(t).toString(16)),u(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(``)}function _(e,t,n,r,i){let a=[u(Math.round(e).toString(16)),u(Math.round(t).toString(16)),u(Math.round(n).toString(16)),u(te(r))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join(``)}function v(e,t,n,r){let i=e/100,a=t/100,o=n/100,s=r/100;return{r:255*(1-i)*(1-s),g:255*(1-a)*(1-s),b:255*(1-o)*(1-s)}}function y(e,t,n){let r=1-e/255,i=1-t/255,a=1-n/255,o=Math.min(r,i,a);return o===1?(r=0,i=0,a=0):(r=(r-o)/(1-o)*100,i=(i-o)/(1-o)*100,a=(a-o)/(1-o)*100),o*=100,{c:Math.round(r),m:Math.round(i),y:Math.round(a),k:Math.round(o)}}function te(e){return Math.round(parseFloat(e)*255).toString(16)}function b(e){return x(e)/255}function x(e){return parseInt(e,16)}function ne(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}let S={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,goldenrod:`#daa520`,gold:`#ffd700`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavenderblush:`#fff0f5`,lavender:`#e6e6fa`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`};function re(e){let t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e==`string`&&(e=w(e)),typeof e==`object`&&(T(e.r)&&T(e.g)&&T(e.b)?(t=d(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):T(e.h)&&T(e.s)&&T(e.v)?(r=l(e.s),i=l(e.v),t=ee(e.h,r,i),o=!0,s=`hsv`):T(e.h)&&T(e.s)&&T(e.l)?(r=l(e.s),a=l(e.l),t=m(e.h,r,a),o=!0,s=`hsl`):T(e.c)&&T(e.m)&&T(e.y)&&T(e.k)&&(t=v(e.c,e.m,e.y,e.k),o=!0,s=`cmyk`),Object.prototype.hasOwnProperty.call(e,`a`)&&(n=e.a)),n=c(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}let C={CSS_UNIT:RegExp(`(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)`),rgb:RegExp(`rgb[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),rgba:RegExp(`rgba[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hsl:RegExp(`hsl[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hsla:RegExp(`hsla[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hsv:RegExp(`hsv[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hsva:RegExp(`hsva[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),cmyk:RegExp(`cmyk[\\s|\\(]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))[,|\\s]+((?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?))\\s*\\)?`),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function w(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(S[e])e=S[e],t=!0;else if(e===`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};let n=C.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=C.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=C.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=C.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=C.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=C.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=C.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=C.hex8.exec(e),n?{r:x(n[1]),g:x(n[2]),b:x(n[3]),a:b(n[4]),format:t?`name`:`hex8`}:(n=C.hex6.exec(e),n?{r:x(n[1]),g:x(n[2]),b:x(n[3]),format:t?`name`:`hex`}:(n=C.hex4.exec(e),n?{r:x(n[1]+n[1]),g:x(n[2]+n[2]),b:x(n[3]+n[3]),a:b(n[4]+n[4]),format:t?`name`:`hex8`}:(n=C.hex3.exec(e),n?{r:x(n[1]+n[1]),g:x(n[2]+n[2]),b:x(n[3]+n[3]),format:t?`name`:`hex`}:!1))))))))))}function T(e){return typeof e==`number`?!Number.isNaN(e):C.CSS_UNIT.test(e)}var E=class e{constructor(t=``,n={}){if(t instanceof e)return t;typeof t==`number`&&(t=ne(t)),this.originalInput=t;let r=re(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){let e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){let e=this.toRgb(),t,n,r,i=e.r/255,a=e.g/255,o=e.b/255;return t=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,n=a<=.03928?a/12.92:((a+.055)/1.055)**2.4,r=o<=.03928?o/12.92:((o+.055)/1.055)**2.4,.2126*t+.7152*n+.0722*r}getAlpha(){return this.a}setAlpha(e){return this.a=c(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){let{s:e}=this.toHsl();return e===0}toHsv(){let e=h(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){let e=h(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${n}%, ${r}%)`:`hsva(${t}, ${n}%, ${r}%, ${this.roundA})`}toHsl(){let e=f(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){let e=f(this.r,this.g,this.b),t=Math.round(e.h*360),n=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${n}%, ${r}%)`:`hsla(${t}, ${n}%, ${r}%, ${this.roundA})`}toHex(e=!1){return g(this.r,this.g,this.b,e)}toHexString(e=!1){return`#`+this.toHex(e)}toHex8(e=!1){return _(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return`#`+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){let e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${n})`:`rgba(${e}, ${t}, ${n}, ${this.roundA})`}toPercentageRgb(){let e=e=>`${Math.round(i(e,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){let e=e=>Math.round(i(e,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...y(this.r,this.g,this.b)}}toCmykString(){let{c:e,m:t,y:n,k:r}=y(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${n}, ${r})`}toName(){if(this.a===0)return`transparent`;if(this.a<1)return!1;let e=`#`+g(this.r,this.g,this.b,!1);for(let[t,n]of Object.entries(S))if(e===n)return t;return!1}toString(e){let t=!!e;e??=this.format;let n=!1,r=this.a<1&&this.a>=0;return!t&&r&&(e.startsWith(`hex`)||e===`name`)?e===`name`&&this.a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),e===`cmyk`&&(n=this.toCmykString()),n||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new e(this.toString())}lighten(t=10){let n=this.toHsl();return n.l+=t/100,n.l=a(n.l),new e(n)}brighten(t=10){let n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)}darken(t=10){let n=this.toHsl();return n.l-=t/100,n.l=a(n.l),new e(n)}tint(e=10){return this.mix(`white`,e)}shade(e=10){return this.mix(`black`,e)}desaturate(t=10){let n=this.toHsl();return n.s-=t/100,n.s=a(n.s),new e(n)}saturate(t=10){let n=this.toHsl();return n.s+=t/100,n.s=a(n.s),new e(n)}greyscale(){return this.desaturate(100)}spin(t){let n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)}mix(t,n=50){let r=this.toRgb(),i=new e(t).toRgb(),a=n/100;return new e({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})}analogous(t=6,n=30){let r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a}complement(){let t=this.toHsl();return t.h=(t.h+180)%360,new e(t)}monochromatic(t=6){let n=this.toHsv(),{h:r}=n,{s:i}=n,{v:a}=n,o=[],s=1/t;for(;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+s)%1;return o}splitcomplement(){let t=this.toHsl(),{h:n}=t;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){let n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){let n=this.toHsl(),{h:r}=n,i=[this],a=360/t;for(let o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i}equals(t){let n=new e(t);return this.format===`cmyk`||n.format===`cmyk`?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}};let D=[8,15,30,55,78,95,95,92,88,85],O=[95,88,75,62,50,40,32,27,22,18],k=new Map;function ie(e){let t=new E(e);return t.isValid?t.toHexString():null}function A(e){let t=new E(e).format;return t===`name`?`hex`:t}function j(e){let t=ie(e);if(!t)throw Error(`Invalid color: ${e}`);let n=A(e),r=`${t}|${n}`;if(k.has(r))return k.get(r);let i=new E(e);if(!i.isValid)throw Error(`Invalid color: ${e}`);let{h:a}=i.toHsl(),o=[];for(let e=0;e<10;e++){let t=new E({h:a,s:D[e]/100,l:O[e]/100}),r;switch(n){case`hex`:r=t.toHexString();break;case`rgb`:r=t.toRgbString();break;case`hsl`:r=t.toHslString();break;case`hsv`:r=t.toHsvString();break;default:r=t.toHexString()}o.push(r)}return k.set(r,o),o}function M(e,t){if(Number.isNaN(Number(t)))throw TypeError(`Invalid alpha: ${t}`);let n=new E(e);if(!n.isValid)throw Error(`Invalid color: ${e}`);let r=A(e);n.setAlpha(t);let i;switch(r){case`rgb`:i=n.toRgbString();break;case`hsl`:i=n.toHslString();break;case`hsv`:i=n.toHsvString();break;default:i=n.toRgbString()}return i}
3
3
  /**
4
4
  * @vue/shared v3.5.35
5
5
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
6
6
  * @license MIT
7
7
  **/
8
- function ye(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}let be={},xe=[],Se=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ce=e=>e.startsWith(`onUpdate:`),we=Object.assign,Te=Object.prototype.hasOwnProperty,Ee=(e,t)=>Te.call(e,t),v=Array.isArray,De=e=>Ae(e)===`[object Map]`,y=e=>typeof e==`function`,b=e=>typeof e==`string`,x=e=>typeof e==`symbol`,S=e=>typeof e==`object`&&!!e,Oe=e=>(S(e)||y(e))&&y(e.then)&&y(e.catch),ke=Object.prototype.toString,Ae=e=>ke.call(e),je=e=>Ae(e).slice(8,-1),Me=e=>b(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,Ne=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Pe=/-\w/g,Fe=Ne(e=>e.replace(Pe,e=>e.slice(1).toUpperCase())),Ie=Ne(e=>e.charAt(0).toUpperCase()+e.slice(1)),C=(e,t)=>!Object.is(e,t),Le,Re=()=>Le||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ze(e){if(v(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=b(r)?Ue(r):ze(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(b(e)||S(e))return e}let Be=/;(?![^(]*\))/g,Ve=/:([^]+)/,He=/\/\*[^]*?\*\//g;function Ue(e){let t={};return e.replace(He,``).split(Be).forEach(e=>{if(e){let n=e.split(Ve);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function w(e){let t=``;if(b(e))t=e;else if(v(e))for(let n=0;n<e.length;n++){let r=w(e[n]);r&&(t+=r+` `)}else if(S(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}let We=e=>e===void 0,Ge=e=>typeof e==`number`,Ke=e=>b(e)?!Number.isNaN(Number(e)):!1;function qe(e,t=`px`){if(!e&&e!==0)return``;if(Ge(e)||Ke(e))return`${e}${t}`;if(b(e))return e}function Je(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}let Ye=e=>{let t=e.props,n=v(t)?Object.fromEntries(t.map(e=>[e,{}])):t;e.setPropsDefaults=t=>{if(n){for(let[e,r]of Object.entries(t)){let t=n[e];if(Ee(n,e)){if(Je(t)){n[e]={...n,default:r};continue}n[e]={type:t,default:r}}}e.props=n}}},Xe=(e,t)=>{if(e.install=n=>{for(let r of[e,...Object.values(t??[])])n.component(r.name,r)},t)for(let[n,r]of Object.entries(t))e[n]=r;return Ye(e),e},T,Ze=0,E,D
9
- /**
10
- * @vue/reactivity v3.5.35
11
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
- * @license MIT
13
- **/
14
- ;function Qe(e,t=!1){if(e.flags|=8,t){e.next=D,D=e;return}e.next=E,E=e}function $e(){Ze++}function et(){if(--Ze>0)return;if(D){let e=D;for(D=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;E;){let t=E;for(E=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function tt(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function nt(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),at(r),ot(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function rt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(it(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function it(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===k)||(e.globalVersion=k,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!rt(e))))return;e.flags|=2;let t=e.dep,n=T,r=O;T=e,O=!0;try{tt(e);let n=e.fn(e._value);(t.version===0||C(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{T=n,O=r,nt(e),e.flags&=-3}}function at(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)at(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ot(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let O=!0,st=[];function ct(){st.push(O),O=!1}function lt(){let e=st.pop();O=e===void 0?!0:e}let k=0;var ut=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},dt=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!T||!O||T===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==T)t=this.activeLink=new ut(T,this),T.deps?(t.prevDep=T.depsTail,T.depsTail.nextDep=t,T.depsTail=t):T.deps=T.depsTail=t,ft(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=T.depsTail,t.nextDep=void 0,T.depsTail.nextDep=t,T.depsTail=t,T.deps===t&&(T.deps=e)}return t}trigger(e){this.version++,k++,this.notify(e)}notify(e){$e();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{et()}}};function ft(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)ft(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}let pt=new WeakMap,A=Symbol(``),mt=Symbol(``),j=Symbol(``);function M(e,t,n){if(O&&T){let t=pt.get(e);t||pt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new dt),r.map=t,r.key=n),r.track()}}function N(e,t,n,r,i,a){let o=pt.get(e);if(!o){k++;return}let s=e=>{e&&e.trigger()};if($e(),t===`clear`)o.forEach(s);else{let i=v(e),a=i&&Me(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===j||!x(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(j)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(A)),De(e)&&s(o.get(mt)));break;case`delete`:i||(s(o.get(A)),De(e)&&s(o.get(mt)));break;case`set`:De(e)&&s(o.get(A));break}}et()}function P(e){let t=B(e);return t===e?t:(M(t,`iterate`,j),z(e)?t:t.map(V))}function ht(e){return M(e=B(e),`iterate`,j),e}function F(e,t){return R(e)?qt(Gt(e)?V(t):t):V(t)}let gt={__proto__:null,[Symbol.iterator](){return _t(this,Symbol.iterator,e=>F(this,e))},concat(...e){return P(this).concat(...e.map(e=>v(e)?P(e):e))},entries(){return _t(this,`entries`,e=>(e[1]=F(this,e[1]),e))},every(e,t){return I(this,`every`,e,t,void 0,arguments)},filter(e,t){return I(this,`filter`,e,t,e=>e.map(e=>F(this,e)),arguments)},find(e,t){return I(this,`find`,e,t,e=>F(this,e),arguments)},findIndex(e,t){return I(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return I(this,`findLast`,e,t,e=>F(this,e),arguments)},findLastIndex(e,t){return I(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return I(this,`forEach`,e,t,void 0,arguments)},includes(...e){return bt(this,`includes`,e)},indexOf(...e){return bt(this,`indexOf`,e)},join(e){return P(this).join(e)},lastIndexOf(...e){return bt(this,`lastIndexOf`,e)},map(e,t){return I(this,`map`,e,t,void 0,arguments)},pop(){return L(this,`pop`)},push(...e){return L(this,`push`,e)},reduce(e,...t){return yt(this,`reduce`,e,t)},reduceRight(e,...t){return yt(this,`reduceRight`,e,t)},shift(){return L(this,`shift`)},some(e,t){return I(this,`some`,e,t,void 0,arguments)},splice(...e){return L(this,`splice`,e)},toReversed(){return P(this).toReversed()},toSorted(e){return P(this).toSorted(e)},toSpliced(...e){return P(this).toSpliced(...e)},unshift(...e){return L(this,`unshift`,e)},values(){return _t(this,`values`,e=>F(this,e))}};function _t(e,t,n){let r=ht(e),i=r[t]();return r!==e&&!z(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}let vt=Array.prototype;function I(e,t,n,r,i,a){let o=ht(e),s=o!==e&&!z(e),c=o[t];if(c!==vt[t]){let t=c.apply(e,a);return s?V(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,F(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function yt(e,t,n,r){let i=ht(e),a=i!==e&&!z(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=F(e,t)),n.call(this,t,F(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?F(e,c):c}function bt(e,t,n){let r=B(e);M(r,`iterate`,j);let i=r[t](...n);return(i===-1||i===!1)&&Kt(n[0])?(n[0]=B(n[0]),r[t](...n)):i}function L(e,t,n=[]){ct(),$e();let r=B(e)[t].apply(e,n);return et(),lt(),r}let xt=ye(`__proto__,__v_isRef,__isVue`),St=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(x));function Ct(e){x(e)||(e=String(e));let t=B(this);return M(t,`has`,e),t.hasOwnProperty(e)}var wt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Bt:zt:i?Rt:Lt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=v(e);if(!r){let e;if(a&&(e=gt[t]))return e;if(t===`hasOwnProperty`)return Ct}let o=Reflect.get(e,t,H(e)?e:n);if((x(t)?St.has(t):xt(t))||(r||M(e,`get`,t),i))return o;if(H(o)){let e=a&&Me(t)?o:o.value;return r&&S(e)?Ut(e):e}return S(o)?r?Ut(o):Ht(o):o}},Tt=class extends wt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=v(e)&&Me(t);if(!this._isShallow){let e=R(i);if(!z(n)&&!R(n)&&(i=B(i),n=B(n)),!a&&H(i)&&!H(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:Ee(e,t),s=Reflect.set(e,t,n,H(e)?e:r);return e===B(r)&&(o?C(n,i)&&N(e,`set`,t,n,i):N(e,`add`,t,n)),s}deleteProperty(e,t){let n=Ee(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&N(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!x(t)||!St.has(t))&&M(e,`has`,t),n}ownKeys(e){return M(e,`iterate`,v(e)?`length`:A),Reflect.ownKeys(e)}},Et=class extends wt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}};let Dt=new Tt,Ot=new Et,kt=e=>e,At=e=>Reflect.getPrototypeOf(e);function jt(e,t,n){return function(...r){let i=this.__v_raw,a=B(i),o=De(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?kt:t?qt:V;return!t&&M(a,`iterate`,c?mt:A),we(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function Mt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Nt(e,t){let n={get(n){let r=this.__v_raw,i=B(r),a=B(n);e||(C(n,a)&&M(i,`get`,n),M(i,`get`,a));let{has:o}=At(i),s=t?kt:e?qt:V;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&M(B(t),`iterate`,A),t.size},has(t){let n=this.__v_raw,r=B(n),i=B(t);return e||(C(t,i)&&M(r,`has`,t),M(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=B(a),s=t?kt:e?qt:V;return!e&&M(o,`iterate`,A),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return we(n,e?{add:Mt(`add`),set:Mt(`set`),delete:Mt(`delete`),clear:Mt(`clear`)}:{add(e){let n=B(this),r=At(n),i=B(e),a=!t&&!z(e)&&!R(e)?i:e;return r.has.call(n,a)||C(e,a)&&r.has.call(n,e)||C(i,a)&&r.has.call(n,i)||(n.add(a),N(n,`add`,a,a)),this},set(e,n){!t&&!z(n)&&!R(n)&&(n=B(n));let r=B(this),{has:i,get:a}=At(r),o=i.call(r,e);o||=(e=B(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?C(n,s)&&N(r,`set`,e,n,s):N(r,`add`,e,n),this},delete(e){let t=B(this),{has:n,get:r}=At(t),i=n.call(t,e);i||=(e=B(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&N(t,`delete`,e,void 0,a),o},clear(){let e=B(this),t=e.size!==0,n=e.clear();return t&&N(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=jt(r,e,t)}),n}function Pt(e,t){let n=Nt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(Ee(n,r)&&r in t?n:t,r,i)}let Ft={get:Pt(!1,!1)},It={get:Pt(!0,!1)},Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap;function Vt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ht(e){return R(e)?e:Wt(e,!1,Dt,Ft,Lt)}function Ut(e){return Wt(e,!0,Ot,It,zt)}function Wt(e,t,n,r,i){if(!S(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Vt(je(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Gt(e){return R(e)?Gt(e.__v_raw):!!(e&&e.__v_isReactive)}function R(e){return!!(e&&e.__v_isReadonly)}function z(e){return!!(e&&e.__v_isShallow)}function Kt(e){return e?!!e.__v_raw:!1}function B(e){let t=e&&e.__v_raw;return t?B(t):e}let V=e=>S(e)?Ht(e):e,qt=e=>S(e)?Ut(e):e;function H(e){return e?e.__v_isRef===!0:!1}function Jt(e){return Yt(e,!1)}function Yt(e,t){return H(e)?e:new Xt(e,t)}var Xt=class{constructor(e,t){this.dep=new dt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:B(e),this._value=t?e:V(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||z(e)||R(e);e=n?e:B(e),C(e,t)&&(this._rawValue=e,this._value=n?e:V(e),this.dep.trigger())}};function U(e){return H(e)?e.value:e}var Zt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new dt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=k-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&T!==this)return Qe(this,!0),!0}get value(){let e=this.dep.track();return it(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Qt(e,t,n=!1){let r,i;return y(e)?r=e:(r=e.get,i=e.set),new Zt(r,i,n)}
15
- /**
16
- * @vue/runtime-core v3.5.35
17
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
18
- * @license MIT
19
- **/
20
- function $t(e,t,n,r){try{return r?e(...r):e()}catch(e){tn(e,t,n)}}function en(e,t,n,r){if(y(e)){let i=$t(e,t,n,r);return i&&Oe(i)&&i.catch(e=>{tn(e,t,n)}),i}if(v(e)){let i=[];for(let a=0;a<e.length;a++)i.push(en(e[a],t,n,r));return i}}function tn(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||be;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){ct(),$t(a,null,10,[e,i,o]),lt();return}}nn(e,n,i,r,o)}function nn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}let rn=[];function an(e,...t){rn.push({event:e,args:t})}let on=sn(`component:updated`);function sn(e){return t=>{an(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}let W=null,cn=null;function ln(e){let t=W;return W=e,cn=e&&e.type.__scopeId||null,t}function un(e,t=W,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Nn(-1);let i=ln(t),a;try{a=e(...n)}finally{ln(i),r._d&&Nn(1)}return __VUE_PROD_DEVTOOLS__&&on(t),a};return r._n=!0,r._c=!0,r._d=!0,r}function dn(e,t,n=!1){let r=Jn();if(r||Tn){let i=Tn?Tn._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&y(t)?t.call(r&&r.proxy):t}}let fn=e=>e.__isTeleport;function pn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,pn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function mn(e,t){return y(e)?we({name:e.name},t,{setup:e}):e}Re().requestIdleCallback,Re().cancelIdleCallback;let hn=e=>!!e.type.__asyncLoader,gn=`components`,_n=Symbol.for(`v-ndc`);function vn(e){return b(e)?yn(gn,e,!1)||e:e||_n}function yn(e,t,n=!0,r=!1){let i=W||qn;if(i){let n=i.type;if(e===gn){let e=Qn(n,!1);if(e&&(e===t||e===Fe(t)||e===Ie(Fe(t))))return n}let a=bn(i[e]||n[e],t)||bn(i.appContext[e],t);return!a&&r?n:a}}function bn(e,t){return e&&(e[t]||e[Fe(t)]||e[Ie(Fe(t))])}function xn(e,t,n={},r,i){if(W.ce||W.parent&&hn(W.parent)&&W.parent.ce){let e=Object.keys(n).length>0;return t!=="default"&&(n.name=t),q(),X(G,null,[zn(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),q();let o=a&&Sn(a(n)),s=n.key||o&&o.key,c=X(G,{key:(s&&!x(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function Sn(e){return e.some(e=>Fn(e)?!(e.type===An||e.type===G&&!Sn(e.children)):!0)?e:null}function Cn(){return wn(`useSlots`).slots}function wn(e){let t=Jn();return t.setupContext||=Zn(t)}let Tn=null,En={},Dn=e=>Object.getPrototypeOf(e)===En,On=e=>e.__isSuspense,G=Symbol.for(`v-fgt`),kn=Symbol.for(`v-txt`),An=Symbol.for(`v-cmt`),jn=[],K=null;function q(e=!1){jn.push(K=e?null:[])}function Mn(){jn.pop(),K=jn[jn.length-1]||null}let J=1;function Nn(e,t=!1){J+=e,e<0&&K&&t&&(K.hasOnce=!0)}function Pn(e){return e.dynamicChildren=J>0?K||xe:null,Mn(),J>0&&K&&K.push(e),e}function Y(e,t,n,r,i,a){return Pn(Rn(e,t,n,r,i,a,!0))}function X(e,t,n,r,i){return Pn(zn(e,t,n,r,i,!0))}function Fn(e){return e?e.__v_isVNode===!0:!1}let In=({key:e})=>e??null,Ln=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:b(e)||H(e)||y(e)?{i:W,r:e,k:t,f:!!n}:e);function Rn(e,t=null,n=null,r=0,i=null,a=e===G?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&In(t),ref:t&&Ln(t),scopeId:cn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:W};return s?(Gn(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=b(n)?8:16),J>0&&!o&&K&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&K.push(c),c}let zn=Bn;function Bn(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===_n)&&(e=An),Fn(e)){let r=Hn(e,t,!0);return n&&Gn(r,n),J>0&&!a&&K&&(r.shapeFlag&6?K[K.indexOf(e)]=r:K.push(r)),r.patchFlag=-2,r}if($n(e)&&(e=e.__vccOpts),t){t=Vn(t);let{class:e,style:n}=t;e&&!b(e)&&(t.class=w(e)),S(n)&&(Kt(n)&&!v(n)&&(n=we({},n)),t.style=ze(n))}let o=b(e)?1:On(e)?128:fn(e)?64:S(e)?4:y(e)?2:0;return Rn(e,t,n,r,i,o,a,!0)}function Vn(e){return e?Kt(e)||Dn(e)?we({},e):e:null}function Hn(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Kn(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&In(l),ref:t&&t.ref?n&&a?v(a)?a.concat(Ln(t)):[a,Ln(t)]:Ln(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==G?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Hn(e.ssContent),ssFallback:e.ssFallback&&Hn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&pn(u,c.clone(u)),u}function Un(e=` `,t=0){return zn(kn,null,e,t)}function Wn(e=``,t=!1){return t?(q(),X(An,null,e)):zn(An,null,e)}function Gn(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(v(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Gn(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Dn(t)?t._ctx=W:r===3&&W&&(W.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else y(t)?(t={default:t,_ctx:W},n=32):(t=String(t),r&64?(n=16,t=[Un(t)]):n=8);e.children=t,e.shapeFlag|=n}function Kn(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=w([t.class,r.class]));else if(e===`style`)t.style=ze([t.style,r.style]);else if(Se(e)){let n=t[e],i=r[e];i&&n!==i&&!(v(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!Ce(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}let qn=null,Jn=()=>qn||W;{let e=Re(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};t(`__VUE_INSTANCE_SETTERS__`,e=>qn=e),t(`__VUE_SSR_SETTERS__`,e=>Yn=e)}let Yn=!1,Xn={get(e,t){return M(e,`get`,``),e[t]}};function Zn(e){return{attrs:new Proxy(e.attrs,Xn),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Qn(e,t=!0){return y(e)?e.displayName||e.name:e.name||t&&e.__name}function $n(e){return y(e)&&`__vccOpts`in e}let Z=(e,t)=>Qt(e,t,Yn),Q=(e,t,n,r,i)=>{let a=`${e}-${t}`;return n&&(a+=`-${n}`),r&&(a+=`__${r}`),i&&(a+=`--${i}`),a},er=Symbol(`namespaceContextKey`),tr=e=>{let t=e||(Jn()?dn(er,Jt(`c`)):Jt(`c`));return Z(()=>U(t)||`c`)},nr=(e,t)=>{let n=tr(t);return{namespace:n,b:(t=``)=>Q(n.value,e,t,``,``),e:t=>t?Q(n.value,e,``,t,``):``,m:t=>t?Q(n.value,e,``,``,t):``,be:(t,r)=>t&&r?Q(n.value,e,t,r,``):``,em:(t,r)=>t&&r?Q(n.value,e,``,t,r):``,bm:(t,r)=>t&&r?Q(n.value,e,t,``,r):``,bem:(t,r,i)=>t&&r&&i?Q(n.value,e,t,r,i):``,is:(e,...t)=>{let n=t.length>=1?t[0]:!0;return e&&n?`is-${e}`:``},cssVar:e=>{let t={};for(let r in e)e[r]&&(t[`--${n.value}-${r}`]=e[r]);return t},cssVarName:e=>`--${n.value}-${e}`,cssVarBlock:t=>{let r={};for(let i in t)t[i]&&(r[`--${n.value}-${e}-${i}`]=t[i]);return r},cssVarBlockName:t=>`--${n.value}-${e}-${t}`}},rr=e=>{let t=Jn();return Z(()=>t?.proxy?.$props?.[e])},ir=()=>typeof document>`u`?`light`:document.documentElement.dataset.cColorScheme===`dark`?`dark`:`light`,ar=Jt(ir());typeof window<`u`&&new MutationObserver(()=>{let e=ir();e!==ar.value&&(ar.value=e)}).observe(document.documentElement,{attributes:!0,attributeFilter:[`data-c-color-scheme`]});let or=()=>Ut(ar),sr=Symbol(`formContextKey`),cr=e=>{let t=rr(`disabled`),n=dn(sr,void 0);return Z(()=>t.value??U(e)??n?.disabled??!1)},lr=(e,t)=>{let n=cr(),r=Jt(),{hasLeftSlot:i,hasRightSlot:a}=t,o=i||!!e.leftSection,s=a||!!e.rightSection;return{_disabled:n,_ref:r,_props:Z(()=>{let t={"data-disabled":n.value||e.loading||void 0,"data-block":e.fullWidth||void 0,"data-size":e.size&&e.size!==`sm`?e.size:void 0,"data-with-left-section":o||void 0,"data-with-right-section":s||void 0,"data-variant":e.variant||`default`};return e.tag===`button`&&(t[`aria-disabled`]=n.value||e.loading||void 0,t.disabled=n.value||e.loading),t}),handleClick:t=>{if(n.value||e.loading){t.stopPropagation();return}}}},$=[`red`,`pink`,`grape`,`violet`,`indigo`,`blue`,`cyan`,`teal`,`green`,`lime`,`yellow`,`orange`,`gray`,`dark`],ur=e=>e===`light`?{bg:6,hover:7,lightBg:1,lightHover:2,lightColor:9,outlineColor:6,outlineHoverBgAlpha:.05}:{bg:8,hover:9,lightBg:1,lightHover:2,lightColor:9,outlineColor:4,outlineHoverBgAlpha:.05};function dr(e){let t=or();return Z(()=>{let n={},{color:r,gradient:i,justify:a,variant:o}=e,s=t.value,c=ur(s);switch(a&&(n[`--button-justify`]=a),o){case`default`:break;case`filled`:if(r)if($.includes(r))n[`--button-bg`]=`var(--c-color-${r}-filled)`,n[`--button-hover`]=`var(--c-color-${r}-filled-hover)`;else{let e=_(r);n[`--button-bg`]=e[c.bg],n[`--button-hover`]=e[c.hover]}break;case`light`:if(r)if($.includes(r))n[`--button-bg`]=`var(--c-color-${r}-light)`,n[`--button-hover`]=`var(--c-color-${r}-light-hover)`,n[`--button-color`]=`var(--c-color-${r}-light-color)`;else{let e=_(r);n[`--button-bg`]=e[c.lightBg],n[`--button-hover`]=e[c.lightHover],n[`--button-color`]=e[c.lightColor]}break;case`outline`:if(r)if($.includes(r))n[`--button-hover`]=`var(--c-color-${r}-outline-hover)`,n[`--button-color`]=`var(--c-color-${r}-outline)`,n[`--button-bd`]=`calc(0.0625rem * var(--c-scale)) solid var(--c-color-${r}-outline)`;else{let e=_(r);n[`--button-hover`]=ve(e[c.outlineColor],c.outlineHoverBgAlpha),n[`--button-color`]=e[c.outlineColor],n[`--button-bd`]=`calc(0.0625rem * var(--c-scale)) solid ${e[c.outlineColor]}`}break;case`subtle`:if(r)if($.includes(r))n[`--button-hover`]=`var(--c-color-${r}-outline-hover)`,n[`--button-color`]=`var(--c-color-${r}-outline)`;else{let e=_(r);n[`--button-hover`]=ve(e[c.outlineColor],c.outlineHoverBgAlpha),n[`--button-color`]=e[c.outlineColor]}break;case`transparent`:r&&($.includes(r)?n[`--button-color`]=`var(--c-color-${r}-light-color)`:n[`--button-color`]=_(r)[c.lightColor]);break;case`white`:r&&($.includes(r)?n[`--button-color`]=`var(--c-color-${r}-filled)`:n[`--button-color`]=_(r)[c.bg]);break;case`gradient`:let e=i?.from||`blue`,t=i?.to||`cyan`,a=i?.deg||`45`,o=e,s=t;$.includes(e)&&(o=`var(--c-color-${e}-filled)`),$.includes(t)&&(s=`var(--c-color-${t}-filled)`),n[`--button-bg`]=`linear-gradient(${a}deg, ${o} 0%, ${s} 100%)`;break;default:break}return n})}let fr={key:0,"data-position":`left`},pr={key:1,"data-position":`left`},mr={key:2,"data-position":`right`},hr={key:3,"data-position":`right`},gr=Xe(mn({name:`CButton`,__name:`button`,props:{autoContrast:{type:Boolean,required:!1},color:{type:String,required:!1},disabled:{type:Boolean,required:!1},fullWidth:{type:Boolean,required:!1},gradient:{type:Object,required:!1},justify:{type:void 0,required:!1},leftSection:{type:null,required:!1},loaderProps:{type:Object,required:!1},loading:{type:Boolean,required:!1},radius:{type:String,required:!1,default:`4px`},rightSection:{type:null,required:!1},size:{type:null,required:!1,default:`sm`},tag:{type:null,required:!1,default:`button`},variant:{type:String,required:!1,default:`default`}},setup(e,{expose:t}){let n=Cn(),r=Z(()=>!!n[`left-section`]),i=Z(()=>!!n[`right-section`]),a=e,{_disabled:o,_props:s,_ref:c,handleClick:l}=lr(a,{hasLeftSlot:r.value,hasRightSlot:i.value}),u=dr(a),d=nr(`button`),f=Z(()=>[nr(`focus`).b(`auto`),!o.value&&nr(`active`).b(),d.e(`root`),d.is(`loading`,a.loading)]),ee=Z(()=>[d.e(`inner`)]),te=Z(()=>[d.e(`label`)]);return t({disabled:o.value,ref:c,size:a.size,variant:a.variant}),(t,n)=>(q(),X(vn(e.tag),Kn(U(s),{class:f.value,style:U(u),onClick:U(l)}),{default:un(()=>[Rn(`span`,{class:w(ee.value)},[t.$slots[`left-section`]?(q(),Y(`span`,fr,[xn(t.$slots,`left-section`)])):e.leftSection?(q(),Y(`span`,pr,[(q(),X(vn(e.leftSection)))])):Wn(`v-if`,!0),Rn(`span`,{class:w(te.value)},[xn(t.$slots,`default`)],2),t.$slots[`right-section`]?(q(),Y(`span`,mr,[xn(t.$slots,`right-section`)])):e.rightSection?(q(),Y(`span`,hr,[(q(),X(vn(e.rightSection)))])):Wn(`v-if`,!0)],2)]),_:3},16,[`class`,`style`,`onClick`]))}})),_r=Xe(mn({name:`CIcon`,inheritAttrs:!1,__name:`icon`,props:{size:{type:[Number,String],required:!1},color:{type:String,required:!1}},setup(e){let t=e,n=nr(`icon`),r=Z(()=>{let{size:e,color:n}=t;return!e&&!n?{}:{fontSize:We(e)?void 0:qe(e),"--color":n}});return(e,t)=>(q(),Y(`i`,Kn({class:U(n).b(),style:r.value},e.$attrs),[xn(e.$slots,`default`)],16))}}));var vr=[gr,_r],yr=[],br=n([...vr,...yr]);let xr=br.install;var Sr=br;e.CButton=gr,e.CIcon=_r,e.default=Sr,e.install=xr,e.makeInstaller=n});
8
+ let ae=Object.prototype.hasOwnProperty,oe=(e,t)=>ae.call(e,t),N=Array.isArray,P=e=>typeof e==`string`,F=e=>e===void 0,I=e=>typeof e==`number`,L=e=>P(e)?!Number.isNaN(Number(e)):!1;function R(e,t=`px`){if(!e&&e!==0)return``;if(I(e)||L(e))return`${e}${t}`;if(P(e))return e}function z(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}let B=e=>{let t=e.props,n=N(t)?Object.fromEntries(t.map(e=>[e,{}])):t;e.setPropsDefaults=t=>{if(n){for(let[e,r]of Object.entries(t)){let t=n[e];if(oe(n,e)){if(z(t)){n[e]={...n,default:r};continue}n[e]={type:t,default:r}}}e.props=n}}},V=(e,t)=>{if(e.install=n=>{for(let r of[e,...Object.values(t??[])])n.component(r.name,r)},t)for(let[n,r]of Object.entries(t))e[n]=r;return B(e),e},H=(e,t,n,r,i)=>{let a=`${e}-${t}`;return n&&(a+=`-${n}`),r&&(a+=`__${r}`),i&&(a+=`--${i}`),a},U=Symbol(`namespaceContextKey`),W=e=>{let n=e||((0,t.getCurrentInstance)()?(0,t.inject)(U,(0,t.ref)(`c`)):(0,t.ref)(`c`));return(0,t.computed)(()=>(0,t.unref)(n)||`c`)},G=(e,t)=>{let n=W(t);return{namespace:n,b:(t=``)=>H(n.value,e,t,``,``),e:t=>t?H(n.value,e,``,t,``):``,m:t=>t?H(n.value,e,``,``,t):``,be:(t,r)=>t&&r?H(n.value,e,t,r,``):``,em:(t,r)=>t&&r?H(n.value,e,``,t,r):``,bm:(t,r)=>t&&r?H(n.value,e,t,``,r):``,bem:(t,r,i)=>t&&r&&i?H(n.value,e,t,r,i):``,is:(e,...t)=>{let n=t.length>=1?t[0]:!0;return e&&n?`is-${e}`:``},cssVar:e=>{let t={};for(let r in e)e[r]&&(t[`--${n.value}-${r}`]=e[r]);return t},cssVarName:e=>`--${n.value}-${e}`,cssVarBlock:t=>{let r={};for(let i in t)t[i]&&(r[`--${n.value}-${e}-${i}`]=t[i]);return r},cssVarBlockName:t=>`--${n.value}-${e}-${t}`}},K=e=>{let n=(0,t.getCurrentInstance)();return(0,t.computed)(()=>n?.proxy?.$props?.[e])},q=()=>typeof document>`u`?`light`:document.documentElement.dataset.cColorScheme===`dark`?`dark`:`light`,J=(0,t.ref)(q());typeof window<`u`&&new MutationObserver(()=>{let e=q();e!==J.value&&(J.value=e)}).observe(document.documentElement,{attributes:!0,attributeFilter:[`data-c-color-scheme`]});let se=()=>(0,t.readonly)(J),ce=Symbol(`formContextKey`),le=e=>{let n=K(`disabled`),r=(0,t.inject)(ce,void 0);return(0,t.computed)(()=>n.value??(0,t.unref)(e)??r?.disabled??!1)},ue=(e,n)=>{let r=le(),i=(0,t.ref)(),{hasLeftSlot:a,hasRightSlot:o}=n,s=a||!!e.leftSection,c=o||!!e.rightSection;return{_disabled:r,_ref:i,_props:(0,t.computed)(()=>{let t={"data-disabled":r.value||e.loading||void 0,"data-block":e.fullWidth||void 0,"data-size":e.size&&e.size!==`sm`?e.size:void 0,"data-with-left-section":s||void 0,"data-with-right-section":c||void 0,"data-variant":e.variant||`default`};return e.tag===`button`&&(t[`aria-disabled`]=r.value||e.loading||void 0,t.disabled=r.value||e.loading),t}),handleClick:t=>{if(r.value||e.loading){t.stopPropagation();return}}}},Y=[`red`,`pink`,`grape`,`violet`,`indigo`,`blue`,`cyan`,`teal`,`green`,`lime`,`yellow`,`orange`,`gray`,`dark`],de=e=>e===`light`?{bg:6,hover:7,lightBg:1,lightHover:2,lightColor:9,outlineColor:6,outlineHoverBgAlpha:.05}:{bg:8,hover:9,lightBg:1,lightHover:2,lightColor:9,outlineColor:4,outlineHoverBgAlpha:.05};function fe(e){let n=se();return(0,t.computed)(()=>{let t={},{color:r,gradient:i,justify:a,variant:o}=e,s=n.value,c=de(s);switch(a&&(t[`--button-justify`]=a),o){case`default`:break;case`filled`:if(r)if(Y.includes(r))t[`--button-bg`]=`var(--c-color-${r}-filled)`,t[`--button-hover`]=`var(--c-color-${r}-filled-hover)`;else{let e=j(r);t[`--button-bg`]=e[c.bg],t[`--button-hover`]=e[c.hover]}break;case`light`:if(r)if(Y.includes(r))t[`--button-bg`]=`var(--c-color-${r}-light)`,t[`--button-hover`]=`var(--c-color-${r}-light-hover)`,t[`--button-color`]=`var(--c-color-${r}-light-color)`;else{let e=j(r);t[`--button-bg`]=e[c.lightBg],t[`--button-hover`]=e[c.lightHover],t[`--button-color`]=e[c.lightColor]}break;case`outline`:if(r)if(Y.includes(r))t[`--button-hover`]=`var(--c-color-${r}-outline-hover)`,t[`--button-color`]=`var(--c-color-${r}-outline)`,t[`--button-bd`]=`calc(0.0625rem * var(--c-scale)) solid var(--c-color-${r}-outline)`;else{let e=j(r);t[`--button-hover`]=M(e[c.outlineColor],c.outlineHoverBgAlpha),t[`--button-color`]=e[c.outlineColor],t[`--button-bd`]=`calc(0.0625rem * var(--c-scale)) solid ${e[c.outlineColor]}`}break;case`subtle`:if(r)if(Y.includes(r))t[`--button-hover`]=`var(--c-color-${r}-outline-hover)`,t[`--button-color`]=`var(--c-color-${r}-outline)`;else{let e=j(r);t[`--button-hover`]=M(e[c.outlineColor],c.outlineHoverBgAlpha),t[`--button-color`]=e[c.outlineColor]}break;case`transparent`:r&&(Y.includes(r)?t[`--button-color`]=`var(--c-color-${r}-light-color)`:t[`--button-color`]=j(r)[c.lightColor]);break;case`white`:r&&(Y.includes(r)?t[`--button-color`]=`var(--c-color-${r}-filled)`:t[`--button-color`]=j(r)[c.bg]);break;case`gradient`:let e=i?.from||`blue`,n=i?.to||`cyan`,a=i?.deg||`45`,o=e,s=n;Y.includes(e)&&(o=`var(--c-color-${e}-filled)`),Y.includes(n)&&(s=`var(--c-color-${n}-filled)`),t[`--button-bg`]=`linear-gradient(${a}deg, ${o} 0%, ${s} 100%)`;break;default:break}return t})}let pe={key:0,"data-position":`left`},me={key:1,"data-position":`left`},he={key:2,"data-position":`right`},ge={key:3,"data-position":`right`},X=V((0,t.defineComponent)({name:`CButton`,__name:`button`,props:{autoContrast:{type:Boolean,required:!1},color:{type:String,required:!1},disabled:{type:Boolean,required:!1},fullWidth:{type:Boolean,required:!1},gradient:{type:Object,required:!1},justify:{type:void 0,required:!1},leftSection:{type:null,required:!1},loaderProps:{type:Object,required:!1},loading:{type:Boolean,required:!1},radius:{type:String,required:!1,default:`4px`},rightSection:{type:null,required:!1},size:{type:null,required:!1,default:`sm`},tag:{type:null,required:!1,default:`button`},variant:{type:String,required:!1,default:`default`}},setup(e,{expose:n}){let r=(0,t.useSlots)(),i=(0,t.computed)(()=>!!r[`left-section`]),a=(0,t.computed)(()=>!!r[`right-section`]),o=e,{_disabled:s,_props:c,_ref:l,handleClick:u}=ue(o,{hasLeftSlot:i.value,hasRightSlot:a.value}),d=fe(o),f=G(`button`),p=(0,t.computed)(()=>[G(`focus`).b(`auto`),!s.value&&G(`active`).b(),f.e(`root`),f.is(`loading`,o.loading)]),m=(0,t.computed)(()=>[f.e(`inner`)]),h=(0,t.computed)(()=>[f.e(`label`)]);return n({disabled:s.value,ref:l,size:o.size,variant:o.variant}),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.tag),(0,t.mergeProps)((0,t.unref)(c),{class:p.value,style:(0,t.unref)(d),onClick:(0,t.unref)(u)}),{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(m.value)},[n.$slots[`left-section`]?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,pe,[(0,t.renderSlot)(n.$slots,`left-section`)])):e.leftSection?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,me,[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.leftSection)))])):(0,t.createCommentVNode)(`v-if`,!0),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)(h.value)},[(0,t.renderSlot)(n.$slots,`default`)],2),n.$slots[`right-section`]?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,he,[(0,t.renderSlot)(n.$slots,`right-section`)])):e.rightSection?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ge,[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.rightSection)))])):(0,t.createCommentVNode)(`v-if`,!0)],2)]),_:3},16,[`class`,`style`,`onClick`]))}})),Z=V((0,t.defineComponent)({name:`CIcon`,inheritAttrs:!1,__name:`icon`,props:{size:{type:[Number,String],required:!1},color:{type:String,required:!1}},setup(e){let n=e,r=G(`icon`),i=(0,t.computed)(()=>{let{size:e,color:t}=n;return!e&&!t?{}:{fontSize:F(e)?void 0:R(e),"--color":t}});return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`i`,(0,t.mergeProps)({class:(0,t.unref)(r).b(),style:i.value},e.$attrs),[(0,t.renderSlot)(e.$slots,`default`)],16))}}));var _e=[X,Z],Q=[],$=r([..._e,...Q]);let ve=$.install;var ye=$;e.CButton=X,e.CIcon=Z,e.default=ye,e.install=ve,e.makeInstaller=r});
21
9
  //# sourceMappingURL=index.full.min.js.map