@pantograph/vue 0.25.1 → 0.25.3

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 (157) hide show
  1. package/dist/ActionButton/index.js +1 -1
  2. package/dist/ActionButton/index.umd.cjs +1 -1
  3. package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-BGrL1xRj.js → ActionButton.vue_vue_type_script_setup_true_lang-CMAU4Jot.js} +1 -1
  4. package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-CZTRz3hl.js → ActionButton.vue_vue_type_script_setup_true_lang-DBkXAjTl.js} +2 -2
  5. package/dist/Alert/index.js +1 -1
  6. package/dist/Alert/index.umd.cjs +1 -1
  7. package/dist/{Alert.vue_vue_type_style_index_0_lang-BdhEOwG7.js → Alert.vue_vue_type_style_index_0_lang-Cq-qsJt9.js} +1 -1
  8. package/dist/{Alert.vue_vue_type_style_index_0_lang-BNoDGnDR.js → Alert.vue_vue_type_style_index_0_lang-t5KBNR2O.js} +3 -3
  9. package/dist/Avatar/index.js +1 -1
  10. package/dist/Avatar/index.umd.cjs +1 -1
  11. package/dist/{Avatar.vue_vue_type_style_index_0_lang--OU5sgDR.js → Avatar.vue_vue_type_style_index_0_lang-BgD1ygnv.js} +3 -3
  12. package/dist/{Avatar.vue_vue_type_style_index_0_lang-YkXWR99l.js → Avatar.vue_vue_type_style_index_0_lang-D_26B5fC.js} +1 -1
  13. package/dist/AvatarGroup/index.js +1 -1
  14. package/dist/AvatarGroup/index.umd.cjs +1 -1
  15. package/dist/Badge/index.js +1 -1
  16. package/dist/Badge/index.umd.cjs +1 -1
  17. package/dist/{Badge.vue_vue_type_script_setup_true_lang-ov_fhvSB.js → Badge.vue_vue_type_script_setup_true_lang-Cj_qLGab.js} +2 -2
  18. package/dist/{Badge.vue_vue_type_script_setup_true_lang-BAQIKtam.js → Badge.vue_vue_type_script_setup_true_lang-DLIYFnk7.js} +1 -1
  19. package/dist/Base/BaseButton/BaseButton.d.ts +5 -5
  20. package/dist/BaseBadge.vue_vue_type_style_index_0_lang-D6KaVBcQ.js +1 -0
  21. package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-Cwko3Hlm.js → BaseBadge.vue_vue_type_style_index_0_lang-Dk4czjh8.js} +23 -22
  22. package/dist/BaseButton.vue_vue_type_style_index_0_lang-BaXVOcYh.js +208 -0
  23. package/dist/BaseButton.vue_vue_type_style_index_0_lang-CEI8TTwc.js +1 -0
  24. package/dist/Button/index.js +1 -1
  25. package/dist/Button/index.umd.cjs +1 -1
  26. package/dist/{Button.vue_vue_type_script_setup_true_lang-CYE9whgK.js → Button.vue_vue_type_script_setup_true_lang-BgHFlmkg.js} +2 -2
  27. package/dist/{Button.vue_vue_type_script_setup_true_lang-dyN0fBVx.js → Button.vue_vue_type_script_setup_true_lang-DQeV7jFJ.js} +1 -1
  28. package/dist/Checkbox/index.js +1 -1
  29. package/dist/{Checkbox.vue_vue_type_style_index_0_lang-B37LXBOT.js → Checkbox.vue_vue_type_style_index_0_lang-AH6hpVLK.js} +2 -2
  30. package/dist/CheckboxGroup/index.js +1 -1
  31. package/dist/Chip/index.js +2 -2
  32. package/dist/{Chip.vue_vue_type_style_index_0_lang-B8XnEjIk.js → Chip.vue_vue_type_style_index_0_lang-B8BunJEO.js} +2 -2
  33. package/dist/ChipGroup/index.js +1 -1
  34. package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-CYarh7Jx.js → ChipGroup.vue_vue_type_style_index_0_lang-YPrXCjP8.js} +2 -2
  35. package/dist/ColorPicker/index.js +1 -1
  36. package/dist/ColorPicker/index.umd.cjs +1 -1
  37. package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-BhznZQOS.js → ColorPicker.vue_vue_type_style_index_0_lang-CVMzIHWW.js} +3 -3
  38. package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-CYPF-q6f.js → ColorPicker.vue_vue_type_style_index_0_lang-RKbw-kXI.js} +1 -1
  39. package/dist/ColorSwatch/index.js +1 -1
  40. package/dist/ColorSwatch/index.umd.cjs +1 -1
  41. package/dist/{ColorSwatch-GhXGfFR9.js → ColorSwatch-Cg9gjo7T.js} +1 -1
  42. package/dist/{ColorSwatch-BRe9OLTq.js → ColorSwatch-WoFuVYS7.js} +1 -1
  43. package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-CXh-dgyg.js → ColorSwatch.vue_vue_type_style_index_0_lang-MMo80_Zm.js} +3 -3
  44. package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-BnpzS5m2.js → ColorSwatch.vue_vue_type_style_index_0_lang-j3uScCo0.js} +1 -1
  45. package/dist/ColorSwatchGroup/index.js +1 -1
  46. package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
  47. package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-DFUXE61f.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CGF7Y4Y3.js} +1 -1
  48. package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-DMWiKVRG.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DPd_kewe.js} +4 -4
  49. package/dist/ColorTrigger/index.js +1 -1
  50. package/dist/ColorTrigger/index.umd.cjs +1 -1
  51. package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-Cu8MO8RU.js → ColorTrigger.vue_vue_type_style_index_0_lang-CpumcGKV.js} +3 -3
  52. package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-nVzcYP7q.js → ColorTrigger.vue_vue_type_style_index_0_lang-Cz3225rF.js} +1 -1
  53. package/dist/Combobox/index.js +1 -1
  54. package/dist/Combobox/index.umd.cjs +1 -1
  55. package/dist/{Combobox.vue_vue_type_style_index_0_lang-BsO5vzLB.js → Combobox.vue_vue_type_style_index_0_lang-BXq6IyEH.js} +15 -15
  56. package/dist/{Combobox.vue_vue_type_style_index_0_lang-Dtf_JcyR.js → Combobox.vue_vue_type_style_index_0_lang-CSz_lsmn.js} +1 -1
  57. package/dist/Comment/CommentEditor.d.ts +8 -8
  58. package/dist/Comment/index.js +59 -61
  59. package/dist/Comment/index.umd.cjs +1 -1
  60. package/dist/DataTable/index.js +1 -1
  61. package/dist/DataTable/index.umd.cjs +1 -1
  62. package/dist/{DataTable.vue_vue_type_style_index_0_lang-rouccC9l.js → DataTable.vue_vue_type_style_index_0_lang-Ca0ss2zM.js} +1 -1
  63. package/dist/{DataTable.vue_vue_type_style_index_0_lang-DE97OF7f.js → DataTable.vue_vue_type_style_index_0_lang-Dtr04Y-v.js} +13 -13
  64. package/dist/DropZone/index.js +1 -1
  65. package/dist/DropZone/index.umd.cjs +1 -1
  66. package/dist/{DropZone.vue_vue_type_style_index_0_lang-gguAkRve.js → DropZone.vue_vue_type_style_index_0_lang-Cx_2fzcd.js} +23 -25
  67. package/dist/DropZone.vue_vue_type_style_index_0_lang-DN-rlB8g.js +1 -0
  68. package/dist/Empty/index.js +1 -1
  69. package/dist/{Empty.vue_vue_type_style_index_0_lang-YvYjr_zz.js → Empty.vue_vue_type_style_index_0_lang-Hb-71AW8.js} +1 -1
  70. package/dist/FloatButton/index.js +1 -1
  71. package/dist/FloatButton/index.umd.cjs +1 -1
  72. package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-BVJZNZm4.js → FloatButton.vue_vue_type_script_setup_true_lang-C5NrO5Nn.js} +1 -1
  73. package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Ck9ilRKa.js → FloatButton.vue_vue_type_script_setup_true_lang-Cug29gXO.js} +2 -2
  74. package/dist/Form/index.js +1 -1
  75. package/dist/GOPicker/index.js +1 -1
  76. package/dist/GOPicker/index.umd.cjs +1 -1
  77. package/dist/{GOPicker.vue_vue_type_style_index_0_lang-Bb05nUVP.js → GOPicker.vue_vue_type_style_index_0_lang-1_sYgaR8.js} +1 -1
  78. package/dist/{GOPicker.vue_vue_type_style_index_0_lang-D9A9w-Pa.js → GOPicker.vue_vue_type_style_index_0_lang-DFuk8Yxv.js} +11 -11
  79. package/dist/GraphicalObject/index.js +1 -1
  80. package/dist/GraphicalObject/index.umd.cjs +1 -1
  81. package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-EviuZ52W.js → GraphicalObject.vue_vue_type_script_setup_true_lang-CX1uOlz9.js} +1 -1
  82. package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-CEul2ZDZ.js → GraphicalObject.vue_vue_type_script_setup_true_lang-D6efb688.js} +3 -3
  83. package/dist/GraphicalObjectGroup/index.js +1 -1
  84. package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-lN6Gzj19.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DtfNCdZu.js} +2 -2
  85. package/dist/Icon/index.js +1 -1
  86. package/dist/{Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js → Icon.vue_vue_type_style_index_0_lang-D105BnRd.js} +3 -3
  87. package/dist/IconButton/index.js +1 -1
  88. package/dist/IconButton/index.umd.cjs +1 -1
  89. package/dist/{IconButton.vue_vue_type_script_setup_true_lang-BG-vYXAP.js → IconButton.vue_vue_type_script_setup_true_lang-DIVceNgM.js} +2 -2
  90. package/dist/{IconButton.vue_vue_type_script_setup_true_lang-DynLmo_n.js → IconButton.vue_vue_type_script_setup_true_lang-NJ4SCX2H.js} +1 -1
  91. package/dist/Image/index.js +1 -1
  92. package/dist/{Image.vue_vue_type_style_index_0_lang-Bzg_B3NK.js → Image.vue_vue_type_style_index_0_lang-S9KjdezV.js} +8 -8
  93. package/dist/IndentLevel/index.js +1 -1
  94. package/dist/IndentLevel/index.umd.cjs +1 -1
  95. package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-C7d2_3hI.js → IndentLevel.vue_vue_type_style_index_0_lang-CkNqK_Vg.js} +8 -8
  96. package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-CELNQ3jz.js → IndentLevel.vue_vue_type_style_index_0_lang-H35lJDqV.js} +1 -1
  97. package/dist/Indicator/index.js +1 -1
  98. package/dist/Indicator/index.umd.cjs +1 -1
  99. package/dist/{Indicator.vue_vue_type_script_setup_true_lang-DMYJ5Fn6.js → Indicator.vue_vue_type_script_setup_true_lang-Ca5Des7U.js} +2 -2
  100. package/dist/{Indicator.vue_vue_type_script_setup_true_lang-BQqMdFAx.js → Indicator.vue_vue_type_script_setup_true_lang-DaUZMDk0.js} +1 -1
  101. package/dist/Input/index.js +1 -1
  102. package/dist/{Input.vue_vue_type_style_index_0_lang-DkuxhdXR.js → Input.vue_vue_type_style_index_0_lang-DbW60HOk.js} +6 -6
  103. package/dist/Kbd/index.js +1 -1
  104. package/dist/{Kbd.vue_vue_type_style_index_0_lang-iUfSP9TC.js → Kbd.vue_vue_type_style_index_0_lang-Cm0Zvomv.js} +1 -1
  105. package/dist/Label/index.js +1 -1
  106. package/dist/Link/index.js +1 -1
  107. package/dist/{Link.vue_vue_type_style_index_0_lang-TePg8XgW.js → Link.vue_vue_type_style_index_0_lang-bdywEZns.js} +6 -6
  108. package/dist/Menu/index.js +1 -1
  109. package/dist/MenuItem/index.js +1 -1
  110. package/dist/{MenuItem.vue_vue_type_style_index_0_lang-D_lWThP0.js → MenuItem.vue_vue_type_style_index_0_lang-D-_-Iv3Y.js} +3 -3
  111. package/dist/Pagination/index.js +1 -1
  112. package/dist/Pagination/index.umd.cjs +1 -1
  113. package/dist/{Pagination.vue_vue_type_style_index_0_lang-D8oCaF6X.js → Pagination.vue_vue_type_style_index_0_lang-CJuRPdrW.js} +8 -8
  114. package/dist/{Pagination.vue_vue_type_style_index_0_lang-CDaeQOJb.js → Pagination.vue_vue_type_style_index_0_lang-CPREYXnR.js} +1 -1
  115. package/dist/Popover/index.js +1 -1
  116. package/dist/{Popover.vue_vue_type_style_index_0_lang-DLboppFN.js → Popover.vue_vue_type_style_index_0_lang-yKeicrWx.js} +1 -1
  117. package/dist/Progress/index.js +1 -1
  118. package/dist/{Progress.vue_vue_type_style_index_0_lang-BEHOwYFc.js → Progress.vue_vue_type_style_index_0_lang-Bm1S1Pxq.js} +2 -2
  119. package/dist/RadioGroup/index.js +1 -1
  120. package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-BEPTbeyN.js → RadioGroup.vue_vue_type_script_setup_true_lang-BLN5fJDu.js} +2 -2
  121. package/dist/ScrollContainer/index.js +1 -1
  122. package/dist/{ScrollContainer.vue_vue_type_style_index_0_lang-DqLbpFbD.js → ScrollContainer.vue_vue_type_style_index_0_lang-D8IR7pw-.js} +1 -1
  123. package/dist/Segmented/index.js +1 -1
  124. package/dist/{Segmented.vue_vue_type_style_index_0_lang-B52Fuc2U.js → Segmented.vue_vue_type_style_index_0_lang-ZsksAX8A.js} +1 -1
  125. package/dist/Select/index.js +1 -1
  126. package/dist/{Select.vue_vue_type_style_index_0_lang-NsFWEuv3.js → Select.vue_vue_type_style_index_0_lang-CxO4fB4g.js} +7 -7
  127. package/dist/Shortcut/index.js +1 -1
  128. package/dist/{Shortcut.vue_vue_type_style_index_0_lang-D0pRaguA.js → Shortcut.vue_vue_type_style_index_0_lang-DiJX8oyf.js} +2 -2
  129. package/dist/Spinner/index.js +1 -1
  130. package/dist/{Spinner.vue_vue_type_style_index_0_lang-Bx_MQ7lE.js → Spinner.vue_vue_type_style_index_0_lang-CRuHKobG.js} +1 -1
  131. package/dist/SubMenu/index.js +1 -1
  132. package/dist/Switch/index.js +1 -1
  133. package/dist/{Switch.vue_vue_type_style_index_0_lang-CnwcbtZs.js → Switch.vue_vue_type_style_index_0_lang-BKZRF7si.js} +2 -2
  134. package/dist/{THead.vue_vue_type_style_index_0_lang-BEFUWFjk.js → THead.vue_vue_type_style_index_0_lang-D-NEZbDq.js} +1 -1
  135. package/dist/Table/index.js +1 -1
  136. package/dist/Textarea/index.js +1 -1
  137. package/dist/{Textarea.vue_vue_type_style_index_0_lang-DPWaIFuD.js → Textarea.vue_vue_type_style_index_0_lang-DhnwRKGl.js} +17 -17
  138. package/dist/Tree/index.js +1 -1
  139. package/dist/Tree/index.umd.cjs +1 -1
  140. package/dist/{Tree.vue_vue_type_style_index_0_lang-ZoSOcaY2.js → Tree.vue_vue_type_style_index_0_lang-D97fT1Cb.js} +1 -1
  141. package/dist/{Tree.vue_vue_type_style_index_0_lang-Dh0qoB5W.js → Tree.vue_vue_type_style_index_0_lang-Des-7-p4.js} +5 -5
  142. package/dist/Upload/index.js +1 -1
  143. package/dist/Upload/index.umd.cjs +1 -1
  144. package/dist/{Upload.vue_vue_type_style_index_0_lang-DC0jVRjM.js → Upload.vue_vue_type_style_index_0_lang-B4BO8f6l.js} +6 -6
  145. package/dist/{Upload.vue_vue_type_style_index_0_lang-oVgy1020.js → Upload.vue_vue_type_style_index_0_lang-BjSXnPzK.js} +1 -1
  146. package/dist/index.js +44 -44
  147. package/dist/index.umd.cjs +1 -1
  148. package/dist/{sortBy-CUiSA46K.js → sortBy-DaKVLXDw.js} +1 -1
  149. package/dist/style/index.css +1 -1
  150. package/dist/{uniq-Bk9D4jYg.js → uniq-yfmxvZGr.js} +1 -1
  151. package/dist/{useInputDataStates-RRZVY4Vg.js → useInputDataStates-B78OFI-A.js} +1 -1
  152. package/dist/utils/index.js +2 -2
  153. package/package.json +2 -1
  154. package/dist/BaseBadge.vue_vue_type_style_index_0_lang-Clv4Io8O.js +0 -1
  155. package/dist/BaseButton.vue_vue_type_style_index_0_lang-Cc9byFK5.js +0 -1
  156. package/dist/BaseButton.vue_vue_type_style_index_0_lang-DV59KCrZ.js +0 -205
  157. package/dist/DropZone.vue_vue_type_style_index_0_lang-4zdO8B11.js +0 -1
@@ -3,8 +3,8 @@ import { g as z } from "./options-Bh1s18jm.js";
3
3
  import { getBemBlock as G, generateVariantClassList as c, normCls as P, getBemElement as S } from "@pantograph/utils";
4
4
  import { cva as k } from "class-variance-authority";
5
5
  import { B as b } from "./BaseBadge.model-CahZXsyM.js";
6
- import { m as E } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
7
- import { _ as N } from "./Popover.vue_vue_type_style_index_0_lang-DLboppFN.js";
6
+ import { m as E } from "./Icon.vue_vue_type_style_index_0_lang-D105BnRd.js";
7
+ import { _ as N } from "./Popover.vue_vue_type_style_index_0_lang-yKeicrWx.js";
8
8
  import { createContext as V } from "reka-ui";
