@nanoporetech-digital/components 2.10.1 → 2.13.0

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 (441) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/cjs/{date-utils-0ae9a12d.js → date-utils-b3af910d.js} +2 -2
  3. package/dist/cjs/date-utils-b3af910d.js.map +1 -0
  4. package/dist/cjs/{global-0d4f3b77.js → global-989678ec.js} +1 -8
  5. package/dist/cjs/global-989678ec.js.map +1 -0
  6. package/dist/cjs/index.cjs.js +2 -0
  7. package/dist/cjs/index.cjs.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/nano-algolia.cjs.entry.js +5 -1
  10. package/dist/cjs/nano-algolia.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nano-components.cjs.js +2 -2
  12. package/dist/cjs/nano-datalist_3.cjs.entry.js +3 -1
  13. package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -1
  14. package/dist/cjs/nano-date-input.cjs.entry.js +16 -5
  15. package/dist/cjs/nano-date-input.cjs.entry.js.map +1 -1
  16. package/dist/cjs/nano-date-picker.cjs.entry.js +2 -2
  17. package/dist/cjs/nano-date-picker.cjs.entry.js.map +1 -1
  18. package/dist/cjs/nano-details.cjs.entry.js +1 -2
  19. package/dist/cjs/nano-details.cjs.entry.js.map +1 -1
  20. package/dist/cjs/nano-field-validator.cjs.entry.js +292 -96
  21. package/dist/cjs/nano-field-validator.cjs.entry.js.map +1 -1
  22. package/dist/cjs/nano-file-upload.cjs.entry.js +5 -2
  23. package/dist/cjs/nano-file-upload.cjs.entry.js.map +1 -1
  24. package/dist/cjs/nano-global-search-results.cjs.entry.js +21 -6
  25. package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
  26. package/dist/cjs/nano-grid_3.cjs.entry.js +1 -2
  27. package/dist/cjs/nano-grid_3.cjs.entry.js.map +1 -1
  28. package/dist/cjs/nano-icon-button.cjs.entry.js +4 -0
  29. package/dist/cjs/nano-icon-button.cjs.entry.js.map +1 -1
  30. package/dist/cjs/nano-input.cjs.entry.js +16 -3
  31. package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
  32. package/dist/cjs/nano-nav-item_2.cjs.entry.js +2 -0
  33. package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
  34. package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -2
  35. package/dist/cjs/nano-resize-observe_2.cjs.entry.js.map +1 -1
  36. package/dist/cjs/nano-slides.cjs.entry.js +1 -2
  37. package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
  38. package/dist/cjs/nano-sticker.cjs.entry.js +2 -3
  39. package/dist/cjs/nano-sticker.cjs.entry.js.map +1 -1
  40. package/dist/cjs/nano-tab-group.cjs.entry.js +4 -2
  41. package/dist/cjs/nano-tab-group.cjs.entry.js.map +1 -1
  42. package/dist/cjs/nano-tab.cjs.entry.js +5 -1
  43. package/dist/cjs/nano-tab.cjs.entry.js.map +1 -1
  44. package/dist/cjs/nano-tooltip.cjs.entry.js +1 -1
  45. package/dist/cjs/nano-tooltip.cjs.entry.js.map +1 -1
  46. package/dist/collection/components/accordion/accordion.js +1 -1
  47. package/dist/collection/components/alert/alert.js +1 -1
  48. package/dist/collection/components/algolia/algolia-filter.js +2 -2
  49. package/dist/collection/components/algolia/algolia-input.js +5 -5
  50. package/dist/collection/components/algolia/algolia-results.js +1 -1
  51. package/dist/collection/components/algolia/algolia.js +12 -6
  52. package/dist/collection/components/algolia/algolia.js.map +1 -1
  53. package/dist/collection/components/checkbox/checkbox-group.js +2 -2
  54. package/dist/collection/components/checkbox/checkbox.js +3 -3
  55. package/dist/collection/components/datalist/datalist.js +4 -2
  56. package/dist/collection/components/datalist/datalist.js.map +1 -1
  57. package/dist/collection/components/date-input/date-input.js +65 -11
  58. package/dist/collection/components/date-input/date-input.js.map +1 -1
  59. package/dist/collection/components/date-picker/date-picker.css +1 -1
  60. package/dist/collection/components/date-picker/date-picker.js +5 -5
  61. package/dist/collection/components/details/details.js +1 -2
  62. package/dist/collection/components/details/details.js.map +1 -1
  63. package/dist/collection/components/dialog/dialog.js +1 -1
  64. package/dist/collection/components/dropdown/dropdown.js +1 -1
  65. package/dist/collection/components/field-validator/field-validator-interface.js +5 -0
  66. package/dist/collection/components/field-validator/field-validator-interface.js.map +1 -0
  67. package/dist/collection/components/field-validator/field-validator.js +434 -113
  68. package/dist/collection/components/field-validator/field-validator.js.map +1 -1
  69. package/dist/collection/components/file-upload/file-upload.css +0 -1
  70. package/dist/collection/components/file-upload/file-upload.js +10 -7
  71. package/dist/collection/components/file-upload/file-upload.js.map +1 -1
  72. package/dist/collection/components/global-nav/global-nav.js +4 -4
  73. package/dist/collection/components/global-search-results/global-search-results.css +7 -0
  74. package/dist/collection/components/global-search-results/global-search-results.js +19 -4
  75. package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
  76. package/dist/collection/components/grid/grid-item.js +1 -1
  77. package/dist/collection/components/grid/grid.js +0 -1
  78. package/dist/collection/components/grid/grid.js.map +1 -1
  79. package/dist/collection/components/icon/icon.js +1 -1
  80. package/dist/collection/components/icon-button/icon-button.js +23 -1
  81. package/dist/collection/components/icon-button/icon-button.js.map +1 -1
  82. package/dist/collection/components/input/input.js +37 -8
  83. package/dist/collection/components/input/input.js.map +1 -1
  84. package/dist/collection/components/nav-item/nav-item.js +4 -4
  85. package/dist/collection/components/range/range.js +4 -4
  86. package/dist/collection/components/resize-observe/resize-observe.js +1 -2
  87. package/dist/collection/components/resize-observe/resize-observe.js.map +1 -1
  88. package/dist/collection/components/select/select.js +9 -7
  89. package/dist/collection/components/select/select.js.map +1 -1
  90. package/dist/collection/components/slides/slides.js +7 -8
  91. package/dist/collection/components/slides/slides.js.map +1 -1
  92. package/dist/collection/components/sticker/sticker.js +0 -1
  93. package/dist/collection/components/sticker/sticker.js.map +1 -1
  94. package/dist/collection/components/tabs/tab-group.js +5 -3
  95. package/dist/collection/components/tabs/tab-group.js.map +1 -1
  96. package/dist/collection/components/tabs/tab.js +5 -1
  97. package/dist/collection/components/tabs/tab.js.map +1 -1
  98. package/dist/collection/components/tooltip/tooltip.css +0 -1
  99. package/dist/collection/global/script/global.js +0 -7
  100. package/dist/collection/global/script/global.js.map +1 -1
  101. package/dist/collection/index.js +1 -0
  102. package/dist/collection/index.js.map +1 -1
  103. package/dist/collection/utils/date-utils.js +1 -1
  104. package/dist/collection/utils/date-utils.js.map +1 -1
  105. package/dist/components/algolia.js +5 -1
  106. package/dist/components/algolia.js.map +1 -1
  107. package/dist/components/datalist.js +3 -1
  108. package/dist/components/datalist.js.map +1 -1
  109. package/dist/components/date-picker.js +2 -2
  110. package/dist/components/date-picker.js.map +1 -1
  111. package/dist/components/grid.js +1 -2
  112. package/dist/components/grid.js.map +1 -1
  113. package/dist/components/icon-button.js +6 -1
  114. package/dist/components/icon-button.js.map +1 -1
  115. package/dist/components/index.js +1 -7
  116. package/dist/components/index.js.map +1 -1
  117. package/dist/components/input.js +17 -3
  118. package/dist/components/input.js.map +1 -1
  119. package/dist/components/nano-date-input.js +17 -4
  120. package/dist/components/nano-date-input.js.map +1 -1
  121. package/dist/components/nano-details.js +1 -2
  122. package/dist/components/nano-details.js.map +1 -1
  123. package/dist/components/nano-field-validator.js +300 -99
  124. package/dist/components/nano-field-validator.js.map +1 -1
  125. package/dist/components/nano-file-upload.js +6 -3
  126. package/dist/components/nano-file-upload.js.map +1 -1
  127. package/dist/components/nano-global-search-results.js +21 -6
  128. package/dist/components/nano-global-search-results.js.map +1 -1
  129. package/dist/components/nano-slides.js +1 -2
  130. package/dist/components/nano-slides.js.map +1 -1
  131. package/dist/components/nano-tab-group.js +4 -2
  132. package/dist/components/nano-tab-group.js.map +1 -1
  133. package/dist/components/nano-tab.js +5 -1
  134. package/dist/components/nano-tab.js.map +1 -1
  135. package/dist/components/resize-observe.js +1 -2
  136. package/dist/components/resize-observe.js.map +1 -1
  137. package/dist/components/select.js +2 -0
  138. package/dist/components/select.js.map +1 -1
  139. package/dist/components/sticker.js +2 -3
  140. package/dist/components/sticker.js.map +1 -1
  141. package/dist/components/tooltip.js +1 -1
  142. package/dist/components/tooltip.js.map +1 -1
  143. package/dist/custom-elements/index.js +386 -2046
  144. package/dist/custom-elements/index.js.map +1 -1
  145. package/dist/esm/{date-utils-e4b757ff.js → date-utils-839cb010.js} +2 -2
  146. package/dist/esm/date-utils-839cb010.js.map +1 -0
  147. package/dist/esm/{global-d5ec4d53.js → global-8047b4ff.js} +1 -8
  148. package/dist/esm/global-8047b4ff.js.map +1 -0
  149. package/dist/esm/index.js +1 -0
  150. package/dist/esm/index.js.map +1 -1
  151. package/dist/esm/loader.js +2 -2
  152. package/dist/esm/nano-algolia.entry.js +5 -1
  153. package/dist/esm/nano-algolia.entry.js.map +1 -1
  154. package/dist/esm/nano-components.js +2 -2
  155. package/dist/esm/nano-datalist_3.entry.js +3 -1
  156. package/dist/esm/nano-datalist_3.entry.js.map +1 -1
  157. package/dist/esm/nano-date-input.entry.js +16 -5
  158. package/dist/esm/nano-date-input.entry.js.map +1 -1
  159. package/dist/esm/nano-date-picker.entry.js +2 -2
  160. package/dist/esm/nano-date-picker.entry.js.map +1 -1
  161. package/dist/esm/nano-details.entry.js +1 -2
  162. package/dist/esm/nano-details.entry.js.map +1 -1
  163. package/dist/esm/nano-field-validator.entry.js +292 -96
  164. package/dist/esm/nano-field-validator.entry.js.map +1 -1
  165. package/dist/esm/nano-file-upload.entry.js +5 -2
  166. package/dist/esm/nano-file-upload.entry.js.map +1 -1
  167. package/dist/esm/nano-global-search-results.entry.js +21 -6
  168. package/dist/esm/nano-global-search-results.entry.js.map +1 -1
  169. package/dist/esm/nano-grid_3.entry.js +1 -2
  170. package/dist/esm/nano-grid_3.entry.js.map +1 -1
  171. package/dist/esm/nano-icon-button.entry.js +4 -0
  172. package/dist/esm/nano-icon-button.entry.js.map +1 -1
  173. package/dist/esm/nano-input.entry.js +16 -3
  174. package/dist/esm/nano-input.entry.js.map +1 -1
  175. package/dist/esm/nano-nav-item_2.entry.js +2 -0
  176. package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
  177. package/dist/esm/nano-resize-observe_2.entry.js +1 -2
  178. package/dist/esm/nano-resize-observe_2.entry.js.map +1 -1
  179. package/dist/esm/nano-slides.entry.js +1 -2
  180. package/dist/esm/nano-slides.entry.js.map +1 -1
  181. package/dist/esm/nano-sticker.entry.js +2 -3
  182. package/dist/esm/nano-sticker.entry.js.map +1 -1
  183. package/dist/esm/nano-tab-group.entry.js +4 -2
  184. package/dist/esm/nano-tab-group.entry.js.map +1 -1
  185. package/dist/esm/nano-tab.entry.js +5 -1
  186. package/dist/esm/nano-tab.entry.js.map +1 -1
  187. package/dist/esm/nano-tooltip.entry.js +1 -1
  188. package/dist/esm/nano-tooltip.entry.js.map +1 -1
  189. package/dist/esm-es5/date-utils-839cb010.js +5 -0
  190. package/dist/esm-es5/date-utils-839cb010.js.map +1 -0
  191. package/dist/esm-es5/{global-d5ec4d53.js → global-8047b4ff.js} +2 -2
  192. package/dist/esm-es5/global-8047b4ff.js.map +1 -0
  193. package/dist/esm-es5/index.js +2 -2
  194. package/dist/esm-es5/index.js.map +1 -1
  195. package/dist/esm-es5/loader.js +1 -1
  196. package/dist/esm-es5/loader.js.map +1 -1
  197. package/dist/esm-es5/nano-algolia.entry.js +1 -1
  198. package/dist/esm-es5/nano-algolia.entry.js.map +1 -1
  199. package/dist/esm-es5/nano-components.js +1 -1
  200. package/dist/esm-es5/nano-components.js.map +1 -1
  201. package/dist/esm-es5/nano-datalist_3.entry.js +1 -1
  202. package/dist/esm-es5/nano-datalist_3.entry.js.map +1 -1
  203. package/dist/esm-es5/nano-date-input.entry.js +1 -1
  204. package/dist/esm-es5/nano-date-input.entry.js.map +1 -1
  205. package/dist/esm-es5/nano-date-picker.entry.js +1 -1
  206. package/dist/esm-es5/nano-date-picker.entry.js.map +1 -1
  207. package/dist/esm-es5/nano-details.entry.js +1 -1
  208. package/dist/esm-es5/nano-details.entry.js.map +1 -1
  209. package/dist/esm-es5/nano-field-validator.entry.js +2 -2
  210. package/dist/esm-es5/nano-field-validator.entry.js.map +1 -1
  211. package/dist/esm-es5/nano-file-upload.entry.js +1 -1
  212. package/dist/esm-es5/nano-file-upload.entry.js.map +1 -1
  213. package/dist/esm-es5/nano-global-search-results.entry.js +1 -1
  214. package/dist/esm-es5/nano-global-search-results.entry.js.map +1 -1
  215. package/dist/esm-es5/nano-grid_3.entry.js +1 -1
  216. package/dist/esm-es5/nano-grid_3.entry.js.map +1 -1
  217. package/dist/esm-es5/nano-icon-button.entry.js +2 -2
  218. package/dist/esm-es5/nano-icon-button.entry.js.map +1 -1
  219. package/dist/esm-es5/nano-input.entry.js +1 -1
  220. package/dist/esm-es5/nano-input.entry.js.map +1 -1
  221. package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
  222. package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
  223. package/dist/esm-es5/nano-resize-observe_2.entry.js +1 -1
  224. package/dist/esm-es5/nano-resize-observe_2.entry.js.map +1 -1
  225. package/dist/esm-es5/nano-slides.entry.js +2 -2
  226. package/dist/esm-es5/nano-slides.entry.js.map +1 -1
  227. package/dist/esm-es5/nano-sticker.entry.js +1 -1
  228. package/dist/esm-es5/nano-sticker.entry.js.map +1 -1
  229. package/dist/esm-es5/nano-tab-group.entry.js +2 -2
  230. package/dist/esm-es5/nano-tab-group.entry.js.map +1 -1
  231. package/dist/esm-es5/nano-tab.entry.js +2 -2
  232. package/dist/esm-es5/nano-tab.entry.js.map +1 -1
  233. package/dist/esm-es5/nano-tooltip.entry.js +1 -1
  234. package/dist/esm-es5/nano-tooltip.entry.js.map +1 -1
  235. package/dist/nano-components/index.esm.js +1 -1
  236. package/dist/nano-components/index.esm.js.map +1 -1
  237. package/dist/nano-components/nano-components.esm.js +1 -1
  238. package/dist/nano-components/nano-components.esm.js.map +1 -1
  239. package/dist/nano-components/nano-components.js +1 -1
  240. package/dist/nano-components/p-018b7047.entry.js +5 -0
  241. package/dist/nano-components/p-018b7047.entry.js.map +1 -0
  242. package/dist/nano-components/p-0193a282.entry.js +5 -0
  243. package/dist/nano-components/p-0193a282.entry.js.map +1 -0
  244. package/dist/nano-components/p-0320410c.entry.js +5 -0
  245. package/dist/nano-components/p-0320410c.entry.js.map +1 -0
  246. package/dist/nano-components/p-0d699368.system.js +5 -0
  247. package/dist/nano-components/{p-3258c568.system.js.map → p-0d699368.system.js.map} +1 -1
  248. package/dist/nano-components/p-18863670.system.entry.js +5 -0
  249. package/dist/nano-components/p-18863670.system.entry.js.map +1 -0
  250. package/dist/nano-components/p-32900c91.entry.js +5 -0
  251. package/dist/nano-components/p-32900c91.entry.js.map +1 -0
  252. package/dist/nano-components/p-33fce1a6.js +5 -0
  253. package/dist/nano-components/p-33fce1a6.js.map +1 -0
  254. package/dist/nano-components/p-371aebe7.system.entry.js +23 -0
  255. package/dist/nano-components/p-371aebe7.system.entry.js.map +1 -0
  256. package/dist/nano-components/p-41899a31.system.entry.js +5 -0
  257. package/dist/nano-components/p-41899a31.system.entry.js.map +1 -0
  258. package/dist/nano-components/p-53957ec6.system.js +5 -0
  259. package/dist/nano-components/{p-e7140887.system.js.map → p-53957ec6.system.js.map} +1 -1
  260. package/dist/nano-components/p-561500f0.system.entry.js +5 -0
  261. package/dist/nano-components/p-561500f0.system.entry.js.map +1 -0
  262. package/dist/nano-components/p-596c1711.system.entry.js +5 -0
  263. package/dist/nano-components/p-596c1711.system.entry.js.map +1 -0
  264. package/dist/nano-components/{p-01667573.entry.js → p-634a58f7.entry.js} +2 -2
  265. package/dist/nano-components/p-634a58f7.entry.js.map +1 -0
  266. package/dist/nano-components/p-6a949280.system.entry.js +5 -0
  267. package/dist/nano-components/p-6a949280.system.entry.js.map +1 -0
  268. package/dist/nano-components/{p-bf9aa89d.system.entry.js → p-6af10533.system.entry.js} +3 -3
  269. package/dist/nano-components/p-6af10533.system.entry.js.map +1 -0
  270. package/dist/nano-components/p-70272eae.js +5 -0
  271. package/dist/nano-components/p-70272eae.js.map +1 -0
  272. package/dist/nano-components/p-755d9227.entry.js +5 -0
  273. package/dist/nano-components/p-755d9227.entry.js.map +1 -0
  274. package/dist/nano-components/p-7bd25494.entry.js +5 -0
  275. package/dist/nano-components/p-7bd25494.entry.js.map +1 -0
  276. package/dist/nano-components/p-7c837460.entry.js +5 -0
  277. package/dist/nano-components/p-7c837460.entry.js.map +1 -0
  278. package/dist/nano-components/p-7f051c20.entry.js +5 -0
  279. package/dist/nano-components/p-7f051c20.entry.js.map +1 -0
  280. package/dist/nano-components/{p-93880c28.system.js → p-82e28afd.system.js} +2 -2
  281. package/dist/nano-components/p-82e28afd.system.js.map +1 -0
  282. package/dist/nano-components/p-8378428e.system.js +5 -0
  283. package/dist/nano-components/p-8378428e.system.js.map +1 -0
  284. package/dist/nano-components/p-8df4f125.system.entry.js +5 -0
  285. package/dist/nano-components/p-8df4f125.system.entry.js.map +1 -0
  286. package/dist/nano-components/{p-d0385948.system.entry.js → p-93596c3d.system.entry.js} +2 -2
  287. package/dist/nano-components/p-93596c3d.system.entry.js.map +1 -0
  288. package/dist/nano-components/{p-3e930ac7.entry.js → p-9d9b0b66.entry.js} +2 -2
  289. package/dist/nano-components/p-9d9b0b66.entry.js.map +1 -0
  290. package/dist/nano-components/p-9ffdf6cc.entry.js +5 -0
  291. package/dist/nano-components/{p-222d8095.entry.js.map → p-9ffdf6cc.entry.js.map} +1 -1
  292. package/dist/nano-components/p-a07cf44c.system.entry.js +5 -0
  293. package/dist/nano-components/p-a07cf44c.system.entry.js.map +1 -0
  294. package/dist/nano-components/p-a1444980.entry.js +5 -0
  295. package/dist/nano-components/p-a1444980.entry.js.map +1 -0
  296. package/dist/nano-components/p-aa84c727.system.entry.js +5 -0
  297. package/dist/nano-components/p-aa84c727.system.entry.js.map +1 -0
  298. package/dist/nano-components/p-ac5e3775.system.entry.js +5 -0
  299. package/dist/nano-components/p-ac5e3775.system.entry.js.map +1 -0
  300. package/dist/nano-components/p-b85cf493.system.entry.js +5 -0
  301. package/dist/nano-components/{p-e817ab4a.system.entry.js.map → p-b85cf493.system.entry.js.map} +1 -1
  302. package/dist/nano-components/{p-96d9b8b9.system.entry.js → p-c2bbf0fb.system.entry.js} +2 -2
  303. package/dist/nano-components/p-c2bbf0fb.system.entry.js.map +1 -0
  304. package/dist/nano-components/{p-f780d2f6.system.entry.js → p-cb512cff.system.entry.js} +2 -2
  305. package/dist/nano-components/p-cb512cff.system.entry.js.map +1 -0
  306. package/dist/nano-components/{p-4e2c0abb.entry.js → p-ccd6c206.entry.js} +2 -2
  307. package/dist/nano-components/p-ccd6c206.entry.js.map +1 -0
  308. package/dist/nano-components/{p-1030797a.entry.js → p-d37e1489.entry.js} +2 -2
  309. package/dist/nano-components/p-d37e1489.entry.js.map +1 -0
  310. package/dist/nano-components/p-da88981f.entry.js +23 -0
  311. package/dist/nano-components/p-da88981f.entry.js.map +1 -0
  312. package/dist/nano-components/p-e8a913ac.system.entry.js +5 -0
  313. package/dist/nano-components/p-e8a913ac.system.entry.js.map +1 -0
  314. package/dist/nano-components/p-e9fddc1a.entry.js +5 -0
  315. package/dist/nano-components/p-e9fddc1a.entry.js.map +1 -0
  316. package/dist/nano-components/p-ea54ee12.entry.js +5 -0
  317. package/dist/nano-components/p-ea54ee12.entry.js.map +1 -0
  318. package/dist/nano-components/{p-86bd5194.entry.js → p-ed0bdea9.entry.js} +2 -2
  319. package/dist/nano-components/p-ed0bdea9.entry.js.map +1 -0
  320. package/dist/nano-components/p-faba2fc1.system.entry.js +5 -0
  321. package/dist/nano-components/p-faba2fc1.system.entry.js.map +1 -0
  322. package/dist/nano-components/p-ff026352.system.entry.js +5 -0
  323. package/dist/nano-components/p-ff026352.system.entry.js.map +1 -0
  324. package/dist/themes/nanopore.css +1 -1
  325. package/dist/themes/nanopore.css.map +1 -1
  326. package/dist/types/components/algolia/algolia.d.ts +1 -0
  327. package/dist/types/components/date-input/date-input.d.ts +6 -1
  328. package/dist/types/components/field-validator/field-validator-interface.d.ts +19 -0
  329. package/dist/types/components/field-validator/field-validator.d.ts +77 -31
  330. package/dist/types/components/file-upload/file-upload.d.ts +2 -1
  331. package/dist/types/components/global-search-results/global-search-results.d.ts +1 -0
  332. package/dist/types/components/icon-button/icon-button.d.ts +2 -0
  333. package/dist/types/components/input/input.d.ts +6 -1
  334. package/dist/types/components/tabs/tab.d.ts +1 -0
  335. package/dist/types/components.d.ts +67 -12
  336. package/dist/types/index.d.ts +1 -0
  337. package/dist/types/interface.d.ts +1 -0
  338. package/docs-json.json +161 -13
  339. package/docs-vscode.json +6 -2
  340. package/package.json +2 -4
  341. package/dist/cjs/ResizeObserver.es-09b81a1b.js +0 -935
  342. package/dist/cjs/ResizeObserver.es-09b81a1b.js.map +0 -1
  343. package/dist/cjs/date-utils-0ae9a12d.js.map +0 -1
  344. package/dist/cjs/global-0d4f3b77.js.map +0 -1
  345. package/dist/cjs/intersection-observer-1822c787.js +0 -987
  346. package/dist/cjs/intersection-observer-1822c787.js.map +0 -1
  347. package/dist/components/ResizeObserver.es.js +0 -933
  348. package/dist/components/ResizeObserver.es.js.map +0 -1
  349. package/dist/components/intersection-observer.js +0 -985
  350. package/dist/components/intersection-observer.js.map +0 -1
  351. package/dist/esm/ResizeObserver.es-724af9fd.js +0 -933
  352. package/dist/esm/ResizeObserver.es-724af9fd.js.map +0 -1
  353. package/dist/esm/date-utils-e4b757ff.js.map +0 -1
  354. package/dist/esm/global-d5ec4d53.js.map +0 -1
  355. package/dist/esm/intersection-observer-dff9fb5b.js +0 -985
  356. package/dist/esm/intersection-observer-dff9fb5b.js.map +0 -1
  357. package/dist/esm-es5/ResizeObserver.es-724af9fd.js +0 -5
  358. package/dist/esm-es5/ResizeObserver.es-724af9fd.js.map +0 -1
  359. package/dist/esm-es5/date-utils-e4b757ff.js +0 -5
  360. package/dist/esm-es5/date-utils-e4b757ff.js.map +0 -1
  361. package/dist/esm-es5/global-d5ec4d53.js.map +0 -1
  362. package/dist/esm-es5/intersection-observer-dff9fb5b.js +0 -5
  363. package/dist/esm-es5/intersection-observer-dff9fb5b.js.map +0 -1
  364. package/dist/nano-components/p-00eaa36a.entry.js +0 -5
  365. package/dist/nano-components/p-00eaa36a.entry.js.map +0 -1
  366. package/dist/nano-components/p-01667573.entry.js.map +0 -1
  367. package/dist/nano-components/p-1030797a.entry.js.map +0 -1
  368. package/dist/nano-components/p-11a2dcce.js +0 -5
  369. package/dist/nano-components/p-11a2dcce.js.map +0 -1
  370. package/dist/nano-components/p-1a30dfdd.system.entry.js +0 -5
  371. package/dist/nano-components/p-1a30dfdd.system.entry.js.map +0 -1
  372. package/dist/nano-components/p-1b120f53.entry.js +0 -5
  373. package/dist/nano-components/p-1b120f53.entry.js.map +0 -1
  374. package/dist/nano-components/p-21d6d31e.system.entry.js +0 -5
  375. package/dist/nano-components/p-21d6d31e.system.entry.js.map +0 -1
  376. package/dist/nano-components/p-222d8095.entry.js +0 -5
  377. package/dist/nano-components/p-241d90eb.system.entry.js +0 -5
  378. package/dist/nano-components/p-241d90eb.system.entry.js.map +0 -1
  379. package/dist/nano-components/p-2c8d7273.entry.js +0 -5
  380. package/dist/nano-components/p-2c8d7273.entry.js.map +0 -1
  381. package/dist/nano-components/p-3093915f.entry.js +0 -5
  382. package/dist/nano-components/p-3093915f.entry.js.map +0 -1
  383. package/dist/nano-components/p-3258c568.system.js +0 -5
  384. package/dist/nano-components/p-325c1cad.entry.js +0 -5
  385. package/dist/nano-components/p-325c1cad.entry.js.map +0 -1
  386. package/dist/nano-components/p-32f396c0.system.entry.js +0 -5
  387. package/dist/nano-components/p-32f396c0.system.entry.js.map +0 -1
  388. package/dist/nano-components/p-35108e08.entry.js +0 -5
  389. package/dist/nano-components/p-35108e08.entry.js.map +0 -1
  390. package/dist/nano-components/p-3ccb176c.system.entry.js +0 -5
  391. package/dist/nano-components/p-3ccb176c.system.entry.js.map +0 -1
  392. package/dist/nano-components/p-3e930ac7.entry.js.map +0 -1
  393. package/dist/nano-components/p-42cebbfe.system.entry.js +0 -5
  394. package/dist/nano-components/p-42cebbfe.system.entry.js.map +0 -1
  395. package/dist/nano-components/p-4e2c0abb.entry.js.map +0 -1
  396. package/dist/nano-components/p-5d17cfbb.system.entry.js +0 -23
  397. package/dist/nano-components/p-5d17cfbb.system.entry.js.map +0 -1
  398. package/dist/nano-components/p-5d5ea4ab.system.entry.js +0 -5
  399. package/dist/nano-components/p-5d5ea4ab.system.entry.js.map +0 -1
  400. package/dist/nano-components/p-6722447c.entry.js +0 -5
  401. package/dist/nano-components/p-6722447c.entry.js.map +0 -1
  402. package/dist/nano-components/p-6d138abf.entry.js +0 -5
  403. package/dist/nano-components/p-6d138abf.entry.js.map +0 -1
  404. package/dist/nano-components/p-76d9d1d4.entry.js +0 -5
  405. package/dist/nano-components/p-76d9d1d4.entry.js.map +0 -1
  406. package/dist/nano-components/p-866f083f.system.entry.js +0 -5
  407. package/dist/nano-components/p-866f083f.system.entry.js.map +0 -1
  408. package/dist/nano-components/p-86bd5194.entry.js.map +0 -1
  409. package/dist/nano-components/p-88779174.system.entry.js +0 -5
  410. package/dist/nano-components/p-88779174.system.entry.js.map +0 -1
  411. package/dist/nano-components/p-93880c28.system.js.map +0 -1
  412. package/dist/nano-components/p-96d9b8b9.system.entry.js.map +0 -1
  413. package/dist/nano-components/p-97b13ad2.entry.js +0 -5
  414. package/dist/nano-components/p-97b13ad2.entry.js.map +0 -1
  415. package/dist/nano-components/p-b430a9b6.system.js +0 -5
  416. package/dist/nano-components/p-b430a9b6.system.js.map +0 -1
  417. package/dist/nano-components/p-bc394857.system.entry.js +0 -5
  418. package/dist/nano-components/p-bc394857.system.entry.js.map +0 -1
  419. package/dist/nano-components/p-bf9aa89d.system.entry.js.map +0 -1
  420. package/dist/nano-components/p-c3830c43.entry.js +0 -5
  421. package/dist/nano-components/p-c3830c43.entry.js.map +0 -1
  422. package/dist/nano-components/p-d0385948.system.entry.js.map +0 -1
  423. package/dist/nano-components/p-debd9efc.js +0 -5
  424. package/dist/nano-components/p-debd9efc.js.map +0 -1
  425. package/dist/nano-components/p-e195ab77.system.js +0 -5
  426. package/dist/nano-components/p-e195ab77.system.js.map +0 -1
  427. package/dist/nano-components/p-e7140887.system.js +0 -5
  428. package/dist/nano-components/p-e817ab4a.system.entry.js +0 -5
  429. package/dist/nano-components/p-f5d4d13b.system.js +0 -5
  430. package/dist/nano-components/p-f5d4d13b.system.js.map +0 -1
  431. package/dist/nano-components/p-f66958c1.js +0 -5
  432. package/dist/nano-components/p-f66958c1.js.map +0 -1
  433. package/dist/nano-components/p-f710c763.system.entry.js +0 -5
  434. package/dist/nano-components/p-f710c763.system.entry.js.map +0 -1
  435. package/dist/nano-components/p-f780d2f6.system.entry.js.map +0 -1
  436. package/dist/nano-components/p-f9c7d961.js +0 -5
  437. package/dist/nano-components/p-f9c7d961.js.map +0 -1
  438. package/dist/nano-components/p-ffc2063a.entry.js +0 -23
  439. package/dist/nano-components/p-ffc2063a.entry.js.map +0 -1
  440. package/dist/nano-components/p-fff27907.system.entry.js +0 -5
  441. package/dist/nano-components/p-fff27907.system.entry.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/nav-item/nav-item.scss?tag=nano-nav-item&encapsulation=shadow","src/components/nav-item/nav-item.tsx","src/components/select/select.scss?tag=nano-select&encapsulation=scoped","src/components/select/select.tsx"],"names":["navItemCss","NavItem","exports","class_1","hostRef","_this","this","hasSecondarySlot","hasAnchorEle","didBlur","animating","didOpen","isInGlobalNav","isInMenuDrawer","isInMenu","isLegacy","document","head","attachShadow","hasFocus","href","target","disabled","open","selected","secondaryActiveWidth","secondaryFallback","closeOnBlur","notification","closeSecondary","__awaiter","nanoClosing","emit","secondaryMenu","secondaryDiv","displayTransition","status","_b","sent","openSecondary","window","innerWidth","call","nanoOpening","toggleSecondary","handleFocus","nanoFocus","handleHostBlur","el","removeAttribute","nanoBlur","handleHostClick","ev","foundlink","closest","btn","click","handleMouseEnter","globalNavEle","classList","contains","timeToWait","getSiblings","length","clearTimeout","waitHide","fromHover","waitShow","setTimeout","__generator","handleMouseLeave","handleClick","_a","querySelector","blur","relatedTarget","foundThisNavEle","focus","preventScroll","removeEventListener","prototype","setFocus","openChange","didOpenChange","nanoClose","panelio_1","IntersectionObserver","data","boundingClientRect","top","scrollIntoView","behavior","disconnect","threshold","observe","addEventListener","tabIndex","nanoOpen","found","parentElement","componentWillLoad","secondaryEle","link","getDirectChildren","connectedCallback","render","h","Host","class","has-secondary","secondary-open","has-focus","nano-global-nav","nano-menu-drawer","nano-menu","legacy","onBlur","dir","ownerDocument","onMouseEnter","onMouseLeave","onClick","role","nav-item","ref","a","onFocus","name","div","tabindex","selectCss","selectIds","Select","class_2","valueItems","selectId","rtl","onInit","currInsertIndex","showErrorMsg","errorMessage","hasLabelSlot","hasHelperSlot","hasHelperEndSlot","inputSearchVal","_invalid","autofocus","validateOn","showInlineError","hideLabel","floatLabel","multiple","readonly","required","allowCustomValues","_value","_options","_eOptions","clearSelect","mask","debounce","dropDownConfig","customValidate","nativeSelect","setCustomValidity","valArray","isValidValues","max","min","showInlineValidation","validity","valid","validationMessage","nanoValidate","isValid","invalid","originalEvent","handleInvalid","preventDefault","requestAnimationFrame","setValue","e","value","detail","inputCtrl","includes","__spreadArray","slice","removeValue","toFind","filter","val","setOptions","datalist","activeOptions","map","ao","label","filterMeta","handleDocumentKeyDown","rm","key","previousElementSibling","dataset","nextElementSibling","previousSibling","nextSibling","event","Event","dispatchEvent","clearSelectValue","stopPropagation","onDragStart","ele","dragVal","onDragEnd","onDragLeave","spanVal","to","indexOf","from","tmpArr","tmpVal","onMultiInput","trim","nanoSearchChange","Object","defineProperty","_inputCtrl","input","setDataListOpts","_selectWrap","_datalist","split","Array","isArray","opts","opt","debounceChanged","debounceEvent","shouldValidate","valueChanged","nanoChange","selectWrap","currDWConfig","assign","tetherTo","reportValidity","validateFirst","Promise","resolve","getSelectElement","showError","message","find","options","slotChangeObserver","mo","MutationObserver","processSlottedContent","childList","subtree","querySelectorAll","console","warn","getLabel","onReset","form","handleBlur","kev","raf","getActiveElement","closestElement","tagName","toLowerCase","CustomEvent","disconnectedCallback","componentDidLoad","labelId","moreId","helperEndId","compWrapOptions","placeholder","wrapOptions","hasValue","controlId","controlOptions","clearControl","type","aria-disabled","createColorClasses","color","has-value","is-invalid","has-label","has-float-label","has-multiple","has-clr-btn","masked","FormControlWrap","FormControl","onClearText","control","endValueSlot","slot","multipleValues","id","aria-labelledby","readOnly","onNanoOptionsUpdated","onNanoSelect","onNanoDeselect","undefined","select","onInvalid","autoFocus","autocomplete","onKeyDown","onInput","onTouchStart","onMouseDown","i","toReturn","onDragOver","draggable","data-value","span","push","onTouchEnd","onMouseUp"],"mappings":";;;ieAAA,IAAMA,EAAa,yzkBC2BNC,EAAOC,EAAA,gBAAA,WALpB,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,iPAMUA,KAAAC,iBAA4B,MAC5BD,KAAAE,aAAwB,MAGxBF,KAAAG,QAAmB,MAEnBH,KAAAI,UAAqB,MAKpBJ,KAAAK,QAAmB,MACnBL,KAAAM,cAAyB,MACzBN,KAAAO,eAA0B,MAC1BP,KAAAQ,SAAoB,MACpBR,KAAAS,UAAqBC,SAASC,KAAKC,aACnCZ,KAAAa,SAAoB,MAMJb,KAAAc,KAAe,KAKhCd,KAAAe,OAAkD,QAKlDf,KAAAgB,SAAoB,MAKYhB,KAAAiB,KAAgB,MAK/BjB,KAAAkB,SAAoB,MAKrClB,KAAAmB,qBAA+B,EAK/BnB,KAAAoB,kBAAoB,aAKpBpB,KAAAqB,YAAuB,KAKvBrB,KAAAsB,aAAwB,MAmGxBtB,KAAAuB,eAAiB,WAAA,OAAAC,UAAAzB,OAAA,OAAA,GAAA,6EACvBC,KAAKiB,KAAO,MACZ,IAAKjB,KAAKC,mBAAqBD,KAAKK,QAAS,MAAA,CAAA,GAE7CL,KAAKyB,YAAYC,KAAK,CAAEC,cAAe3B,KAAK4B,eAC/B,MAAA,CAAA,EAAMC,EAAkB7B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ACpCwL,EAAW,CAAC7F,EAAO6F,QAChB,GAAID,IAAM5T,EAAKqI,gBAClBwL,EAAW,CAACA,EAAmB7F,GACjC,OAAO6F,qbAp8BM","sourcesContent":["@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n\n:host {\n // These can be overwritten, but are autatically set from context components\n\n // --padding-top: inherit;\n // --padding-bottom: inherit;\n // --padding-start: inherit;\n // --padding-end: inherit;\n // --margin: inherit;\n\n // --secondary-padding-top: inherit;\n // --secondary-padding-bottom: inherit;\n // --secondary-padding-start: inherit;\n // --secondary-padding-end: inherit;\n\n // --border-bottom: inherit;\n // --icon-size: inherit;\n\n // --color: inherit;\n // --color-hover: inherit;\n // --color-focus: inherit;\n // --color-selected: inherit;\n // --color-open: inherit;\n\n // --bg-color: inherit;\n // --bg-color-hover: inherit;\n // --bg-color-selected: inherit;\n // --bg-color-open: inherit;\n // --bg-color-focus: inherit;\n\n // --secondary-bg-color: inherit;\n // --secondary-color: inherit;\n\n opacity: inherit;\n display: block;\n color: var(--color) !important;\n margin: var(--margin);\n\n ::slotted(*),\n * {\n box-sizing: border-box;\n }\n\n ::slotted(button),\n button {\n background: none;\n border: none;\n margin: 0;\n }\n\n ::slotted(button),\n ::slotted(a),\n ::slotted(a:visited),\n button,\n a,\n a:visited {\n @include text-inherit();\n @include padding(\n var(--padding-top),\n var(--padding-end),\n var(--padding-bottom),\n var(--padding-start)\n );\n\n display: var(--display, block);\n white-space: nowrap;\n color: var(--color) !important;\n background-color: var(--bg-color);\n }\n\n ::slotted(nano-icon[slot='icon-start']) {\n @include padding(null, var(--padding-end), null, null);\n }\n\n ::slotted(nano-icon[slot='icon-end']) {\n @include padding(null, null, null, var(--padding-start));\n }\n\n .link {\n &::slotted(nano-icon[slot='icon-start']),\n ::slotted(nano-icon[slot='icon-start']) {\n @include padding(null, 0, null, var(--padding-start));\n }\n\n &::slotted(nano-icon[slot='icon-end']),\n ::slotted(nano-icon[slot='icon-end']) {\n @include padding(null, var(--padding-end), null, 0);\n }\n }\n\n .link,\n button,\n a {\n border-bottom: var(--border-bottom);\n display: flex;\n align-items: center;\n }\n\n .secondary-menu {\n display: none;\n }\n\n ::slotted(a:hover),\n ::slotted(button:hover),\n .link:hover,\n button:hover,\n a:hover {\n text-decoration: inherit !important;\n }\n\n button:focus,\n a:focus {\n color: var(--color-focus, var(--color-hover, var(--color))) !important;\n background-color:\n var(\n --bg-color-focus,\n var(--bg-color-hover, var(--bg-color))\n );\n outline: var(--focus-outline, none);\n }\n\n ::slotted(a:focus),\n ::slotted(button:focus) {\n color: var(--color-focus, var(--color-hover, var(--color))) !important;\n background-color:\n var(\n --bg-color-focus,\n var(--bg-color-hover, var(--bg-color))\n );\n outline: none;\n }\n}\n\n.nav-item {\n &.selected {\n .link,\n button,\n a {\n color: var(--color-selected, var(--color-open, var(--color))) !important;\n background-color:\n var(\n --bg-color-selected,\n var(--bg-color-open, var(--bg-color))\n );\n }\n }\n\n &.secondary-open {\n button,\n a {\n color: var(--color-open, var(--color-selected, var(--color))) !important;\n background-color:\n var(\n --bg-color-open,\n var(--secondary-bg-color, var(--bg-color-selected, var(--bg-color)))\n );\n }\n }\n\n &.disabled {\n opacity: 0.6;\n\n button,\n a {\n color: var(--color-disabled, var(--color)) !important;\n }\n }\n\n &:not(.nano-menu) {\n ::slotted(a:hover),\n ::slotted(button:hover),\n .link:hover,\n button:hover,\n a:hover {\n color: var(--color-hover, var(--color-hover, var(--color))) !important;\n background-color:\n var(\n --bg-color-hover,\n var(--bg-color-focus, var(--bg-color))\n );\n }\n }\n}\n\n:host(.has-focus) {\n .link {\n color: var(--color-focus, var(--color-hover, var(--color))) !important;\n background-color:\n var(\n --bg-color-focus,\n var(--bg-color-hover, var(--bg-color))\n );\n outline: var(--focus-outline, 5px auto -webkit-focus-ring-color);\n }\n}\n\n:host(.nano-global-nav-menu),\n:host(.nano-menu) {\n a,\n a:visited,\n button,\n .link {\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n align-items: center;\n color: 'currentColor';\n text-decoration: inherit;\n white-space: normal;\n cursor: pointer;\n line-height: 1.2;\n width: 100%;\n }\n\n .text {\n @include padding(null, var(--padding-end), null, 0);\n\n flex: 1;\n }\n\n ::slotted(a),\n ::slotted(button) {\n flex: 1;\n }\n\n ::slotted(a:focus),\n ::slotted(button:focus) {\n box-shadow: none;\n }\n\n .secondary-menu {\n display: none;\n position: absolute;\n color: var(--secondary-color, 'currentColor');\n min-height: 100%;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 1;\n opacity: 0;\n transition: opacity 0.2s ease, transform 0.3s ease;\n background-color: var(--secondary-bg-color, white);\n transform: translateX(100%);\n\n &:focus {\n outline: none;\n }\n\n &.open {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 0.3s ease, transform 0.2s ease;\n }\n }\n}\n\n:host(.nano-global-nav-menu) {\n ::slotted(nano-icon[slot='icon-start']) {\n @include padding(0, var(--padding-end), 0, 0);\n }\n\n ::slotted(nano-icon[slot='icon-end']) {\n @include padding(0, var(--padding-end), 0, 0);\n\n font-size: 10px;\n flex: 0 0 10px;\n pointer-events: none;\n }\n\n button,\n a {\n ::slotted(nano-icon[slot='icon-end']) {\n padding: 0;\n }\n }\n}\n\n:host(.nano-global-nav-menu[dir='rtl']),\n:host(.nano-menu[dir='rtl']) {\n .secondary-menu {\n left: auto;\n right: 0;\n transform: translateX(-100%);\n\n &.open {\n transform: translateX(0);\n }\n }\n}\n\n:host(.nano-menu) {\n .secondary-menu-content {\n @include padding(\n var(--secondary-padding-top),\n var(--secondary-padding-end),\n var(--secondary-padding-bottom),\n var(--secondary-padding-start)\n );\n }\n}\n\n// I'm sorry. Horrible IE fixes for collapsing stuff :/\n:host(.nano-global-nav-bar.legacy) {\n margin: 0 11px;\n\n ::slotted(a) {\n @include padding(7px, 6px, 7px, 6px);\n }\n}\n\n:host(.nano-global-nav-menu.legacy) {\n ::slotted(a) {\n @include padding(8px, 12px, 8px, 12px);\n }\n}\n\n:host(.nano-global-nav-bar) {\n .link,\n a,\n button {\n display: flex;\n align-items: center;\n cursor: pointer;\n font-stretch: expanded;\n }\n\n .text {\n flex: 1 0 auto;\n }\n\n ::slotted(nano-icon[slot='icon-end']) {\n @include margin(0, 0, 0, var(--padding-end));\n }\n\n ::slotted(nano-icon[slot='icon-start']) {\n @include margin(0, var(--padding-start), 0, 0);\n }\n}\n\n:host(.nano-global-nav-bar.has-secondary) {\n button {\n position: relative;\n font-stretch: expanded;\n\n &::before {\n content: '';\n background: rgb(134, 190, 226);\n height: 3px;\n left: 0;\n bottom: -14px;\n right: 5px;\n position: absolute;\n transform: translateZ(0) scaleX(0);\n transform-origin: 0;\n transition: 0.2s ease transform;\n }\n }\n\n .selected button::before,\n .secondary-open button::before {\n transform: translateZ(0) scaleX(1);\n }\n\n .secondary-open button::before {\n opacity: 0.5;\n }\n\n .secondary-menu {\n display: none;\n transition: transform 0.3s ease;\n transform: translateY(-100%) translateZ(0);\n background-color: var(--secondary-bg-color, #196c82);\n color: var(--secondary-color);\n position: absolute;\n box-shadow: 0 1px 25px 0 rgba(0, 0, 0, 0.15);\n left: 0;\n right: 0;\n z-index: -2;\n outline: none;\n\n &.open {\n transform: translateY(12px) translateZ(0);\n }\n }\n}\n\n:host(.nano-menu-drawer) {\n .link,\n a,\n button {\n @include padding(\n calc(var(--padding-top) / 2),\n 0,\n calc(var(--padding-bottom) / 2),\n var(--padding-start)\n );\n\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n align-items: center;\n color: currentColor;\n text-decoration: inherit;\n white-space: normal;\n border: none;\n cursor: pointer;\n line-height: 1.2;\n width: 100%;\n }\n\n .text {\n @include padding(null, var(--padding-end), null, 0);\n\n text-align: left;\n flex: 0 1 auto;\n min-width: 130px;\n width: 130px;\n }\n\n ::slotted(nano-icon[slot='icon-start']) {\n @include padding(0, var(--padding-end), 0, 0);\n\n font-size: var(--icon-size);\n width: var(--icon-size);\n flex: 0 0 var(--icon-size);\n }\n\n ::slotted(nano-icon[slot='icon-end']) {\n @include padding(0, var(--padding-end), 0, 0);\n\n font-size: 10px;\n flex: 0 0 20px;\n min-width: 20px;\n }\n\n .secondary-menu {\n display: none;\n position: absolute;\n background-color: var(--secondary-bg-color);\n color: var(--secondary-color);\n height: 100vh;\n top: 0;\n right: 0;\n left: auto;\n bottom: 0;\n transform: translateX(0);\n z-index: -1;\n transition: transform 0.3s ease, opacity 0.2s ease;\n overflow-y: auto;\n width: var(--secondary-width, 400px);\n max-width: 62vw;\n opacity: 1;\n\n @include padding(\n var(--secondary-padding-top, var(--padding-top)),\n var(--secondary-padding-end, var(--padding-end)),\n var(--secondary-padding-bottom, var(--padding-bottom)),\n var(--secondary-padding-start, var(--padding-start))\n );\n\n &:focus {\n outline: none;\n }\n\n &.open {\n transform: translateX(100%);\n // opacity: 1;\n }\n }\n\n .notification {\n position: relative;\n\n &::after {\n content: '';\n display: block;\n position: absolute;\n width: 6px;\n height: 6px;\n background-color: #ef4135;\n inset-inline-start: 10px;\n top: 7px;\n border-radius: 50%;\n\n @media (min-width: 52em) {\n width: 7px;\n height: 7px;\n inset-inline-start: 8px;\n top: 5px;\n }\n }\n }\n}\n\n:host(.nano-menu-drawer.legacy) {\n .link,\n a,\n button {\n width: auto;\n }\n\n ::slotted(nano-icon[slot='icon-end']) {\n @include padding(0, calc(var(--padding-end) * 2), 0, 0);\n\n font-size: 10px;\n flex: 0 0 20px;\n min-width: 20px;\n }\n}\n\n:host(.nano-menu-drawer[dir='rtl']) {\n .text {\n text-align: right;\n }\n\n .secondary-menu {\n right: auto;\n left: 0;\n transform: translateX(0%);\n\n &.open {\n transform: translateX(-100%);\n opacity: 1;\n }\n }\n}\n","import {\n Component,\n h,\n Host,\n Element,\n Prop,\n Watch,\n EventEmitter,\n Event,\n State,\n Method,\n ComponentInterface,\n} from '@stencil/core';\nimport { displayTransition, getDirectChildren, getSiblings } from '../../utils';\nimport { NavItemEventDetail } from '../../interface';\n\n/**\n * Nav items to be used with the various nav items.\n * [Globla-Nav](/story/compounds-global-nav)\n * [Menu-Drawer](/story/components-menu-drawer)\n * [Dropdown](/story/components-dropdown)\n */\n@Component({\n tag: 'nano-nav-item',\n styleUrl: 'nav-item.scss',\n shadow: true,\n})\nexport class NavItem implements ComponentInterface {\n private hasSecondarySlot: boolean = false;\n private hasAnchorEle: boolean = false;\n private secondaryDiv: HTMLDivElement;\n private btn: HTMLButtonElement | HTMLAnchorElement;\n private didBlur: boolean = false;\n private fromHover: boolean;\n private animating: boolean = false;\n private waitHide: number;\n private waitShow: number;\n private globalNavEle?: HTMLNanoGlobalNavElement;\n\n @State() didOpen: boolean = false;\n @State() isInGlobalNav: boolean = false;\n @State() isInMenuDrawer: boolean = false;\n @State() isInMenu: boolean = false;\n @State() isLegacy: boolean = !document.head.attachShadow;\n @State() hasFocus: boolean = false;\n @Element() private el: HTMLNanoNavItemElement;\n\n /**\n * Href to link to\n */\n @Prop({ mutable: true }) href: string = null;\n\n /**\n * Target to use for links\n */\n @Prop() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n /**\n * Disable the nav item\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Whether a secondary menu should be or is currently open\n */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n\n /**\n * Whether this menu item is currently 'selected'\n */\n @Prop({ reflect: true }) selected: boolean = false;\n\n /**\n * Screen pixel width to activate the secondary menu\n */\n @Prop() secondaryActiveWidth: number = 0;\n\n /**\n * Secondary fallback function for when the secondary menu is no longer active.\n */\n @Prop() secondaryFallback = () => {};\n\n /**\n * Whether secondary menus should close on blur\n */\n @Prop() closeOnBlur: boolean = true;\n\n /**\n * Will show an indicator badge - only when placed in a nano-menu-draw\n */\n @Prop() notification: boolean = false;\n\n /**\n * Emitted when the nav item closes it's secondary navigation.\n */\n @Event() nanoClose!: EventEmitter<NavItemEventDetail>;\n\n /**\n * Emitted when the nav item opens it's secondary navigation.\n */\n @Event() nanoOpen!: EventEmitter<NavItemEventDetail>;\n\n /**\n * Emitted when the nav item is about to open it's secondary navigation.\n */\n @Event() nanoOpening!: EventEmitter<NavItemEventDetail>;\n\n /**\n * Emitted when the nav item is about to close it's secondary navigation.\n */\n @Event() nanoClosing!: EventEmitter<NavItemEventDetail>;\n\n /**\n * Emitted when the nav item loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the nav item has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Sets focus on the first button or anchor present. Use this method instead of the global\n * `element.focus()`.\n */\n @Method()\n async setFocus() {\n if (!this.btn) return;\n this.btn.focus();\n }\n\n /**\n * Public open watcher\n */\n @Watch('open')\n openChange() {\n this.open ? this.openSecondary() : this.closeSecondary();\n }\n\n /**\n * Internal open watcher\n */\n @Watch('didOpen')\n didOpenChange() {\n if (!this.hasSecondarySlot) return;\n\n if (!this.didOpen) {\n /* the secondadry panel is not closing via hover,\n remove blur events, add focus back to originating button */\n if (!this.fromHover) {\n this.btn.removeEventListener('focusout', this.blur);\n this.secondaryDiv.removeEventListener('focusout', this.blur);\n }\n setTimeout(() => {\n if (!this.fromHover && !this.didBlur)\n this.btn.focus({ preventScroll: true });\n this.nanoClose.emit({ secondaryMenu: this.secondaryDiv });\n }, 50);\n } else {\n this.didBlur = false;\n\n /* the secondadry panel is not opening via hover,\n scroll content into view, focus on it and add blur events */\n if (!this.fromHover) {\n const panelio = new (window as any).IntersectionObserver(\n (data: IntersectionObserverEntry[]) => {\n if (data[0].boundingClientRect.top < 0) {\n this.secondaryDiv.scrollIntoView({\n behavior: 'smooth',\n });\n }\n panelio.disconnect();\n },\n { threshold: 1 }\n );\n panelio.observe(this.secondaryDiv);\n this.secondaryDiv.focus({ preventScroll: true });\n\n this.btn.addEventListener('focusout', this.blur);\n this.secondaryDiv.addEventListener('focusout', this.blur);\n window.addEventListener('blur', this.blur);\n\n this.el.tabIndex = -1;\n this.nanoOpen.emit({ secondaryMenu: this.secondaryDiv });\n }\n }\n }\n\n private closeSecondary = async () => {\n this.open = false;\n if (!this.hasSecondarySlot || !this.didOpen) return;\n\n this.nanoClosing.emit({ secondaryMenu: this.secondaryDiv });\n let status = await displayTransition(this.secondaryDiv, 'open', false);\n this.didOpen = status !== 'hidden';\n };\n\n private openSecondary = async () => {\n if (window.innerWidth < this.secondaryActiveWidth) {\n this.secondaryFallback.call(this);\n return;\n }\n this.open = true;\n if (!this.hasSecondarySlot || this.didOpen) return;\n\n this.nanoOpening.emit({ secondaryMenu: this.secondaryDiv });\n let status = await displayTransition(this.secondaryDiv, 'open', true);\n this.didOpen = status === 'shown';\n };\n\n private toggleSecondary = () => {\n if (!this.hasSecondarySlot) return;\n if (this.didOpen) this.closeSecondary();\n else this.openSecondary();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n // opens secondary panel when activated via hover\n if (this.href && !this.animating && this.hasSecondarySlot)\n this.openSecondary();\n this.nanoFocus.emit();\n };\n\n private handleHostBlur = () => {\n if (this.animating) return;\n\n // tab index is added to host when secondary panel opens\n // to return focus after secondary panel closes. Remove now if it was added\n this.el.removeAttribute('tabindex');\n this.hasFocus = false;\n this.nanoBlur.emit();\n };\n\n // direct host clicks to internal button\n private handleHostClick = (ev: MouseEvent) => {\n if (!this.hasAnchorEle) return;\n let foundlink = (ev.target as HTMLElement).closest('a, button');\n if (!foundlink) this.btn.click();\n };\n\n // handles secondary menu hover behaviour.\n private handleMouseEnter = async () => {\n if (\n !this.href ||\n this.animating ||\n !this.hasSecondarySlot ||\n (this.globalNavEle && !this.globalNavEle.classList.contains('ready'))\n )\n return;\n\n // if there are sibling secondary panels currently open,\n // we need to wait before opening otherwise we get unwanted overlapping\n let timeToWait = 0;\n if (getSiblings(this.el, '.secondary-open.has-secondary').length)\n timeToWait = 300;\n\n clearTimeout(this.waitHide);\n this.fromHover = true;\n this.animating = true;\n this.waitShow = window.setTimeout(\n async () => await this.openSecondary(),\n timeToWait\n );\n this.animating = false;\n };\n\n // handles secondary menu hover-out behaviour.\n private handleMouseLeave = () => {\n if (!this.href) return;\n clearTimeout(this.waitShow);\n this.fromHover = true;\n this.animating = true;\n\n // prevent closing immediately - makes navigating to items within more forgiving\n this.waitHide = window.setTimeout(\n async () => await this.closeSecondary(),\n 300\n );\n this.animating = false;\n };\n\n private handleClick = () => {\n this.fromHover = false;\n if (this.hasSecondarySlot) this.toggleSecondary();\n else this.el.querySelector<HTMLElement>('*')?.click();\n };\n\n // utility to traverse up, to see if element is nested within current nav-item\n private foundThisNavEle(el: HTMLElement): boolean {\n let found = el.closest('nano-nav-item');\n found = found === el ? el.parentElement.closest('nano-nav-item') : found;\n\n if (!found) return false;\n if (found === this.el) return true;\n return this.foundThisNavEle(found);\n }\n\n private blur = (ev: FocusEvent) => {\n if (!this.didOpen || this.animating) return;\n if (!this.closeOnBlur) return;\n\n // if event is associated with this element don't close\n if (ev && ev.relatedTarget) {\n if (\n ev.relatedTarget === this.el ||\n ev.relatedTarget === this.btn ||\n this.foundThisNavEle(ev.relatedTarget as HTMLElement)\n ) {\n this.secondaryDiv.focus({ preventScroll: true });\n return;\n }\n }\n\n this.btn.removeEventListener('focusout', this.blur);\n this.secondaryDiv.removeEventListener('focusout', this.blur);\n window.removeEventListener('blur', this.blur);\n\n this.didBlur = true;\n\n this.open = false;\n if (!ev.relatedTarget)\n setTimeout(() => {\n this.el.focus({ preventScroll: true });\n }, 50);\n };\n\n componentWillLoad() {\n let secondaryEle = this.el.querySelector('[slot=\"secondary\"]');\n this.hasSecondarySlot = !!secondaryEle;\n\n let link = getDirectChildren(this.el, 'a, button')[0] as\n | HTMLAnchorElement\n | HTMLButtonElement;\n this.hasAnchorEle = !!link;\n\n if (link) {\n this.href = (link as HTMLAnchorElement).href\n ? (link as HTMLAnchorElement).href\n : null;\n this.btn = link;\n if (this.hasSecondarySlot)\n this.btn.addEventListener('click', this.toggleSecondary);\n\n this.btn.addEventListener('focus', this.handleFocus);\n this.btn.addEventListener('blur', this.handleHostBlur);\n }\n }\n\n connectedCallback() {\n this.isInGlobalNav = false;\n this.isInMenuDrawer = false;\n this.globalNavEle = this.el.closest('nano-global-nav');\n\n this.isInMenuDrawer = !!this.el.closest('nano-menu-drawer');\n this.isInMenu = !!this.el.closest('nano-menu');\n this.isInGlobalNav =\n this.el.parentElement === this.globalNavEle ||\n !!this.el.closest('.global-nav');\n }\n\n render() {\n return (\n <Host\n class={{\n 'has-secondary': this.hasSecondarySlot,\n 'secondary-open': this.open,\n selected: this.selected,\n 'has-focus': this.hasFocus,\n disabled: this.disabled,\n 'nano-global-nav': this.isInGlobalNav,\n 'nano-menu-drawer': this.isInMenuDrawer,\n 'nano-menu': this.isInMenu,\n legacy: this.isLegacy,\n }}\n onBlur={this.handleHostBlur}\n dir={(this.el.ownerDocument as Document).dir === 'rtl' ? 'rtl' : null}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n onClick={this.handleHostClick}\n role=\"menuitem\"\n >\n <div\n class={{\n 'nav-item': true,\n 'secondary-open': this.open,\n selected: this.selected,\n }}\n >\n {this.href && !this.hasAnchorEle && !this.disabled && (\n <a\n target={this.target}\n ref={(a) => (this.btn = a)}\n href={this.href}\n onFocus={this.handleFocus}\n class={{\n notification: this.notification,\n }}\n >\n <slot name=\"icon-start\" />\n <span class=\"text\">\n <slot />\n </span>\n <slot name=\"icon-end\" />\n </a>\n )}\n {((!this.hasAnchorEle && !this.href) || this.disabled) && (\n <button\n ref={(btn) => (this.btn = btn)}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n disabled={this.disabled}\n class={{\n notification: this.notification,\n }}\n >\n <slot name=\"icon-start\" />\n <span class=\"text\">\n <slot />\n </span>\n <slot name=\"icon-end\" />\n </button>\n )}\n {this.hasAnchorEle && !this.disabled && (\n <div class=\"link\">\n <slot name=\"icon-start\" />\n <slot />\n <slot name=\"icon-end\" />\n </div>\n )}\n {this.hasSecondarySlot && !this.disabled && (\n <div\n class=\"secondary-menu\"\n ref={(div) => (this.secondaryDiv = div)}\n tabindex=\"-1\"\n >\n <div class=\"secondary-menu-content\">\n <slot name=\"secondary\" />\n </div>\n <div\n class=\"secondary-menu-mask\"\n onClick={this.closeSecondary}\n ></div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n","@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/layers';\n@import '../form-control/form-control';\n@import '../form-control/form-control-vars';\n\n:host {\n @include formControlVars;\n\n position: relative;\n width: 100%;\n padding: 0 !important;\n font-family: $font-family-base;\n display: block;\n}\n\n:host(.nano-color) {\n --input-border-style--focus: #{$input-border-style} var(--nano-color-tint, #{nano-color(primary, tint)});\n --multi-input-value-bg: var(--nano-color-tint-rgb);\n --multi-input-value-border: var(--nano-color-shade);\n --multi-input-value-text-color: var(--nano-color-contrast);\n\n color: current-color(base);\n}\n\n:host-context(nano-item:not(.item-label)) {\n --padding-start: 0;\n}\n\n:host([disabled]:not([disabled='false'])) {\n * {\n pointer-events: none !important;\n }\n}\n\nselect {\n display: none;\n}\n\n.select__native-input {\n @include border-radius(var(--input-border-radius));\n @include padding(0, var(--padding-end), 0, var(--padding-start));\n @include text-inherit();\n\n text-overflow: ellipsis;\n color: var(--input-text-color);\n display: inline-block;\n flex: 1;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n border: 0;\n outline: none;\n background: transparent;\n appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n cursor: default;\n line-height: 2.5em;\n min-height: 2.5em;\n\n .has-float-label & {\n line-height: 2.1em;\n min-height: 2.1em;\n padding-top: 1.4em;\n }\n\n &::selection {\n background: transparent;\n }\n\n &::-moz-selection {\n background: transparent;\n }\n\n &::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: var(--placeholder-font-style);\n font-weight: var(--placeholder-font-weight);\n opacity: var(--placeholder-opacity);\n line-height: inherit;\n min-height: inherit;\n }\n\n &::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n }\n\n &:-webkit-autofill {\n background-color: transparent;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n appearance: none;\n }\n\n &:invalid {\n box-shadow: none;\n }\n\n &::-ms-clear,\n &::-ms-reveal {\n display: none;\n }\n\n &.resizable {\n resize: vertical;\n overflow: auto;\n }\n\n .form-ctrl__textarea & {\n line-height: 1.5em;\n padding-top: var(--padding-top);\n padding-bottom: var(--padding-bottom);\n white-space: pre-wrap;\n\n &::placeholder {\n line-height: 1.5em;\n }\n }\n\n .has-float-label.textarea & {\n padding-top: 1.8em;\n }\n\n :host(.masked) & {\n opacity: 0;\n position: absolute;\n left: 0;\n top: 0;\n }\n}\n\n.select__mask {\n @include border-radius(var(--input-border-radius));\n @include padding(0, var(--padding-end), 0, var(--padding-start));\n @include text-inherit();\n\n pointer-events: none;\n line-height: 2.5em;\n min-height: 2.5em;\n}\n\n// multi stuff\n\n.select__multi {\n &-wrap {\n @include padding(\n 0,\n 0,\n calc(var(--padding-bottom) / 2),\n 0\n );\n\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n overflow: hidden;\n\n :host(.has-float-label) & {\n padding-top: 1.3em;\n }\n }\n\n &-input {\n @include text-inherit();\n @include padding(\n calc(var(--padding-top) / 2),\n var(--padding-end),\n 0,\n var(--padding-start)\n );\n\n min-width: 50px;\n width: 100%;\n max-height: 100%;\n appearance: none;\n border: 0;\n outline: none;\n display: inline-block;\n background: transparent;\n flex: 0;\n position: relative;\n min-height: calc(2.5em - var(--padding-top));\n box-sizing: border-box;\n\n :host(.legacy) & {\n box-sizing: content-box;\n }\n\n &:last-child {\n flex: 1;\n }\n }\n\n &-value {\n margin-top: 5px;\n margin-inline-start: var(--padding-start);\n margin-inline-end: -3px;\n background: rgba(var(--multi-input-value-bg), 0.8);\n color: var(--multi-input-value-text-color);\n border: 1px solid;\n border-color: var(--multi-input-value-border);\n padding: 0.2em 0.5em;\n line-height: 1;\n max-width: 100%;\n display: flex;\n align-items: center;\n font-size: var(--input-font-size);\n letter-spacing: 1px;\n\n span {\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n overflow: hidden;\n line-height: 1.2;\n }\n }\n\n &-value-remove {\n @include margin(0);\n @include background-position(center);\n @include padding(0, 0, 0, 0.5em);\n\n color: inherit;\n border: 0;\n outline: none;\n background-color: transparent;\n background-repeat: no-repeat;\n appearance: none;\n display: flex;\n align-items: center;\n top: 0;\n font-size: 1em;\n\n nano-icon {\n --color: var(--multi-input-value-text-color);\n }\n }\n}\n\n.form-ctrl__float-label {\n width: calc(100% - (1em + (var(--padding-start) * 2)));\n\n :host(.has-focus.has-multiple) & {\n transform: translateY(-110%);\n font-size: 0.8em;\n }\n\n :host(.has-value.has-multiple) & {\n transform: translateY(38%);\n top: 0;\n }\n}\n\n:host(.has-focus) select,\n:host(.has-focus) a,\n:host(.has-focus) button {\n pointer-events: auto;\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n VNode,\n Listen,\n} from '@stencil/core';\n\nimport {\n Color,\n SelectChangeEventDetail,\n InputChangeEventDetail,\n ControlValidityEventDetail,\n ControlValidity,\n} from '../../interface';\nimport {\n debounceEvent,\n createColorClasses,\n closestElement,\n raf,\n getActiveElement,\n debounce,\n} from '../../utils';\nimport type { Dropdown } from '../dropdown/dropdown';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\nimport { OptionInterface } from '../option/option-interface';\n\nlet selectIds = 0;\n\n/**\n * The select component is a wrapper to the HTML select element with custom styling and additional functionality.\n * It accepts most of the same properties as the HTML [select](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).\n * It's multi selection functionality is vastly improved from the native solution. It allows for the control of\n * value order through drag and drop or changing the insertion point with arrow keys. It also can allow for user defined values.\n *\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot down-arrow - use this to replace the default down arrow\n * @slot - default slot; nest `nano-option` elements\n */\n@Component({\n tag: 'nano-select',\n styleUrl: 'select.scss',\n scoped: true,\n})\nexport class Select implements ComponentInterface {\n private nativeSelect?: HTMLSelectElement;\n private valueItems: Array<HTMLSpanElement> = [];\n private dragVal: string;\n private mo?: MutationObserver;\n private selectId = `nano-select-${selectIds++}`;\n private rtl: boolean = false;\n private onInit: boolean = true;\n\n private get inputCtrl() {\n return this._inputCtrl;\n }\n private set inputCtrl(input) {\n if (input === this._inputCtrl) return;\n this._inputCtrl = input;\n this.setDataListOpts();\n }\n private _inputCtrl?: HTMLInputElement;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. Use get/set to set datalist options\n private _selectWrap: HTMLElement;\n private get selectWrap() {\n return this._selectWrap;\n }\n private set selectWrap(ele: HTMLElement) {\n if (this._selectWrap === ele) return;\n this._selectWrap = ele;\n this.setDataListOpts();\n }\n\n private _datalist: HTMLNanoDatalistElement;\n private get datalist() {\n return this._datalist;\n }\n private set datalist(ele: HTMLNanoDatalistElement) {\n if (this._datalist === ele) return;\n this._datalist = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.showInlineValidation = debounce(this.showInlineValidation, 50);\n }\n\n @State() currInsertIndex: number = -1;\n @State() showErrorMsg = false;\n @State() errorMessage: string = '';\n @State() hasFocus = false;\n @State() hasLabelSlot: boolean = false;\n @State() hasHelperSlot: boolean = false;\n @State() hasHelperEndSlot = false;\n @State() inputSearchVal: string = '';\n\n @Element() el!: HTMLNanoSelectElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set.\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeSelect) return '';\n return this.nativeSelect.validationMessage;\n }\n\n /**\n * The color to use from your application's color palette.\n * Default options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\n */\n @Prop() color?: Color;\n\n /**\n * This Boolean attribute lets you specify that a form control should have select focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the select.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn?: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively use the 'label' slot\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.selectId + '-name';\n\n /**\n * Instructional text that shows before the select has a value. Text set here will be placed inside the label when a value is set. If you don't want this behaviour just set the first option to have no value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * The initial size of the control.\n */\n @Prop() size?: number;\n\n /**\n * Maximum number of options that can be selected when multiple is true\n */\n @Prop() max?: number;\n\n /**\n * Minimum number of options that can be selected when multiple is true\n */\n @Prop() min?: number;\n\n /**\n * The form element to associate the select with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * in multiple mode, allow users to enter their own values\n */\n @Prop() allowCustomValues: boolean = false;\n\n /**\n * The value of the select.\n */\n @Prop()\n get value() {\n return this._value;\n }\n set value(val: string | string[]) {\n if (typeof val === 'string') {\n if (this.multiple) this._value = val.split(',');\n else this._value = val;\n } else if (Array.isArray(val)) {\n if (this.multiple) this._value = val;\n else this._value = val[0];\n }\n }\n private _value: Array<string> | string = this.multiple ? [] : '';\n\n /**\n * You can set options via js as an array of strings: `domElement.options = ['option 1', 'option 2']` or\n * objects `domElement.options = [{label: 'option 1', value: 'opt-1'}]`. See `nano-option` docs for all available properties.\n * Alternatively, you can nest `<nano-option>` elements within a `<nano-select>`\n * Regardless - reading `options` will return the current component options - slotted or otherwise\n */\n @Prop()\n get options(): Array<OptionInterface | string> {\n if (this._options.length) return this._options;\n\n if (!this.datalist || !this.datalist.activeOptions) return [];\n\n return this._eOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n }\n set options(opts: Array<OptionInterface | string>) {\n this._options = opts.map((opt) => {\n if (typeof opt === 'string') return { value: opt, label: opt };\n else return opt;\n });\n }\n private _options: OptionInterface[] = [];\n @State() _eOptions: OptionInterface[] = [];\n\n /**\n * If `true`, a clear icon will appear in the select when there is a value. Clicking it clears the select.\n */\n @Prop() clearSelect = false;\n\n /**\n * Hide the native select element and cover with a value 'mask'.\n * Enables a fluid nano-select width upon value change (if required). Doesn't work with multiple=\"true\".\n */\n @Prop() mask = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoSearchChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoSearchChange = debounceEvent(this.nanoSearchChange, this.debounce);\n }\n\n @Watch('required')\n @Watch('disabled')\n @Watch('min')\n @Watch('max')\n @Watch('readonly')\n protected shouldValidate() {\n if (this.onInit) return;\n if (this.invalid) this.showErrorMsg = this._invalid = false;\n\n this.customValidate();\n if (this.validateOn !== 'dirty') return;\n this.showInlineValidation();\n }\n\n /**\n * Update the native select element when the value changes\n */\n // eslint-disable-next-line @stencil/no-unused-watch\n @Watch('value')\n valueChanged() {\n if (this.onInit) {\n if (this.multiple) this.currInsertIndex = this.value.length - 1;\n return;\n }\n requestAnimationFrame(() => {\n this.shouldValidate();\n this.nanoChange.emit({ value: this.value });\n });\n }\n\n /** nano-dropdown config options you can pass to the nested dropdown component */\n @Prop({ mutable: true }) dropDownConfig?: Partial<Dropdown> = {};\n\n @Watch('dropDownConfig')\n setDataListOpts() {\n if (!this.datalist || !this.selectWrap) return;\n\n this.datalist.input = this.inputCtrl;\n\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n ...this.dropDownConfig,\n tetherTo: this.selectWrap,\n };\n }\n\n // Custom Events\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<SelectChangeEventDetail>;\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the select has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred on a multiple=\"true\" input\n */\n @Event() nanoSearchChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n // Public Methods\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) {\n this.customValidate();\n this.showInlineValidation();\n }\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeSelect.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-select`. Use this method instead of the global\n * `select.focus()`.\n */\n @Method()\n async setFocus() {\n if (!this.inputCtrl) return;\n this.inputCtrl.focus();\n setTimeout(() => this.inputCtrl.click(), 50);\n }\n\n /**\n * Returns the native `<select>` element used under the hood.\n */\n @Method()\n getSelectElement(): Promise<HTMLSelectElement> {\n return Promise.resolve(this.nativeSelect!);\n }\n\n /**\n * Invalidate the field and show a custom error message.\n * To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeSelect) {\n this.nativeSelect.setCustomValidity(message);\n this.showInlineValidation();\n }\n }\n\n /* Logic */\n\n private get valArray() {\n return typeof this.value === 'string'\n ? this.value.length\n ? [this.value]\n : []\n : this.value;\n }\n\n private isValidValues() {\n return this.valArray.find((val) =>\n (this.options as OptionInterface[]).find((opt) => opt.value === val)\n );\n }\n\n private customValidate = () => {\n this.nativeSelect.setCustomValidity('');\n\n // add custom validations 'cos html5 validations are a bit rubbish on selects\n if (this.required && !this.valArray.length) {\n this.nativeSelect.setCustomValidity('Please fill in this field.');\n return true;\n }\n if (\n this.valArray.length &&\n !this.allowCustomValues &&\n !this.isValidValues()\n ) {\n this.nativeSelect.setCustomValidity(\n 'Please choose an item from this field.'\n );\n return true;\n }\n if (this.max && this.valArray.length > this.max) {\n this.nativeSelect.setCustomValidity(\n `Only up to ${this.max} values are allowed.`\n );\n return true;\n }\n if (this.min && this.valArray.length < this.min) {\n this.nativeSelect.setCustomValidity(\n `You must select a minimum of ${this.min} values.`\n );\n return true;\n }\n return false;\n };\n\n private showInlineValidation = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n this._invalid = false;\n this.showErrorMsg = false;\n this.errorMessage = '';\n\n if (!this.nativeSelect.validity.valid) {\n this.errorMessage = this.nativeSelect.validationMessage;\n this._invalid = true;\n this.showErrorMsg = true;\n }\n this.nanoValidate.emit({\n isValid: !this.invalid,\n errorMessage: this.errorMessage,\n originalEvent: ev,\n });\n };\n\n private handleInvalid = (ev: Event) => {\n this._invalid = true;\n\n if (this.validateOn === 'submit') {\n this._invalid = this.showErrorMsg = this.customValidate();\n }\n if (this.showInlineError) ev.preventDefault();\n\n requestAnimationFrame(() => this.showInlineValidation(ev));\n };\n\n private setValue = (e: CustomEvent<HTMLNanoOptionElement>) => {\n e.preventDefault();\n\n if (!this.multiple) {\n this.value = e.detail.value;\n this.selectWrap.clientWidth; // force reflow\n this.inputCtrl.focus();\n return;\n }\n if (this.value && this.value.length && this.value.includes(e.detail.value))\n return;\n if (this.max && this.value.length === this.max) return;\n\n this.currInsertIndex++;\n this.value = [\n ...this.value.slice(0, this.currInsertIndex),\n e.detail.value,\n ...this.value.slice(this.currInsertIndex),\n ];\n this.inputSearchVal = '';\n // this.selectWrap.clientWidth; // force reflow\n };\n\n private removeValue = (toFind?: string) => {\n if (!this.multiple || !this.value.length) return;\n\n if (!toFind) toFind = this.value[this.value.length - 1];\n this.value = (this.value as Array<string>).filter((val) => val !== toFind);\n\n this.currInsertIndex--;\n // this.selectWrap.clientWidth; // force reflow\n this.setFocus();\n };\n\n private slotChangeObserver() {\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / helper content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]').length;\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n\n // breaking change introduced in v2. Rm in v3\n if (\n !!this.el.querySelector('select:not([class*=\"sc-nano-select\"]) option')\n ) {\n console.warn(\n 'nesting `<option>` elements was removed in v2. Please update your code to use `<nano-option>` elements instead.',\n this.el\n );\n }\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"legacy\"]')) {\n console.warn(\n 'The `legacy` slot has been removed. Please update your code',\n this.el\n );\n }\n }\n\n private getLabel(toFind: string) {\n let label = (this.options as OptionInterface[]).find((opt) => {\n return !opt.disabled && opt.value?.length && opt.value === toFind;\n });\n return label && label.label ? label.label : toFind;\n }\n\n /* Event handling */\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.clearSelectValue();\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n raf(() => {\n if (kev.key) {\n if (kev.key !== 'Tab') return;\n target = getActiveElement();\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private setOptions = () => {\n if (\n !this.datalist ||\n !this.datalist.activeOptions ||\n !this.datalist.activeOptions.length\n )\n return;\n\n this._eOptions = this.datalist.activeOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n };\n\n private handleDocumentKeyDown = (ev: KeyboardEvent) => {\n if (!this.multiple || !this.hasFocus) return;\n\n if (!this.inputSearchVal) {\n let rm: HTMLSpanElement;\n\n switch (ev.key) {\n case 'Backspace':\n if (this.inputCtrl.previousElementSibling)\n rm = this.inputCtrl.previousElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'Delete':\n if (this.inputCtrl.nextElementSibling)\n rm = this.inputCtrl.nextElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'ArrowLeft':\n case 'ArrowRight':\n if (!this.value.length) break;\n\n if (ev.key === 'ArrowLeft' && this.inputCtrl.previousSibling)\n this.currInsertIndex--;\n if (ev.key === 'ArrowRight' && this.inputCtrl.nextSibling)\n this.currInsertIndex++;\n\n setTimeout(() => {\n this.inputCtrl.focus();\n }, 20);\n ev.preventDefault();\n break;\n }\n }\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty' && !this.hasFocus)\n this.showInlineValidation();\n });\n this.nanoBlur.emit();\n\n if (!this.allowCustomValues && this.multiple) {\n this.inputSearchVal = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n }\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.nanoFocus.emit();\n };\n\n private clearSelectValue = (ev?: Event) => {\n if (this.clearSelect && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (this.multiple) {\n this.value = [];\n this.currInsertIndex = -1;\n } else this.value = '';\n\n this.inputCtrl.value = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n };\n\n private onClick = () => {\n this.setFocus();\n };\n\n /* Multi event handlers */\n\n private onDragStart = (ev: MouseEvent) => {\n let ele = ev.target as HTMLSpanElement;\n this.dragVal = ele.dataset.value;\n };\n\n private onDragEnd = (ev) => {\n this.dragVal = null;\n ev.preventDefault();\n };\n\n private onDragLeave = (ev: MouseEvent) => {\n let ele = ev.target as HTMLSpanElement;\n let spanVal: string =\n ele.dataset && ele.dataset.value ? ele.dataset.value : null;\n\n if (\n !spanVal ||\n this.dragVal === spanVal ||\n !this.value.includes(this.dragVal)\n ) {\n ev.preventDefault();\n return;\n }\n\n let to = this.value.indexOf(spanVal);\n let from = this.value.indexOf(this.dragVal);\n let tmpArr = this.value as Array<string>;\n let tmpVal = tmpArr[to];\n\n tmpArr[to] = tmpArr[from];\n tmpArr[from] = tmpVal;\n this.value = [...tmpArr];\n };\n\n private onMultiInput = (ev) => {\n this.inputSearchVal = ev.target.value.trim();\n this.nanoSearchChange.emit({ value: ev.target.value.trim() });\n };\n\n /* Stencil Component lifecycle hooks */\n\n connectedCallback() {\n this.debounceChanged();\n\n if (!Build.isBrowser) return;\n\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n\n disconnectedCallback() {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n\n if (!Build.isBrowser) return;\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.customValidate();\n this.setDataListOpts();\n raf(() => (this.onInit = false));\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const labelId = this.selectId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot\n ? this.selectId + '-moreId'\n : '';\n const helperEndId = this.hasHelperEndSlot ? this.selectId + '-helper' : '';\n\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n this.valueItems = [];\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: !!this.value.length || !!this.inputSearchVal.length,\n controlId: this.selectId,\n };\n\n const controlOptions = (({ readonly, disabled }) => ({\n readonly,\n disabled,\n clearControl: this.clearSelect,\n }))(this);\n\n return (\n <Host\n type={this.multiple ? 'select-multiple' : 'select-one'}\n aria-disabled={this.disabled ? 'true' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': !!this.value.length || !!this.inputSearchVal.length,\n 'has-focus': this.hasFocus,\n 'is-invalid': this.invalid,\n 'has-label': this.label !== null && !this.floatLabel,\n 'has-float-label': this.label !== null && this.floatLabel,\n rtl: this.rtl,\n 'has-multiple': this.multiple,\n 'has-clr-btn': this.clearSelect,\n masked: this.mask,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearSelectValue}\n control={this.el}\n ref={(el) => (this.selectWrap = el)}\n endValueSlot={\n <slot name=\"down-arrow\">\n <nano-icon slot=\"value-end\" name=\"light/chevron-down\" />\n </slot>\n }\n >\n {this.multiple && (\n <div class=\"select__multi-wrap select\">\n {this.multipleValues(labelId, moreId, helperEndId)}\n </div>\n )}\n {!this.multiple && [\n this.mask && (\n <div class=\"select__mask\">\n {this.getLabel(this.value as string)}\n </div>\n ),\n <input\n id={this.selectId}\n class=\"select__native-input\"\n ref={(input) => (this.inputCtrl = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n placeholder={this.placeholder}\n readOnly={true}\n required={this.required}\n value={this.getLabel(this.value as string)}\n onFocus={this.onFocus}\n />,\n ]}\n </FormControl>\n </FormControlWrap>\n {!this.readonly && !this.disabled && (\n <nano-datalist\n onNanoOptionsUpdated={this.setOptions}\n ref={(el) => (this.datalist = el)}\n selected={this.valArray}\n type={this.multiple ? 'selctMulti' : 'select'}\n onNanoSelect={this.setValue}\n onNanoDeselect={(e) => {\n e.preventDefault();\n this.removeValue(e.detail.value);\n }}\n options={this._options.length ? this._options : undefined}\n >\n {this.allowCustomValues && this.multiple && !!this.inputSearchVal && (\n <nano-option\n slot=\"list-top\"\n value={this.inputSearchVal}\n selected={false}\n label={this.inputSearchVal}\n onNanoSelect={() => this.inputCtrl.focus()}\n >\n <span slot=\"check-icon\"></span>\n Add '{this.inputSearchVal}'\n </nano-option>\n )}\n <slot />\n </nano-datalist>\n )}\n\n <select\n id={this.selectId + '-hidden'}\n class=\"select__native-ctrl\"\n ref={(select) => (this.nativeSelect = select)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n multiple={this.multiple}\n name={this.name}\n required={this.required}\n onInvalid={this.handleInvalid}\n >\n {this.allowCustomValues &&\n this.valArray.map((val) => {\n return (\n <option value={val} selected={true}>\n {val}\n </option>\n );\n })}\n {!this.allowCustomValues &&\n this.options.map((opt: OptionInterface) => {\n return (\n <option\n value={opt.value}\n selected={this.valArray.includes(opt.value)}\n disabled={opt.disabled}\n label={opt.label}\n >\n {this.valArray.includes(opt.value)}\n </option>\n );\n })}\n </select>\n </Host>\n );\n }\n\n private multipleValues(\n labelId: string,\n moreId: string,\n helperEndId: string\n ): VNode | (VNode | VNode[])[] {\n let input: VNode = (\n <input\n class=\"select__multi-input\"\n id={this.selectId}\n ref={(input) => (this.inputCtrl = input)}\n readOnly={this.readonly}\n disabled={this.disabled}\n autoFocus={this.autofocus}\n autocomplete=\"off\"\n onKeyDown={this.handleDocumentKeyDown}\n onInput={this.onMultiInput}\n value={this.inputSearchVal}\n onTouchStart={this.onClick}\n onMouseDown={this.onClick}\n onFocus={this.onFocus}\n placeholder={\n this.placeholder && !this.value.length ? this.placeholder : ''\n }\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n />\n );\n if (!this.value.length) return input;\n\n return (this.value as Array<string>).map((val, i) => {\n let toReturn: VNode | VNode[] = (\n <span\n onDragStart={this.onDragStart}\n onDragLeave={this.onDragLeave}\n onDragEnd={this.onDragEnd}\n onDragOver={(e) => e.preventDefault()}\n draggable\n data-value={val}\n ref={(span) => this.valueItems.push(span)}\n class=\"select__multi-value\"\n >\n <span>{this.getLabel(val)}</span>\n <button\n class=\"select__multi-value-remove\"\n type=\"button\"\n tabindex=\"-1\"\n onTouchEnd={() => {\n this.removeValue(val);\n }}\n onMouseUp={() => {\n this.removeValue(val);\n }}\n >\n <nano-icon name=\"light/times\"></nano-icon>\n </button>\n </span>\n );\n if (i === 0 && this.currInsertIndex < 0)\n toReturn = [input, toReturn as VNode];\n else if (i === this.currInsertIndex)\n toReturn = [toReturn as VNode, input];\n return toReturn;\n });\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- /*!
2
- * Web Components for Nanopore digital Web Apps
3
- */
4
- (function(){if(typeof window!=="object"){return}if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){if(!("isIntersecting"in window.IntersectionObserverEntry.prototype)){Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}})}return}var t=window.document;var i=[];var r=null;var n=null;function e(t){this.time=t.time;this.target=t.target;this.rootBounds=v(t.rootBounds);this.boundingClientRect=v(t.boundingClientRect);this.intersectionRect=v(t.intersectionRect||c());this.isIntersecting=!!t.intersectionRect;var i=this.boundingClientRect;var r=i.width*i.height;var n=this.intersectionRect;var e=n.width*n.height;if(r){this.intersectionRatio=Number((e/r).toFixed(4))}else{this.intersectionRatio=this.isIntersecting?1:0}}function u(t,i){var r=i||{};if(typeof t!="function"){throw new Error("callback must be a function")}if(r.root&&r.root.nodeType!=1){throw new Error("root must be an Element")}this._checkForIntersections=f(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT);this._callback=t;this._observationTargets=[];this._queuedEntries=[];this._rootMarginValues=this._parseRootMargin(r.rootMargin);this.thresholds=this._initThresholds(r.threshold);this.root=r.root||null;this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" ");this._monitoringDocuments=[];this._monitoringUnsubscribes=[]}u.prototype.THROTTLE_TIMEOUT=100;u.prototype.POLL_INTERVAL=null;u.prototype.USE_MUTATION_OBSERVER=true;u._setupCrossOriginUpdater=function(){if(!r){r=function(t,r){if(!t||!r){n=c()}else{n=w(t,r)}i.forEach((function(t){t._checkForIntersections()}))}}return r};u._resetCrossOriginUpdater=function(){r=null;n=null};u.prototype.observe=function(t){var i=this._observationTargets.some((function(i){return i.element==t}));if(i){return}if(!(t&&t.nodeType==1)){throw new Error("target must be an Element")}this._registerInstance();this._observationTargets.push({element:t,entry:null});this._monitorIntersections(t.ownerDocument);this._checkForIntersections()};u.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(i){return i.element!=t}));this._unmonitorIntersections(t.ownerDocument);if(this._observationTargets.length==0){this._unregisterInstance()}};u.prototype.disconnect=function(){this._observationTargets=[];this._unmonitorAllIntersections();this._unregisterInstance()};u.prototype.takeRecords=function(){var t=this._queuedEntries.slice();this._queuedEntries=[];return t};u.prototype._initThresholds=function(t){var i=t||[0];if(!Array.isArray(i))i=[i];return i.sort().filter((function(t,i,r){if(typeof t!="number"||isNaN(t)||t<0||t>1){throw new Error("threshold must be a number between 0 and 1 inclusively")}return t!==r[i-1]}))};u.prototype._parseRootMargin=function(t){var i=t||"0px";var r=i.split(/\s+/).map((function(t){var i=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!i){throw new Error("rootMargin must be specified in pixels or percent")}return{value:parseFloat(i[1]),unit:i[2]}}));r[1]=r[1]||r[0];r[2]=r[2]||r[0];r[3]=r[3]||r[1];return r};u.prototype._monitorIntersections=function(i){var r=i.defaultView;if(!r){return}if(this._monitoringDocuments.indexOf(i)!=-1){return}var n=this._checkForIntersections;var e=null;var u=null;if(this.POLL_INTERVAL){e=r.setInterval(n,this.POLL_INTERVAL)}else{h(r,"resize",n,true);h(i,"scroll",n,true);if(this.USE_MUTATION_OBSERVER&&"MutationObserver"in r){u=new r.MutationObserver(n);u.observe(i,{attributes:true,childList:true,characterData:true,subtree:true})}}this._monitoringDocuments.push(i);this._monitoringUnsubscribes.push((function(){var t=i.defaultView;if(t){if(e){t.clearInterval(e)}o(t,"resize",n,true)}o(i,"scroll",n,true);if(u){u.disconnect()}}));if(i!=(this.root&&this.root.ownerDocument||t)){var s=p(i);if(s){this._monitorIntersections(s.ownerDocument)}}};u.prototype._unmonitorIntersections=function(i){var r=this._monitoringDocuments.indexOf(i);if(r==-1){return}var n=this.root&&this.root.ownerDocument||t;var e=this._observationTargets.some((function(t){var r=t.element.ownerDocument;if(r==i){return true}while(r&&r!=n){var e=p(r);r=e&&e.ownerDocument;if(r==i){return true}}return false}));if(e){return}var u=this._monitoringUnsubscribes[r];this._monitoringDocuments.splice(r,1);this._monitoringUnsubscribes.splice(r,1);u();if(i!=n){var s=p(i);if(s){this._unmonitorIntersections(s.ownerDocument)}}};u.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0;this._monitoringUnsubscribes.length=0;for(var i=0;i<t.length;i++){t[i]()}};u.prototype._checkForIntersections=function(){if(!this.root&&r&&!n){return}var t=this._rootIsInDom();var i=t?this._getRootRect():c();this._observationTargets.forEach((function(n){var u=n.element;var f=l(u);var h=this._rootContainsTarget(u);var o=n.entry;var a=t&&h&&this._computeTargetAndRootIntersection(u,f,i);var c=n.entry=new e({time:s(),target:u,boundingClientRect:f,rootBounds:r&&!this.root?null:i,intersectionRect:a});if(!o){this._queuedEntries.push(c)}else if(t&&h){if(this._hasCrossedThreshold(o,c)){this._queuedEntries.push(c)}}else{if(o&&o.isIntersecting){this._queuedEntries.push(c)}}}),this);if(this._queuedEntries.length){this._callback(this.takeRecords(),this)}};u.prototype._computeTargetAndRootIntersection=function(i,e,u){if(window.getComputedStyle(i).display=="none")return;var s=e;var f=d(i);var h=false;while(!h&&f){var o=null;var c=f.nodeType==1?window.getComputedStyle(f):{};if(c.display=="none")return null;if(f==this.root||f.nodeType==9){h=true;if(f==this.root||f==t){if(r&&!this.root){if(!n||n.width==0&&n.height==0){f=null;o=null;s=null}else{o=n}}else{o=u}}else{var v=d(f);var b=v&&l(v);var p=v&&this._computeTargetAndRootIntersection(v,b,u);if(b&&p){f=v;o=w(b,p)}else{f=null;s=null}}}else{var m=f.ownerDocument;if(f!=m.body&&f!=m.documentElement&&c.overflow!="visible"){o=l(f)}}if(o){s=a(o,s)}if(!s)break;f=f&&d(f)}return s};u.prototype._getRootRect=function(){var i;if(this.root){i=l(this.root)}else{var r=t.documentElement;var n=t.body;i={top:0,left:0,right:r.clientWidth||n.clientWidth,width:r.clientWidth||n.clientWidth,bottom:r.clientHeight||n.clientHeight,height:r.clientHeight||n.clientHeight}}return this._expandRectByRootMargin(i)};u.prototype._expandRectByRootMargin=function(t){var i=this._rootMarginValues.map((function(i,r){return i.unit=="px"?i.value:i.value*(r%2?t.width:t.height)/100}));var r={top:t.top-i[0],right:t.right+i[1],bottom:t.bottom+i[2],left:t.left-i[3]};r.width=r.right-r.left;r.height=r.bottom-r.top;return r};u.prototype._hasCrossedThreshold=function(t,i){var r=t&&t.isIntersecting?t.intersectionRatio||0:-1;var n=i.isIntersecting?i.intersectionRatio||0:-1;if(r===n)return;for(var e=0;e<this.thresholds.length;e++){var u=this.thresholds[e];if(u==r||u==n||u<r!==u<n){return true}}};u.prototype._rootIsInDom=function(){return!this.root||b(t,this.root)};u.prototype._rootContainsTarget=function(i){return b(this.root||t,i)&&(!this.root||this.root.ownerDocument==i.ownerDocument)};u.prototype._registerInstance=function(){if(i.indexOf(this)<0){i.push(this)}};u.prototype._unregisterInstance=function(){var t=i.indexOf(this);if(t!=-1)i.splice(t,1)};function s(){return window.performance&&performance.now&&performance.now()}function f(t,i){var r=null;return function(){if(!r){r=setTimeout((function(){t();r=null}),i)}}}function h(t,i,r,n){if(typeof t.addEventListener=="function"){t.addEventListener(i,r,n||false)}else if(typeof t.attachEvent=="function"){t.attachEvent("on"+i,r)}}function o(t,i,r,n){if(typeof t.removeEventListener=="function"){t.removeEventListener(i,r,n||false)}else if(typeof t.detatchEvent=="function"){t.detatchEvent("on"+i,r)}}function a(t,i){var r=Math.max(t.top,i.top);var n=Math.min(t.bottom,i.bottom);var e=Math.max(t.left,i.left);var u=Math.min(t.right,i.right);var s=u-e;var f=n-r;return s>=0&&f>=0&&{top:r,bottom:n,left:e,right:u,width:s,height:f}||null}function l(t){var i;try{i=t.getBoundingClientRect()}catch(r){}if(!i)return c();if(!(i.width&&i.height)){i={top:i.top,right:i.right,bottom:i.bottom,left:i.left,width:i.right-i.left,height:i.bottom-i.top}}return i}function c(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function v(t){if(!t||"x"in t){return t}return{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function w(t,i){var r=i.top-t.top;var n=i.left-t.left;return{top:r,left:n,height:i.height,width:i.width,bottom:r+i.height,right:n+i.width}}function b(t,i){var r=i;while(r){if(r==t)return true;r=d(r)}return false}function d(i){var r=i.parentNode;if(i.nodeType==9&&i!=t){return p(i)}if(r&&r.nodeType==11&&r.host){return r.host}if(r&&r.assignedSlot){return r.assignedSlot.parentNode}return r}function p(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(i){return null}}window.IntersectionObserver=u;window.IntersectionObserverEntry=e})();
5
- //# sourceMappingURL=p-f9c7d961.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["node_modules/intersection-observer/intersection-observer.js"],"names":["window","IntersectionObserverEntry","prototype","Object","defineProperty","get","this","intersectionRatio","document","registry","crossOriginUpdater","crossOriginRect","entry","time","target","rootBounds","ensureDOMRect","boundingClientRect","intersectionRect","getEmptyRect","isIntersecting","targetRect","targetArea","width","height","intersectionArea","Number","toFixed","IntersectionObserver","callback","opt_options","options","Error","root","nodeType","_checkForIntersections","throttle","bind","THROTTLE_TIMEOUT","_callback","_observationTargets","_queuedEntries","_rootMarginValues","_parseRootMargin","rootMargin","thresholds","_initThresholds","threshold","map","margin","value","unit","join","_monitoringDocuments","_monitoringUnsubscribes","POLL_INTERVAL","USE_MUTATION_OBSERVER","_setupCrossOriginUpdater","convertFromParentRect","forEach","observer","_resetCrossOriginUpdater","observe","isTargetAlreadyObserved","some","item","element","_registerInstance","push","_monitorIntersections","ownerDocument","unobserve","filter","_unmonitorIntersections","length","_unregisterInstance","disconnect","_unmonitorAllIntersections","takeRecords","records","slice","opt_threshold","Array","isArray","sort","t","i","a","isNaN","opt_rootMargin","marginString","margins","split","parts","exec","parseFloat","doc","win","defaultView","indexOf","monitoringInterval","domObserver","setInterval","addEvent","MutationObserver","attributes","childList","characterData","subtree","clearInterval","removeEvent","frame","getFrameElement","index","rootDoc","hasDependentTargets","itemDoc","unsubscribe","splice","unsubscribes","rootIsInDom","_rootIsInDom","rootRect","_getRootRect","getBoundingClientRect","rootContainsTarget","_rootContainsTarget","oldEntry","_computeTargetAndRootIntersection","newEntry","now","_hasCrossedThreshold","getComputedStyle","display","parent","getParentNode","atRoot","parentRect","parentComputedStyle","frameRect","frameIntersect","body","documentElement","overflow","computeRectIntersection","html","top","left","right","clientWidth","bottom","clientHeight","_expandRectByRootMargin","rect","newRect","oldRatio","newRatio","containsDeep","performance","fn","timeout","timer","setTimeout","node","event","opt_useCapture","addEventListener","attachEvent","removeEventListener","detatchEvent","rect1","rect2","Math","max","min","el","err","y","x","parentBoundingRect","parentIntersectionRect","child","parentNode","host","assignedSlot","frameElement","e"],"mappings":";;;CAQC,WAID,UAAWA,SAAW,SAAU,CAC9B,OAKF,GAAI,yBAA0BA,QAC1B,8BAA+BA,QAC/B,sBAAuBA,OAAOC,0BAA0BC,UAAW,CAIrE,KAAM,mBAAoBF,OAAOC,0BAA0BC,WAAY,CACrEC,OAAOC,eAAeJ,OAAOC,0BAA0BC,UACrD,iBAAkB,CAClBG,IAAK,WACH,OAAOC,KAAKC,kBAAoB,KAItC,OAOF,IAAIC,EAAWR,OAAOQ,SAStB,IAAIC,EAAW,GAOf,IAAIC,EAAqB,KAMzB,IAAIC,EAAkB,KAStB,SAASV,EAA0BW,GACjCN,KAAKO,KAAOD,EAAMC,KAClBP,KAAKQ,OAASF,EAAME,OACpBR,KAAKS,WAAaC,EAAcJ,EAAMG,YACtCT,KAAKW,mBAAqBD,EAAcJ,EAAMK,oBAC9CX,KAAKY,iBAAmBF,EAAcJ,EAAMM,kBAAoBC,KAChEb,KAAKc,iBAAmBR,EAAMM,iBAG9B,IAAIG,EAAaf,KAAKW,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OAAOlD,EAAOkD,aAAaF,WAG7B,OAAOhD,EAST,SAAStB,EAAgBhB,GACvB,IACE,OAAOA,EAAIE,aAAeF,EAAIE,YAAYuF,cAAgB,KAC1D,MAAOC,GAEP,OAAO,MAMX1L,OAAO4B,qBAAuBA,EAC9B5B,OAAOC,0BAA4BA,GA18BnC","sourcesContent":["/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.\n *\n * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n */\n(function() {\n'use strict';\n\n// Exit early if we're not running in a browser.\nif (typeof window !== 'object') {\n return;\n}\n\n// Exit early if all IntersectionObserver and IntersectionObserverEntry\n// features are natively supported.\nif ('IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\n\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n Object.defineProperty(window.IntersectionObserverEntry.prototype,\n 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0;\n }\n });\n }\n return;\n}\n\n\n/**\n * A local reference to the document.\n */\nvar document = window.document;\n\n\n/**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observing a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\nvar registry = [];\n\n/**\n * The signal updater for cross-origin intersection. When not null, it means\n * that the polyfill is configured to work in a cross-origin mode.\n * @type {function(DOMRect|ClientRect, DOMRect|ClientRect)}\n */\nvar crossOriginUpdater = null;\n\n/**\n * The current cross-origin intersection. Only used in the cross-origin mode.\n * @type {DOMRect|ClientRect}\n */\nvar crossOriginRect = null;\n\n\n/**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\nfunction IntersectionObserverEntry(entry) {\n this.time = entry.time;\n this.target = entry.target;\n this.rootBounds = ensureDOMRect(entry.rootBounds);\n this.boundingClientRect = ensureDOMRect(entry.boundingClientRect);\n this.intersectionRect = ensureDOMRect(entry.intersectionRect || getEmptyRect());\n this.isIntersecting = !!entry.intersectionRect;\n\n // Calculates the intersection ratio.\n var targetRect = this.boundingClientRect;\n var targetArea = targetRect.width * targetRect.height;\n var intersectionRect = this.intersectionRect;\n var intersectionArea = intersectionRect.width * intersectionRect.height;\n\n // Sets intersection ratio.\n if (targetArea) {\n // Round the intersection ratio to avoid floating point math issues:\n // https://github.com/w3c/IntersectionObserver/issues/324\n this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));\n } else {\n // If area is zero and is intersecting, sets to 1, otherwise to 0\n this.intersectionRatio = this.isIntersecting ? 1 : 0;\n }\n}\n\n\n/**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n * changes have queued. The function is not invoked if the queue has\n * been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\nfunction IntersectionObserver(callback, opt_options) {\n\n var options = opt_options || {};\n\n if (typeof callback != 'function') {\n throw new Error('callback must be a function');\n }\n\n if (options.root && options.root.nodeType != 1) {\n throw new Error('root must be an Element');\n }\n\n // Binds and throttles `this._checkForIntersections`.\n this._checkForIntersections = throttle(\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);\n\n // Private properties.\n this._callback = callback;\n this._observationTargets = [];\n this._queuedEntries = [];\n this._rootMarginValues = this._parseRootMargin(options.rootMargin);\n\n // Public properties.\n this.thresholds = this._initThresholds(options.threshold);\n this.root = options.root || null;\n this.rootMargin = this._rootMarginValues.map(function(margin) {\n return margin.value + margin.unit;\n }).join(' ');\n\n /** @private @const {!Array<!Document>} */\n this._monitoringDocuments = [];\n /** @private @const {!Array<function()>} */\n this._monitoringUnsubscribes = [];\n}\n\n\n/**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\nIntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;\n\n\n/**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\nIntersectionObserver.prototype.POLL_INTERVAL = null;\n\n/**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\nIntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;\n\n\n/**\n * Sets up the polyfill in the cross-origin mode. The result is the\n * updater function that accepts two arguments: `boundingClientRect` and\n * `intersectionRect` - just as these fields would be available to the\n * parent via `IntersectionObserverEntry`. This function should be called\n * each time the iframe receives intersection information from the parent\n * window, e.g. via messaging.\n * @return {function(DOMRect|ClientRect, DOMRect|ClientRect)}\n */\nIntersectionObserver._setupCrossOriginUpdater = function() {\n if (!crossOriginUpdater) {\n /**\n * @param {DOMRect|ClientRect} boundingClientRect\n * @param {DOMRect|ClientRect} intersectionRect\n */\n crossOriginUpdater = function(boundingClientRect, intersectionRect) {\n if (!boundingClientRect || !intersectionRect) {\n crossOriginRect = getEmptyRect();\n } else {\n crossOriginRect = convertFromParentRect(boundingClientRect, intersectionRect);\n }\n registry.forEach(function(observer) {\n observer._checkForIntersections();\n });\n };\n }\n return crossOriginUpdater;\n};\n\n\n/**\n * Resets the cross-origin mode.\n */\nIntersectionObserver._resetCrossOriginUpdater = function() {\n crossOriginUpdater = null;\n crossOriginRect = null;\n};\n\n\n/**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.observe = function(target) {\n var isTargetAlreadyObserved = this._observationTargets.some(function(item) {\n return item.element == target;\n });\n\n if (isTargetAlreadyObserved) {\n return;\n }\n\n if (!(target && target.nodeType == 1)) {\n throw new Error('target must be an Element');\n }\n\n this._registerInstance();\n this._observationTargets.push({element: target, entry: null});\n this._monitorIntersections(target.ownerDocument);\n this._checkForIntersections();\n};\n\n\n/**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.unobserve = function(target) {\n this._observationTargets =\n this._observationTargets.filter(function(item) {\n return item.element != target;\n });\n this._unmonitorIntersections(target.ownerDocument);\n if (this._observationTargets.length == 0) {\n this._unregisterInstance();\n }\n};\n\n\n/**\n * Stops observing all target elements for intersection changes.\n */\nIntersectionObserver.prototype.disconnect = function() {\n this._observationTargets = [];\n this._unmonitorAllIntersections();\n this._unregisterInstance();\n};\n\n\n/**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\nIntersectionObserver.prototype.takeRecords = function() {\n var records = this._queuedEntries.slice();\n this._queuedEntries = [];\n return records;\n};\n\n\n/**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n * a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\nIntersectionObserver.prototype._initThresholds = function(opt_threshold) {\n var threshold = opt_threshold || [0];\n if (!Array.isArray(threshold)) threshold = [threshold];\n\n return threshold.sort().filter(function(t, i, a) {\n if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {\n throw new Error('threshold must be a number between 0 and 1 inclusively');\n }\n return t !== a[i - 1];\n });\n};\n\n\n/**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n * defaulting to '0px'.\n * @return {Array<Object>} An array of margin objects with the keys\n * value and unit.\n */\nIntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {\n var marginString = opt_rootMargin || '0px';\n var margins = marginString.split(/\\s+/).map(function(margin) {\n var parts = /^(-?\\d*\\.?\\d+)(px|%)$/.exec(margin);\n if (!parts) {\n throw new Error('rootMargin must be specified in pixels or percent');\n }\n return {value: parseFloat(parts[1]), unit: parts[2]};\n });\n\n // Handles shorthand.\n margins[1] = margins[1] || margins[0];\n margins[2] = margins[2] || margins[0];\n margins[3] = margins[3] || margins[1];\n\n return margins;\n};\n\n\n/**\n * Starts polling for intersection changes if the polling is not already\n * happening, and if the page's visibility state is visible.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._monitorIntersections = function(doc) {\n var win = doc.defaultView;\n if (!win) {\n // Already destroyed.\n return;\n }\n if (this._monitoringDocuments.indexOf(doc) != -1) {\n // Already monitoring.\n return;\n }\n\n // Private state for monitoring.\n var callback = this._checkForIntersections;\n var monitoringInterval = null;\n var domObserver = null;\n\n // If a poll interval is set, use polling instead of listening to\n // resize and scroll events or DOM mutations.\n if (this.POLL_INTERVAL) {\n monitoringInterval = win.setInterval(callback, this.POLL_INTERVAL);\n } else {\n addEvent(win, 'resize', callback, true);\n addEvent(doc, 'scroll', callback, true);\n if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in win) {\n domObserver = new win.MutationObserver(callback);\n domObserver.observe(doc, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n }\n }\n\n this._monitoringDocuments.push(doc);\n this._monitoringUnsubscribes.push(function() {\n // Get the window object again. When a friendly iframe is destroyed, it\n // will be null.\n var win = doc.defaultView;\n\n if (win) {\n if (monitoringInterval) {\n win.clearInterval(monitoringInterval);\n }\n removeEvent(win, 'resize', callback, true);\n }\n\n removeEvent(doc, 'scroll', callback, true);\n if (domObserver) {\n domObserver.disconnect();\n }\n });\n\n // Also monitor the parent.\n if (doc != (this.root && this.root.ownerDocument || document)) {\n var frame = getFrameElement(doc);\n if (frame) {\n this._monitorIntersections(frame.ownerDocument);\n }\n }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._unmonitorIntersections = function(doc) {\n var index = this._monitoringDocuments.indexOf(doc);\n if (index == -1) {\n return;\n }\n\n var rootDoc = (this.root && this.root.ownerDocument || document);\n\n // Check if any dependent targets are still remaining.\n var hasDependentTargets =\n this._observationTargets.some(function(item) {\n var itemDoc = item.element.ownerDocument;\n // Target is in this context.\n if (itemDoc == doc) {\n return true;\n }\n // Target is nested in this context.\n while (itemDoc && itemDoc != rootDoc) {\n var frame = getFrameElement(itemDoc);\n itemDoc = frame && frame.ownerDocument;\n if (itemDoc == doc) {\n return true;\n }\n }\n return false;\n });\n if (hasDependentTargets) {\n return;\n }\n\n // Unsubscribe.\n var unsubscribe = this._monitoringUnsubscribes[index];\n this._monitoringDocuments.splice(index, 1);\n this._monitoringUnsubscribes.splice(index, 1);\n unsubscribe();\n\n // Also unmonitor the parent.\n if (doc != rootDoc) {\n var frame = getFrameElement(doc);\n if (frame) {\n this._unmonitorIntersections(frame.ownerDocument);\n }\n }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @param {!Document} doc\n * @private\n */\nIntersectionObserver.prototype._unmonitorAllIntersections = function() {\n var unsubscribes = this._monitoringUnsubscribes.slice(0);\n this._monitoringDocuments.length = 0;\n this._monitoringUnsubscribes.length = 0;\n for (var i = 0; i < unsubscribes.length; i++) {\n unsubscribes[i]();\n }\n};\n\n\n/**\n * Scans each observation target for intersection changes and adds them\n * to the internal entries queue. If new entries are found, it\n * schedules the callback to be invoked.\n * @private\n */\nIntersectionObserver.prototype._checkForIntersections = function() {\n if (!this.root && crossOriginUpdater && !crossOriginRect) {\n // Cross origin monitoring, but no initial data available yet.\n return;\n }\n\n var rootIsInDom = this._rootIsInDom();\n var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();\n\n this._observationTargets.forEach(function(item) {\n var target = item.element;\n var targetRect = getBoundingClientRect(target);\n var rootContainsTarget = this._rootContainsTarget(target);\n var oldEntry = item.entry;\n var intersectionRect = rootIsInDom && rootContainsTarget &&\n this._computeTargetAndRootIntersection(target, targetRect, rootRect);\n\n var newEntry = item.entry = new IntersectionObserverEntry({\n time: now(),\n target: target,\n boundingClientRect: targetRect,\n rootBounds: crossOriginUpdater && !this.root ? null : rootRect,\n intersectionRect: intersectionRect\n });\n\n if (!oldEntry) {\n this._queuedEntries.push(newEntry);\n } else if (rootIsInDom && rootContainsTarget) {\n // If the new entry intersection ratio has crossed any of the\n // thresholds, add a new entry.\n if (this._hasCrossedThreshold(oldEntry, newEntry)) {\n this._queuedEntries.push(newEntry);\n }\n } else {\n // If the root is not in the DOM or target is not contained within\n // root but the previous entry for this target had an intersection,\n // add a new record indicating removal.\n if (oldEntry && oldEntry.isIntersecting) {\n this._queuedEntries.push(newEntry);\n }\n }\n }, this);\n\n if (this._queuedEntries.length) {\n this._callback(this.takeRecords(), this);\n }\n};\n\n\n/**\n * Accepts a target and root rect computes the intersection between then\n * following the algorithm in the spec.\n * TODO(philipwalton): at this time clip-path is not considered.\n * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo\n * @param {Element} target The target DOM element\n * @param {Object} targetRect The bounding rect of the target.\n * @param {Object} rootRect The bounding rect of the root after being\n * expanded by the rootMargin value.\n * @return {?Object} The final intersection rect object or undefined if no\n * intersection is found.\n * @private\n */\nIntersectionObserver.prototype._computeTargetAndRootIntersection =\n function(target, targetRect, rootRect) {\n // If the element isn't displayed, an intersection can't happen.\n if (window.getComputedStyle(target).display == 'none') return;\n\n var intersectionRect = targetRect;\n var parent = getParentNode(target);\n var atRoot = false;\n\n while (!atRoot && parent) {\n var parentRect = null;\n var parentComputedStyle = parent.nodeType == 1 ?\n window.getComputedStyle(parent) : {};\n\n // If the parent isn't displayed, an intersection can't happen.\n if (parentComputedStyle.display == 'none') return null;\n\n if (parent == this.root || parent.nodeType == /* DOCUMENT */ 9) {\n atRoot = true;\n if (parent == this.root || parent == document) {\n if (crossOriginUpdater && !this.root) {\n if (!crossOriginRect ||\n crossOriginRect.width == 0 && crossOriginRect.height == 0) {\n // A 0-size cross-origin intersection means no-intersection.\n parent = null;\n parentRect = null;\n intersectionRect = null;\n } else {\n parentRect = crossOriginRect;\n }\n } else {\n parentRect = rootRect;\n }\n } else {\n // Check if there's a frame that can be navigated to.\n var frame = getParentNode(parent);\n var frameRect = frame && getBoundingClientRect(frame);\n var frameIntersect =\n frame &&\n this._computeTargetAndRootIntersection(frame, frameRect, rootRect);\n if (frameRect && frameIntersect) {\n parent = frame;\n parentRect = convertFromParentRect(frameRect, frameIntersect);\n } else {\n parent = null;\n intersectionRect = null;\n }\n }\n } else {\n // If the element has a non-visible overflow, and it's not the <body>\n // or <html> element, update the intersection rect.\n // Note: <body> and <html> cannot be clipped to a rect that's not also\n // the document rect, so no need to compute a new intersection.\n var doc = parent.ownerDocument;\n if (parent != doc.body &&\n parent != doc.documentElement &&\n parentComputedStyle.overflow != 'visible') {\n parentRect = getBoundingClientRect(parent);\n }\n }\n\n // If either of the above conditionals set a new parentRect,\n // calculate new intersection data.\n if (parentRect) {\n intersectionRect = computeRectIntersection(parentRect, intersectionRect);\n }\n if (!intersectionRect) break;\n parent = parent && getParentNode(parent);\n }\n return intersectionRect;\n};\n\n\n/**\n * Returns the root rect after being expanded by the rootMargin value.\n * @return {ClientRect} The expanded root rect.\n * @private\n */\nIntersectionObserver.prototype._getRootRect = function() {\n var rootRect;\n if (this.root) {\n rootRect = getBoundingClientRect(this.root);\n } else {\n // Use <html>/<body> instead of window since scroll bars affect size.\n var html = document.documentElement;\n var body = document.body;\n rootRect = {\n top: 0,\n left: 0,\n right: html.clientWidth || body.clientWidth,\n width: html.clientWidth || body.clientWidth,\n bottom: html.clientHeight || body.clientHeight,\n height: html.clientHeight || body.clientHeight\n };\n }\n return this._expandRectByRootMargin(rootRect);\n};\n\n\n/**\n * Accepts a rect and expands it by the rootMargin value.\n * @param {DOMRect|ClientRect} rect The rect object to expand.\n * @return {ClientRect} The expanded rect.\n * @private\n */\nIntersectionObserver.prototype._expandRectByRootMargin = function(rect) {\n var margins = this._rootMarginValues.map(function(margin, i) {\n return margin.unit == 'px' ? margin.value :\n margin.value * (i % 2 ? rect.width : rect.height) / 100;\n });\n var newRect = {\n top: rect.top - margins[0],\n right: rect.right + margins[1],\n bottom: rect.bottom + margins[2],\n left: rect.left - margins[3]\n };\n newRect.width = newRect.right - newRect.left;\n newRect.height = newRect.bottom - newRect.top;\n\n return newRect;\n};\n\n\n/**\n * Accepts an old and new entry and returns true if at least one of the\n * threshold values has been crossed.\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\n * particular target element or null if no previous entry exists.\n * @param {IntersectionObserverEntry} newEntry The current entry for a\n * particular target element.\n * @return {boolean} Returns true if a any threshold has been crossed.\n * @private\n */\nIntersectionObserver.prototype._hasCrossedThreshold =\n function(oldEntry, newEntry) {\n\n // To make comparing easier, an entry that has a ratio of 0\n // but does not actually intersect is given a value of -1\n var oldRatio = oldEntry && oldEntry.isIntersecting ?\n oldEntry.intersectionRatio || 0 : -1;\n var newRatio = newEntry.isIntersecting ?\n newEntry.intersectionRatio || 0 : -1;\n\n // Ignore unchanged ratios\n if (oldRatio === newRatio) return;\n\n for (var i = 0; i < this.thresholds.length; i++) {\n var threshold = this.thresholds[i];\n\n // Return true if an entry matches a threshold or if the new ratio\n // and the old ratio are on the opposite sides of a threshold.\n if (threshold == oldRatio || threshold == newRatio ||\n threshold < oldRatio !== threshold < newRatio) {\n return true;\n }\n }\n};\n\n\n/**\n * Returns whether or not the root element is an element and is in the DOM.\n * @return {boolean} True if the root element is an element and is in the DOM.\n * @private\n */\nIntersectionObserver.prototype._rootIsInDom = function() {\n return !this.root || containsDeep(document, this.root);\n};\n\n\n/**\n * Returns whether or not the target element is a child of root.\n * @param {Element} target The target element to check.\n * @return {boolean} True if the target element is a child of root.\n * @private\n */\nIntersectionObserver.prototype._rootContainsTarget = function(target) {\n return containsDeep(this.root || document, target) &&\n (!this.root || this.root.ownerDocument == target.ownerDocument);\n};\n\n\n/**\n * Adds the instance to the global IntersectionObserver registry if it isn't\n * already present.\n * @private\n */\nIntersectionObserver.prototype._registerInstance = function() {\n if (registry.indexOf(this) < 0) {\n registry.push(this);\n }\n};\n\n\n/**\n * Removes the instance from the global IntersectionObserver registry.\n * @private\n */\nIntersectionObserver.prototype._unregisterInstance = function() {\n var index = registry.indexOf(this);\n if (index != -1) registry.splice(index, 1);\n};\n\n\n/**\n * Returns the result of the performance.now() method or null in browsers\n * that don't support the API.\n * @return {number} The elapsed time since the page was requested.\n */\nfunction now() {\n return window.performance && performance.now && performance.now();\n}\n\n\n/**\n * Throttles a function and delays its execution, so it's only called at most\n * once within a given time period.\n * @param {Function} fn The function to throttle.\n * @param {number} timeout The amount of time that must pass before the\n * function can be called again.\n * @return {Function} The throttled function.\n */\nfunction throttle(fn, timeout) {\n var timer = null;\n return function () {\n if (!timer) {\n timer = setTimeout(function() {\n fn();\n timer = null;\n }, timeout);\n }\n };\n}\n\n\n/**\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\n * @param {Node} node The DOM node to add the event handler to.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to add.\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\n * phase. Note: this only works in modern browsers.\n */\nfunction addEvent(node, event, fn, opt_useCapture) {\n if (typeof node.addEventListener == 'function') {\n node.addEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.attachEvent == 'function') {\n node.attachEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Removes a previously added event handler from a DOM node.\n * @param {Node} node The DOM node to remove the event handler from.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to remove.\n * @param {boolean} opt_useCapture If the event handler was added with this\n * flag set to true, it should be set to true here in order to remove it.\n */\nfunction removeEvent(node, event, fn, opt_useCapture) {\n if (typeof node.removeEventListener == 'function') {\n node.removeEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.detatchEvent == 'function') {\n node.detatchEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Returns the intersection between two rect objects.\n * @param {Object} rect1 The first rect.\n * @param {Object} rect2 The second rect.\n * @return {?Object|?ClientRect} The intersection rect or undefined if no\n * intersection is found.\n */\nfunction computeRectIntersection(rect1, rect2) {\n var top = Math.max(rect1.top, rect2.top);\n var bottom = Math.min(rect1.bottom, rect2.bottom);\n var left = Math.max(rect1.left, rect2.left);\n var right = Math.min(rect1.right, rect2.right);\n var width = right - left;\n var height = bottom - top;\n\n return (width >= 0 && height >= 0) && {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height\n } || null;\n}\n\n\n/**\n * Shims the native getBoundingClientRect for compatibility with older IE.\n * @param {Element} el The element whose bounding rect to get.\n * @return {DOMRect|ClientRect} The (possibly shimmed) rect of the element.\n */\nfunction getBoundingClientRect(el) {\n var rect;\n\n try {\n rect = el.getBoundingClientRect();\n } catch (err) {\n // Ignore Windows 7 IE11 \"Unspecified error\"\n // https://github.com/w3c/IntersectionObserver/pull/205\n }\n\n if (!rect) return getEmptyRect();\n\n // Older IE\n if (!(rect.width && rect.height)) {\n rect = {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n }\n return rect;\n}\n\n\n/**\n * Returns an empty rect object. An empty rect is returned when an element\n * is not in the DOM.\n * @return {ClientRect} The empty rect.\n */\nfunction getEmptyRect() {\n return {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n width: 0,\n height: 0\n };\n}\n\n\n/**\n * Ensure that the result has all of the necessary fields of the DOMRect.\n * Specifically this ensures that `x` and `y` fields are set.\n *\n * @param {?DOMRect|?ClientRect} rect\n * @return {?DOMRect}\n */\nfunction ensureDOMRect(rect) {\n // A `DOMRect` object has `x` and `y` fields.\n if (!rect || 'x' in rect) {\n return rect;\n }\n // A IE's `ClientRect` type does not have `x` and `y`. The same is the case\n // for internally calculated Rect objects. For the purposes of\n // `IntersectionObserver`, it's sufficient to simply mirror `left` and `top`\n // for these fields.\n return {\n top: rect.top,\n y: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n right: rect.right,\n width: rect.width,\n height: rect.height\n };\n}\n\n\n/**\n * Inverts the intersection and bounding rect from the parent (frame) BCR to\n * the local BCR space.\n * @param {DOMRect|ClientRect} parentBoundingRect The parent's bound client rect.\n * @param {DOMRect|ClientRect} parentIntersectionRect The parent's own intersection rect.\n * @return {ClientRect} The local root bounding rect for the parent's children.\n */\nfunction convertFromParentRect(parentBoundingRect, parentIntersectionRect) {\n var top = parentIntersectionRect.top - parentBoundingRect.top;\n var left = parentIntersectionRect.left - parentBoundingRect.left;\n return {\n top: top,\n left: left,\n height: parentIntersectionRect.height,\n width: parentIntersectionRect.width,\n bottom: top + parentIntersectionRect.height,\n right: left + parentIntersectionRect.width\n };\n}\n\n\n/**\n * Checks to see if a parent element contains a child element (including inside\n * shadow DOM).\n * @param {Node} parent The parent element.\n * @param {Node} child The child element.\n * @return {boolean} True if the parent node contains the child node.\n */\nfunction containsDeep(parent, child) {\n var node = child;\n while (node) {\n if (node == parent) return true;\n\n node = getParentNode(node);\n }\n return false;\n}\n\n\n/**\n * Gets the parent node of an element or its host element if the parent node\n * is a shadow root.\n * @param {Node} node The node whose parent to get.\n * @return {Node|null} The parent node or null if no parent exists.\n */\nfunction getParentNode(node) {\n var parent = node.parentNode;\n\n if (node.nodeType == /* DOCUMENT */ 9 && node != document) {\n // If this node is a document node, look for the embedding frame.\n return getFrameElement(node);\n }\n\n if (parent && parent.nodeType == 11 && parent.host) {\n // If the parent is a shadow root, return the host element.\n return parent.host;\n }\n\n if (parent && parent.assignedSlot) {\n // If the parent is distributed in a <slot>, return the parent of a slot.\n return parent.assignedSlot.parentNode;\n }\n\n return parent;\n}\n\n\n/**\n * Returns the embedding frame element, if any.\n * @param {!Document} doc\n * @return {!Element}\n */\nfunction getFrameElement(doc) {\n try {\n return doc.defaultView && doc.defaultView.frameElement || null;\n } catch (e) {\n // Ignore the error.\n return null;\n }\n}\n\n\n// Exposes the constructors globally.\nwindow.IntersectionObserver = IntersectionObserver;\nwindow.IntersectionObserverEntry = IntersectionObserverEntry;\n\n}());\n"]}
@@ -1,23 +0,0 @@
1
- /*!
2
- * Web Components for Nanopore digital Web Apps
3
- */
4
- import{r as t,c as i,h as s,e as n,g as h}from"./p-b5c33aff.js";import{i as e}from"./p-debd9efc.js";import{c as r,a}from"./p-69a3e911.js";var o=r((function(t){(function(i,s){if(t.exports){t.exports=s()}else{i.EvEmitter=s()}})(typeof window!="undefined"?window:a,(function(){function t(){}var i=t.prototype;i.on=function(t,i){if(!t||!i){return}var s=this._events=this._events||{};var n=s[t]=s[t]||[];if(n.indexOf(i)==-1){n.push(i)}return this};i.once=function(t,i){if(!t||!i){return}this.on(t,i);var s=this._onceEvents=this._onceEvents||{};var n=s[t]=s[t]||{};n[i]=true;return this};i.off=function(t,i){var s=this._events&&this._events[t];if(!s||!s.length){return}var n=s.indexOf(i);if(n!=-1){s.splice(n,1)}return this};i.emitEvent=function(t,i){var s=this._events&&this._events[t];if(!s||!s.length){return}s=s.slice(0);i=i||[];var n=this._onceEvents&&this._onceEvents[t];for(var h=0;h<s.length;h++){var e=s[h];var r=n&&n[e];if(r){this.off(t,e);delete n[e]}e.apply(this,i)}return this};i.allOff=function(){delete this._events;delete this._onceEvents};return t}))}));var f=r((function(t){
5
- /*!
6
- * getSize v2.0.3
7
- * measure size of elements
8
- * MIT license
9
- */
10
- (function(i,s){if(t.exports){t.exports=s()}else{i.getSize=s()}})(window,(function t(){function i(t){var i=parseFloat(t);var s=t.indexOf("%")==-1&&!isNaN(i);return s&&i}function s(){}var n=typeof console=="undefined"?s:function(t){console.error(t)};var h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];var e=h.length;function r(){var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var i=0;i<e;i++){var s=h[i];t[s]=0}return t}function a(t){var i=getComputedStyle(t);if(!i){n("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? "+"See https://bit.ly/getsizebug1")}return i}var o=false;var f;function u(){if(o){return}o=true;var t=document.createElement("div");t.style.width="200px";t.style.padding="1px 2px 3px 4px";t.style.borderStyle="solid";t.style.borderWidth="1px 2px 3px 4px";t.style.boxSizing="border-box";var s=document.body||document.documentElement;s.appendChild(t);var n=a(t);f=Math.round(i(n.width))==200;c.isBoxSizeOuter=f;s.removeChild(t)}function c(t){u();if(typeof t=="string"){t=document.querySelector(t)}if(!t||typeof t!="object"||!t.nodeType){return}var s=a(t);if(s.display=="none"){return r()}var n={};n.width=t.offsetWidth;n.height=t.offsetHeight;var o=n.isBorderBox=s.boxSizing=="border-box";for(var c=0;c<e;c++){var l=h[c];var v=s[l];var d=parseFloat(v);n[l]=!isNaN(d)?d:0}var p=n.paddingLeft+n.paddingRight;var y=n.paddingTop+n.paddingBottom;var g=n.marginLeft+n.marginRight;var b=n.marginTop+n.marginBottom;var w=n.borderLeftWidth+n.borderRightWidth;var m=n.borderTopWidth+n.borderBottomWidth;var k=o&&f;var x=i(s.width);if(x!==false){n.width=x+(k?0:p+w)}var M=i(s.height);if(M!==false){n.height=M+(k?0:y+m)}n.innerWidth=n.width-(p+w);n.innerHeight=n.height-(y+m);n.outerWidth=n.width+g;n.outerHeight=n.height+b;return n}return c}))}));var u=r((function(t){(function(i,s){if(t.exports){t.exports=s()}else{i.matchesSelector=s()}})(window,(function t(){var i=function(){var t=window.Element.prototype;if(t.matches){return"matches"}if(t.matchesSelector){return"matchesSelector"}var i=["webkit","moz","ms","o"];for(var s=0;s<i.length;s++){var n=i[s];var h=n+"MatchesSelector";if(t[h]){return h}}}();return function t(s,n){return s[i](n)}}))}));var c=r((function(t){(function(i,s){if(t.exports){t.exports=s(i,u)}else{i.fizzyUIUtils=s(i,i.matchesSelector)}})(window,(function t(i,s){var n={};n.extend=function(t,i){for(var s in i){t[s]=i[s]}return t};n.modulo=function(t,i){return(t%i+i)%i};var h=Array.prototype.slice;n.makeArray=function(t){if(Array.isArray(t)){return t}if(t===null||t===undefined){return[]}var i=typeof t=="object"&&typeof t.length=="number";if(i){return h.call(t)}return[t]};n.removeFrom=function(t,i){var s=t.indexOf(i);if(s!=-1){t.splice(s,1)}};n.getParent=function(t,i){while(t.parentNode&&t!=document.body){t=t.parentNode;if(s(t,i)){return t}}};n.getQueryElement=function(t){if(typeof t=="string"){return document.querySelector(t)}return t};n.handleEvent=function(t){var i="on"+t.type;if(this[i]){this[i](t)}};n.filterFindElements=function(t,i){t=n.makeArray(t);var h=[];t.forEach((function(t){if(!(t instanceof HTMLElement)){return}if(!i){h.push(t);return}if(s(t,i)){h.push(t)}var n=t.querySelectorAll(i);for(var e=0;e<n.length;e++){h.push(n[e])}}));return h};n.debounceMethod=function(t,i,s){s=s||100;var n=t.prototype[i];var h=i+"Timeout";t.prototype[i]=function(){var t=this[h];clearTimeout(t);var i=arguments;var e=this;this[h]=setTimeout((function(){n.apply(e,i);delete e[h]}),s)}};n.docReady=function(t){var i=document.readyState;if(i=="complete"||i=="interactive"){setTimeout(t)}else{document.addEventListener("DOMContentLoaded",t)}};n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,(function(t,i,s){return i+"-"+s})).toLowerCase()};var e=i.console;n.htmlInit=function(t,s){n.docReady((function(){var h=n.toDashed(s);var r="data-"+h;var a=document.querySelectorAll("["+r+"]");var o=document.querySelectorAll(".js-"+h);var f=n.makeArray(a).concat(n.makeArray(o));var u=r+"-options";var c=i.jQuery;f.forEach((function(i){var n=i.getAttribute(r)||i.getAttribute(u);var h;try{h=n&&JSON.parse(n)}catch(o){if(e){e.error("Error parsing "+r+" on "+i.className+": "+o)}return}var a=new t(i,h);if(c){c.data(i,s,a)}}))}))};return n}))}));function l(t,i){this.element=t;this.parent=i;this.create()}var v=l.prototype;v.create=function(){this.element.style.position="absolute";this.element.setAttribute("aria-hidden","true");this.x=0;this.shift=0;Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))};v.destroy=function(){this.unselect();this.element.style.position="";var t=this.parent.originSide;this.element.style[t]=""};v.getSize=function(){this.size=f(this.element)};v.setPosition=function(t){this.x=t;this.updateTarget();this.renderPosition(t)};v.updateTarget=v.setDefaultTarget=function(){var t=this.parent.originSide=="left"?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign};v.renderPosition=function(t){var i=this.parent.originSide;this.element.style[i]=this.parent.getPositionValue(t)};v.select=function(){this.element.classList.add("is-selected");this.element.removeAttribute("aria-hidden");Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.removeAttribute("tabindex")}))};v.unselect=function(){this.element.classList.remove("is-selected");this.element.setAttribute("aria-hidden","true");Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))};v.wrapShift=function(t){this.shift=t;this.renderPosition(this.x+this.parent.slideableWidth*t)};v.remove=function(){this.element.parentNode.removeChild(this.element)};function d(t){this.parent=t;this.isOriginLeft=t.originSide=="left";this.cells=[];this.outerWidth=0;this.height=0}var p=d.prototype;p.addCell=function(t){this.cells.push(t);this.outerWidth+=t.size.outerWidth;this.height=Math.max(t.size.outerHeight,this.height);if(this.cells.length==1){this.x=t.x;var i=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=t.size[i]}};p.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft";var i=this.getLastCell();var s=i?i.size[t]:0;var n=this.outerWidth-(this.firstMargin+s);this.target=this.x+this.firstMargin+n*this.parent.cellAlign};p.getLastCell=function(){return this.cells[this.cells.length-1]};p.select=function(){this.cells.forEach((function(t){t.select()}))};p.unselect=function(){this.cells.forEach((function(t){t.unselect()}))};p.getCellElements=function(){return this.cells.map((function(t){return t.element}))};const y={};y.startAnimation=function(){if(this.isAnimating){return}this.isAnimating=true;this.restingFrames=0;this.animate()};y.animate=function(){this.applyDragForce();this.applySelectedAttraction();var t=this.x;this.integratePhysics();this.positionSlider();this.settle(t);if(this.isAnimating){var i=this;requestAnimationFrame((function t(){i.animate()}))}};y.positionSlider=function(){var t=this.x;if(this.options.wrapAround&&this.cells.length>1){t=c.modulo(t,this.slideableWidth);t=t-this.slideableWidth;this.shiftWrapCells(t)}this.setTranslateX(t,this.isAnimating);this.dispatchScrollEvent()};y.setTranslateX=function(t,i){t+=this.cursorPosition;t=this.options.rightToLeft?-t:t;var s=this.getPositionValue(t);this.slider.style.transform=i?"translate3d("+s+",0,0)":"translateX("+s+")"};y.dispatchScrollEvent=function(){var t=this.slides[0];if(!t){return}var i=-this.x-t.target;var s=i/this.slidesWidth;this.dispatchEvent("scroll",null,[s,i])};y.positionSliderAtSelected=function(){if(!this.cells.length){return}this.x=-this.selectedSlide.target;this.velocity=0;this.positionSlider()};y.getPositionValue=function(t){if(this.options.percentPosition){return Math.round(t/this.size.innerWidth*1e4)*.01+"%"}else{return Math.round(t)+"px"}};y.settle=function(t){if(!this.isPointerDown&&Math.round(this.x*100)==Math.round(t*100)){this.restingFrames++}if(this.restingFrames>2){this.isAnimating=false;delete this.isFreeScrolling;this.positionSlider();this.dispatchEvent("settle",null,[this.selectedIndex])}};y.shiftWrapCells=function(t){var i=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,i,-1);var s=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,s,1)};y._shiftCells=function(t,i,s){for(var n=0;n<t.length;n++){var h=t[n];var e=i>0?s:0;h.wrapShift(e);i-=h.size.outerWidth}};y._unshiftCells=function(t){if(!t||!t.length){return}for(var i=0;i<t.length;i++){t[i].wrapShift(0)}};y.integratePhysics=function(){this.x+=this.velocity;this.velocity*=this.getFrictionFactor()};y.applyForce=function(t){this.velocity+=t};y.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]};y.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())};y.applyDragForce=function(){if(!this.isDraggable||!this.isPointerDown){return}var t=this.dragX-this.x;var i=t-this.velocity;this.applyForce(i)};y.applySelectedAttraction=function(){var t=this.isDraggable&&this.isPointerDown;if(t||this.isFreeScrolling||!this.slides.length){return}var i=this.selectedSlide.target*-1-this.x;var s=i*this.options.selectedAttraction;this.applyForce(s)};var g=window.getComputedStyle;var b=window.console;function w(t,i){t=c.makeArray(t);while(t.length){i.appendChild(t.shift())}}var m=0;var k={};function x(t,i){var s=c.getQueryElement(t);if(!s){if(b){b.error("Bad element for Flickity: "+(s||t))}return}this.element=s;if(this.element.flickityGUID){var n=k[this.element.flickityGUID];if(!k[this.element.flickityGUID])return;n.option(i);return n}this.options=c.extend({},this.constructor.defaults);this.option(i);this._create()}x.defaults={accessibility:true,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:true,percentPosition:true,resize:true,selectedAttraction:.025,setGallerySize:true};x.createMethods=[];var M=x.prototype;c.extend(M,o.prototype);M._create=function(){var t=this.guid=++m;this.element.flickityGUID=t;k[t]=this;this.selectedIndex=0;this.restingFrames=0;this.x=0;this.velocity=0;this.originSide=this.options.rightToLeft?"right":"left";this.viewport=document.createElement("div");this.viewport.className="flickity-viewport";this._createSlider();if(this.options.resize||this.options.watchCSS){window.addEventListener("resize",this)}for(var i in this.options.on){var s=this.options.on[i];this.on(i,s)}x.createMethods.forEach((function(t){this[t]()}),this);if(this.options.watchCSS){this.watchCSS()}else{this.activate()}};M.option=function(t){c.extend(this.options,t)};M.activate=function(){if(this.isActive){return}this.isActive=true;this.element.classList.add("flickity-enabled");if(this.options.rightToLeft){this.element.classList.add("flickity-rtl")}this.getSize();var t=this.element.children;w(t,this.slider);this.viewport.appendChild(this.slider);this.element.appendChild(this.viewport);this.reloadCells();if(this.options.accessibility){this.element.tabIndex=0;this.element.addEventListener("keydown",this)}this.emitEvent("activate");this.selectInitialIndex();this.isInitActivated=true;this.dispatchEvent("ready")};M._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider";t.style[this.originSide]=0;this.slider=t};M._filterFindCellElements=function(t){return c.filterFindElements(t,this.options.cellSelector)};M.reloadCells=function(){this.cells=this._makeCells(this.slider.getRootNode().host?this.slider.getRootNode().host.children:this.slider.children);this.positionCells();this._getWrapShiftCells();this.setGallerySize()};M._makeCells=function(t){var i=this._filterFindCellElements(t);var s=i.map((function(t){return new l(t,this)}),this);return s};M.getLastCell=function(){return this.cells[this.cells.length-1]};M.getLastSlide=function(){return this.slides[this.slides.length-1]};M.positionCells=function(){this._sizeCells(this.cells);this._positionCells(0)};M._positionCells=function(t){t=t||0;this.maxCellHeight=t?this.maxCellHeight||0:0;var i=0;if(t>0){var s=this.cells[t-1];i=s.x+s.size.outerWidth}var n=this.cells.length;for(var h=t;h<n;h++){var e=this.cells[h];e.setPosition(i);i+=e.size.outerWidth;this.maxCellHeight=Math.max(e.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i;this.updateSlides();this._containSlides();this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0};M._sizeCells=function(t){t.forEach((function(t){t.getSize()}))};M.updateSlides=function(){this.slides=[];if(!this.cells.length){return}var t=new d(this);this.slides.push(t);var i=this.originSide=="left";var s=i?"marginRight":"marginLeft";var n=this._getCanCellFit();this.cells.forEach((function(i,h){if(!t.cells.length){t.addCell(i);return}var e=t.outerWidth-t.firstMargin+(i.size.outerWidth-i.size[s]);if(n.call(this,h,e)){t.addCell(i)}else{t.updateTarget();t=new d(this);this.slides.push(t);t.addCell(i)}}),this);t.updateTarget();this.updateSelectedSlide()};M._getCanCellFit=function(){var t=this.options.groupCells;if(!t){return function(){return false}}else if(typeof t=="number"){var i=parseInt(t,10);return function(t){return t%i!==0}}var s=typeof t=="string"&&t.match(/^(\d+)%$/);var n=s?parseInt(s[1],10)/100:1;return function(t,i){return i<=(this.size.innerWidth+1)*n}};M._init=M.reposition=function(){this.positionCells();this.positionSliderAtSelected()};M.getSize=function(){this.size=f(this.element);this.setCellAlign();this.cursorPosition=this.size.innerWidth*this.cellAlign};var C={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};M.setCellAlign=function(){var t=C[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign};M.setGallerySize=function(){if(this.options.setGallerySize){var t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=t+"px"}};M._getWrapShiftCells=function(){if(!this.options.wrapAround){return}this._unshiftCells(this.beforeShiftCells);this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition;var i=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,i,-1);t=this.size.innerWidth-this.cursorPosition;this.afterShiftCells=this._getGapCells(t,0,1)};M._getGapCells=function(t,i,s){var n=[];while(t>0){var h=this.cells[i];if(!h){break}n.push(h);i+=s;t-=h.size.outerWidth}return n};M._containSlides=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length){return}var t=this.options.rightToLeft;var i=t?"marginRight":"marginLeft";var s=t?"marginLeft":"marginRight";var n=this.slideableWidth-this.getLastCell().size[s];var h=n<this.size.innerWidth;var e=this.cursorPosition+this.cells[0].size[i];var r=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((function(t){if(h){t.target=n*this.cellAlign}else{t.target=Math.max(t.target,e);t.target=Math.min(t.target,r)}}),this)};M.dispatchEvent=function(t,i,s){var n=i?[i].concat(s):s;this.emitEvent(t,n)};M.select=function(t,i,s){if(!this.isActive){return}t=parseInt(t,10);this._wrapSelect(t);if(this.options.wrapAround||i){t=c.modulo(t,this.slides.length)}if(!this.slides[t]){return}var n=this.selectedIndex;this.selectedIndex=t;this.updateSelectedSlide();if(s){this.positionSliderAtSelected()}else{this.startAnimation()}if(this.options.adaptiveHeight){this.setGallerySize()}this.dispatchEvent("select",null,[t]);if(t!=n){this.dispatchEvent("change",null,[t])}this.dispatchEvent("cellSelect")};M._wrapSelect=function(t){var i=this.slides.length;var s=this.options.wrapAround&&i>1;if(!s){return t}var n=c.modulo(t,i);var h=Math.abs(n-this.selectedIndex);var e=Math.abs(n+i-this.selectedIndex);var r=Math.abs(n-i-this.selectedIndex);if(!this.isDragSelect&&e<h){t+=i}else if(!this.isDragSelect&&r<h){t-=i}if(t<0){this.x-=this.slideableWidth}else if(t>=i){this.x+=this.slideableWidth}};M.previous=function(t,i){this.select(this.selectedIndex-1,t,i)};M.next=function(t,i){this.select(this.selectedIndex+1,t,i)};M.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];if(!t){return}this.unselectSelectedSlide();this.selectedSlide=t;t.select();this.selectedCells=t.cells;this.selectedElements=t.getCellElements();this.selectedCell=t.cells[0];this.selectedElement=this.selectedElements[0]};M.unselectSelectedSlide=function(){if(this.selectedSlide){this.selectedSlide.unselect()}};M.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated){this.select(this.selectedIndex,false,true);return}if(t&&typeof t=="string"){var i=this.queryCell(t);if(i){this.selectCell(t,false,true);return}}var s=0;if(t&&this.slides[t]){s=t}this.select(s,false,true)};M.selectCell=function(t,i,s){var n=this.queryCell(t);if(!n){return}var h=this.getCellSlideIndex(n);this.select(h,i,s)};M.getCellSlideIndex=function(t){for(var i=0;i<this.slides.length;i++){var s=this.slides[i];var n=s.cells.indexOf(t);if(n!=-1){return i}}};M.getCell=function(t){for(var i=0;i<this.cells.length;i++){var s=this.cells[i];if(s.element==t){return s}}};M.getCells=function(t){t=c.makeArray(t);var i=[];t.forEach((function(t){var s=this.getCell(t);if(s){i.push(s)}}),this);return i};M.getCellElements=function(){return this.cells.map((function(t){return t.element}))};M.getParentCell=function(t){var i=this.getCell(t);if(i){return i}t=c.getParent(t,".flickity-slider > *");return this.getCell(t)};M.getAdjacentCellElements=function(t,i){if(!t){return this.selectedSlide.getCellElements()}i=i===undefined?this.selectedIndex:i;var s=this.slides.length;if(1+t*2>=s){return this.getCellElements()}var n=[];for(var h=i-t;h<=i+t;h++){var e=this.options.wrapAround?c.modulo(h,s):h;var r=this.slides[e];if(r){n=n.concat(r.getCellElements())}}return n};M.queryCell=function(t){if(typeof t=="number"){return this.cells[t]}if(typeof t=="string"){if(t.match(/^[#\.]?[\d\/]/)){return}t=this.element.querySelector(t)}return this.getCell(t)};M.uiChange=function(){this.emitEvent("uiChange")};M.childUIPointerDown=function(t){if(t.type!="touchstart"){t.preventDefault()}this.focus()};M.onresize=function(){this.watchCSS();this.resize()};c.debounceMethod(x,"onresize",150);M.resize=function(){if(!this.isActive){return}this.getSize();if(this.options.wrapAround){this.x=c.modulo(this.x,this.slideableWidth)}this.positionCells();this._getWrapShiftCells();this.setGallerySize();this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,false,true)};M.watchCSS=function(){var t=this.options.watchCSS;if(!t){return}var i=g(this.element,":after").content;if(i.indexOf("flickity")!=-1){this.activate()}else{this.deactivate()}};M.onkeydown=function(t){var i=document.activeElement&&document.activeElement!=this.element;if(!this.options.accessibility||i){return}var s=x.keyboardHandlers[t.keyCode];if(s){s.call(this)}};x.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange();this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange();this[t]()}};M.focus=function(){var t=window.pageYOffset;this.element.focus({preventScroll:true});if(window.pageYOffset!=t){window.scrollTo(window.pageXOffset,t)}};M.deactivate=function(){if(!this.isActive){return}this.element.classList.remove("flickity-enabled");this.element.classList.remove("flickity-rtl");this.unselectSelectedSlide();this.cells.forEach((function(t){t.destroy()}));this.element.removeChild(this.viewport);w(this.slider.children,this.element);if(this.options.accessibility){this.element.removeAttribute("tabIndex");this.element.removeEventListener("keydown",this)}this.isActive=false;this.emitEvent("deactivate")};M.destroy=function(){this.deactivate();window.removeEventListener("resize",this);this.allOff();this.emitEvent("destroy");delete this.element.flickityGUID;delete k[this.guid]};c.extend(M,y);x.data=function(t){t=c.getQueryElement(t);var i=t&&t.flickityGUID;return i&&k[i]};c.htmlInit(x,"flickity");x.Cell=l;x.Slide=d;var S=r((function(t){
11
- /*!
12
- * Unipointer v2.4.0
13
- * base class for doing one thing with pointer event
14
- * MIT license
15
- */
16
- (function(i,s){if(t.exports){t.exports=s(i,o)}else{i.Unipointer=s(i,i.EvEmitter)}})(window,(function t(i,s){function n(){}function h(){}var e=h.prototype=Object.create(s.prototype);e.bindStartEvent=function(t){this._bindStartEvent(t,true)};e.unbindStartEvent=function(t){this._bindStartEvent(t,false)};e._bindStartEvent=function(t,s){s=s===undefined?true:s;var n=s?"addEventListener":"removeEventListener";var h="mousedown";if("ontouchstart"in i){h="touchstart"}else if(i.PointerEvent){h="pointerdown"}t[n](h,this)};e.handleEvent=function(t){var i="on"+t.type;if(this[i]){this[i](t)}};e.getTouch=function(t){for(var i=0;i<t.length;i++){var s=t[i];if(s.identifier==this.pointerIdentifier){return s}}};e.onmousedown=function(t){var i=t.button;if(i&&(i!==0&&i!==1)){return}this._pointerDown(t,t)};e.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])};e.onpointerdown=function(t){this._pointerDown(t,t)};e._pointerDown=function(t,i){if(t.button||this.isPointerDown){return}this.isPointerDown=true;this.pointerIdentifier=i.pointerId!==undefined?i.pointerId:i.identifier;this.pointerDown(t,i)};e.pointerDown=function(t,i){this._bindPostStartEvents(t);this.emitEvent("pointerDown",[t,i])};var r={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};e._bindPostStartEvents=function(t){if(!t){return}var s=r[t.type];s.forEach((function(t){i.addEventListener(t,this)}),this);this._boundPointerEvents=s};e._unbindPostStartEvents=function(){if(!this._boundPointerEvents){return}this._boundPointerEvents.forEach((function(t){i.removeEventListener(t,this)}),this);delete this._boundPointerEvents};e.onmousemove=function(t){this._pointerMove(t,t)};e.onpointermove=function(t){if(t.pointerId==this.pointerIdentifier){this._pointerMove(t,t)}};e.ontouchmove=function(t){var i=this.getTouch(t.changedTouches);if(i){this._pointerMove(t,i)}};e._pointerMove=function(t,i){this.pointerMove(t,i)};e.pointerMove=function(t,i){this.emitEvent("pointerMove",[t,i])};e.onmouseup=function(t){this._pointerUp(t,t)};e.onpointerup=function(t){if(t.pointerId==this.pointerIdentifier){this._pointerUp(t,t)}};e.ontouchend=function(t){var i=this.getTouch(t.changedTouches);if(i){this._pointerUp(t,i)}};e._pointerUp=function(t,i){this._pointerDone();this.pointerUp(t,i)};e.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i])};e._pointerDone=function(){this._pointerReset();this._unbindPostStartEvents();this.pointerDone()};e._pointerReset=function(){this.isPointerDown=false;delete this.pointerIdentifier};e.pointerDone=n;e.onpointercancel=function(t){if(t.pointerId==this.pointerIdentifier){this._pointerCancel(t,t)}};e.ontouchcancel=function(t){var i=this.getTouch(t.changedTouches);if(i){this._pointerCancel(t,i)}};e._pointerCancel=function(t,i){this._pointerDone();this.pointerCancel(t,i)};e.pointerCancel=function(t,i){this.emitEvent("pointerCancel",[t,i])};h.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}};return h}))}));var z=r((function(t){
17
- /*!
18
- * Unidragger v2.4.0
19
- * Draggable base class
20
- * MIT license
21
- */
22
- (function(i,s){if(t.exports){t.exports=s(i,S)}else{i.Unidragger=s(i,i.Unipointer)}})(window,(function t(i,s){function n(){}var h=n.prototype=Object.create(s.prototype);h.bindHandles=function(){this._bindHandles(true)};h.unbindHandles=function(){this._bindHandles(false)};h._bindHandles=function(t){t=t===undefined?true:t;var s=t?"addEventListener":"removeEventListener";var n=t?this._touchActionValue:"";for(var h=0;h<this.handles.length;h++){var e=this.handles[h];this._bindStartEvent(e,t);e[s]("click",this);if(i.PointerEvent){e.style.touchAction=n}}};h._touchActionValue="none";h.pointerDown=function(t,i){var s=this.okayPointerDown(t);if(!s){return}this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY};t.preventDefault();this.pointerDownBlur();this._bindPostStartEvents(t);this.emitEvent("pointerDown",[t,i])};var e={TEXTAREA:true,INPUT:true,SELECT:true,OPTION:true};var r={radio:true,checkbox:true,button:true,submit:true,image:true,file:true};h.okayPointerDown=function(t){var i=e[t.target.nodeName];var s=r[t.target.type];var n=!i||s;if(!n){this._pointerReset()}return n};h.pointerDownBlur=function(){var t=document.activeElement;var i=t&&t.blur&&t!=document.body;if(i){t.blur()}};h.pointerMove=function(t,i){var s=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,s]);this._dragMove(t,i,s)};h._dragPointerMove=function(t,i){var s={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};if(!this.isDragging&&this.hasDragStarted(s)){this._dragStart(t,i)}return s};h.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3};h.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]);this._dragPointerUp(t,i)};h._dragPointerUp=function(t,i){if(this.isDragging){this._dragEnd(t,i)}else{this._staticClick(t,i)}};h._dragStart=function(t,i){this.isDragging=true;this.isPreventingClicks=true;this.dragStart(t,i)};h.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])};h._dragMove=function(t,i,s){if(!this.isDragging){return}this.dragMove(t,i,s)};h.dragMove=function(t,i,s){t.preventDefault();this.emitEvent("dragMove",[t,i,s])};h._dragEnd=function(t,i){this.isDragging=false;setTimeout(function(){delete this.isPreventingClicks}.bind(this));this.dragEnd(t,i)};h.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])};h.onclick=function(t){if(this.isPreventingClicks){t.preventDefault()}};h._staticClick=function(t,i){if(this.isIgnoringMouseUp&&t.type=="mouseup"){return}this.staticClick(t,i);if(t.type!="mouseup"){this.isIgnoringMouseUp=true;setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)}};h.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])};n.getPointerPoint=s.getPointerPoint;return n}))}));c.extend(x.defaults,{draggable:">1",dragThreshold:3});x.createMethods.push("_createDrag");var L=x.prototype;c.extend(L,z.prototype);L._touchActionValue="pan-y";var T="createTouch"in document;var P=false;L._createDrag=function(){this.on("activate",this.onActivateDrag);this.on("uiChange",this._uiChangeDrag);this.on("deactivate",this.onDeactivateDrag);this.on("cellChange",this.updateDraggable);if(T&&!P){window.addEventListener("touchmove",(function(){}));P=true}};L.onActivateDrag=function(){this.handles=[this.viewport];this.bindHandles();this.updateDraggable()};L.onDeactivateDrag=function(){this.unbindHandles();this.element.classList.remove("is-draggable")};L.updateDraggable=function(){if(this.options.draggable==">1"){this.isDraggable=this.slides.length>1}else{this.isDraggable=this.options.draggable}if(this.isDraggable){this.element.classList.add("is-draggable")}else{this.element.classList.remove("is-draggable")}};L.bindDrag=function(){this.options.draggable=true;this.updateDraggable()};L.unbindDrag=function(){this.options.draggable=false;this.updateDraggable()};L._uiChangeDrag=function(){delete this.isFreeScrolling};L.pointerDown=function(t,i){if(!this.isDraggable){this._pointerDownDefault(t,i);return}var s=this.okayPointerDown(t);if(!s){return}this._pointerDownPreventDefault(t);this.pointerDownFocus(t);if(document.activeElement!=this.element){this.pointerDownBlur()}this.dragX=this.x;this.viewport.classList.add("is-pointer-down");this.pointerDownScroll=E();window.addEventListener("scroll",this);this._pointerDownDefault(t,i)};L._pointerDownDefault=function(t,i){this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY};this._bindPostStartEvents(t);this.dispatchEvent("pointerDown",t,[i])};var A={INPUT:true,TEXTAREA:true,SELECT:true};L.pointerDownFocus=function(t){var i=A[t.target.nodeName];if(!i){this.focus()}};L._pointerDownPreventDefault=function(t){var i=t.type=="touchstart";var s=t.pointerType=="touch";var n=A[t.target.nodeName];if(!i&&!s&&!n){t.preventDefault()}};L.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold};L.pointerUp=function(t,i){delete this.isTouchScrolling;this.viewport.classList.remove("is-pointer-down");this.dispatchEvent("pointerUp",t,[i]);this._dragPointerUp(t,i)};L.pointerDone=function(){window.removeEventListener("scroll",this);delete this.pointerDownScroll};L.dragStart=function(t,i){if(!this.isDraggable){return}this.dragStartPosition=this.x;this.startAnimation();window.removeEventListener("scroll",this);this.dispatchEvent("dragStart",t,[i])};L.pointerMove=function(t,i){var s=this._dragPointerMove(t,i);this.dispatchEvent("pointerMove",t,[i,s]);this._dragMove(t,i,s)};L.dragMove=function(t,i,s){if(!this.isDraggable){return}t.preventDefault();this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;if(this.options.wrapAround){s.x=s.x%this.slideableWidth}var h=this.dragStartPosition+s.x*n;if(!this.options.wrapAround&&this.slides.length){var e=Math.max(-this.slides[0].target,this.dragStartPosition);h=h>e?(h+e)*.5:h;var r=Math.min(-this.getLastSlide().target,this.dragStartPosition);h=h<r?(h+r)*.5:h}this.dragX=h;this.dragMoveTime=new Date;this.dispatchEvent("dragMove",t,[i,s])};L.dragEnd=function(t,i){if(!this.isDraggable){return}if(this.options.freeScroll){this.isFreeScrolling=true}var s=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target}else if(!this.options.freeScroll&&s==this.selectedIndex){s+=this.dragEndBoostSelect()}delete this.previousDragX;this.isDragSelect=this.options.wrapAround;this.select(s);delete this.isDragSelect;this.dispatchEvent("dragEnd",t,[i])};L.dragEndRestingSelect=function(){var t=this.getRestingPosition();var i=Math.abs(this.getSlideDistance(-t,this.selectedIndex));var s=this._getClosestResting(t,i,1);var n=this._getClosestResting(t,i,-1);var h=s.distance<n.distance?s.index:n.index;return h};L._getClosestResting=function(t,i,s){var n=this.selectedIndex;var h=Infinity;var e=this.options.contain&&!this.options.wrapAround?function(t,i){return t<=i}:function(t,i){return t<i};while(e(i,h)){n+=s;h=i;i=this.getSlideDistance(-t,n);if(i===null){break}i=Math.abs(i)}return{distance:h,index:n-s}};L.getSlideDistance=function(t,i){var s=this.slides.length;var n=this.options.wrapAround&&s>1;var h=n?c.modulo(i,s):i;var e=this.slides[h];if(!e){return null}var r=n?this.slideableWidth*Math.floor(i/s):0;return t-(e.target+r)};L.dragEndBoostSelect=function(){if(this.previousDragX===undefined||!this.dragMoveTime||new Date-this.dragMoveTime>100){return 0}var t=this.getSlideDistance(-this.dragX,this.selectedIndex);var i=this.previousDragX-this.dragX;if(t>0&&i>0){return 1}else if(t<0&&i<0){return-1}return 0};L.staticClick=function(t,i){var s=this.getParentCell(t.target);var n=s&&s.element;var h=s&&this.cells.indexOf(s);this.dispatchEvent("staticClick",t,[i,n,h])};L.onscroll=function(){var t=E();var i=this.pointerDownScroll.x-t.x;var s=this.pointerDownScroll.y-t.y;if(Math.abs(i)>3||Math.abs(s)>3){this._pointerDone()}};function E(){return{x:window.pageXOffset,y:window.pageYOffset}}var D="http://www.w3.org/2000/svg";function O(t,i){this.direction=t;this.parent=i;this.parentElement=this.parent.element.shadowRoot||this.parent.element;this._create()}O.prototype=Object.create(S.prototype);O.prototype._create=function(){this.isEnabled=true;this.isPrevious=this.direction==-1;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var i=this.element=document.createElement("button");i.className="flickity-button flickity-prev-next-button";i.className+=this.isPrevious?" previous":" next";i.setAttribute("type","button");this.disable();i.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var s=this.createSVG();i.appendChild(s);this.parent.on("select",this.update.bind(this));this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};O.prototype.activate=function(){this.bindStartEvent(this.element);this.element.addEventListener("click",this);this.parentElement.appendChild(this.element)};O.prototype.deactivate=function(){this.parentElement.removeChild(this.element);this.unbindStartEvent(this.element);this.element.removeEventListener("click",this)};O.prototype.createSVG=function(){var t=document.createElementNS(D,"svg");t.setAttribute("class","flickity-button-icon");t.setAttribute("viewBox","0 0 100 100");var i=document.createElementNS(D,"path");var s=j(this.parent.options.arrowShape);i.setAttribute("d",s);i.setAttribute("class","arrow");if(!this.isLeft){i.setAttribute("transform","translate(100, 100) rotate(180) ")}t.appendChild(i);return t};function j(t){if(typeof t=="string"){return t}return"M "+t.x0+",50"+" L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 "+" L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}O.prototype.handleEvent=c.handleEvent;O.prototype.onclick=function(){if(!this.isEnabled){return}this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()};O.prototype.enable=function(){if(this.isEnabled){return}this.element.disabled=false;this.isEnabled=true};O.prototype.disable=function(){if(!this.isEnabled){return}this.element.disabled=true;this.isEnabled=false};O.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1){this.enable();return}var i=t.length?t.length-1:0;var s=this.isPrevious?0:i;var n=this.parent.selectedIndex==s?"disable":"enable";this[n]()};O.prototype.destroy=function(){this.deactivate();this.allOff()};c.extend(x.defaults,{prevNextButtons:true,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}});x.createMethods.push("_createPrevNextButtons");var R=x.prototype;R._createPrevNextButtons=function(){if(!this.options.prevNextButtons){return}this.prevButton=new O(-1,this);this.nextButton=new O(1,this);this.on("activate",this.activatePrevNextButtons)};R.activatePrevNextButtons=function(){this.prevButton.activate();this.nextButton.activate();this.on("deactivate",this.deactivatePrevNextButtons)};R.deactivatePrevNextButtons=function(){this.prevButton.deactivate();this.nextButton.deactivate();this.off("deactivate",this.deactivatePrevNextButtons)};x.PrevNextButton=O;function N(t){this.parent=t;this.parentElement=this.parent.element.shadowRoot||this.parent.element;this._create()}N.prototype=Object.create(S.prototype);N.prototype._create=function(){this.holder=document.createElement("ol");this.holder.className="flickity-page-dots";this.dots=[];this.handleClick=this.onClick.bind(this);this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};N.prototype.activate=function(){this.setDots();this.holder.addEventListener("click",this.handleClick);this.bindStartEvent(this.holder);this.parentElement.appendChild(this.holder)};N.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick);this.unbindStartEvent(this.holder);this.parentElement.removeChild(this.holder)};N.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;if(t>0){this.addDots(t)}else if(t<0){this.removeDots(-t)}};N.prototype.addDots=function(t){var i=document.createDocumentFragment();var s=[];var n=this.dots.length;var h=n+t;for(var e=n;e<h;e++){var r=document.createElement("li");r.classList.add("dot");r.setAttribute("aria-label","Page dot "+(e+1));i.appendChild(r);s.push(r)}this.holder.appendChild(i);this.dots=this.dots.concat(s)};N.prototype.removeDots=function(t){var i=this.dots.splice(this.dots.length-t,t);i.forEach((function(t){this.holder.removeChild(t)}),this)};N.prototype.updateSelected=function(){if(this.selectedDot){this.selectedDot.classList.remove("is-selected");this.selectedDot.removeAttribute("aria-current")}if(!this.dots.length){return}this.selectedDot=this.dots[this.parent.selectedIndex];this.selectedDot.classList.add("is-selected");this.selectedDot.setAttribute("aria-current","step")};N.prototype.onTap=N.prototype.onClick=function(t){var i=t.target;if(i.nodeName!="LI"){return}this.parent.uiChange();var s=this.dots.indexOf(i);this.parent.select(s)};N.prototype.destroy=function(){this.deactivate();this.allOff()};x.PageDots=N;c.extend(x.defaults,{pageDots:true});x.createMethods.push("_createPageDots");var I=x.prototype;I._createPageDots=function(){if(!this.options.pageDots){return}this.pageDots=new N(this);this.on("activate",this.activatePageDots);this.on("select",this.updateSelectedPageDots);this.on("cellChange",this.updatePageDots);this.on("resize",this.updatePageDots);this.on("deactivate",this.deactivatePageDots)};I.activatePageDots=function(){this.pageDots.activate()};I.updateSelectedPageDots=function(){this.pageDots.updateSelected()};I.updatePageDots=function(){this.pageDots.setDots()};I.deactivatePageDots=function(){this.pageDots.deactivate()};x.PageDots=N;function B(t){this.parent=t;this.state="stopped";this.onVisibilityChange=this.visibilityChange.bind(this);this.onVisibilityPlay=this.visibilityPlay.bind(this)}B.prototype=Object.create(o.prototype);B.prototype.play=function(){if(this.state=="playing"){return}var t=document.hidden;if(t){document.addEventListener("visibilitychange",this.onVisibilityPlay);return}this.state="playing";document.addEventListener("visibilitychange",this.onVisibilityChange);this.tick()};B.prototype.tick=function(){if(this.state!="playing"){return}var t=this.parent.options.autoPlay;t=typeof t=="number"?t:3e3;var i=this;this.clear();this.timeout=setTimeout((function(){i.parent.next(true);i.tick()}),t)};B.prototype.stop=function(){this.state="stopped";this.clear();document.removeEventListener("visibilitychange",this.onVisibilityChange)};B.prototype.clear=function(){clearTimeout(this.timeout)};B.prototype.pause=function(){if(this.state=="playing"){this.state="paused";this.clear()}};B.prototype.unpause=function(){if(this.state=="paused"){this.play()}};B.prototype.visibilityChange=function(){var t=document.hidden;this[t?"pause":"unpause"]()};B.prototype.visibilityPlay=function(){this.play();document.removeEventListener("visibilitychange",this.onVisibilityPlay)};c.extend(x.defaults,{pauseAutoPlayOnHover:true});x.createMethods.push("_createPlayer");var F=x.prototype;F._createPlayer=function(){this.player=new B(this);this.on("activate",this.activatePlayer);this.on("uiChange",this.stopPlayer);this.on("pointerDown",this.stopPlayer);this.on("deactivate",this.deactivatePlayer)};F.activatePlayer=function(){if(!this.options.autoPlay){return}this.player.play();this.element.addEventListener("mouseenter",this)};F.playPlayer=function(){this.player.play()};F.stopPlayer=function(){this.player.stop()};F.pausePlayer=function(){this.player.pause()};F.unpausePlayer=function(){this.player.unpause()};F.deactivatePlayer=function(){this.player.stop();this.element.removeEventListener("mouseenter",this)};F.onmouseenter=function(){if(!this.options.pauseAutoPlayOnHover){return}this.player.pause();this.element.addEventListener("mouseleave",this)};F.onmouseleave=function(){this.player.unpause();this.element.removeEventListener("mouseleave",this)};x.Player=B;function H(t){var i=document.createDocumentFragment();t.forEach((function(t){i.appendChild(t.element)}));return i}var _=x.prototype;_.insert=function(t,i){var s=this._makeCells(t);if(!s||!s.length){return}var n=this.cells.length;i=i===undefined?n:i;var h=H(s);var e=i==n;if(e){this.slider.appendChild(h)}else{var r=this.cells[i].element;this.slider.insertBefore(h,r)}if(i===0){this.cells=s.concat(this.cells)}else if(e){this.cells=this.cells.concat(s)}else{var a=this.cells.splice(i,n-i);this.cells=this.cells.concat(s).concat(a)}this._sizeCells(s);this.cellChange(i,true)};_.append=function(t){this.insert(t,this.cells.length)};_.prepend=function(t){this.insert(t,0)};_.remove=function(t){var i=this.getCells(t);if(!i||!i.length){return}var s=this.cells.length-1;i.forEach((function(t){t.remove();var i=this.cells.indexOf(t);s=Math.min(i,s);c.removeFrom(this.cells,t)}),this);this.cellChange(s,true)};_.cellSizeChange=function(t){var i=this.getCell(t);if(!i){return}i.getSize();var s=this.cells.indexOf(i);this.cellChange(s)};_.cellChange=function(t,i){var s=this.selectedElement;this._positionCells(t);this._getWrapShiftCells();this.setGallerySize();var n=this.getCell(s);if(n){this.selectedIndex=this.getCellSlideIndex(n)}this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex);this.emitEvent("cellChange",[t]);this.select(this.selectedIndex);if(i){this.positionSliderAtSelected()}};x.createMethods.push("_createLazyload");var W=x.prototype;W._createLazyload=function(){this.on("select",this.lazyLoad)};W.lazyLoad=function(){var t=this.options.lazyLoad;if(!t){return}var i=typeof t=="number"?t:0;var s=this.getAdjacentCellElements(i);var n=[];s.forEach((function(t){var i=V(t);n=n.concat(i)}));n.forEach((function(t){new X(t,this)}),this)};function V(t){if(t.nodeName=="IMG"){var i=t.getAttribute("data-flickity-lazyload");var s=t.getAttribute("data-flickity-lazyload-src");var n=t.getAttribute("data-flickity-lazyload-srcset");if(i||s||n){return[t]}}var h="img[data-flickity-lazyload], "+"img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]";var e=t.querySelectorAll(h);return c.makeArray(e)}function X(t,i){this.img=t;this.flickity=i;this.load()}X.prototype.handleEvent=c.handleEvent;X.prototype.load=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src");var i=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t;if(i){this.img.setAttribute("srcset",i)}this.img.removeAttribute("data-flickity-lazyload");this.img.removeAttribute("data-flickity-lazyload-src");this.img.removeAttribute("data-flickity-lazyload-srcset")};X.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")};X.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")};X.prototype.complete=function(t,i){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this);var s=this.flickity.getParentCell(this.img);var n=s&&s.element;this.flickity.cellSizeChange(n);this.img.classList.add(i);this.flickity.dispatchEvent("lazyLoad",t,n)};x.LazyLoader=X;x.createMethods.push("_createFullscreen");var Z=x.prototype;Z._createFullscreen=function(){this.isFullscreen=false;if(!this.options.fullscreen){return}this.viewFullscreenButton=new Y("view",this);this.exitFullscreenButton=new Y("exit",this);this.on("activate",this._changeFullscreenActive);this.on("deactivate",this._changeFullscreenActive)};Z._changeFullscreenActive=function(){var t=this.isActive?"appendChild":"removeChild";this.element[t](this.viewFullscreenButton.element);this.element[t](this.exitFullscreenButton.element);var i=this.isActive?"activate":"deactivate";this.viewFullscreenButton[i]();this.exitFullscreenButton[i]()};Z.viewFullscreen=function(){this._changeFullscreen(true);this.focus()};Z.exitFullscreen=function(){this._changeFullscreen(false)};Z._changeFullscreen=function(t){if(this.isFullscreen==t){return}this.isFullscreen=t;var i=t?"add":"remove";document.documentElement.classList[i]("is-flickity-fullscreen");this.element.classList[i]("is-fullscreen");this.resize();if(this.isFullscreen){this.reposition()}this.dispatchEvent("fullscreenChange",null,[t])};Z.toggleFullscreen=function(){this._changeFullscreen(!this.isFullscreen)};var U=Z.setGallerySize;Z.setGallerySize=function(){if(!this.options.setGallerySize){return}if(this.isFullscreen){this.viewport.style.height=""}else{U.call(this)}};x.keyboardHandlers[27]=function(){this.exitFullscreen()};function Y(t,i){this.name=t;this.createButton();this.createIcon();this.onClick=function(){i[t+"Fullscreen"]()};this.clickHandler=this.onClick.bind(this)}Y.prototype.createButton=function(){var t=this.element=document.createElement("button");t.className="flickity-button flickity-fullscreen-button "+"flickity-fullscreen-button-"+this.name;t.setAttribute("type","button");var i=G(this.name+" full-screen");t.setAttribute("aria-label",i);t.title=i};function G(t){return t[0].toUpperCase()+t.slice(1)}var J="http://www.w3.org/2000/svg";var q={view:"M15,20,7,28h5v4H0V20H4v5l8-8Zm5-5,8-8v5h4V0H20V4h5l-8,8Z",exit:"M32,3l-7,7h5v4H18V2h4V7l7-7ZM3,32l7-7v5h4V18H2v4H7L0,29Z"};Y.prototype.createIcon=function(){var t=document.createElementNS(J,"svg");t.setAttribute("class","flickity-button-icon");t.setAttribute("viewBox","0 0 32 32");var i=document.createElementNS(J,"path");var s=q[this.name];i.setAttribute("d",s);t.appendChild(i);this.element.appendChild(t)};Y.prototype.activate=function(){this.element.addEventListener("click",this.clickHandler)};Y.prototype.deactivate=function(){this.element.removeEventListener("click",this.clickHandler)};x.FullscreenButton=Y;var Q=x.Slide;var $=Q.prototype.updateTarget;Q.prototype.updateTarget=function(){$.apply(this,arguments);if(!this.parent.options.fade){return}var t=this.target-this.x;var i=this.cells[0].x;this.cells.forEach((function(s){var n=s.x-i-t;s.renderPosition(n)}))};Q.prototype.setOpacity=function(t){this.cells.forEach((function(i){i.element.style.opacity=t}))};var K=x.prototype;x.createMethods.push("_createFade");K._createFade=function(){this.fadeIndex=this.selectedIndex;this.prevSelectedIndex=this.selectedIndex;this.on("select",this.onSelectFade);this.on("dragEnd",this.onDragEndFade);this.on("settle",this.onSettleFade);this.on("activate",this.onActivateFade);this.on("deactivate",this.onDeactivateFade)};var tt=K.updateSlides;K.updateSlides=function(){tt.apply(this,arguments);if(!this.options.fade){return}this.slides.forEach((function(t,i){var s=i==this.selectedIndex?1:0;t.setOpacity(s)}),this)};K.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1);this.prevSelectedIndex=this.selectedIndex};K.onSettleFade=function(){delete this.didDragEnd;if(!this.options.fade){return}this.selectedSlide.setOpacity(1);var t=this.slides[this.fadeIndex];if(t&&this.fadeIndex!=this.selectedIndex){this.slides[this.fadeIndex].setOpacity(0)}};K.onDragEndFade=function(){this.didDragEnd=true};K.onActivateFade=function(){if(this.options.fade){this.element.classList.add("is-fade")}};K.onDeactivateFade=function(){if(!this.options.fade){return}this.element.classList.remove("is-fade");this.slides.forEach((function(t){t.setOpacity("")}))};var it=K.positionSlider;K.positionSlider=function(){if(!this.options.fade){it.apply(this,arguments);return}this.fadeSlides();this.dispatchScrollEvent()};var st=K.positionSliderAtSelected;K.positionSliderAtSelected=function(){if(this.options.fade){this.setTranslateX(0)}st.apply(this,arguments)};K.fadeSlides=function(){if(this.slides.length<2){return}var t=this.getFadeIndexes();var i=this.slides[t.a];var s=this.slides[t.b];var n=this.wrapDifference(i.target,s.target);var h=this.wrapDifference(i.target,-this.x);h=h/n;i.setOpacity(1-h);s.setOpacity(h);var e=t.a;if(this.isDragging){e=h>.5?t.a:t.b}var r=this.fadeHideIndex!=undefined&&this.fadeHideIndex!=e&&this.fadeHideIndex!=t.a&&this.fadeHideIndex!=t.b;if(r){this.slides[this.fadeHideIndex].setOpacity(0)}this.fadeHideIndex=e};K.getFadeIndexes=function(){if(!this.isDragging&&!this.didDragEnd){return{a:this.fadeIndex,b:this.selectedIndex}}if(this.options.wrapAround){return this.getFadeDragWrapIndexes()}else{return this.getFadeDragLimitIndexes()}};K.getFadeDragWrapIndexes=function(){var t=this.slides.map((function(t,i){return this.getSlideDistance(-this.x,i)}),this);var i=t.map((function(t){return Math.abs(t)}));var s=Math.min.apply(Math,i);var n=i.indexOf(s);var h=t[n];var e=this.slides.length;var r=h>=0?1:-1;return{a:n,b:c.modulo(n+r,e)}};K.getFadeDragLimitIndexes=function(){var t=0;for(var i=0;i<this.slides.length-1;i++){var s=this.slides[i];if(-this.x<s.target){break}t=i}return{a:t,b:t+1}};K.wrapDifference=function(t,i){var s=i-t;if(!this.options.wrapAround){return s}var n=s+this.slideableWidth;var h=s-this.slideableWidth;if(Math.abs(n)<Math.abs(s)){s=n}if(Math.abs(h)<Math.abs(s)){s=h}return s};var nt=K._getWrapShiftCells;K._getWrapShiftCells=function(){if(!this.options.fade){nt.apply(this,arguments)}};var ht=K.shiftWrapCells;K.shiftWrapCells=function(){if(!this.options.fade){ht.apply(this,arguments)}};const et=x;const rt=":host{-webkit-box-sizing:border-box;box-sizing:border-box}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden]{display:none !important}:host{--dot-color:#ccc;--dot-color-active:var(--nano-color-primary, #007495);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:white;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:white;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:white;display:block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-transition:opacity 0.2s;transition:opacity 0.2s;opacity:0}:host([ready]){opacity:1}.slideshow{height:100%;position:relative}.flickity-container{height:0;opacity:0;-webkit-transition:opacity 0.2s;transition:opacity 0.2s}.flickity-container.slides-ready{height:100%}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;height:100%;width:100%;top:0;left:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;height:100% !important}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:none;-webkit-box-shadow:0 0 0 5px #19f;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.flickity-button-icon{fill:var(--navbtns-icon-color)}.flickity-button:disabled .flickity-button-icon{fill:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{top:50%;width:44px;height:44px;border-radius:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button .flickity-button-icon{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-page-dots{position:absolute;width:100%;bottom:10px;padding:0;margin:0;list-style:none;text-align:center;line-height:1;z-index:4}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;border-radius:50%;cursor:pointer;background:var(--dot-color)}.flickity-page-dots .dot.is-selected{opacity:1;background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.9);padding-bottom:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{bottom:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;right:10px;top:10px;width:24px;height:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{right:auto;left:10px}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;width:16px;height:16px;left:4px;top:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}";const at=!!document.head.attachShadow;let ot=class{constructor(s){t(this,s);this.nanoSlidesDidLoad=i(this,"nanoSlidesDidLoad",7);this.nanoSlidesReady=i(this,"nanoSlidesReady",7);this.nanoSlidesSelect=i(this,"nanoSlidesSelect",7);this.nanoSlidesChange=i(this,"nanoSlidesChange",7);this.nanoSlidesScroll=i(this,"nanoSlidesScroll",7);this.nanoSlidesTransitionEnd=i(this,"nanoSlidesTransitionEnd",7);this.nanoSlidesDragStart=i(this,"nanoSlidesDragStart",7);this.nanoSlidesDragMove=i(this,"nanoSlidesDragMove",7);this.nanoSlidesDragEnd=i(this,"nanoSlidesDragEnd",7);this.nanoSlidesTap=i(this,"nanoSlidesTap",7);this.nanoSlidesFullscreenChange=i(this,"nanoSlidesFullscreenChange",7);this.flickityReady=false;this.flickity=new Promise((t=>{this.readyflickity=t}));this.didInit=false;this.options={};this.navbtns=false;this.pager=false;this.fullscreenbtn=false;this.fullscreen=false;this.animation="scroll";this.currentSlide=0;this.autoplay=false;this.ready=false;this.parralax=async()=>{const t=await this.flickity;t.slides.forEach(((i,s)=>{let n=this.childrenEles[s];var h=(i.target+t.x)*-1/3;n.style["transform"]="translateX("+h+"px)"}))};this.handleFullscreen=t=>{this.fullscreen=t;this.nanoSlidesFullscreenChange.emit(t)};this.handleSlideSelect=t=>{this.iCurrentSlide=t;this.nanoSlidesSelect.emit(t)}}async optionsChanged(){if(this.flickityReady){const t=await this.getflickity();Object.assign(t.options,this.options);await this.update()}}async navbtnsChanged(){Array.from(this._getRoot().querySelectorAll(".flickity-prev-next-button")).forEach((t=>{t.hidden=!this.navbtns}))}async pagerChanged(){let t=this._getRoot().querySelector(".flickity-page-dots");t.hidden=!this.pager}async fullscreenBtnChanged(){let t=this._getRoot().querySelector(".flickity-fullscreen-button");t.hidden=!this.fullscreenbtn}async fullscreenChanged(t,i){const s=await this.getflickity();if(this.fullscreen)s.viewFullscreen();else if(typeof i!=="undefined")s.exitFullscreen()}async animationChange(t,i){const[s,n]=await Promise.all([this.getflickity(),ft(this.host)]);n.forEach((t=>{t.style["left"]=undefined}));if(i==="parallax"){s.off("scroll",this.parralax);n.forEach(((t,i)=>{if(this.childrenEles&&this.childrenEles[i])this.childrenEles[i].style["transform"]=undefined}));this.update()}switch(this.animation){case"fade":this.options={fade:true,percentPosition:true};break;case"parallax":this.options={fade:false,percentPosition:false};s.on("scroll",this.parralax);break;default:this.options={fade:false,percentPosition:true};break}}currentSlideChange(){if(this.currentSlide!==this.iCurrentSlide)this.slideTo(this.currentSlide)}internalSlideChange(){this.currentSlide=this.iCurrentSlide}async autoPlayChange(){await this.stopAutoplay();if(this.autoplay){if(typeof this.autoplay==="string")this.autoplay=parseInt(this.autoplay);if(this.autoplay>0)this.startAutoplay(this.autoplay)}}async update(){const[t]=await Promise.all([this.getflickity(),ft(this.host)]);this.childrenEles=this.host.querySelectorAll("nano-slide > *");t.reloadCells();t.resize();t.reposition()}async updateAutoHeight(t){const i=document.querySelector(".flickity-viewport");if(i)i.style.transition=t+"ms"}async slideTo(t,i){const s=await this.getflickity();s.select(t,i)}async slideNext(t,i){const s=await this.getflickity();s.next(i,t)}async slidePrev(t,i){const s=await this.getflickity();s.previous(t,i)}async getActiveIndex(){const t=await this.getflickity();return t.selectedIndex}async length(){const t=await this.getflickity();return t.slides.length}async isEnd(){const t=await this.getflickity();return t.selectedIndex===t.slides.length-1}async isBeginning(){const t=await this.getflickity();return t.selectedIndex===0}async startAutoplay(t){const i=await this.getflickity();if(t)this.options={autoPlay:t};setTimeout((()=>i.playPlayer()))}async stopAutoplay(){const t=await this.getflickity();t.stopPlayer()}async lockSwipes(t){const i=await this.getflickity();i.options.draggable=!t;i.updateDraggable()}async getflickity(){return this.flickity}async reload(){this.destroyflickity();setTimeout((()=>this.initflickity()),20)}_getRoot(){return this.host.shadowRoot?this.host.shadowRoot:this.host}_fixClassNames(){let t=this.slideShowEle.className.split(" ").filter((t=>t.match(/^sc-nano/)));let i=this._getRoot().querySelectorAll("*");if(!i)return;Array.from(i).map((i=>{t.map((t=>i.classList.add(t)))}))}destroyflickity(){const t=this.syncflickity;if(t!==undefined){t.destroy();this.flickity=new Promise((t=>{this.readyflickity=t}));this.flickityReady=false;this.syncflickity=undefined;this.ready=false}this.didInit=false}async initflickity(){const t=this.normalizeOptions();await ft(this.host);this.slidesReady=true;this.flickityEl=this.flickityEl||this._getRoot().querySelector(".flickity-container");if(this.flickityEl.classList.contains("flickity-enabled"))this.destroyflickity();setTimeout((()=>{let i=new et(this.flickityEl,t);this.flickityReady=true;if(!this.host.shadowRoot||!at)this._fixClassNames();this.syncflickity=i;this.animationChange();this.navbtnsChanged();this.pagerChanged();this.fullscreenChanged();this.fullscreenBtnChanged();this.readyflickity(i);this.ready=true;if(!this.host.getBoundingClientRect().height){const t=this.resizeO=new e((()=>{i.resize();this.resizeO.disconnect()}));t.observe(this.host)}}),100)}normalizeOptions(){const t={cellSelector:"nano-slide",contain:true,prevNextButtons:true,fullscreen:true,accessibility:true,imagesLoaded:true,pageDots:true};if(this.animation==="fade"){t.fade=true}if(this.currentSlide>0){t.initialIndex=this.currentSlide}if(this.autoplay){if(typeof this.autoplay==="string")this.autoplay=parseInt(this.autoplay);if(this.autoplay>0)t.autoPlay=this.autoplay}const i={ready:()=>{setTimeout((()=>{this.nanoSlidesReady.emit()}),20)},select:this.handleSlideSelect,change:this.nanoSlidesChange.emit,scroll:this.nanoSlidesScroll.emit,settle:this.nanoSlidesTransitionEnd.emit,dragStart:this.nanoSlidesDragStart.emit,dragMove:this.nanoSlidesDragMove.emit,dragEnd:this.nanoSlidesDragEnd.emit,staticClick:this.nanoSlidesTap.emit,fullscreenChange:this.handleFullscreen};const s=!!this.options&&!!this.options.on?this.options.on:{};const n={on:Object.assign(Object.assign({},s),i)};return Object.assign(Object.assign(Object.assign({},t),n),this.options)}componentDidLoad(){if(typeof window!=="undefined"&&window.MutationObserver){const t=this.mutationO=new MutationObserver((t=>{if(t[0].addedNodes[0]&&t[0].addedNodes[0].nodeName.toLowerCase()==="nano-slide"&&this.flickityReady){this.update()}}));t.observe(this.host,{childList:true,subtree:true})}}componentWillLoad(){this.nanoSlidesDidLoad.emit();if(!this.didInit){this.didInit=true;this.initflickity()}}disconnectedCallback(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}if(this.resizeO)this.resizeO.disconnect();this.destroyflickity()}render(){return s(n,null,s("div",{class:"slideshow",ref:t=>this.slideShowEle=t},s("div",{ref:t=>this.flickityEl=t,class:{"flickity-container":true,"slides-ready":this.slidesReady,"slides-not-ready":!this.slidesReady}},s("slot",null)),s("div",{class:"ui-extras"},s("slot",{name:"ui"}))))}get host(){return h(this)}static get watchers(){return{options:["optionsChanged"],navbtns:["navbtnsChanged"],pager:["pagerChanged"],fullscreenbtn:["fullscreenBtnChanged"],fullscreen:["fullscreenChanged"],animation:["animationChange"],currentSlide:["currentSlideChange"],iCurrentSlide:["internalSlideChange"],autoplay:["autoPlayChange"]}}};const ft=t=>{const i=Array.from(t.querySelectorAll("nano-slide"));let s=i.filter((t=>!t.ready));if(!s.length)return Promise.resolve(i);return new Promise((n=>{const h=e=>{s=s.filter((t=>t!==e.target));if(!s.length){n(i);t.removeEventListener("nanoSlideReady",h)}};t.addEventListener("nanoSlideReady",h);t.addEventListener("nanoslideready",h)}))};ot.style=rt;export{ot as nano_slides};
23
- //# sourceMappingURL=p-ffc2063a.entry.js.map