1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d3d65f7d-a45d-440a-bd9f-d65b762c2ad9`,e._sentryDebugIdIdentifier=`sentry-dbid-d3d65f7d-a45d-440a-bd9f-d65b762c2ad9`)}catch{}})();import{H as e,R as t,U as n,d as r,h as i,it as a,v as o}from"./runtime-core.esm-bundler-BtSCGTMb.js";import{n as s,r as c}from"./vuex.esm-bundler-Dh61RBCT.js";import{t as l}from"./constants-D3hu7TYB.js";import{t as u}from"./i18n-BzMawsYe.js";import{t as d}from"./getDisplayName-CrhwSyzB.js";import{t as f}from"./_plugin-vue_export-helper-BwEFdXXb.js";import{t as p}from"./BaseUserSelectOption-BsvSLi-v.js";var m=3,h={name:`UserSingleSelect`,props:{searchScope:{type:String,required:!1,default:l.USER_SEARCH_SCOPE.ALL},onlyManagers:{type:Boolean,default:!1},required:{type:Boolean,default:!1},clearAfterSelection:{type:Boolean,default:!1},includeDeactivatedUsers:{type:Boolean,default:!1},popover:{type:Boolean,default:!1},validationMessages:{type:Object,default:()=>({required:u.global.t(`components.common.userSingleSelect.validation.required`)})}},emits:[`input`],data(){return{isLoading:!1,searchTerm:``}},computed:{...c({usersSearchList:`users/search/list`}),emptyMessage(){return this.searchTerm.length<m?this.$t(`components.common.userSingleSelect.minSearchLength`,{count:m}):this.$t(`components.common.userSingleSelect.noResults`)}},created(){},methods:{...s({searchUserByName:`users/search/findByName`}),getInitialUser(e,t){if(e)return t||this.formatUserAsOption(e)},async searchUsers({search:e}){if(this.searchTerm=e??``,!e||e.length<m)return[];this.isLoading=!0,await this.searchUserByName({query:e,sort:this.searchScope,...this.onlyManagers?{restrictOnlyWithDirectReports:!0}:{},...this.includeDeactivatedUsers?{includeDeactivatedUsers:!0}:{}});let t=this.usersSearchList.map(this.formatUserAsOption);return this.isLoading=!1,t},formatUserAsOption(e){let t=d(e);return{value:e,label:t,picture:e.picture,fullname:t}},handleSelection(e){this.$emit(`input`,e),this.clearAfterSelection&&e&&this.$nextTick(()=>{this.clearInput()})},clearInput(){if(this.$refs.userSelect&&this.$refs.userSelect.$el){let e=this.$refs.userSelect.$el.querySelector(`input`);e&&(e.value=``,e.dispatchEvent(new Event(`input`,{bubbles:!0})))}}}};function g(s,c,l,u,d,f){let m=p,h=n(`FormKit`);return t(),r(h,{ref:`userSelect`,type:`autocomplete`,options:f.searchUsers,"option-loader":f.getInitialUser,"listitem-class":`!tw-px-0`,"data-1p-ignore":!0,"selection-appearance":`option`,validation:l.required?`required`:void 0,"validation-messages":l.validationMessages,popover:l.popover,"empty-message":f.emptyMessage,onInput:f.handleSelection},i({option:a(({option:e,classes:t})=>[o(m,{option:e,"option-class":[t.option,`tw-ml-2`],"label-class":t.optionLabel},null,8,[`option`,`option-class`,`label-class`])]),selectIcon:a(()=>[]),help:a(()=>[e(s.$slots,`help`,{},void 0,!0)]),_:2},[d.isLoading?void 0:{name:`loaderIcon`,fn:a(({})=>[]),key:`0`}]),1032,[`options`,`option-loader`,`validation`,`validation-messages`,`popover`,`empty-message`,`onInput`])}var _=f(h,[[`render`,g],[`__scopeId`,`data-v-ff1bc385`]]);export{_ as t}; 2//# sourceMappingURL=UserSingleSelect-DZANO454.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.