9
9
  const W = ["xsm", "sm", "md"], H = [...b], [J, $] = V("ChipGroup"), K = /* @__PURE__ */ d({
10
10
  ...z("ChipGroup"),
@@ -1,4 +1,4 @@
1
- import { _ as r, _ as t, i, p as a } from "../ColorPicker.vue_vue_type_style_index_0_lang-BhznZQOS.js";
1
+ import { _ as r, _ as t, i, p as a } from "../ColorPicker.vue_vue_type_style_index_0_lang-CVMzIHWW.js";
2
2
  export {
3
3
  r as ColorPicker,
4
4
  t as default,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorPicker.vue_vue_type_style_index_0_lang-CYPF-q6f.js");exports.ColorPicker=e._sfc_main;exports.default=e._sfc_main;exports.injectColorPickerContext=e.injectColorPickerContext;exports.provideColorPickerContext=e.provideColorPickerContext;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorPicker.vue_vue_type_style_index_0_lang-RKbw-kXI.js");exports.ColorPicker=e._sfc_main;exports.default=e._sfc_main;exports.injectColorPickerContext=e.injectColorPickerContext;exports.provideColorPickerContext=e.provideColorPickerContext;
@@ -1,7 +1,7 @@
1
1
  import { onUnmounted as d0, defineComponent as zt, onMounted as Tt, onBeforeUnmount as c0, createElementBlock as Ce, openBlock as G, normalizeClass as Q, unref as _, createElementVNode as ae, ref as nn, computed as oe, watch as h0, reactive as p0, createVNode as Wn, createCommentVNode as Zn, createBlock as tn, Fragment as b0, renderList as m0 } from "vue";
2
- import { _ as g0 } from "./ActionButton.vue_vue_type_script_setup_true_lang-CZTRz3hl.js";
3
- import { _ as Un } from "./Input.vue_vue_type_style_index_0_lang-DkuxhdXR.js";
4
- import { u as Jn, k as x0 } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
2
+ import { _ as g0 } from "./ActionButton.vue_vue_type_script_setup_true_lang-DBkXAjTl.js";
3
+ import { _ as Un } from "./Input.vue_vue_type_style_index_0_lang-DbW60HOk.js";
4
+ import { u as Jn, k as x0 } from "./Icon.vue_vue_type_style_index_0_lang-D105BnRd.js";
5
5
  import { g as M0 } from "./options-Bh1s18jm.js";
6
6
  import { createContext as v0 } from "reka-ui";
7
7
  import { normCls as ge, getBemElement as xe, getBemBlock as y0, getBemModifier as Kn } from "@pantograph/utils";
@@ -1,4 +1,4 @@
1
- "use strict";const d=require("vue"),e0=require("./ActionButton.vue_vue_type_script_setup_true_lang-BGrL1xRj.js"),An=require("./Input.vue_vue_type_style_index_0_lang-DEQgofJ1.js"),Ue=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),n0=require("./options-CY2uxp5A.js"),t0=require("reka-ui"),I=require("@pantograph/utils");function me(e,n,t){return Math.max(n,Math.min(e,t))}function r0(e,n){if(typeof e=="string"||typeof n=="string")return e===n;if(e){if(!n)return!1;for(const t in e)if(e[t]!==n[t])return!1}return!0}function ve(e){const n=[],t=e.length>5?2:1;for(let r=1;r<e.length;r+=t){const o=e.substring(r,r+t).repeat(t%2+1),i=parseInt(o,16);n.push(r===3*t+1?i/255:i)}return n.length===3&&n.push(1),{r:n[0],g:n[1],b:n[2],a:n[3]}}function mt(e){const n=e.l/100,t=n+e.s/100*Math.min(n,1-n),r=t===0?0:200*(1-n/t);return{h:e.h,s:r,v:t*100,a:e.a}}function we(e){let n=e.h%360;n<0&&(n+=360);const t=e.s/100,r=e.l/100;return{r:Je(0,n,t,r)*255,g:Je(8,n,t,r)*255,b:Je(4,n,t,r)*255,a:e.a}}function Je(e,n,t,r){const o=(e+n/30)%12,i=t*Math.min(r,1-r);return r-i*Math.max(-1,Math.min(o-3,9-o,1))}function bt(e){const n=e.s/100,t=e.v/100,r=t*(1-n/2);return{h:e.h,s:r===0||r===1?0:(t-r)/Math.min(r,1-r)*100,l:r*100,a:e.a}}function gt(e){return{h:e.h,w:e.v*(100-e.s)/100,b:100-e.v,a:e.a}}function de(e){return we(bt(e))}function re(e){const n=e.w/100,t=e.b/100;let r,o;const i=n+t;return i>=1?(r=0,o=n/i):(o=1-t,r=(1-n/o)*100),{h:e.h,s:r,v:o*100,a:e.a}}function $e(e){const{r:n,g:t,b:r,a:o}=e,i=Math.min(n,t,r),a=Math.max(n,t,r),f=a-i,s=(a+i)/2;let h=0;f!==0&&(a===n?h=(t-r)/f+(t<r?6:0):a===t?h=(r-n)/f+2:a===r&&(h=(n-t)/f+4),h*=60);let b=0;return s!==0&&s!==255&&(b=(a-s)/Math.min(s,255-s)),{h,s:b*100,l:s/255*100,a:o}}function ye(e){return"#"+Object.values(e).map((n,t)=>Math.round(t===3?n*255:n).toString(16).padStart(2,"0")).join("")}function ce(e){return gt(mt($e(e)))}const o0={hex:{hex:e=>e,hsl:e=>$e(ve(e)),hsv:e=>re(ce(ve(e))),hwb:e=>ce(ve(e)),rgb:ve},hsl:{hex:e=>ye(we(e)),hsl:e=>e,hsv:mt,hwb:e=>ce(we(e)),rgb:we},hsv:{hex:e=>ye(de(e)),hsl:bt,hsv:e=>e,hwb:gt,rgb:de},hwb:{hex:e=>ye(de(re(e))),hsl:e=>$e(de(re(e))),hsv:re,hwb:e=>e,rgb:e=>de(re(e))},rgb:{hex:ye,hsl:$e,hsv:e=>re(ce(e)),hwb:ce,rgb:e=>e}};function On(e,n,t){return o0[e][n](t)}function i0(e,n){const t=e.toFixed(n);return t.includes(".")?t.replace(/\.?0+$/,""):t}const a0={deg:1,grad:.9,rad:180/Math.PI,turn:360},Te={from(e){return e.endsWith("%")?oe.from(e,{referenceValue:1}):O.from(e,{min:0,max:1})},to(e){return O.to(e)}},Bn={from(e){const n=e.match(/deg|g?rad|turn$/);if(n===null)return O.from(e);const t=n[0];return O.from(e.slice(0,-t.length))*a0[t]},to(e){return O.to(e)}},O={from(e,{min:n=Number.NEGATIVE_INFINITY,max:t=Number.POSITIVE_INFINITY}={}){return e.endsWith(".")?NaN:me(Number(e),n,t)},to(e){return i0(e,2)}},oe={from(e,{referenceValue:n=100,min:t=0,max:r=100}={}){return e.endsWith("%")?O.from(e.slice(0,-1),{min:t,max:r})*n/100:NaN},to(e){return O.to(e)+"%"}},Ke={from(e){return e.endsWith("%")?oe.from(e,{referenceValue:255}):O.from(e,{min:0,max:255})},to(e){return O.to(e)}},f0={hsl:{h:Bn,s:oe,l:oe},hwb:{h:Bn,w:oe,b:oe},rgb:{r:Ke,g:Ke,b:Ke}};function Ce(e,n){return f0[e][n]}function Ge({format:e,color:n},t){if(e==="hex")return t&&[5,9].includes(n.length)?n.substring(0,n.length-(n.length-1)/4):n;const r=Object.entries(n).slice(0,t?3:4).map(([o,i])=>{const a=o==="a"?Te:Ce(e,o);return(o==="a"?"/ ":"")+a.to(i)});return`${e}(${r.join(" ")})`}function xt(e){return/^#(?:(?:[A-F0-9]{2}){3,4}|[A-F0-9]{3,4})$/i.test(e)}function l0(e){return"r"in e?"rgb":"w"in e?"hwb":"v"in e?"hsv":"s"in e?"hsl":null}const jn={hsl:["h","s","l","a"],hwb:["h","w","b","a"],rgb:["r","g","b","a"]};function Fn(e){if(!e)return null;if(typeof e!="string"){const f=l0(e);return f===null?null:{format:f,color:e}}if(e.startsWith("#"))return xt(e)?{format:"hex",color:e}:null;if(!e.includes("(")&&typeof document<"u"){const f=document.createElement("canvas").getContext("2d");f.fillStyle=e;const s=f.fillStyle;return s==="#000000"&&e!=="black"?null:{format:"hex",color:s}}const[n,t]=e.split("("),r=n.substring(0,3);if(!(r in jn))return null;const o=t.replace(/[,/)]/g," ").replace(/\s+/g," ").trim().split(" ");o.length===3&&o.push("1");const i=jn[r],a=Object.fromEntries(i.map((f,s)=>{const h=f==="a"?Te:Ce(r,f);return[f,h.from(o[s])]}));return{format:r,color:a}}const Mt=(e,n)=>{if(typeof e=="number"){if(n===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(n===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(n===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(n===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},u0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},s0=e=>Mt(u0[e.toLowerCase()],6),d0=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,c0=e=>{let n;return(n=e.match(d0))?Mt(parseInt(n[1],16),n[1].length):void 0},Y="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",pe=`${Y}%`,Nn=`(?:${Y}%|${Y})`,h0=`(?:${Y}(deg|grad|rad|turn)|${Y})`,fe="\\s*,\\s*",p0=new RegExp(`^rgba?\\(\\s*${Y}${fe}${Y}${fe}${Y}\\s*(?:,\\s*${Nn}\\s*)?\\)$`),m0=new RegExp(`^rgba?\\(\\s*${pe}${fe}${pe}${fe}${pe}\\s*(?:,\\s*${Nn}\\s*)?\\)$`),b0=e=>{let n={mode:"rgb"},t;if(t=e.match(p0))t[1]!==void 0&&(n.r=t[1]/255),t[2]!==void 0&&(n.g=t[2]/255),t[3]!==void 0&&(n.b=t[3]/255);else if(t=e.match(m0))t[1]!==void 0&&(n.r=t[1]/100),t[2]!==void 0&&(n.g=t[2]/100),t[3]!==void 0&&(n.b=t[3]/100);else return;return t[4]!==void 0?n.alpha=Math.max(0,Math.min(1,t[4]/100)):t[5]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[5]))),n},g0=(e,n)=>e===void 0?void 0:typeof e!="object"?wt(e):e.mode!==void 0?e:n?{...e,mode:n}:void 0,vt=(e="rgb")=>n=>(n=g0(n,e))!==void 0?n.mode===e?n:q[n.mode][e]?q[n.mode][e](n):e==="rgb"?q[n.mode].rgb(n):q.rgb[e](q[n.mode].rgb(n)):void 0,q={},yt={},Ne=[],kt={},x0=e=>e,k=e=>(q[e.mode]={...q[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(n=>{q[n]||(q[n]={}),q[n][e.mode]=e.fromMode[n]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(n=>{if(e.ranges[n]===void 0&&(e.ranges[n]=[0,1]),!e.interpolate[n])throw new Error(`Missing interpolator for: ${n}`);typeof e.interpolate[n]=="function"&&(e.interpolate[n]={use:e.interpolate[n]}),e.interpolate[n].fixup||(e.interpolate[n].fixup=x0)}),yt[e.mode]=e,(e.parse||[]).forEach(n=>{v0(n,e.mode)}),vt(e.mode)),M0=e=>yt[e],v0=(e,n)=>{if(typeof e=="string"){if(!n)throw new Error("'mode' required when 'parser' is a string");kt[e]=n}else typeof e=="function"&&Ne.indexOf(e)<0&&Ne.push(e)},kn=/[^\x00-\x7F]|[a-zA-Z_]/,y0=/[^\x00-\x7F]|[-\w]/,l={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let m=0;function ke(e){let n=e[m],t=e[m+1];return n==="-"||n==="+"?/\d/.test(t)||t==="."&&/\d/.test(e[m+2]):n==="."?/\d/.test(t):/\d/.test(n)}function _n(e){if(m>=e.length)return!1;let n=e[m];if(kn.test(n))return!0;if(n==="-"){if(e.length-m<2)return!1;let t=e[m+1];return!!(t==="-"||kn.test(t))}return!1}const k0={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(e){let n="";if((e[m]==="-"||e[m]==="+")&&(n+=e[m++]),n+=_e(e),e[m]==="."&&/\d/.test(e[m+1])&&(n+=e[m++]+_e(e)),(e[m]==="e"||e[m]==="E")&&((e[m+1]==="-"||e[m+1]==="+")&&/\d/.test(e[m+2])?n+=e[m++]+e[m++]+_e(e):/\d/.test(e[m+1])&&(n+=e[m++]+_e(e))),_n(e)){let t=Pe(e);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:l.Hue,value:n*k0[t]}:void 0}return e[m]==="%"?(m++,{type:l.Percentage,value:+n}):{type:l.Number,value:+n}}function _e(e){let n="";for(;/\d/.test(e[m]);)n+=e[m++];return n}function Pe(e){let n="";for(;m<e.length&&y0.test(e[m]);)n+=e[m++];return n}function _0(e){let n=Pe(e);return e[m]==="("?(m++,{type:l.Function,value:n}):n==="none"?{type:l.None,value:void 0}:{type:l.Ident,value:n}}function w0(e=""){let n=e.trim(),t=[],r;for(m=0;m<n.length;){if(r=n[m++],r===`
1
+ "use strict";const d=require("vue"),e0=require("./ActionButton.vue_vue_type_script_setup_true_lang-CMAU4Jot.js"),An=require("./Input.vue_vue_type_style_index_0_lang-DEQgofJ1.js"),Ue=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),n0=require("./options-CY2uxp5A.js"),t0=require("reka-ui"),I=require("@pantograph/utils");function me(e,n,t){return Math.max(n,Math.min(e,t))}function r0(e,n){if(typeof e=="string"||typeof n=="string")return e===n;if(e){if(!n)return!1;for(const t in e)if(e[t]!==n[t])return!1}return!0}function ve(e){const n=[],t=e.length>5?2:1;for(let r=1;r<e.length;r+=t){const o=e.substring(r,r+t).repeat(t%2+1),i=parseInt(o,16);n.push(r===3*t+1?i/255:i)}return n.length===3&&n.push(1),{r:n[0],g:n[1],b:n[2],a:n[3]}}function mt(e){const n=e.l/100,t=n+e.s/100*Math.min(n,1-n),r=t===0?0:200*(1-n/t);return{h:e.h,s:r,v:t*100,a:e.a}}function we(e){let n=e.h%360;n<0&&(n+=360);const t=e.s/100,r=e.l/100;return{r:Je(0,n,t,r)*255,g:Je(8,n,t,r)*255,b:Je(4,n,t,r)*255,a:e.a}}function Je(e,n,t,r){const o=(e+n/30)%12,i=t*Math.min(r,1-r);return r-i*Math.max(-1,Math.min(o-3,9-o,1))}function bt(e){const n=e.s/100,t=e.v/100,r=t*(1-n/2);return{h:e.h,s:r===0||r===1?0:(t-r)/Math.min(r,1-r)*100,l:r*100,a:e.a}}function gt(e){return{h:e.h,w:e.v*(100-e.s)/100,b:100-e.v,a:e.a}}function de(e){return we(bt(e))}function re(e){const n=e.w/100,t=e.b/100;let r,o;const i=n+t;return i>=1?(r=0,o=n/i):(o=1-t,r=(1-n/o)*100),{h:e.h,s:r,v:o*100,a:e.a}}function $e(e){const{r:n,g:t,b:r,a:o}=e,i=Math.min(n,t,r),a=Math.max(n,t,r),f=a-i,s=(a+i)/2;let h=0;f!==0&&(a===n?h=(t-r)/f+(t<r?6:0):a===t?h=(r-n)/f+2:a===r&&(h=(n-t)/f+4),h*=60);let b=0;return s!==0&&s!==255&&(b=(a-s)/Math.min(s,255-s)),{h,s:b*100,l:s/255*100,a:o}}function ye(e){return"#"+Object.values(e).map((n,t)=>Math.round(t===3?n*255:n).toString(16).padStart(2,"0")).join("")}function ce(e){return gt(mt($e(e)))}const o0={hex:{hex:e=>e,hsl:e=>$e(ve(e)),hsv:e=>re(ce(ve(e))),hwb:e=>ce(ve(e)),rgb:ve},hsl:{hex:e=>ye(we(e)),hsl:e=>e,hsv:mt,hwb:e=>ce(we(e)),rgb:we},hsv:{hex:e=>ye(de(e)),hsl:bt,hsv:e=>e,hwb:gt,rgb:de},hwb:{hex:e=>ye(de(re(e))),hsl:e=>$e(de(re(e))),hsv:re,hwb:e=>e,rgb:e=>de(re(e))},rgb:{hex:ye,hsl:$e,hsv:e=>re(ce(e)),hwb:ce,rgb:e=>e}};function On(e,n,t){return o0[e][n](t)}function i0(e,n){const t=e.toFixed(n);return t.includes(".")?t.replace(/\.?0+$/,""):t}const a0={deg:1,grad:.9,rad:180/Math.PI,turn:360},Te={from(e){return e.endsWith("%")?oe.from(e,{referenceValue:1}):O.from(e,{min:0,max:1})},to(e){return O.to(e)}},Bn={from(e){const n=e.match(/deg|g?rad|turn$/);if(n===null)return O.from(e);const t=n[0];return O.from(e.slice(0,-t.length))*a0[t]},to(e){return O.to(e)}},O={from(e,{min:n=Number.NEGATIVE_INFINITY,max:t=Number.POSITIVE_INFINITY}={}){return e.endsWith(".")?NaN:me(Number(e),n,t)},to(e){return i0(e,2)}},oe={from(e,{referenceValue:n=100,min:t=0,max:r=100}={}){return e.endsWith("%")?O.from(e.slice(0,-1),{min:t,max:r})*n/100:NaN},to(e){return O.to(e)+"%"}},Ke={from(e){return e.endsWith("%")?oe.from(e,{referenceValue:255}):O.from(e,{min:0,max:255})},to(e){return O.to(e)}},f0={hsl:{h:Bn,s:oe,l:oe},hwb:{h:Bn,w:oe,b:oe},rgb:{r:Ke,g:Ke,b:Ke}};function Ce(e,n){return f0[e][n]}function Ge({format:e,color:n},t){if(e==="hex")return t&&[5,9].includes(n.length)?n.substring(0,n.length-(n.length-1)/4):n;const r=Object.entries(n).slice(0,t?3:4).map(([o,i])=>{const a=o==="a"?Te:Ce(e,o);return(o==="a"?"/ ":"")+a.to(i)});return`${e}(${r.join(" ")})`}function xt(e){return/^#(?:(?:[A-F0-9]{2}){3,4}|[A-F0-9]{3,4})$/i.test(e)}function l0(e){return"r"in e?"rgb":"w"in e?"hwb":"v"in e?"hsv":"s"in e?"hsl":null}const jn={hsl:["h","s","l","a"],hwb:["h","w","b","a"],rgb:["r","g","b","a"]};function Fn(e){if(!e)return null;if(typeof e!="string"){const f=l0(e);return f===null?null:{format:f,color:e}}if(e.startsWith("#"))return xt(e)?{format:"hex",color:e}:null;if(!e.includes("(")&&typeof document<"u"){const f=document.createElement("canvas").getContext("2d");f.fillStyle=e;const s=f.fillStyle;return s==="#000000"&&e!=="black"?null:{format:"hex",color:s}}const[n,t]=e.split("("),r=n.substring(0,3);if(!(r in jn))return null;const o=t.replace(/[,/)]/g," ").replace(/\s+/g," ").trim().split(" ");o.length===3&&o.push("1");const i=jn[r],a=Object.fromEntries(i.map((f,s)=>{const h=f==="a"?Te:Ce(r,f);return[f,h.from(o[s])]}));return{format:r,color:a}}const Mt=(e,n)=>{if(typeof e=="number"){if(n===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(n===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(n===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(n===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},u0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},s0=e=>Mt(u0[e.toLowerCase()],6),d0=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,c0=e=>{let n;return(n=e.match(d0))?Mt(parseInt(n[1],16),n[1].length):void 0},Y="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",pe=`${Y}%`,Nn=`(?:${Y}%|${Y})`,h0=`(?:${Y}(deg|grad|rad|turn)|${Y})`,fe="\\s*,\\s*",p0=new RegExp(`^rgba?\\(\\s*${Y}${fe}${Y}${fe}${Y}\\s*(?:,\\s*${Nn}\\s*)?\\)$`),m0=new RegExp(`^rgba?\\(\\s*${pe}${fe}${pe}${fe}${pe}\\s*(?:,\\s*${Nn}\\s*)?\\)$`),b0=e=>{let n={mode:"rgb"},t;if(t=e.match(p0))t[1]!==void 0&&(n.r=t[1]/255),t[2]!==void 0&&(n.g=t[2]/255),t[3]!==void 0&&(n.b=t[3]/255);else if(t=e.match(m0))t[1]!==void 0&&(n.r=t[1]/100),t[2]!==void 0&&(n.g=t[2]/100),t[3]!==void 0&&(n.b=t[3]/100);else return;return t[4]!==void 0?n.alpha=Math.max(0,Math.min(1,t[4]/100)):t[5]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[5]))),n},g0=(e,n)=>e===void 0?void 0:typeof e!="object"?wt(e):e.mode!==void 0?e:n?{...e,mode:n}:void 0,vt=(e="rgb")=>n=>(n=g0(n,e))!==void 0?n.mode===e?n:q[n.mode][e]?q[n.mode][e](n):e==="rgb"?q[n.mode].rgb(n):q.rgb[e](q[n.mode].rgb(n)):void 0,q={},yt={},Ne=[],kt={},x0=e=>e,k=e=>(q[e.mode]={...q[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(n=>{q[n]||(q[n]={}),q[n][e.mode]=e.fromMode[n]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(n=>{if(e.ranges[n]===void 0&&(e.ranges[n]=[0,1]),!e.interpolate[n])throw new Error(`Missing interpolator for: ${n}`);typeof e.interpolate[n]=="function"&&(e.interpolate[n]={use:e.interpolate[n]}),e.interpolate[n].fixup||(e.interpolate[n].fixup=x0)}),yt[e.mode]=e,(e.parse||[]).forEach(n=>{v0(n,e.mode)}),vt(e.mode)),M0=e=>yt[e],v0=(e,n)=>{if(typeof e=="string"){if(!n)throw new Error("'mode' required when 'parser' is a string");kt[e]=n}else typeof e=="function"&&Ne.indexOf(e)<0&&Ne.push(e)},kn=/[^\x00-\x7F]|[a-zA-Z_]/,y0=/[^\x00-\x7F]|[-\w]/,l={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let m=0;function ke(e){let n=e[m],t=e[m+1];return n==="-"||n==="+"?/\d/.test(t)||t==="."&&/\d/.test(e[m+2]):n==="."?/\d/.test(t):/\d/.test(n)}function _n(e){if(m>=e.length)return!1;let n=e[m];if(kn.test(n))return!0;if(n==="-"){if(e.length-m<2)return!1;let t=e[m+1];return!!(t==="-"||kn.test(t))}return!1}const k0={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(e){let n="";if((e[m]==="-"||e[m]==="+")&&(n+=e[m++]),n+=_e(e),e[m]==="."&&/\d/.test(e[m+1])&&(n+=e[m++]+_e(e)),(e[m]==="e"||e[m]==="E")&&((e[m+1]==="-"||e[m+1]==="+")&&/\d/.test(e[m+2])?n+=e[m++]+e[m++]+_e(e):/\d/.test(e[m+1])&&(n+=e[m++]+_e(e))),_n(e)){let t=Pe(e);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:l.Hue,value:n*k0[t]}:void 0}return e[m]==="%"?(m++,{type:l.Percentage,value:+n}):{type:l.Number,value:+n}}function _e(e){let n="";for(;/\d/.test(e[m]);)n+=e[m++];return n}function Pe(e){let n="";for(;m<e.length&&y0.test(e[m]);)n+=e[m++];return n}function _0(e){let n=Pe(e);return e[m]==="("?(m++,{type:l.Function,value:n}):n==="none"?{type:l.None,value:void 0}:{type:l.Ident,value:n}}function w0(e=""){let n=e.trim(),t=[],r;for(m=0;m<n.length;){if(r=n[m++],r===`
2
2
  `||r===" "||r===" "){for(;m<n.length&&(n[m]===`
3
3
  `||n[m]===" "||n[m]===" ");)m++;continue}if(r===",")return;if(r===")"){t.push({type:l.ParenClose});continue}if(r==="+"){if(m--,ke(n)){t.push(he(n));continue}return}if(r==="-"){if(m--,ke(n)){t.push(he(n));continue}if(_n(n)){t.push({type:l.Ident,value:Pe(n)});continue}return}if(r==="."){if(m--,ke(n)){t.push(he(n));continue}return}if(r==="/"){for(;m<n.length&&(n[m]===`
4
4
  `||n[m]===" "||n[m]===" ");)m++;let o;if(ke(n)&&(o=he(n),o.type!==l.Hue)){t.push({type:l.Alpha,value:o});continue}if(_n(n)&&Pe(n)==="none"){t.push({type:l.Alpha,value:{type:l.None,value:void 0}});continue}return}if(/\d/.test(r)){m--,t.push(he(n));continue}if(kn.test(r)){m--,t.push(_0(n));continue}return}return t}function $0(e){e._i=0;let n=e[e._i++];if(!n||n.type!==l.Function||n.value!=="color"||(n=e[e._i++],n.type!==l.Ident))return;const t=kt[n.value];if(!t)return;const r={mode:t},o=_t(e,!1);if(!o)return;const i=M0(t).channels;for(let a=0,f,s;a<i.length;a++)f=o[a],s=i[a],f.type!==l.None&&(r[s]=f.type===l.Number?f.value:f.value/100,s==="alpha"&&(r[s]=Math.max(0,Math.min(1,r[s]))));return r}function _t(e,n){const t=[];let r;for(;e._i<e.length;){if(r=e[e._i++],r.type===l.None||r.type===l.Number||r.type===l.Alpha||r.type===l.Percentage||n&&r.type===l.Hue){t.push(r);continue}if(r.type===l.ParenClose){if(e._i<e.length)return;continue}return}if(!(t.length<3||t.length>4)){if(t.length===4){if(t[3].type!==l.Alpha)return;t[3]=t[3].value}return t.length===3&&t.push({type:l.None,value:void 0}),t.every(o=>o.type!==l.Alpha)?t:void 0}}function z0(e,n){e._i=0;let t=e[e._i++];if(!t||t.type!==l.Function)return;let r=_t(e,n);if(r)return r.unshift(t.value),r}const wt=e=>{if(typeof e!="string")return;const n=w0(e),t=n?z0(n,!0):void 0;let r,o=0,i=Ne.length;for(;o<i;)if((r=Ne[o++](e,t))!==void 0)return r;return n?$0(n):void 0};function T0(e,n){if(!n||n[0]!=="rgb"&&n[0]!=="rgba")return;const t={mode:"rgb"},[,r,o,i,a]=n;if(!(r.type===l.Hue||o.type===l.Hue||i.type===l.Hue))return r.type!==l.None&&(t.r=r.type===l.Number?r.value/255:r.value/100),o.type!==l.None&&(t.g=o.type===l.Number?o.value/255:o.value/100),i.type!==l.None&&(t.b=i.type===l.Number?i.value/255:i.value/100),a.type!==l.None&&(t.alpha=Math.min(1,Math.max(0,a.type===l.Number?a.value:a.value/100))),t}const C0=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,N0=(e,n,t)=>e+t*(n-e),P0=e=>{let n=[];for(let t=0;t<e.length-1;t++){let r=e[t],o=e[t+1];r===void 0&&o===void 0?n.push(void 0):r!==void 0&&o!==void 0?n.push([r,o]):n.push(r!==void 0?[r,r]:[o,o])}return n},H0=e=>n=>{let t=P0(n);return r=>{let o=r*t.length,i=r>=1?t.length-1:Math.max(Math.floor(o),0),a=t[i];return a===void 0?void 0:e(a[0],a[1],o-i)}},u=H0(N0),C=e=>{let n=!1,t=e.map(r=>r!==void 0?(n=!0,r):1);return n?t:e},le={mode:"rgb",channels:["r","g","b","alpha"],parse:[T0,c0,b0,s0,C0,"srgb"],serialize:"srgb",interpolate:{r:u,g:u,b:u,alpha:{use:u,fixup:C}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Qe=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Dn=e=>{let n=Qe(e.r),t=Qe(e.g),r=Qe(e.b),o={mode:"xyz65",x:.5766690429101305*n+.1855582379065463*t+.1882286462349947*r,y:.297344975250536*n+.6273635662554661*t+.0752914584939979*r,z:.0270313613864123*n+.0706888525358272*t+.9913375368376386*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},en=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Yn=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o={mode:"a98",r:en(e*2.0415879038107465-n*.5650069742788597-.3447313507783297*t),g:en(e*-.9692436362808798+n*1.8759675015077206+.0415550574071756*t),b:en(e*.0134442806320312-n*.1183623922310184+1.0151749943912058*t)};return r!==void 0&&(o.alpha=r),o},nn=(e=0)=>{const n=Math.abs(e);return n<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((n+.055)/1.055,2.4)},ue=({r:e,g:n,b:t,alpha:r})=>{let o={mode:"lrgb",r:nn(e),g:nn(n),b:nn(t)};return r!==void 0&&(o.alpha=r),o},ee=e=>{let{r:n,g:t,b:r,alpha:o}=ue(e),i={mode:"xyz65",x:.4123907992659593*n+.357584339383878*t+.1804807884018343*r,y:.2126390058715102*n+.715168678767756*t+.0721923153607337*r,z:.0193308187155918*n+.119194779794626*t+.9505321522496607*r};return o!==void 0&&(i.alpha=o),i},tn=(e=0)=>{const n=Math.abs(e);return n>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(n,1/2.4)-.055):e*12.92},se=({r:e,g:n,b:t,alpha:r},o="rgb")=>{let i={mode:o,r:tn(e),g:tn(n),b:tn(t)};return r!==void 0&&(i.alpha=r),i},ne=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=se({r:e*3.2409699419045226-n*1.537383177570094-.4986107602930034*t,g:e*-.9692436362808796+n*1.8759675015077204+.0415550574071756*t,b:e*.0556300796969936-n*.2039769588889765+1.0569715142428784*t});return r!==void 0&&(o.alpha=r),o},R0={...le,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Yn(ee(e)),xyz65:Yn},toMode:{rgb:e=>ne(Dn(e)),xyz65:Dn}},H=e=>(e=e%360)<0?e+360:e,I0=(e,n)=>e.map((t,r,o)=>{if(t===void 0)return t;let i=H(t);return r===0||e[r-1]===void 0?i:n(i-H(o[r-1]))}).reduce((t,r)=>!t.length||r===void 0||t[t.length-1]===void 0?(t.push(r),t):(t.push(r+t[t.length-1]),t),[]),B=e=>I0(e,n=>Math.abs(n)<=180?n:n-360*Math.sign(n)),N=[-.14861,1.78277,-.29227,-.90649,1.97294,0],E0=Math.PI/180,S0=180/Math.PI;let Wn=N[3]*N[4],Zn=N[1]*N[4],Un=N[1]*N[2]-N[0]*N[3];const L0=({r:e,g:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=(Un*t+e*Wn-n*Zn)/(Un+Wn-Zn),i=t-o,a=(N[4]*(n-o)-N[2]*i)/N[3],f={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(i*i+a*a)/(N[4]*o*(1-o))};return f.s&&(f.h=Math.atan2(a,i)*S0-120),r!==void 0&&(f.alpha=r),f},q0=({h:e,s:n,l:t,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*E0,t===void 0&&(t=0);let i=n===void 0?0:n*t*(1-t),a=Math.cos(e),f=Math.sin(e);return o.r=t+i*(N[0]*a+N[1]*f),o.g=t+i*(N[2]*a+N[3]*f),o.b=t+i*(N[4]*a+N[5]*f),r!==void 0&&(o.alpha=r),o},Se=(e,n)=>{if(e.h===void 0||n.h===void 0||!e.s||!n.s)return 0;let t=H(e.h),r=H(n.h),o=Math.sin((r-t+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*n.s)*o},V0=(e,n)=>{if(e.h===void 0||n.h===void 0)return 0;let t=H(e.h),r=H(n.h);return Math.abs(r-t)>180?t-(r-360*Math.sign(r-t)):r-t},Le=(e,n)=>{if(e.h===void 0||n.h===void 0||!e.c||!n.c)return 0;let t=H(e.h),r=H(n.h),o=Math.sin((r-t+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*n.c)*o},j=e=>{let n=e.reduce((r,o)=>{if(o!==void 0){let i=o*Math.PI/180;r.sin+=Math.sin(i),r.cos+=Math.cos(i)}return r},{sin:0,cos:0}),t=Math.atan2(n.sin,n.cos)*180/Math.PI;return t<0?360+t:t},X0={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:L0},toMode:{rgb:q0},interpolate:{h:{use:u,fixup:B},s:u,l:u,alpha:{use:u,fixup:C}},difference:{h:Se},average:{h:j}},W=({l:e,a:n,b:t,alpha:r},o="lch")=>{n===void 0&&(n=0),t===void 0&&(t=0);let i=Math.sqrt(n*n+t*t),a={mode:o,l:e,c:i};return i&&(a.h=H(Math.atan2(t,n)*180/Math.PI)),r!==void 0&&(a.alpha=r),a},Z=({l:e,c:n,h:t,alpha:r},o="lab")=>{t===void 0&&(t=0);let i={mode:o,l:e,a:n?n*Math.cos(t/180*Math.PI):0,b:n?n*Math.sin(t/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},$t=Math.pow(29,3)/Math.pow(3,3),zt=Math.pow(6,3)/Math.pow(29,3),T={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},ae={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let rn=e=>Math.pow(e,3)>zt?Math.pow(e,3):(116*e-16)/$t;const Tt=({l:e,a:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=(e+16)/116,i=n/500+o,a=o-t/200,f={mode:"xyz65",x:rn(i)*ae.X,y:rn(o)*ae.Y,z:rn(a)*ae.Z};return r!==void 0&&(f.alpha=r),f},qe=e=>ne(Tt(e)),on=e=>e>zt?Math.cbrt(e):($t*e+16)/116,Ct=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=on(e/ae.X),i=on(n/ae.Y),a=on(t/ae.Z),f={mode:"lab65",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(f.alpha=r),f},Ve=e=>{let n=Ct(ee(e));return e.r===e.b&&e.b===e.g&&(n.a=n.b=0),n},He=1,Nt=1,be=26/180*Math.PI,Re=Math.cos(be),Ie=Math.sin(be),Pt=100/Math.log(139/100),wn=({l:e,c:n,h:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o={mode:"lab65",l:(Math.exp(e*He/Pt)-1)/.0039},i=(Math.exp(.0435*n*Nt*He)-1)/.075,a=i*Math.cos(t/180*Math.PI-be),f=i*Math.sin(t/180*Math.PI-be);return o.a=a*Re-f/.83*Ie,o.b=a*Ie+f/.83*Re,r!==void 0&&(o.alpha=r),o},$n=({l:e,a:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=n*Re+t*Ie,i=.83*(t*Re-n*Ie),a=Math.sqrt(o*o+i*i),f={mode:"dlch",l:Pt/He*Math.log(1+.0039*e),c:Math.log(1+.075*a)/(.0435*Nt*He)};return f.c&&(f.h=H((Math.atan2(i,o)+be)/Math.PI*180)),r!==void 0&&(f.alpha=r),f},Jn=e=>wn(W(e,"dlch")),Kn=e=>Z($n(e),"dlab"),A0={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Jn,rgb:e=>qe(Jn(e))},fromMode:{lab65:Kn,rgb:e=>Kn(Ve(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:u,a:u,b:u,alpha:{use:u,fixup:C}}},O0={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:wn,dlab:e=>Z(e,"dlab"),rgb:e=>qe(wn(e))},fromMode:{lab65:$n,dlab:e=>W(e,"dlch"),rgb:e=>$n(Ve(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:u,c:u,h:{use:u,fixup:B},alpha:{use:u,fixup:C}},difference:{h:Le},average:{h:j}};function B0({h:e,s:n,i:t,alpha:r}){e=H(e!==void 0?e:0),n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:t*(1+n*(3/(2-o)-1)),g:t*(1+n*(3*(1-o)/(2-o)-1)),b:t*(1-n)};break;case 1:i={r:t*(1+n*(3*(1-o)/(2-o)-1)),g:t*(1+n*(3/(2-o)-1)),b:t*(1-n)};break;case 2:i={r:t*(1-n),g:t*(1+n*(3/(2-o)-1)),b:t*(1+n*(3*(1-o)/(2-o)-1))};break;case 3:i={r:t*(1-n),g:t*(1+n*(3*(1-o)/(2-o)-1)),b:t*(1+n*(3/(2-o)-1))};break;case 4:i={r:t*(1+n*(3*(1-o)/(2-o)-1)),g:t*(1-n),b:t*(1+n*(3/(2-o)-1))};break;case 5:i={r:t*(1+n*(3/(2-o)-1)),g:t*(1-n),b:t*(1+n*(3*(1-o)/(2-o)-1))};break;default:i={r:t*(1-n),g:t*(1-n),b:t*(1-n)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function j0({r:e,g:n,b:t,alpha:r}){e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.max(e,n,t),i=Math.min(e,n,t),a={mode:"hsi",s:e+n+t===0?0:1-3*i/(e+n+t),i:(e+n+t)/3};return o-i!==0&&(a.h=(o===e?(n-t)/(o-i)+(n<t)*6:o===n?(t-e)/(o-i)+2:(e-n)/(o-i)+4)*60),r!==void 0&&(a.alpha=r),a}const F0={mode:"hsi",toMode:{rgb:B0},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:j0},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:u,fixup:B},s:u,i:u,alpha:{use:u,fixup:C}},difference:{h:Se},average:{h:j}};function D0({h:e,s:n,l:t,alpha:r}){e=H(e!==void 0?e:0),n===void 0&&(n=0),t===void 0&&(t=0);let o=t+n*(t<.5?t:1-t),i=o-(o-t)*2*Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:o,g:i,b:2*t-o};break;case 1:a={r:i,g:o,b:2*t-o};break;case 2:a={r:2*t-o,g:o,b:i};break;case 3:a={r:2*t-o,g:i,b:o};break;case 4:a={r:i,g:2*t-o,b:o};break;case 5:a={r:o,g:2*t-o,b:i};break;default:a={r:2*t-o,g:2*t-o,b:2*t-o}}return a.mode="rgb",r!==void 0&&(a.alpha=r),a}function Y0({r:e,g:n,b:t,alpha:r}){e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.max(e,n,t),i=Math.min(e,n,t),a={mode:"hsl",s:o===i?0:(o-i)/(1-Math.abs(o+i-1)),l:.5*(o+i)};return o-i!==0&&(a.h=(o===e?(n-t)/(o-i)+(n<t)*6:o===n?(t-e)/(o-i)+2:(e-n)/(o-i)+4)*60),r!==void 0&&(a.alpha=r),a}const W0=(e,n)=>{switch(n){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Z0=new RegExp(`^hsla?\\(\\s*${h0}${fe}${pe}${fe}${pe}\\s*(?:,\\s*${Nn}\\s*)?\\)$`),U0=e=>{let n=e.match(Z0);if(!n)return;let t={mode:"hsl"};return n[3]!==void 0?t.h=+n[3]:n[1]!==void 0&&n[2]!==void 0&&(t.h=W0(n[1],n[2])),n[4]!==void 0&&(t.s=Math.min(Math.max(0,n[4]/100),1)),n[5]!==void 0&&(t.l=Math.min(Math.max(0,n[5]/100),1)),n[6]!==void 0?t.alpha=Math.max(0,Math.min(1,n[6]/100)):n[7]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[7]))),t};function J0(e,n){if(!n||n[0]!=="hsl"&&n[0]!=="hsla")return;const t={mode:"hsl"},[,r,o,i,a]=n;if(r.type!==l.None){if(r.type===l.Percentage)return;t.h=r.value}if(o.type!==l.None){if(o.type===l.Hue)return;t.s=o.value/100}if(i.type!==l.None){if(i.type===l.Hue)return;t.l=i.value/100}return a.type!==l.None&&(t.alpha=Math.min(1,Math.max(0,a.type===l.Number?a.value:a.value/100))),t}const Ht={mode:"hsl",toMode:{rgb:D0},fromMode:{rgb:Y0},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[J0,U0],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:u,fixup:B},s:u,l:u,alpha:{use:u,fixup:C}},difference:{h:Se},average:{h:j}};function Rt({h:e,s:n,v:t,alpha:r}){e=H(e!==void 0?e:0),n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:t,g:t*(1-n*o),b:t*(1-n)};break;case 1:i={r:t*(1-n*o),g:t,b:t*(1-n)};break;case 2:i={r:t*(1-n),g:t,b:t*(1-n*o)};break;case 3:i={r:t*(1-n),g:t*(1-n*o),b:t};break;case 4:i={r:t*(1-n*o),g:t*(1-n),b:t};break;case 5:i={r:t,g:t*(1-n),b:t*(1-n*o)};break;default:i={r:t*(1-n),g:t*(1-n),b:t*(1-n)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function It({r:e,g:n,b:t,alpha:r}){e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.max(e,n,t),i=Math.min(e,n,t),a={mode:"hsv",s:o===0?0:1-i/o,v:o};return o-i!==0&&(a.h=(o===e?(n-t)/(o-i)+(n<t)*6:o===n?(t-e)/(o-i)+2:(e-n)/(o-i)+4)*60),r!==void 0&&(a.alpha=r),a}const Et={mode:"hsv",toMode:{rgb:Rt},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:It},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:u,fixup:B},s:u,v:u,alpha:{use:u,fixup:C}},difference:{h:Se},average:{h:j}};function K0({h:e,w:n,b:t,alpha:r}){if(n===void 0&&(n=0),t===void 0&&(t=0),n+t>1){let o=n+t;n/=o,t/=o}return Rt({h:e,s:t===1?1:1-n/(1-t),v:1-t,alpha:r})}function G0(e){let n=It(e);if(n===void 0)return;let t=n.s!==void 0?n.s:0,r=n.v!==void 0?n.v:0,o={mode:"hwb",w:(1-t)*r,b:1-r};return n.h!==void 0&&(o.h=n.h),n.alpha!==void 0&&(o.alpha=n.alpha),o}function Q0(e,n){if(!n||n[0]!=="hwb")return;const t={mode:"hwb"},[,r,o,i,a]=n;if(r.type!==l.None){if(r.type===l.Percentage)return;t.h=r.value}if(o.type!==l.None){if(o.type===l.Hue)return;t.w=o.value/100}if(i.type!==l.None){if(i.type===l.Hue)return;t.b=i.value/100}return a.type!==l.None&&(t.alpha=Math.min(1,Math.max(0,a.type===l.Number?a.value:a.value/100))),t}const er={mode:"hwb",toMode:{rgb:K0},fromMode:{rgb:G0},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Q0],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:u,fixup:B},w:u,b:u,alpha:{use:u,fixup:C}},difference:{h:V0},average:{h:j}},St=203,Xe=.1593017578125,Lt=78.84375,Ae=.8359375,Oe=18.8515625,Be=18.6875;function an(e){if(e<0)return 0;const n=Math.pow(e,1/Lt);return 1e4*Math.pow(Math.max(0,n-Ae)/(Oe-Be*n),1/Xe)}function fn(e){if(e<0)return 0;const n=Math.pow(e/1e4,Xe);return Math.pow((Ae+Oe*n)/(1+Be*n),Lt)}const ln=e=>Math.max(e/St,0),Gn=({i:e,t:n,p:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);const o=an(e+.008609037037932761*n+.11102962500302593*t),i=an(e-.00860903703793275*n-.11102962500302599*t),a=an(e+.5600313357106791*n-.32062717498731885*t),f={mode:"xyz65",x:ln(2.070152218389422*o-1.3263473389671556*i+.2066510476294051*a),y:ln(.3647385209748074*o+.680566024947227*i-.0453045459220346*a),z:ln(-.049747207535812*o-.0492609666966138*i+1.1880659249923042*a)};return r!==void 0&&(f.alpha=r),f},un=(e=0)=>Math.max(e*St,0),Qn=({x:e,y:n,z:t,alpha:r})=>{const o=un(e),i=un(n),a=un(t),f=fn(.3592832590121217*o+.6976051147779502*i-.0358915932320289*a),s=fn(-.1920808463704995*o+1.1004767970374323*i+.0753748658519118*a),h=fn(.0070797844607477*o+.0748396662186366*i+.8433265453898765*a),b=.5*f+.5*s,c=1.61376953125*f-3.323486328125*s+1.709716796875*h,g=4.378173828125*f-4.24560546875*s-.132568359375*h,v={mode:"itp",i:b,t:c,p:g};return r!==void 0&&(v.alpha=r),v},nr={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Gn,rgb:e=>ne(Gn(e))},fromMode:{xyz65:Qn,rgb:e=>Qn(ee(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:u,t:u,p:u,alpha:{use:u,fixup:C}}},tr=134.03437499999998,rr=16295499532821565e-27,sn=e=>{if(e<0)return 0;let n=Math.pow(e/1e4,Xe);return Math.pow((Ae+Oe*n)/(1+Be*n),tr)},dn=(e=0)=>Math.max(e*203,0),qt=({x:e,y:n,z:t,alpha:r})=>{e=dn(e),n=dn(n),t=dn(t);let o=1.15*e-.15*t,i=.66*n+.34*e,a=sn(.41478972*o+.579999*i+.014648*t),f=sn(-.20151*o+1.120649*i+.0531008*t),s=sn(-.0166008*o+.2648*i+.6684799*t),h=(a+f)/2,b={mode:"jab",j:.44*h/(1-.56*h)-rr,a:3.524*a-4.066708*f+.542708*s,b:.199076*a+1.096799*f-1.295875*s};return r!==void 0&&(b.alpha=r),b},or=134.03437499999998,et=16295499532821565e-27,cn=e=>{if(e<0)return 0;let n=Math.pow(e,1/or);return 1e4*Math.pow((Ae-n)/(Be*n-Oe),1/Xe)},hn=e=>e/203,Vt=({j:e,a:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=(e+et)/(.44+.56*(e+et)),i=cn(o+.13860504*n+.058047316*t),a=cn(o-.13860504*n-.058047316*t),f=cn(o-.096019242*n-.8118919*t),s={mode:"xyz65",x:hn(1.661373024652174*i-.914523081304348*a+.23136208173913045*f),y:hn(-.3250758611844533*i+1.571847026732543*a-.21825383453227928*f),z:hn(-.090982811*i-.31272829*a+1.5227666*f)};return r!==void 0&&(s.alpha=r),s},Xt=e=>{let n=qt(ee(e));return e.r===e.b&&e.b===e.g&&(n.a=n.b=0),n},At=e=>ne(Vt(e)),ir={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Xt,xyz65:qt},toMode:{rgb:At,xyz65:Vt},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:u,a:u,b:u,alpha:{use:u,fixup:C}}},nt=({j:e,a:n,b:t,alpha:r})=>{n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.sqrt(n*n+t*t),i={mode:"jch",j:e,c:o};return o&&(i.h=H(Math.atan2(t,n)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},tt=({j:e,c:n,h:t,alpha:r})=>{t===void 0&&(t=0);let o={mode:"jab",j:e,a:n?n*Math.cos(t/180*Math.PI):0,b:n?n*Math.sin(t/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},ar={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:tt,rgb:e=>At(tt(e))},fromMode:{rgb:e=>nt(Xt(e)),jab:nt},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:u,fixup:B},c:u,j:u,alpha:{use:u,fixup:C}},difference:{h:Le},average:{h:j}},je=Math.pow(29,3)/Math.pow(3,3),Pn=Math.pow(6,3)/Math.pow(29,3);let pn=e=>Math.pow(e,3)>Pn?Math.pow(e,3):(116*e-16)/je;const Hn=({l:e,a:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=(e+16)/116,i=n/500+o,a=o-t/200,f={mode:"xyz50",x:pn(i)*T.X,y:pn(o)*T.Y,z:pn(a)*T.Z};return r!==void 0&&(f.alpha=r),f},ge=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=se({r:e*3.1341359569958707-n*1.6173863321612538-.4906619460083532*t,g:e*-.978795502912089+n*1.916254567259524+.03344273116131949*t,b:e*.07195537988411677-n*.2289768264158322+1.405386058324125*t});return r!==void 0&&(o.alpha=r),o},Ot=e=>ge(Hn(e)),xe=e=>{let{r:n,g:t,b:r,alpha:o}=ue(e),i={mode:"xyz50",x:.436065742824811*n+.3851514688337912*t+.14307845442264197*r,y:.22249319175623702*n+.7168870538238823*t+.06061979053616537*r,z:.013923904500943465*n+.09708128566574634*t+.7140993584005155*r};return o!==void 0&&(i.alpha=o),i},mn=e=>e>Pn?Math.cbrt(e):(je*e+16)/116,Rn=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=mn(e/T.X),i=mn(n/T.Y),a=mn(t/T.Z),f={mode:"lab",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(f.alpha=r),f},Bt=e=>{let n=Rn(xe(e));return e.r===e.b&&e.b===e.g&&(n.a=n.b=0),n};function fr(e,n){if(!n||n[0]!=="lab")return;const t={mode:"lab"},[,r,o,i,a]=n;if(!(r.type===l.Hue||o.type===l.Hue||i.type===l.Hue))return r.type!==l.None&&(t.l=Math.min(Math.max(0,r.value),100)),o.type!==l.None&&(t.a=o.type===l.Number?o.value:o.value*125/100),i.type!==l.None&&(t.b=i.type===l.Number?i.value:i.value*125/100),a.type!==l.None&&(t.alpha=Math.min(1,Math.max(0,a.type===l.Number?a.value:a.value/100))),t}const In={mode:"lab",toMode:{xyz50:Hn,rgb:Ot},fromMode:{xyz50:Rn,rgb:Bt},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[fr],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:u,a:u,b:u,alpha:{use:u,fixup:C}}},lr={...In,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Tt,rgb:qe},fromMode:{xyz65:Ct,rgb:Ve},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}};function ur(e,n){if(!n||n[0]!=="lch")return;const t={mode:"lch"},[,r,o,i,a]=n;if(r.type!==l.None){if(r.type===l.Hue)return;t.l=Math.min(Math.max(0,r.value),100)}if(o.type!==l.None&&(t.c=Math.max(0,o.type===l.Number?o.value:o.value*150/100)),i.type!==l.None){if(i.type===l.Percentage)return;t.h=i.value}return a.type!==l.None&&(t.alpha=Math.min(1,Math.max(0,a.type===l.Number?a.value:a.value/100))),t}const En={mode:"lch",toMode:{lab:Z,rgb:e=>Ot(Z(e))},fromMode:{rgb:e=>W(Bt(e)),lab:W},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[ur],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:u,fixup:B},c:u,l:u,alpha:{use:u,fixup:C}},difference:{h:Le},average:{h:j}},sr={...En,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Z(e,"lab65"),rgb:e=>qe(Z(e,"lab65"))},fromMode:{rgb:e=>W(Ve(e),"lch65"),lab65:e=>W(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},jt=({l:e,u:n,v:t,alpha:r})=>{n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.sqrt(n*n+t*t),i={mode:"lchuv",l:e,c:o};return o&&(i.h=H(Math.atan2(t,n)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},Ft=({l:e,c:n,h:t,alpha:r})=>{t===void 0&&(t=0);let o={mode:"luv",l:e,u:n?n*Math.cos(t/180*Math.PI):0,v:n?n*Math.sin(t/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},Dt=(e,n,t)=>4*e/(e+15*n+3*t),Yt=(e,n,t)=>9*n/(e+15*n+3*t),dr=Dt(T.X,T.Y,T.Z),cr=Yt(T.X,T.Y,T.Z),hr=e=>e<=Pn?je*e:116*Math.cbrt(e)-16,zn=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=hr(n/T.Y),i=Dt(e,n,t),a=Yt(e,n,t);!isFinite(i)||!isFinite(a)?o=i=a=0:(i=13*o*(i-dr),a=13*o*(a-cr));let f={mode:"luv",l:o,u:i,v:a};return r!==void 0&&(f.alpha=r),f},pr=(e,n,t)=>4*e/(e+15*n+3*t),mr=(e,n,t)=>9*n/(e+15*n+3*t),br=pr(T.X,T.Y,T.Z),gr=mr(T.X,T.Y,T.Z),Tn=({l:e,u:n,v:t,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};n===void 0&&(n=0),t===void 0&&(t=0);let o=n/(13*e)+br,i=t/(13*e)+gr,a=T.Y*(e<=8?e/je:Math.pow((e+16)/116,3)),f=a*(9*o)/(4*i),s=a*(12-3*o-20*i)/(4*i),h={mode:"xyz50",x:f,y:a,z:s};return r!==void 0&&(h.alpha=r),h},xr=e=>jt(zn(xe(e))),Mr=e=>ge(Tn(Ft(e))),vr={mode:"lchuv",toMode:{luv:Ft,rgb:Mr},fromMode:{rgb:xr,luv:jt},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:u,fixup:B},c:u,l:u,alpha:{use:u,fixup:C}},difference:{h:Le},average:{h:j}},yr={...le,mode:"lrgb",toMode:{rgb:se},fromMode:{rgb:ue},parse:["srgb-linear"],serialize:"srgb-linear"},kr={mode:"luv",toMode:{xyz50:Tn,rgb:e=>ge(Tn(e))},fromMode:{xyz50:zn,rgb:e=>zn(xe(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:u,u,v:u,alpha:{use:u,fixup:C}}},Wt=({r:e,g:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.cbrt(.412221469470763*e+.5363325372617348*n+.0514459932675022*t),i=Math.cbrt(.2119034958178252*e+.6806995506452344*n+.1073969535369406*t),a=Math.cbrt(.0883024591900564*e+.2817188391361215*n+.6299787016738222*t),f={mode:"oklab",l:.210454268309314*o+.7936177747023054*i-.0040720430116193*a,a:1.9779985324311684*o-2.42859224204858*i+.450593709617411*a,b:.0259040424655478*o+.7827717124575296*i-.8086757549230774*a};return r!==void 0&&(f.alpha=r),f},Fe=e=>{let n=Wt(ue(e));return e.r===e.b&&e.b===e.g&&(n.a=n.b=0),n},Me=({l:e,a:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=Math.pow(e+.3963377773761749*n+.2158037573099136*t,3),i=Math.pow(e-.1055613458156586*n-.0638541728258133*t,3),a=Math.pow(e-.0894841775298119*n-1.2914855480194092*t,3),f={mode:"lrgb",r:4.076741636075957*o-3.3077115392580616*i+.2309699031821044*a,g:-1.2684379732850317*o+2.6097573492876887*i-.3413193760026573*a,b:-.0041960761386756*o-.7034186179359362*i+1.7076146940746117*a};return r!==void 0&&(f.alpha=r),f},De=e=>se(Me(e));function Cn(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function Ee(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function _r(e,n){let t,r,o,i,a,f,s,h;-1.88170328*e-.80936493*n>1?(t=1.19086277,r=1.76576728,o=.59662641,i=.75515197,a=.56771245,f=4.0767416621,s=-3.3077115913,h=.2309699292):1.81444104*e-1.19445276*n>1?(t=.73956515,r=-.45954404,o=.08285427,i=.1254107,a=.14503204,f=-1.2684380046,s=2.6097574011,h=-.3413193965):(t=1.35733652,r=-.00915799,o=-1.1513021,i=-.50559606,a=.00692167,f=-.0041960863,s=-.7034186147,h=1.707614701);let b=t+r*e+o*n+i*e*e+a*e*n,c=.3963377774*e+.2158037573*n,g=-.1055613458*e-.0638541728*n,v=-.0894841775*e-1.291485548*n;{let _=1+b*c,w=1+b*g,$=1+b*v,P=_*_*_,M=w*w*w,R=$*$*$,V=3*c*_*_,U=3*g*w*w,F=3*v*$*$,J=6*c*c*_,K=6*g*g*w,G=6*v*v*$,X=f*P+s*M+h*R,A=f*V+s*U+h*F,S=f*J+s*K+h*G;b=b-X*A/(A*A-.5*X*S)}return b}function Sn(e,n){let t=_r(e,n),r=Me({l:1,a:t*e,b:t*n}),o=Math.cbrt(1/Math.max(r.r,r.g,r.b)),i=o*t;return[o,i]}function wr(e,n,t,r,o,i=null){i||(i=Sn(e,n));let a;if((t-o)*i[1]-(i[0]-o)*r<=0)a=i[1]*o/(r*i[0]+i[1]*(o-t));else{a=i[1]*(o-1)/(r*(i[0]-1)+i[1]*(o-t));{let f=t-o,s=r,h=.3963377774*e+.2158037573*n,b=-.1055613458*e-.0638541728*n,c=-.0894841775*e-1.291485548*n,g=f+s*h,v=f+s*b,_=f+s*c;{let w=o*(1-a)+a*t,$=a*r,P=w+$*h,M=w+$*b,R=w+$*c,V=P*P*P,U=M*M*M,F=R*R*R,J=3*g*P*P,K=3*v*M*M,G=3*_*R*R,X=6*g*g*P,A=6*v*v*M,S=6*_*_*R,y=4.0767416621*V-3.3077115913*U+.2309699292*F-1,p=4.0767416621*J-3.3077115913*K+.2309699292*G,x=4.0767416621*X-3.3077115913*A+.2309699292*S,z=p/(p*p-.5*y*x),E=-y*z,L=-1.2684380046*V+2.6097574011*U-.3413193965*F-1,te=-1.2684380046*J+2.6097574011*K-.3413193965*G,D=-1.2684380046*X+2.6097574011*A-.3413193965*S,qn=te/(te*te-.5*L*D),Ye=-L*qn,Vn=-.0041960863*V-.7034186147*U+1.707614701*F-1,We=-.0041960863*J-.7034186147*K+1.707614701*G,Qt=-.0041960863*X-.7034186147*A+1.707614701*S,Xn=We/(We*We-.5*Vn*Qt),Ze=-Vn*Xn;E=z>=0?E:1e6,Ye=qn>=0?Ye:1e6,Ze=Xn>=0?Ze:1e6,a+=Math.min(E,Math.min(Ye,Ze))}}}return a}function Ln(e,n,t=null){t||(t=Sn(e,n));let r=t[0],o=t[1];return[o/r,o/(1-r)]}function Zt(e,n,t){let r=Sn(n,t),o=wr(n,t,e,1,e,r),i=Ln(n,t,r),a=.11516993+1/(7.4477897+4.1590124*t+n*(-2.19557347+1.75198401*t+n*(-2.13704948-10.02301043*t+n*(-4.24894561+5.38770819*t+4.69891013*n)))),f=.11239642+1/(1.6132032-.68124379*t+n*(.40370612+.90148123*t+n*(-.27087943+.6122399*t+n*(.00299215-.45399568*t-.14661872*n)))),s=o/Math.min(e*i[0],(1-e)*i[1]),h=e*a,b=(1-e)*f,c=.9*s*Math.sqrt(Math.sqrt(1/(1/(h*h*h*h)+1/(b*b*b*b))));return h=e*.4,b=(1-e)*.8,[Math.sqrt(1/(1/(h*h)+1/(b*b))),c,o]}function rt(e){const n=e.l!==void 0?e.l:0,t=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Cn(n)};e.alpha!==void 0&&(o.alpha=e.alpha);let i=Math.sqrt(t*t+r*r);if(!i)return o.s=0,o;let[a,f,s]=Zt(n,t/i,r/i),h;if(i<f){let b=0,c=.8*a,g=1-c/f;h=(i-b)/(c+g*(i-b))*.8}else{let b=f,c=.2*f*f*1.25*1.25/a,g=1-c/(s-f);h=.8+.2*((i-b)/(c+g*(i-b)))}return h&&(o.s=h,o.h=H(Math.atan2(r,t)*180/Math.PI)),o}function ot(e){let n=e.h!==void 0?e.h:0,t=e.s!==void 0?e.s:0,r=e.l!==void 0?e.l:0;const o={mode:"oklab",l:Ee(r)};if(e.alpha!==void 0&&(o.alpha=e.alpha),!t||r===1)return o.a=o.b=0,o;let i=Math.cos(n/180*Math.PI),a=Math.sin(n/180*Math.PI),[f,s,h]=Zt(o.l,i,a),b,c,g,v;t<.8?(b=1.25*t,c=0,g=.8*f,v=1-g/s):(b=5*(t-.8),c=s,g=.2*s*s*1.25*1.25/f,v=1-g/(h-s));let _=c+b*g/(1-v*b);return o.a=_*i,o.b=_*a,o}const $r={...Ht,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:rt,rgb:e=>rt(Fe(e))},toMode:{oklab:ot,rgb:e=>De(ot(e))}};function it(e){let n=e.l!==void 0?e.l:0,t=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,o=Math.sqrt(t*t+r*r),i=o?t/o:1,a=o?r/o:1,[f,s]=Ln(i,a),h=.5,b=1-h/f,c=s/(o+n*s),g=c*n,v=c*o,_=Ee(g),w=v*_/g,$=Me({l:_,a:i*w,b:a*w}),P=Math.cbrt(1/Math.max($.r,$.g,$.b,0));n=n/P,o=o/P*Cn(n)/n,n=Cn(n);const M={mode:"okhsv",s:o?(h+s)*v/(s*h+s*b*v):0,v:n?n/g:0};return M.s&&(M.h=H(Math.atan2(r,t)*180/Math.PI)),e.alpha!==void 0&&(M.alpha=e.alpha),M}function at(e){const n={mode:"oklab"};e.alpha!==void 0&&(n.alpha=e.alpha);const t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,i=Math.cos(t/180*Math.PI),a=Math.sin(t/180*Math.PI),[f,s]=Ln(i,a),h=.5,b=1-h/f,c=1-r*h/(h+s-s*b*r),g=r*s*h/(h+s-s*b*r),v=Ee(c),_=g*v/c,w=Me({l:v,a:i*_,b:a*_}),$=Math.cbrt(1/Math.max(w.r,w.g,w.b,0)),P=Ee(o*c),M=g*P/c;return n.l=P*$,n.a=M*i*$,n.b=M*a*$,n}const zr={...Et,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:it,rgb:e=>it(Fe(e))},toMode:{oklab:at,rgb:e=>De(at(e))}};function Tr(e,n){if(!n||n[0]!=="oklab")return;const t={mode:"oklab"},[,r,o,i,a]=n;if(!(r.type===l.Hue||o.type===l.Hue||i.type===l.Hue))return r.type!==l.None&&(t.l=Math.min(Math.max(0,r.type===l.Number?r.value:r.value/100),1)),o.type!==l.None&&(t.a=o.type===l.Number?o.value:o.value*.4/100),i.type!==l.None&&(t.b=i.type===l.Number?i.value:i.value*.4/100),a.type!==l.None&&(t.alpha=Math.min(1,Math.max(0,a.type===l.Number?a.value:a.value/100))),t}const Cr={...In,mode:"oklab",toMode:{lrgb:Me,rgb:De},fromMode:{lrgb:Wt,rgb:Fe},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Tr],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`};function Nr(e,n){if(!n||n[0]!=="oklch")return;const t={mode:"oklch"},[,r,o,i,a]=n;if(r.type!==l.None){if(r.type===l.Hue)return;t.l=Math.min(Math.max(0,r.type===l.Number?r.value:r.value/100),1)}if(o.type!==l.None&&(t.c=Math.max(0,o.type===l.Number?o.value:o.value*.4/100)),i.type!==l.None){if(i.type===l.Percentage)return;t.h=i.value}return a.type!==l.None&&(t.alpha=Math.min(1,Math.max(0,a.type===l.Number?a.value:a.value/100))),t}const Pr={...En,mode:"oklch",toMode:{oklab:e=>Z(e,"oklab"),rgb:e=>De(Z(e,"oklab"))},fromMode:{rgb:e=>W(Fe(e),"oklch"),oklab:e=>W(e,"oklch")},parse:[Nr],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},ft=e=>{let{r:n,g:t,b:r,alpha:o}=ue(e),i={mode:"xyz65",x:.486570948648216*n+.265667693169093*t+.1982172852343625*r,y:.2289745640697487*n+.6917385218365062*t+.079286914093745*r,z:0*n+.0451133818589026*t+1.043944368900976*r};return o!==void 0&&(i.alpha=o),i},lt=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o=se({r:e*2.4934969119414263-n*.9313836179191242-.402710784450717*t,g:e*-.8294889695615749+n*1.7626640603183465+.0236246858419436*t,b:e*.0358458302437845-n*.0761723892680418+.9568845240076871*t},"p3");return r!==void 0&&(o.alpha=r),o},Hr={...le,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>lt(ee(e)),xyz65:lt},toMode:{rgb:e=>ne(ft(e)),xyz65:ft}},bn=e=>{let n=Math.abs(e);return n>=1/512?Math.sign(e)*Math.pow(n,1/1.8):16*e},ut=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o={mode:"prophoto",r:bn(e*1.3457868816471585-n*.2555720873797946-.0511018649755453*t),g:bn(e*-.5446307051249019+n*1.5082477428451466+.0205274474364214*t),b:bn(e*0+n*0+1.2119675456389452*t)};return r!==void 0&&(o.alpha=r),o},gn=(e=0)=>{let n=Math.abs(e);return n>=16/512?Math.sign(e)*Math.pow(n,1.8):e/16},st=e=>{let n=gn(e.r),t=gn(e.g),r=gn(e.b),o={mode:"xyz50",x:.7977666449006423*n+.1351812974005331*t+.0313477341283922*r,y:.2880748288194013*n+.7118352342418731*t+899369387256e-16*r,z:0*n+0*t+.8251046025104602*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Rr={...le,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:ut,rgb:e=>ut(xe(e))},toMode:{xyz50:st,rgb:e=>ge(st(e))}},dt=1.09929682680944,Ir=.018053968510807,xn=e=>{const n=Math.abs(e);return n>Ir?(Math.sign(e)||1)*(dt*Math.pow(n,.45)-(dt-1)):4.5*e},ct=({x:e,y:n,z:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);let o={mode:"rec2020",r:xn(e*1.7166511879712683-n*.3556707837763925-.2533662813736599*t),g:xn(e*-.6666843518324893+n*1.6164812366349395+.0157685458139111*t),b:xn(e*.0176398574453108-n*.0427706132578085+.9421031212354739*t)};return r!==void 0&&(o.alpha=r),o},ht=1.09929682680944,Er=.018053968510807,Mn=(e=0)=>{let n=Math.abs(e);return n<Er*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((n+ht-1)/ht,1/.45)},pt=e=>{let n=Mn(e.r),t=Mn(e.g),r=Mn(e.b),o={mode:"xyz65",x:.6369580483012911*n+.1446169035862083*t+.1688809751641721*r,y:.262700212011267*n+.6779980715188708*t+.059301716469862*r,z:0*n+.0280726930490874*t+1.0609850577107909*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Sr={...le,mode:"rec2020",fromMode:{xyz65:ct,rgb:e=>ct(ee(e))},toMode:{xyz65:pt,rgb:e=>ne(pt(e))},parse:["rec2020"],serialize:"rec2020"},Q=.0037930732552754493,Ut=Math.cbrt(Q),vn=e=>Math.cbrt(e)-Ut,Lr=e=>{const{r:n,g:t,b:r,alpha:o}=ue(e),i=vn(.3*n+.622*t+.078*r+Q),a=vn(.23*n+.692*t+.078*r+Q),f=vn(.2434226892454782*n+.2047674442449682*t+.5518098665095535*r+Q),s={mode:"xyb",x:(i-a)/2,y:(i+a)/2,b:f-(i+a)/2};return o!==void 0&&(s.alpha=o),s},yn=e=>Math.pow(e+Ut,3),qr=({x:e,y:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);const o=yn(e+n)-Q,i=yn(n-e)-Q,a=yn(t+n)-Q,f=se({r:11.031566904639861*o-9.866943908131562*i-.16462299650829934*a,g:-3.2541473810744237*o+4.418770377582723*i-.16462299650829934*a,b:-3.6588512867136815*o+2.7129230459360922*i+1.9459282407775895*a});return r!==void 0&&(f.alpha=r),f},Vr={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:qr},fromMode:{rgb:Lr},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:u,y:u,b:u,alpha:{use:u,fixup:C}}},Xr={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:ge,lab:Rn},fromMode:{rgb:xe,lab:Hn},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:u,y:u,z:u,alpha:{use:u,fixup:C}}},Ar=e=>{let{x:n,y:t,z:r,alpha:o}=e;n===void 0&&(n=0),t===void 0&&(t=0),r===void 0&&(r=0);let i={mode:"xyz50",x:1.0479298208405488*n+.0229467933410191*t-.0501922295431356*r,y:.0296278156881593*n+.990434484573249*t-.0170738250293851*r,z:-.0092430581525912*n+.0150551448965779*t+.7518742899580008*r};return o!==void 0&&(i.alpha=o),i},Or=e=>{let{x:n,y:t,z:r,alpha:o}=e;n===void 0&&(n=0),t===void 0&&(t=0),r===void 0&&(r=0);let i={mode:"xyz65",x:.9554734527042182*n-.0230985368742614*t+.0632593086610217*r,y:-.0283697069632081*n+1.0099954580058226*t+.021041398966943*r,z:.0123140016883199*n-.0205076964334779*t+1.3303659366080753*r};return o!==void 0&&(i.alpha=o),i},Br={mode:"xyz65",toMode:{rgb:ne,xyz50:Ar},fromMode:{rgb:ee,xyz50:Or},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:u,y:u,z:u,alpha:{use:u,fixup:C}}},jr=({r:e,g:n,b:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);const o={mode:"yiq",y:.29889531*e+.58662247*n+.11448223*t,i:.59597799*e-.2741761*n-.32180189*t,q:.21147017*e-.52261711*n+.31114694*t};return r!==void 0&&(o.alpha=r),o},Fr=({y:e,i:n,q:t,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0),t===void 0&&(t=0);const o={mode:"rgb",r:e+.95608445*n+.6208885*t,g:e-.27137664*n-.6486059*t,b:e-1.10561724*n+1.70250126*t};return r!==void 0&&(o.alpha=r),o},Dr={mode:"yiq",toMode:{rgb:Fr},fromMode:{rgb:jr},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:u,i:u,q:u,alpha:{use:u,fixup:C}}},Yr=e=>Math.max(0,Math.min(1,e||0)),ze=e=>Math.round(Yr(e)*255),Wr=vt("rgb"),Zr=e=>{if(e===void 0)return;let n=ze(e.r),t=ze(e.g),r=ze(e.b);return"#"+(1<<24|n<<16|t<<8|r).toString(16).slice(1)},Ur=e=>{if(e===void 0)return;let n=ze(e.alpha!==void 0?e.alpha:1);return Zr(e)+(256|n).toString(16).slice(1)},Jr=e=>Ur(Wr(e));k(R0);k(X0);k(A0);k(O0);k(F0);k(Ht);k(Et);k(er);k(nr);k(ir);k(ar);k(In);k(lr);k(En);k(sr);k(vr);k(yr);k(kr);k($r);k(zr);k(Cr);k(Pr);k(Hr);k(Rr);k(Sr);k(le);k(Vr);k(Xr);k(Br);k(Dr);const Kr=typeof window<"u",Jt=Kr&&"EyeDropper"in window,Gr=e=>{const n=new AbortController;d.onUnmounted(()=>n.abort());async function t(){if(!Jt)return;const r=new window.EyeDropper;try{const o=await r.open({signal:n.signal}),i=wt(o.sRGBHex);i&&(i.alpha=1,e(Jr(i)))}catch(o){console.log("e ===>",o)}}return{openEyeDropper:t,abortController:n}};function Qr(e,n,t){const r=e.getBoundingClientRect(),o=n-r.left,i=t-r.top;return{x:r.width===0?0:me(o/r.width*100,0,100),y:r.height===0?0:me((1-i/r.height)*100,0,100)}}const eo=d.defineComponent({__name:"ColorPickerSpace",setup(e){const n=Kt();let t=!1,r;function o(c){typeof document<"u"&&(r=document.body.style.userSelect,document.body.style.userSelect="none",t=!0,f(c))}function i(c){t=!0,s(c)}function a(){typeof document<"u"&&(document.body.style.userSelect=r,t=!1)}function f(c){var g;c.buttons!==1||!t||((g=n.colorSpace.value)==null?void 0:g.nodeType)!==1||h(n.colorSpace.value,c.clientX,c.clientY)}function s(c){var v;if(!t||((v=n.colorSpace.value)==null?void 0:v.nodeType)!==1)return;c.preventDefault();const g=c.touches[0];h(n.colorSpace.value,g.clientX,g.clientY)}function h(c,g,v){const _=Qr(c,g,v),w={...n.colors.hsv};w.s=_.x,w.v=_.y,n.setColor("hsv",w)}function b(c){if(!["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"].includes(c.key))return;c.preventDefault();const g=["ArrowLeft","ArrowDown"].includes(c.key)?-1:1,v=["ArrowLeft","ArrowRight"].includes(c.key)?"s":"v",_=c.shiftKey?10:1,w=n.colors.hsv[v]+g*_,$={...n.colors.hsv};$[v]=me(w,0,100),n.setColor("hsv",$)}return d.onMounted(()=>{typeof document<"u"&&(document.addEventListener("mousemove",f,{passive:!1}),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("mouseup",a),document.addEventListener("touchend",a))}),d.onBeforeUnmount(()=>{typeof document<"u"&&(document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",s),document.removeEventListener("mouseup",a),document.removeEventListener("touchend",a))}),(c,g)=>(d.openBlock(),d.createElementBlock("div",{ref:d.unref(n).colorSpace,class:d.normalizeClass(d.unref(I.normCls)(d.unref(I.getBemElement)(d.unref(ie),"space"))),onMousedown:o,onTouchstart:i},[d.createElementVNode("button",{ref:d.unref(n).thumb,class:d.normalizeClass(d.unref(I.normCls)(d.unref(I.getBemElement)(d.unref(ie),"thumb"))),tabindex:"0","aria-label":"Color space thumb",onKeydown:b},null,34)],34))}}),no=["value"],to=["value"],[Kt,Gt]=t0.createContext("ColorPicker"),ie=I.getBemBlock("color_picker"),ro=d.defineComponent({...n0.getComponentOptions("ColorPicker"),__name:"ColorPicker",props:{class:{},color:{},defaultColor:{default:"#ffffffff"},format:{},defaultFormat:{default:"hex"},hideAlpha:{type:Boolean}},emits:["update:color","update:format","change"],setup(e,{emit:n}){const t=["hex","hex8","hsl","hsv","hwb","rgb"],r=e,o=n,i=d.ref(null),a=d.ref(null),f=d.ref(null),s=Ue.useVModel(r,"format",o,{defaultValue:r.defaultFormat,passive:r.format===void 0}),h=d.computed(()=>s.value&&t.includes(s.value)?s.value:"hex"),b=y=>["hex","hex8"].includes(y)?"hex":y,c=d.computed(()=>b(h.value)),g=d.computed(()=>r.hideAlpha||h.value==="hex"),v=Ue.useVModel(r,"color",o,{defaultValue:r.defaultColor,passive:r.color===void 0}),_="#ffffffff",w=d.computed(()=>v.value??r.defaultColor??_);d.watch(w,V);const $=d.computed(()=>{const y=c.value,p=M[y];return y.split("").map(x=>{const z=p[x];return{value:Ce(y,x).to(z),channel:x,label:x.toUpperCase()}}).concat(g.value?[]:[{value:Te.to(p.a),channel:"a",label:"Alpha"}])}),P=d.computed({get(){return g.value&&[5,9].includes(M.hex.length)?M.hex.substring(0,M.hex.length-(M.hex.length-1)/4):M.hex},set(y){xt(y)&&R("hex",y)}}),M=d.reactive({hex:_,hsl:{h:0,s:0,l:100,a:1},hsv:{h:0,s:0,v:100,a:1},hwb:{h:0,w:100,b:0,a:1},rgb:{r:255,g:255,b:255,a:1}});function R(y,p){var E,L,te;let x=p;if(g.value)if(typeof p!="string")p.a=1,x=p;else if([5,9].includes(p.length)){const D=(p.length-1)/4;x=p.substring(0,p.length-D)+"f".repeat(D)}else[4,7].includes(p.length)&&(x=p+"f".repeat((p.length-1)/3));const z=b(y);if(!r0(M[z],x)){M[z]=x;for(const D of t)D!==z&&(M[D]=On(z,b(D),x));v.value=Ge({color:On(z,c.value,x),format:c.value},g.value),o("change",G())}((E=i.value)==null?void 0:E.nodeType)===1&&((L=a.value)==null?void 0:L.nodeType)===1&&((te=f.value)==null?void 0:te.nodeType)===1&&K(i.value,a.value,f.value)}function V(y){const p=Fn(y);if(p!==null)R(p.format,p.color);else{const x=Fn(_);x!==null&&R(x.format,x.color)}}function U(y){s.value=y}function F(y,p){const x=y.currentTarget,z={...M.hsv};z[p]=Number(x.value),R("hsv",z)}function J(y,p){const x=c.value,z={...M[x]},L=(p==="a"?Te:Ce(x,p)).from(y);Number.isNaN(y)||y===void 0||(z[p]=L,R(x,z))}function K(y,p,x){const z=Ge({format:"hsl",color:M.hsl},!0);y.style.setProperty("--ptc-color-picker-color",z),p.style.position="relative",p.style.backgroundColor=`hsl(${M.hsl.h} 100% 50%)`,p.style.backgroundImage="linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent)",x.style.boxSizing="border-box",x.style.position="absolute",x.style.left=`${M.hsv.s}%`,x.style.bottom=`${M.hsv.v}%`}function G(){const y=Ge({color:M[c.value],format:c.value},g.value);return{format:c.value,color:y}}function X(y){if(!["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"].includes(y.key)||!y.shiftKey)return;const p=y.currentTarget,x=Number(p.step),z=["ArrowLeft","ArrowDown"].includes(y.key)?-1:1,E=Number(p.value)+z*x*10,L=me(E,Number(p.min),Number(p.max));p.value=String(L-z*x)}const{openEyeDropper:A}=Gr(V);d.onMounted(()=>V(w.value)),Gt({colorSpace:a,thumb:f,colors:M,setColor:R});const S=I.getBemElement(ie,"slider");return(y,p)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"colorPicker",ref:i,class:d.normalizeClass(d.unref(I.normCls)(d.unref(ie),r.class))},[d.createVNode(eo),d.createElementVNode("div",{class:d.normalizeClass(d.unref(I.getBemElement)(d.unref(ie),"sliders"))},[d.createElementVNode("input",{class:d.normalizeClass(d.unref(I.normCls)(d.unref(S),d.unref(I.getBemModifier)(d.unref(S),"hue"))),value:M.hsv.h,type:"range",min:"0",max:"360",step:"1",onKeydownPassive:X,onInput:p[0]||(p[0]=x=>F(x,"h"))},null,42,no),g.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("input",{key:0,class:d.normalizeClass(d.unref(I.normCls)(d.unref(S),d.unref(I.getBemModifier)(d.unref(S),"alpha"))),value:M.hsv.a,type:"range",min:"0",max:"1",step:"0.01",onKeydownPassive:X,onInput:p[1]||(p[1]=x=>F(x,"a"))},null,42,to))],2),d.createElementVNode("div",{class:d.normalizeClass(d.unref(I.getBemElement)(d.unref(ie),"inputs"))},[d.createElementVNode("button",{disabled:!0,class:"fake-select",onClick:p[2]||(p[2]=x=>U("rgb"))},[p[4]||(p[4]=d.createElementVNode("div",null,"Hex",-1)),d.createVNode(Ue._sfc_main$3,{icon:"tabler:chevron-down",size:"2xsm",class:"fake-select-icon"})]),c.value==="hex"?(d.openBlock(),d.createBlock(An._sfc_main,{key:0,class:"flex-1",size:"sm",modelValue:P.value,"onUpdate:modelValue":p[3]||(p[3]=x=>P.value=x)},null,8,["modelValue"])):(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:1},d.renderList($.value,({value:x,channel:z})=>(d.openBlock(),d.createBlock(An._sfc_main,{modelValue:x,"onUpdate:modelValue":E=>J(E,z),size:"sm"},null,8,["modelValue","onUpdate:modelValue"]))),256)),d.unref(Jt)?(d.openBlock(),d.createBlock(e0._sfc_main,{key:2,onClick:d.unref(A),icon:"tabler:color-picker",size:"sm",type:"outline",variant:"icon"},null,8,["onClick"])):d.createCommentVNode("",!0)],2)],2))}});exports._sfc_main=ro;exports.injectColorPickerContext=Kt;exports.provideColorPickerContext=Gt;
@@ -1,4 +1,4 @@
1
- import { _ as s, C as r, a as t, _ as e } from "../ColorSwatch.vue_vue_type_style_index_0_lang-CXh-dgyg.js";
1
+ import { _ as s, C as r, a as t, _ as e } from "../ColorSwatch.vue_vue_type_style_index_0_lang-MMo80_Zm.js";
2
2
  export {
3
3
  s as ColorSwatch,
4
4
  r as ColorSwatchSizes,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorSwatch.vue_vue_type_style_index_0_lang-BnpzS5m2.js");exports.ColorSwatch=e._sfc_main;exports.ColorSwatchSizes=e.ColorSwatchSizes;exports.ColorSwatchTypes=e.ColorSwatchTypes;exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorSwatch.vue_vue_type_style_index_0_lang-j3uScCo0.js");exports.ColorSwatch=e._sfc_main;exports.ColorSwatchSizes=e.ColorSwatchSizes;exports.ColorSwatchTypes=e.ColorSwatchTypes;exports.default=e._sfc_main;
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./ColorSwatch.vue_vue_type_style_index_0_lang-CXh-dgyg.js";
1
+ import { _ as f } from "./ColorSwatch.vue_vue_type_style_index_0_lang-MMo80_Zm.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ColorSwatch.vue_vue_type_style_index_0_lang-BnpzS5m2.js");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ColorSwatch.vue_vue_type_style_index_0_lang-j3uScCo0.js");exports.default=e._sfc_main;
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as B, computed as s, useSlots as P, createBlock as d, openBlock as c, resolveDynamicComponent as _, mergeProps as n, unref as f, withCtx as i, createElementBlock as b, createCommentVNode as y, renderSlot as a, normalizeProps as r, createSlots as $, renderList as I, guardReactiveProps as k, createElementVNode as E } from "vue";
2
- import { _ as L } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-CEul2ZDZ.js";
2
+ import { _ as L } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-D6efb688.js";
3
3
  import { g as O } from "./options-Bh1s18jm.js";
4
- import { o as V } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
4
+ import { o as V } from "./Icon.vue_vue_type_style_index_0_lang-D105BnRd.js";
5
5
  import { getBemBlock as D, generateVariantClassList as l, normCls as N } from "@pantograph/utils";
6
6
  import { cva as j } from "class-variance-authority";
7
- import { _ as M } from "./IconButton.vue_vue_type_script_setup_true_lang-BG-vYXAP.js";
7
+ import { _ as M } from "./IconButton.vue_vue_type_script_setup_true_lang-DIVceNgM.js";
8
8
  const v = ["sm", "md"], R = ["color", "remover", "custom-picker"], T = {
9
9
  key: 1,
10
10
  height: "100%",
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),v=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-EviuZ52W.js"),g=require("./options-CY2uxp5A.js"),k=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),s=require("@pantograph/utils"),C=require("class-variance-authority"),f=require("./IconButton.vue_vue_type_script_setup_true_lang-DynLmo_n.js"),c=["sm","md"],l=["color","remover","custom-picker"],h={key:1,height:"100%",width:"100%",viewBox:"0 0 19 18",fill:"none"},z=e.defineComponent({...g.getComponentOptions("ColorSwatch"),__name:"ColorSwatch",props:{class:{},icon:{},flipOnDir:{},fg:{},bg:{},br:{},size:{default:"md"},selected:{type:Boolean},type:{default:"color"},customPickerIcon:{default:"tabler:palette"}},setup(u){const o=u,r=s.getBemBlock("color_swatch"),p=C.cva(r,{variants:{selected:s.generateVariantClassList("selected",r),size:s.generateVariantClassList(c,r),type:s.generateVariantClassList(l,r)}}),n=e.computed(()=>o.size&&c.includes(o.size)?o.size:"md"),m=e.computed(()=>({size:n.value,...k.omit(o,"size","class","type","selected","customPickerIcon")})),d=e.useSlots(),y=e.computed(()=>{switch(o.type){case"remover":case"color":return"div";case"custom-picker":return f._sfc_main}}),_=e.computed(()=>{const t={};return o.type==="custom-picker"&&(t.size=n.value,t.icon=o.customPickerIcon,t.color="gray",t.type="outline"),t});return(t,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value),e.mergeProps({class:e.unref(s.normCls)(e.unref(p)({selected:t.type!=="custom-picker"&&o.selected,size:t.size,type:t.type}),o.class)},_.value),{icon:e.withCtx(()=>[e.renderSlot(t.$slots,"icon",e.normalizeProps(e.guardReactiveProps(o)))]),default:e.withCtx(()=>[t.type==="color"?(e.openBlock(),e.createBlock(v._sfc_main,e.normalizeProps(e.mergeProps({key:0},m.value)),e.createSlots({_:2},[e.renderList(Object.keys(d),a=>({name:a,fn:e.withCtx(()=>[e.renderSlot(t.$slots,a,e.normalizeProps(e.guardReactiveProps(o)))])}))]),1040)):t.type==="remover"?(e.openBlock(),e.createElementBlock("svg",h,i[0]||(i[0]=[e.createElementVNode("path",{id:"Empty Indicator",d:"M17.5 1L1.5 17",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))):e.createCommentVNode("",!0),t.type==="custom-picker"?e.renderSlot(t.$slots,"default",e.normalizeProps(e.mergeProps({key:2},o))):e.createCommentVNode("",!0)]),_:3},16,["class"]))}});exports.ColorSwatchSizes=c;exports.ColorSwatchTypes=l;exports._sfc_main=z;
1
+ "use strict";const e=require("vue"),v=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-CX1uOlz9.js"),g=require("./options-CY2uxp5A.js"),k=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),s=require("@pantograph/utils"),C=require("class-variance-authority"),f=require("./IconButton.vue_vue_type_script_setup_true_lang-NJ4SCX2H.js"),c=["sm","md"],l=["color","remover","custom-picker"],h={key:1,height:"100%",width:"100%",viewBox:"0 0 19 18",fill:"none"},z=e.defineComponent({...g.getComponentOptions("ColorSwatch"),__name:"ColorSwatch",props:{class:{},icon:{},flipOnDir:{},fg:{},bg:{},br:{},size:{default:"md"},selected:{type:Boolean},type:{default:"color"},customPickerIcon:{default:"tabler:palette"}},setup(u){const o=u,r=s.getBemBlock("color_swatch"),p=C.cva(r,{variants:{selected:s.generateVariantClassList("selected",r),size:s.generateVariantClassList(c,r),type:s.generateVariantClassList(l,r)}}),n=e.computed(()=>o.size&&c.includes(o.size)?o.size:"md"),m=e.computed(()=>({size:n.value,...k.omit(o,"size","class","type","selected","customPickerIcon")})),d=e.useSlots(),y=e.computed(()=>{switch(o.type){case"remover":case"color":return"div";case"custom-picker":return f._sfc_main}}),_=e.computed(()=>{const t={};return o.type==="custom-picker"&&(t.size=n.value,t.icon=o.customPickerIcon,t.color="gray",t.type="outline"),t});return(t,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value),e.mergeProps({class:e.unref(s.normCls)(e.unref(p)({selected:t.type!=="custom-picker"&&o.selected,size:t.size,type:t.type}),o.class)},_.value),{icon:e.withCtx(()=>[e.renderSlot(t.$slots,"icon",e.normalizeProps(e.guardReactiveProps(o)))]),default:e.withCtx(()=>[t.type==="color"?(e.openBlock(),e.createBlock(v._sfc_main,e.normalizeProps(e.mergeProps({key:0},m.value)),e.createSlots({_:2},[e.renderList(Object.keys(d),a=>({name:a,fn:e.withCtx(()=>[e.renderSlot(t.$slots,a,e.normalizeProps(e.guardReactiveProps(o)))])}))]),1040)):t.type==="remover"?(e.openBlock(),e.createElementBlock("svg",h,i[0]||(i[0]=[e.createElementVNode("path",{id:"Empty Indicator",d:"M17.5 1L1.5 17",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))):e.createCommentVNode("",!0),t.type==="custom-picker"?e.renderSlot(t.$slots,"default",e.normalizeProps(e.mergeProps({key:2},o))):e.createCommentVNode("",!0)]),_:3},16,["class"]))}});exports.ColorSwatchSizes=c;exports.ColorSwatchTypes=l;exports._sfc_main=z;
@@ -1,4 +1,4 @@
1
- import { _ as r, _ as t } from "../ColorSwatchGroup.vue_vue_type_style_index_0_lang-DMWiKVRG.js";
1
+ import { _ as r, _ as t } from "../ColorSwatchGroup.vue_vue_type_style_index_0_lang-DPd_kewe.js";
2
2
  export {
3
3
  r as ColorSwatchGroup,
4
4
  t as default
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorSwatchGroup.vue_vue_type_style_index_0_lang-DFUXE61f.js");exports.ColorSwatchGroup=e._sfc_main;exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorSwatchGroup.vue_vue_type_style_index_0_lang-CGF7Y4Y3.js");exports.ColorSwatchGroup=e._sfc_main;exports.default=e._sfc_main;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),z=require("./options-CY2uxp5A.js"),S=require("reka-ui"),c=require("./ColorSwatch.vue_vue_type_style_index_0_lang-BnpzS5m2.js"),u=require("./index-BmcHqJPl.js"),n=require("@pantograph/utils"),d=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),$=require("class-variance-authority"),j=require("./Popover.vue_vue_type_style_index_0_lang-qJ0psPTx.js"),q=require("./ColorPicker.vue_vue_type_style_index_0_lang-CYPF-q6f.js"),w=e.defineComponent({...z.getComponentOptions("ColorSwatchGroup"),__name:"ColorSwatchGroup",props:{format:{},defaultFormat:{},hideAlpha:{type:Boolean},size:{default:"md"},customPickerIcon:{},icon:{},class:{},noRemover:{type:Boolean},noCustomPicker:{type:Boolean},modelValue:{},headerCls:{},header:{},colorsCls:{},defaultValue:{},colors:{},colorMode:{default:"bold"},popoverProps:{}},emits:["update:format","update:modelValue"],setup(C,{emit:k}){const t=C,_=e.useSlots(),f=k,l=d.useVModel(t,"modelValue",f,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),b=o=>{if(u.isString(o))return{selected:l.value===o,icon:t.icon,bg:o};if(u.isObject(o))return{...d.omit(o,"value"),icon:o.icon??t.icon,selected:l.value===o.value}},i=n.getBemBlock("color_swatch_group"),y=$.cva(i,{variants:{size:n.generateVariantClassList(c.ColorSwatchSizes,i)}}),v=e.ref(!1),m=o=>u.isObject(o)?o.value:o??void 0,g=o=>{const r=m(o);l.value=r,v.value=!r},p=e.computed(()=>{if(t.colors)return t.colors;const o=["red","orange","yellow","lime","green","sky","blue","violet"];return t.colorMode==="subtle"?o.map(r=>`${r}-subtle`):typeof t.colorMode=="object"&&t.colorMode.value&&(t.colorMode.bg||t.colorMode.br||t.colorMode.fg)?o.map(r=>{const s={value:typeof t.colorMode=="object"&&t.colorMode.value==="subtle"?`${r}-subtle`:r};return typeof t.colorMode=="object"&&t.colorMode.bg&&(s.bg=t.colorMode.bg==="subtle"?`${r}-subtle`:r),typeof t.colorMode=="object"&&t.colorMode.br&&(s.br=t.colorMode.br==="subtle"?`${r}-subtle`:r),typeof t.colorMode=="object"&&t.colorMode.fg&&(s.fg=t.colorMode.fg==="subtle"?`${r}-subtle`:r),s}):o}),h=e.computed(()=>{var o;if(!((o=p.value)!=null&&o.length&&p.value.some(r=>u.isString(r)&&r===l.value||u.isObject(r)&&l.value===r.value)))return l.value}),P=o=>{o&&(l.value=o)},B=S.useEmitAsProps(f),V=e.computed(()=>({...d.pick(B,"onUpdate:format"),...d.pick(t,"format","defaultFormat","hideAlpha")}));return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n.normCls)(t.class,e.unref(y)({size:o.size})))},[_.header||o.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(i),"header"),o.headerCls))},[e.renderSlot(o.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(o.header),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(i),"colors"),o.colorsCls))},[o.noRemover?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c._sfc_main,{key:0,type:"remover",size:o.size,onClick:r[0]||(r[0]=s=>g()),selected:!e.unref(l)&&v.value},null,8,["size","selected"])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,s=>(e.openBlock(),e.createBlock(c._sfc_main,e.mergeProps({type:"color",size:o.size,icon:o.icon},{ref_for:!0},b(s),{key:m(s),onClick:a=>g(s)}),e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),a=>({name:a,fn:e.withCtx(M=>[e.renderSlot(o.$slots,a,e.mergeProps({ref_for:!0},{...M,value:m(s)}))])}))]),1040,["size","icon","onClick"]))),128)),o.noCustomPicker?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j._sfc_main,e.mergeProps({key:1,trigger:"click","reverse-placement-on-dir":"rtl",placement:"right-start","side-offset":4},o.popoverProps||{}),{content:e.withCtx(()=>[e.createVNode(q._sfc_main,e.mergeProps({defaultColor:h.value,"onUpdate:color":P},V.value),null,16,["defaultColor"])]),default:e.withCtx(()=>[e.createVNode(c._sfc_main,{type:"custom-picker",size:o.size,customPickerIcon:o.customPickerIcon},e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),s=>({name:s,fn:e.withCtx(a=>[e.renderSlot(o.$slots,s,e.normalizeProps(e.guardReactiveProps(a)))])}))]),1032,["size","customPickerIcon"])]),_:3},16))],2)],2))}});exports._sfc_main=w;
1
+ "use strict";const e=require("vue"),z=require("./options-CY2uxp5A.js"),S=require("reka-ui"),c=require("./ColorSwatch.vue_vue_type_style_index_0_lang-j3uScCo0.js"),u=require("./index-BmcHqJPl.js"),n=require("@pantograph/utils"),d=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),$=require("class-variance-authority"),j=require("./Popover.vue_vue_type_style_index_0_lang-qJ0psPTx.js"),q=require("./ColorPicker.vue_vue_type_style_index_0_lang-RKbw-kXI.js"),w=e.defineComponent({...z.getComponentOptions("ColorSwatchGroup"),__name:"ColorSwatchGroup",props:{format:{},defaultFormat:{},hideAlpha:{type:Boolean},size:{default:"md"},customPickerIcon:{},icon:{},class:{},noRemover:{type:Boolean},noCustomPicker:{type:Boolean},modelValue:{},headerCls:{},header:{},colorsCls:{},defaultValue:{},colors:{},colorMode:{default:"bold"},popoverProps:{}},emits:["update:format","update:modelValue"],setup(C,{emit:k}){const t=C,_=e.useSlots(),f=k,l=d.useVModel(t,"modelValue",f,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),b=o=>{if(u.isString(o))return{selected:l.value===o,icon:t.icon,bg:o};if(u.isObject(o))return{...d.omit(o,"value"),icon:o.icon??t.icon,selected:l.value===o.value}},i=n.getBemBlock("color_swatch_group"),y=$.cva(i,{variants:{size:n.generateVariantClassList(c.ColorSwatchSizes,i)}}),v=e.ref(!1),m=o=>u.isObject(o)?o.value:o??void 0,g=o=>{const r=m(o);l.value=r,v.value=!r},p=e.computed(()=>{if(t.colors)return t.colors;const o=["red","orange","yellow","lime","green","sky","blue","violet"];return t.colorMode==="subtle"?o.map(r=>`${r}-subtle`):typeof t.colorMode=="object"&&t.colorMode.value&&(t.colorMode.bg||t.colorMode.br||t.colorMode.fg)?o.map(r=>{const s={value:typeof t.colorMode=="object"&&t.colorMode.value==="subtle"?`${r}-subtle`:r};return typeof t.colorMode=="object"&&t.colorMode.bg&&(s.bg=t.colorMode.bg==="subtle"?`${r}-subtle`:r),typeof t.colorMode=="object"&&t.colorMode.br&&(s.br=t.colorMode.br==="subtle"?`${r}-subtle`:r),typeof t.colorMode=="object"&&t.colorMode.fg&&(s.fg=t.colorMode.fg==="subtle"?`${r}-subtle`:r),s}):o}),h=e.computed(()=>{var o;if(!((o=p.value)!=null&&o.length&&p.value.some(r=>u.isString(r)&&r===l.value||u.isObject(r)&&l.value===r.value)))return l.value}),P=o=>{o&&(l.value=o)},B=S.useEmitAsProps(f),V=e.computed(()=>({...d.pick(B,"onUpdate:format"),...d.pick(t,"format","defaultFormat","hideAlpha")}));return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n.normCls)(t.class,e.unref(y)({size:o.size})))},[_.header||o.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(i),"header"),o.headerCls))},[e.renderSlot(o.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(o.header),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n.normCls)(e.unref(n.getBemElement)(e.unref(i),"colors"),o.colorsCls))},[o.noRemover?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c._sfc_main,{key:0,type:"remover",size:o.size,onClick:r[0]||(r[0]=s=>g()),selected:!e.unref(l)&&v.value},null,8,["size","selected"])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,s=>(e.openBlock(),e.createBlock(c._sfc_main,e.mergeProps({type:"color",size:o.size,icon:o.icon},{ref_for:!0},b(s),{key:m(s),onClick:a=>g(s)}),e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),a=>({name:a,fn:e.withCtx(M=>[e.renderSlot(o.$slots,a,e.mergeProps({ref_for:!0},{...M,value:m(s)}))])}))]),1040,["size","icon","onClick"]))),128)),o.noCustomPicker?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j._sfc_main,e.mergeProps({key:1,trigger:"click","reverse-placement-on-dir":"rtl",placement:"right-start","side-offset":4},o.popoverProps||{}),{content:e.withCtx(()=>[e.createVNode(q._sfc_main,e.mergeProps({defaultColor:h.value,"onUpdate:color":P},V.value),null,16,["defaultColor"])]),default:e.withCtx(()=>[e.createVNode(c._sfc_main,{type:"custom-picker",size:o.size,customPickerIcon:o.customPickerIcon},e.createSlots({_:2},[e.renderList(Object.keys(o.$slots),s=>({name:s,fn:e.withCtx(a=>[e.renderSlot(o.$slots,s,e.normalizeProps(e.guardReactiveProps(a)))])}))]),1032,["size","customPickerIcon"])]),_:3},16))],2)],2))}});exports._sfc_main=w;
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as L, useSlots as U, ref as T, computed as p, createElementBlock as f, openBlock as a, normalizeClass as v, unref as s, createCommentVNode as b, createElementVNode as q, renderSlot as g, createTextVNode as H, toDisplayString as J, createBlock as C, Fragment as K, renderList as k, mergeProps as u, createSlots as $, withCtx as c, createVNode as B, normalizeProps as Q, guardReactiveProps as W } from "vue";
2
2
  import { g as X } from "./options-Bh1s18jm.js";
