buefy 0.9.26 → 0.9.28

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 (259) hide show
  1. package/README.md +3 -1
  2. package/dist/buefy.css +15904 -0
  3. package/dist/buefy.esm.js +17883 -0
  4. package/dist/buefy.esm.min.js +2 -0
  5. package/dist/buefy.js +17967 -0
  6. package/dist/buefy.min.css +1 -0
  7. package/dist/buefy.min.js +2 -0
  8. package/dist/cjs/Autocomplete-7a39c5ce.js +673 -0
  9. package/dist/cjs/Button-01827709.js +114 -0
  10. package/dist/cjs/CheckRadioMixin-c910f2ed.js +45 -0
  11. package/dist/cjs/Checkbox-43f54cc7.js +70 -0
  12. package/dist/cjs/Datepicker-680659bc.js +1679 -0
  13. package/dist/cjs/DropdownItem-422f8c34.js +559 -0
  14. package/dist/cjs/Field-4557b10c.js +315 -0
  15. package/dist/cjs/FormElementMixin-193a88b8.js +163 -0
  16. package/dist/cjs/Icon-78961800.js +189 -0
  17. package/dist/cjs/Image-c4bcd9b3.js +299 -0
  18. package/dist/cjs/InjectedChildMixin-d6bf7f91.js +135 -0
  19. package/dist/cjs/Input-e5a72d97.js +248 -0
  20. package/dist/cjs/Loading-6f2c7075.js +150 -0
  21. package/dist/cjs/MessageMixin-8d959514.js +146 -0
  22. package/dist/cjs/Modal-4cf07210.js +278 -0
  23. package/dist/cjs/NoticeMixin-01121bd2.js +154 -0
  24. package/dist/cjs/Pagination-d6b3fb85.js +413 -0
  25. package/dist/cjs/Select-2b3879bc.js +100 -0
  26. package/dist/cjs/SlotComponent-4fb48389.js +53 -0
  27. package/dist/cjs/TabbedChildMixin-907cad32.js +222 -0
  28. package/dist/cjs/Tag-437f65fb.js +154 -0
  29. package/dist/cjs/Timepicker-498fa02b.js +67 -0
  30. package/dist/cjs/TimepickerMixin-6c1a4ab4.js +661 -0
  31. package/dist/cjs/Tooltip-c1df7ee3.js +370 -0
  32. package/dist/cjs/_rollupPluginBabelHelpers-8b2e54ad.js +365 -0
  33. package/dist/cjs/autocomplete.js +22 -0
  34. package/dist/cjs/breadcrumb.js +139 -0
  35. package/dist/cjs/button.js +20 -0
  36. package/dist/cjs/carousel.js +662 -0
  37. package/dist/cjs/checkbox.js +86 -0
  38. package/dist/cjs/clockpicker.js +461 -0
  39. package/dist/cjs/collapse.js +128 -0
  40. package/dist/cjs/colorpicker.js +23 -0
  41. package/dist/cjs/config-8cfb5a4a.js +81 -0
  42. package/dist/cjs/config.js +18 -0
  43. package/dist/cjs/datepicker.js +27 -0
  44. package/dist/cjs/datetimepicker.js +377 -0
  45. package/dist/cjs/dialog.js +308 -0
  46. package/dist/cjs/dropdown.js +23 -0
  47. package/dist/cjs/field.js +18 -0
  48. package/dist/cjs/helpers.js +375 -0
  49. package/dist/cjs/icon.js +19 -0
  50. package/dist/cjs/image.js +19 -0
  51. package/dist/cjs/index-99d1c930.js +1633 -0
  52. package/dist/cjs/index.js +216 -0
  53. package/dist/cjs/input.js +21 -0
  54. package/dist/cjs/loading.js +38 -0
  55. package/dist/cjs/menu.js +304 -0
  56. package/dist/cjs/message.js +67 -0
  57. package/dist/cjs/modal.js +59 -0
  58. package/dist/cjs/navbar.js +679 -0
  59. package/dist/cjs/notification.js +181 -0
  60. package/dist/cjs/numberinput.js +278 -0
  61. package/dist/cjs/pagination.js +22 -0
  62. package/dist/cjs/plugins-7f41b028.js +94 -0
  63. package/dist/cjs/progress.js +239 -0
  64. package/dist/cjs/radio.js +130 -0
  65. package/dist/cjs/rate.js +156 -0
  66. package/dist/cjs/select.js +21 -0
  67. package/dist/cjs/sidebar.js +303 -0
  68. package/dist/cjs/skeleton.js +111 -0
  69. package/dist/cjs/slider.js +603 -0
  70. package/dist/cjs/snackbar.js +132 -0
  71. package/dist/cjs/ssr-20dba236.js +10 -0
  72. package/dist/cjs/steps.js +278 -0
  73. package/dist/cjs/switch.js +139 -0
  74. package/dist/cjs/table.js +1695 -0
  75. package/dist/cjs/tabs.js +214 -0
  76. package/dist/cjs/tag.js +70 -0
  77. package/dist/cjs/taginput.js +331 -0
  78. package/dist/cjs/timepicker.js +28 -0
  79. package/dist/cjs/toast.js +106 -0
  80. package/dist/cjs/tooltip.js +19 -0
  81. package/dist/cjs/trapFocus-261420b0.js +49 -0
  82. package/dist/cjs/upload.js +205 -0
  83. package/dist/components/autocomplete/index.js +1620 -0
  84. package/dist/components/autocomplete/index.min.js +2 -0
  85. package/dist/components/breadcrumb/index.js +297 -0
  86. package/dist/components/breadcrumb/index.min.js +2 -0
  87. package/dist/components/button/index.js +569 -0
  88. package/dist/components/button/index.min.js +2 -0
  89. package/dist/components/carousel/index.js +1629 -0
  90. package/dist/components/carousel/index.min.js +2 -0
  91. package/dist/components/checkbox/index.js +279 -0
  92. package/dist/components/checkbox/index.min.js +2 -0
  93. package/dist/components/clockpicker/index.js +3131 -0
  94. package/dist/components/clockpicker/index.min.js +2 -0
  95. package/dist/components/collapse/index.js +217 -0
  96. package/dist/components/collapse/index.min.js +2 -0
  97. package/dist/components/colorpicker/index.js +4249 -0
  98. package/dist/components/colorpicker/index.min.js +2 -0
  99. package/dist/components/datepicker/index.js +3845 -0
  100. package/dist/components/datepicker/index.min.js +2 -0
  101. package/dist/components/datetimepicker/index.js +4902 -0
  102. package/dist/components/datetimepicker/index.min.js +2 -0
  103. package/dist/components/dialog/index.js +1168 -0
  104. package/dist/components/dialog/index.min.js +2 -0
  105. package/dist/components/dropdown/index.js +1043 -0
  106. package/dist/components/dropdown/index.min.js +2 -0
  107. package/dist/components/field/index.js +511 -0
  108. package/dist/components/field/index.min.js +2 -0
  109. package/dist/components/icon/index.js +463 -0
  110. package/dist/components/icon/index.min.js +2 -0
  111. package/dist/components/image/index.js +513 -0
  112. package/dist/components/image/index.min.js +2 -0
  113. package/dist/components/input/index.js +862 -0
  114. package/dist/components/input/index.min.js +2 -0
  115. package/dist/components/loading/index.js +366 -0
  116. package/dist/components/loading/index.min.js +2 -0
  117. package/dist/components/menu/index.js +748 -0
  118. package/dist/components/menu/index.min.js +2 -0
  119. package/dist/components/message/index.js +650 -0
  120. package/dist/components/message/index.min.js +2 -0
  121. package/dist/components/modal/index.js +624 -0
  122. package/dist/components/modal/index.min.js +2 -0
  123. package/dist/components/navbar/index.js +805 -0
  124. package/dist/components/navbar/index.min.js +2 -0
  125. package/dist/components/notification/index.js +923 -0
  126. package/dist/components/notification/index.min.js +2 -0
  127. package/dist/components/numberinput/index.js +1119 -0
  128. package/dist/components/numberinput/index.min.js +2 -0
  129. package/dist/components/pagination/index.js +868 -0
  130. package/dist/components/pagination/index.min.js +2 -0
  131. package/dist/components/progress/index.js +621 -0
  132. package/dist/components/progress/index.min.js +2 -0
  133. package/dist/components/radio/index.js +260 -0
  134. package/dist/components/radio/index.min.js +2 -0
  135. package/dist/components/rate/index.js +600 -0
  136. package/dist/components/rate/index.min.js +2 -0
  137. package/dist/components/select/index.js +715 -0
  138. package/dist/components/select/index.min.js +2 -0
  139. package/dist/components/sidebar/index.js +467 -0
  140. package/dist/components/sidebar/index.min.js +2 -0
  141. package/dist/components/skeleton/index.js +200 -0
  142. package/dist/components/skeleton/index.min.js +2 -0
  143. package/dist/components/slider/index.js +1264 -0
  144. package/dist/components/slider/index.min.js +2 -0
  145. package/dist/components/snackbar/index.js +527 -0
  146. package/dist/components/snackbar/index.min.js +2 -0
  147. package/dist/components/steps/index.js +1180 -0
  148. package/dist/components/steps/index.min.js +2 -0
  149. package/dist/components/switch/index.js +297 -0
  150. package/dist/components/switch/index.min.js +2 -0
  151. package/dist/components/table/index.js +3480 -0
  152. package/dist/components/table/index.min.js +2 -0
  153. package/dist/components/tabs/index.js +1116 -0
  154. package/dist/components/tabs/index.min.js +2 -0
  155. package/dist/components/tag/index.js +307 -0
  156. package/dist/components/tag/index.min.js +2 -0
  157. package/dist/components/taginput/index.js +2104 -0
  158. package/dist/components/taginput/index.min.js +2 -0
  159. package/dist/components/timepicker/index.js +2843 -0
  160. package/dist/components/timepicker/index.min.js +2 -0
  161. package/dist/components/toast/index.js +501 -0
  162. package/dist/components/toast/index.min.js +2 -0
  163. package/dist/components/tooltip/index.js +630 -0
  164. package/dist/components/tooltip/index.min.js +2 -0
  165. package/dist/components/upload/index.js +525 -0
  166. package/dist/components/upload/index.min.js +2 -0
  167. package/dist/esm/Autocomplete-1a6e8770.js +671 -0
  168. package/dist/esm/Button-521f6efc.js +112 -0
  169. package/dist/esm/CheckRadioMixin-e726a83c.js +43 -0
  170. package/dist/esm/Checkbox-1d02686e.js +68 -0
  171. package/dist/esm/Datepicker-0ae1e826.js +1677 -0
  172. package/dist/esm/DropdownItem-55682322.js +556 -0
  173. package/dist/esm/Field-3ceba31e.js +313 -0
  174. package/dist/esm/FormElementMixin-b223d3c7.js +161 -0
  175. package/dist/esm/Icon-60d47b31.js +187 -0
  176. package/dist/esm/Image-75808acb.js +297 -0
  177. package/dist/esm/InjectedChildMixin-b4220787.js +130 -0
  178. package/dist/esm/Input-20612b63.js +246 -0
  179. package/dist/esm/Loading-ae028ea5.js +148 -0
  180. package/dist/esm/MessageMixin-d577a9f5.js +144 -0
  181. package/dist/esm/Modal-7da7641f.js +276 -0
  182. package/dist/esm/NoticeMixin-bd6f61d9.js +152 -0
  183. package/dist/esm/Pagination-68f12c1e.js +409 -0
  184. package/dist/esm/Select-97781d4e.js +98 -0
  185. package/dist/esm/SlotComponent-8871a20f.js +51 -0
  186. package/dist/esm/TabbedChildMixin-bcb13767.js +219 -0
  187. package/dist/esm/Tag-6365aa46.js +152 -0
  188. package/dist/esm/Timepicker-38480bbc.js +65 -0
  189. package/dist/esm/TimepickerMixin-d736b0a9.js +659 -0
  190. package/dist/esm/Tooltip-d98a769c.js +368 -0
  191. package/dist/esm/_rollupPluginBabelHelpers-df313029.js +350 -0
  192. package/dist/esm/autocomplete.js +18 -0
  193. package/dist/esm/breadcrumb.js +133 -0
  194. package/dist/esm/button.js +16 -0
  195. package/dist/esm/carousel.js +655 -0
  196. package/dist/esm/checkbox.js +81 -0
  197. package/dist/esm/clockpicker.js +456 -0
  198. package/dist/esm/collapse.js +123 -0
  199. package/dist/esm/colorpicker.js +14 -0
  200. package/dist/esm/config-e7d4b9c2.js +78 -0
  201. package/dist/esm/config.js +14 -0
  202. package/dist/esm/datepicker.js +23 -0
  203. package/dist/esm/datetimepicker.js +372 -0
  204. package/dist/esm/dialog.js +302 -0
  205. package/dist/esm/dropdown.js +18 -0
  206. package/dist/esm/field.js +14 -0
  207. package/dist/esm/helpers.js +348 -0
  208. package/dist/esm/icon.js +15 -0
  209. package/dist/esm/image.js +15 -0
  210. package/dist/esm/index-903f63ea.js +1629 -0
  211. package/dist/esm/index.js +182 -0
  212. package/dist/esm/input.js +17 -0
  213. package/dist/esm/loading.js +33 -0
  214. package/dist/esm/menu.js +297 -0
  215. package/dist/esm/message.js +62 -0
  216. package/dist/esm/modal.js +54 -0
  217. package/dist/esm/navbar.js +672 -0
  218. package/dist/esm/notification.js +175 -0
  219. package/dist/esm/numberinput.js +273 -0
  220. package/dist/esm/pagination.js +17 -0
  221. package/dist/esm/plugins-218aea86.js +89 -0
  222. package/dist/esm/progress.js +233 -0
  223. package/dist/esm/radio.js +124 -0
  224. package/dist/esm/rate.js +151 -0
  225. package/dist/esm/select.js +17 -0
  226. package/dist/esm/sidebar.js +298 -0
  227. package/dist/esm/skeleton.js +106 -0
  228. package/dist/esm/slider.js +597 -0
  229. package/dist/esm/snackbar.js +126 -0
  230. package/dist/esm/ssr-b847d137.js +7 -0
  231. package/dist/esm/steps.js +272 -0
  232. package/dist/esm/switch.js +134 -0
  233. package/dist/esm/table.js +1689 -0
  234. package/dist/esm/tabs.js +208 -0
  235. package/dist/esm/tag.js +65 -0
  236. package/dist/esm/taginput.js +326 -0
  237. package/dist/esm/timepicker.js +24 -0
  238. package/dist/esm/toast.js +100 -0
  239. package/dist/esm/tooltip.js +15 -0
  240. package/dist/esm/trapFocus-f0736873.js +47 -0
  241. package/dist/esm/upload.js +200 -0
  242. package/dist/vetur/attributes.json +3238 -0
  243. package/dist/vetur/tags.json +1183 -0
  244. package/package.json +3 -3
  245. package/src/components/autocomplete/Autocomplete.spec.js +16 -0
  246. package/src/components/autocomplete/Autocomplete.vue +9 -3
  247. package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +2 -0
  248. package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +2 -0
  249. package/src/components/dropdown/Dropdown.vue +51 -3
  250. package/src/components/numberinput/Numberinput.vue +4 -0
  251. package/src/components/sidebar/Sidebar.vue +1 -0
  252. package/src/components/slider/Slider.vue +7 -2
  253. package/src/components/slider/SliderThumb.vue +8 -0
  254. package/src/components/table/Table.vue +4 -1
  255. package/src/components/table/TableColumn.spec.js +51 -0
  256. package/src/components/table/TableColumn.vue +8 -1
  257. package/src/components/taginput/Taginput.vue +7 -2
  258. package/src/components/tooltip/Tooltip.vue +10 -3
  259. package/src/scss/components/_dropdown.scss +4 -2
