primevue 3.32.0 → 3.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/accordion/Accordion.d.ts +2 -2
  2. package/accordiontab/AccordionTab.d.ts +4 -3
  3. package/autocomplete/AutoComplete.d.ts +17 -7
  4. package/autocomplete/AutoComplete.vue +2 -2
  5. package/autocomplete/autocomplete.cjs.js +3 -2
  6. package/autocomplete/autocomplete.cjs.min.js +1 -1
  7. package/autocomplete/autocomplete.esm.js +3 -2
  8. package/autocomplete/autocomplete.esm.min.js +1 -1
  9. package/autocomplete/autocomplete.js +3 -2
  10. package/autocomplete/autocomplete.min.js +1 -1
  11. package/avatar/Avatar.d.ts +2 -2
  12. package/avatargroup/AvatarGroup.d.ts +2 -2
  13. package/badge/Badge.d.ts +2 -2
  14. package/badgedirective/BadgeDirective.d.ts +2 -1
  15. package/basecomponent/BaseComponent.vue +67 -12
  16. package/basecomponent/basecomponent.cjs.js +76 -22
  17. package/basecomponent/basecomponent.cjs.min.js +1 -1
  18. package/basecomponent/basecomponent.esm.js +76 -22
  19. package/basecomponent/basecomponent.esm.min.js +1 -1
  20. package/basecomponent/basecomponent.js +76 -22
  21. package/basecomponent/basecomponent.min.js +1 -1
  22. package/basedirective/basedirective.cjs.js +47 -7
  23. package/basedirective/basedirective.cjs.min.js +1 -1
  24. package/basedirective/basedirective.esm.js +47 -7
  25. package/basedirective/basedirective.esm.min.js +1 -1
  26. package/basedirective/basedirective.js +47 -7
  27. package/basedirective/basedirective.min.js +1 -1
  28. package/baseicon/BaseIcon.vue +44 -32
  29. package/baseicon/baseicon.cjs.js +19 -30
  30. package/baseicon/baseicon.cjs.min.js +1 -1
  31. package/baseicon/baseicon.esm.js +19 -30
  32. package/baseicon/baseicon.esm.min.js +1 -1
  33. package/baseicon/baseicon.js +20 -32
  34. package/baseicon/baseicon.min.js +1 -1
  35. package/blockui/BlockUI.d.ts +2 -2
  36. package/breadcrumb/Breadcrumb.d.ts +2 -2
  37. package/button/Button.d.ts +2 -2
  38. package/button/Button.vue +2 -2
  39. package/button/button.cjs.js +2 -2
  40. package/button/button.cjs.min.js +1 -1
  41. package/button/button.esm.js +2 -2
  42. package/button/button.esm.min.js +1 -1
  43. package/button/button.js +2 -2
  44. package/button/button.min.js +1 -1
  45. package/calendar/Calendar.d.ts +30 -6
  46. package/calendar/Calendar.vue +9 -8
  47. package/calendar/calendar.cjs.js +19 -10
  48. package/calendar/calendar.cjs.min.js +1 -1
  49. package/calendar/calendar.esm.js +19 -10
  50. package/calendar/calendar.esm.min.js +1 -1
  51. package/calendar/calendar.js +19 -10
  52. package/calendar/calendar.min.js +1 -1
  53. package/card/Card.d.ts +2 -2
  54. package/carousel/Carousel.d.ts +2 -2
  55. package/carousel/Carousel.vue +2 -1
  56. package/carousel/carousel.cjs.js +4 -3
  57. package/carousel/carousel.cjs.min.js +1 -1
  58. package/carousel/carousel.esm.js +4 -3
  59. package/carousel/carousel.esm.min.js +1 -1
  60. package/carousel/carousel.js +4 -3
  61. package/carousel/carousel.min.js +1 -1
  62. package/cascadeselect/CascadeSelect.d.ts +2 -2
  63. package/chart/Chart.d.ts +2 -2
  64. package/checkbox/Checkbox.d.ts +2 -2
  65. package/chip/Chip.d.ts +6 -4
  66. package/chips/Chips.d.ts +13 -4
  67. package/chips/Chips.vue +1 -1
  68. package/chips/chips.cjs.js +1 -0
  69. package/chips/chips.cjs.min.js +1 -1
  70. package/chips/chips.esm.js +1 -0
  71. package/chips/chips.esm.min.js +1 -1
  72. package/chips/chips.js +1 -0
  73. package/chips/chips.min.js +1 -1
  74. package/colorpicker/ColorPicker.d.ts +2 -2
  75. package/colorpicker/ColorPicker.vue +1 -40
  76. package/colorpicker/colorpicker.cjs.js +8 -47
  77. package/colorpicker/colorpicker.cjs.min.js +1 -1
  78. package/colorpicker/colorpicker.esm.js +8 -47
  79. package/colorpicker/colorpicker.esm.min.js +1 -1
  80. package/colorpicker/colorpicker.js +8 -47
  81. package/colorpicker/colorpicker.min.js +1 -1
  82. package/column/Column.d.ts +13 -10
  83. package/columngroup/ColumnGroup.d.ts +2 -2
  84. package/config/PrimeVue.d.ts +2 -2
  85. package/confirmdialog/ConfirmDialog.d.ts +3 -2
  86. package/confirmpopup/ConfirmPopup.d.ts +3 -2
  87. package/contextmenu/ContextMenu.d.ts +3 -2
  88. package/core/core.js +551 -489
  89. package/core/core.min.js +10 -10
  90. package/datatable/BodyCell.vue +2 -0
  91. package/datatable/DataTable.d.ts +4 -2
  92. package/datatable/DataTable.vue +45 -15
  93. package/datatable/TableBody.vue +1 -1
  94. package/datatable/datatable.cjs.js +119 -74
  95. package/datatable/datatable.cjs.min.js +1 -1
  96. package/datatable/datatable.esm.js +119 -74
  97. package/datatable/datatable.esm.min.js +1 -1
  98. package/datatable/datatable.js +119 -74
  99. package/datatable/datatable.min.js +1 -1
  100. package/dataview/DataView.d.ts +2 -2
  101. package/dataview/DataView.vue +2 -1
  102. package/dataview/dataview.cjs.js +4 -3
  103. package/dataview/dataview.cjs.min.js +1 -1
  104. package/dataview/dataview.esm.js +4 -3
  105. package/dataview/dataview.esm.min.js +1 -1
  106. package/dataview/dataview.js +4 -3
  107. package/dataview/dataview.min.js +1 -1
  108. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
  109. package/deferredcontent/DeferredContent.d.ts +2 -2
  110. package/dialog/Dialog.d.ts +13 -3
  111. package/dialog/Dialog.vue +10 -7
  112. package/dialog/dialog.cjs.js +13 -7
  113. package/dialog/dialog.cjs.min.js +1 -1
  114. package/dialog/dialog.esm.js +14 -8
  115. package/dialog/dialog.esm.min.js +1 -1
  116. package/dialog/dialog.js +13 -7
  117. package/dialog/dialog.min.js +1 -1
  118. package/divider/Divider.d.ts +2 -2
  119. package/dock/Dock.d.ts +2 -2
  120. package/dropdown/Dropdown.d.ts +21 -10
  121. package/dropdown/Dropdown.vue +9 -0
  122. package/dropdown/dropdown.cjs.js +8 -0
  123. package/dropdown/dropdown.cjs.min.js +1 -1
  124. package/dropdown/dropdown.esm.js +8 -0
  125. package/dropdown/dropdown.esm.min.js +1 -1
  126. package/dropdown/dropdown.js +8 -0
  127. package/dropdown/dropdown.min.js +1 -1
  128. package/editor/BaseEditor.vue +8 -6
  129. package/editor/Editor.d.ts +2 -2
  130. package/editor/editor.cjs.js +8 -6
  131. package/editor/editor.cjs.min.js +1 -1
  132. package/editor/editor.esm.js +8 -6
  133. package/editor/editor.esm.min.js +1 -1
  134. package/editor/editor.js +8 -6
  135. package/editor/editor.min.js +1 -1
  136. package/fieldset/Fieldset.d.ts +2 -2
  137. package/fileupload/FileUpload.d.ts +12 -7
  138. package/fileupload/FileUpload.vue +4 -0
  139. package/fileupload/fileupload.cjs.js +4 -0
  140. package/fileupload/fileupload.cjs.min.js +1 -1
  141. package/fileupload/fileupload.esm.js +4 -0
  142. package/fileupload/fileupload.esm.min.js +1 -1
  143. package/fileupload/fileupload.js +5 -2
  144. package/fileupload/fileupload.min.js +1 -1
  145. package/focustrap/FocusTrap.d.ts +2 -1
  146. package/galleria/Galleria.d.ts +2 -2
  147. package/galleria/GalleriaItem.vue +2 -2
  148. package/galleria/GalleriaThumbnails.vue +5 -1
  149. package/galleria/galleria.cjs.js +16 -7
  150. package/galleria/galleria.cjs.min.js +1 -1
  151. package/galleria/galleria.esm.js +16 -7
  152. package/galleria/galleria.esm.min.js +1 -1
  153. package/galleria/galleria.js +16 -7
  154. package/galleria/galleria.min.js +1 -1
  155. package/image/Image.d.ts +6 -4
  156. package/image/Image.vue +8 -6
  157. package/image/image.cjs.js +18 -5
  158. package/image/image.cjs.min.js +1 -1
  159. package/image/image.esm.js +19 -6
  160. package/image/image.esm.min.js +1 -1
  161. package/image/image.js +18 -5
  162. package/image/image.min.js +1 -1
  163. package/inlinemessage/InlineMessage.d.ts +2 -2
  164. package/inplace/Inplace.d.ts +2 -2
  165. package/inputmask/InputMask.d.ts +2 -2
  166. package/inputnumber/InputNumber.d.ts +2 -2
  167. package/inputnumber/InputNumber.vue +1 -0
  168. package/inputnumber/inputnumber.cjs.js +1 -0
  169. package/inputnumber/inputnumber.cjs.min.js +1 -1
  170. package/inputnumber/inputnumber.esm.js +1 -0
  171. package/inputnumber/inputnumber.esm.min.js +1 -1
  172. package/inputnumber/inputnumber.js +1 -0
  173. package/inputnumber/inputnumber.min.js +1 -1
  174. package/inputswitch/InputSwitch.d.ts +2 -2
  175. package/inputtext/InputText.d.ts +2 -2
  176. package/knob/Knob.d.ts +2 -2
  177. package/listbox/Listbox.d.ts +11 -5
  178. package/megamenu/MegaMenu.d.ts +3 -2
  179. package/menu/Menu.d.ts +2 -2
  180. package/menubar/Menubar.d.ts +3 -2
  181. package/message/BaseMessage.vue +5 -0
  182. package/message/Message.d.ts +4 -2
  183. package/message/message.cjs.js +1 -1
  184. package/message/message.cjs.min.js +1 -1
  185. package/message/message.esm.js +1 -1
  186. package/message/message.esm.min.js +1 -1
  187. package/message/message.js +1 -1
  188. package/message/message.min.js +1 -1
  189. package/multiselect/MultiSelect.d.ts +16 -6
  190. package/multiselect/MultiSelect.vue +1 -1
  191. package/multiselect/multiselect.cjs.js +1 -0
  192. package/multiselect/multiselect.cjs.min.js +1 -1
  193. package/multiselect/multiselect.esm.js +1 -0
  194. package/multiselect/multiselect.esm.min.js +1 -1
  195. package/multiselect/multiselect.js +1 -0
  196. package/multiselect/multiselect.min.js +1 -1
  197. package/orderlist/OrderList.d.ts +2 -2
  198. package/organizationchart/OrganizationChart.d.ts +2 -2
  199. package/overlaypanel/OverlayPanel.d.ts +2 -2
  200. package/package.json +9 -4
  201. package/paginator/Paginator.d.ts +2 -2
  202. package/panel/Panel.d.ts +3 -2
  203. package/panelmenu/PanelMenu.d.ts +3 -2
  204. package/passthrough/index.cjs.js +16 -60
  205. package/passthrough/index.cjs.min.js +1 -1
  206. package/passthrough/index.d.ts +0 -9
  207. package/passthrough/index.esm.js +16 -60
  208. package/passthrough/index.esm.min.js +1 -1
  209. package/passthrough/index.js +18 -59
  210. package/passthrough/index.min.js +1 -1
  211. package/passthrough/tailwind/index.cjs.js +365 -359
  212. package/passthrough/tailwind/index.cjs.min.js +1 -1
  213. package/passthrough/tailwind/index.d.ts +1 -2
  214. package/passthrough/tailwind/index.esm.js +365 -359
  215. package/passthrough/tailwind/index.esm.min.js +1 -1
  216. package/passthrough/tailwind/index.js +365 -359
  217. package/passthrough/tailwind/index.min.js +1 -1
  218. package/password/Password.d.ts +6 -4
  219. package/password/Password.vue +1 -0
  220. package/password/password.cjs.js +2 -1
  221. package/password/password.cjs.min.js +1 -1
  222. package/password/password.esm.js +2 -1
  223. package/password/password.esm.min.js +1 -1
  224. package/password/password.js +2 -1
  225. package/password/password.min.js +1 -1
  226. package/picklist/PickList.d.ts +2 -2
  227. package/picklist/PickList.vue +9 -7
  228. package/picklist/picklist.cjs.js +27 -9
  229. package/picklist/picklist.cjs.min.js +1 -1
  230. package/picklist/picklist.esm.js +27 -9
  231. package/picklist/picklist.esm.min.js +1 -1
  232. package/picklist/picklist.js +27 -9
  233. package/picklist/picklist.min.js +1 -1
  234. package/progressbar/ProgressBar.d.ts +2 -2
  235. package/progressspinner/ProgressSpinner.d.ts +2 -2
  236. package/radiobutton/RadioButton.d.ts +2 -2
  237. package/rating/Rating.d.ts +3 -2
  238. package/resources/themes/arya-blue/theme.css +4 -4
  239. package/resources/themes/arya-green/theme.css +4 -4
  240. package/resources/themes/arya-orange/theme.css +4 -4
  241. package/resources/themes/arya-purple/theme.css +4 -4
  242. package/resources/themes/bootstrap4-dark-blue/theme.css +8 -11
  243. package/resources/themes/bootstrap4-dark-purple/theme.css +8 -11
  244. package/resources/themes/bootstrap4-light-blue/theme.css +8 -11
  245. package/resources/themes/bootstrap4-light-purple/theme.css +8 -11
  246. package/resources/themes/fluent-light/theme.css +4 -4
  247. package/resources/themes/lara-dark-blue/theme.css +4 -4
  248. package/resources/themes/lara-dark-indigo/theme.css +4 -4
  249. package/resources/themes/lara-dark-purple/theme.css +4 -4
  250. package/resources/themes/lara-dark-teal/theme.css +4 -4
  251. package/resources/themes/lara-light-blue/theme.css +4 -4
  252. package/resources/themes/lara-light-indigo/theme.css +4 -4
  253. package/resources/themes/lara-light-purple/theme.css +4 -4
  254. package/resources/themes/lara-light-teal/theme.css +4 -4
  255. package/resources/themes/luna-amber/theme.css +4 -4
  256. package/resources/themes/luna-blue/theme.css +4 -4
  257. package/resources/themes/luna-green/theme.css +4 -4
  258. package/resources/themes/luna-pink/theme.css +4 -4
  259. package/resources/themes/md-dark-deeppurple/theme.css +4 -4
  260. package/resources/themes/md-dark-indigo/theme.css +4 -4
  261. package/resources/themes/md-light-deeppurple/theme.css +4 -4
  262. package/resources/themes/md-light-indigo/theme.css +4 -4
  263. package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
  264. package/resources/themes/mdc-dark-indigo/theme.css +4 -4
  265. package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
  266. package/resources/themes/mdc-light-indigo/theme.css +4 -4
  267. package/resources/themes/mira/theme.css +4 -4
  268. package/resources/themes/nano/theme.css +4 -4
  269. package/resources/themes/nova/theme.css +4 -4
  270. package/resources/themes/nova-accent/theme.css +4 -4
  271. package/resources/themes/nova-alt/theme.css +4 -4
  272. package/resources/themes/nova-vue/theme.css +4 -4
  273. package/resources/themes/rhea/theme.css +4 -4
  274. package/resources/themes/saga-blue/theme.css +4 -4
  275. package/resources/themes/saga-green/theme.css +4 -4
  276. package/resources/themes/saga-orange/theme.css +4 -4
  277. package/resources/themes/saga-purple/theme.css +4 -4
  278. package/resources/themes/soho-dark/theme.css +4 -4
  279. package/resources/themes/soho-light/theme.css +4 -4
  280. package/resources/themes/tailwind-light/theme.css +4 -4
  281. package/resources/themes/vela-blue/theme.css +4 -4
  282. package/resources/themes/vela-green/theme.css +4 -4
  283. package/resources/themes/vela-orange/theme.css +4 -4
  284. package/resources/themes/vela-purple/theme.css +4 -4
  285. package/resources/themes/viva-dark/theme.css +4 -4
  286. package/resources/themes/viva-light/theme.css +4 -4
  287. package/ripple/Ripple.d.ts +2 -1
  288. package/scrollpanel/ScrollPanel.d.ts +2 -2
  289. package/scrolltop/ScrollTop.d.ts +2 -2
  290. package/selectbutton/SelectButton.d.ts +6 -2
  291. package/selectbutton/SelectButton.vue +2 -1
  292. package/selectbutton/selectbutton.cjs.js +2 -1
  293. package/selectbutton/selectbutton.cjs.min.js +1 -1
  294. package/selectbutton/selectbutton.esm.js +2 -1
  295. package/selectbutton/selectbutton.esm.min.js +1 -1
  296. package/selectbutton/selectbutton.js +2 -1
  297. package/selectbutton/selectbutton.min.js +1 -1
  298. package/sidebar/Sidebar.d.ts +10 -4
  299. package/sidebar/Sidebar.vue +2 -2
  300. package/sidebar/sidebar.cjs.js +4 -2
  301. package/sidebar/sidebar.cjs.min.js +1 -1
  302. package/sidebar/sidebar.esm.js +5 -3
  303. package/sidebar/sidebar.esm.min.js +1 -1
  304. package/sidebar/sidebar.js +4 -2
  305. package/sidebar/sidebar.min.js +1 -1
  306. package/skeleton/Skeleton.d.ts +2 -2
  307. package/slider/Slider.d.ts +2 -2
  308. package/speeddial/SpeedDial.d.ts +9 -7
  309. package/speeddial/SpeedDial.vue +1 -1
  310. package/speeddial/speeddial.cjs.js +1 -1
  311. package/speeddial/speeddial.cjs.min.js +1 -1
  312. package/speeddial/speeddial.esm.js +1 -1
  313. package/speeddial/speeddial.esm.min.js +1 -1
  314. package/speeddial/speeddial.js +1 -1
  315. package/speeddial/speeddial.min.js +1 -1
  316. package/splitbutton/SplitButton.d.ts +4 -2
  317. package/splitter/Splitter.d.ts +2 -2
  318. package/splitterpanel/SplitterPanel.d.ts +2 -2
  319. package/steps/Steps.d.ts +2 -2
  320. package/styleclass/StyleClass.d.ts +2 -1
  321. package/tabmenu/TabMenu.d.ts +2 -2
  322. package/tabpanel/TabPanel.d.ts +2 -2
  323. package/tabview/TabView.d.ts +2 -2
  324. package/tag/Tag.d.ts +2 -2
  325. package/terminal/Terminal.d.ts +2 -2
  326. package/textarea/Textarea.d.ts +2 -2
  327. package/tieredmenu/TieredMenu.d.ts +3 -2
  328. package/timeline/Timeline.d.ts +2 -2
  329. package/toast/BaseToast.vue +2 -0
  330. package/toast/Toast.d.ts +16 -4
  331. package/toast/toast.cjs.js +1 -1
  332. package/toast/toast.cjs.min.js +1 -1
  333. package/toast/toast.esm.js +1 -1
  334. package/toast/toast.esm.min.js +1 -1
  335. package/toast/toast.js +1 -1
  336. package/toast/toast.min.js +1 -1
  337. package/togglebutton/ToggleButton.d.ts +3 -2
  338. package/toolbar/Toolbar.d.ts +2 -2
  339. package/tooltip/Tooltip.d.ts +2 -1
  340. package/tree/Tree.d.ts +6 -2
  341. package/treeselect/TreeSelect.d.ts +3 -2
  342. package/treetable/TreeTable.d.ts +3 -2
  343. package/treetable/TreeTable.vue +4 -2
  344. package/treetable/treetable.cjs.js +6 -5
  345. package/treetable/treetable.cjs.min.js +1 -1
  346. package/treetable/treetable.esm.js +6 -5
  347. package/treetable/treetable.esm.min.js +1 -1
  348. package/treetable/treetable.js +6 -5
  349. package/treetable/treetable.min.js +1 -1
  350. package/tristatecheckbox/TriStateCheckbox.d.ts +5 -2
  351. package/ts-helpers.d.ts +2 -0
  352. package/virtualscroller/VirtualScroller.d.ts +8 -6
  353. package/web-types.json +1 -1
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.autocomplete=function(e,t,n,i,o,l,s,r,a,u,c,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=d(e),f=d(t),m=d(n),y=d(i),v=d(o),b=d(l),g=d(s),O=d(a),x=d(u),I={root:function(e){var t=e.instance,n=e.props;return["p-autocomplete p-component p-inputwrapper",{"p-disabled":n.disabled,"p-focus":t.focused,"p-autocomplete-dd":n.dropdown,"p-autocomplete-multiple":n.multiple,"p-inputwrapper-filled":n.modelValue||r.ObjectUtils.isNotEmpty(t.inputValue),"p-inputwrapper-focus":t.focused,"p-overlay-open":t.overlayVisible}]},input:function(e){return["p-autocomplete-input p-inputtext p-component",{"p-autocomplete-dd-input":e.props.dropdown}]},container:"p-autocomplete-multiple-container p-component p-inputtext",token:function(e){return["p-autocomplete-token",{"p-focus":e.instance.focusedMultipleOptionIndex===e.i}]},tokenLabel:"p-autocomplete-token-label",removeTokenIcon:"p-autocomplete-token-icon",inputToken:"p-autocomplete-input-token",loadingIcon:"p-autocomplete-loader",dropdownButton:"p-autocomplete-dropdown",panel:function(e){var t=e.instance;return["p-autocomplete-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},list:"p-autocomplete-items",itemGroup:"p-autocomplete-item-group",item:function(e){var t=e.instance,n=e.option,i=e.i,o=e.getItemOptions;return["p-autocomplete-item",{"p-highlight":t.isSelected(n),"p-focus":t.focusedOptionIndex===t.getOptionIndex(i,o),"p-disabled":t.isOptionDisabled(n)}]},emptyMessage:"p-autocomplete-empty-message"},S=c.useStyle("\n.p-autocomplete {\n display: inline-flex;\n}\n\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n.p-autocomplete-dd .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-autocomplete-dd .p-autocomplete-input,\n.p-autocomplete-dd .p-autocomplete-multiple-container {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-autocomplete-dd .p-autocomplete-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0px;\n}\n\n.p-autocomplete .p-autocomplete-panel {\n min-width: 100%;\n}\n\n.p-autocomplete-panel {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n}\n\n.p-autocomplete-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n.p-autocomplete-item {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n\n.p-autocomplete-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-autocomplete-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-autocomplete-token-icon {\n cursor: pointer;\n}\n\n.p-autocomplete-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-autocomplete-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-autocomplete {\n display: flex;\n}\n\n.p-fluid .p-autocomplete-dd .p-autocomplete-input {\n width: 1%;\n}\n",{name:"autocomplete",manual:!0});function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function w(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}function V(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function L(e){if(Array.isArray(e))return D(e)}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var M={name:"AutoComplete",extends:{name:"BaseAutoComplete",extends:x.default,props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:String,default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:Object,default:null},inputClass:{type:[String,Object],default:null},inputProps:{type:null,default:null},panelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:void 0},dropdownClass:{type:[String,Object],default:null},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:I,inlineStyles:{root:{position:"relative"}},loadStyle:S.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,focusOnHover:!1,dirty:!1,data:function(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}},watch:{"$attrs.id":function(e){this.id=e||r.UniqueComponentId()},suggestions:function(){this.searching&&(r.ObjectUtils.isNotEmpty(this.suggestions)||this.$slots.empty?this.show():this.hide(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted:function(){this.id=this.id||r.UniqueComponentId(),this.autoUpdateModel()},updated:function(){this.overlayVisible&&this.alignOverlay()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.field||this.optionLabel?r.ObjectUtils.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:function(e){return e},getOptionRenderKey:function(e,t){return(this.dataKey?r.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,n,i){return this.ptm(i,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(n,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&r.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return r.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return r.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&r.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.dirty=e,t.overlayVisible=!1,t.focusedOptionIndex=-1,e&&r.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur:function(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}},onInput:function(e){var t=this;this.searchTimeout&&clearTimeout(this.searchTimeout);var n=e.target.value;this.multiple||this.updateModel(e,n),0===n.length?(this.hide(),this.$emit("clear")):n.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((function(){t.search(e,n,"input")}),this.delay)):this.hide()},onChange:function(e){var t=this;if(this.forceSelection){var n=!1;if(this.visibleOptions){var i=this.visibleOptions.find((function(e){return t.isOptionMatched(e,t.$refs.focusInput.value||"")}));void 0!==i&&(n=!0,!this.isSelected(i)&&this.onOptionSelect(e,i))}n||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus:function(){this.disabled||(this.focused=!0)},onMultipleContainerBlur:function(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown:function(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick:function(e){this.disabled||this.searching||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||r.DomHandler.focus(this.$refs.focusInput)},onDropdownClick:function(e){var t=void 0;this.overlayVisible?this.hide(!0):(r.DomHandler.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect:function(e,t){var n,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[].concat(L(n=this.modelValue||[])||V(n)||C(n)||w(),[o]))):this.updateModel(e,o),this.$emit("item-select",{originalEvent:e,value:t}),i&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick:function(e){v.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowUpKey:function(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey:function(e){var t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(r.ObjectUtils.isEmpty(t.value)&&this.hasSelectedOption?(r.DomHandler.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey:function(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey:function(e){var t=e.currentTarget;t.setSelectionRange(0,e.shiftKey?t.value.length:0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey:function(e){var t=e.currentTarget,n=t.value.length;t.setSelectionRange(e.shiftKey?0:n,n),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey:function(e){if(this.multiple){if(r.ObjectUtils.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){var t=this.modelValue[this.modelValue.length-1],n=this.modelValue.slice(0,-1);this.$emit("update:modelValue",n),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple:function(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple:function(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,r.DomHandler.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple:function(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter:function(e){r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),r.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){var e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?r.DomHandler.relativePosition(this.overlay,e):(this.overlay.style.minWidth=r.DomHandler.getOuterWidth(e)+"px",r.DomHandler.absolutePosition(this.overlay,e))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!r.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked:function(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked:function(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked:function(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched:function(e,t){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===t.toLocaleLowerCase(this.searchLocale)},isValidOption:function(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return r.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return r.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,n=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return n>-1?n+e+1:e},findPrevOptionIndex:function(e){var t=this,n=e>0?r.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return n>-1?n:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search:function(e,t,n){null!=t&&("input"===n&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption:function(e,t){var n=this,i=this.modelValue[t],o=this.modelValue.filter((function(e,n){return n!==t})).map((function(e){return n.getOptionValue(e)}));this.updateModel(e,o),this.$emit("item-unselect",{originalEvent:e,value:i}),this.dirty=!0,r.DomHandler.focus(this.$refs.focusInput)},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=-1!==t?"".concat(this.id,"_").concat(t):this.focusedOptionId,i=r.DomHandler.findSingle(this.list,'li[id="'.concat(n,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((function(){e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.focusedOptionIndex)}),0)},autoUpdateModel:function(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,n,i){e.push({optionGroup:n,group:!0,index:i});var o=t.getOptionGroupChildren(n);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue:function(){if(this.modelValue){if("object"===k(this.modelValue)){var e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption:function(){return r.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.dataKey},searchResultMessageText:function(){return r.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},focusedMultipleOptionId:function(){return-1!==this.focusedMultipleOptionIndex?"".concat(this.id,"_multiple_option_").concat(this.focusedMultipleOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},components:{Button:h.default,VirtualScroller:O.default,Portal:b.default,ChevronDownIcon:f.default,SpinnerIcon:m.default,TimesCircleIcon:y.default},directives:{ripple:g.default}};function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function K(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=T(e,"string");return"symbol"===B(t)?t:String(t)}function T(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==B(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var F=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],A=["aria-activedescendant"],j=["id","aria-label","aria-setsize","aria-posinset"],H=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],N=["id"],U=["id"],z=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focus","data-p-disabled"];return M.render=function(e,t,n,i,o,l){var s=p.resolveComponent("SpinnerIcon"),r=p.resolveComponent("Button"),a=p.resolveComponent("VirtualScroller"),u=p.resolveComponent("Portal"),c=p.resolveDirective("ripple");return p.openBlock(),p.createElementBlock("div",p.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[15]||(t[15]=function(){return l.onContainerClick&&l.onContainerClick.apply(l,arguments)})},e.ptm("root"),{"data-pc-name":"autocomplete"}),[e.multiple?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("input",p.mergeProps({key:0,ref:"focusInput",id:e.inputId,type:"text",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:l.inputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[1]||(t[1]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[2]||(t[2]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onInput:t[3]||(t[3]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onChange:t[4]||(t[4]=function(){return l.onChange&&l.onChange.apply(l,arguments)})},E(E({},e.inputProps),e.ptm("input"))),null,16,F)),e.multiple?(p.openBlock(),p.createElementBlock("ul",p.mergeProps({key:1,ref:"multiContainer",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":o.focused?l.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=function(){return l.onMultipleContainerFocus&&l.onMultipleContainerFocus.apply(l,arguments)}),onBlur:t[11]||(t[11]=function(){return l.onMultipleContainerBlur&&l.onMultipleContainerBlur.apply(l,arguments)}),onKeydown:t[12]||(t[12]=function(){return l.onMultipleContainerKeyDown&&l.onMultipleContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.modelValue,(function(t,n){return p.openBlock(),p.createElementBlock("li",p.mergeProps({key:n,id:o.id+"_multiple_option_"+n,class:e.cx("token",{i:n}),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token")),[p.renderSlot(e.$slots,"chip",{value:t},(function(){return[p.createElementVNode("span",p.mergeProps({class:e.cx("tokenLabel")},e.ptm("tokenLabel")),p.toDisplayString(l.getOptionLabel(t)),17)]})),p.renderSlot(e.$slots,"removetokenicon",{class:p.normalizeClass(e.cx(e.removeTokenIcon)),onClick:function(e){return l.removeOption(e,n)}},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),p.mergeProps({class:[e.cx(e.removeTokenIcon),e.removeTokenIcon],onClick:function(e){return l.removeOption(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,j)})),128)),p.createElementVNode("li",p.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[p.createElementVNode("input",p.mergeProps({ref:"focusInput",id:e.inputId,type:"text",style:e.inputStyle,class:e.inputClass,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[5]||(t[5]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[6]||(t[6]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[7]||(t[7]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onInput:t[8]||(t[8]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onChange:t[9]||(t[9]=function(){return l.onChange&&l.onChange.apply(l,arguments)})},E(E({},e.inputProps),e.ptm("input"))),null,16,H)],16)],16,A)):p.createCommentVNode("",!0),o.searching||e.loading?p.renderSlot(e.$slots,"loadingicon",{key:2,class:p.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(p.openBlock(),p.createElementBlock("i",p.mergeProps({key:0,class:["pi-spin",e.cx("loadingIcon"),e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(p.openBlock(),p.createBlock(s,p.mergeProps({key:1,class:[e.cx("loadingIcon"),e.loadingIcon],spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):p.createCommentVNode("",!0),e.dropdown?(p.openBlock(),p.createBlock(r,{key:3,ref:"dropdownButton",type:"button",tabindex:"-1",class:p.normalizeClass([e.cx("dropdownButton"),e.dropdownClass]),disabled:e.disabled,"aria-hidden":"true",onClick:l.onDropdownClick,unstyled:e.unstyled,pt:e.ptm("dropdownButton"),"data-pc-section":"dropdownbutton"},{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"dropdownicon",{class:p.normalizeClass(e.dropdownIcon)},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),p.mergeProps({class:e.dropdownIcon},e.ptm("dropdownButton").icon),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onClick","unstyled","pt"])):p.createCommentVNode("",!0),p.createElementVNode("span",p.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),p.toDisplayString(l.searchResultMessageText),17),p.createVNode(u,{appendTo:e.appendTo},{default:p.withCtx((function(){return[p.createVNode(p.Transition,p.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:p.withCtx((function(){return[o.overlayVisible?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,ref:l.overlayRef,class:[e.cx("panel"),e.panelClass],style:E(E({},e.panelStyle),{},{"max-height":l.virtualScrollerDisabled?e.scrollHeight:""}),onClick:t[13]||(t[13]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)}),onKeydown:t[14]||(t[14]=function(){return l.onOverlayKeyDown&&l.onOverlayKeyDown.apply(l,arguments)})},E(E({},e.panelProps),e.ptm("panel"))),[p.renderSlot(e.$slots,"header",{value:e.modelValue,suggestions:l.visibleOptions}),p.createVNode(a,p.mergeProps({ref:l.virtualScrollerRef},e.virtualScrollerOptions,{style:{height:e.scrollHeight},items:l.visibleOptions,tabindex:-1,disabled:l.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),p.createSlots({content:p.withCtx((function(t){var n=t.styleClass,i=t.contentRef,s=t.items,r=t.getItemOptions,a=t.contentStyle,u=t.itemSize;return[p.createElementVNode("ul",p.mergeProps({ref:function(e){return l.listRef(e,i)},id:o.id+"_list",class:[e.cx("list"),n],style:a,role:"listbox"},e.ptm("list")),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(s,(function(t,n){return p.openBlock(),p.createElementBlock(p.Fragment,{key:l.getOptionRenderKey(t,l.getOptionIndex(n,r))},[l.isOptionGroup(t)?(p.openBlock(),p.createElementBlock("li",p.mergeProps({key:0,id:o.id+"_"+l.getOptionIndex(n,r),style:{height:u?u+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[p.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:l.getOptionIndex(n,r)},(function(){return[p.createTextVNode(p.toDisplayString(l.getOptionGroupLabel(t.optionGroup)),1)]}))],16,U)):p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:1,id:o.id+"_"+l.getOptionIndex(n,r),style:{height:u?u+"px":void 0},class:e.cx("item",{option:t,i:n,getItemOptions:r}),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":l.isSelected(t),"aria-disabled":l.isOptionDisabled(t),"aria-setsize":l.ariaSetSize,"aria-posinset":l.getAriaPosInset(l.getOptionIndex(n,r)),onClick:function(e){return l.onOptionSelect(e,t)},onMousemove:function(e){return l.onOptionMouseMove(e,l.getOptionIndex(n,r))},"data-p-highlight":l.isSelected(t),"data-p-focus":o.focusedOptionIndex===l.getOptionIndex(n,r),"data-p-disabled":l.isOptionDisabled(t)},l.getPTOptions(t,r,n,"item")),[e.$slots.option?p.renderSlot(e.$slots,"option",{key:0,option:t,index:l.getOptionIndex(n,r)},(function(){return[p.createTextVNode(p.toDisplayString(l.getOptionLabel(t)),1)]})):p.renderSlot(e.$slots,"item",{key:1,item:t,index:l.getOptionIndex(n,r)},(function(){return[p.createTextVNode(p.toDisplayString(l.getOptionLabel(t)),1)]}))],16,z)),[[c]])],64)})),128)),!s||s&&0===s.length?(p.openBlock(),p.createElementBlock("li",p.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[p.renderSlot(e.$slots,"empty",{},(function(){return[p.createTextVNode(p.toDisplayString(l.searchResultMessageText),1)]}))],16)):p.createCommentVNode("",!0)],16,N)]})),_:2},[e.$slots.loader?{name:"loader",fn:p.withCtx((function(t){return[p.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"]),p.renderSlot(e.$slots,"footer",{value:e.modelValue,suggestions:l.visibleOptions}),p.createElementVNode("span",p.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),p.toDisplayString(l.selectedMessageText),17)],16)):p.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},M}(primevue.button,primevue.icons.chevrondown,primevue.icons.spinner,primevue.icons.timescircle,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,primevue.basecomponent,primevue.usestyle,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.autocomplete=function(e,t,n,i,o,l,s,r,a,u,c,p){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=d(e),f=d(t),m=d(n),y=d(i),v=d(o),b=d(l),g=d(s),O=d(a),x=d(u),I={root:function(e){var t=e.instance,n=e.props;return["p-autocomplete p-component p-inputwrapper",{"p-disabled":n.disabled,"p-focus":t.focused,"p-autocomplete-dd":n.dropdown,"p-autocomplete-multiple":n.multiple,"p-inputwrapper-filled":n.modelValue||r.ObjectUtils.isNotEmpty(t.inputValue),"p-inputwrapper-focus":t.focused,"p-overlay-open":t.overlayVisible}]},input:function(e){return["p-autocomplete-input p-inputtext p-component",{"p-autocomplete-dd-input":e.props.dropdown}]},container:"p-autocomplete-multiple-container p-component p-inputtext",token:function(e){return["p-autocomplete-token",{"p-focus":e.instance.focusedMultipleOptionIndex===e.i}]},tokenLabel:"p-autocomplete-token-label",removeTokenIcon:"p-autocomplete-token-icon",inputToken:"p-autocomplete-input-token",loadingIcon:"p-autocomplete-loader",dropdownButton:"p-autocomplete-dropdown",panel:function(e){var t=e.instance;return["p-autocomplete-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},list:"p-autocomplete-items",itemGroup:"p-autocomplete-item-group",item:function(e){var t=e.instance,n=e.option,i=e.i,o=e.getItemOptions;return["p-autocomplete-item",{"p-highlight":t.isSelected(n),"p-focus":t.focusedOptionIndex===t.getOptionIndex(i,o),"p-disabled":t.isOptionDisabled(n)}]},emptyMessage:"p-autocomplete-empty-message"},S=c.useStyle("\n.p-autocomplete {\n display: inline-flex;\n}\n\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n.p-autocomplete-dd .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-autocomplete-dd .p-autocomplete-input,\n.p-autocomplete-dd .p-autocomplete-multiple-container {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-autocomplete-dd .p-autocomplete-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0px;\n}\n\n.p-autocomplete .p-autocomplete-panel {\n min-width: 100%;\n}\n\n.p-autocomplete-panel {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n}\n\n.p-autocomplete-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n.p-autocomplete-item {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n\n.p-autocomplete-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-autocomplete-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-autocomplete-token-icon {\n cursor: pointer;\n}\n\n.p-autocomplete-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-autocomplete-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-autocomplete {\n display: flex;\n}\n\n.p-fluid .p-autocomplete-dd .p-autocomplete-input {\n width: 1%;\n}\n",{name:"autocomplete",manual:!0});function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function w(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}function V(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function L(e){if(Array.isArray(e))return D(e)}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var M={name:"AutoComplete",extends:{name:"BaseAutoComplete",extends:x.default,props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:String,default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:Object,default:null},inputClass:{type:[String,Object],default:null},inputProps:{type:null,default:null},panelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:void 0},dropdownClass:{type:[String,Object],default:null},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:I,inlineStyles:{root:{position:"relative"}},loadStyle:S.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,focusOnHover:!1,dirty:!1,data:function(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}},watch:{"$attrs.id":function(e){this.id=e||r.UniqueComponentId()},suggestions:function(){this.searching&&(r.ObjectUtils.isNotEmpty(this.suggestions)||this.$slots.empty?this.show():this.hide(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted:function(){this.id=this.id||r.UniqueComponentId(),this.autoUpdateModel()},updated:function(){this.overlayVisible&&this.alignOverlay()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.field||this.optionLabel?r.ObjectUtils.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:function(e){return e},getOptionRenderKey:function(e,t){return(this.dataKey?r.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,n,i){return this.ptm(i,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(n,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&r.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return r.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return r.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&r.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.dirty=e,t.overlayVisible=!1,t.focusedOptionIndex=-1,e&&r.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur:function(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}},onInput:function(e){var t=this;this.searchTimeout&&clearTimeout(this.searchTimeout);var n=e.target.value;this.multiple||this.updateModel(e,n),0===n.length?(this.hide(),this.$emit("clear")):n.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((function(){t.search(e,n,"input")}),this.delay)):this.hide()},onChange:function(e){var t=this;if(this.forceSelection){var n=!1;if(this.visibleOptions){var i=this.visibleOptions.find((function(e){return t.isOptionMatched(e,t.$refs.focusInput.value||"")}));void 0!==i&&(n=!0,!this.isSelected(i)&&this.onOptionSelect(e,i))}n||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus:function(){this.disabled||(this.focused=!0)},onMultipleContainerBlur:function(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown:function(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick:function(e){this.disabled||this.searching||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||r.DomHandler.focus(this.$refs.focusInput)},onDropdownClick:function(e){var t=void 0;this.overlayVisible?this.hide(!0):(r.DomHandler.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect:function(e,t){var n,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[].concat(L(n=this.modelValue||[])||V(n)||C(n)||w(),[o]))):this.updateModel(e,o),this.$emit("item-select",{originalEvent:e,value:t}),i&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick:function(e){v.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowUpKey:function(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey:function(e){var t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(r.ObjectUtils.isEmpty(t.value)&&this.hasSelectedOption?(r.DomHandler.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey:function(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey:function(e){var t=e.currentTarget;t.setSelectionRange(0,e.shiftKey?t.value.length:0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey:function(e){var t=e.currentTarget,n=t.value.length;t.setSelectionRange(e.shiftKey?0:n,n),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey:function(e){if(this.multiple){if(r.ObjectUtils.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){var t=this.modelValue[this.modelValue.length-1],n=this.modelValue.slice(0,-1);this.$emit("update:modelValue",n),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple:function(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple:function(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,r.DomHandler.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple:function(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter:function(e){r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),r.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){var e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?r.DomHandler.relativePosition(this.overlay,e):(this.overlay.style.minWidth=r.DomHandler.getOuterWidth(e)+"px",r.DomHandler.absolutePosition(this.overlay,e))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!r.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked:function(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked:function(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked:function(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched:function(e,t){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.searchLocale)===t.toLocaleLowerCase(this.searchLocale)},isValidOption:function(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return r.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return r.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,n=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return n>-1?n+e+1:e},findPrevOptionIndex:function(e){var t=this,n=e>0?r.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return n>-1?n:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search:function(e,t,n){null!=t&&("input"===n&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption:function(e,t){var n=this,i=this.modelValue[t],o=this.modelValue.filter((function(e,n){return n!==t})).map((function(e){return n.getOptionValue(e)}));this.updateModel(e,o),this.$emit("item-unselect",{originalEvent:e,value:i}),this.dirty=!0,r.DomHandler.focus(this.$refs.focusInput)},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=-1!==t?"".concat(this.id,"_").concat(t):this.focusedOptionId,i=r.DomHandler.findSingle(this.list,'li[id="'.concat(n,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout((function(){e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.focusedOptionIndex)}),0)},autoUpdateModel:function(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,n,i){e.push({optionGroup:n,group:!0,index:i});var o=t.getOptionGroupChildren(n);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue:function(){if(this.modelValue){if("object"===k(this.modelValue)){var e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption:function(){return r.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.dataKey},searchResultMessageText:function(){return r.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},focusedMultipleOptionId:function(){return-1!==this.focusedMultipleOptionIndex?"".concat(this.id,"_multiple_option_").concat(this.focusedMultipleOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},components:{Button:h.default,VirtualScroller:O.default,Portal:b.default,ChevronDownIcon:f.default,SpinnerIcon:m.default,TimesCircleIcon:y.default},directives:{ripple:g.default}};function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function K(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=T(e,"string");return"symbol"===B(t)?t:String(t)}function T(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==B(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var F=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],A=["aria-activedescendant"],j=["id","aria-label","aria-setsize","aria-posinset"],H=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],N=["id"],U=["id"],z=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focus","data-p-disabled"];return M.render=function(e,t,n,i,o,l){var s=p.resolveComponent("SpinnerIcon"),r=p.resolveComponent("Button"),a=p.resolveComponent("VirtualScroller"),u=p.resolveComponent("Portal"),c=p.resolveDirective("ripple");return p.openBlock(),p.createElementBlock("div",p.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[15]||(t[15]=function(){return l.onContainerClick&&l.onContainerClick.apply(l,arguments)})},e.ptm("root"),{"data-pc-name":"autocomplete"}),[e.multiple?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("input",p.mergeProps({key:0,ref:"focusInput",id:e.inputId,type:"text",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:l.inputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[1]||(t[1]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[2]||(t[2]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onInput:t[3]||(t[3]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onChange:t[4]||(t[4]=function(){return l.onChange&&l.onChange.apply(l,arguments)})},E(E({},e.inputProps),e.ptm("input"))),null,16,F)),e.multiple?(p.openBlock(),p.createElementBlock("ul",p.mergeProps({key:1,ref:"multiContainer",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":o.focused?l.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=function(){return l.onMultipleContainerFocus&&l.onMultipleContainerFocus.apply(l,arguments)}),onBlur:t[11]||(t[11]=function(){return l.onMultipleContainerBlur&&l.onMultipleContainerBlur.apply(l,arguments)}),onKeydown:t[12]||(t[12]=function(){return l.onMultipleContainerKeyDown&&l.onMultipleContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(e.modelValue,(function(t,n){return p.openBlock(),p.createElementBlock("li",p.mergeProps({key:n,id:o.id+"_multiple_option_"+n,class:e.cx("token",{i:n}),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":n+1},e.ptm("token")),[p.renderSlot(e.$slots,"chip",{value:t},(function(){return[p.createElementVNode("span",p.mergeProps({class:e.cx("tokenLabel")},e.ptm("tokenLabel")),p.toDisplayString(l.getOptionLabel(t)),17)]})),p.renderSlot(e.$slots,"removetokenicon",{class:p.normalizeClass(e.cx("removeTokenIcon")),index:n,onClick:function(e){return l.removeOption(e,n)}},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),p.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeOption(e,n)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,j)})),128)),p.createElementVNode("li",p.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[p.createElementVNode("input",p.mergeProps({ref:"focusInput",id:e.inputId,type:"text",style:e.inputStyle,class:e.inputClass,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[5]||(t[5]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[6]||(t[6]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[7]||(t[7]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onInput:t[8]||(t[8]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onChange:t[9]||(t[9]=function(){return l.onChange&&l.onChange.apply(l,arguments)})},E(E({},e.inputProps),e.ptm("input"))),null,16,H)],16)],16,A)):p.createCommentVNode("",!0),o.searching||e.loading?p.renderSlot(e.$slots,"loadingicon",{key:2,class:p.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(p.openBlock(),p.createElementBlock("i",p.mergeProps({key:0,class:["pi-spin",e.cx("loadingIcon"),e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(p.openBlock(),p.createBlock(s,p.mergeProps({key:1,class:[e.cx("loadingIcon"),e.loadingIcon],spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):p.createCommentVNode("",!0),e.dropdown?(p.openBlock(),p.createBlock(r,{key:3,ref:"dropdownButton",type:"button",tabindex:"-1",class:p.normalizeClass([e.cx("dropdownButton"),e.dropdownClass]),disabled:e.disabled,"aria-hidden":"true",onClick:l.onDropdownClick,unstyled:e.unstyled,pt:e.ptm("dropdownButton"),"data-pc-section":"dropdownbutton"},{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"dropdownicon",{class:p.normalizeClass(e.dropdownIcon)},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),p.mergeProps({class:e.dropdownIcon},e.ptm("dropdownButton").icon),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onClick","unstyled","pt"])):p.createCommentVNode("",!0),p.createElementVNode("span",p.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),p.toDisplayString(l.searchResultMessageText),17),p.createVNode(u,{appendTo:e.appendTo},{default:p.withCtx((function(){return[p.createVNode(p.Transition,p.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:p.withCtx((function(){return[o.overlayVisible?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,ref:l.overlayRef,class:[e.cx("panel"),e.panelClass],style:E(E({},e.panelStyle),{},{"max-height":l.virtualScrollerDisabled?e.scrollHeight:""}),onClick:t[13]||(t[13]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)}),onKeydown:t[14]||(t[14]=function(){return l.onOverlayKeyDown&&l.onOverlayKeyDown.apply(l,arguments)})},E(E({},e.panelProps),e.ptm("panel"))),[p.renderSlot(e.$slots,"header",{value:e.modelValue,suggestions:l.visibleOptions}),p.createVNode(a,p.mergeProps({ref:l.virtualScrollerRef},e.virtualScrollerOptions,{style:{height:e.scrollHeight},items:l.visibleOptions,tabindex:-1,disabled:l.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),p.createSlots({content:p.withCtx((function(t){var n=t.styleClass,i=t.contentRef,s=t.items,r=t.getItemOptions,a=t.contentStyle,u=t.itemSize;return[p.createElementVNode("ul",p.mergeProps({ref:function(e){return l.listRef(e,i)},id:o.id+"_list",class:[e.cx("list"),n],style:a,role:"listbox"},e.ptm("list")),[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(s,(function(t,n){return p.openBlock(),p.createElementBlock(p.Fragment,{key:l.getOptionRenderKey(t,l.getOptionIndex(n,r))},[l.isOptionGroup(t)?(p.openBlock(),p.createElementBlock("li",p.mergeProps({key:0,id:o.id+"_"+l.getOptionIndex(n,r),style:{height:u?u+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[p.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:l.getOptionIndex(n,r)},(function(){return[p.createTextVNode(p.toDisplayString(l.getOptionGroupLabel(t.optionGroup)),1)]}))],16,U)):p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:1,id:o.id+"_"+l.getOptionIndex(n,r),style:{height:u?u+"px":void 0},class:e.cx("item",{option:t,i:n,getItemOptions:r}),role:"option","aria-label":l.getOptionLabel(t),"aria-selected":l.isSelected(t),"aria-disabled":l.isOptionDisabled(t),"aria-setsize":l.ariaSetSize,"aria-posinset":l.getAriaPosInset(l.getOptionIndex(n,r)),onClick:function(e){return l.onOptionSelect(e,t)},onMousemove:function(e){return l.onOptionMouseMove(e,l.getOptionIndex(n,r))},"data-p-highlight":l.isSelected(t),"data-p-focus":o.focusedOptionIndex===l.getOptionIndex(n,r),"data-p-disabled":l.isOptionDisabled(t)},l.getPTOptions(t,r,n,"item")),[e.$slots.option?p.renderSlot(e.$slots,"option",{key:0,option:t,index:l.getOptionIndex(n,r)},(function(){return[p.createTextVNode(p.toDisplayString(l.getOptionLabel(t)),1)]})):p.renderSlot(e.$slots,"item",{key:1,item:t,index:l.getOptionIndex(n,r)},(function(){return[p.createTextVNode(p.toDisplayString(l.getOptionLabel(t)),1)]}))],16,z)),[[c]])],64)})),128)),!s||s&&0===s.length?(p.openBlock(),p.createElementBlock("li",p.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[p.renderSlot(e.$slots,"empty",{},(function(){return[p.createTextVNode(p.toDisplayString(l.searchResultMessageText),1)]}))],16)):p.createCommentVNode("",!0)],16,N)]})),_:2},[e.$slots.loader?{name:"loader",fn:p.withCtx((function(t){return[p.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"]),p.renderSlot(e.$slots,"footer",{value:e.modelValue,suggestions:l.visibleOptions}),p.createElementVNode("span",p.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),p.toDisplayString(l.selectedMessageText),17)],16)):p.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},M}(primevue.button,primevue.icons.chevrondown,primevue.icons.spinner,primevue.icons.timescircle,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,primevue.basecomponent,primevue.usestyle,Vue);
@@ -9,7 +9,7 @@
9
9
  import { VNode } from 'vue';
10
10
  import { AvatarGroupPassThroughOptions } from '../avatargroup';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type AvatarPassThroughOptionType = AvatarPassThroughAttributes | ((options: AvatarPassThroughMethodOptions) => AvatarPassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -96,7 +96,7 @@ export interface AvatarProps {
96
96
  * Used to pass attributes to DOM elements inside the component.
97
97
  * @type {AvatarPassThroughOptions}
98
98
  */
99
- pt?: AvatarPassThroughOptions;
99
+ pt?: PTOptions<AvatarPassThroughOptions>;
100
100
  /**
101
101
  * When enabled, it removes component related styles in the core.
102
102
  * @defaultValue false
@@ -8,7 +8,7 @@
8
8
  *
9
9
  */
10
10
  import { ComponentHooks } from '../basecomponent';
11
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
11
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
12
12
 
13
13
  export declare type AvatarGroupPassThroughOptionType = AvatarGroupPassThroughAttributes | null | undefined;
14
14
 
@@ -43,7 +43,7 @@ export interface AvatarGroupProps {
43
43
  * Used to pass attributes to DOM elements inside the component.
44
44
  * @type {AvatarGroupPassThroughOptions}
45
45
  */
46
- pt?: AvatarGroupPassThroughOptions;
46
+ pt?: PTOptions<AvatarGroupPassThroughOptions>;
47
47
  /**
48
48
  * When enabled, it removes component related styles in the core.
49
49
  * @defaultValue false
package/badge/Badge.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { VNode } from 'vue';
11
11
  import { ComponentHooks } from '../basecomponent';
12
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
12
+ import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
13
13
 
14
14
  export declare type BadgePassThroughOptionType = BadgePassThroughAttributes | ((options: BadgePassThroughMethodOptions) => BadgePassThroughAttributes | string) | string | null | undefined;
15
15
 
@@ -64,7 +64,7 @@ export interface BadgeProps {
64
64
  * Used to pass attributes to DOM elements inside the component.
65
65
  * @type {BadgePassThroughOptions}
66
66
  */
67
- pt?: BadgePassThroughOptions;
67
+ pt?: PTOptions<BadgePassThroughOptions>;
68
68
  /**
69
69
  * When enabled, it removes component related styles in the core.
70
70
  * @defaultValue false
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import { DirectiveBinding, ObjectDirective } from 'vue';
10
10
  import { DirectiveHooks } from '../basedirective';
11
+ import { PTOptions } from '../ts-helpers';
11
12
 
12
13
  export declare type BadgeDirectivePassThroughOptionType = BadgeDirectivePassThroughAttributes | ((options: BadgePassThroughMethodOptions) => BadgeDirectivePassThroughAttributes) | null | undefined;
13
14
 
@@ -26,7 +27,7 @@ export interface BadgeDirectiveOptions {
26
27
  * Used to pass attributes to DOM elements inside the component.
27
28
  * @type {BadgeDirectivePassThroughOptions}
28
29
  */
29
- pt?: BadgeDirectivePassThroughOptions;
30
+ pt?: PTOptions<BadgeDirectivePassThroughOptions>;
30
31
  /**
31
32
  * When enabled, it removes component related styles in the core.
32
33
  * @defaultValue false
@@ -52,7 +52,7 @@ const buttonStyles = `
52
52
  margin: 0;
53
53
  }
54
54
 
55
- .p-buttonset .p-button:not(:last-child) {
55
+ .p-buttonset .p-button:not(:last-child), .p-buttonset .p-button:not(:last-child):hover {
56
56
  border-right: 0 none;
57
57
  }
58
58
 
@@ -388,8 +388,17 @@ export default {
388
388
  }
389
389
  },
390
390
  beforeCreate() {
391
- this.pt?.hooks?.['onBeforeCreate']?.();
392
- this.$primevue?.config?.pt?.[this.$.type.name]?.hooks?.['onBeforeCreate']?.();
391
+ const _usept = this.pt?.['_usept'];
392
+ const originalValue = _usept ? this.pt?.originalValue?.[this.$.type.name] : undefined;
393
+ const value = _usept ? this.pt?.value?.[this.$.type.name] : this.pt;
394
+
395
+ (value || originalValue)?.hooks?.['onBeforeCreate']?.();
396
+
397
+ const _useptInConfig = this.$config?.pt?.['_usept'];
398
+ const originalValueInConfig = _useptInConfig ? this.$primevue?.config?.pt?.originalValue : undefined;
399
+ const valueInConfig = _useptInConfig ? this.$primevue?.config?.pt?.value : this.$primevue?.config?.pt;
400
+
401
+ (valueInConfig || originalValueInConfig)?.[this.$.type.name]?.hooks?.['onBeforeCreate']?.();
393
402
  },
394
403
  created() {
395
404
  this._hook('onCreated');
@@ -416,11 +425,13 @@ export default {
416
425
  },
417
426
  methods: {
418
427
  _hook(hookName) {
419
- const selfHook = this._getOptionValue(this.pt, `hooks.${hookName}`);
420
- const defaultHook = this._getOptionValue(this.defaultPT, `hooks.${hookName}`);
428
+ if (!this.$options.hostName) {
429
+ const selfHook = this._usePT(this._getPT(this.pt, this.$.type.name), this._getOptionValue, `hooks.${hookName}`);
430
+ const defaultHook = this._useDefaultPT(this._getOptionValue, `hooks.${hookName}`);
421
431
 
422
- selfHook?.();
423
- defaultHook?.();
432
+ selfHook?.();
433
+ defaultHook?.();
434
+ }
424
435
  },
425
436
  _loadGlobalStyles() {
426
437
  /*
@@ -433,7 +444,7 @@ export default {
433
444
  * ObjectUtils.isNotEmpty(mergedCSS?.class) && this.$css.loadCustomStyle(mergedCSS?.class);
434
445
  */
435
446
 
436
- const globalCSS = this._getOptionValue(this.globalPT, 'global.css', this.$params);
447
+ const globalCSS = this._useGlobalPT(this._getOptionValue, 'global.css', this.$params);
437
448
 
438
449
  ObjectUtils.isNotEmpty(globalCSS) && loadGlobalStyle(globalCSS, { nonce: this.$config?.csp?.nonce });
439
450
  },
@@ -452,8 +463,9 @@ export default {
452
463
  },
453
464
  _getPTValue(obj = {}, key = '', params = {}, searchInDefaultPT = true) {
454
465
  const datasetPrefix = 'data-pc-';
455
- const self = this._getPTClassValue(obj, key, params);
456
- const globalPT = searchInDefaultPT ? (/./g.test(key) && !!params[key.split('.')[0]] ? this._getPTClassValue(this.globalPT, key, params) : this._getPTClassValue(this.defaultPT, key, params)) : undefined;
466
+ const searchOut = /./g.test(key) && !!params[key.split('.')[0]];
467
+ const self = searchOut ? undefined : this._usePT(this._getPT(obj, this.$name), this._getPTClassValue, key, params);
468
+ const globalPT = searchInDefaultPT ? (searchOut ? this._useGlobalPT(this._getPTClassValue, key, params) : this._useDefaultPT(this._getPTClassValue, key, params)) : undefined;
457
469
  const merged = mergeProps(
458
470
  self,
459
471
  globalPT,
@@ -475,6 +487,46 @@ export default {
475
487
 
476
488
  return ObjectUtils.isString(value) || ObjectUtils.isArray(value) ? { class: value } : value;
477
489
  },
490
+ _getPT(pt, key = '', callback) {
491
+ const _usept = pt?.['_usept'];
492
+
493
+ const getValue = (value) => {
494
+ const computedValue = callback ? callback(value) : value;
495
+
496
+ return computedValue?.[ObjectUtils.toFlatCase(key)] ?? computedValue;
497
+ };
498
+
499
+ return ObjectUtils.isNotEmpty(_usept)
500
+ ? {
501
+ _usept,
502
+ originalValue: getValue(pt.originalValue),
503
+ value: getValue(pt.value)
504
+ }
505
+ : getValue(pt);
506
+ },
507
+ _usePT(pt, callback, key, params) {
508
+ const fn = (value) => callback(value, key, params);
509
+
510
+ if (pt?.hasOwnProperty('_usept')) {
511
+ const { merge, useMergeProps } = pt['_usept'];
512
+ const originalValue = fn(pt.originalValue);
513
+ const value = fn(pt.value);
514
+
515
+ if (originalValue === undefined && value === undefined) return undefined;
516
+ else if (ObjectUtils.isString(value)) return value;
517
+ else if (ObjectUtils.isString(originalValue)) return originalValue;
518
+
519
+ return merge ? (useMergeProps ? mergeProps(originalValue, value) : { ...originalValue, ...value }) : value;
520
+ }
521
+
522
+ return fn(pt);
523
+ },
524
+ _useGlobalPT(callback, key, params) {
525
+ return this._usePT(this.globalPT, callback, key, params);
526
+ },
527
+ _useDefaultPT(callback, key, params) {
528
+ return this._usePT(this.defaultPT, callback, key, params);
529
+ },
478
530
  ptm(key = '', params = {}) {
479
531
  return this._getPTValue(this.pt, key, { ...this.$params, ...params });
480
532
  },
@@ -497,10 +549,10 @@ export default {
497
549
  },
498
550
  computed: {
499
551
  globalPT() {
500
- return ObjectUtils.getItemValue(this.$config.pt, { instance: this });
552
+ return this._getPT(this.$config?.pt, undefined, (value) => ObjectUtils.getItemValue(value, { instance: this }));
501
553
  },
502
554
  defaultPT() {
503
- return this._getOptionValue(this.$config.pt, this.$options.hostName || this.$.type.name, { instance: this }) || this.globalPT;
555
+ return this._getPT(this.$config?.pt, undefined, (value) => this._getOptionValue(value, this.$name, { ...this.$params }) || ObjectUtils.getItemValue(value, { ...this.$params }));
504
556
  },
505
557
  isUnstyled() {
506
558
  return this.unstyled !== undefined ? this.unstyled : this.$config.unstyled;
@@ -513,6 +565,9 @@ export default {
513
565
  },
514
566
  $config() {
515
567
  return this.$primevue?.config;
568
+ },
569
+ $name() {
570
+ return this.$options.hostName || this.$.type.name;
516
571
  }
517
572
  }
518
573
  };
@@ -12,7 +12,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
14
  var inlineStyles = {};
15
- var buttonStyles = "\n.p-button {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n align-items: center;\n vertical-align: bottom;\n text-align: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-button-label {\n flex: 1 1 auto;\n}\n\n.p-button-icon-right {\n order: 1;\n}\n\n.p-button:disabled {\n cursor: default;\n}\n\n.p-button-icon-only {\n justify-content: center;\n}\n\n.p-button-icon-only .p-button-label {\n visibility: hidden;\n width: 0;\n flex: 0 0 auto;\n}\n\n.p-button-vertical {\n flex-direction: column;\n}\n\n.p-button-icon-bottom {\n order: 2;\n}\n\n.p-buttonset .p-button {\n margin: 0;\n}\n\n.p-buttonset .p-button:not(:last-child) {\n border-right: 0 none;\n}\n\n.p-buttonset .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-buttonset .p-button:first-of-type {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-buttonset .p-button:last-of-type {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-buttonset .p-button:focus {\n position: relative;\n z-index: 1;\n}\n";
15
+ var buttonStyles = "\n.p-button {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n align-items: center;\n vertical-align: bottom;\n text-align: center;\n overflow: hidden;\n position: relative;\n}\n\n.p-button-label {\n flex: 1 1 auto;\n}\n\n.p-button-icon-right {\n order: 1;\n}\n\n.p-button:disabled {\n cursor: default;\n}\n\n.p-button-icon-only {\n justify-content: center;\n}\n\n.p-button-icon-only .p-button-label {\n visibility: hidden;\n width: 0;\n flex: 0 0 auto;\n}\n\n.p-button-vertical {\n flex-direction: column;\n}\n\n.p-button-icon-bottom {\n order: 2;\n}\n\n.p-buttonset .p-button {\n margin: 0;\n}\n\n.p-buttonset .p-button:not(:last-child), .p-buttonset .p-button:not(:last-child):hover {\n border-right: 0 none;\n}\n\n.p-buttonset .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-buttonset .p-button:first-of-type {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-buttonset .p-button:last-of-type {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-buttonset .p-button:focus {\n position: relative;\n z-index: 1;\n}\n";
16
16
  var checkboxStyles = "\n.p-checkbox {\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n vertical-align: bottom;\n position: relative;\n}\n\n.p-checkbox.p-checkbox-disabled {\n cursor: default;\n}\n\n.p-checkbox-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
17
17
  var inputTextStyles = "\n.p-fluid .p-inputtext {\n width: 100%;\n}\n\n/* InputGroup */\n.p-inputgroup {\n display: flex;\n align-items: stretch;\n width: 100%;\n}\n\n.p-inputgroup-addon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.p-inputgroup .p-float-label {\n display: flex;\n align-items: stretch;\n width: 100%;\n}\n\n.p-inputgroup .p-inputtext,\n.p-fluid .p-inputgroup .p-inputtext,\n.p-inputgroup .p-inputwrapper,\n.p-fluid .p-inputgroup .p-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n/* Floating Label */\n.p-float-label {\n display: block;\n position: relative;\n}\n\n.p-float-label label {\n position: absolute;\n pointer-events: none;\n top: 50%;\n margin-top: -.5rem;\n transition-property: all;\n transition-timing-function: ease;\n line-height: 1;\n}\n\n.p-float-label textarea ~ label {\n top: 1rem;\n}\n\n.p-float-label input:focus ~ label,\n.p-float-label input.p-filled ~ label,\n.p-float-label textarea:focus ~ label,\n.p-float-label textarea.p-filled ~ label,\n.p-float-label .p-inputwrapper-focus ~ label,\n.p-float-label .p-inputwrapper-filled ~ label {\n top: -.75rem;\n font-size: 12px;\n}\n\n.p-float-label .input:-webkit-autofill ~ label {\n top: -20px;\n font-size: 12px;\n}\n\n.p-float-label .p-placeholder,\n.p-float-label input::placeholder,\n.p-float-label .p-inputtext::placeholder {\n opacity: 0;\n transition-property: all;\n transition-timing-function: ease;\n}\n\n.p-float-label .p-focus .p-placeholder,\n.p-float-label input:focus::placeholder,\n.p-float-label .p-inputtext:focus::placeholder {\n opacity: 1;\n transition-property: all;\n transition-timing-function: ease;\n}\n\n.p-input-icon-left,\n.p-input-icon-right {\n position: relative;\n display: inline-block;\n}\n\n.p-input-icon-left > i,\n.p-input-icon-left > svg,\n.p-input-icon-right > i,\n.p-input-icon-right > svg {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n\n.p-fluid .p-input-icon-left,\n.p-fluid .p-input-icon-right {\n display: block;\n width: 100%;\n}\n";
18
18
  var radioButtonStyles = "\n.p-radiobutton {\n position: relative;\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n vertical-align: bottom;\n}\n\n.p-radiobutton.p-radiobutton-disabled {\n cursor: default;\n}\n\n.p-radiobutton-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.p-radiobutton-icon {\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n transform: translateZ(0) scale(.1);\n border-radius: 50%;\n visibility: hidden;\n}\n\n.p-radiobutton-box.p-highlight .p-radiobutton-icon {\n transform: translateZ(0) scale(1.0, 1.0);\n visibility: visible;\n}\n";
@@ -61,17 +61,23 @@ var script = {
61
61
  }
62
62
  },
63
63
  beforeCreate: function beforeCreate() {
64
- var _this$pt, _this$pt$onBeforeCrea, _this$$primevue, _this$$primevue$onBef;
65
- (_this$pt = this.pt) === null || _this$pt === void 0 || (_this$pt = _this$pt.hooks) === null || _this$pt === void 0 || (_this$pt$onBeforeCrea = _this$pt['onBeforeCreate']) === null || _this$pt$onBeforeCrea === void 0 ? void 0 : _this$pt$onBeforeCrea.call(_this$pt);
66
- (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.pt) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue[this.$.type.name]) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.hooks) === null || _this$$primevue === void 0 || (_this$$primevue$onBef = _this$$primevue['onBeforeCreate']) === null || _this$$primevue$onBef === void 0 ? void 0 : _this$$primevue$onBef.call(_this$$primevue);
64
+ var _this$pt, _this$pt2, _this$pt3, _ref, _ref$onBeforeCreate, _this$$config3, _this$$primevue, _this$$primevue2, _this$$primevue3, _ref2, _ref2$onBeforeCreate;
65
+ var _usept = (_this$pt = this.pt) === null || _this$pt === void 0 ? void 0 : _this$pt['_usept'];
66
+ var originalValue = _usept ? (_this$pt2 = this.pt) === null || _this$pt2 === void 0 || (_this$pt2 = _this$pt2.originalValue) === null || _this$pt2 === void 0 ? void 0 : _this$pt2[this.$.type.name] : undefined;
67
+ var value = _usept ? (_this$pt3 = this.pt) === null || _this$pt3 === void 0 || (_this$pt3 = _this$pt3.value) === null || _this$pt3 === void 0 ? void 0 : _this$pt3[this.$.type.name] : this.pt;
68
+ (_ref = value || originalValue) === null || _ref === void 0 || (_ref = _ref.hooks) === null || _ref === void 0 || (_ref$onBeforeCreate = _ref['onBeforeCreate']) === null || _ref$onBeforeCreate === void 0 ? void 0 : _ref$onBeforeCreate.call(_ref);
69
+ var _useptInConfig = (_this$$config3 = this.$config) === null || _this$$config3 === void 0 || (_this$$config3 = _this$$config3.pt) === null || _this$$config3 === void 0 ? void 0 : _this$$config3['_usept'];
70
+ var originalValueInConfig = _useptInConfig ? (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.pt) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.originalValue : undefined;
71
+ var valueInConfig = _useptInConfig ? (_this$$primevue2 = this.$primevue) === null || _this$$primevue2 === void 0 || (_this$$primevue2 = _this$$primevue2.config) === null || _this$$primevue2 === void 0 || (_this$$primevue2 = _this$$primevue2.pt) === null || _this$$primevue2 === void 0 ? void 0 : _this$$primevue2.value : (_this$$primevue3 = this.$primevue) === null || _this$$primevue3 === void 0 || (_this$$primevue3 = _this$$primevue3.config) === null || _this$$primevue3 === void 0 ? void 0 : _this$$primevue3.pt;
72
+ (_ref2 = valueInConfig || originalValueInConfig) === null || _ref2 === void 0 || (_ref2 = _ref2[this.$.type.name]) === null || _ref2 === void 0 || (_ref2 = _ref2.hooks) === null || _ref2 === void 0 || (_ref2$onBeforeCreate = _ref2['onBeforeCreate']) === null || _ref2$onBeforeCreate === void 0 ? void 0 : _ref2$onBeforeCreate.call(_ref2);
67
73
  },
68
74
  created: function created() {
69
75
  this._hook('onCreated');
70
76
  },
71
77
  beforeMount: function beforeMount() {
72
- var _this$$config3;
78
+ var _this$$config4;
73
79
  base.loadBaseStyle(undefined, {
74
- nonce: (_this$$config3 = this.$config) === null || _this$$config3 === void 0 || (_this$$config3 = _this$$config3.csp) === null || _this$$config3 === void 0 ? void 0 : _this$$config3.nonce
80
+ nonce: (_this$$config4 = this.$config) === null || _this$$config4 === void 0 || (_this$$config4 = _this$$config4.csp) === null || _this$$config4 === void 0 ? void 0 : _this$$config4.nonce
75
81
  });
76
82
  this._loadGlobalStyles();
77
83
  this._hook('onBeforeMount');
@@ -93,13 +99,15 @@ var script = {
93
99
  },
94
100
  methods: {
95
101
  _hook: function _hook(hookName) {
96
- var selfHook = this._getOptionValue(this.pt, "hooks.".concat(hookName));
97
- var defaultHook = this._getOptionValue(this.defaultPT, "hooks.".concat(hookName));
98
- selfHook === null || selfHook === void 0 ? void 0 : selfHook();
99
- defaultHook === null || defaultHook === void 0 ? void 0 : defaultHook();
102
+ if (!this.$options.hostName) {
103
+ var selfHook = this._usePT(this._getPT(this.pt, this.$.type.name), this._getOptionValue, "hooks.".concat(hookName));
104
+ var defaultHook = this._useDefaultPT(this._getOptionValue, "hooks.".concat(hookName));
105
+ selfHook === null || selfHook === void 0 ? void 0 : selfHook();
106
+ defaultHook === null || defaultHook === void 0 ? void 0 : defaultHook();
107
+ }
100
108
  },
101
109
  _loadGlobalStyles: function _loadGlobalStyles() {
102
- var _this$$config4;
110
+ var _this$$config5;
103
111
  /*
104
112
  * @todo Add self custom css support;
105
113
  * <Panel :pt="{ css: `...` }" .../>
@@ -110,9 +118,9 @@ var script = {
110
118
  * ObjectUtils.isNotEmpty(mergedCSS?.class) && this.$css.loadCustomStyle(mergedCSS?.class);
111
119
  */
112
120
 
113
- var globalCSS = this._getOptionValue(this.globalPT, 'global.css', this.$params);
121
+ var globalCSS = this._useGlobalPT(this._getOptionValue, 'global.css', this.$params);
114
122
  utils.ObjectUtils.isNotEmpty(globalCSS) && loadGlobalStyle(globalCSS, {
115
- nonce: (_this$$config4 = this.$config) === null || _this$$config4 === void 0 || (_this$$config4 = _this$$config4.csp) === null || _this$$config4 === void 0 ? void 0 : _this$$config4.nonce
123
+ nonce: (_this$$config5 = this.$config) === null || _this$$config5 === void 0 || (_this$$config5 = _this$$config5.csp) === null || _this$$config5 === void 0 ? void 0 : _this$$config5.nonce
116
124
  });
117
125
  },
118
126
  _getHostInstance: function _getHostInstance(instance) {
@@ -133,8 +141,9 @@ var script = {
133
141
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
134
142
  var searchInDefaultPT = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
135
143
  var datasetPrefix = 'data-pc-';
136
- var self = this._getPTClassValue(obj, key, params);
137
- var globalPT = searchInDefaultPT ? /./g.test(key) && !!params[key.split('.')[0]] ? this._getPTClassValue(this.globalPT, key, params) : this._getPTClassValue(this.defaultPT, key, params) : undefined;
144
+ var searchOut = /./g.test(key) && !!params[key.split('.')[0]];
145
+ var self = searchOut ? undefined : this._usePT(this._getPT(obj, this.$name), this._getPTClassValue, key, params);
146
+ var globalPT = searchInDefaultPT ? searchOut ? this._useGlobalPT(this._getPTClassValue, key, params) : this._useDefaultPT(this._getPTClassValue, key, params) : undefined;
138
147
  var merged = vue.mergeProps(self, globalPT, key !== 'transition' && _objectSpread(_objectSpread({}, key === 'root' && _defineProperty({}, "".concat(datasetPrefix, "name"), utils.ObjectUtils.toFlatCase(this.$.type.name))), {}, _defineProperty({}, "".concat(datasetPrefix, "section"), utils.ObjectUtils.toFlatCase(key))));
139
148
  return merged;
140
149
  /*
@@ -149,6 +158,42 @@ var script = {
149
158
  "class": value
150
159
  } : value;
151
160
  },
161
+ _getPT: function _getPT(pt) {
162
+ var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
163
+ var callback = arguments.length > 2 ? arguments[2] : undefined;
164
+ var _usept = pt === null || pt === void 0 ? void 0 : pt['_usept'];
165
+ var getValue = function getValue(value) {
166
+ var _computedValue$Object;
167
+ var computedValue = callback ? callback(value) : value;
168
+ return (_computedValue$Object = computedValue === null || computedValue === void 0 ? void 0 : computedValue[utils.ObjectUtils.toFlatCase(key)]) !== null && _computedValue$Object !== void 0 ? _computedValue$Object : computedValue;
169
+ };
170
+ return utils.ObjectUtils.isNotEmpty(_usept) ? {
171
+ _usept: _usept,
172
+ originalValue: getValue(pt.originalValue),
173
+ value: getValue(pt.value)
174
+ } : getValue(pt);
175
+ },
176
+ _usePT: function _usePT(pt, callback, key, params) {
177
+ var fn = function fn(value) {
178
+ return callback(value, key, params);
179
+ };
180
+ if (pt !== null && pt !== void 0 && pt.hasOwnProperty('_usept')) {
181
+ var _pt$_usept = pt['_usept'],
182
+ merge = _pt$_usept.merge,
183
+ useMergeProps = _pt$_usept.useMergeProps;
184
+ var originalValue = fn(pt.originalValue);
185
+ var value = fn(pt.value);
186
+ if (originalValue === undefined && value === undefined) return undefined;else if (utils.ObjectUtils.isString(value)) return value;else if (utils.ObjectUtils.isString(originalValue)) return originalValue;
187
+ return merge ? useMergeProps ? vue.mergeProps(originalValue, value) : _objectSpread(_objectSpread({}, originalValue), value) : value;
188
+ }
189
+ return fn(pt);
190
+ },
191
+ _useGlobalPT: function _useGlobalPT(callback, key, params) {
192
+ return this._usePT(this.globalPT, callback, key, params);
193
+ },
194
+ _useDefaultPT: function _useDefaultPT(callback, key, params) {
195
+ return this._usePT(this.defaultPT, callback, key, params);
196
+ },
152
197
  ptm: function ptm() {
153
198
  var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
154
199
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -181,14 +226,20 @@ var script = {
181
226
  },
182
227
  computed: {
183
228
  globalPT: function globalPT() {
184
- return utils.ObjectUtils.getItemValue(this.$config.pt, {
185
- instance: this
229
+ var _this$$config6,
230
+ _this = this;
231
+ return this._getPT((_this$$config6 = this.$config) === null || _this$$config6 === void 0 ? void 0 : _this$$config6.pt, undefined, function (value) {
232
+ return utils.ObjectUtils.getItemValue(value, {
233
+ instance: _this
234
+ });
186
235
  });
187
236
  },
188
237
  defaultPT: function defaultPT() {
189
- return this._getOptionValue(this.$config.pt, this.$options.hostName || this.$.type.name, {
190
- instance: this
191
- }) || this.globalPT;
238
+ var _this$$config7,
239
+ _this2 = this;
240
+ return this._getPT((_this$$config7 = this.$config) === null || _this$$config7 === void 0 ? void 0 : _this$$config7.pt, undefined, function (value) {
241
+ return _this2._getOptionValue(value, _this2.$name, _objectSpread({}, _this2.$params)) || utils.ObjectUtils.getItemValue(value, _objectSpread({}, _this2.$params));
242
+ });
192
243
  },
193
244
  isUnstyled: function isUnstyled() {
194
245
  return this.unstyled !== undefined ? this.unstyled : this.$config.unstyled;
@@ -210,8 +261,11 @@ var script = {
210
261
  }, (this._getHostInstance(this) || {}).$css), this.$options.css);
211
262
  },
212
263
  $config: function $config() {
213
- var _this$$primevue2;
214
- return (_this$$primevue2 = this.$primevue) === null || _this$$primevue2 === void 0 ? void 0 : _this$$primevue2.config;
264
+ var _this$$primevue4;
265
+ return (_this$$primevue4 = this.$primevue) === null || _this$$primevue4 === void 0 ? void 0 : _this$$primevue4.config;
266
+ },
267
+ $name: function $name() {
268
+ return this.$options.hostName || this.$.type.name;
215
269
  }
216
270
  }
217
271
  };