3
3
  import { useEmitAsProps as Y } from "reka-ui";
4
- import { C as Z, _ as y } from "./ColorSwatch.vue_vue_type_style_index_0_lang-CXh-dgyg.js";
4
+ import { C as Z, _ as y } from "./ColorSwatch.vue_vue_type_style_index_0_lang-MMo80_Zm.js";
5
5
  import { i as j, a as M } from "./index-BTuMaS--.js";
6
6
  import { getBemBlock as x, generateVariantClassList as ee, normCls as h, getBemElement as S } from "@pantograph/utils";
7
- import { u as oe, l as w, o as te } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
7
+ import { u as oe, l as w, o as te } from "./Icon.vue_vue_type_style_index_0_lang-D105BnRd.js";
8
8
  import { cva as re } from "class-variance-authority";
9
- import { _ as se } from "./Popover.vue_vue_type_style_index_0_lang-DLboppFN.js";
10
- import { _ as le } from "./ColorPicker.vue_vue_type_style_index_0_lang-BhznZQOS.js";
9
+ import { _ as se } from "./Popover.vue_vue_type_style_index_0_lang-yKeicrWx.js";
10
+ import { _ as le } from "./ColorPicker.vue_vue_type_style_index_0_lang-CVMzIHWW.js";
11
11
  const be = /* @__PURE__ */ L({
12
12
  ...X("ColorSwatchGroup"),
13
13
  __name: "ColorSwatchGroup",
@@ -1,4 +1,4 @@
1
- import { _ as e, C as a, _ as g } from "../ColorTrigger.vue_vue_type_style_index_0_lang-Cu8MO8RU.js";
1
+ import { _ as e, C as a, _ as g } from "../ColorTrigger.vue_vue_type_style_index_0_lang-CpumcGKV.js";
2
2
  export {
3
3
  e as ColorTrigger,
4
4
  a as ColorTriggerSizes,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorTrigger.vue_vue_type_style_index_0_lang-nVzcYP7q.js");exports.ColorTrigger=e._sfc_main;exports.ColorTriggerSizes=e.ColorTriggerSizes;exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../ColorTrigger.vue_vue_type_style_index_0_lang-Cz3225rF.js");exports.ColorTrigger=e._sfc_main;exports.ColorTriggerSizes=e.ColorTriggerSizes;exports.default=e._sfc_main;
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as B, computed as c, useSlots as I, createElementBlock as S, openBlock as l, unref as o, normalizeClass as v, createVNode as _, createBlock as k, createCommentVNode as h, normalizeProps as m, guardReactiveProps as f, createSlots as y, renderList as w, withCtx as u, renderSlot as d } from "vue";
2
- import { _ as O } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-CEul2ZDZ.js";
2
+ import { _ as O } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-D6efb688.js";
3
3
  import { g as $ } from "./options-Bh1s18jm.js";
4
4
  import { getBemBlock as T, generateVariantClassList as t, normCls as V } from "@pantograph/utils";
5
5
  import { cva as G } from "class-variance-authority";
6
- import { l as L, k as N } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
6
+ import { l as L, k as N } from "./Icon.vue_vue_type_style_index_0_lang-D105BnRd.js";
7
7
  import { i as P } from "./index-BTuMaS--.js";
8
- import { u as j } from "./useInputDataStates-RRZVY4Vg.js";
8
+ import { u as j } from "./useInputDataStates-B78OFI-A.js";
9
9
  const g = ["sm", "md", "lg"], D = ["disabled"], Q = /* @__PURE__ */ B({
10
10
  ...$("ColorTrigger"),
11
11
  __name: "ColorTrigger",
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),p=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-EviuZ52W.js"),_=require("./options-CY2uxp5A.js"),o=require("@pantograph/utils"),z=require("class-variance-authority"),u=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),b=require("./index-BmcHqJPl.js"),v=require("./useInputDataStates-CXaVG_o2.js"),a=["sm","md","lg"],C=["disabled"],S=e.defineComponent({..._.getComponentOptions("ColorTrigger"),__name:"ColorTrigger",props:{icon:{},bg:{},br:{},fg:{},class:{},size:{default:"md"},disabled:{type:Boolean},borderless:{type:Boolean},suffixIcon:{type:[Boolean,String],default:"tabler:chevron-down"}},setup(l){const r=l,n=o.getBemBlock("color_trigger"),f=z.cva(n,{variants:{size:o.generateVariantClassList(a,n),borderless:o.generateVariantClassList("borderless",n),suffixIcon:o.generateVariantClassList("suffix-icon",n)}}),{getDisabled:d,getSize:t}=v.useFormInput({getSize:()=>r.size&&a.includes(r.size)?r.size:"md"}),g=e.computed(()=>({size:(()=>{switch(t.value){case"sm":return"2xsm";case"md":return"xsm";case"lg":return"sm"}})(),...u.pick(r,"icon","bg","br","fg")})),i=e.useSlots(),m=e.computed(()=>{switch(t.value){case"sm":return"2xsm";case"md":case"lg":return"xsm"}});return(s,x)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(e.unref(o.normCls)(e.unref(f)({size:e.unref(t),borderless:s.borderless,suffixIcon:!!(s.suffixIcon||i.suffixIcon)}),r.class)),disabled:e.unref(d)},[e.createVNode(p._sfc_main,e.normalizeProps(e.guardReactiveProps(g.value)),e.createSlots({_:2},[e.renderList(Object.keys(i),c=>({name:c,fn:e.withCtx(()=>[e.renderSlot(s.$slots,c,e.normalizeProps(e.guardReactiveProps(r)))])}))]),1040),s.suffixIcon||i.suffixIcon?(e.openBlock(),e.createBlock(u._sfc_main$3,{key:0,icon:e.unref(b.isString)(s.suffixIcon)?s.suffixIcon:void 0,size:m.value},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"suffixIcon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0)],10,C))}});exports.ColorTriggerSizes=a;exports._sfc_main=S;
1
+ "use strict";const e=require("vue"),p=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-CX1uOlz9.js"),_=require("./options-CY2uxp5A.js"),o=require("@pantograph/utils"),z=require("class-variance-authority"),u=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),b=require("./index-BmcHqJPl.js"),v=require("./useInputDataStates-CXaVG_o2.js"),a=["sm","md","lg"],C=["disabled"],S=e.defineComponent({..._.getComponentOptions("ColorTrigger"),__name:"ColorTrigger",props:{icon:{},bg:{},br:{},fg:{},class:{},size:{default:"md"},disabled:{type:Boolean},borderless:{type:Boolean},suffixIcon:{type:[Boolean,String],default:"tabler:chevron-down"}},setup(l){const r=l,n=o.getBemBlock("color_trigger"),f=z.cva(n,{variants:{size:o.generateVariantClassList(a,n),borderless:o.generateVariantClassList("borderless",n),suffixIcon:o.generateVariantClassList("suffix-icon",n)}}),{getDisabled:d,getSize:t}=v.useFormInput({getSize:()=>r.size&&a.includes(r.size)?r.size:"md"}),g=e.computed(()=>({size:(()=>{switch(t.value){case"sm":return"2xsm";case"md":return"xsm";case"lg":return"sm"}})(),...u.pick(r,"icon","bg","br","fg")})),i=e.useSlots(),m=e.computed(()=>{switch(t.value){case"sm":return"2xsm";case"md":case"lg":return"xsm"}});return(s,x)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(e.unref(o.normCls)(e.unref(f)({size:e.unref(t),borderless:s.borderless,suffixIcon:!!(s.suffixIcon||i.suffixIcon)}),r.class)),disabled:e.unref(d)},[e.createVNode(p._sfc_main,e.normalizeProps(e.guardReactiveProps(g.value)),e.createSlots({_:2},[e.renderList(Object.keys(i),c=>({name:c,fn:e.withCtx(()=>[e.renderSlot(s.$slots,c,e.normalizeProps(e.guardReactiveProps(r)))])}))]),1040),s.suffixIcon||i.suffixIcon?(e.openBlock(),e.createBlock(u._sfc_main$3,{key:0,icon:e.unref(b.isString)(s.suffixIcon)?s.suffixIcon:void 0,size:m.value},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"suffixIcon")]),_:3},8,["icon","size"])):e.createCommentVNode("",!0)],10,C))}});exports.ColorTriggerSizes=a;exports._sfc_main=S;
@@ -1,4 +1,4 @@
1
- import { _ as s, C as t, a as x, i as C, p as a } from "../Combobox.vue_vue_type_style_index_0_lang-BsO5vzLB.js";
1
+ import { _ as s, C as t, a as x, i as C, p as a } from "../Combobox.vue_vue_type_style_index_0_lang-BXq6IyEH.js";
2
2
  export {
3
3
  s as Combobox,
4
4
  t as ComboboxSizes,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../Combobox.vue_vue_type_style_index_0_lang-Dtf_JcyR.js");exports.Combobox=o._sfc_main;exports.ComboboxSizes=o.ComboboxSizes;exports.ComboboxStatuses=o.ComboboxStatuses;exports.injectComboboxContext=o.injectComboboxContext;exports.provideComboboxContext=o.provideComboboxContext;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../Combobox.vue_vue_type_style_index_0_lang-CSz_lsmn.js");exports.Combobox=o._sfc_main;exports.ComboboxSizes=o.ComboboxSizes;exports.ComboboxStatuses=o.ComboboxStatuses;exports.injectComboboxContext=o.injectComboboxContext;exports.provideComboboxContext=o.provideComboboxContext;