@@ -0,0 +1,4249 @@
1
+ /*! Buefy v0.9.28 | MIT License | github.com/buefy/buefy */
2
+ (function (global, factory) {
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Colorpicker = {}));
6
+ })(this, (function (exports) { 'use strict';
7
+
8
+ function _iterableToArrayLimit(r, l) {
9
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
10
+ if (null != t) {
11
+ var e,
12
+ n,
13
+ i,
14
+ u,
15
+ a = [],
16
+ f = !0,
17
+ o = !1;
18
+ try {
19
+ if (i = (t = t.call(r)).next, 0 === l) {
20
+ if (Object(t) !== t) return;
21
+ f = !1;
22
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
23
+ } catch (r) {
24
+ o = !0, n = r;
25
+ } finally {
26
+ try {
27
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
28
+ } finally {
29
+ if (o) throw n;
30
+ }
31
+ }
32
+ return a;
33
+ }
34
+ }
35
+ function ownKeys(e, r) {
36
+ var t = Object.keys(e);
37
+ if (Object.getOwnPropertySymbols) {
38
+ var o = Object.getOwnPropertySymbols(e);
39
+ r && (o = o.filter(function (r) {
40
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
41
+ })), t.push.apply(t, o);
42
+ }
43
+ return t;
44
+ }
45
+ function _objectSpread2(e) {
46
+ for (var r = 1; r < arguments.length; r++) {
47
+ var t = null != arguments[r] ? arguments[r] : {};
48
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
49
+ _defineProperty(e, r, t[r]);
50
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
51
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
52
+ });
53
+ }
54
+ return e;
55
+ }
56
+ function _toPrimitive(t, r) {
57
+ if ("object" != typeof t || !t) return t;
58
+ var e = t[Symbol.toPrimitive];
59
+ if (void 0 !== e) {
60
+ var i = e.call(t, r || "default");
61
+ if ("object" != typeof i) return i;
62
+ throw new TypeError("@@toPrimitive must return a primitive value.");
63
+ }
64
+ return ("string" === r ? String : Number)(t);
65
+ }
66
+ function _toPropertyKey(t) {
67
+ var i = _toPrimitive(t, "string");
68
+ return "symbol" == typeof i ? i : String(i);
69
+ }
70
+ function _typeof(o) {
71
+ "@babel/helpers - typeof";
72
+
73
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
74
+ return typeof o;
75
+ } : function (o) {
76
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
77
+ }, _typeof(o);
78
+ }
79
+ function _classCallCheck(instance, Constructor) {
80
+ if (!(instance instanceof Constructor)) {
81
+ throw new TypeError("Cannot call a class as a function");
82
+ }
83
+ }
84
+ function _defineProperties(target, props) {
85
+ for (var i = 0; i < props.length; i++) {
86
+ var descriptor = props[i];
87
+ descriptor.enumerable = descriptor.enumerable || false;
88
+ descriptor.configurable = true;
89
+ if ("value" in descriptor) descriptor.writable = true;
90
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
91
+ }
92
+ }
93
+ function _createClass(Constructor, protoProps, staticProps) {
94
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
95
+ if (staticProps) _defineProperties(Constructor, staticProps);
96
+ Object.defineProperty(Constructor, "prototype", {
97
+ writable: false
98
+ });
99
+ return Constructor;
100
+ }
101
+ function _defineProperty(obj, key, value) {
102
+ key = _toPropertyKey(key);
103
+ if (key in obj) {
104
+ Object.defineProperty(obj, key, {
105
+ value: value,
106
+ enumerable: true,
107
+ configurable: true,
108
+ writable: true
109
+ });
110
+ } else {
111
+ obj[key] = value;
112
+ }
113
+ return obj;
114
+ }
115
+ function _inherits(subClass, superClass) {
116
+ if (typeof superClass !== "function" && superClass !== null) {
117
+ throw new TypeError("Super expression must either be null or a function");
118
+ }
119
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
120
+ constructor: {
121
+ value: subClass,
122
+ writable: true,
123
+ configurable: true
124
+ }
125
+ });
126
+ Object.defineProperty(subClass, "prototype", {
127
+ writable: false
128
+ });
129
+ if (superClass) _setPrototypeOf(subClass, superClass);
130
+ }
131
+ function _getPrototypeOf(o) {
132
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
133
+ return o.__proto__ || Object.getPrototypeOf(o);
134
+ };
135
+ return _getPrototypeOf(o);
136
+ }
137
+ function _setPrototypeOf(o, p) {
138
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
139
+ o.__proto__ = p;
140
+ return o;
141
+ };
142
+ return _setPrototypeOf(o, p);
143
+ }
144
+ function _isNativeReflectConstruct() {
145
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
146
+ if (Reflect.construct.sham) return false;
147
+ if (typeof Proxy === "function") return true;
148
+ try {
149
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
150
+ return true;
151
+ } catch (e) {
152
+ return false;
153
+ }
154
+ }
155
+ function _construct(Parent, args, Class) {
156
+ if (_isNativeReflectConstruct()) {
157
+ _construct = Reflect.construct.bind();
158
+ } else {
159
+ _construct = function _construct(Parent, args, Class) {
160
+ var a = [null];
161
+ a.push.apply(a, args);
162
+ var Constructor = Function.bind.apply(Parent, a);
163
+ var instance = new Constructor();
164
+ if (Class) _setPrototypeOf(instance, Class.prototype);
165
+ return instance;
166
+ };
167
+ }
168
+ return _construct.apply(null, arguments);
169
+ }
170
+ function _isNativeFunction(fn) {
171
+ try {
172
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
173
+ } catch (e) {
174
+ return typeof fn === "function";
175
+ }
176
+ }
177
+ function _wrapNativeSuper(Class) {
178
+ var _cache = typeof Map === "function" ? new Map() : undefined;
179
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
180
+ if (Class === null || !_isNativeFunction(Class)) return Class;
181
+ if (typeof Class !== "function") {
182
+ throw new TypeError("Super expression must either be null or a function");
183
+ }
184
+ if (typeof _cache !== "undefined") {
185
+ if (_cache.has(Class)) return _cache.get(Class);
186
+ _cache.set(Class, Wrapper);
187
+ }
188
+ function Wrapper() {
189
+ return _construct(Class, arguments, _getPrototypeOf(this).constructor);
190
+ }
191
+ Wrapper.prototype = Object.create(Class.prototype, {
192
+ constructor: {
193
+ value: Wrapper,
194
+ enumerable: false,
195
+ writable: true,
196
+ configurable: true
197
+ }
198
+ });
199
+ return _setPrototypeOf(Wrapper, Class);
200
+ };
201
+ return _wrapNativeSuper(Class);
202
+ }
203
+ function _assertThisInitialized(self) {
204
+ if (self === void 0) {
205
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
206
+ }
207
+ return self;
208
+ }
209
+ function _possibleConstructorReturn(self, call) {
210
+ if (call && (typeof call === "object" || typeof call === "function")) {
211
+ return call;
212
+ } else if (call !== void 0) {
213
+ throw new TypeError("Derived constructors may only return object or undefined");
214
+ }
215
+ return _assertThisInitialized(self);
216
+ }
217
+ function _createSuper(Derived) {
218
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
219
+ return function _createSuperInternal() {
220
+ var Super = _getPrototypeOf(Derived),
221
+ result;
222
+ if (hasNativeReflectConstruct) {
223
+ var NewTarget = _getPrototypeOf(this).constructor;
224
+ result = Reflect.construct(Super, arguments, NewTarget);
225
+ } else {
226
+ result = Super.apply(this, arguments);
227
+ }
228
+ return _possibleConstructorReturn(this, result);
229
+ };
230
+ }
231
+ function _taggedTemplateLiteral(strings, raw) {
232
+ if (!raw) {
233
+ raw = strings.slice(0);
234
+ }
235
+ return Object.freeze(Object.defineProperties(strings, {
236
+ raw: {
237
+ value: Object.freeze(raw)
238
+ }
239
+ }));
240
+ }
241
+ function _slicedToArray(arr, i) {
242
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
243
+ }
244
+ function _toArray(arr) {
245
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
246
+ }
247
+ function _toConsumableArray(arr) {
248
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
249
+ }
250
+ function _arrayWithoutHoles(arr) {
251
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
252
+ }
253
+ function _arrayWithHoles(arr) {
254
+ if (Array.isArray(arr)) return arr;
255
+ }
256
+ function _iterableToArray(iter) {
257
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
258
+ }
259
+ function _unsupportedIterableToArray(o, minLen) {
260
+ if (!o) return;
261
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
262
+ var n = Object.prototype.toString.call(o).slice(8, -1);
263
+ if (n === "Object" && o.constructor) n = o.constructor.name;
264
+ if (n === "Map" || n === "Set") return Array.from(o);
265
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
266
+ }
267
+ function _arrayLikeToArray(arr, len) {
268
+ if (len == null || len > arr.length) len = arr.length;
269
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
270
+ return arr2;
271
+ }
272
+ function _nonIterableSpread() {
273
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
274
+ }
275
+ function _nonIterableRest() {
276
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
277
+ }
278
+ function _createForOfIteratorHelper(o, allowArrayLike) {
279
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
280
+ if (!it) {
281
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
282
+ if (it) o = it;
283
+ var i = 0;
284
+ var F = function () {};
285
+ return {
286
+ s: F,
287
+ n: function () {
288
+ if (i >= o.length) return {
289
+ done: true
290
+ };
291
+ return {
292
+ done: false,
293
+ value: o[i++]
294
+ };
295
+ },
296
+ e: function (e) {
297
+ throw e;
298
+ },
299
+ f: F
300
+ };
301
+ }
302
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
303
+ }
304
+ var normalCompletion = true,
305
+ didErr = false,
306
+ err;
307
+ return {
308
+ s: function () {
309
+ it = it.call(o);
310
+ },
311
+ n: function () {
312
+ var step = it.next();
313
+ normalCompletion = step.done;
314
+ return step;
315
+ },
316
+ e: function (e) {
317
+ didErr = true;
318
+ err = e;
319
+ },
320
+ f: function () {
321
+ try {
322
+ if (!normalCompletion && it.return != null) it.return();
323
+ } finally {
324
+ if (didErr) throw err;
325
+ }
326
+ }
327
+ };
328
+ }
329
+
330
+ var config = {
331
+ defaultContainerElement: null,
332
+ defaultIconPack: 'mdi',
333
+ defaultIconComponent: null,
334
+ defaultIconPrev: 'chevron-left',
335
+ defaultIconNext: 'chevron-right',
336
+ defaultLocale: undefined,
337
+ defaultDialogConfirmText: null,
338
+ defaultDialogCancelText: null,
339
+ defaultSnackbarDuration: 3500,
340
+ defaultSnackbarPosition: null,
341
+ defaultToastDuration: 2000,
342
+ defaultToastPosition: null,
343
+ defaultNotificationDuration: 2000,
344
+ defaultNotificationPosition: null,
345
+ defaultTooltipType: 'is-primary',
346
+ defaultTooltipDelay: null,
347
+ defaultTooltipCloseDelay: null,
348
+ defaultSidebarDelay: null,
349
+ defaultInputAutocomplete: 'on',
350
+ defaultDateFormatter: null,
351
+ defaultDateParser: null,
352
+ defaultDateCreator: null,
353
+ defaultTimeCreator: null,
354
+ defaultDayNames: null,
355
+ defaultMonthNames: null,
356
+ defaultFirstDayOfWeek: null,
357
+ defaultUnselectableDaysOfWeek: null,
358
+ defaultTimeFormatter: null,
359
+ defaultTimeParser: null,
360
+ defaultModalCanCancel: ['escape', 'x', 'outside', 'button'],
361
+ defaultModalScroll: null,
362
+ defaultDatepickerMobileNative: true,
363
+ defaultTimepickerMobileNative: true,
364
+ defaultTimepickerMobileModal: true,
365
+ defaultNoticeQueue: true,
366
+ defaultInputHasCounter: true,
367
+ defaultTaginputHasCounter: true,
368
+ defaultUseHtml5Validation: true,
369
+ defaultDropdownMobileModal: true,
370
+ defaultFieldLabelPosition: null,
371
+ defaultDatepickerYearsRange: [-100, 10],
372
+ defaultDatepickerNearbyMonthDays: true,
373
+ defaultDatepickerNearbySelectableMonthDays: false,
374
+ defaultDatepickerShowWeekNumber: false,
375
+ defaultDatepickerWeekNumberClickable: false,
376
+ defaultDatepickerMobileModal: true,
377
+ defaultTrapFocus: true,
378
+ defaultAutoFocus: true,
379
+ defaultButtonRounded: false,
380
+ defaultSwitchRounded: true,
381
+ defaultCarouselInterval: 3500,
382
+ defaultTabsExpanded: false,
383
+ defaultTabsAnimated: true,
384
+ defaultTabsType: null,
385
+ defaultStatusIcon: true,
386
+ defaultProgrammaticPromise: false,
387
+ defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'],
388
+ defaultImageWebpFallback: null,
389
+ defaultImageLazy: true,
390
+ defaultImageResponsive: true,
391
+ defaultImageRatio: null,
392
+ defaultImageSrcsetFormatter: null,
393
+ defaultBreadcrumbTag: 'a',
394
+ defaultBreadcrumbAlign: 'is-left',
395
+ defaultBreadcrumbSeparator: '',
396
+ defaultBreadcrumbSize: 'is-medium',
397
+ customIconPacks: null
398
+ };
399
+
400
+ /**
401
+ * Checks if the flag is set
402
+ * @param val
403
+ * @param flag
404
+ * @returns {boolean}
405
+ */
406
+ function hasFlag(val, flag) {
407
+ return (val & flag) === flag;
408
+ }
409
+
410
+ /**
411
+ * Merge function to replace Object.assign with deep merging possibility
412
+ */
413
+ var isObject = function isObject(item) {
414
+ return _typeof(item) === 'object' && !Array.isArray(item);
415
+ };
416
+ var mergeFn = function mergeFn(target, source) {
417
+ var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
418
+ if (deep || !Object.assign) {
419
+ var isDeep = function isDeep(prop) {
420
+ return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]);
421
+ };
422
+ var replaced = Object.getOwnPropertyNames(source).map(function (prop) {
423
+ return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]);
424
+ }).reduce(function (a, b) {
425
+ return _objectSpread2(_objectSpread2({}, a), b);
426
+ }, {});
427
+ return _objectSpread2(_objectSpread2({}, target), replaced);
428
+ } else {
429
+ return Object.assign(target, source);
430
+ }
431
+ };
432
+ var merge = mergeFn;
433
+
434
+ /**
435
+ * Mobile detection
436
+ * https://www.abeautifulsite.net/detecting-mobile-devices-with-javascript
437
+ */
438
+ var isMobile = {
439
+ Android: function Android() {
440
+ return typeof window !== 'undefined' && window.navigator.userAgent.match(/Android/i);
441
+ },
442
+ BlackBerry: function BlackBerry() {
443
+ return typeof window !== 'undefined' && window.navigator.userAgent.match(/BlackBerry/i);
444
+ },
445
+ iOS: function iOS() {
446
+ return typeof window !== 'undefined' && (window.navigator.userAgent.match(/iPhone|iPad|iPod/i) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);
447
+ },
448
+ Opera: function Opera() {
449
+ return typeof window !== 'undefined' && window.navigator.userAgent.match(/Opera Mini/i);
450
+ },
451
+ Windows: function Windows() {
452
+ return typeof window !== 'undefined' && window.navigator.userAgent.match(/IEMobile/i);
453
+ },
454
+ any: function any() {
455
+ return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows();
456
+ }
457
+ };
458
+ function removeElement(el) {
459
+ if (typeof el.remove !== 'undefined') {
460
+ el.remove();
461
+ } else if (typeof el.parentNode !== 'undefined' && el.parentNode !== null) {
462
+ el.parentNode.removeChild(el);
463
+ }
464
+ }
465
+ function createAbsoluteElement(el) {
466
+ var root = document.createElement('div');
467
+ root.style.position = 'absolute';
468
+ root.style.left = '0px';
469
+ root.style.top = '0px';
470
+ root.style.width = '100%';
471
+ var wrapper = document.createElement('div');
472
+ root.appendChild(wrapper);
473
+ wrapper.appendChild(el);
474
+ document.body.appendChild(root);
475
+ return root;
476
+ }
477
+ function isVueComponent(c) {
478
+ return c && c._isVue;
479
+ }
480
+ function toCssWidth(width) {
481
+ return width === undefined ? null : isNaN(width) ? width : width + 'px';
482
+ }
483
+ function isCustomElement(vm) {
484
+ return 'shadowRoot' in vm.$root.$options;
485
+ }
486
+
487
+ var FormElementMixin = {
488
+ props: {
489
+ size: String,
490
+ expanded: Boolean,
491
+ loading: Boolean,
492
+ rounded: Boolean,
493
+ icon: String,
494
+ iconPack: String,
495
+ // Native options to use in HTML5 validation
496
+ autocomplete: String,
497
+ maxlength: [Number, String],
498
+ useHtml5Validation: {
499
+ type: Boolean,
500
+ default: function _default() {
501
+ return config.defaultUseHtml5Validation;
502
+ }
503
+ },
504
+ validationMessage: String,
505
+ locale: {
506
+ type: [String, Array],
507
+ default: function _default() {
508
+ return config.defaultLocale;
509
+ }
510
+ },
511
+ statusIcon: {
512
+ type: Boolean,
513
+ default: function _default() {
514
+ return config.defaultStatusIcon;
515
+ }
516
+ }
517
+ },
518
+ data: function data() {
519
+ return {
520
+ isValid: true,
521
+ isFocused: false,
522
+ newIconPack: this.iconPack || config.defaultIconPack
523
+ };
524
+ },
525
+ computed: {
526
+ /**
527
+ * Find parent Field, max 3 levels deep.
528
+ */
529
+ parentField: function parentField() {
530
+ var parent = this.$parent;
531
+ for (var i = 0; i < 3; i++) {
532
+ if (parent && !parent.$data._isField) {
533
+ parent = parent.$parent;
534
+ }
535
+ }
536
+ return parent;
537
+ },
538
+ /**
539
+ * Get the type prop from parent if it's a Field.
540
+ */
541
+ statusType: function statusType() {
542
+ var _ref = this.parentField || {},
543
+ newType = _ref.newType;
544
+ if (!newType) return;
545
+ if (typeof newType === 'string') {
546
+ return newType;
547
+ } else {
548
+ for (var key in newType) {
549
+ if (newType[key]) {
550
+ return key;
551
+ }
552
+ }
553
+ }
554
+ },
555
+ /**
556
+ * Get the message prop from parent if it's a Field.
557
+ */
558
+ statusMessage: function statusMessage() {
559
+ if (!this.parentField) return;
560
+ return this.parentField.newMessage || this.parentField.$slots.message;
561
+ },
562
+ /**
563
+ * Fix icon size for inputs, large was too big
564
+ */
565
+ iconSize: function iconSize() {
566
+ switch (this.size) {
567
+ case 'is-small':
568
+ return this.size;
569
+ case 'is-medium':
570
+ return;
571
+ case 'is-large':
572
+ return this.newIconPack === 'mdi' ? 'is-medium' : '';
573
+ }
574
+ }
575
+ },
576
+ methods: {
577
+ /**
578
+ * Focus method that work dynamically depending on the component.
579
+ */
580
+ focus: function focus() {
581
+ var el = this.getElement();
582
+ if (el === undefined) return;
583
+ this.$nextTick(function () {
584
+ if (el) el.focus();
585
+ });
586
+ },
587
+ onBlur: function onBlur($event) {
588
+ this.isFocused = false;
589
+ this.$emit('blur', $event);
590
+ this.checkHtml5Validity();
591
+ },
592
+ onFocus: function onFocus($event) {
593
+ this.isFocused = true;
594
+ this.$emit('focus', $event);
595
+ },
596
+ getElement: function getElement() {
597
+ var el = this.$refs[this.$data._elementRef];
598
+ while (isVueComponent(el)) {
599
+ el = el.$refs[el.$data._elementRef];
600
+ }
601
+ return el;
602
+ },
603
+ setInvalid: function setInvalid() {
604
+ var type = 'is-danger';
605
+ var message = this.validationMessage || this.getElement().validationMessage;
606
+ this.setValidity(type, message);
607
+ },
608
+ setValidity: function setValidity(type, message) {
609
+ var _this = this;
610
+ this.$nextTick(function () {
611
+ if (_this.parentField) {
612
+ // Set type only if not defined
613
+ if (!_this.parentField.type) {
614
+ _this.parentField.newType = type;
615
+ }
616
+ // Set message only if not defined
617
+ if (!_this.parentField.message) {
618
+ _this.parentField.newMessage = message;
619
+ }
620
+ }
621
+ });
622
+ },
623
+ /**
624
+ * Check HTML5 validation, set isValid property.
625
+ * If validation fail, send 'is-danger' type,
626
+ * and error message to parent if it's a Field.
627
+ */
628
+ checkHtml5Validity: function checkHtml5Validity() {
629
+ if (!this.useHtml5Validation) return;
630
+ var el = this.getElement();
631
+ if (el === undefined) return;
632
+ if (!el.checkValidity()) {
633
+ this.setInvalid();
634
+ this.isValid = false;
635
+ } else {
636
+ this.setValidity(null, null);
637
+ this.isValid = true;
638
+ }
639
+ return this.isValid;
640
+ }
641
+ }
642
+ };
643
+
644
+ var colorChannels = ['red', 'green', 'blue', 'alpha'];
645
+ var colorsNammed = {
646
+ transparent: '#00000000',
647
+ black: '#000000',
648
+ silver: '#c0c0c0',
649
+ gray: '#808080',
650
+ white: '#ffffff',
651
+ maroon: '#800000',
652
+ red: '#ff0000',
653
+ purple: '#800080',
654
+ fuchsia: '#ff00ff',
655
+ green: '#008000',
656
+ lime: '#00ff00',
657
+ olive: '#808000',
658
+ yellow: '#ffff00',
659
+ navy: '#000080',
660
+ blue: '#0000ff',
661
+ teal: '#008080',
662
+ aqua: '#00ffff',
663
+ orange: '#ffa500',
664
+ aliceblue: '#f0f8ff',
665
+ antiquewhite: '#faebd7',
666
+ aquamarine: '#7fffd4',
667
+ azure: '#f0ffff',
668
+ beige: '#f5f5dc',
669
+ bisque: '#ffe4c4',
670
+ blanchedalmond: '#ffebcd',
671
+ blueviolet: '#8a2be2',
672
+ brown: '#a52a2a',
673
+ burlywood: '#deb887',
674
+ cadetblue: '#5f9ea0',
675
+ chartreuse: '#7fff00',
676
+ chocolate: '#d2691e',
677
+ coral: '#ff7f50',
678
+ cornflowerblue: '#6495ed',
679
+ cornsilk: '#fff8dc',
680
+ crimson: '#dc143c',
681
+ cyan: '#00ffff',
682
+ darkblue: '#00008b',
683
+ darkcyan: '#008b8b',
684
+ darkgoldenrod: '#b8860b',
685
+ darkgray: '#a9a9a9',
686
+ darkgreen: '#006400',
687
+ darkgrey: '#a9a9a9',
688
+ darkkhaki: '#bdb76b',
689
+ darkmagenta: '#8b008b',
690
+ darkolivegreen: '#556b2f',
691
+ darkorange: '#ff8c00',
692
+ darkorchid: '#9932cc',
693
+ darkred: '#8b0000',
694
+ darksalmon: '#e9967a',
695
+ darkseagreen: '#8fbc8f',
696
+ darkslateblue: '#483d8b',
697
+ darkslategray: '#2f4f4f',
698
+ darkslategrey: '#2f4f4f',
699
+ darkturquoise: '#00ced1',
700
+ darkviolet: '#9400d3',
701
+ deeppink: '#ff1493',
702
+ deepskyblue: '#00bfff',
703
+ dimgray: '#696969',
704
+ dimgrey: '#696969',
705
+ dodgerblue: '#1e90ff',
706
+ firebrick: '#b22222',
707
+ floralwhite: '#fffaf0',
708
+ forestgreen: '#228b22',
709
+ gainsboro: '#dcdcdc',
710
+ ghostwhite: '#f8f8ff',
711
+ gold: '#ffd700',
712
+ goldenrod: '#daa520',
713
+ greenyellow: '#adff2f',
714
+ grey: '#808080',
715
+ honeydew: '#f0fff0',
716
+ hotpink: '#ff69b4',
717
+ indianred: '#cd5c5c',
718
+ indigo: '#4b0082',
719
+ ivory: '#fffff0',
720
+ khaki: '#f0e68c',
721
+ lavender: '#e6e6fa',
722
+ lavenderblush: '#fff0f5',
723
+ lawngreen: '#7cfc00',
724
+ lemonchiffon: '#fffacd',
725
+ lightblue: '#add8e6',
726
+ lightcoral: '#f08080',
727
+ lightcyan: '#e0ffff',
728
+ lightgoldenrodyellow: '#fafad2',
729
+ lightgray: '#d3d3d3',
730
+ lightgreen: '#90ee90',
731
+ lightgrey: '#d3d3d3',
732
+ lightpink: '#ffb6c1',
733
+ lightsalmon: '#ffa07a',
734
+ lightseagreen: '#20b2aa',
735
+ lightskyblue: '#87cefa',
736
+ lightslategray: '#778899',
737
+ lightslategrey: '#778899',
738
+ lightsteelblue: '#b0c4de',
739
+ lightyellow: '#ffffe0',
740
+ limegreen: '#32cd32',
741
+ linen: '#faf0e6',
742
+ magenta: '#ff00ff',
743
+ mediumaquamarine: '#66cdaa',
744
+ mediumblue: '#0000cd',
745
+ mediumorchid: '#ba55d3',
746
+ mediumpurple: '#9370db',
747
+ mediumseagreen: '#3cb371',
748
+ mediumslateblue: '#7b68ee',
749
+ mediumspringgreen: '#00fa9a',
750
+ mediumturquoise: '#48d1cc',
751
+ mediumvioletred: '#c71585',
752
+ midnightblue: '#191970',
753
+ mintcream: '#f5fffa',
754
+ mistyrose: '#ffe4e1',
755
+ moccasin: '#ffe4b5',
756
+ navajowhite: '#ffdead',
757
+ oldlace: '#fdf5e6',
758
+ olivedrab: '#6b8e23',
759
+ orangered: '#ff4500',
760
+ orchid: '#da70d6',
761
+ palegoldenrod: '#eee8aa',
762
+ palegreen: '#98fb98',
763
+ paleturquoise: '#afeeee',
764
+ palevioletred: '#db7093',
765
+ papayawhip: '#ffefd5',
766
+ peachpuff: '#ffdab9',
767
+ peru: '#cd853f',
768
+ pink: '#ffc0cb',
769
+ plum: '#dda0dd',
770
+ powderblue: '#b0e0e6',
771
+ rosybrown: '#bc8f8f',
772
+ royalblue: '#4169e1',
773
+ saddlebrown: '#8b4513',
774
+ salmon: '#fa8072',
775
+ sandybrown: '#f4a460',
776
+ seagreen: '#2e8b57',
777
+ seashell: '#fff5ee',
778
+ sienna: '#a0522d',
779
+ skyblue: '#87ceeb',
780
+ slateblue: '#6a5acd',
781
+ slategray: '#708090',
782
+ slategrey: '#708090',
783
+ snow: '#fffafa',
784
+ springgreen: '#00ff7f',
785
+ steelblue: '#4682b4',
786
+ tan: '#d2b48c',
787
+ thistle: '#d8bfd8',
788
+ tomato: '#ff6347',
789
+ turquoise: '#40e0d0',
790
+ violet: '#ee82ee',
791
+ wheat: '#f5deb3',
792
+ whitesmoke: '#f5f5f5',
793
+ yellowgreen: '#9acd32',
794
+ rebeccapurple: '#663399'
795
+ };
796
+ var ColorTypeError = /*#__PURE__*/function (_Error) {
797
+ _inherits(ColorTypeError, _Error);
798
+ var _super = _createSuper(ColorTypeError);
799
+ function ColorTypeError() {
800
+ _classCallCheck(this, ColorTypeError);
801
+ return _super.call(this, 'ColorTypeError: type must be hex(a), rgb(a) or hsl(a)');
802
+ }
803
+ return _createClass(ColorTypeError);
804
+ }( /*#__PURE__*/_wrapNativeSuper(Error));
805
+ var Color = /*#__PURE__*/function (_Symbol$toString) {
806
+ function Color() {
807
+ var _this = this;
808
+ _classCallCheck(this, Color);
809
+ if (arguments.length > 0) {
810
+ return Color.parse.apply(Color, arguments);
811
+ }
812
+ this.$channels = new Uint8Array(colorChannels.length);
813
+ colorChannels.forEach(function (channel, index) {
814
+ Object.defineProperty(_this, channel, {
815
+ get: function get() {
816
+ return _this.$channels[index];
817
+ },
818
+ set: function set(byte) {
819
+ if (!Number.isNaN(byte / 1)) {
820
+ _this.$channels[index] = Math.min(255, Math.max(0, byte));
821
+ }
822
+ },
823
+ enumerable: true,
824
+ configurable: true
825
+ });
826
+ })
827
+ // Required for observability
828
+ ;
829
+ ['hue', 'saturation', 'lightness'].forEach(function (name) {
830
+ var capitalizedName = name.replace(/^./, function (m) {
831
+ return m.toUpperCase();
832
+ });
833
+ Object.defineProperty(_this, name, {
834
+ get: function get() {
835
+ return _this["get".concat(capitalizedName)]();
836
+ },
837
+ set: function set(value) {
838
+ if (!Number.isNaN(value / 1)) {
839
+ _this["set".concat(capitalizedName)](value);
840
+ }
841
+ },
842
+ enumerable: true,
843
+ configurable: true
844
+ });
845
+ });
846
+ }
847
+ _createClass(Color, [{
848
+ key: "getHue",
849
+ value: function getHue() {
850
+ var _Array$from$map = Array.from(this.$channels).map(function (c) {
851
+ return c / 255;
852
+ }),
853
+ _Array$from$map2 = _slicedToArray(_Array$from$map, 3),
854
+ red = _Array$from$map2[0],
855
+ green = _Array$from$map2[1],
856
+ blue = _Array$from$map2[2];
857
+ var _ref = [Math.min(red, green, blue), Math.max(red, green, blue)],
858
+ min = _ref[0],
859
+ max = _ref[1];
860
+ var delta = max - min;
861
+ var hue = 0;
862
+ if (delta === 0) {
863
+ return hue;
864
+ }
865
+ if (red === max) {
866
+ hue = (green - blue) / delta % 6;
867
+ } else if (green === max) {
868
+ hue = (blue - red) / delta + 2;
869
+ } else {
870
+ hue = (red - green) / delta + 4;
871
+ }
872
+ hue *= 60;
873
+ while (hue !== -Infinity && hue < 0) hue += 360;
874
+ return Math.round(hue % 360);
875
+ }
876
+ }, {
877
+ key: "setHue",
878
+ value: function setHue(value) {
879
+ var color = Color.fromHSL(value, this.saturation, this.lightness, this.alpha / 255);
880
+ for (var i = 0; i < this.$channels.length; i++) {
881
+ this.$channels[i] = Number(color.$channels[i]);
882
+ }
883
+ }
884
+ }, {
885
+ key: "getSaturation",
886
+ value: function getSaturation() {
887
+ var _Array$from$map3 = Array.from(this.$channels).map(function (c) {
888
+ return c / 255;
889
+ }),
890
+ _Array$from$map4 = _slicedToArray(_Array$from$map3, 3),
891
+ red = _Array$from$map4[0],
892
+ green = _Array$from$map4[1],
893
+ blue = _Array$from$map4[2];
894
+ var _ref2 = [Math.min(red, green, blue), Math.max(red, green, blue)],
895
+ min = _ref2[0],
896
+ max = _ref2[1];
897
+ var delta = max - min;
898
+ return delta !== 0 ? Math.round(delta / (1 - Math.abs(2 * this.lightness - 1)) * 100) / 100 : 0;
899
+ }
900
+ }, {
901
+ key: "setSaturation",
902
+ value: function setSaturation(value) {
903
+ var _this2 = this;
904
+ var color = Color.fromHSL(this.hue, value, this.lightness, this.alpha / 255);
905
+ colorChannels.forEach(function (_, i) {
906
+ return _this2.$channels[i] = color.$channels[i];
907
+ });
908
+ }
909
+ }, {
910
+ key: "getLightness",
911
+ value: function getLightness() {
912
+ var _Array$from$map5 = Array.from(this.$channels).map(function (c) {
913
+ return c / 255;
914
+ }),
915
+ _Array$from$map6 = _slicedToArray(_Array$from$map5, 3),
916
+ red = _Array$from$map6[0],
917
+ green = _Array$from$map6[1],
918
+ blue = _Array$from$map6[2];
919
+ var _ref3 = [Math.min(red, green, blue), Math.max(red, green, blue)],
920
+ min = _ref3[0],
921
+ max = _ref3[1];
922
+ return Math.round((max + min) / 2 * 100) / 100;
923
+ }
924
+ }, {
925
+ key: "setLightness",
926
+ value: function setLightness(value) {
927
+ var _this3 = this;
928
+ var color = Color.fromHSL(this.hue, this.lightness, value, this.alpha / 255);
929
+ colorChannels.forEach(function (_, i) {
930
+ return _this3.$channels[i] = color.$channels[i];
931
+ });
932
+ }
933
+ }, {
934
+ key: "clone",
935
+ value: function clone() {
936
+ var _this4 = this;
937
+ var color = new Color();
938
+ colorChannels.forEach(function (_, i) {
939
+ return color.$channels[i] = _this4.$channels[i];
940
+ });
941
+ return color;
942
+ }
943
+ }, {
944
+ key: "toString",
945
+ value: function toString() {
946
+ var _this5 = this;
947
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'hex';
948
+ switch (String(type).toLowerCase()) {
949
+ case 'hex':
950
+ return '#' + colorChannels.slice(0, 3).map(function (channel) {
951
+ return _this5[channel].toString(16).padStart(2, '0');
952
+ }).join('');
953
+ case 'hexa':
954
+ return '#' + colorChannels.map(function (channel) {
955
+ return _this5[channel].toString(16).padStart(2, '0');
956
+ }).join('');
957
+ case 'rgb':
958
+ return "rgb(".concat(this.red, ", ").concat(this.green, ", ").concat(this.blue, ")");
959
+ case 'rgba':
960
+ return "rgba(".concat(this.red, ", ").concat(this.green, ", ").concat(this.blue, ", ").concat(Math.round(this.alpha / 2.55) / 100, ")");
961
+ case 'hsl':
962
+ return "hsl(".concat(Math.round(this.hue), "deg, ").concat(Math.round(this.saturation * 100), "%, ").concat(Math.round(this.lightness * 100), "%)");
963
+ case 'hsla':
964
+ return "hsla(".concat(Math.round(this.hue), "deg, ").concat(Math.round(this.saturation * 100), "%, ").concat(Math.round(this.lightness * 100), "%, ").concat(Math.round(this.alpha / 2.55) / 100, ")");
965
+ default:
966
+ throw new ColorTypeError();
967
+ }
968
+ }
969
+ }, {
970
+ key: _Symbol$toString,
971
+ get: function get() {
972
+ return this.toString('hex');
973
+ }
974
+ }], [{
975
+ key: "parse",
976
+ value: function parse() {
977
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
978
+ args[_key] = arguments[_key];
979
+ }
980
+ if (_typeof(args[0]) === 'object') {
981
+ return Color.parseObject(args[0]);
982
+ } else if (args.every(function (arg) {
983
+ return !Number.isNaN(arg / 1);
984
+ })) {
985
+ var color = new Color();
986
+ if (args.length > 3) {
987
+ color.red = args[0];
988
+ color.green = args[1];
989
+ color.blue = args[2];
990
+ if (args[3]) {
991
+ color.alpha = args[3];
992
+ }
993
+ } else if (args.length === 1) {
994
+ var index = Number(args[0]);
995
+ return Color.parseIndex(index, index > Math.pow(2, 24) ? 3 : 4);
996
+ }
997
+ } else if (typeof args[0] === 'string') {
998
+ var match = null;
999
+ if (typeof colorsNammed[args[0].toLowerCase()] === 'string') {
1000
+ return Color.parseHex(colorsNammed[args[0].toLowerCase()]);
1001
+ } else if ((match = args[0].match(/^(#|&h|0x)?(([a-f0-9]{3,4}){1,2})$/i)) !== null) {
1002
+ return Color.parseHex(match[2]);
1003
+ } else if ((match = args[0].match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(\s*,\s*(\d*\.?\d+))?\s*\)$/i)) !== null) {
1004
+ var channels = [match[1], match[2], match[3], typeof match[5] !== 'undefined' ? match[5] : 1];
1005
+ return Color.fromRGB.apply(Color, _toConsumableArray(channels.map(function (value) {
1006
+ return Number(value);
1007
+ })));
1008
+ } else if (args[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i)) {
1009
+ throw new Error('Color expression not implemented yet');
1010
+ }
1011
+ }
1012
+ throw new Error('Invalid color expression');
1013
+ }
1014
+ }, {
1015
+ key: "parseObject",
1016
+ value: function parseObject(object) {
1017
+ var color = new Color();
1018
+ if (object === null || _typeof(object) !== 'object') {
1019
+ return color;
1020
+ }
1021
+ if (Color.isColor(object)) {
1022
+ return object.clone();
1023
+ }
1024
+ colorChannels.forEach(function (channel) {
1025
+ if (!Number.isNaN(object[channel])) {
1026
+ color[channel] = object[channel];
1027
+ }
1028
+ });
1029
+ return color;
1030
+ }
1031
+ }, {
1032
+ key: "parseHex",
1033
+ value: function parseHex(hex) {
1034
+ if (typeof hex !== 'string') {
1035
+ throw new Error('Hex expression must be a string');
1036
+ }
1037
+ hex = hex.trim().replace(/^(0x|&h|#)/i, '');
1038
+ if (hex.length === 3 || hex.length === 4) {
1039
+ hex = hex.split('').map(function (c) {
1040
+ return c.repeat(2);
1041
+ }).join('');
1042
+ }
1043
+ if (!(hex.length === 6 || hex.length === 8)) {
1044
+ throw new Error('Incorrect Hex expression length');
1045
+ }
1046
+ var chans = hex.split(/(..)/).filter(function (value) {
1047
+ return value;
1048
+ }).map(function (value) {
1049
+ return Number.parseInt(value, 16);
1050
+ });
1051
+ if (typeof chans[3] === 'number') {
1052
+ chans[3] /= 255;
1053
+ }
1054
+ return Color.fromRGB.apply(Color, _toConsumableArray(chans));
1055
+ }
1056
+ }, {
1057
+ key: "parseIndex",
1058
+ value: function parseIndex(value) {
1059
+ var channels = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
1060
+ var color = new Color();
1061
+ for (var i = 0; i < 4; i++) {
1062
+ color[colorChannels[i]] = value >> (channels - i) * 8 && 0xff;
1063
+ }
1064
+ return color;
1065
+ }
1066
+ }, {
1067
+ key: "fromRGB",
1068
+ value: function fromRGB(red, green, blue) {
1069
+ var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
1070
+ if ([red, green, blue, alpha].some(function (arg) {
1071
+ return Number.isNaN(arg / 1);
1072
+ })) {
1073
+ throw new Error('Invalid arguments');
1074
+ }
1075
+ alpha *= 255;
1076
+ var color = new Color();
1077
+ [red, green, blue, alpha].forEach(function (value, index) {
1078
+ color[colorChannels[index]] = value;
1079
+ });
1080
+ return color;
1081
+ }
1082
+ }, {
1083
+ key: "fromHSL",
1084
+ value: function fromHSL(hue, saturation, lightness) {
1085
+ var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
1086
+ if ([hue, saturation, lightness, alpha].some(function (arg) {
1087
+ return Number.isNaN(arg);
1088
+ })) {
1089
+ throw new Error('Invalid arguments');
1090
+ }
1091
+ while (hue < 0 && hue !== -Infinity) hue += 360;
1092
+ hue = hue % 360;
1093
+ saturation = Math.max(0, Math.min(1, saturation));
1094
+ lightness = Math.max(0, Math.min(1, lightness));
1095
+ alpha = Math.max(0, Math.min(1, alpha));
1096
+ var c = (1 - Math.abs(2 * lightness - 1)) * saturation;
1097
+ var x = c * (1 - Math.abs(hue / 60 % 2 - 1));
1098
+ var m = lightness - c / 2;
1099
+ var _ref4 = hue < 60 ? [c, x, 0] : hue < 120 ? [x, c, 0] : hue < 180 ? [0, c, x] : hue < 240 ? [0, x, c] : hue < 300 ? [x, 0, c] : [c, 0, x],
1100
+ _ref5 = _slicedToArray(_ref4, 3),
1101
+ r = _ref5[0],
1102
+ g = _ref5[1],
1103
+ b = _ref5[2];
1104
+ return Color.fromRGB((r + m) * 255, (g + m) * 255, (b + m) * 255, alpha);
1105
+ }
1106
+ }, {
1107
+ key: "isColor",
1108
+ value: function isColor(arg) {
1109
+ return arg instanceof Color;
1110
+ }
1111
+ }]);
1112
+ return Color;
1113
+ }(Symbol.toString);
1114
+ var Color$1 = Color;
1115
+
1116
+ var findFocusable = function findFocusable(element) {
1117
+ var programmatic = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1118
+ if (!element) {
1119
+ return null;
1120
+ }
1121
+ if (programmatic) {
1122
+ return element.querySelectorAll("*[tabindex=\"-1\"]");
1123
+ }
1124
+ return element.querySelectorAll("a[href]:not([tabindex=\"-1\"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex=\"-1\"]),\n *[contenteditable]");
1125
+ };
1126
+ var onKeyDown;
1127
+ var bind = function bind(el, _ref) {
1128
+ var _ref$value = _ref.value,
1129
+ value = _ref$value === void 0 ? true : _ref$value;
1130
+ if (value) {
1131
+ var focusable = findFocusable(el);
1132
+ var focusableProg = findFocusable(el, true);
1133
+ if (focusable && focusable.length > 0) {
1134
+ onKeyDown = function onKeyDown(event) {
1135
+ // Need to get focusable each time since it can change between key events
1136
+ // ex. changing month in a datepicker
1137
+ focusable = findFocusable(el);
1138
+ focusableProg = findFocusable(el, true);
1139
+ var firstFocusable = focusable[0];
1140
+ var lastFocusable = focusable[focusable.length - 1];
1141
+ if (event.target === firstFocusable && event.shiftKey && event.key === 'Tab') {
1142
+ event.preventDefault();
1143
+ lastFocusable.focus();
1144
+ } else if ((event.target === lastFocusable || Array.from(focusableProg).indexOf(event.target) >= 0) && !event.shiftKey && event.key === 'Tab') {
1145
+ event.preventDefault();
1146
+ firstFocusable.focus();
1147
+ }
1148
+ };
1149
+ el.addEventListener('keydown', onKeyDown);
1150
+ }
1151
+ }
1152
+ };
1153
+ var unbind = function unbind(el) {
1154
+ el.removeEventListener('keydown', onKeyDown);
1155
+ };
1156
+ var directive = {
1157
+ bind: bind,
1158
+ unbind: unbind
1159
+ };
1160
+ var trapFocus = directive;
1161
+
1162
+ var items = 1;
1163
+ var sorted$1 = 3;
1164
+ var ProviderParentMixin = (function (itemName) {
1165
+ var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1166
+ var mixin = {
1167
+ provide: function provide() {
1168
+ return _defineProperty({}, 'b' + itemName, this);
1169
+ }
1170
+ };
1171
+ if (hasFlag(flags, items)) {
1172
+ mixin.data = function () {
1173
+ return {
1174
+ childItems: []
1175
+ };
1176
+ };
1177
+ mixin.methods = {
1178
+ _registerItem: function _registerItem(item) {
1179
+ this.childItems.push(item);
1180
+ },
1181
+ _unregisterItem: function _unregisterItem(item) {
1182
+ this.childItems = this.childItems.filter(function (i) {
1183
+ return i !== item;
1184
+ });
1185
+ }
1186
+ };
1187
+ if (hasFlag(flags, sorted$1)) {
1188
+ mixin.watch = {
1189
+ /**
1190
+ * When items are added/removed deep search in the elements default's slot
1191
+ * And mark the items with their index
1192
+ */
1193
+ childItems: function childItems(items) {
1194
+ if (items.length > 0 && this.$scopedSlots.default) {
1195
+ var tag = items[0].$vnode.tag;
1196
+ var index = 0;
1197
+ var deepSearch = function deepSearch(children) {
1198
+ var _iterator = _createForOfIteratorHelper(children),
1199
+ _step;
1200
+ try {
1201
+ var _loop = function _loop() {
1202
+ var child = _step.value;
1203
+ if (child.tag === tag) {
1204
+ // An item with the same tag will for sure be found
1205
+ var it = items.find(function (i) {
1206
+ return i.$vnode === child;
1207
+ });
1208
+ if (it) {
1209
+ it.index = index++;
1210
+ }
1211
+ } else if (child.tag) {
1212
+ var sub = child.componentInstance ? child.componentInstance.$scopedSlots.default ? child.componentInstance.$scopedSlots.default() : child.componentInstance.$children : child.children;
1213
+ if (Array.isArray(sub) && sub.length > 0) {
1214
+ deepSearch(sub.map(function (e) {
1215
+ return e.$vnode;
1216
+ }));
1217
+ }
1218
+ }
1219
+ };
1220
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1221
+ _loop();
1222
+ }
1223
+ } catch (err) {
1224
+ _iterator.e(err);
1225
+ } finally {
1226
+ _iterator.f();
1227
+ }
1228
+ return false;
1229
+ };
1230
+ deepSearch(this.$scopedSlots.default());
1231
+ }
1232
+ }
1233
+ };
1234
+ mixin.computed = {
1235
+ /**
1236
+ * When items are added/removed sort them according to their position
1237
+ */
1238
+ sortedItems: function sortedItems() {
1239
+ return this.childItems.slice().sort(function (i1, i2) {
1240
+ return i1.index - i2.index;
1241
+ });
1242
+ }
1243
+ };
1244
+ }
1245
+ }
1246
+ return mixin;
1247
+ });
1248
+
1249
+ var DEFAULT_CLOSE_OPTIONS = ['escape', 'outside'];
1250
+ var script$b = {
1251
+ name: 'BDropdown',
1252
+ directives: {
1253
+ trapFocus: trapFocus
1254
+ },
1255
+ mixins: [ProviderParentMixin('dropdown')],
1256
+ props: {
1257
+ value: {
1258
+ type: [String, Number, Boolean, Object, Array, Function],
1259
+ default: null
1260
+ },
1261
+ disabled: Boolean,
1262
+ inline: Boolean,
1263
+ scrollable: Boolean,
1264
+ maxHeight: {
1265
+ type: [String, Number],
1266
+ default: 200
1267
+ },
1268
+ position: {
1269
+ type: String,
1270
+ validator: function validator(value) {
1271
+ return ['is-top-right', 'is-top-left', 'is-bottom-left', 'is-bottom-right'].indexOf(value) > -1;
1272
+ }
1273
+ },
1274
+ triggers: {
1275
+ type: Array,
1276
+ default: function _default() {
1277
+ return ['click'];
1278
+ }
1279
+ },
1280
+ mobileModal: {
1281
+ type: Boolean,
1282
+ default: function _default() {
1283
+ return config.defaultDropdownMobileModal;
1284
+ }
1285
+ },
1286
+ ariaRole: {
1287
+ type: String,
1288
+ validator: function validator(value) {
1289
+ return ['menu', 'list', 'dialog'].indexOf(value) > -1;
1290
+ },
1291
+ default: null
1292
+ },
1293
+ animation: {
1294
+ type: String,
1295
+ default: 'fade'
1296
+ },
1297
+ multiple: Boolean,
1298
+ trapFocus: {
1299
+ type: Boolean,
1300
+ default: function _default() {
1301
+ return config.defaultTrapFocus;
1302
+ }
1303
+ },
1304
+ closeOnClick: {
1305
+ type: Boolean,
1306
+ default: true
1307
+ },
1308
+ canClose: {
1309
+ type: [Array, Boolean],
1310
+ default: true
1311
+ },
1312
+ expanded: Boolean,
1313
+ appendToBody: Boolean,
1314
+ appendToBodyCopyParent: Boolean,
1315
+ triggerTabindex: {
1316
+ type: Number,
1317
+ default: 0
1318
+ }
1319
+ },
1320
+ data: function data() {
1321
+ return {
1322
+ selected: this.value,
1323
+ style: {},
1324
+ isActive: false,
1325
+ isHoverable: false,
1326
+ maybeTap: false,
1327
+ isTouchEnabled: false,
1328
+ _bodyEl: undefined,
1329
+ // Used to append to body
1330
+ timeOutID: null,
1331
+ timeOutID2: null
1332
+ };
1333
+ },
1334
+ computed: {
1335
+ rootClasses: function rootClasses() {
1336
+ return [this.position, {
1337
+ 'is-disabled': this.disabled,
1338
+ 'is-hoverable': this.hoverable,
1339
+ 'is-inline': this.inline,
1340
+ 'is-active': this.isActive || this.inline,
1341
+ 'is-mobile-modal': this.isMobileModal,
1342
+ 'is-expanded': this.expanded,
1343
+ 'is-touch-enabled': this.isTouchEnabled
1344
+ }];
1345
+ },
1346
+ isMobileModal: function isMobileModal() {
1347
+ return this.mobileModal && !this.inline;
1348
+ },
1349
+ cancelOptions: function cancelOptions() {
1350
+ return typeof this.canClose === 'boolean' ? this.canClose ? DEFAULT_CLOSE_OPTIONS : [] : this.canClose;
1351
+ },
1352
+ contentStyle: function contentStyle() {
1353
+ return {
1354
+ maxHeight: this.scrollable ? toCssWidth(this.maxHeight) : null,
1355
+ overflow: this.scrollable ? 'auto' : null
1356
+ };
1357
+ },
1358
+ hoverable: function hoverable() {
1359
+ return this.triggers.indexOf('hover') >= 0;
1360
+ }
1361
+ },
1362
+ watch: {
1363
+ /**
1364
+ * When v-model is changed set the new selected item.
1365
+ */
1366
+ value: function value(_value) {
1367
+ this.selected = _value;
1368
+ },
1369
+ /**
1370
+ * Emit event when isActive value is changed.
1371
+ *
1372
+ * Also resets `isTouchEnabled` when it turns inactive.
1373
+ */
1374
+ isActive: function isActive(value) {
1375
+ var _this = this;
1376
+ this.$emit('active-change', value);
1377
+ if (!value) {
1378
+ // delays to reset the touch enabled flag until the dropdown
1379
+ // menu disappears to avoid glitches
1380
+ // also takes care of chattering, e.g., repeated quick taps,
1381
+ // otherwise the flag may become inconsistent with the actual
1382
+ // state of the dropdown menu
1383
+ this.timeOutID = setTimeout(function () {
1384
+ if (!_this.isActive) {
1385
+ _this.isTouchEnabled = false;
1386
+ }
1387
+ }, 250);
1388
+ }
1389
+ this.handleScroll();
1390
+ if (this.appendToBody) {
1391
+ this.$nextTick(function () {
1392
+ _this.updateAppendToBody();
1393
+ });
1394
+ }
1395
+ },
1396
+ isHoverable: function isHoverable(value) {
1397
+ if (this.hoverable) {
1398
+ this.$emit('active-change', value);
1399
+ }
1400
+ }
1401
+ },
1402
+ methods: {
1403
+ handleScroll: function handleScroll() {
1404
+ if (typeof window === 'undefined') return;
1405
+ if (this.isMobileModal) {
1406
+ if (this.isActive) {
1407
+ document.documentElement.classList.add('is-clipped-touch');
1408
+ } else {
1409
+ document.documentElement.classList.remove('is-clipped-touch');
1410
+ }
1411
+ }
1412
+ },
1413
+ /**
1414
+ * Click listener from DropdownItem.
1415
+ * 1. Set new selected item.
1416
+ * 2. Emit input event to update the user v-model.
1417
+ * 3. Close the dropdown.
1418
+ */
1419
+ selectItem: function selectItem(value) {
1420
+ if (this.multiple) {
1421
+ if (this.selected) {
1422
+ if (this.selected.indexOf(value) === -1) {
1423
+ // Add value
1424
+ this.selected = [].concat(_toConsumableArray(this.selected), [value]);
1425
+ } else {
1426
+ // Remove value
1427
+ this.selected = this.selected.filter(function (val) {
1428
+ return val !== value;
1429
+ });
1430
+ }
1431
+ } else {
1432
+ this.selected = [value];
1433
+ }
1434
+ this.$emit('change', this.selected);
1435
+ } else {
1436
+ if (this.selected !== value) {
1437
+ this.selected = value;
1438
+ this.$emit('change', this.selected);
1439
+ }
1440
+ }
1441
+ this.$emit('input', this.selected);
1442
+ if (!this.multiple) {
1443
+ this.isActive = !this.closeOnClick;
1444
+ if (this.hoverable && this.closeOnClick) {
1445
+ this.isHoverable = false;
1446
+ }
1447
+ }
1448
+ },
1449
+ /**
1450
+ * White-listed items to not close when clicked.
1451
+ */
1452
+ isInWhiteList: function isInWhiteList(el) {
1453
+ if (el === this.$refs.dropdownMenu) return true;
1454
+ if (el === this.$refs.trigger) return true;
1455
+ // All chidren from dropdown
1456
+ if (this.$refs.dropdownMenu !== undefined) {
1457
+ var children = this.$refs.dropdownMenu.querySelectorAll('*');
1458
+ var _iterator = _createForOfIteratorHelper(children),
1459
+ _step;
1460
+ try {
1461
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1462
+ var child = _step.value;
1463
+ if (el === child) {
1464
+ return true;
1465
+ }
1466
+ }
1467
+ } catch (err) {
1468
+ _iterator.e(err);
1469
+ } finally {
1470
+ _iterator.f();
1471
+ }
1472
+ }
1473
+ // All children from trigger
1474
+ if (this.$refs.trigger !== undefined) {
1475
+ var _children = this.$refs.trigger.querySelectorAll('*');
1476
+ var _iterator2 = _createForOfIteratorHelper(_children),
1477
+ _step2;
1478
+ try {
1479
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1480
+ var _child = _step2.value;
1481
+ if (el === _child) {
1482
+ return true;
1483
+ }
1484
+ }
1485
+ } catch (err) {
1486
+ _iterator2.e(err);
1487
+ } finally {
1488
+ _iterator2.f();
1489
+ }
1490
+ }
1491
+ return false;
1492
+ },
1493
+ /**
1494
+ * Close dropdown if clicked outside.
1495
+ */
1496
+ clickedOutside: function clickedOutside(event) {
1497
+ if (this.cancelOptions.indexOf('outside') < 0) return;
1498
+ if (this.inline) return;
1499
+ var target = isCustomElement(this) ? event.composedPath()[0] : event.target;
1500
+ if (!this.isInWhiteList(target)) this.isActive = false;
1501
+ },
1502
+ /**
1503
+ * Keypress event that is bound to the document
1504
+ */
1505
+ keyPress: function keyPress(_ref) {
1506
+ var key = _ref.key;
1507
+ if (this.isActive && (key === 'Escape' || key === 'Esc')) {
1508
+ if (this.cancelOptions.indexOf('escape') < 0) return;
1509
+ this.isActive = false;
1510
+ }
1511
+ },
1512
+ onClick: function onClick() {
1513
+ // hover precedes
1514
+ if (this.triggers.indexOf('hover') !== -1) return;
1515
+ if (this.triggers.indexOf('click') < 0) return;
1516
+ this.toggle();
1517
+ },
1518
+ onContextMenu: function onContextMenu() {
1519
+ if (this.triggers.indexOf('contextmenu') < 0) return;
1520
+ this.toggle();
1521
+ },
1522
+ onHover: function onHover() {
1523
+ if (this.triggers.indexOf('hover') < 0) return;
1524
+ // touch precedes
1525
+ if (this.isTouchEnabled) return;
1526
+ this.isHoverable = true;
1527
+ },
1528
+ // takes care of touch-enabled devices
1529
+ // - does nothing if hover trigger is disabled
1530
+ // - suppresses hover trigger by setting isTouchEnabled
1531
+ // - handles only a tap; i.e., touchstart on the trigger immediately
1532
+ // folowed by touchend
1533
+ onTouchStart: function onTouchStart() {
1534
+ this.maybeTap = true;
1535
+ },
1536
+ onTouchMove: function onTouchMove() {
1537
+ this.maybeTap = false;
1538
+ },
1539
+ onTouchEnd: function onTouchEnd(e) {
1540
+ if (this.triggers.indexOf('hover') === -1) return;
1541
+ if (!this.maybeTap) return;
1542
+ // tap on dropdown contents may happen without preventDefault
1543
+ e.preventDefault();
1544
+ this.maybeTap = false;
1545
+ this.isTouchEnabled = true;
1546
+ this.toggle();
1547
+ },
1548
+ onFocus: function onFocus() {
1549
+ if (this.triggers.indexOf('focus') < 0) return;
1550
+ this.toggle();
1551
+ },
1552
+ /**
1553
+ * Toggle dropdown if it's not disabled.
1554
+ */
1555
+ toggle: function toggle() {
1556
+ var _this2 = this;
1557
+ if (this.disabled) return;
1558
+ if (!this.isActive) {
1559
+ // if not active, toggle after clickOutside event
1560
+ // this fixes toggling programmatic
1561
+ this.$nextTick(function () {
1562
+ var value = !_this2.isActive;
1563
+ _this2.isActive = value;
1564
+ // Vue 2.6.x ???
1565
+ _this2.timeOutID2 = setTimeout(function () {
1566
+ return _this2.isActive = value;
1567
+ });
1568
+ });
1569
+ } else {
1570
+ this.isActive = !this.isActive;
1571
+ }
1572
+ },
1573
+ updateAppendToBody: function updateAppendToBody() {
1574
+ var dropdown = this.$refs.dropdown;
1575
+ var dropdownMenu = this.$refs.dropdownMenu;
1576
+ var trigger = this.$refs.trigger;
1577
+ if (dropdownMenu && trigger) {
1578
+ // update wrapper dropdown
1579
+ var dropdownWrapper = this.$data._bodyEl.children[0];
1580
+ dropdownWrapper.classList.forEach(function (item) {
1581
+ return dropdownWrapper.classList.remove(item);
1582
+ });
1583
+ dropdownWrapper.classList.add('dropdown');
1584
+ dropdownWrapper.classList.add('dropdown-menu-animation');
1585
+ if (this.$vnode && this.$vnode.data && this.$vnode.data.staticClass) {
1586
+ dropdownWrapper.classList.add(this.$vnode.data.staticClass);
1587
+ }
1588
+ this.rootClasses.forEach(function (item) {
1589
+ // skip position prop
1590
+ if (item && _typeof(item) === 'object') {
1591
+ for (var key in item) {
1592
+ if (item[key]) {
1593
+ dropdownWrapper.classList.add(key);
1594
+ }
1595
+ }
1596
+ }
1597
+ });
1598
+ if (this.appendToBodyCopyParent) {
1599
+ var parentNode = this.$refs.dropdown.parentNode;
1600
+ var parent = this.$data._bodyEl;
1601
+ parent.classList.forEach(function (item) {
1602
+ return parent.classList.remove(item);
1603
+ });
1604
+ parentNode.classList.forEach(function (item) {
1605
+ parent.classList.add(item);
1606
+ });
1607
+ }
1608
+ var rect = trigger.getBoundingClientRect();
1609
+ var top = rect.top + window.scrollY;
1610
+ var left = rect.left + window.scrollX;
1611
+ if (!this.position || this.position.indexOf('bottom') >= 0) {
1612
+ top += trigger.clientHeight;
1613
+ } else {
1614
+ top -= dropdownMenu.clientHeight;
1615
+ }
1616
+ if (this.position && this.position.indexOf('left') >= 0) {
1617
+ left -= dropdownMenu.clientWidth - trigger.clientWidth;
1618
+ }
1619
+ this.style = {
1620
+ position: 'absolute',
1621
+ top: "".concat(top, "px"),
1622
+ left: "".concat(left, "px"),
1623
+ zIndex: '99',
1624
+ width: this.expanded ? "".concat(dropdown.offsetWidth, "px") : undefined
1625
+ };
1626
+ }
1627
+ }
1628
+ },
1629
+ mounted: function mounted() {
1630
+ if (this.appendToBody) {
1631
+ this.$data._bodyEl = createAbsoluteElement(this.$refs.dropdownMenu);
1632
+ this.updateAppendToBody();
1633
+ }
1634
+ },
1635
+ created: function created() {
1636
+ if (typeof window !== 'undefined') {
1637
+ document.addEventListener('click', this.clickedOutside);
1638
+ document.addEventListener('keyup', this.keyPress);
1639
+ }
1640
+ },
1641
+ beforeDestroy: function beforeDestroy() {
1642
+ if (typeof window !== 'undefined') {
1643
+ document.removeEventListener('click', this.clickedOutside);
1644
+ document.removeEventListener('keyup', this.keyPress);
1645
+ }
1646
+ if (this.appendToBody) {
1647
+ removeElement(this.$data._bodyEl);
1648
+ }
1649
+ clearTimeout(this.timeOutID);
1650
+ clearTimeout(this.timeOutID2);
1651
+ }
1652
+ };
1653
+
1654
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
1655
+ if (typeof shadowMode !== 'boolean') {
1656
+ createInjectorSSR = createInjector;
1657
+ createInjector = shadowMode;
1658
+ shadowMode = false;
1659
+ }
1660
+ // Vue.extend constructor export interop.
1661
+ const options = typeof script === 'function' ? script.options : script;
1662
+ // render functions
1663
+ if (template && template.render) {
1664
+ options.render = template.render;
1665
+ options.staticRenderFns = template.staticRenderFns;
1666
+ options._compiled = true;
1667
+ // functional template
1668
+ if (isFunctionalTemplate) {
1669
+ options.functional = true;
1670
+ }
1671
+ }
1672
+ // scopedId
1673
+ if (scopeId) {
1674
+ options._scopeId = scopeId;
1675
+ }
1676
+ let hook;
1677
+ if (moduleIdentifier) {
1678
+ // server build
1679
+ hook = function (context) {
1680
+ // 2.3 injection
1681
+ context =
1682
+ context || // cached call
1683
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
1684
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
1685
+ // 2.2 with runInNewContext: true
1686
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1687
+ context = __VUE_SSR_CONTEXT__;
1688
+ }
1689
+ // inject component styles
1690
+ if (style) {
1691
+ style.call(this, createInjectorSSR(context));
1692
+ }
1693
+ // register component module identifier for async chunk inference
1694
+ if (context && context._registeredComponents) {
1695
+ context._registeredComponents.add(moduleIdentifier);
1696
+ }
1697
+ };
1698
+ // used by ssr in case component is cached and beforeCreate
1699
+ // never gets called
1700
+ options._ssrRegister = hook;
1701
+ }
1702
+ else if (style) {
1703
+ hook = shadowMode
1704
+ ? function (context) {
1705
+ style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
1706
+ }
1707
+ : function (context) {
1708
+ style.call(this, createInjector(context));
1709
+ };
1710
+ }
1711
+ if (hook) {
1712
+ if (options.functional) {
1713
+ // register for functional component in vue file
1714
+ const originalRender = options.render;
1715
+ options.render = function renderWithStyleInjection(h, context) {
1716
+ hook.call(context);
1717
+ return originalRender(h, context);
1718
+ };
1719
+ }
1720
+ else {
1721
+ // inject component registration as beforeCreate hook
1722
+ const existing = options.beforeCreate;
1723
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
1724
+ }
1725
+ }
1726
+ return script;
1727
+ }
1728
+
1729
+ /* script */
1730
+ const __vue_script__$b = script$b;
1731
+
1732
+ /* template */
1733
+ var __vue_render__$a = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"dropdown",staticClass:"dropdown dropdown-menu-animation",class:_vm.rootClasses,on:{"mouseleave":function($event){_vm.isHoverable = false;}}},[(!_vm.inline)?_c('div',{ref:"trigger",staticClass:"dropdown-trigger",attrs:{"tabindex":_vm.disabled ? false : _vm.triggerTabindex,"aria-haspopup":"true"},on:{"click":_vm.onClick,"contextmenu":function($event){$event.preventDefault();return _vm.onContextMenu($event)},"mouseenter":_vm.onHover,"!focus":function($event){return _vm.onFocus($event)},"touchstart":_vm.onTouchStart,"touchmove":_vm.onTouchMove,"touchend":_vm.onTouchEnd}},[_vm._t("trigger",null,{"active":_vm.isActive})],2):_vm._e(),_c('transition',{attrs:{"name":_vm.animation}},[(_vm.isMobileModal)?_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isActive),expression:"isActive"}],staticClass:"background",attrs:{"aria-hidden":!_vm.isActive}}):_vm._e()]),_c('transition',{attrs:{"name":_vm.animation}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:((!_vm.disabled && (_vm.isActive || _vm.isHoverable)) || _vm.inline),expression:"(!disabled && (isActive || isHoverable)) || inline"},{name:"trap-focus",rawName:"v-trap-focus",value:(_vm.trapFocus),expression:"trapFocus"}],ref:"dropdownMenu",staticClass:"dropdown-menu",style:(_vm.style),attrs:{"aria-hidden":!_vm.isActive}},[_c('div',{staticClass:"dropdown-content",style:(_vm.contentStyle),attrs:{"role":_vm.ariaRole,"aria-modal":!_vm.inline}},[_vm._t("default")],2)])])],1)};
1734
+ var __vue_staticRenderFns__$a = [];
1735
+
1736
+ /* style */
1737
+ const __vue_inject_styles__$b = undefined;
1738
+ /* scoped */
1739
+ const __vue_scope_id__$b = undefined;
1740
+ /* module identifier */
1741
+ const __vue_module_identifier__$b = undefined;
1742
+ /* functional template */
1743
+ const __vue_is_functional_template__$b = false;
1744
+ /* style inject */
1745
+
1746
+ /* style inject SSR */
1747
+
1748
+ /* style inject shadow dom */
1749
+
1750
+
1751
+
1752
+ const __vue_component__$b = /*#__PURE__*/normalizeComponent(
1753
+ { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
1754
+ __vue_inject_styles__$b,
1755
+ __vue_script__$b,
1756
+ __vue_scope_id__$b,
1757
+ __vue_is_functional_template__$b,
1758
+ __vue_module_identifier__$b,
1759
+ false,
1760
+ undefined,
1761
+ undefined,
1762
+ undefined
1763
+ );
1764
+
1765
+ var Dropdown = __vue_component__$b;
1766
+
1767
+ var sorted = 1;
1768
+ var optional = 2;
1769
+ var InjectedChildMixin = (function (parentItemName) {
1770
+ var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1771
+ var mixin = {
1772
+ inject: {
1773
+ parent: {
1774
+ from: 'b' + parentItemName,
1775
+ default: false
1776
+ }
1777
+ },
1778
+ created: function created() {
1779
+ if (!this.parent) {
1780
+ if (!hasFlag(flags, optional)) {
1781
+ this.$destroy();
1782
+ throw new Error('You should wrap ' + this.$options.name + ' in a ' + parentItemName);
1783
+ }
1784
+ } else if (this.parent._registerItem) {
1785
+ this.parent._registerItem(this);
1786
+ }
1787
+ },
1788
+ beforeDestroy: function beforeDestroy() {
1789
+ if (this.parent && this.parent._unregisterItem) {
1790
+ this.parent._unregisterItem(this);
1791
+ }
1792
+ }
1793
+ };
1794
+ if (hasFlag(flags, sorted)) {
1795
+ mixin.data = function () {
1796
+ return {
1797
+ index: null
1798
+ };
1799
+ };
1800
+ }
1801
+ return mixin;
1802
+ });
1803
+
1804
+ //
1805
+ var script$a = {
1806
+ name: 'BDropdownItem',
1807
+ mixins: [InjectedChildMixin('dropdown')],
1808
+ props: {
1809
+ value: {
1810
+ type: [String, Number, Boolean, Object, Array, Function],
1811
+ default: null
1812
+ },
1813
+ separator: Boolean,
1814
+ disabled: Boolean,
1815
+ custom: Boolean,
1816
+ focusable: {
1817
+ type: Boolean,
1818
+ default: true
1819
+ },
1820
+ paddingless: Boolean,
1821
+ hasLink: Boolean,
1822
+ ariaRole: {
1823
+ type: String,
1824
+ default: ''
1825
+ }
1826
+ },
1827
+ computed: {
1828
+ anchorClasses: function anchorClasses() {
1829
+ return {
1830
+ 'is-disabled': this.parent.disabled || this.disabled,
1831
+ 'is-paddingless': this.paddingless,
1832
+ 'is-active': this.isActive
1833
+ };
1834
+ },
1835
+ itemClasses: function itemClasses() {
1836
+ return {
1837
+ 'dropdown-item': !this.hasLink,
1838
+ 'is-disabled': this.disabled,
1839
+ 'is-paddingless': this.paddingless,
1840
+ 'is-active': this.isActive,
1841
+ 'has-link': this.hasLink
1842
+ };
1843
+ },
1844
+ ariaRoleItem: function ariaRoleItem() {
1845
+ return this.ariaRole === 'menuitem' || this.ariaRole === 'listitem' ? this.ariaRole : null;
1846
+ },
1847
+ isClickable: function isClickable() {
1848
+ return !this.parent.disabled && !this.separator && !this.disabled && !this.custom;
1849
+ },
1850
+ isActive: function isActive() {
1851
+ if (this.parent.selected === null) return false;
1852
+ if (this.parent.multiple) return this.parent.selected.indexOf(this.value) >= 0;
1853
+ return this.value === this.parent.selected;
1854
+ },
1855
+ isFocusable: function isFocusable() {
1856
+ return this.hasLink ? false : this.focusable;
1857
+ }
1858
+ },
1859
+ methods: {
1860
+ /**
1861
+ * Click listener, select the item.
1862
+ */
1863
+ selectItem: function selectItem() {
1864
+ if (!this.isClickable) return;
1865
+ this.parent.selectItem(this.value);
1866
+ this.$emit('click');
1867
+ }
1868
+ }
1869
+ };
1870
+
1871
+ /* script */
1872
+ const __vue_script__$a = script$a;
1873
+
1874
+ /* template */
1875
+ var __vue_render__$9 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.separator)?_c('hr',{staticClass:"dropdown-divider"}):(!_vm.custom && !_vm.hasLink)?_c('a',{staticClass:"dropdown-item",class:_vm.anchorClasses,attrs:{"role":_vm.ariaRoleItem,"tabindex":_vm.isFocusable ? 0 : null},on:{"click":_vm.selectItem}},[_vm._t("default")],2):_c('div',{class:_vm.itemClasses,attrs:{"role":_vm.ariaRoleItem,"tabindex":_vm.isFocusable ? 0 : null},on:{"click":_vm.selectItem}},[_vm._t("default")],2)};
1876
+ var __vue_staticRenderFns__$9 = [];
1877
+
1878
+ /* style */
1879
+ const __vue_inject_styles__$a = undefined;
1880
+ /* scoped */
1881
+ const __vue_scope_id__$a = undefined;
1882
+ /* module identifier */
1883
+ const __vue_module_identifier__$a = undefined;
1884
+ /* functional template */
1885
+ const __vue_is_functional_template__$a = false;
1886
+ /* style inject */
1887
+
1888
+ /* style inject SSR */
1889
+
1890
+ /* style inject shadow dom */
1891
+
1892
+
1893
+
1894
+ const __vue_component__$a = /*#__PURE__*/normalizeComponent(
1895
+ { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
1896
+ __vue_inject_styles__$a,
1897
+ __vue_script__$a,
1898
+ __vue_scope_id__$a,
1899
+ __vue_is_functional_template__$a,
1900
+ __vue_module_identifier__$a,
1901
+ false,
1902
+ undefined,
1903
+ undefined,
1904
+ undefined
1905
+ );
1906
+
1907
+ var DropdownItem = __vue_component__$a;
1908
+
1909
+ var mdiIcons = {
1910
+ sizes: {
1911
+ 'default': 'mdi-24px',
1912
+ 'is-small': null,
1913
+ 'is-medium': 'mdi-36px',
1914
+ 'is-large': 'mdi-48px'
1915
+ },
1916
+ iconPrefix: 'mdi-'
1917
+ };
1918
+ var faIcons = function faIcons() {
1919
+ var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-';
1920
+ return {
1921
+ sizes: {
1922
+ 'default': null,
1923
+ 'is-small': null,
1924
+ 'is-medium': faIconPrefix + 'lg',
1925
+ 'is-large': faIconPrefix + '2x'
1926
+ },
1927
+ iconPrefix: faIconPrefix,
1928
+ internalIcons: {
1929
+ 'information': 'info-circle',
1930
+ 'alert': 'exclamation-triangle',
1931
+ 'alert-circle': 'exclamation-circle',
1932
+ 'chevron-right': 'angle-right',
1933
+ 'chevron-left': 'angle-left',
1934
+ 'chevron-down': 'angle-down',
1935
+ 'eye-off': 'eye-slash',
1936
+ 'menu-down': 'caret-down',
1937
+ 'menu-up': 'caret-up',
1938
+ 'close-circle': 'times-circle'
1939
+ }
1940
+ };
1941
+ };
1942
+ var getIcons = function getIcons() {
1943
+ var icons = {
1944
+ mdi: mdiIcons,
1945
+ fa: faIcons(),
1946
+ fas: faIcons(),
1947
+ far: faIcons(),
1948
+ fad: faIcons(),
1949
+ fab: faIcons(),
1950
+ fal: faIcons(),
1951
+ 'fa-solid': faIcons(),
1952
+ 'fa-regular': faIcons(),
1953
+ 'fa-light': faIcons(),
1954
+ 'fa-thin': faIcons(),
1955
+ 'fa-duotone': faIcons(),
1956
+ 'fa-brands': faIcons()
1957
+ };
1958
+ if (config && config.customIconPacks) {
1959
+ icons = merge(icons, config.customIconPacks, true);
1960
+ }
1961
+ return icons;
1962
+ };
1963
+ var getIcons$1 = getIcons;
1964
+
1965
+ var script$9 = {
1966
+ name: 'BIcon',
1967
+ props: {
1968
+ type: [String, Object],
1969
+ component: String,
1970
+ pack: String,
1971
+ icon: String,
1972
+ size: String,
1973
+ customSize: String,
1974
+ customClass: String,
1975
+ both: Boolean // This is used internally to show both MDI and FA icon
1976
+ },
1977
+ computed: {
1978
+ iconConfig: function iconConfig() {
1979
+ var allIcons = getIcons$1();
1980
+ return allIcons[this.newPack];
1981
+ },
1982
+ iconPrefix: function iconPrefix() {
1983
+ if (this.iconConfig && this.iconConfig.iconPrefix) {
1984
+ return this.iconConfig.iconPrefix;
1985
+ }
1986
+ return '';
1987
+ },
1988
+ /**
1989
+ * Internal icon name based on the pack.
1990
+ * If pack is 'fa', gets the equivalent FA icon name of the MDI,
1991
+ * internal icons are always MDI.
1992
+ */
1993
+ newIcon: function newIcon() {
1994
+ return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon));
1995
+ },
1996
+ newPack: function newPack() {
1997
+ return this.pack || config.defaultIconPack;
1998
+ },
1999
+ newType: function newType() {
2000
+ if (!this.type) return;
2001
+ var splitType = [];
2002
+ if (typeof this.type === 'string') {
2003
+ splitType = this.type.split('-');
2004
+ } else {
2005
+ for (var key in this.type) {
2006
+ if (this.type[key]) {
2007
+ splitType = key.split('-');
2008
+ break;
2009
+ }
2010
+ }
2011
+ }
2012
+ if (splitType.length <= 1) return;
2013
+ var _splitType = splitType,
2014
+ _splitType2 = _toArray(_splitType),
2015
+ type = _splitType2.slice(1);
2016
+ return "has-text-".concat(type.join('-'));
2017
+ },
2018
+ newCustomSize: function newCustomSize() {
2019
+ return this.customSize || this.customSizeByPack;
2020
+ },
2021
+ customSizeByPack: function customSizeByPack() {
2022
+ if (this.iconConfig && this.iconConfig.sizes) {
2023
+ if (this.size && this.iconConfig.sizes[this.size] !== undefined) {
2024
+ return this.iconConfig.sizes[this.size];
2025
+ } else if (this.iconConfig.sizes.default) {
2026
+ return this.iconConfig.sizes.default;
2027
+ }
2028
+ }
2029
+ return null;
2030
+ },
2031
+ useIconComponent: function useIconComponent() {
2032
+ return this.component || config.defaultIconComponent;
2033
+ }
2034
+ },
2035
+ methods: {
2036
+ /**
2037
+ * Equivalent icon name of the MDI.
2038
+ */
2039
+ getEquivalentIconOf: function getEquivalentIconOf(value) {
2040
+ // Only transform the class if the both prop is set to true
2041
+ if (!this.both) {
2042
+ return value;
2043
+ }
2044
+ if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) {
2045
+ return this.iconConfig.internalIcons[value];
2046
+ }
2047
+ return value;
2048
+ }
2049
+ }
2050
+ };
2051
+
2052
+ /* script */
2053
+ const __vue_script__$9 = script$9;
2054
+
2055
+ /* template */
2056
+ var __vue_render__$8 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"icon",class:[_vm.newType, _vm.size]},[(!_vm.useIconComponent)?_c('i',{class:[_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]}):_c(_vm.useIconComponent,{tag:"component",class:[_vm.customClass],attrs:{"icon":[_vm.newPack, _vm.newIcon],"size":_vm.newCustomSize}})],1)};
2057
+ var __vue_staticRenderFns__$8 = [];
2058
+
2059
+ /* style */
2060
+ const __vue_inject_styles__$9 = undefined;
2061
+ /* scoped */
2062
+ const __vue_scope_id__$9 = undefined;
2063
+ /* module identifier */
2064
+ const __vue_module_identifier__$9 = undefined;
2065
+ /* functional template */
2066
+ const __vue_is_functional_template__$9 = false;
2067
+ /* style inject */
2068
+
2069
+ /* style inject SSR */
2070
+
2071
+ /* style inject shadow dom */
2072
+
2073
+
2074
+
2075
+ const __vue_component__$9 = /*#__PURE__*/normalizeComponent(
2076
+ { render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },
2077
+ __vue_inject_styles__$9,
2078
+ __vue_script__$9,
2079
+ __vue_scope_id__$9,
2080
+ __vue_is_functional_template__$9,
2081
+ __vue_module_identifier__$9,
2082
+ false,
2083
+ undefined,
2084
+ undefined,
2085
+ undefined
2086
+ );
2087
+
2088
+ var Icon = __vue_component__$9;
2089
+
2090
+ var script$8 = {
2091
+ name: 'BInput',
2092
+ components: _defineProperty({}, Icon.name, Icon),
2093
+ mixins: [FormElementMixin],
2094
+ inheritAttrs: false,
2095
+ props: {
2096
+ value: [Number, String],
2097
+ type: {
2098
+ type: String,
2099
+ default: 'text'
2100
+ },
2101
+ lazy: {
2102
+ type: Boolean,
2103
+ default: false
2104
+ },
2105
+ passwordReveal: Boolean,
2106
+ iconClickable: Boolean,
2107
+ hasCounter: {
2108
+ type: Boolean,
2109
+ default: function _default() {
2110
+ return config.defaultInputHasCounter;
2111
+ }
2112
+ },
2113
+ customClass: {
2114
+ type: String,
2115
+ default: ''
2116
+ },
2117
+ iconRight: String,
2118
+ iconRightClickable: Boolean,
2119
+ iconRightType: String
2120
+ },
2121
+ data: function data() {
2122
+ return {
2123
+ newValue: this.value,
2124
+ newType: this.type,
2125
+ newAutocomplete: this.autocomplete || config.defaultInputAutocomplete,
2126
+ isPasswordVisible: false,
2127
+ _elementRef: this.type === 'textarea' ? 'textarea' : 'input'
2128
+ };
2129
+ },
2130
+ computed: {
2131
+ computedValue: {
2132
+ get: function get() {
2133
+ return this.newValue;
2134
+ },
2135
+ set: function set(value) {
2136
+ this.newValue = value;
2137
+ this.$emit('input', value);
2138
+ }
2139
+ },
2140
+ rootClasses: function rootClasses() {
2141
+ return [this.iconPosition, this.size, {
2142
+ 'is-expanded': this.expanded,
2143
+ 'is-loading': this.loading,
2144
+ 'is-clearfix': !this.hasMessage
2145
+ }];
2146
+ },
2147
+ inputClasses: function inputClasses() {
2148
+ return [this.statusType, this.size, {
2149
+ 'is-rounded': this.rounded
2150
+ }];
2151
+ },
2152
+ hasIconRight: function hasIconRight() {
2153
+ return this.passwordReveal || this.loading || this.statusIcon && this.statusTypeIcon || this.iconRight;
2154
+ },
2155
+ rightIcon: function rightIcon() {
2156
+ if (this.passwordReveal) {
2157
+ return this.passwordVisibleIcon;
2158
+ } else if (this.iconRight) {
2159
+ return this.iconRight;
2160
+ }
2161
+ return this.statusTypeIcon;
2162
+ },
2163
+ rightIconType: function rightIconType() {
2164
+ if (this.passwordReveal) {
2165
+ return 'is-primary';
2166
+ } else if (this.iconRight) {
2167
+ return this.iconRightType || null;
2168
+ }
2169
+ return this.statusType;
2170
+ },
2171
+ /**
2172
+ * Position of the icon or if it's both sides.
2173
+ */
2174
+ iconPosition: function iconPosition() {
2175
+ var iconClasses = '';
2176
+ if (this.icon) {
2177
+ iconClasses += 'has-icons-left ';
2178
+ }
2179
+ if (this.hasIconRight) {
2180
+ iconClasses += 'has-icons-right';
2181
+ }
2182
+ return iconClasses;
2183
+ },
2184
+ /**
2185
+ * Icon name (MDI) based on the type.
2186
+ */
2187
+ statusTypeIcon: function statusTypeIcon() {
2188
+ switch (this.statusType) {
2189
+ case 'is-success':
2190
+ return 'check';
2191
+ case 'is-danger':
2192
+ return 'alert-circle';
2193
+ case 'is-info':
2194
+ return 'information';
2195
+ case 'is-warning':
2196
+ return 'alert';
2197
+ }
2198
+ },
2199
+ /**
2200
+ * Check if have any message prop from parent if it's a Field.
2201
+ */
2202
+ hasMessage: function hasMessage() {
2203
+ return !!this.statusMessage;
2204
+ },
2205
+ /**
2206
+ * Current password-reveal icon name.
2207
+ */
2208
+ passwordVisibleIcon: function passwordVisibleIcon() {
2209
+ return !this.isPasswordVisible ? 'eye' : 'eye-off';
2210
+ },
2211
+ /**
2212
+ * Get value length
2213
+ */
2214
+ valueLength: function valueLength() {
2215
+ if (typeof this.computedValue === 'string') {
2216
+ return Array.from(this.computedValue).length;
2217
+ } else if (typeof this.computedValue === 'number') {
2218
+ return this.computedValue.toString().length;
2219
+ }
2220
+ return 0;
2221
+ }
2222
+ },
2223
+ watch: {
2224
+ /**
2225
+ * When v-model is changed:
2226
+ * 1. Set internal value.
2227
+ * 2. Validate it if the value came from outside;
2228
+ * i.e., not equal to computedValue
2229
+ */
2230
+ value: function value(_value) {
2231
+ var _this = this;
2232
+ var fromOutside = this.computedValue != _value; // eslint-disable-line eqeqeq
2233
+ this.newValue = _value;
2234
+ if (fromOutside) {
2235
+ // validation must wait for DOM updated
2236
+ this.$nextTick(function () {
2237
+ !_this.isValid && _this.checkHtml5Validity();
2238
+ });
2239
+ }
2240
+ },
2241
+ type: function type(_type) {
2242
+ this.newType = _type;
2243
+ }
2244
+ },
2245
+ methods: {
2246
+ /**
2247
+ * Toggle the visibility of a password-reveal input
2248
+ * by changing the type and focus the input right away.
2249
+ */
2250
+ togglePasswordVisibility: function togglePasswordVisibility() {
2251
+ var _this2 = this;
2252
+ this.isPasswordVisible = !this.isPasswordVisible;
2253
+ this.newType = this.isPasswordVisible ? 'text' : 'password';
2254
+ this.$nextTick(function () {
2255
+ _this2.focus();
2256
+ });
2257
+ },
2258
+ iconClick: function iconClick(emit, event) {
2259
+ var _this3 = this;
2260
+ this.$emit(emit, event);
2261
+ this.$nextTick(function () {
2262
+ _this3.focus();
2263
+ });
2264
+ },
2265
+ rightIconClick: function rightIconClick(event) {
2266
+ if (this.passwordReveal) {
2267
+ this.togglePasswordVisibility();
2268
+ } else if (this.iconRightClickable) {
2269
+ this.iconClick('icon-right-click', event);
2270
+ }
2271
+ },
2272
+ onInput: function onInput(event) {
2273
+ if (!this.lazy) {
2274
+ var value = event.target.value;
2275
+ this.updateValue(value);
2276
+ }
2277
+ },
2278
+ onChange: function onChange(event) {
2279
+ if (this.lazy) {
2280
+ var value = event.target.value;
2281
+ this.updateValue(value);
2282
+ }
2283
+ },
2284
+ updateValue: function updateValue(value) {
2285
+ this.computedValue = value;
2286
+ !this.isValid && this.checkHtml5Validity();
2287
+ }
2288
+ }
2289
+ };
2290
+
2291
+ /* script */
2292
+ const __vue_script__$8 = script$8;
2293
+
2294
+ /* template */
2295
+ var __vue_render__$7 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control",class:_vm.rootClasses},[(_vm.type !== 'textarea')?_c('input',_vm._b({ref:"input",staticClass:"input",class:[_vm.inputClasses, _vm.customClass],attrs:{"type":_vm.newType,"autocomplete":_vm.newAutocomplete,"maxlength":_vm.maxlength},domProps:{"value":_vm.computedValue},on:{"input":_vm.onInput,"change":_vm.onChange,"blur":_vm.onBlur,"focus":_vm.onFocus}},'input',_vm.$attrs,false)):_c('textarea',_vm._b({ref:"textarea",staticClass:"textarea",class:[_vm.inputClasses, _vm.customClass],attrs:{"maxlength":_vm.maxlength},domProps:{"value":_vm.computedValue},on:{"input":_vm.onInput,"change":_vm.onChange,"blur":_vm.onBlur,"focus":_vm.onFocus}},'textarea',_vm.$attrs,false)),(_vm.icon)?_c('b-icon',{staticClass:"is-left",class:{'is-clickable': _vm.iconClickable},attrs:{"icon":_vm.icon,"pack":_vm.iconPack,"size":_vm.iconSize},nativeOn:{"click":function($event){return _vm.iconClick('icon-click', $event)}}}):_vm._e(),(!_vm.loading && _vm.hasIconRight)?_c('b-icon',{staticClass:"is-right",class:{ 'is-clickable': _vm.passwordReveal || _vm.iconRightClickable },attrs:{"icon":_vm.rightIcon,"pack":_vm.iconPack,"size":_vm.iconSize,"type":_vm.rightIconType,"both":""},nativeOn:{"click":function($event){return _vm.rightIconClick($event)}}}):_vm._e(),(_vm.maxlength && _vm.hasCounter && _vm.type !== 'number')?_c('small',{staticClass:"help counter",class:{ 'is-invisible': !_vm.isFocused }},[_vm._v(" "+_vm._s(_vm.valueLength)+" / "+_vm._s(_vm.maxlength)+" ")]):_vm._e()],1)};
2296
+ var __vue_staticRenderFns__$7 = [];
2297
+
2298
+ /* style */
2299
+ const __vue_inject_styles__$8 = undefined;
2300
+ /* scoped */
2301
+ const __vue_scope_id__$8 = undefined;
2302
+ /* module identifier */
2303
+ const __vue_module_identifier__$8 = undefined;
2304
+ /* functional template */
2305
+ const __vue_is_functional_template__$8 = false;
2306
+ /* style inject */
2307
+
2308
+ /* style inject SSR */
2309
+
2310
+ /* style inject shadow dom */
2311
+
2312
+
2313
+
2314
+ const __vue_component__$8 = /*#__PURE__*/normalizeComponent(
2315
+ { render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
2316
+ __vue_inject_styles__$8,
2317
+ __vue_script__$8,
2318
+ __vue_scope_id__$8,
2319
+ __vue_is_functional_template__$8,
2320
+ __vue_module_identifier__$8,
2321
+ false,
2322
+ undefined,
2323
+ undefined,
2324
+ undefined
2325
+ );
2326
+
2327
+ var Input = __vue_component__$8;
2328
+
2329
+ var script$7 = {
2330
+ name: 'BFieldBody',
2331
+ props: {
2332
+ message: {
2333
+ type: [String, Array]
2334
+ },
2335
+ type: {
2336
+ type: [String, Object]
2337
+ }
2338
+ },
2339
+ render: function render(createElement) {
2340
+ var _this = this;
2341
+ var first = true;
2342
+ return createElement('div', {
2343
+ attrs: {
2344
+ 'class': 'field-body'
2345
+ }
2346
+ }, this.$slots.default.map(function (element) {
2347
+ // skip returns and comments
2348
+ if (!element.tag) {
2349
+ return element;
2350
+ }
2351
+ var message;
2352
+ if (first) {
2353
+ message = _this.message;
2354
+ first = false;
2355
+ }
2356
+ return createElement('b-field', {
2357
+ attrs: {
2358
+ type: _this.type,
2359
+ message: message
2360
+ }
2361
+ }, [element]);
2362
+ }));
2363
+ }
2364
+ };
2365
+
2366
+ /* script */
2367
+ const __vue_script__$7 = script$7;
2368
+
2369
+ /* template */
2370
+
2371
+ /* style */
2372
+ const __vue_inject_styles__$7 = undefined;
2373
+ /* scoped */
2374
+ const __vue_scope_id__$7 = undefined;
2375
+ /* module identifier */
2376
+ const __vue_module_identifier__$7 = undefined;
2377
+ /* functional template */
2378
+ const __vue_is_functional_template__$7 = undefined;
2379
+ /* style inject */
2380
+
2381
+ /* style inject SSR */
2382
+
2383
+ /* style inject shadow dom */
2384
+
2385
+
2386
+
2387
+ const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
2388
+ {},
2389
+ __vue_inject_styles__$7,
2390
+ __vue_script__$7,
2391
+ __vue_scope_id__$7,
2392
+ __vue_is_functional_template__$7,
2393
+ __vue_module_identifier__$7,
2394
+ false,
2395
+ undefined,
2396
+ undefined,
2397
+ undefined
2398
+ );
2399
+
2400
+ var FieldBody = __vue_component__$7;
2401
+
2402
+ var script$6 = {
2403
+ name: 'BField',
2404
+ components: _defineProperty({}, FieldBody.name, FieldBody),
2405
+ provide: function provide() {
2406
+ return {
2407
+ 'BField': this
2408
+ };
2409
+ },
2410
+ inject: {
2411
+ parent: {
2412
+ from: 'BField',
2413
+ default: false
2414
+ }
2415
+ },
2416
+ // Used internally only when using Field in Field
2417
+ props: {
2418
+ type: [String, Object],
2419
+ label: String,
2420
+ labelFor: String,
2421
+ message: [String, Array, Object],
2422
+ grouped: Boolean,
2423
+ groupMultiline: Boolean,
2424
+ position: String,
2425
+ expanded: Boolean,
2426
+ horizontal: Boolean,
2427
+ addons: {
2428
+ type: Boolean,
2429
+ default: true
2430
+ },
2431
+ customClass: String,
2432
+ labelPosition: {
2433
+ type: String,
2434
+ default: function _default() {
2435
+ return config.defaultFieldLabelPosition;
2436
+ }
2437
+ }
2438
+ },
2439
+ data: function data() {
2440
+ return {
2441
+ newType: this.type,
2442
+ newMessage: this.message,
2443
+ fieldLabelSize: null,
2444
+ _isField: true // Used internally by Input and Select
2445
+ };
2446
+ },
2447
+ computed: {
2448
+ rootClasses: function rootClasses() {
2449
+ return [{
2450
+ 'is-expanded': this.expanded,
2451
+ 'is-horizontal': this.horizontal,
2452
+ 'is-floating-in-label': this.hasLabel && !this.horizontal && this.labelPosition === 'inside',
2453
+ 'is-floating-label': this.hasLabel && !this.horizontal && this.labelPosition === 'on-border'
2454
+ }, this.numberInputClasses];
2455
+ },
2456
+ innerFieldClasses: function innerFieldClasses() {
2457
+ return [this.fieldType(), this.newPosition, {
2458
+ 'is-grouped-multiline': this.groupMultiline
2459
+ }];
2460
+ },
2461
+ hasInnerField: function hasInnerField() {
2462
+ return this.grouped || this.groupMultiline || this.hasAddons();
2463
+ },
2464
+ /**
2465
+ * Correct Bulma class for the side of the addon or group.
2466
+ *
2467
+ * This is not kept like the others (is-small, etc.),
2468
+ * because since 'has-addons' is set automatically it
2469
+ * doesn't make sense to teach users what addons are exactly.
2470
+ */
2471
+ newPosition: function newPosition() {
2472
+ if (this.position === undefined) return;
2473
+ var position = this.position.split('-');
2474
+ if (position.length < 1) return;
2475
+ var prefix = this.grouped ? 'is-grouped-' : 'has-addons-';
2476
+ if (this.position) return prefix + position[1];
2477
+ },
2478
+ /**
2479
+ * Formatted message in case it's an array
2480
+ * (each element is separated by <br> tag)
2481
+ */
2482
+ formattedMessage: function formattedMessage() {
2483
+ if (this.parent && this.parent.hasInnerField) {
2484
+ return ''; // Message will be displayed in parent field
2485
+ }
2486
+ if (typeof this.newMessage === 'string') {
2487
+ return [this.newMessage];
2488
+ }
2489
+ var messages = [];
2490
+ if (Array.isArray(this.newMessage)) {
2491
+ this.newMessage.forEach(function (message) {
2492
+ if (typeof message === 'string') {
2493
+ messages.push(message);
2494
+ } else {
2495
+ for (var key in message) {
2496
+ if (message[key]) {
2497
+ messages.push(key);
2498
+ }
2499
+ }
2500
+ }
2501
+ });
2502
+ } else {
2503
+ for (var key in this.newMessage) {
2504
+ if (this.newMessage[key]) {
2505
+ messages.push(key);
2506
+ }
2507
+ }
2508
+ }
2509
+ return messages.filter(function (m) {
2510
+ if (m) return m;
2511
+ });
2512
+ },
2513
+ hasLabel: function hasLabel() {
2514
+ return this.label || this.$slots.label;
2515
+ },
2516
+ hasMessage: function hasMessage() {
2517
+ return (!this.parent || !this.parent.hasInnerField) && this.newMessage || this.$slots.message;
2518
+ },
2519
+ numberInputClasses: function numberInputClasses() {
2520
+ if (this.$slots.default) {
2521
+ var numberinput = this.$slots.default.filter(function (node) {
2522
+ return node.tag && node.tag.toLowerCase().indexOf('numberinput') >= 0;
2523
+ })[0];
2524
+ if (numberinput) {
2525
+ var classes = ['has-numberinput'];
2526
+ var controlsPosition = numberinput.componentOptions.propsData.controlsPosition;
2527
+ var size = numberinput.componentOptions.propsData.size;
2528
+ if (controlsPosition) {
2529
+ classes.push("has-numberinput-".concat(controlsPosition));
2530
+ }
2531
+ if (size) {
2532
+ classes.push("has-numberinput-".concat(size));
2533
+ }
2534
+ return classes;
2535
+ }
2536
+ }
2537
+ return null;
2538
+ }
2539
+ },
2540
+ watch: {
2541
+ /**
2542
+ * Set internal type when prop change.
2543
+ */
2544
+ type: function type(value) {
2545
+ this.newType = value;
2546
+ },
2547
+ /**
2548
+ * Set internal message when prop change.
2549
+ */
2550
+ message: function message(value) {
2551
+ this.newMessage = value;
2552
+ },
2553
+ /**
2554
+ * Set parent message if we use Field in Field.
2555
+ */
2556
+ newMessage: function newMessage(value) {
2557
+ if (this.parent && this.parent.hasInnerField) {
2558
+ if (!this.parent.type) {
2559
+ this.parent.newType = this.newType;
2560
+ }
2561
+ if (!this.parent.message) {
2562
+ this.parent.newMessage = value;
2563
+ }
2564
+ }
2565
+ }
2566
+ },
2567
+ methods: {
2568
+ /**
2569
+ * Field has addons if there are more than one slot
2570
+ * (element / component) in the Field.
2571
+ * Or is grouped when prop is set.
2572
+ * Is a method to be called when component re-render.
2573
+ */
2574
+ fieldType: function fieldType() {
2575
+ if (this.grouped) return 'is-grouped';
2576
+ if (this.hasAddons()) return 'has-addons';
2577
+ },
2578
+ hasAddons: function hasAddons() {
2579
+ var renderedNode = 0;
2580
+ if (this.$slots.default) {
2581
+ renderedNode = this.$slots.default.reduce(function (i, node) {
2582
+ return node.tag ? i + 1 : i;
2583
+ }, 0);
2584
+ }
2585
+ return renderedNode > 1 && this.addons && !this.horizontal;
2586
+ }
2587
+ },
2588
+ mounted: function mounted() {
2589
+ if (this.horizontal) {
2590
+ // Bulma docs: .is-normal for any .input or .button
2591
+ var elements = this.$el.querySelectorAll('.input, .select, .button, .textarea, .b-slider');
2592
+ if (elements.length > 0) {
2593
+ this.fieldLabelSize = 'is-normal';
2594
+ }
2595
+ }
2596
+ }
2597
+ };
2598
+
2599
+ /* script */
2600
+ const __vue_script__$6 = script$6;
2601
+
2602
+ /* template */
2603
+ var __vue_render__$6 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"field",class:_vm.rootClasses},[(_vm.horizontal)?_c('div',{staticClass:"field-label",class:[_vm.customClass, _vm.fieldLabelSize]},[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()]):[(_vm.hasLabel)?_c('label',{staticClass:"label",class:_vm.customClass,attrs:{"for":_vm.labelFor}},[(_vm.$slots.label)?_vm._t("label"):[_vm._v(_vm._s(_vm.label))]],2):_vm._e()],(_vm.horizontal)?_c('b-field-body',{attrs:{"message":_vm.newMessage ? _vm.formattedMessage : '',"type":_vm.newType}},[_vm._t("default")],2):(_vm.hasInnerField)?_c('div',{staticClass:"field-body"},[_c('b-field',{class:_vm.innerFieldClasses,attrs:{"addons":false,"type":_vm.type}},[_vm._t("default")],2)],1):[_vm._t("default")],(_vm.hasMessage && !_vm.horizontal)?_c('p',{staticClass:"help",class:_vm.newType},[(_vm.$slots.message)?_vm._t("message",null,{"messages":_vm.formattedMessage}):[_vm._l((_vm.formattedMessage),function(mess,i){return [_vm._v(" "+_vm._s(mess)+" "),((i + 1) < _vm.formattedMessage.length)?_c('br',{key:i}):_vm._e()]})]],2):_vm._e()],2)};
2604
+ var __vue_staticRenderFns__$6 = [];
2605
+
2606
+ /* style */
2607
+ const __vue_inject_styles__$6 = undefined;
2608
+ /* scoped */
2609
+ const __vue_scope_id__$6 = undefined;
2610
+ /* module identifier */
2611
+ const __vue_module_identifier__$6 = undefined;
2612
+ /* functional template */
2613
+ const __vue_is_functional_template__$6 = false;
2614
+ /* style inject */
2615
+
2616
+ /* style inject SSR */
2617
+
2618
+ /* style inject shadow dom */
2619
+
2620
+
2621
+
2622
+ const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
2623
+ { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
2624
+ __vue_inject_styles__$6,
2625
+ __vue_script__$6,
2626
+ __vue_scope_id__$6,
2627
+ __vue_is_functional_template__$6,
2628
+ __vue_module_identifier__$6,
2629
+ false,
2630
+ undefined,
2631
+ undefined,
2632
+ undefined
2633
+ );
2634
+
2635
+ var Field = __vue_component__$6;
2636
+
2637
+ var script$5 = {
2638
+ name: 'BSelect',
2639
+ components: _defineProperty({}, Icon.name, Icon),
2640
+ mixins: [FormElementMixin],
2641
+ inheritAttrs: false,
2642
+ props: {
2643
+ value: {
2644
+ type: [String, Number, Boolean, Object, Array, Function, Date],
2645
+ default: null
2646
+ },
2647
+ placeholder: String,
2648
+ multiple: Boolean,
2649
+ nativeSize: [String, Number]
2650
+ },
2651
+ data: function data() {
2652
+ return {
2653
+ selected: this.value,
2654
+ _elementRef: 'select'
2655
+ };
2656
+ },
2657
+ computed: {
2658
+ computedValue: {
2659
+ get: function get() {
2660
+ return this.selected;
2661
+ },
2662
+ set: function set(value) {
2663
+ this.selected = value;
2664
+ this.$emit('input', value);
2665
+ !this.isValid && this.checkHtml5Validity();
2666
+ }
2667
+ },
2668
+ spanClasses: function spanClasses() {
2669
+ return [this.size, this.statusType, {
2670
+ 'is-fullwidth': this.expanded,
2671
+ 'is-loading': this.loading,
2672
+ 'is-multiple': this.multiple,
2673
+ 'is-rounded': this.rounded,
2674
+ 'is-empty': this.selected === null
2675
+ }];
2676
+ }
2677
+ },
2678
+ watch: {
2679
+ /**
2680
+ * When v-model is changed:
2681
+ * 1. Set the selected option.
2682
+ * 2. If it's invalid, validate again.
2683
+ */
2684
+ value: function value(_value) {
2685
+ this.selected = _value;
2686
+ !this.isValid && this.checkHtml5Validity();
2687
+ }
2688
+ }
2689
+ };
2690
+
2691
+ /* script */
2692
+ const __vue_script__$5 = script$5;
2693
+
2694
+ /* template */
2695
+ var __vue_render__$5 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"control",class:{ 'is-expanded': _vm.expanded, 'has-icons-left': _vm.icon }},[_c('span',{staticClass:"select",class:_vm.spanClasses},[_c('select',_vm._b({directives:[{name:"model",rawName:"v-model",value:(_vm.computedValue),expression:"computedValue"}],ref:"select",attrs:{"multiple":_vm.multiple,"size":_vm.nativeSize},on:{"blur":function($event){_vm.$emit('blur', $event) && _vm.checkHtml5Validity();},"focus":function($event){return _vm.$emit('focus', $event)},"change":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return val}); _vm.computedValue=$event.target.multiple ? $$selectedVal : $$selectedVal[0];}}},'select',_vm.$attrs,false),[(_vm.placeholder)?[(_vm.computedValue == null)?_c('option',{attrs:{"disabled":"","hidden":""},domProps:{"value":null}},[_vm._v(" "+_vm._s(_vm.placeholder)+" ")]):_vm._e()]:_vm._e(),_vm._t("default")],2)]),(_vm.icon)?_c('b-icon',{staticClass:"is-left",attrs:{"icon":_vm.icon,"pack":_vm.iconPack,"size":_vm.iconSize}}):_vm._e()],1)};
2696
+ var __vue_staticRenderFns__$5 = [];
2697
+
2698
+ /* style */
2699
+ const __vue_inject_styles__$5 = undefined;
2700
+ /* scoped */
2701
+ const __vue_scope_id__$5 = undefined;
2702
+ /* module identifier */
2703
+ const __vue_module_identifier__$5 = undefined;
2704
+ /* functional template */
2705
+ const __vue_is_functional_template__$5 = false;
2706
+ /* style inject */
2707
+
2708
+ /* style inject SSR */
2709
+
2710
+ /* style inject shadow dom */
2711
+
2712
+
2713
+
2714
+ const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
2715
+ { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
2716
+ __vue_inject_styles__$5,
2717
+ __vue_script__$5,
2718
+ __vue_scope_id__$5,
2719
+ __vue_is_functional_template__$5,
2720
+ __vue_module_identifier__$5,
2721
+ false,
2722
+ undefined,
2723
+ undefined,
2724
+ undefined
2725
+ );
2726
+
2727
+ var Select = __vue_component__$5;
2728
+
2729
+ //
2730
+ var cos30 = 0.86602540378;
2731
+ var sin30 = 0.5;
2732
+ var id = 0;
2733
+ var script$4 = {
2734
+ name: 'BColorpickerHSLRepresentationTriangle',
2735
+ props: {
2736
+ value: {
2737
+ type: Object,
2738
+ required: true,
2739
+ validator: function validator(value) {
2740
+ return typeof value.hue === 'number' && typeof value.saturation === 'number' && typeof value.lightness === 'number';
2741
+ }
2742
+ },
2743
+ size: {
2744
+ type: Number,
2745
+ default: 200
2746
+ },
2747
+ thickness: {
2748
+ type: Number,
2749
+ default: 20
2750
+ }
2751
+ },
2752
+ data: function data() {
2753
+ return {
2754
+ id: id++,
2755
+ hue: this.value.hue,
2756
+ saturation: this.value.saturation,
2757
+ lightness: this.value.lightness,
2758
+ captureMouse: false,
2759
+ captureType: 'hue',
2760
+ clientOffset: {
2761
+ cx: -1,
2762
+ cy: -1,
2763
+ width: 0,
2764
+ height: 0
2765
+ },
2766
+ cos30: cos30,
2767
+ sin30: sin30,
2768
+ debounce: 0
2769
+ };
2770
+ },
2771
+ computed: {
2772
+ viewBox: function viewBox() {
2773
+ var size = this.size;
2774
+ return "0 0 ".concat(size, " ").concat(size);
2775
+ },
2776
+ internalRadius: function internalRadius() {
2777
+ return this.size / 2 - this.thickness;
2778
+ },
2779
+ haloPath: function haloPath() {
2780
+ var size = this.size,
2781
+ thickness = this.thickness;
2782
+ var radius = size / 2 - 2; // 2px padding
2783
+ var thicknessRadius = radius - thickness;
2784
+ var center = size / 2;
2785
+ return "M".concat(center - radius, " ").concat(center, "a").concat(radius, " ").concat(radius, " 0 1 1 ").concat(2 * radius, " 0") + "h".concat(-thickness) + "a".concat(-thicknessRadius, " ").concat(thicknessRadius, " 0 1 0 ").concat(-2 * thicknessRadius, " 0") + "a".concat(thicknessRadius, " ").concat(thicknessRadius, " 0 1 0 ").concat(2 * thicknessRadius, " 0") + "h".concat(thickness) + "a".concat(radius, " ").concat(radius, " 0 1 1 ").concat(-2 * radius, " 0z");
2786
+ },
2787
+ trianglePath: function trianglePath() {
2788
+ var size = this.size,
2789
+ thickness = this.thickness;
2790
+ var radius = size - 4;
2791
+ var thicknessRadius = (radius - 2 * thickness) / 2;
2792
+ return "M0 ".concat(-thicknessRadius) + "L".concat(cos30 * thicknessRadius, " ").concat(sin30 * thicknessRadius) + "H".concat(-cos30 * thicknessRadius, "z");
2793
+ }
2794
+ },
2795
+ watch: {
2796
+ captureMouse: function captureMouse(newValue, oldValue) {
2797
+ if (oldValue === false && newValue !== false) {
2798
+ var rect = this.$el.getBoundingClientRect();
2799
+ // Caching offset
2800
+ this.clientOffset.cx = rect.x + rect.width / 2;
2801
+ this.clientOffset.cy = rect.y + rect.height / 2;
2802
+ this.clientOffset.width = rect.width;
2803
+ this.clientOffset.height = rect.height;
2804
+ }
2805
+ },
2806
+ value: {
2807
+ deep: true,
2808
+ handler: function handler(newColor) {
2809
+ var _this = this;
2810
+ var hue = newColor.hue,
2811
+ saturation = newColor.saturation,
2812
+ lightness = newColor.lightness;
2813
+ window.clearTimeout(this.debounce);
2814
+ this.debounce = window.setTimeout(function () {
2815
+ if (lightness >= 0.03 && lightness <= 0.97 && saturation > 0) {
2816
+ _this.hue = hue;
2817
+ }
2818
+ _this.saturation = saturation;
2819
+ _this.lightness = lightness;
2820
+ }, 200);
2821
+ }
2822
+ }
2823
+ },
2824
+ methods: {
2825
+ increaseHue: function increaseHue() {
2826
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
2827
+ this.hue = (this.hue + value) % 360;
2828
+ },
2829
+ decreaseHue: function decreaseHue() {
2830
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
2831
+ this.hue = (360 + this.hue - value) % 360;
2832
+ },
2833
+ increaseSaturation: function increaseSaturation() {
2834
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
2835
+ this.saturation = Math.min(1, Math.max(0, this.saturation + value));
2836
+ this.lightness = Math.min(0.5 + (1 - this.saturation) * 0.5, Math.max(0.5 - (1 - this.saturation) * 0.5, this.lightness));
2837
+ },
2838
+ decreaseSaturation: function decreaseSaturation() {
2839
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
2840
+ this.saturation = Math.min(1, Math.max(0, this.saturation - value));
2841
+ this.lightness = Math.min(0.5 + (1 - this.saturation) * 0.5, Math.max(0.5 - (1 - this.saturation) * 0.5, this.lightness));
2842
+ },
2843
+ increaseLightness: function increaseLightness() {
2844
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
2845
+ this.lightness = Math.min(0.5 + (1 - this.saturation) * 0.5, Math.max(0.5 - (1 - this.saturation) * 0.5, this.lightness + value));
2846
+ },
2847
+ decreaseLightness: function decreaseLightness() {
2848
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
2849
+ this.lightness = Math.min(0.5 + (1 - this.saturation) * 0.5, Math.max(0.5 - (1 - this.saturation) * 0.5, this.lightness - value));
2850
+ },
2851
+ hueKeyPress: function hueKeyPress(event) {
2852
+ var handled = false;
2853
+ switch (event.key) {
2854
+ case 'ArrowRight':
2855
+ case 'ArrowUp':
2856
+ this.increaseHue();
2857
+ handled = true;
2858
+ break;
2859
+ case 'ArrowLeft':
2860
+ case 'ArrowDown':
2861
+ this.decreaseHue();
2862
+ handled = true;
2863
+ break;
2864
+ case 'Home':
2865
+ this.increaseHue(360 - this.hue);
2866
+ handled = true;
2867
+ break;
2868
+ case 'End':
2869
+ this.decreaseHue(this.hue);
2870
+ handled = true;
2871
+ break;
2872
+ case 'PageUp':
2873
+ this.increaseHue(60 - this.hue % 60);
2874
+ handled = true;
2875
+ break;
2876
+ case 'PageDown':
2877
+ this.decreaseHue(60 + this.hue % 60);
2878
+ handled = true;
2879
+ break;
2880
+ }
2881
+ if (handled) {
2882
+ event.preventDefault();
2883
+ event.stopPropagation();
2884
+ this.emitColor();
2885
+ }
2886
+ },
2887
+ slKeyPress: function slKeyPress(event) {
2888
+ var handled = false;
2889
+ switch (event.key) {
2890
+ case 'ArrowRight':
2891
+ this.decreaseLightness();
2892
+ handled = true;
2893
+ break;
2894
+ case 'ArrowUp':
2895
+ this.increaseSaturation();
2896
+ handled = true;
2897
+ break;
2898
+ case 'ArrowLeft':
2899
+ this.increaseLightness();
2900
+ handled = true;
2901
+ break;
2902
+ case 'ArrowDown':
2903
+ this.decreaseSaturation();
2904
+ handled = true;
2905
+ break;
2906
+ case 'Home':
2907
+ this.increaseLightness(1 - this.lightness);
2908
+ handled = true;
2909
+ break;
2910
+ case 'End':
2911
+ this.decreaseLightness(this.lightness);
2912
+ handled = true;
2913
+ break;
2914
+ case 'PageUp':
2915
+ this.increaseSaturation(1 - this.saturation);
2916
+ handled = true;
2917
+ break;
2918
+ case 'PageDown':
2919
+ this.decreaseSaturation(this.saturation);
2920
+ handled = true;
2921
+ break;
2922
+ }
2923
+ if (handled) {
2924
+ event.preventDefault();
2925
+ event.stopPropagation();
2926
+ this.emitColor();
2927
+ }
2928
+ },
2929
+ clickHue: function clickHue(event) {
2930
+ this.startMouseCapture(event);
2931
+ this.trackMouse(event);
2932
+ this.stopMouseCapture(event);
2933
+ this.$refs.hueCursor.focus();
2934
+ },
2935
+ clickSL: function clickSL(event) {
2936
+ this.startMouseCapture(event);
2937
+ this.trackMouse(event);
2938
+ this.stopMouseCapture(event);
2939
+ this.$refs.slCursor.focus();
2940
+ },
2941
+ trackMouse: function trackMouse(event) {
2942
+ if (this.captureMouse === false) {
2943
+ return;
2944
+ }
2945
+ event.preventDefault();
2946
+ event.stopPropagation();
2947
+ var mouseX = 0,
2948
+ mouseY = 0;
2949
+ if (typeof event.touches !== 'undefined' && event.touches.length) {
2950
+ var _ref = [event.touches[0].clientX, event.touches[0].clientY];
2951
+ mouseX = _ref[0];
2952
+ mouseY = _ref[1];
2953
+ } else {
2954
+ var _ref2 = [event.clientX, event.clientY];
2955
+ mouseX = _ref2[0];
2956
+ mouseY = _ref2[1];
2957
+ }
2958
+ var angle = Math.atan2(mouseY - this.clientOffset.cy, mouseX - this.clientOffset.cx);
2959
+ if (this.captureType === 'sl') {
2960
+ var d = Math.sqrt(Math.pow(mouseX - this.clientOffset.cx, 2) + Math.pow(mouseY - this.clientOffset.cy, 2));
2961
+ var ratio = this.size / this.clientOffset.width;
2962
+ var dx = d * Math.cos(angle - this.hue / 180 * Math.PI) * ratio;
2963
+ var dy = d * Math.sin(angle - this.hue / 180 * Math.PI) * ratio;
2964
+ var radius = this.internalRadius;
2965
+ var saturation = 1 - (Math.min(radius * sin30, Math.max(-radius, dy)) + radius) / (radius + radius * sin30);
2966
+ var lightness = (Math.min(radius * cos30 * (1 - saturation), Math.max(-radius * cos30 * (1 - saturation), dx)) + radius * cos30) / (radius * 2 * cos30);
2967
+ this.saturation = Math.round(saturation * 1000) / 1000;
2968
+ this.lightness = 1 - Math.round(lightness * 1000) / 1000;
2969
+ } else {
2970
+ this.hue = Math.round(angle / Math.PI * 180 + 90) % 360;
2971
+ }
2972
+ this.emitColor();
2973
+ },
2974
+ startMouseCapture: function startMouseCapture(event) {
2975
+ event.stopPropagation();
2976
+ this.captureMouse = true;
2977
+ if (event.target.closest('.colorpicker-triangle-slider-sl') !== null) {
2978
+ this.captureType = 'sl';
2979
+ } else {
2980
+ this.captureType = 'hue';
2981
+ }
2982
+ },
2983
+ stopMouseCapture: function stopMouseCapture(event) {
2984
+ if (this.captureMouse !== false) {
2985
+ event.preventDefault();
2986
+ event.stopPropagation();
2987
+ this.$refs[this.captureType === 'sl' ? 'slCursor' : 'hueCursor'].focus();
2988
+ }
2989
+ this.captureMouse = false;
2990
+ },
2991
+ emitColor: function emitColor() {
2992
+ var hue = this.hue,
2993
+ saturation = this.saturation,
2994
+ lightness = this.lightness;
2995
+ this.$emit('input', Color$1.fromHSL(hue, saturation, lightness));
2996
+ window.clearTimeout(this.debounce);
2997
+ }
2998
+ },
2999
+ mounted: function mounted() {
3000
+ window.addEventListener('mousemove', this.trackMouse);
3001
+ window.addEventListener('touchmove', this.trackMouse, {
3002
+ passive: false
3003
+ });
3004
+ window.addEventListener('mouseup', this.stopMouseCapture);
3005
+ window.addEventListener('touchend', this.stopMouseCapture);
3006
+ },
3007
+ beforeDestroy: function beforeDestroy() {
3008
+ window.removeEventListener('mousemove', this.trackMouse);
3009
+ window.removeEventListener('touchmove', this.trackMouse);
3010
+ window.removeEventListener('mouseup', this.stopMouseCapture);
3011
+ window.removeEventListener('touchend', this.stopMouseCapture);
3012
+ clearTimeout(this.debounce);
3013
+ }
3014
+ };
3015
+
3016
+ /* script */
3017
+ const __vue_script__$4 = script$4;
3018
+
3019
+ /* template */
3020
+ var __vue_render__$4 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('svg',{staticClass:"b-colorpicker-triangle",attrs:{"viewBox":_vm.viewBox}},[_c('defs',[_c('linearGradient',{attrs:{"id":("cp-triangle-gradient-ligthness-" + _vm.id),"x1":"0","y1":"0","x2":"1","y2":"0"}},[_c('stop',{attrs:{"offset":"0%","stop-color":"#fff"}}),_c('stop',{attrs:{"offset":"100%","stop-color":"#000"}})],1),_c('linearGradient',{attrs:{"id":("cp-triangle-gradient-saturation-" + _vm.id),"x1":"0","y1":"0","x2":"0","y2":"1"}},[_c('stop',{attrs:{"offset":"0%","stop-color":("hsl(" + _vm.hue + "deg, 100%, 50%)"),"stop-opacity":"1"}}),_c('stop',{attrs:{"offset":"100%","stop-color":("hsl(" + _vm.hue + "deg, 100%, 50%)"),"stop-opacity":"0"}})],1),_c('clipPath',{attrs:{"id":("cp-triangle-clip-" + _vm.id)}},[_c('path',{attrs:{"d":_vm.haloPath}})])],1),_c('g',{staticClass:"colorpicker-triangle-slider-hue"},[_c('foreignObject',{attrs:{"x":0,"y":0,"width":_vm.size,"height":_vm.size,"clip-path":("url(#cp-triangle-clip-" + _vm.id + ")")}},[_c('div',{staticClass:"colorpicker-triangle-hue",on:{"click":_vm.clickHue,"mousedown":function($event){$event.preventDefault();return _vm.startMouseCapture($event)},"touchstart":function($event){$event.preventDefault();return _vm.startMouseCapture($event)}}})]),_c('g',{style:(("transform: rotate(" + _vm.hue + "deg)"))},[_c('foreignObject',{attrs:{"x":_vm.size / 2 - 4,"y":0,"width":"8","height":_vm.thickness + 4}},[_c('div',{ref:"hueCursor",staticClass:"hue-range-thumb",style:(("background-color: hsl(" + _vm.hue + "deg, 100%, 50%)")),attrs:{"role":"slider","tabindex":"0","aria-label":"Hue","aria-valuemin":"0","aria-valuenow":_vm.hue,"aria-valuemax":"360"},on:{"click":_vm.clickHue,"keydown":_vm.hueKeyPress,"mousedown":function($event){$event.preventDefault();return _vm.startMouseCapture($event)},"touchstart":function($event){$event.preventDefault();return _vm.startMouseCapture($event)}}})])],1)],1),_c('g',{staticClass:"colorpicker-triangle-slider-sl",style:(("transform: rotate(" + _vm.hue + "deg) translate(50%, 50%)")),attrs:{"role":"graphics-datagroup","aria-datascales":"lightness, saturation"}},[_c('path',{attrs:{"d":_vm.trianglePath,"fill":("url(#cp-triangle-gradient-ligthness-" + _vm.id + ")")}}),_c('path',{staticStyle:{"mix-blend-mode":"overlay"},attrs:{"d":_vm.trianglePath,"fill":("url(#cp-triangle-gradient-saturation-" + _vm.id + ")")},on:{"click":_vm.clickSL,"mousedown":function($event){$event.preventDefault();return _vm.startMouseCapture($event)},"touchstart":function($event){$event.preventDefault();return _vm.startMouseCapture($event)}}}),_c('foreignObject',{attrs:{"x":((_vm.internalRadius - 3) * _vm.cos30) * (-_vm.lightness + 0.5) * 2 - 6,"y":-_vm.internalRadius + (1 - _vm.saturation) * (_vm.internalRadius - 3) * 1.5 - 3,"width":"12","height":"12"}},[_c('div',{ref:"slCursor",staticClass:"sl-range-thumb",style:({
3021
+ backgroundColor: ("hsl(" + _vm.hue + "deg, " + (_vm.saturation * 100) + "%, " + (_vm.lightness * 100) + "%)")
3022
+ }),attrs:{"tabindex":"0","aria-datavalues":((_vm.saturation * 100) + "%, " + (_vm.lightness * 100) + "%")},on:{"click":_vm.clickSL,"keydown":_vm.slKeyPress,"mousedown":function($event){$event.preventDefault();return _vm.startMouseCapture($event)},"touchstart":function($event){$event.preventDefault();return _vm.startMouseCapture($event)}}})])],1)])};
3023
+ var __vue_staticRenderFns__$4 = [];
3024
+
3025
+ /* style */
3026
+ const __vue_inject_styles__$4 = undefined;
3027
+ /* scoped */
3028
+ const __vue_scope_id__$4 = undefined;
3029
+ /* module identifier */
3030
+ const __vue_module_identifier__$4 = undefined;
3031
+ /* functional template */
3032
+ const __vue_is_functional_template__$4 = false;
3033
+ /* style inject */
3034
+
3035
+ /* style inject SSR */
3036
+
3037
+ /* style inject shadow dom */
3038
+
3039
+
3040
+
3041
+ const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
3042
+ { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
3043
+ __vue_inject_styles__$4,
3044
+ __vue_script__$4,
3045
+ __vue_scope_id__$4,
3046
+ __vue_is_functional_template__$4,
3047
+ __vue_module_identifier__$4,
3048
+ false,
3049
+ undefined,
3050
+ undefined,
3051
+ undefined
3052
+ );
3053
+
3054
+ var ColorpickerHSLRepresentationTriangle = __vue_component__$4;
3055
+
3056
+ var _templateObject, _templateObject2, _templateObject3;
3057
+ var precision = function precision(strs) {
3058
+ for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
3059
+ values[_key - 1] = arguments[_key];
3060
+ }
3061
+ var tmp = [];
3062
+ strs.forEach(function (str, i) {
3063
+ tmp.push(str);
3064
+ if (values[i]) {
3065
+ tmp.push(Number.isNaN(values[i] / 1) ? values[i] : Math.round(values * 10) / 10);
3066
+ }
3067
+ });
3068
+ return tmp.join('');
3069
+ };
3070
+ var script$3 = {
3071
+ name: 'BColorpickerHSLRepresentationSquare',
3072
+ props: {
3073
+ value: {
3074
+ type: Object,
3075
+ required: true,
3076
+ validator: function validator(value) {
3077
+ return typeof value.hue === 'number' && typeof value.saturation === 'number' && typeof value.lightness === 'number';
3078
+ }
3079
+ },
3080
+ size: {
3081
+ type: Number,
3082
+ default: 200
3083
+ },
3084
+ thickness: {
3085
+ type: Number,
3086
+ default: 20
3087
+ }
3088
+ },
3089
+ data: function data() {
3090
+ return {
3091
+ hue: this.value.hue,
3092
+ saturation: this.value.saturation,
3093
+ lightness: this.value.lightness,
3094
+ captureMouse: false,
3095
+ captureType: 'hue',
3096
+ clientOffset: {
3097
+ cx: -1,
3098
+ cy: -1,
3099
+ width: 0,
3100
+ height: 0
3101
+ },
3102
+ debounce: 0
3103
+ };
3104
+ },
3105
+ computed: {
3106
+ hueThumbStyle: function hueThumbStyle() {
3107
+ var hue = this.hue,
3108
+ size = this.size,
3109
+ thickness = this.thickness;
3110
+ var side = size - thickness;
3111
+ var offset = size / 2;
3112
+ var angle = (hue + 720 + 90) % 360 / 180 * Math.PI;
3113
+ var ciq = 1 / Math.cos(Math.PI / 4);
3114
+ var _x$y = {
3115
+ x: -Math.min(1, Math.max(-1, ciq * Math.cos(angle))) / 2 * side + offset,
3116
+ y: -Math.min(1, Math.max(-1, ciq * Math.sin(angle))) / 2 * side + offset
3117
+ },
3118
+ x = _x$y.x,
3119
+ y = _x$y.y;
3120
+ return {
3121
+ background: "hsl(".concat(hue, "deg, 100%, 50%)"),
3122
+ left: precision(_templateObject || (_templateObject = _taggedTemplateLiteral(["", "px"])), x),
3123
+ top: precision(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["", "px"])), y),
3124
+ width: precision(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["", "px"])), thickness - 2)
3125
+ };
3126
+ },
3127
+ slThumbStyle: function slThumbStyle() {
3128
+ var hue = this.hue,
3129
+ saturation = this.saturation,
3130
+ lightness = this.lightness;
3131
+ saturation = Math.max(0, Math.min(1, saturation));
3132
+ lightness = Math.max(0, Math.min(1, lightness));
3133
+ return {
3134
+ background: "hsl(".concat(hue, "deg, ").concat(saturation * 100, "%, ").concat(lightness * 100, "%)"),
3135
+ left: "".concat(saturation * 100, "%"),
3136
+ top: "".concat((1 - lightness) * 100, "%")
3137
+ };
3138
+ },
3139
+ SLBackground: function SLBackground() {
3140
+ var hue = this.hue;
3141
+ return "linear-gradient(90deg, hsl(".concat(hue, "deg, 0%, 50%), hsl(").concat(hue, "deg, 100%, 50%))");
3142
+ }
3143
+ },
3144
+ watch: {
3145
+ captureMouse: function captureMouse(newValue, oldValue) {
3146
+ if (oldValue === false && newValue !== false) {
3147
+ var rect = this.$el.getBoundingClientRect();
3148
+ // Caching offset
3149
+ this.clientOffset.cx = rect.x + rect.width / 2;
3150
+ this.clientOffset.cy = rect.y + rect.height / 2;
3151
+ this.clientOffset.width = rect.width;
3152
+ this.clientOffset.height = rect.height;
3153
+ }
3154
+ },
3155
+ value: {
3156
+ deep: true,
3157
+ handler: function handler(newColor) {
3158
+ var _this = this;
3159
+ var hue = newColor.hue,
3160
+ saturation = newColor.saturation,
3161
+ lightness = newColor.lightness;
3162
+ window.clearTimeout(this.debounce);
3163
+ this.debounce = window.setTimeout(function () {
3164
+ _this.hue = hue;
3165
+ _this.saturation = saturation;
3166
+ _this.lightness = lightness;
3167
+ }, 200);
3168
+ }
3169
+ }
3170
+ },
3171
+ methods: {
3172
+ increaseHue: function increaseHue() {
3173
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
3174
+ this.hue = (this.hue + value) % 360;
3175
+ },
3176
+ decreaseHue: function decreaseHue() {
3177
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
3178
+ this.hue = (360 + this.hue - value) % 360;
3179
+ },
3180
+ increaseSaturation: function increaseSaturation() {
3181
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
3182
+ this.saturation = Math.min(1, Math.max(0, this.saturation + value));
3183
+ this.lightness = Math.min(0.5 + (1 - this.saturation) * 0.5, Math.max(0.5 - (1 - this.saturation) * 0.5, this.lightness));
3184
+ },
3185
+ decreaseSaturation: function decreaseSaturation() {
3186
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
3187
+ this.saturation = Math.min(1, Math.max(0, this.saturation - value));
3188
+ this.lightness = Math.min(0.5 + (1 - this.saturation) * 0.5, Math.max(0.5 - (1 - this.saturation) * 0.5, this.lightness));
3189
+ },
3190
+ increaseLightness: function increaseLightness() {
3191
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
3192
+ this.lightness = Math.min(0.5 + (1 - this.saturation) * 0.5, Math.max(0.5 - (1 - this.saturation) * 0.5, this.lightness + value));
3193
+ },
3194
+ decreaseLightness: function decreaseLightness() {
3195
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
3196
+ this.lightness = Math.min(0.5 + (1 - this.saturation) * 0.5, Math.max(0.5 - (1 - this.saturation) * 0.5, this.lightness - value));
3197
+ },
3198
+ hueKeyPress: function hueKeyPress(event) {
3199
+ var handled = false;
3200
+ switch (event.key) {
3201
+ case 'ArrowRight':
3202
+ case 'ArrowUp':
3203
+ this.increaseHue();
3204
+ handled = true;
3205
+ break;
3206
+ case 'ArrowLeft':
3207
+ case 'ArrowDown':
3208
+ this.decreaseHue();
3209
+ handled = true;
3210
+ break;
3211
+ case 'Home':
3212
+ this.increaseHue(360 - this.hue);
3213
+ handled = true;
3214
+ break;
3215
+ case 'End':
3216
+ this.decreaseHue(this.hue);
3217
+ handled = true;
3218
+ break;
3219
+ case 'PageUp':
3220
+ this.increaseHue(60 - this.hue % 60);
3221
+ handled = true;
3222
+ break;
3223
+ case 'PageDown':
3224
+ this.decreaseHue(60 + this.hue % 60);
3225
+ handled = true;
3226
+ break;
3227
+ }
3228
+ if (handled) {
3229
+ event.preventDefault();
3230
+ event.stopPropagation();
3231
+ this.emitColor();
3232
+ }
3233
+ },
3234
+ slKeyPress: function slKeyPress(event) {
3235
+ var handled = false;
3236
+ switch (event.key) {
3237
+ case 'ArrowRight':
3238
+ this.increaseSaturation();
3239
+ handled = true;
3240
+ break;
3241
+ case 'ArrowUp':
3242
+ this.increaseLightness();
3243
+ handled = true;
3244
+ break;
3245
+ case 'ArrowLeft':
3246
+ this.decreaseSaturation();
3247
+ handled = true;
3248
+ break;
3249
+ case 'ArrowDown':
3250
+ this.decreaseLightness();
3251
+ handled = true;
3252
+ break;
3253
+ case 'Home':
3254
+ this.increaseLightness(1 - this.lightness);
3255
+ handled = true;
3256
+ break;
3257
+ case 'End':
3258
+ this.decreaseLightness(this.lightness);
3259
+ handled = true;
3260
+ break;
3261
+ case 'PageUp':
3262
+ this.increaseSaturation(1 - this.saturation);
3263
+ handled = true;
3264
+ break;
3265
+ case 'PageDown':
3266
+ this.decreaseSaturation(this.saturation);
3267
+ handled = true;
3268
+ break;
3269
+ }
3270
+ if (handled) {
3271
+ event.preventDefault();
3272
+ event.stopPropagation();
3273
+ this.emitColor();
3274
+ }
3275
+ },
3276
+ startMouseCapture: function startMouseCapture(event) {
3277
+ event.stopPropagation();
3278
+ this.captureMouse = true;
3279
+ if (event.target.closest('.colorpicker-square-slider-sl') !== null) {
3280
+ this.captureType = 'sl';
3281
+ } else {
3282
+ this.captureType = 'hue';
3283
+ }
3284
+ },
3285
+ stopMouseCapture: function stopMouseCapture(event) {
3286
+ if (this.captureMouse !== false) {
3287
+ event.preventDefault();
3288
+ event.stopPropagation();
3289
+ this.$refs[this.captureType === 'sl' ? 'slCursor' : 'hueCursor'].focus();
3290
+ }
3291
+ this.captureMouse = false;
3292
+ },
3293
+ clickHue: function clickHue(event) {
3294
+ this.startMouseCapture(event);
3295
+ this.trackMouse(event);
3296
+ this.stopMouseCapture(event);
3297
+ this.$refs.hueCursor.focus();
3298
+ },
3299
+ clickSL: function clickSL(event) {
3300
+ this.startMouseCapture(event);
3301
+ this.trackMouse(event);
3302
+ this.stopMouseCapture(event);
3303
+ this.$refs.slCursor.focus();
3304
+ },
3305
+ trackMouse: function trackMouse(event) {
3306
+ if (this.captureMouse === false) {
3307
+ return;
3308
+ }
3309
+ event.preventDefault();
3310
+ event.stopPropagation();
3311
+ var mouseX = 0,
3312
+ mouseY = 0;
3313
+ if (typeof event.touches !== 'undefined' && event.touches.length) {
3314
+ var _ref = [event.touches[0].clientX, event.touches[0].clientY];
3315
+ mouseX = _ref[0];
3316
+ mouseY = _ref[1];
3317
+ } else {
3318
+ var _ref2 = [event.clientX, event.clientY];
3319
+ mouseX = _ref2[0];
3320
+ mouseY = _ref2[1];
3321
+ }
3322
+ var angle = Math.atan2(mouseY - this.clientOffset.cy, mouseX - this.clientOffset.cx);
3323
+ if (this.captureType === 'sl') {
3324
+ var saturation = (mouseX - this.clientOffset.cx) / (this.clientOffset.width - this.thickness * 2) + 0.5;
3325
+ var lightness = (mouseY - this.clientOffset.cy) / (this.clientOffset.height - this.thickness * 2) + 0.5;
3326
+ this.saturation = Math.round(Math.min(1, Math.max(0, saturation)) * 1000) / 1000;
3327
+ this.lightness = 1 - Math.round(Math.min(1, Math.max(0, lightness)) * 1000) / 1000;
3328
+ } else {
3329
+ this.hue = Math.round(angle / Math.PI * 180 + 90) % 360;
3330
+ }
3331
+ this.emitColor();
3332
+ },
3333
+ emitColor: function emitColor() {
3334
+ var hue = this.hue,
3335
+ saturation = this.saturation,
3336
+ lightness = this.lightness;
3337
+ this.$emit('input', Color$1.fromHSL(hue, saturation, lightness));
3338
+ window.clearTimeout(this.debounce);
3339
+ }
3340
+ },
3341
+ mounted: function mounted() {
3342
+ window.addEventListener('mousemove', this.trackMouse);
3343
+ window.addEventListener('touchmove', this.trackMouse, {
3344
+ passive: false
3345
+ });
3346
+ window.addEventListener('mouseup', this.stopMouseCapture);
3347
+ window.addEventListener('touchend', this.stopMouseCapture);
3348
+ },
3349
+ beforeDestroy: function beforeDestroy() {
3350
+ window.removeEventListener('mousemove', this.trackMouse);
3351
+ window.removeEventListener('touchmove', this.trackMouse);
3352
+ window.removeEventListener('mouseup', this.stopMouseCapture);
3353
+ window.removeEventListener('touchend', this.stopMouseCapture);
3354
+ clearTimeout(this.debounce);
3355
+ }
3356
+ };
3357
+
3358
+ /* script */
3359
+ const __vue_script__$3 = script$3;
3360
+
3361
+ /* template */
3362
+ var __vue_render__$3 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-colorpicker-square",style:({ width: (_vm.size + "px") })},[_c('div',{staticClass:"colorpicker-square-slider-hue",on:{"click":_vm.clickHue,"mousedown":function($event){$event.preventDefault();return _vm.startMouseCapture($event)},"touchstart":function($event){$event.preventDefault();return _vm.startMouseCapture($event)}}},[_c('div',{ref:"hueCursor",staticClass:"hue-range-thumb",style:(_vm.hueThumbStyle),attrs:{"role":"slider","tabindex":"0","aria-label":"Hue","aria-valuemin":"0","aria-valuemax":"359"}})]),_c('div',{staticClass:"colorpicker-square-slider-sl",style:({
3363
+ background: _vm.SLBackground,
3364
+ margin: (_vm.thickness + "px")
3365
+ }),attrs:{"aria-datascales":"lightness, saturation"},on:{"click":_vm.clickSL,"mousedown":function($event){$event.preventDefault();return _vm.startMouseCapture($event)},"touchstart":function($event){$event.preventDefault();return _vm.startMouseCapture($event)}}},[_c('div',{ref:"slCursor",staticClass:"sl-range-thumb",style:(_vm.slThumbStyle),attrs:{"role":"slider","tabindex":"0","aria-datavalues":((_vm.saturation * 100) + "%, " + (_vm.lightness * 100) + "%")},on:{"click":_vm.clickSL,"keydown":_vm.slKeyPress,"mousedown":function($event){$event.preventDefault();return _vm.startMouseCapture($event)},"touchstart":function($event){$event.preventDefault();return _vm.startMouseCapture($event)}}})])])};
3366
+ var __vue_staticRenderFns__$3 = [];
3367
+
3368
+ /* style */
3369
+ const __vue_inject_styles__$3 = undefined;
3370
+ /* scoped */
3371
+ const __vue_scope_id__$3 = undefined;
3372
+ /* module identifier */
3373
+ const __vue_module_identifier__$3 = undefined;
3374
+ /* functional template */
3375
+ const __vue_is_functional_template__$3 = false;
3376
+ /* style inject */
3377
+
3378
+ /* style inject SSR */
3379
+
3380
+ /* style inject shadow dom */
3381
+
3382
+
3383
+
3384
+ const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
3385
+ { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
3386
+ __vue_inject_styles__$3,
3387
+ __vue_script__$3,
3388
+ __vue_scope_id__$3,
3389
+ __vue_is_functional_template__$3,
3390
+ __vue_module_identifier__$3,
3391
+ false,
3392
+ undefined,
3393
+ undefined,
3394
+ undefined
3395
+ );
3396
+
3397
+ var ColorpickerHSLRepresentationSquare = __vue_component__$3;
3398
+
3399
+ var script$2 = {
3400
+ name: 'BTooltip',
3401
+ props: {
3402
+ active: {
3403
+ type: Boolean,
3404
+ default: true
3405
+ },
3406
+ type: {
3407
+ type: String,
3408
+ default: function _default() {
3409
+ return config.defaultTooltipType;
3410
+ }
3411
+ },
3412
+ label: String,
3413
+ delay: {
3414
+ type: Number,
3415
+ default: function _default() {
3416
+ return config.defaultTooltipDelay;
3417
+ }
3418
+ },
3419
+ closeDelay: {
3420
+ type: Number,
3421
+ default: function _default() {
3422
+ return config.defaultTooltipCloseDelay;
3423
+ }
3424
+ },
3425
+ position: {
3426
+ type: String,
3427
+ default: 'is-top',
3428
+ validator: function validator(value) {
3429
+ return ['is-top', 'is-bottom', 'is-left', 'is-right'].indexOf(value) > -1;
3430
+ }
3431
+ },
3432
+ triggers: {
3433
+ type: Array,
3434
+ default: function _default() {
3435
+ return ['hover'];
3436
+ }
3437
+ },
3438
+ always: Boolean,
3439
+ square: Boolean,
3440
+ dashed: Boolean,
3441
+ multilined: Boolean,
3442
+ size: {
3443
+ type: String,
3444
+ default: 'is-medium'
3445
+ },
3446
+ appendToBody: Boolean,
3447
+ animated: {
3448
+ type: Boolean,
3449
+ default: true
3450
+ },
3451
+ animation: {
3452
+ type: String,
3453
+ default: 'fade'
3454
+ },
3455
+ contentClass: String,
3456
+ autoClose: {
3457
+ type: [Array, Boolean],
3458
+ default: true
3459
+ }
3460
+ },
3461
+ data: function data() {
3462
+ return {
3463
+ isActive: false,
3464
+ triggerStyle: {},
3465
+ timer: null,
3466
+ _bodyEl: undefined,
3467
+ // Used to append to body
3468
+ resizeObserver: undefined,
3469
+ resizeListener: undefined,
3470
+ timeOutID: null
3471
+ };
3472
+ },
3473
+ computed: {
3474
+ rootClasses: function rootClasses() {
3475
+ return ['b-tooltip', this.type, this.position, this.size, {
3476
+ 'is-square': this.square,
3477
+ 'is-always': this.always,
3478
+ 'is-multiline': this.multilined,
3479
+ 'is-dashed': this.dashed
3480
+ }];
3481
+ },
3482
+ newAnimation: function newAnimation() {
3483
+ return this.animated ? this.animation : undefined;
3484
+ }
3485
+ },
3486
+ watch: {
3487
+ isActive: function isActive() {
3488
+ this.$emit(this.isActive ? 'open' : 'close');
3489
+ if (this.appendToBody) {
3490
+ this.updateAppendToBody();
3491
+ }
3492
+ }
3493
+ },
3494
+ methods: {
3495
+ updateAppendToBody: function updateAppendToBody() {
3496
+ var tooltip = this.$refs.tooltip;
3497
+ var trigger = this.$refs.trigger;
3498
+ if (tooltip && trigger) {
3499
+ // update wrapper tooltip
3500
+ var tooltipEl = this.$data._bodyEl.children[0];
3501
+ tooltipEl.classList.forEach(function (item) {
3502
+ return tooltipEl.classList.remove(item);
3503
+ });
3504
+ if (this.$vnode && this.$vnode.data && this.$vnode.data.staticClass) {
3505
+ tooltipEl.classList.add(this.$vnode.data.staticClass);
3506
+ }
3507
+ this.rootClasses.forEach(function (item) {
3508
+ if (_typeof(item) === 'object') {
3509
+ for (var key in item) {
3510
+ if (item[key]) {
3511
+ tooltipEl.classList.add(key);
3512
+ }
3513
+ }
3514
+ } else {
3515
+ tooltipEl.classList.add(item);
3516
+ }
3517
+ });
3518
+ var rect = trigger.getBoundingClientRect();
3519
+ var top = rect.top + window.scrollY;
3520
+ var left = rect.left + window.scrollX;
3521
+
3522
+ // `tooltipEl` will be placed relative to `wrapper`
3523
+ // because `wrapper` should create a stacking context
3524
+ // as its z-index is non-auto
3525
+ tooltipEl.style.position = 'absolute';
3526
+ switch (this.position) {
3527
+ case 'is-top':
3528
+ tooltipEl.style.width = "".concat(trigger.clientWidth, "px");
3529
+ tooltipEl.style.height = '0px';
3530
+ tooltipEl.style.top = '0px';
3531
+ tooltipEl.style.left = '0px';
3532
+ break;
3533
+ case 'is-bottom':
3534
+ tooltipEl.style.width = "".concat(trigger.clientWidth, "px");
3535
+ tooltipEl.style.height = '0px';
3536
+ tooltipEl.style.top = "".concat(trigger.clientHeight, "px");
3537
+ tooltipEl.style.left = '0px';
3538
+ break;
3539
+ case 'is-left':
3540
+ tooltipEl.style.width = '0px';
3541
+ tooltipEl.style.height = "".concat(trigger.clientHeight, "px");
3542
+ tooltipEl.style.top = '0px';
3543
+ tooltipEl.style.left = '0px';
3544
+ break;
3545
+ case 'is-right':
3546
+ tooltipEl.style.width = '0px';
3547
+ tooltipEl.style.height = "".concat(trigger.clientHeight, "px");
3548
+ tooltipEl.style.top = '0px';
3549
+ tooltipEl.style.left = "".concat(trigger.clientWidth, "px");
3550
+ break;
3551
+ }
3552
+ var wrapper = this.$data._bodyEl;
3553
+ wrapper.style.position = 'absolute';
3554
+ wrapper.style.top = "".concat(top, "px");
3555
+ wrapper.style.left = "".concat(left, "px");
3556
+ wrapper.style.width = '0px';
3557
+ wrapper.style.zIndex = this.isActive || this.always ? '99' : '-1';
3558
+ this.triggerStyle = {
3559
+ zIndex: this.isActive || this.always ? '100' : undefined
3560
+ };
3561
+ }
3562
+ },
3563
+ onClick: function onClick() {
3564
+ var _this = this;
3565
+ if (this.triggers.indexOf('click') < 0) return;
3566
+ // if not active, toggle after clickOutside event
3567
+ // this fixes toggling programmatic
3568
+ this.$nextTick(function () {
3569
+ _this.timeOutID = setTimeout(function () {
3570
+ return _this.open();
3571
+ });
3572
+ });
3573
+ },
3574
+ onHover: function onHover() {
3575
+ if (this.triggers.indexOf('hover') < 0) return;
3576
+ this.open();
3577
+ },
3578
+ onContextMenu: function onContextMenu(e) {
3579
+ if (this.triggers.indexOf('contextmenu') < 0) return;
3580
+ e.preventDefault();
3581
+ this.open();
3582
+ },
3583
+ onFocus: function onFocus() {
3584
+ if (this.triggers.indexOf('focus') < 0) return;
3585
+ this.open();
3586
+ },
3587
+ open: function open() {
3588
+ var _this2 = this;
3589
+ if (this.delay) {
3590
+ this.timer = setTimeout(function () {
3591
+ _this2.isActive = true;
3592
+ _this2.timer = null;
3593
+ }, this.delay);
3594
+ } else {
3595
+ this.isActive = true;
3596
+ }
3597
+ },
3598
+ close: function close() {
3599
+ var _this3 = this;
3600
+ if (typeof this.autoClose === 'boolean') {
3601
+ if (this.autoClose && this.timer) clearTimeout(this.timer);
3602
+ if (this.closeDelay) {
3603
+ this.timer = setTimeout(function () {
3604
+ _this3.isActive = !_this3.autoClose;
3605
+ _this3.timer = null;
3606
+ }, this.closeDelay);
3607
+ } else {
3608
+ this.isActive = !this.autoClose;
3609
+ }
3610
+ }
3611
+ },
3612
+ /**
3613
+ * Close tooltip if clicked outside.
3614
+ */
3615
+ clickedOutside: function clickedOutside(event) {
3616
+ if (this.isActive) {
3617
+ if (Array.isArray(this.autoClose)) {
3618
+ if (this.autoClose.includes('outside')) {
3619
+ if (!this.isInWhiteList(event.target)) {
3620
+ this.isActive = false;
3621
+ return;
3622
+ }
3623
+ }
3624
+ if (this.autoClose.includes('inside')) {
3625
+ if (this.isInWhiteList(event.target)) this.isActive = false;
3626
+ }
3627
+ }
3628
+ }
3629
+ },
3630
+ /**
3631
+ * Keypress event that is bound to the document
3632
+ */
3633
+ keyPress: function keyPress(_ref) {
3634
+ var key = _ref.key;
3635
+ if (this.isActive && (key === 'Escape' || key === 'Esc')) {
3636
+ if (Array.isArray(this.autoClose)) {
3637
+ if (this.autoClose.indexOf('escape') >= 0) this.isActive = false;
3638
+ }
3639
+ }
3640
+ },
3641
+ /**
3642
+ * White-listed items to not close when clicked.
3643
+ */
3644
+ isInWhiteList: function isInWhiteList(el) {
3645
+ if (el === this.$refs.content) return true;
3646
+ // All chidren from content
3647
+ if (this.$refs.content !== undefined) {
3648
+ var children = this.$refs.content.querySelectorAll('*');
3649
+ var _iterator = _createForOfIteratorHelper(children),
3650
+ _step;
3651
+ try {
3652
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
3653
+ var child = _step.value;
3654
+ if (el === child) {
3655
+ return true;
3656
+ }
3657
+ }
3658
+ } catch (err) {
3659
+ _iterator.e(err);
3660
+ } finally {
3661
+ _iterator.f();
3662
+ }
3663
+ }
3664
+ return false;
3665
+ }
3666
+ },
3667
+ mounted: function mounted() {
3668
+ var _this4 = this;
3669
+ this.controller = new window.AbortController();
3670
+ if (this.appendToBody && typeof window !== 'undefined') {
3671
+ this.$data._bodyEl = createAbsoluteElement(this.$refs.content);
3672
+ this.updateAppendToBody();
3673
+ // updates the tooltip position if the tooltip is inside
3674
+ // `.animation-content`
3675
+ var animation = this.$el.closest('.animation-content');
3676
+ if (animation != null) {
3677
+ var listener = function listener() {
3678
+ _this4.updateAppendToBody();
3679
+ animation.removeEventListener('transitionend', listener);
3680
+ };
3681
+ animation.addEventListener('transitionend', listener, {
3682
+ signal: this.controller.signal
3683
+ });
3684
+ }
3685
+ // observes changes in the window size
3686
+ this.resizeListener = function () {
3687
+ return _this4.updateAppendToBody();
3688
+ };
3689
+ window.addEventListener('resize', this.resizeListener);
3690
+ // observes changes in the size of the immediate parent
3691
+ this.resizeObserver = new ResizeObserver(this.resizeListener);
3692
+ if (this.$el.parentNode != null && this.$el.parentNode.nodeType === Node.ELEMENT_NODE) {
3693
+ this.resizeObserver.observe(this.$el.parentNode);
3694
+ }
3695
+ }
3696
+ },
3697
+ created: function created() {
3698
+ if (typeof window !== 'undefined') {
3699
+ document.addEventListener('click', this.clickedOutside);
3700
+ document.addEventListener('keyup', this.keyPress);
3701
+ }
3702
+ },
3703
+ beforeDestroy: function beforeDestroy() {
3704
+ if (typeof window !== 'undefined') {
3705
+ document.removeEventListener('click', this.clickedOutside);
3706
+ document.removeEventListener('keyup', this.keyPress);
3707
+ }
3708
+ if (this.resizeListener != null) {
3709
+ window.removeEventListener('resize', this.resizeListener);
3710
+ }
3711
+ if (this.resizeObserver != null) {
3712
+ this.resizeObserver.disconnect();
3713
+ }
3714
+ if (this.appendToBody) {
3715
+ removeElement(this.$data._bodyEl);
3716
+ }
3717
+ this.controller.abort();
3718
+ clearTimeout(this.timer);
3719
+ clearTimeout(this.timeOutID);
3720
+ }
3721
+ };
3722
+
3723
+ /* script */
3724
+ const __vue_script__$2 = script$2;
3725
+
3726
+ /* template */
3727
+ var __vue_render__$2 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"tooltip",class:_vm.rootClasses},[_c('transition',{attrs:{"name":_vm.newAnimation}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.active && (_vm.isActive || _vm.always)),expression:"active && (isActive || always)"}],ref:"content",class:['tooltip-content', _vm.contentClass]},[(_vm.label)?[_vm._v(_vm._s(_vm.label))]:(_vm.$slots.content)?[_vm._t("content")]:_vm._e()],2)]),_c('div',{ref:"trigger",staticClass:"tooltip-trigger",style:(_vm.triggerStyle),on:{"click":_vm.onClick,"contextmenu":_vm.onContextMenu,"mouseenter":_vm.onHover,"!focus":function($event){return _vm.onFocus($event)},"!blur":function($event){return _vm.close($event)},"mouseleave":_vm.close}},[_vm._t("default")],2)],1)};
3728
+ var __vue_staticRenderFns__$2 = [];
3729
+
3730
+ /* style */
3731
+ const __vue_inject_styles__$2 = undefined;
3732
+ /* scoped */
3733
+ const __vue_scope_id__$2 = undefined;
3734
+ /* module identifier */
3735
+ const __vue_module_identifier__$2 = undefined;
3736
+ /* functional template */
3737
+ const __vue_is_functional_template__$2 = false;
3738
+ /* style inject */
3739
+
3740
+ /* style inject SSR */
3741
+
3742
+ /* style inject shadow dom */
3743
+
3744
+
3745
+
3746
+ const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
3747
+ { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
3748
+ __vue_inject_styles__$2,
3749
+ __vue_script__$2,
3750
+ __vue_scope_id__$2,
3751
+ __vue_is_functional_template__$2,
3752
+ __vue_module_identifier__$2,
3753
+ false,
3754
+ undefined,
3755
+ undefined,
3756
+ undefined
3757
+ );
3758
+
3759
+ var Tooltip = __vue_component__$2;
3760
+
3761
+ var script$1 = {
3762
+ name: 'BColorpickerAlphaSlider',
3763
+ components: _defineProperty({}, Tooltip.name, Tooltip),
3764
+ props: {
3765
+ value: {
3766
+ type: Number,
3767
+ validator: function validator(value) {
3768
+ return value >= 0 && value < 256;
3769
+ }
3770
+ },
3771
+ color: [String, Object]
3772
+ },
3773
+ data: function data() {
3774
+ var color = Color$1.parse(this.color);
3775
+ color.alpha = 0;
3776
+ return {
3777
+ startColor: color.toString('hex'),
3778
+ endColor: color.toString('hexa'),
3779
+ percent: Math.round((1 - this.value / 255) * 100),
3780
+ captureMouse: false,
3781
+ clientOffset: {
3782
+ cx: -1,
3783
+ cy: -1,
3784
+ width: 0,
3785
+ height: 0
3786
+ }
3787
+ };
3788
+ },
3789
+ computed: {
3790
+ style: function style() {
3791
+ return {
3792
+ backgroundImage: "linear-gradient(90deg, ".concat(this.startColor, " 0%, ").concat(this.endColor, " 100%),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7)"),
3793
+ backgroundSize: '100% 100%, 1em 1em, 1em 1em',
3794
+ backgroundPosition: '0 0, .5em .5em, 0 0'
3795
+ };
3796
+ }
3797
+ },
3798
+ watch: {
3799
+ value: function value(newValue, oldValue) {
3800
+ if (newValue !== oldValue) {
3801
+ this.percent = Math.round((1 - newValue / 255) * 100);
3802
+ }
3803
+ },
3804
+ color: function color(newColor) {
3805
+ var color = Color$1.parse(newColor);
3806
+ color.alpha = 0;
3807
+ this.startColor = color.toString('hex');
3808
+ this.endColor = color.toString('hexa');
3809
+ },
3810
+ captureMouse: function captureMouse(newValue, oldValue) {
3811
+ if (oldValue === false && newValue !== false) {
3812
+ var rect = this.$el.getBoundingClientRect();
3813
+ // Caching offset
3814
+ this.clientOffset.cx = rect.x + rect.width / 2;
3815
+ this.clientOffset.cy = rect.y + rect.height / 2;
3816
+ this.clientOffset.width = rect.width;
3817
+ this.clientOffset.height = rect.height;
3818
+ }
3819
+ }
3820
+ },
3821
+ methods: {
3822
+ increaseAlpha: function increaseAlpha() {
3823
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
3824
+ this.percent = Math.max(0, Math.min(100, this.percent + value));
3825
+ },
3826
+ decreaseAlpha: function decreaseAlpha() {
3827
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.01;
3828
+ this.increaseAlpha(-value);
3829
+ },
3830
+ alphaKeyPress: function alphaKeyPress(event) {
3831
+ var handled = false;
3832
+ switch (event.key) {
3833
+ case 'ArrowRight':
3834
+ case 'ArrowUp':
3835
+ this.increaseAlpha();
3836
+ handled = true;
3837
+ break;
3838
+ case 'ArrowLeft':
3839
+ case 'ArrowDown':
3840
+ this.decreaseAlpha();
3841
+ handled = true;
3842
+ break;
3843
+ case 'Home':
3844
+ this.decreaseAlpha(this.percent);
3845
+ handled = true;
3846
+ break;
3847
+ case 'End':
3848
+ this.increaseAlpha(100 - this.percent);
3849
+ handled = true;
3850
+ break;
3851
+ case 'PageUp':
3852
+ this.increaseAlpha(10 - this.percent % 10);
3853
+ handled = true;
3854
+ break;
3855
+ case 'PageDown':
3856
+ this.decreaseAlpha(this.percent % 10);
3857
+ handled = true;
3858
+ break;
3859
+ }
3860
+ if (handled) {
3861
+ event.preventDefault();
3862
+ event.stopPropagation();
3863
+ this.emitAlpha();
3864
+ }
3865
+ },
3866
+ clickAlpha: function clickAlpha(event) {
3867
+ this.startMouseCapture(event);
3868
+ this.trackMouse(event);
3869
+ this.stopMouseCapture(event);
3870
+ this.$refs.alphaCursor.focus();
3871
+ },
3872
+ startMouseCapture: function startMouseCapture(event) {
3873
+ event.stopPropagation();
3874
+ this.captureMouse = true;
3875
+ },
3876
+ trackMouse: function trackMouse(event) {
3877
+ if (this.captureMouse === false) {
3878
+ return;
3879
+ }
3880
+ event.preventDefault();
3881
+ event.stopPropagation();
3882
+ var _ref = [0, 0],
3883
+ mouseX = _ref[0];
3884
+ if (typeof event.touches !== 'undefined' && event.touches.length) {
3885
+ var _ref2 = [event.touches[0].clientX];
3886
+ mouseX = _ref2[0];
3887
+ } else {
3888
+ var _ref3 = [event.clientX];
3889
+ mouseX = _ref3[0];
3890
+ }
3891
+ var ratio = 0.5 + (this.clientOffset.cx - mouseX) / this.clientOffset.width;
3892
+ this.percent = Math.round(100 - Math.max(0, Math.min(1, ratio)) * 100);
3893
+ this.emitAlpha();
3894
+ },
3895
+ stopMouseCapture: function stopMouseCapture(event) {
3896
+ if (this.captureMouse !== false) {
3897
+ event.preventDefault();
3898
+ event.stopPropagation();
3899
+ this.$refs.alphaCursor.focus();
3900
+ }
3901
+ this.captureMouse = false;
3902
+ },
3903
+ emitAlpha: function emitAlpha() {
3904
+ this.$emit('input', (1 - this.percent / 100) * 255);
3905
+ }
3906
+ },
3907
+ mounted: function mounted() {
3908
+ window.addEventListener('mousemove', this.trackMouse);
3909
+ window.addEventListener('touchmove', this.trackMouse, {
3910
+ passive: false
3911
+ });
3912
+ window.addEventListener('mouseup', this.stopMouseCapture);
3913
+ window.addEventListener('touchend', this.stopMouseCapture);
3914
+ },
3915
+ beforeDestroy: function beforeDestroy() {
3916
+ window.removeEventListener('mousemove', this.trackMouse);
3917
+ window.removeEventListener('touchmove', this.trackMouse);
3918
+ window.removeEventListener('mouseup', this.stopMouseCapture);
3919
+ window.removeEventListener('touchend', this.stopMouseCapture);
3920
+ }
3921
+ };
3922
+
3923
+ /* script */
3924
+ const __vue_script__$1 = script$1;
3925
+
3926
+ /* template */
3927
+ var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"b-colorpicker-alpha-slider",style:(_vm.style),on:{"click":_vm.clickAlpha,"keydown":_vm.alphaKeyPress,"mousedown":_vm.startMouseCapture,"touchstart":function($event){$event.preventDefault();return _vm.startMouseCapture($event)}}},[_c('div',{ref:"alphaCursor",staticClass:"alpha-range-thumb",style:({ left: (_vm.percent + "%") }),attrs:{"role":"slider","tabindex":"0","aria-label":"Tranparency","aria-valuemin":"0","aria-valuenow":_vm.percent,"aria-valuemax":"100"}},[_c('b-tooltip',{attrs:{"label":(_vm.percent + "%"),"always":_vm.captureMouse}})],1)])};
3928
+ var __vue_staticRenderFns__$1 = [];
3929
+
3930
+ /* style */
3931
+ const __vue_inject_styles__$1 = undefined;
3932
+ /* scoped */
3933
+ const __vue_scope_id__$1 = undefined;
3934
+ /* module identifier */
3935
+ const __vue_module_identifier__$1 = undefined;
3936
+ /* functional template */
3937
+ const __vue_is_functional_template__$1 = false;
3938
+ /* style inject */
3939
+
3940
+ /* style inject SSR */
3941
+
3942
+ /* style inject shadow dom */
3943
+
3944
+
3945
+
3946
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
3947
+ { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
3948
+ __vue_inject_styles__$1,
3949
+ __vue_script__$1,
3950
+ __vue_scope_id__$1,
3951
+ __vue_is_functional_template__$1,
3952
+ __vue_module_identifier__$1,
3953
+ false,
3954
+ undefined,
3955
+ undefined,
3956
+ undefined
3957
+ );
3958
+
3959
+ var ColorpickerAlphaSlider = __vue_component__$1;
3960
+
3961
+ var defaultColorFormatter = function defaultColorFormatter(color, vm) {
3962
+ if (color.alpha < 1) {
3963
+ return color.toString('hexa');
3964
+ } else {
3965
+ return color.toString('hex');
3966
+ }
3967
+ };
3968
+ var defaultColorParser = function defaultColorParser(color, vm) {
3969
+ return Color$1.parse(color);
3970
+ };
3971
+ var script = {
3972
+ name: 'BColorpicker',
3973
+ components: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ColorpickerHSLRepresentationTriangle.name, ColorpickerHSLRepresentationTriangle), ColorpickerHSLRepresentationSquare.name, ColorpickerHSLRepresentationSquare), ColorpickerAlphaSlider.name, ColorpickerAlphaSlider), Input.name, Input), Field.name, Field), Select.name, Select), Icon.name, Icon), Dropdown.name, Dropdown), DropdownItem.name, DropdownItem),
3974
+ mixins: [FormElementMixin],
3975
+ inheritAttrs: false,
3976
+ provide: function provide() {
3977
+ return {
3978
+ $colorpicker: this
3979
+ };
3980
+ },
3981
+ props: {
3982
+ value: {
3983
+ type: [String, Object],
3984
+ validator: function validator(value) {
3985
+ return typeof value === 'string' || _typeof(value) === 'object' && typeof value.red === 'number' && typeof value.green === 'number' && typeof value.blue === 'number';
3986
+ }
3987
+ },
3988
+ representation: {
3989
+ type: String,
3990
+ default: 'triangle',
3991
+ value: function value(_value) {
3992
+ return ['triangle', 'square'].some(function (r) {
3993
+ return r === _value;
3994
+ });
3995
+ }
3996
+ },
3997
+ inline: Boolean,
3998
+ disabled: Boolean,
3999
+ horizontalColorPicker: {
4000
+ type: Boolean,
4001
+ default: false
4002
+ },
4003
+ colorFormatter: {
4004
+ type: Function,
4005
+ default: function _default(color, vm) {
4006
+ if (typeof config.defaultColorFormatter === 'function') {
4007
+ return config.defaultColorFormatter(color);
4008
+ } else {
4009
+ return defaultColorFormatter(color);
4010
+ }
4011
+ }
4012
+ },
4013
+ colorParser: {
4014
+ type: Function,
4015
+ default: function _default(color, vm) {
4016
+ if (typeof config.defaultColorParser === 'function') {
4017
+ return config.defaultColorParser(color);
4018
+ } else {
4019
+ return defaultColorParser(color);
4020
+ }
4021
+ }
4022
+ },
4023
+ alpha: {
4024
+ type: Boolean,
4025
+ default: false
4026
+ },
4027
+ expanded: Boolean,
4028
+ position: String,
4029
+ mobileModal: {
4030
+ type: Boolean,
4031
+ default: function _default() {
4032
+ return config.defaultDatepickerMobileModal;
4033
+ }
4034
+ },
4035
+ focusable: {
4036
+ type: Boolean,
4037
+ default: true
4038
+ },
4039
+ trapFocus: {
4040
+ type: Boolean,
4041
+ default: function _default() {
4042
+ return config.defaultTrapFocus;
4043
+ }
4044
+ },
4045
+ appendToBody: Boolean
4046
+ },
4047
+ data: function data() {
4048
+ return {
4049
+ color: this.parseColor(this.value)
4050
+ };
4051
+ },
4052
+ computed: {
4053
+ computedValue: {
4054
+ set: function set(value) {
4055
+ this.color = this.parseColor(value);
4056
+ },
4057
+ get: function get() {
4058
+ return this.color;
4059
+ }
4060
+ },
4061
+ background: function background() {
4062
+ if (this.alpha) {
4063
+ return "linear-gradient(\n 45deg,\n ".concat(this.computedValue.toString('hex'), " 50%,\n ").concat(this.computedValue.toString('hexa'), " 50%\n )");
4064
+ } else {
4065
+ var hex = this.computedValue.toString('hex');
4066
+ return "linear-gradient(\n 45deg,\n ".concat(hex, " 50%,\n ").concat(hex, " 50%\n )");
4067
+ }
4068
+ },
4069
+ triggerStyle: function triggerStyle() {
4070
+ var _this$computedValue = this.computedValue,
4071
+ red = _this$computedValue.red,
4072
+ green = _this$computedValue.green,
4073
+ blue = _this$computedValue.blue;
4074
+ var light = red * 0.299 + green * 0.587 + blue * 0.114 > 186;
4075
+ return {
4076
+ backgroundColor: '#ffffff',
4077
+ backgroundImage: "\n ".concat(this.background, ",\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7),\n linear-gradient(45deg, #c7c7c7 25%, transparent 25%, transparent 75%, #c7c7c7 75%, #c7c7c7)\n "),
4078
+ backgroundSize: '100% 100%, 16px 16px, 16px 16px',
4079
+ backgroundPosition: '0 0, 8px 8px, 0 0',
4080
+ color: light ? '#000000' : '#FFFFFF',
4081
+ textShadow: "0 0 2px ".concat(light ? '#FFFFFFAA' : '#000000AA')
4082
+ };
4083
+ },
4084
+ isMobile: function isMobile$1() {
4085
+ return this.mobileNative && isMobile.any();
4086
+ },
4087
+ ariaRole: function ariaRole() {
4088
+ if (!this.inline) {
4089
+ return 'dialog';
4090
+ }
4091
+ }
4092
+ },
4093
+ watch: {
4094
+ value: function value(_value2) {
4095
+ this.computedValue = new Color$1(_value2);
4096
+ }
4097
+ },
4098
+ methods: {
4099
+ parseColor: function parseColor(color) {
4100
+ try {
4101
+ return this.colorParser(color);
4102
+ } catch (e) {
4103
+ return new Color$1();
4104
+ }
4105
+ },
4106
+ updateColor: function updateColor(value) {
4107
+ value.alpha = this.computedValue.alpha;
4108
+ this.computedValue = value;
4109
+ this.$emit('input', value);
4110
+ },
4111
+ updateAlpha: function updateAlpha(alpha) {
4112
+ this.computedValue.alpha = alpha;
4113
+ this.$emit('input', this.computedValue);
4114
+ },
4115
+ updateRGB: function updateRGB() {
4116
+ this.$emit('input', this.computedValue);
4117
+ },
4118
+ /*
4119
+ * Format color into string
4120
+ */
4121
+ formatValue: function formatValue(value) {
4122
+ return value ? this.colorFormatter(value, this) : null;
4123
+ },
4124
+ /*
4125
+ * Toggle datepicker
4126
+ */
4127
+ togglePicker: function togglePicker(active) {
4128
+ if (this.$refs.dropdown) {
4129
+ var isActive = typeof active === 'boolean' ? active : !this.$refs.dropdown.isActive;
4130
+ if (isActive) {
4131
+ this.$refs.dropdown.isActive = isActive;
4132
+ } else if (this.closeOnClick) {
4133
+ this.$refs.dropdown.isActive = isActive;
4134
+ }
4135
+ }
4136
+ },
4137
+ /*
4138
+ * Call default onFocus method and show datepicker
4139
+ */
4140
+ handleOnFocus: function handleOnFocus(event) {
4141
+ this.onFocus(event);
4142
+ if (this.openOnFocus) {
4143
+ this.togglePicker(true);
4144
+ }
4145
+ },
4146
+ /*
4147
+ * Toggle dropdown
4148
+ */
4149
+ toggle: function toggle() {
4150
+ if (this.mobileNative && this.isMobile) {
4151
+ var input = this.$refs.input.$refs.input;
4152
+ input.focus();
4153
+ input.click();
4154
+ return;
4155
+ }
4156
+ this.$refs.dropdown.toggle();
4157
+ },
4158
+ /*
4159
+ * Avoid dropdown toggle when is already visible
4160
+ */
4161
+ onInputClick: function onInputClick(event) {
4162
+ if (this.$refs.dropdown.isActive) {
4163
+ event.stopPropagation();
4164
+ }
4165
+ },
4166
+ /**
4167
+ * Keypress event that is bound to the document.
4168
+ */
4169
+ keyPress: function keyPress(_ref) {
4170
+ var key = _ref.key;
4171
+ if (this.$refs.dropdown && this.$refs.dropdown.isActive && (key === 'Escape' || key === 'Esc')) {
4172
+ this.togglePicker(false);
4173
+ }
4174
+ },
4175
+ /**
4176
+ * Emit 'blur' event on dropdown is not active (closed)
4177
+ */
4178
+ onActiveChange: function onActiveChange(value) {
4179
+ if (!value) {
4180
+ this.onBlur();
4181
+ }
4182
+ /*
4183
+ * Emit 'active-change' when on dropdown active state change
4184
+ */
4185
+ this.$emit('active-change', value);
4186
+ }
4187
+ }
4188
+ };
4189
+
4190
+ /* script */
4191
+ const __vue_script__ = script;
4192
+
4193
+ /* template */
4194
+ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"colorpicker control",class:[_vm.size, {'is-expanded': _vm.expanded}]},[(!_vm.isMobile || _vm.inline)?_c('b-dropdown',{ref:"dropdown",attrs:{"position":_vm.position,"expanded":_vm.expanded,"disabled":_vm.disabled,"inline":_vm.inline,"mobile-modal":_vm.mobileModal,"trap-focus":_vm.trapFocus,"aria-role":_vm.ariaRole,"append-to-body":_vm.appendToBody,"append-to-body-copy-parent":""},on:{"active-change":_vm.onActiveChange},scopedSlots:_vm._u([(!_vm.inline)?{key:"trigger",fn:function(){return [_vm._t("trigger",[_c('b-button',{style:(_vm.triggerStyle),attrs:{"expanded":_vm.expanded,"disabled":_vm.disabled}},[_c('span',{staticClass:"color-name"},[_vm._v(_vm._s(_vm.colorFormatter(_vm.computedValue)))])])])]},proxy:true}:null],null,true)},[_c('b-dropdown-item',{class:{'dropdown-horizontal-colorpicker': _vm.horizontalColorPicker},attrs:{"disabled":_vm.disabled,"focusable":_vm.focusable,"custom":""}},[_c('div',[_c('header',{staticClass:"colorpicker-header"},[(_vm.$slots.header !== undefined && _vm.$slots.header.length)?[_vm._t("header")]:_vm._e()],2),_c('div',{staticClass:"colorpicker-content"},[(_vm.representation === 'square')?_c('b-colorpicker-h-s-l-representation-square',{attrs:{"value":_vm.computedValue},on:{"input":_vm.updateColor}}):_c('b-colorpicker-h-s-l-representation-triangle',{attrs:{"value":_vm.computedValue},on:{"input":_vm.updateColor}})],1)]),_c('footer',{staticClass:"colorpicker-footer"},[(_vm.alpha)?_c('b-colorpicker-alpha-slider',{attrs:{"value":_vm.computedValue.alpha,"color":_vm.computedValue},on:{"input":_vm.updateAlpha}}):_vm._e(),_vm._t("footer",[_c('b-field',{staticClass:"colorpicker-fields",attrs:{"grouped":""}},[_c('b-field',{attrs:{"horizontal":"","label":"R"}},[_c('b-input',{attrs:{"type":"number","size":"is-small","aria-label":"Red"},on:{"input":_vm.updateRGB},model:{value:(_vm.computedValue.red),callback:function ($$v) {_vm.$set(_vm.computedValue, "red", _vm._n($$v));},expression:"computedValue.red"}})],1),_c('b-field',{attrs:{"horizontal":"","label":"G"}},[_c('b-input',{attrs:{"type":"number","size":"is-small","aria-label":"Green"},on:{"input":_vm.updateRGB},model:{value:(_vm.computedValue.green),callback:function ($$v) {_vm.$set(_vm.computedValue, "green", _vm._n($$v));},expression:"computedValue.green"}})],1),_c('b-field',{attrs:{"horizontal":"","label":"B"}},[_c('b-input',{attrs:{"type":"number","size":"is-small","aria-label":"Blue"},on:{"input":_vm.updateRGB},model:{value:(_vm.computedValue.blue),callback:function ($$v) {_vm.$set(_vm.computedValue, "blue", _vm._n($$v));},expression:"computedValue.blue"}})],1)],1)],{"color":_vm.computedValue})],2)])],1):_vm._e()],1)};
4195
+ var __vue_staticRenderFns__ = [];
4196
+
4197
+ /* style */
4198
+ const __vue_inject_styles__ = undefined;
4199
+ /* scoped */
4200
+ const __vue_scope_id__ = undefined;
4201
+ /* module identifier */
4202
+ const __vue_module_identifier__ = undefined;
4203
+ /* functional template */
4204
+ const __vue_is_functional_template__ = false;
4205
+ /* style inject */
4206
+
4207
+ /* style inject SSR */
4208
+
4209
+ /* style inject shadow dom */
4210
+
4211
+
4212
+
4213
+ const __vue_component__ = /*#__PURE__*/normalizeComponent(
4214
+ { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
4215
+ __vue_inject_styles__,
4216
+ __vue_script__,
4217
+ __vue_scope_id__,
4218
+ __vue_is_functional_template__,
4219
+ __vue_module_identifier__,
4220
+ false,
4221
+ undefined,
4222
+ undefined,
4223
+ undefined
4224
+ );
4225
+
4226
+ var Colorpicker = __vue_component__;
4227
+
4228
+ var use = function use(plugin) {
4229
+ if (typeof window !== 'undefined' && window.Vue) {
4230
+ window.Vue.use(plugin);
4231
+ }
4232
+ };
4233
+ var registerComponent = function registerComponent(Vue, component) {
4234
+ Vue.component(component.name, component);
4235
+ };
4236
+
4237
+ var Plugin = {
4238
+ install: function install(Vue) {
4239
+ registerComponent(Vue, Colorpicker);
4240
+ }
4241
+ };
4242
+ use(Plugin);
4243
+
4244
+ exports.BColorpicker = Colorpicker;
4245
+ exports["default"] = Plugin;
4246
+
4247
+ Object.defineProperty(exports, '__esModule', { value: true });
4248
+
4249
+ }));