@@ -1,30 +1,30 @@
1
1
  import { computed as m, unref as D, defineComponent as se, createBlock as Se, openBlock as ce, mergeProps as Ae, withCtx as be, createElementBlock as Ne, createVNode as $e, h as r, normalizeClass as Xe, renderSlot as Fe, ref as _e, watch as We, useSlots as Ze, useAttrs as et, createSlots as tt, renderList as ot, normalizeProps as nt, guardReactiveProps as at } from "vue";
2
2
  import { createContext as Ge, ComboboxInput as lt, ComboboxAnchor as rt, injectComboboxRootContext as st, useFilter as it, ComboboxPortal as pt, ComboboxContent as ut, useEmitAsProps as ct, ComboboxRoot as dt } from "reka-ui";
3
- import { C as gt, q as Ue, D as mt, t as re, s as le, k as Be, j as U, g as ft, h as vt, f as ht, o as De, y as bt, r as yt, l as we, u as Ct, v as Vt } from "./Icon.vue_vue_type_style_index_0_lang-BxthrfMq.js";
3
+ import { C as gt, r as Ue, D as mt, t as re, q as le, k as Be, j as U, g as ft, h as vt, f as ht, o as De, y as bt, s as yt, l as we, u as Ct, v as Vt } from "./Icon.vue_vue_type_style_index_0_lang-D105BnRd.js";
4
4
  import { g as Pe, a as Ie } from "./options-Bh1s18jm.js";
5
5
  import { getBemBlock as _t, getBemElement as B, generateVariantClassList as H, normCls as ee } from "@pantograph/utils";
6
6
  import { i as de, f as N, a as Oe, u as xt, c as Ee } from "./index-BTuMaS--.js";
7
7
  import { cva as ke } from "class-variance-authority";
8
- import { _ as St } from "./Empty.vue_vue_type_style_index_0_lang-YvYjr_zz.js";
8
+ import { _ as St } from "./Empty.vue_vue_type_style_index_0_lang-Hb-71AW8.js";
9
9
  import { _ as Ot } from "./Skeleton.vue_vue_type_style_index_0_lang-2rpO7HY2.js";
10
10
  import { _ as xe } from "./Divider.vue_vue_type_style_index_0_lang-CfBklijs.js";
11
- import { u as Bt, U as Pt } from "./useInputDataStates-RRZVY4Vg.js";
11
+ import { u as Bt, U as Pt } from "./useInputDataStates-B78OFI-A.js";
12
12
  import { u as It } from "./useLazyLoading-Zo-PEp2E.js";
13
- import { g as kt, b as Tt } from "./Popover.vue_vue_type_style_index_0_lang-DLboppFN.js";
14
- import { _ as zt } from "./ScrollContainer.vue_vue_type_style_index_0_lang-DqLbpFbD.js";
15
- import { _ as Lt } from "./Tree.vue_vue_type_style_index_0_lang-Dh0qoB5W.js";
16
- import { u as Ke } from "./uniq-Bk9D4jYg.js";
17
- import { _ as Mt } from "./Chip.vue_vue_type_style_index_0_lang-B8XnEjIk.js";
18
- import { _ as Dt } from "./ChipGroup.vue_vue_type_style_index_0_lang-CYarh7Jx.js";
19
- import { d as wt, _ as je } from "./Avatar.vue_vue_type_style_index_0_lang--OU5sgDR.js";
20
- import { _ as Et } from "./GraphicalObjectGroup.vue_vue_type_style_index_0_lang-lN6Gzj19.js";
21
- import { _ as He } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-CEul2ZDZ.js";
22
- import { _ as Kt } from "./Input.vue_vue_type_style_index_0_lang-DkuxhdXR.js";
13
+ import { g as kt, b as Tt } from "./Popover.vue_vue_type_style_index_0_lang-yKeicrWx.js";
14
+ import { _ as zt } from "./ScrollContainer.vue_vue_type_style_index_0_lang-D8IR7pw-.js";
15
+ import { _ as Lt } from "./Tree.vue_vue_type_style_index_0_lang-Des-7-p4.js";
16
+ import { u as Ke } from "./uniq-yfmxvZGr.js";
17
+ import { _ as Mt } from "./Chip.vue_vue_type_style_index_0_lang-B8BunJEO.js";
18
+ import { _ as Dt } from "./ChipGroup.vue_vue_type_style_index_0_lang-YPrXCjP8.js";
19
+ import { d as wt, _ as je } from "./Avatar.vue_vue_type_style_index_0_lang-BgD1ygnv.js";
20
+ import { _ as Et } from "./GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DtfNCdZu.js";
21
+ import { _ as He } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-D6efb688.js";
22
+ import { _ as Kt } from "./Input.vue_vue_type_style_index_0_lang-DbW60HOk.js";
23
23
  import { whenever as Rt } from "@vueuse/core";
24
24
  import { last as At } from "lodash-es";
25
- import { a as Nt } from "./MenuItem.vue_vue_type_style_index_0_lang-D_lWThP0.js";
25
+ import { a as Nt } from "./MenuItem.vue_vue_type_style_index_0_lang-D-_-Iv3Y.js";
26
26
  import "@iconify/vue";
27
- import { _ as $t } from "./Checkbox.vue_vue_type_style_index_0_lang-B37LXBOT.js";
27
+ import { _ as $t } from "./Checkbox.vue_vue_type_style_index_0_lang-AH6hpVLK.js";
28
28
  import "@pantograph/tokens";
29
29
  const [Te, Ft] = Ge("Combobox"), [Wt, Gt] = Ge("_Combobox"), E = _t("combobox");
30
30
  var Ut = 1 / 0;
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),j=require("reka-ui"),a=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),oe=require("./options-CY2uxp5A.js"),i=require("@pantograph/utils"),b=require("./index-BmcHqJPl.js"),ve=require("class-variance-authority"),Le=require("./Empty.vue_vue_type_style_index_0_lang-CLG9v3ny.js"),ze=require("./Skeleton.vue_vue_type_style_index_0_lang-vYeWc1nI.js"),fe=require("./Divider.vue_vue_type_style_index_0_lang-B1VnMpBg.js"),xe=require("./useInputDataStates-CXaVG_o2.js"),De=require("./useLazyLoading-H6VG5aE-.js"),Ve=require("./Popover.vue_vue_type_style_index_0_lang-qJ0psPTx.js"),Me=require("./ScrollContainer.vue_vue_type_style_index_0_lang-BLFtmUwR.js"),we=require("./Tree.vue_vue_type_style_index_0_lang-ZoSOcaY2.js"),Be=require("./uniq-DA_VCwGV.js"),qe=require("./Chip.vue_vue_type_style_index_0_lang-BLjUJgbj.js"),Ae=require("./ChipGroup.vue_vue_type_style_index_0_lang-vXOtvFCA.js"),he=require("./Avatar.vue_vue_type_style_index_0_lang-YkXWR99l.js"),Ne=require("./GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DAXoXPPu.js"),Oe=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-EviuZ52W.js"),Ke=require("./Input.vue_vue_type_style_index_0_lang-DEQgofJ1.js"),Re=require("@vueuse/core"),Fe=require("lodash-es"),We=require("./MenuItem.vue_vue_type_style_index_0_lang-fYybuhKO.js");require("@iconify/vue");const Ge=require("./Checkbox.vue_vue_type_style_index_0_lang-D_UcZD7p.js");require("@pantograph/tokens");const[ce,Ee]=j.createContext("Combobox"),[je,$e]=j.createContext("_Combobox"),w=i.getBemBlock("combobox");var Ue=1/0;function He(u){var n=u==null?0:u.length;return n?a.baseFlatten(u,Ue):[]}const pe=u=>a.isNumber(u)||b.isString(u);function Ye({getValue:u,arr:n,getChildren:o}){const e=[],g=(c,P)=>{c.forEach(T=>{const S=u(T);if(pe(S)){e.push({...T,_parentKeys:P,_key:S});const C=o(T);C!=null&&C.length&&g(C,[...P??[],S])}})};return g(n),e}const Je=({getData:u,getModel:n,getValue:o,getChildren:e})=>{const g=t.computed(()=>Ye({arr:t.unref(u()),getChildren:e,getValue:o})),c=(s,h=!1)=>{const m=o(s);return g.value.filter(p=>{var O;if(h){const V=a.last(p._parentKeys??[]);return V&&V===m}return(O=p._parentKeys)==null?void 0:O.includes(m)})},P=s=>{if(s&&b.isArray(s))return a.cloneDeep(s);const h=t.unref(n());return h&&b.isArray(h)?a.cloneDeep(h):[]},T=(s,h)=>{const m=P(h),p=c(s);if(p!=null&&p.length)return p.some(O=>{var r;const V=O._key;return V&&((r=m==null?void 0:m.includes)==null?void 0:r.call(m,V))})},S=(s,h)=>{const m=P(h),p=c(s);if(p!=null&&p.length)return p.every(O=>{var r;const V=O._key;return V&&((r=m==null?void 0:m.includes)==null?void 0:r.call(m,V))})},C=(s,h)=>{const m=P(h),p=c(s),O=o(s);return p!=null&&p.length?S(s)?!0:T(s)?"intermediate":!1:m.includes(O)},q=s=>pe(s)?g.value.find(h=>h._key===s):void 0;return{flattenData:g,getNodeChildren:c,isSomeChildrenSelected:T,isAllChildrenSelected:S,isSelected:C,selectValues:(s,h)=>{if(s.length){let m=P();const p=s.filter(pe);h?m.push(...p):m=m.filter(v=>!p.includes(v));const O=m.map(q).filter(v=>v&&v._parentKeys),r=Be.uniq(He(O.map(v=>v._parentKeys))).filter(pe).map(q).filter(Boolean),B=[],L=[];return r.forEach(v=>{const G=o(v);S(v,m)?B.push(G):L.push(G)}),m.push(...B),Be.uniq(m.filter(v=>!L.includes(v)))}}}},ye=["sm","md","lg"],Pe=["error","warning","success"],Qe={key:1},ke=t.defineComponent({...oe.getComponentOptions("ComboboxInput"),__name:"ComboboxInput",setup(u){const n=ce();Re.whenever(()=>n.open.value&&n.headerInputElement.value,()=>{n.headerInputElement.value&&n.open.value&&n.focusOnInput()});const o=t.computed(()=>!a.isEmpty(n.modelValue.value)),e=t.computed(()=>{if(o.value){if(n.props.multiple&&b.isArray(n.modelValue.value)&&!n.props.noLastValueOnPlaceholder)return n.getLabelByValue(Fe.last(n.modelValue.value));if(!n.props.multiple&&!b.isArray(n.modelValue.value))return n.getLabelByValue(n.modelValue.value)}return n.props.placeholder??""}),g=T=>{if(T.key==="Backspace"&&n.props.multiple&&b.isArray(n.modelValue.value)&&a.isEmpty(n.searchModel.value)&&(n.setModelValue(n.modelValue.value.slice(0,-1)),a.isEmpty(n.modelValue.value))){const S=setTimeout(()=>{n.focusOnInput(),clearTimeout(S)},2)}},c=i.getBemElement(w,"input"),P=ve.cva(c,{variants:{valuePlaceholder:i.generateVariantClassList("value-placeholder",c)}});return(T,S)=>(t.openBlock(),t.createBlock(t.unref(j.ComboboxInput),t.mergeProps(t.unref(n).comboboxInputBinding.value,{disabled:t.unref(n).getDisabled.value,placeholder:e.value,"as-child":"",modelValue:t.unref(n).searchModel.value,"onUpdate:modelValue":S[0]||(S[0]=C=>t.unref(n).searchModel.value=C),onKeydown:g,class:t.unref(P)({valuePlaceholder:o.value}),displayValue:()=>""}),{default:t.withCtx(()=>[t.unref(n).props.headerSearch?(t.openBlock(),t.createBlock(Ke._sfc_main,{key:0,ref:t.unref(n).headerInputElement,placeholder:t.unref(n).props.placeholder},{leading:t.withCtx(({iconSize:C})=>[t.createVNode(a._sfc_main$3,{size:C,icon:"tabler:search",flipOnDir:"rtl"},null,8,["size"])]),_:1},8,["placeholder"])):(t.openBlock(),t.createElementBlock("input",Qe))]),_:1},16,["disabled","placeholder","modelValue","class"]))}}),Xe=t.defineComponent({name:oe.getComponentName("ComboboxTrigger"),props:{},setup(u,{slots:n,attrs:o}){const e=ce(),g=({value:r},B)=>{if(B.stopPropagation(),r&&b.isArray(e.modelValue.value)&&!e.getDisabled.value){const L=e.modelValue.value.filter(v=>v!==r);e.setModelValue(L)}},c=i.getBemElement(w,"trigger"),P=ve.cva(c,{variants:{size:i.generateVariantClassList(ye,c),headerSearch:i.generateVariantClassList("header-search",c),status:i.generateVariantClassList(Pe,c),bordered:i.generateVariantClassList("bordered",c),multiple:i.generateVariantClassList("multiple",c),contentFit:i.generateVariantClassList("content-fit",c),wrapped:i.generateVariantClassList("wrapped",c),filled:i.generateVariantClassList("filled",c)}}),T=t.computed(()=>{switch(e.getSize.value){case"sm":return"2xsm";case"md":default:return"xsm"}}),S=t.computed(()=>{if(!e.props.multiple&&b.isString(e.modelValue.value)&&!a.isEmpty(e.modelValue.value))return e.getOptionByValue(e.modelValue.value)}),C=(r=S.value)=>{if(e.props.selectedItemIconAsTrailingIcon&&b.isObject(r)&&"icon"in r)return r.icon},q=t.computed(()=>C()),A=t.computed(()=>{if(!e.props.noTrailing)return e.props.trailingIcon}),s=t.computed(()=>{var L,v;const r=a.cloneDeep(e.modelValue.value),B=b.isArray(e.modelValue.value);return{modelValue:r,open:a.cloneDeep(e.open.value),option:B?void 0:e.getOptionByValue(e.modelValue.value),options:B?(v=(L=e.modelValue.value).map)==null?void 0:v.call(L,e.getOptionByValue).filter(Boolean):void 0}}),h=()=>{e.onOpenChange(!e.open.value)},m=r=>{e.props.headerSearch},p=t.computed(()=>({disabled:e.getDisabled.value,tabindex:e.getDisabled.value||!e.props.headerSearch?-1:0,reference:e.props.reference,"data-disabled":e.getDisabled.value?"":void 0,"aria-disabled":e.getDisabled.value??void 0,"aria-label":"Show popup","aria-haspopup":"listbox","aria-expanded":e.open.value,"aria-controls":e.contentId,"data-state":e.open.value?"open":"closed",class:i.normCls(P({size:e.getSize.value,status:e.getStatus.value==="success"&&a.isEmpty(e.modelValue.value)?void 0:e.getStatus.value,bordered:e.props.bordered,multiple:e.props.multiple,contentFit:e.props.contentFit,wrapped:e.props.wrapped,filled:!a.isEmpty(e.modelValue.value),headerSearch:e.props.headerSearch}),e.props.triggerCls),...o})),O=(r,B=T.value)=>t.h(a._sfc_main$3,{icon:r,size:B}),V=()=>{var L;let r;const B=(L=n.triggerTrailing)==null?void 0:L.call(n,s.value);if(a.isEmptyElement(B)?A.value&&(r=O(A.value)):r=B,r)return t.h("div",{class:i.normCls(i.getBemElement(c,"trailing"),e.props.triggerTrailingCls)},r)};return()=>{var X;const r=(X=n.trigger)==null?void 0:X.call(n,s.value),B=!a.isEmptyElement(r),v=(()=>{if(!B)return!1;const Y=a.filterEmpty(r)??null,J=Y.length===1?Y[0]:Y;return J?a.isValidElement(J)&&!a.isFragment(J):!0})(),{class:G,...H}=p.value;return t.h(j.ComboboxAnchor,{...H,class:B?e.props.triggerCls:G,...e.comboboxTriggerBinding.value,asChild:v,as:v?"template":"button",key:String(v),onKeyUp:m,onClick:h},()=>{if(B)return r;const Y=k=>{var R,N;const K=e.getOptionByValue(k)??{value:k};return t.h(he._sfc_main,{...K?((N=(R=e.props).getTagProps)==null?void 0:N.call(R,K))??{}:{},size:e.getTagSize.value})},J=k=>{var R,N;const K=e.getOptionByValue(k)??{value:k};return t.h(Oe._sfc_main,{...K?((N=(R=e.props).getTagProps)==null?void 0:N.call(R,K))??{}:{},size:e.getTagSize.value})},Q=()=>{if(!e.props.multiple&&!e.props.multiple&&!b.isArray(e.modelValue.value)&&e.modelValue.value&&(e.props.tagRenderMode&&["avatar","go"].includes(e.props.tagRenderMode)||q.value||e.props.leadingIcon)){let k;if(e.props.tagRenderMode==="avatar"?k=Y(e.modelValue.value):e.props.tagRenderMode==="go"?k=J(e.modelValue.value):q.value?k=O(q.value):e.props.leadingIcon&&(k=O(e.props.leadingIcon)),!a.isEmptyElement(k))return t.h("div",{class:i.normCls(i.getBemElement(c,"leading"),e.props.triggerLeadingCls)},k)}},ae=()=>{const k=[],K=[i.getBemElement(c,"tags"),e.props.triggerContentCls,e.props.triggerContentValueCls],N=(()=>{if(e.props.multiple&&b.isArray(e.modelValue.value)){if(e.props.tagRenderMode==="avatar")return t.h(he._sfc_main$1,{maxCount:e.props.maxCount,size:e.getTagSize.value,closeable:!e.getDisabled.value,noPopover:!0,noWrap:!e.props.wrapped,class:K},()=>e.modelValue.value.map(Y));if(e.props.tagRenderMode==="go")return t.h(Ne._sfc_main,{maxCount:e.props.maxCount,size:e.getTagSize.value,closeable:!e.getDisabled.value,noPopover:!0,noWrap:!e.props.wrapped,class:K},()=>e.modelValue.value.map(J));if(e.props.tagRenderMode==="chip")return t.h(Ae._sfc_main,{maxCount:e.props.maxCount,size:e.getTagSize.value,color:"primary",closeable:!e.getDisabled.value,noPopover:!0,noWrap:!e.props.wrapped,class:K,onClose:g},()=>e.modelValue.value.map($=>{var ie,te;const ne=()=>e.getLabelByValue($),de=({size:ge})=>{const ue=C(e.getOptionByValue($))??e.props.leadingIcon;return ue?O(ue,ge):null},le=e.getOptionByValue($);return t.h(qe._sfc_main,{...le?((te=(ie=e.props).getTagProps)==null?void 0:te.call(ie,le))??{}:{},value:$,class:i.normCls(i.getBemElement(c,"tag"),e.props.tagCls),closeIconCls:i.getBemElement(c,"tag__close")},{text:ne,leading:de})}))}})();return N&&k.push(N),e.props.headerSearch?e.props.showLabelValueOnHeaderSearch&&!e.props.multiple&&b.isString(e.modelValue.value)&&k.push(t.h("div",{class:i.getBemElement(c,"content__value")},e.getLabelByValue(e.modelValue.value))):k.push(t.h(ke)),t.h("div",{class:i.getBemElement(c,"content")},k)},ee=[],Z=Q();a.isEmptyElement(Z)||ee.push(Z),ee.push(ae());const se=V();return a.isEmptyElement(se)||ee.push(se),ee})}}}),Ze=t.defineComponent({...oe.getComponentOptions("ComboboxLabel"),__name:"ComboboxLabel",setup(u){return(n,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(i.getBemElement)(t.unref(w),"label"))},[t.renderSlot(n.$slots,"default")],2))}}),Se=t.defineComponent({name:oe.getComponentName("ComboboxOption"),props:{option:{type:[Object,String],required:!0}},slots:Object,setup(u,{slots:n}){const o=ce(),e=t.computed(()=>{switch(o.getSize.value){case"sm":return"2xsm";case"lg":return"sm";case"md":default:return"xsm"}}),g=t.computed(()=>o.getOptionValue(u.option)),c=t.computed(()=>o.getOptionNoCheckbox(u.option)),P=t.computed(()=>o.getOptionClear(u.option)),T=t.computed(()=>o.getOptionSingle(u.option)),S=t.computed(()=>o.getOptionLabel(u.option)),C=t.computed(()=>o.getOptionIcon(u.option)),q=t.computed(()=>o.props.tree?void 0:o.getOptionDescription(u.option)),A=t.computed(()=>o.getOptionDisabled(u.option)),s=t.computed(()=>o.isItemSelected(g.value)),h=i.getBemElement(w,"option"),m=()=>{if(!(o.props.tree||!g.value||A.value))if(o.props.multiple)if(P.value)o.setModelValue([]),o.emit("select",void 0,!1);else if(T.value)o.setModelValue([g.value]),o.emit("select",g.value,!0,u.option);else{let p=b.isArray(o.modelValue.value)?o.modelValue.value:[];const O=p.includes(g.value);p.length===1&&o.getSingleByValue(p[0])&&g.value!==p[0]&&(p=[]),O?(o.setModelValue(p.filter(V=>V!==g.value)),o.emit("select",g.value,!0,u.option)):(o.setModelValue([...p,g.value]),o.emit("select",g.value,!1,u.option))}else P.value?(o.setModelValue(void 0),o.emit("select",void 0,!1)):(o.setModelValue(g.value),o.emit("select",g.value,!0,u.option))};if(!u.option)throw new Error("option is required");return()=>{const p=V=>{var L,v,G,H,X;const r=[];!o.props.tree&&o.props.multiple&&o.props.checkbox&&!c.value&&r.push(t.h(Ge._sfc_main,{modelValue:s.value,size:V.checkboxSize,disabled:A.value}));const B=(L=n.leading)==null?void 0:L.call(n,{option:u.option});return a.isEmptyElement(B)?o.props.tagRenderMode==="avatar"?r.push(t.h(he._sfc_main,{...((G=(v=o.props).getTagProps)==null?void 0:G.call(v,u.option))??{},size:o.getTagSize.value})):o.props.tagRenderMode==="go"?r.push(t.h(Oe._sfc_main,{...((X=(H=o.props).getTagProps)==null?void 0:X.call(H,u.option))??{},size:o.getTagSize.value})):C.value&&r.push(t.h(a._sfc_main$3,{icon:C.value,size:e.value})):r.push(B),a.isEmptyElement(r)?null:r};return(()=>{const V=!!q.value;return t.h(We._sfc_main$1,{class:h,description:q.value,title:S.value,key:g.value,selected:s.value,unFocusable:!0,leadingCenter:!V,size:o.getSize.value,disabled:A.value,onClick:m},{leading:p,trailing:()=>{var r;return(r=n.trailing)==null?void 0:r.call(n,{option:u.option})}})})()}}}),et=t.defineComponent({name:oe.getComponentName("ComboboxWrapper"),setup(u,{slots:n}){const o=je(),e=j.injectComboboxRootContext(),g=t.ref();De.useLazyLoading({target:g});const c=t.ref(),P=Ve.getPopoverPortalProps({triggerRef:c,props:o.props}),{getFlipOnDir:T,getDir:S}=b.useConfig(),C=T("reversePlacementOnDir"),q=S(),A=Ve.getPopoverContentProps({props:o.props,flip:C,emitsAsProps:o.emitsAsProps,_dir:q,controlAutoFocus:!1,extraPropNames:["bodyLock","position"]}),s=({key:l,getterKey:d,defaultValue:y,noReturnOption:I})=>_=>{const D=b.isFunction(y)?y(_):y;if(b.isObject(_)){const F=_[l]??D,W=d&&o.props[d];if(W){if(b.isString(W))return _[W]??F;if(b.isFunction(W))return W(_)??F}return F}return b.isString(_)&&!I?_??D:D},h=s({getterKey:"getValue",key:"value"}),m=s({getterKey:"getNoCheckbox",key:"noCheckbox"}),p=s({getterKey:"getSingle",key:"single",noReturnOption:!0}),O=s({getterKey:"getClear",key:"clear",noReturnOption:!0}),V=s({getterKey:"getLabel",key:"label",defaultValue:h}),r=s({getterKey:"getIcon",key:"icon",noReturnOption:!0}),B=s({getterKey:"getDescription",key:"description",noReturnOption:!0}),L=s({getterKey:"getDisabled",key:"disabled",defaultValue:!1,noReturnOption:!0}),v=s({getterKey:"getGroupLabel",key:"label",noReturnOption:!0}),G=s({getterKey:"getGroupOptions",key:"options",noReturnOption:!0}),H=l=>{const d=y=>{if(y!=null&&y.length&&l)for(const I of y){if(h(I)===l)return I;const _=G(I);if(_!=null&&_.length){const D=d(_);if(D)return D}}};return d(o.props.options)},X=l=>{const d=H(l);return d?V(d)??l:l},Y=l=>{const d=H(l);return d?p(d)??!1:!1},{contains:J}=j.useFilter({sensitivity:"base"}),Q=t.computed(()=>{const l=d=>d==null?void 0:d.map(y=>{const I=V(y),_=h(y),D=L(y),F=v(y),W=!o.searchModel.value||I&&J(I,o.searchModel.value),f=G(y),E=!o.props.tree||_;if(f&&E){const x=l(f);if(x!=null&&x.length||W)return{groupLabel:F,title:I,key:_,disabled:D,children:x,_option:y}}return W&&E?{title:I,key:_,disabled:D,_option:y}:null}).filter(Boolean);if(o.props.options)return l(o.props.options)}),{getDisabled:ae,getStatus:ee,getSize:Z}=xe.useFormInput({getDisabled:()=>o.props.disabled,getSize:()=>o.props.size,getStatus:()=>o.props.status}),se=t.computed(()=>{switch(Z.value){case"sm":return"xsm";case"lg":return"md";case"md":default:return"sm"}}),{inputBindings:k,rootBindings:K}=xe.UseInputDataStates({getDisabled:()=>ae.value}),R=t.ref(),N=()=>{var l,d,y,I,_,D,F;e.open.value&&e.inputElement.value&&(o.props.headerSearch&&((l=R.value)!=null&&l.input)?document.activeElement!==((d=R.value)==null?void 0:d.input)&&((_=(I=(y=R.value)==null?void 0:y.input)==null?void 0:I.focus)==null||_.call(I)):document.activeElement!==e.inputElement.value&&((F=(D=e.inputElement.value)==null?void 0:D.focus)==null||F.call(D)))},$=l=>{e.modelValue.value=l,o.emit("update:modelValue",l)},ne=l=>l===void 0?!1:Array.isArray(e.modelValue.value)?!!(l&&e.modelValue.value.includes(l)):e.modelValue.value===l;Ee({...o,getOptionValue:h,getOptionLabel:V,getOptionSingle:p,getOptionClear:O,getOptionNoCheckbox:m,getOptionDescription:B,getOptionDisabled:L,getOptionIcon:r,getOptionByValue:H,isItemSelected:ne,getLabelByValue:X,getSingleByValue:Y,focusOnInput:N,setModelValue:$,headerInputElement:R,getDisabled:ae,getStatus:ee,getSize:Z,getTagSize:se,comboboxInputBinding:k,comboboxTriggerBinding:K,...e,modelValue:e.modelValue}),t.watch(()=>[o.props.clearOnChangeMultiple,o.props.multiple],()=>{o.props.clearOnChangeMultiple&&$(void 0)});const de=t.computed(()=>{const l=o.props.scrollContainerProps??{};return{...l,areaCls:[i.getBemElement(w,"scroll_area"),l==null?void 0:l.class,l==null?void 0:l.areaCls]}}),le=i.getBemElement(w,"popup"),ie=ve.cva(le,{variants:{size:i.generateVariantClassList(ye,le)}}),te=l=>{if(a.isNumber(l))return`${l}px`;if(typeof l=="string")return l},ge=t.computed(()=>te(o.props.popupWidth)),ue=t.computed(()=>te(o.props.popupHeight)),_e=t.computed(()=>te(o.props.minWidth)),be=t.computed(()=>({type:Z.value==="sm"?"simple":"advance",...a.omit(o.props.emptyProps??{},"class")})),Ie=t.computed(()=>a.omit(o.props.skeletonProps??{},"class")),{selectValues:Te}=Je({getValue:l=>l==null?void 0:l.key,getChildren:l=>l==null?void 0:l.children,getModel:()=>a.cloneDeep(e.modelValue.value),getData:()=>a.cloneDeep(Q.value??[])});return()=>{var F,W;const l=f=>t.h(Se,{option:f},{trailing:n.optionTrailing,leading:n.optionLeading}),d=[];let y;if(o.props.tree){const E=b.isArray(e.modelValue.value)?e.modelValue.value:e.modelValue.value?[e.modelValue.value]:[];y=t.h(we._sfc_main,{data:Q.value??[],selectable:!0,checkbox:o.props.multiple&&o.props.checkbox,multiple:o.props.multiple,defaultExpandAll:!0,syncCheckboxAndSelect:o.props.multiple,showLine:!0,modelValue:E,checkedKeys:E,onExpand:N,onSelect:(x,M,z)=>{if(o.props.multiple){const U=b.isArray(z)?z:[z];$(Te(U,M))}else $(z)},class:"w-full"},{title:x=>l(x._option)}),d.push(y)}else{let f=!1;const E=[];if((Q.value??[]).forEach(x=>{var M;if((M=x.children)!=null&&M.length){const z=[];x.children.forEach(U=>{const re=l(U._option);ne(h(U._option))&&o.props.sortSelectedItems?E.push(re):z.push(re)}),z.length&&((f||d.length)&&(d.push(t.h(fe._sfc_main)),f=!1),x.groupLabel&&d.push(t.h(Ze,{class:o.props.labelCls},()=>x.groupLabel)),d.push(...z),f=!0)}else{const z=l(x._option);ne(h(x._option))&&o.props.sortSelectedItems?E.push(z):(f&&(d.push(t.h(fe._sfc_main)),f=!1),d.push(z))}}),o.props.sortSelectedItems&&E.length){const x=!!d.length;d.splice(0,0,...E),x&&d.splice(E.length,0,t.h(fe._sfc_main))}}const I=a.flattenChildrenByType(y?[y]:d,Se).filter(f=>{var E;return b.isObject(f==null?void 0:f.props)&&((E=f==null?void 0:f.props)==null?void 0:E.option)}),_=!!(o.props.tree&&((F=Q.value)!=null&&F.length)||I!=null&&I.length),D=()=>{var E,x;const f=[];if(_||o.props.loading){const M=[];if(_&&M.push(...d),o.props.loading){const z=(E=n.loading)==null?void 0:E.call(n,{});if(!a.isEmptyElement(z))M.push(z);else{const U=new Array(_?2:o.props.loadingRowCount).fill(1);M.push(...U.map(()=>t.h(ze._sfc_main,{size:Z.value,class:i.normCls(i.getBemElement(w,"skeleton"),o.props.skeletonCls),...Ie.value})))}}f.push(t.h("div",{class:i.normCls(i.getBemElement(w,"options"),o.props.optionsCls)},M))}else if(!_){const M=(x=n.empty)==null?void 0:x.call(n,be.value);a.isEmptyElement(M)?f.push(t.h(Le._sfc_main,{class:i.normCls(i.getBemElement(w,"empty"),o.props.emptyCls),...be.value},{title:n.emptyTitle,description:n.emptyDescription,actions:n.emptyActions,image:n.emptyImage})):f.push(M)}return o.props.lazyLoading&&f.push(t.h("div",{class:i.getBemElement(w,"lazy_loading")},t.h("div",{class:i.getBemElement(w,"lazy_loading_trigger"),ref:g}))),f};return[o.props.noTrigger?null:t.h(Xe,{ref:c,...o.attrs,style:{...((W=o.attrs)==null?void 0:W.style)??{},"--ptc-combobox-trigger-min-w":_e.value}},{trigger:n.trigger,triggerTrailing:n.triggerTrailing}),t.h(j.ComboboxPortal,P.value,()=>t.h(j.ComboboxContent,{...A.value,vShow:e.open.value,class:i.normCls(ie(o.props),o.props.popupCls),style:{zIndex:o.props.zIndex,"--ptc-combobox-popup-width":o.props.samePopupWidth?void 0:ge.value,"--ptc-combobox-popup-height":ue.value,"--ptc-combobox-trigger-min-w":_e.value},onClick:N},()=>{var z,U,re,Ce;const f=[],E=(U=n.header)==null?void 0:U.call(n,{isEmpty:!((z=Q.value)!=null&&z.length),search:o.searchModel.value}),x=!a.isEmptyElement(E);if(o.props.headerSearch||x){const me=[];x&&me.push(E),o.props.headerSearch&&me.push(t.h(ke)),f.push(t.h("div",{class:i.getBemElement(w,"header")},me))}f.push(t.h(Me._sfc_main,de.value,D));const M=(Ce=n.footer)==null?void 0:Ce.call(n,{isEmpty:!((re=Q.value)!=null&&re.length),search:o.searchModel.value});return a.isEmptyElement(M)||f.push(t.h("div",{class:i.getBemElement(w,"footer")},M)),f}))]}}}),tt=t.defineComponent({...oe.getComponentOptions("Combobox"),__name:"Combobox",props:{size:{default:"md"},status:{},multiple:{type:Boolean,default:void 0},noLastValueOnPlaceholder:{type:Boolean},showLabelValueOnHeaderSearch:{type:Boolean},zIndex:{},checkbox:{type:Boolean,default:!0},tagRenderMode:{default:"chip"},getTagProps:{},tree:{type:Boolean},contentFit:{type:Boolean},wrapped:{type:Boolean},sortSelectedItems:{type:Boolean},noTrailing:{type:Boolean},leadingIcon:{},trailingIcon:{default:"tabler:chevron-down"},selectedItemIconAsTrailingIcon:{type:Boolean,default:!0},maxCount:{},to:{},placeholder:{},indicatorIcon:{default:"tabler:check"},options:{},getDisabled:{},getLabel:{},getDescription:{},getValue:{},getNoCheckbox:{},getSingle:{},getClear:{},getGroupOptions:{},getGroupLabel:{},getIcon:{},placement:{default:"bottom-start"},reversePlacementOnDir:{},loading:{type:Boolean},skeletonProps:{},loadingRowCount:{default:10},lazyLoading:{type:Boolean},bordered:{type:Boolean,default:!0},clearOnChangeMultiple:{type:Boolean,default:!0},triggerCls:{},triggerLeadingCls:{},triggerContentCls:{},triggerContentPlaceholderCls:{},triggerContentValueCls:{},triggerTrailingCls:{},itemLeadingCls:{},optionCls:{},tagCls:{},popupCls:{},labelCls:{},optionsCls:{},optionTextCls:{},optionContentCls:{},emptyCls:{},skeletonCls:{},scrollContainerProps:{},emptyProps:{},samePopupWidth:{type:Boolean,default:!0},popupHeight:{default:384},popupWidth:{},minWidth:{},headerSearch:{type:Boolean},search:{},noTrigger:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},resetSearchTermOnBlur:{type:Boolean,default:!0},resetSearchTermOnSelect:{type:Boolean,default:!0},modelValue:{},defaultValue:{},dir:{},disabled:{type:Boolean,default:void 0},highlightOnHover:{type:Boolean},by:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},reference:{},forceMount:{type:Boolean,default:void 0},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean,default:void 0},collisionBoundary:{},collisionPadding:{default:4},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean,default:void 0},positionStrategy:{default:"fixed"},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean,default:void 0},prioritizePosition:{type:Boolean,default:void 0},disableOutsidePointerEvents:{type:Boolean},defer:{type:Boolean}},emits:["update:search","select","update:modelValue","highlight","update:open","escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(u,{emit:n}){const o=u,e=n,g=j.useEmitAsProps(e),c=t.computed(()=>a.omitBy({...a.pick(o,"open","defaultOpen","defaultValue","modelValue","by","dir","multiple","disabled"),...a.pick(g,"onUpdate:modelValue","onUpdate:open"),ignoreFilter:!0},a.isUndefined)),P=a.useVModel(o,"search",e,{passive:o.search===void 0});t.watch(()=>o.open,C=>{C||(P.value=void 0)});const T=t.useSlots(),S=t.useAttrs();return $e({attrs:S,props:o,emit:e,searchModel:P,emitsAsProps:g}),(C,q)=>(t.openBlock(),t.createBlock(t.unref(j.ComboboxRoot),t.mergeProps(c.value,{class:t.unref(w)}),{default:t.withCtx(()=>[t.createVNode(t.unref(et),null,t.createSlots({_:2},[t.renderList(Object.keys(T),A=>({name:A,fn:t.withCtx(s=>[t.renderSlot(C.$slots,A,t.normalizeProps(t.guardReactiveProps(s)))])}))]),1024)]),_:3},16,["class"]))}});exports.ComboboxSizes=ye;exports.ComboboxStatuses=Pe;exports._sfc_main=tt;exports.injectComboboxContext=ce;exports.provideComboboxContext=Ee;
1
+ "use strict";const t=require("vue"),j=require("reka-ui"),a=require("./Icon.vue_vue_type_style_index_0_lang-CPuN4R-k.js"),oe=require("./options-CY2uxp5A.js"),i=require("@pantograph/utils"),b=require("./index-BmcHqJPl.js"),ve=require("class-variance-authority"),Le=require("./Empty.vue_vue_type_style_index_0_lang-CLG9v3ny.js"),ze=require("./Skeleton.vue_vue_type_style_index_0_lang-vYeWc1nI.js"),fe=require("./Divider.vue_vue_type_style_index_0_lang-B1VnMpBg.js"),xe=require("./useInputDataStates-CXaVG_o2.js"),De=require("./useLazyLoading-H6VG5aE-.js"),Ve=require("./Popover.vue_vue_type_style_index_0_lang-qJ0psPTx.js"),Me=require("./ScrollContainer.vue_vue_type_style_index_0_lang-BLFtmUwR.js"),we=require("./Tree.vue_vue_type_style_index_0_lang-D97fT1Cb.js"),Be=require("./uniq-DA_VCwGV.js"),qe=require("./Chip.vue_vue_type_style_index_0_lang-BLjUJgbj.js"),Ae=require("./ChipGroup.vue_vue_type_style_index_0_lang-vXOtvFCA.js"),he=require("./Avatar.vue_vue_type_style_index_0_lang-D_26B5fC.js"),Ne=require("./GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DAXoXPPu.js"),Oe=require("./GraphicalObject.vue_vue_type_script_setup_true_lang-CX1uOlz9.js"),Ke=require("./Input.vue_vue_type_style_index_0_lang-DEQgofJ1.js"),Re=require("@vueuse/core"),Fe=require("lodash-es"),We=require("./MenuItem.vue_vue_type_style_index_0_lang-fYybuhKO.js");require("@iconify/vue");const Ge=require("./Checkbox.vue_vue_type_style_index_0_lang-D_UcZD7p.js");require("@pantograph/tokens");const[ce,Ee]=j.createContext("Combobox"),[je,$e]=j.createContext("_Combobox"),w=i.getBemBlock("combobox");var Ue=1/0;function He(u){var n=u==null?0:u.length;return n?a.baseFlatten(u,Ue):[]}const pe=u=>a.isNumber(u)||b.isString(u);function Ye({getValue:u,arr:n,getChildren:o}){const e=[],g=(c,P)=>{c.forEach(T=>{const S=u(T);if(pe(S)){e.push({...T,_parentKeys:P,_key:S});const C=o(T);C!=null&&C.length&&g(C,[...P??[],S])}})};return g(n),e}const Je=({getData:u,getModel:n,getValue:o,getChildren:e})=>{const g=t.computed(()=>Ye({arr:t.unref(u()),getChildren:e,getValue:o})),c=(s,h=!1)=>{const m=o(s);return g.value.filter(p=>{var O;if(h){const V=a.last(p._parentKeys??[]);return V&&V===m}return(O=p._parentKeys)==null?void 0:O.includes(m)})},P=s=>{if(s&&b.isArray(s))return a.cloneDeep(s);const h=t.unref(n());return h&&b.isArray(h)?a.cloneDeep(h):[]},T=(s,h)=>{const m=P(h),p=c(s);if(p!=null&&p.length)return p.some(O=>{var r;const V=O._key;return V&&((r=m==null?void 0:m.includes)==null?void 0:r.call(m,V))})},S=(s,h)=>{const m=P(h),p=c(s);if(p!=null&&p.length)return p.every(O=>{var r;const V=O._key;return V&&((r=m==null?void 0:m.includes)==null?void 0:r.call(m,V))})},C=(s,h)=>{const m=P(h),p=c(s),O=o(s);return p!=null&&p.length?S(s)?!0:T(s)?"intermediate":!1:m.includes(O)},q=s=>pe(s)?g.value.find(h=>h._key===s):void 0;return{flattenData:g,getNodeChildren:c,isSomeChildrenSelected:T,isAllChildrenSelected:S,isSelected:C,selectValues:(s,h)=>{if(s.length){let m=P();const p=s.filter(pe);h?m.push(...p):m=m.filter(v=>!p.includes(v));const O=m.map(q).filter(v=>v&&v._parentKeys),r=Be.uniq(He(O.map(v=>v._parentKeys))).filter(pe).map(q).filter(Boolean),B=[],L=[];return r.forEach(v=>{const G=o(v);S(v,m)?B.push(G):L.push(G)}),m.push(...B),Be.uniq(m.filter(v=>!L.includes(v)))}}}},ye=["sm","md","lg"],Pe=["error","warning","success"],Qe={key:1},ke=t.defineComponent({...oe.getComponentOptions("ComboboxInput"),__name:"ComboboxInput",setup(u){const n=ce();Re.whenever(()=>n.open.value&&n.headerInputElement.value,()=>{n.headerInputElement.value&&n.open.value&&n.focusOnInput()});const o=t.computed(()=>!a.isEmpty(n.modelValue.value)),e=t.computed(()=>{if(o.value){if(n.props.multiple&&b.isArray(n.modelValue.value)&&!n.props.noLastValueOnPlaceholder)return n.getLabelByValue(Fe.last(n.modelValue.value));if(!n.props.multiple&&!b.isArray(n.modelValue.value))return n.getLabelByValue(n.modelValue.value)}return n.props.placeholder??""}),g=T=>{if(T.key==="Backspace"&&n.props.multiple&&b.isArray(n.modelValue.value)&&a.isEmpty(n.searchModel.value)&&(n.setModelValue(n.modelValue.value.slice(0,-1)),a.isEmpty(n.modelValue.value))){const S=setTimeout(()=>{n.focusOnInput(),clearTimeout(S)},2)}},c=i.getBemElement(w,"input"),P=ve.cva(c,{variants:{valuePlaceholder:i.generateVariantClassList("value-placeholder",c)}});return(T,S)=>(t.openBlock(),t.createBlock(t.unref(j.ComboboxInput),t.mergeProps(t.unref(n).comboboxInputBinding.value,{disabled:t.unref(n).getDisabled.value,placeholder:e.value,"as-child":"",modelValue:t.unref(n).searchModel.value,"onUpdate:modelValue":S[0]||(S[0]=C=>t.unref(n).searchModel.value=C),onKeydown:g,class:t.unref(P)({valuePlaceholder:o.value}),displayValue:()=>""}),{default:t.withCtx(()=>[t.unref(n).props.headerSearch?(t.openBlock(),t.createBlock(Ke._sfc_main,{key:0,ref:t.unref(n).headerInputElement,placeholder:t.unref(n).props.placeholder},{leading:t.withCtx(({iconSize:C})=>[t.createVNode(a._sfc_main$3,{size:C,icon:"tabler:search",flipOnDir:"rtl"},null,8,["size"])]),_:1},8,["placeholder"])):(t.openBlock(),t.createElementBlock("input",Qe))]),_:1},16,["disabled","placeholder","modelValue","class"]))}}),Xe=t.defineComponent({name:oe.getComponentName("ComboboxTrigger"),props:{},setup(u,{slots:n,attrs:o}){const e=ce(),g=({value:r},B)=>{if(B.stopPropagation(),r&&b.isArray(e.modelValue.value)&&!e.getDisabled.value){const L=e.modelValue.value.filter(v=>v!==r);e.setModelValue(L)}},c=i.getBemElement(w,"trigger"),P=ve.cva(c,{variants:{size:i.generateVariantClassList(ye,c),headerSearch:i.generateVariantClassList("header-search",c),status:i.generateVariantClassList(Pe,c),bordered:i.generateVariantClassList("bordered",c),multiple:i.generateVariantClassList("multiple",c),contentFit:i.generateVariantClassList("content-fit",c),wrapped:i.generateVariantClassList("wrapped",c),filled:i.generateVariantClassList("filled",c)}}),T=t.computed(()=>{switch(e.getSize.value){case"sm":return"2xsm";case"md":default:return"xsm"}}),S=t.computed(()=>{if(!e.props.multiple&&b.isString(e.modelValue.value)&&!a.isEmpty(e.modelValue.value))return e.getOptionByValue(e.modelValue.value)}),C=(r=S.value)=>{if(e.props.selectedItemIconAsTrailingIcon&&b.isObject(r)&&"icon"in r)return r.icon},q=t.computed(()=>C()),A=t.computed(()=>{if(!e.props.noTrailing)return e.props.trailingIcon}),s=t.computed(()=>{var L,v;const r=a.cloneDeep(e.modelValue.value),B=b.isArray(e.modelValue.value);return{modelValue:r,open:a.cloneDeep(e.open.value),option:B?void 0:e.getOptionByValue(e.modelValue.value),options:B?(v=(L=e.modelValue.value).map)==null?void 0:v.call(L,e.getOptionByValue).filter(Boolean):void 0}}),h=()=>{e.onOpenChange(!e.open.value)},m=r=>{e.props.headerSearch},p=t.computed(()=>({disabled:e.getDisabled.value,tabindex:e.getDisabled.value||!e.props.headerSearch?-1:0,reference:e.props.reference,"data-disabled":e.getDisabled.value?"":void 0,"aria-disabled":e.getDisabled.value??void 0,"aria-label":"Show popup","aria-haspopup":"listbox","aria-expanded":e.open.value,"aria-controls":e.contentId,"data-state":e.open.value?"open":"closed",class:i.normCls(P({size:e.getSize.value,status:e.getStatus.value==="success"&&a.isEmpty(e.modelValue.value)?void 0:e.getStatus.value,bordered:e.props.bordered,multiple:e.props.multiple,contentFit:e.props.contentFit,wrapped:e.props.wrapped,filled:!a.isEmpty(e.modelValue.value),headerSearch:e.props.headerSearch}),e.props.triggerCls),...o})),O=(r,B=T.value)=>t.h(a._sfc_main$3,{icon:r,size:B}),V=()=>{var L;let r;const B=(L=n.triggerTrailing)==null?void 0:L.call(n,s.value);if(a.isEmptyElement(B)?A.value&&(r=O(A.value)):r=B,r)return t.h("div",{class:i.normCls(i.getBemElement(c,"trailing"),e.props.triggerTrailingCls)},r)};return()=>{var X;const r=(X=n.trigger)==null?void 0:X.call(n,s.value),B=!a.isEmptyElement(r),v=(()=>{if(!B)return!1;const Y=a.filterEmpty(r)??null,J=Y.length===1?Y[0]:Y;return J?a.isValidElement(J)&&!a.isFragment(J):!0})(),{class:G,...H}=p.value;return t.h(j.ComboboxAnchor,{...H,class:B?e.props.triggerCls:G,...e.comboboxTriggerBinding.value,asChild:v,as:v?"template":"button",key:String(v),onKeyUp:m,onClick:h},()=>{if(B)return r;const Y=k=>{var R,N;const K=e.getOptionByValue(k)??{value:k};return t.h(he._sfc_main,{...K?((N=(R=e.props).getTagProps)==null?void 0:N.call(R,K))??{}:{},size:e.getTagSize.value})},J=k=>{var R,N;const K=e.getOptionByValue(k)??{value:k};return t.h(Oe._sfc_main,{...K?((N=(R=e.props).getTagProps)==null?void 0:N.call(R,K))??{}:{},size:e.getTagSize.value})},Q=()=>{if(!e.props.multiple&&!e.props.multiple&&!b.isArray(e.modelValue.value)&&e.modelValue.value&&(e.props.tagRenderMode&&["avatar","go"].includes(e.props.tagRenderMode)||q.value||e.props.leadingIcon)){let k;if(e.props.tagRenderMode==="avatar"?k=Y(e.modelValue.value):e.props.tagRenderMode==="go"?k=J(e.modelValue.value):q.value?k=O(q.value):e.props.leadingIcon&&(k=O(e.props.leadingIcon)),!a.isEmptyElement(k))return t.h("div",{class:i.normCls(i.getBemElement(c,"leading"),e.props.triggerLeadingCls)},k)}},ae=()=>{const k=[],K=[i.getBemElement(c,"tags"),e.props.triggerContentCls,e.props.triggerContentValueCls],N=(()=>{if(e.props.multiple&&b.isArray(e.modelValue.value)){if(e.props.tagRenderMode==="avatar")return t.h(he._sfc_main$1,{maxCount:e.props.maxCount,size:e.getTagSize.value,closeable:!e.getDisabled.value,noPopover:!0,noWrap:!e.props.wrapped,class:K},()=>e.modelValue.value.map(Y));if(e.props.tagRenderMode==="go")return t.h(Ne._sfc_main,{maxCount:e.props.maxCount,size:e.getTagSize.value,closeable:!e.getDisabled.value,noPopover:!0,noWrap:!e.props.wrapped,class:K},()=>e.modelValue.value.map(J));if(e.props.tagRenderMode==="chip")return t.h(Ae._sfc_main,{maxCount:e.props.maxCount,size:e.getTagSize.value,color:"primary",closeable:!e.getDisabled.value,noPopover:!0,noWrap:!e.props.wrapped,class:K,onClose:g},()=>e.modelValue.value.map($=>{var ie,te;const ne=()=>e.getLabelByValue($),de=({size:ge})=>{const ue=C(e.getOptionByValue($))??e.props.leadingIcon;return ue?O(ue,ge):null},le=e.getOptionByValue($);return t.h(qe._sfc_main,{...le?((te=(ie=e.props).getTagProps)==null?void 0:te.call(ie,le))??{}:{},value:$,class:i.normCls(i.getBemElement(c,"tag"),e.props.tagCls),closeIconCls:i.getBemElement(c,"tag__close")},{text:ne,leading:de})}))}})();return N&&k.push(N),e.props.headerSearch?e.props.showLabelValueOnHeaderSearch&&!e.props.multiple&&b.isString(e.modelValue.value)&&k.push(t.h("div",{class:i.getBemElement(c,"content__value")},e.getLabelByValue(e.modelValue.value))):k.push(t.h(ke)),t.h("div",{class:i.getBemElement(c,"content")},k)},ee=[],Z=Q();a.isEmptyElement(Z)||ee.push(Z),ee.push(ae());const se=V();return a.isEmptyElement(se)||ee.push(se),ee})}}}),Ze=t.defineComponent({...oe.getComponentOptions("ComboboxLabel"),__name:"ComboboxLabel",setup(u){return(n,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(i.getBemElement)(t.unref(w),"label"))},[t.renderSlot(n.$slots,"default")],2))}}),Se=t.defineComponent({name:oe.getComponentName("ComboboxOption"),props:{option:{type:[Object,String],required:!0}},slots:Object,setup(u,{slots:n}){const o=ce(),e=t.computed(()=>{switch(o.getSize.value){case"sm":return"2xsm";case"lg":return"sm";case"md":default:return"xsm"}}),g=t.computed(()=>o.getOptionValue(u.option)),c=t.computed(()=>o.getOptionNoCheckbox(u.option)),P=t.computed(()=>o.getOptionClear(u.option)),T=t.computed(()=>o.getOptionSingle(u.option)),S=t.computed(()=>o.getOptionLabel(u.option)),C=t.computed(()=>o.getOptionIcon(u.option)),q=t.computed(()=>o.props.tree?void 0:o.getOptionDescription(u.option)),A=t.computed(()=>o.getOptionDisabled(u.option)),s=t.computed(()=>o.isItemSelected(g.value)),h=i.getBemElement(w,"option"),m=()=>{if(!(o.props.tree||!g.value||A.value))if(o.props.multiple)if(P.value)o.setModelValue([]),o.emit("select",void 0,!1);else if(T.value)o.setModelValue([g.value]),o.emit("select",g.value,!0,u.option);else{let p=b.isArray(o.modelValue.value)?o.modelValue.value:[];const O=p.includes(g.value);p.length===1&&o.getSingleByValue(p[0])&&g.value!==p[0]&&(p=[]),O?(o.setModelValue(p.filter(V=>V!==g.value)),o.emit("select",g.value,!0,u.option)):(o.setModelValue([...p,g.value]),o.emit("select",g.value,!1,u.option))}else P.value?(o.setModelValue(void 0),o.emit("select",void 0,!1)):(o.setModelValue(g.value),o.emit("select",g.value,!0,u.option))};if(!u.option)throw new Error("option is required");return()=>{const p=V=>{var L,v,G,H,X;const r=[];!o.props.tree&&o.props.multiple&&o.props.checkbox&&!c.value&&r.push(t.h(Ge._sfc_main,{modelValue:s.value,size:V.checkboxSize,disabled:A.value}));const B=(L=n.leading)==null?void 0:L.call(n,{option:u.option});return a.isEmptyElement(B)?o.props.tagRenderMode==="avatar"?r.push(t.h(he._sfc_main,{...((G=(v=o.props).getTagProps)==null?void 0:G.call(v,u.option))??{},size:o.getTagSize.value})):o.props.tagRenderMode==="go"?r.push(t.h(Oe._sfc_main,{...((X=(H=o.props).getTagProps)==null?void 0:X.call(H,u.option))??{},size:o.getTagSize.value})):C.value&&r.push(t.h(a._sfc_main$3,{icon:C.value,size:e.value})):r.push(B),a.isEmptyElement(r)?null:r};return(()=>{const V=!!q.value;return t.h(We._sfc_main$1,{class:h,description:q.value,title:S.value,key:g.value,selected:s.value,unFocusable:!0,leadingCenter:!V,size:o.getSize.value,disabled:A.value,onClick:m},{leading:p,trailing:()=>{var r;return(r=n.trailing)==null?void 0:r.call(n,{option:u.option})}})})()}}}),et=t.defineComponent({name:oe.getComponentName("ComboboxWrapper"),setup(u,{slots:n}){const o=je(),e=j.injectComboboxRootContext(),g=t.ref();De.useLazyLoading({target:g});const c=t.ref(),P=Ve.getPopoverPortalProps({triggerRef:c,props:o.props}),{getFlipOnDir:T,getDir:S}=b.useConfig(),C=T("reversePlacementOnDir"),q=S(),A=Ve.getPopoverContentProps({props:o.props,flip:C,emitsAsProps:o.emitsAsProps,_dir:q,controlAutoFocus:!1,extraPropNames:["bodyLock","position"]}),s=({key:l,getterKey:d,defaultValue:y,noReturnOption:I})=>_=>{const D=b.isFunction(y)?y(_):y;if(b.isObject(_)){const F=_[l]??D,W=d&&o.props[d];if(W){if(b.isString(W))return _[W]??F;if(b.isFunction(W))return W(_)??F}return F}return b.isString(_)&&!I?_??D:D},h=s({getterKey:"getValue",key:"value"}),m=s({getterKey:"getNoCheckbox",key:"noCheckbox"}),p=s({getterKey:"getSingle",key:"single",noReturnOption:!0}),O=s({getterKey:"getClear",key:"clear",noReturnOption:!0}),V=s({getterKey:"getLabel",key:"label",defaultValue:h}),r=s({getterKey:"getIcon",key:"icon",noReturnOption:!0}),B=s({getterKey:"getDescription",key:"description",noReturnOption:!0}),L=s({getterKey:"getDisabled",key:"disabled",defaultValue:!1,noReturnOption:!0}),v=s({getterKey:"getGroupLabel",key:"label",noReturnOption:!0}),G=s({getterKey:"getGroupOptions",key:"options",noReturnOption:!0}),H=l=>{const d=y=>{if(y!=null&&y.length&&l)for(const I of y){if(h(I)===l)return I;const _=G(I);if(_!=null&&_.length){const D=d(_);if(D)return D}}};return d(o.props.options)},X=l=>{const d=H(l);return d?V(d)??l:l},Y=l=>{const d=H(l);return d?p(d)??!1:!1},{contains:J}=j.useFilter({sensitivity:"base"}),Q=t.computed(()=>{const l=d=>d==null?void 0:d.map(y=>{const I=V(y),_=h(y),D=L(y),F=v(y),W=!o.searchModel.value||I&&J(I,o.searchModel.value),f=G(y),E=!o.props.tree||_;if(f&&E){const x=l(f);if(x!=null&&x.length||W)return{groupLabel:F,title:I,key:_,disabled:D,children:x,_option:y}}return W&&E?{title:I,key:_,disabled:D,_option:y}:null}).filter(Boolean);if(o.props.options)return l(o.props.options)}),{getDisabled:ae,getStatus:ee,getSize:Z}=xe.useFormInput({getDisabled:()=>o.props.disabled,getSize:()=>o.props.size,getStatus:()=>o.props.status}),se=t.computed(()=>{switch(Z.value){case"sm":return"xsm";case"lg":return"md";case"md":default:return"sm"}}),{inputBindings:k,rootBindings:K}=xe.UseInputDataStates({getDisabled:()=>ae.value}),R=t.ref(),N=()=>{var l,d,y,I,_,D,F;e.open.value&&e.inputElement.value&&(o.props.headerSearch&&((l=R.value)!=null&&l.input)?document.activeElement!==((d=R.value)==null?void 0:d.input)&&((_=(I=(y=R.value)==null?void 0:y.input)==null?void 0:I.focus)==null||_.call(I)):document.activeElement!==e.inputElement.value&&((F=(D=e.inputElement.value)==null?void 0:D.focus)==null||F.call(D)))},$=l=>{e.modelValue.value=l,o.emit("update:modelValue",l)},ne=l=>l===void 0?!1:Array.isArray(e.modelValue.value)?!!(l&&e.modelValue.value.includes(l)):e.modelValue.value===l;Ee({...o,getOptionValue:h,getOptionLabel:V,getOptionSingle:p,getOptionClear:O,getOptionNoCheckbox:m,getOptionDescription:B,getOptionDisabled:L,getOptionIcon:r,getOptionByValue:H,isItemSelected:ne,getLabelByValue:X,getSingleByValue:Y,focusOnInput:N,setModelValue:$,headerInputElement:R,getDisabled:ae,getStatus:ee,getSize:Z,getTagSize:se,comboboxInputBinding:k,comboboxTriggerBinding:K,...e,modelValue:e.modelValue}),t.watch(()=>[o.props.clearOnChangeMultiple,o.props.multiple],()=>{o.props.clearOnChangeMultiple&&$(void 0)});const de=t.computed(()=>{const l=o.props.scrollContainerProps??{};return{...l,areaCls:[i.getBemElement(w,"scroll_area"),l==null?void 0:l.class,l==null?void 0:l.areaCls]}}),le=i.getBemElement(w,"popup"),ie=ve.cva(le,{variants:{size:i.generateVariantClassList(ye,le)}}),te=l=>{if(a.isNumber(l))return`${l}px`;if(typeof l=="string")return l},ge=t.computed(()=>te(o.props.popupWidth)),ue=t.computed(()=>te(o.props.popupHeight)),_e=t.computed(()=>te(o.props.minWidth)),be=t.computed(()=>({type:Z.value==="sm"?"simple":"advance",...a.omit(o.props.emptyProps??{},"class")})),Ie=t.computed(()=>a.omit(o.props.skeletonProps??{},"class")),{selectValues:Te}=Je({getValue:l=>l==null?void 0:l.key,getChildren:l=>l==null?void 0:l.children,getModel:()=>a.cloneDeep(e.modelValue.value),getData:()=>a.cloneDeep(Q.value??[])});return()=>{var F,W;const l=f=>t.h(Se,{option:f},{trailing:n.optionTrailing,leading:n.optionLeading}),d=[];let y;if(o.props.tree){const E=b.isArray(e.modelValue.value)?e.modelValue.value:e.modelValue.value?[e.modelValue.value]:[];y=t.h(we._sfc_main,{data:Q.value??[],selectable:!0,checkbox:o.props.multiple&&o.props.checkbox,multiple:o.props.multiple,defaultExpandAll:!0,syncCheckboxAndSelect:o.props.multiple,showLine:!0,modelValue:E,checkedKeys:E,onExpand:N,onSelect:(x,M,z)=>{if(o.props.multiple){const U=b.isArray(z)?z:[z];$(Te(U,M))}else $(z)},class:"w-full"},{title:x=>l(x._option)}),d.push(y)}else{let f=!1;const E=[];if((Q.value??[]).forEach(x=>{var M;if((M=x.children)!=null&&M.length){const z=[];x.children.forEach(U=>{const re=l(U._option);ne(h(U._option))&&o.props.sortSelectedItems?E.push(re):z.push(re)}),z.length&&((f||d.length)&&(d.push(t.h(fe._sfc_main)),f=!1),x.groupLabel&&d.push(t.h(Ze,{class:o.props.labelCls},()=>x.groupLabel)),d.push(...z),f=!0)}else{const z=l(x._option);ne(h(x._option))&&o.props.sortSelectedItems?E.push(z):(f&&(d.push(t.h(fe._sfc_main)),f=!1),d.push(z))}}),o.props.sortSelectedItems&&E.length){const x=!!d.length;d.splice(0,0,...E),x&&d.splice(E.length,0,t.h(fe._sfc_main))}}const I=a.flattenChildrenByType(y?[y]:d,Se).filter(f=>{var E;return b.isObject(f==null?void 0:f.props)&&((E=f==null?void 0:f.props)==null?void 0:E.option)}),_=!!(o.props.tree&&((F=Q.value)!=null&&F.length)||I!=null&&I.length),D=()=>{var E,x;const f=[];if(_||o.props.loading){const M=[];if(_&&M.push(...d),o.props.loading){const z=(E=n.loading)==null?void 0:E.call(n,{});if(!a.isEmptyElement(z))M.push(z);else{const U=new Array(_?2:o.props.loadingRowCount).fill(1);M.push(...U.map(()=>t.h(ze._sfc_main,{size:Z.value,class:i.normCls(i.getBemElement(w,"skeleton"),o.props.skeletonCls),...Ie.value})))}}f.push(t.h("div",{class:i.normCls(i.getBemElement(w,"options"),o.props.optionsCls)},M))}else if(!_){const M=(x=n.empty)==null?void 0:x.call(n,be.value);a.isEmptyElement(M)?f.push(t.h(Le._sfc_main,{class:i.normCls(i.getBemElement(w,"empty"),o.props.emptyCls),...be.value},{title:n.emptyTitle,description:n.emptyDescription,actions:n.emptyActions,image:n.emptyImage})):f.push(M)}return o.props.lazyLoading&&f.push(t.h("div",{class:i.getBemElement(w,"lazy_loading")},t.h("div",{class:i.getBemElement(w,"lazy_loading_trigger"),ref:g}))),f};return[o.props.noTrigger?null:t.h(Xe,{ref:c,...o.attrs,style:{...((W=o.attrs)==null?void 0:W.style)??{},"--ptc-combobox-trigger-min-w":_e.value}},{trigger:n.trigger,triggerTrailing:n.triggerTrailing}),t.h(j.ComboboxPortal,P.value,()=>t.h(j.ComboboxContent,{...A.value,vShow:e.open.value,class:i.normCls(ie(o.props),o.props.popupCls),style:{zIndex:o.props.zIndex,"--ptc-combobox-popup-width":o.props.samePopupWidth?void 0:ge.value,"--ptc-combobox-popup-height":ue.value,"--ptc-combobox-trigger-min-w":_e.value},onClick:N},()=>{var z,U,re,Ce;const f=[],E=(U=n.header)==null?void 0:U.call(n,{isEmpty:!((z=Q.value)!=null&&z.length),search:o.searchModel.value}),x=!a.isEmptyElement(E);if(o.props.headerSearch||x){const me=[];x&&me.push(E),o.props.headerSearch&&me.push(t.h(ke)),f.push(t.h("div",{class:i.getBemElement(w,"header")},me))}f.push(t.h(Me._sfc_main,de.value,D));const M=(Ce=n.footer)==null?void 0:Ce.call(n,{isEmpty:!((re=Q.value)!=null&&re.length),search:o.searchModel.value});return a.isEmptyElement(M)||f.push(t.h("div",{class:i.getBemElement(w,"footer")},M)),f}))]}}}),tt=t.defineComponent({...oe.getComponentOptions("Combobox"),__name:"Combobox",props:{size:{default:"md"},status:{},multiple:{type:Boolean,default:void 0},noLastValueOnPlaceholder:{type:Boolean},showLabelValueOnHeaderSearch:{type:Boolean},zIndex:{},checkbox:{type:Boolean,default:!0},tagRenderMode:{default:"chip"},getTagProps:{},tree:{type:Boolean},contentFit:{type:Boolean},wrapped:{type:Boolean},sortSelectedItems:{type:Boolean},noTrailing:{type:Boolean},leadingIcon:{},trailingIcon:{default:"tabler:chevron-down"},selectedItemIconAsTrailingIcon:{type:Boolean,default:!0},maxCount:{},to:{},placeholder:{},indicatorIcon:{default:"tabler:check"},options:{},getDisabled:{},getLabel:{},getDescription:{},getValue:{},getNoCheckbox:{},getSingle:{},getClear:{},getGroupOptions:{},getGroupLabel:{},getIcon:{},placement:{default:"bottom-start"},reversePlacementOnDir:{},loading:{type:Boolean},skeletonProps:{},loadingRowCount:{default:10},lazyLoading:{type:Boolean},bordered:{type:Boolean,default:!0},clearOnChangeMultiple:{type:Boolean,default:!0},triggerCls:{},triggerLeadingCls:{},triggerContentCls:{},triggerContentPlaceholderCls:{},triggerContentValueCls:{},triggerTrailingCls:{},itemLeadingCls:{},optionCls:{},tagCls:{},popupCls:{},labelCls:{},optionsCls:{},optionTextCls:{},optionContentCls:{},emptyCls:{},skeletonCls:{},scrollContainerProps:{},emptyProps:{},samePopupWidth:{type:Boolean,default:!0},popupHeight:{default:384},popupWidth:{},minWidth:{},headerSearch:{type:Boolean},search:{},noTrigger:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},resetSearchTermOnBlur:{type:Boolean,default:!0},resetSearchTermOnSelect:{type:Boolean,default:!0},modelValue:{},defaultValue:{},dir:{},disabled:{type:Boolean,default:void 0},highlightOnHover:{type:Boolean},by:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},reference:{},forceMount:{type:Boolean,default:void 0},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean,default:void 0},collisionBoundary:{},collisionPadding:{default:4},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean,default:void 0},positionStrategy:{default:"fixed"},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean,default:void 0},prioritizePosition:{type:Boolean,default:void 0},disableOutsidePointerEvents:{type:Boolean},defer:{type:Boolean}},emits:["update:search","select","update:modelValue","highlight","update:open","escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(u,{emit:n}){const o=u,e=n,g=j.useEmitAsProps(e),c=t.computed(()=>a.omitBy({...a.pick(o,"open","defaultOpen","defaultValue","modelValue","by","dir","multiple","disabled"),...a.pick(g,"onUpdate:modelValue","onUpdate:open"),ignoreFilter:!0},a.isUndefined)),P=a.useVModel(o,"search",e,{passive:o.search===void 0});t.watch(()=>o.open,C=>{C||(P.value=void 0)});const T=t.useSlots(),S=t.useAttrs();return $e({attrs:S,props:o,emit:e,searchModel:P,emitsAsProps:g}),(C,q)=>(t.openBlock(),t.createBlock(t.unref(j.ComboboxRoot),t.mergeProps(c.value,{class:t.unref(w)}),{default:t.withCtx(()=>[t.createVNode(t.unref(et),null,t.createSlots({_:2},[t.renderList(Object.keys(T),A=>({name:A,fn:t.withCtx(s=>[t.renderSlot(C.$slots,A,t.normalizeProps(t.guardReactiveProps(s)))])}))]),1024)]),_:3},16,["class"]))}});exports.ComboboxSizes=ye;exports.ComboboxStatuses=Pe;exports._sfc_main=tt;exports.injectComboboxContext=ce;exports.provideComboboxContext=Ee;