!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue"),require("../../../../common/v1/src")):"function"==typeof def&&def.amd?def("pcs-job-widget-v1",["vue","../../../../common/v1/src"],e):((t=t||self).phw=t.phw||{},t.phw.PcsJobWidgetV1=e(t.Vue,t.PcsCommon))}(this,function(u,o){"use strict";u=u&&u.hasOwnProperty("default")?u.default:u,o=o&&o.hasOwnProperty("default")?o.default:o;var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function t(t,e,o,i){var a,s=arguments.length,n=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,i);else for(var r=t.length-1;0<=r;r--)(a=t[r])&&(n=(s<3?a(n):3this.viewEvenMoreClickcounter;this.viewEvenMoreClickcounter++,e&&this.bindModel.maxDisplayCount+this.showMoreCount<=this.jobResults.length?(this.showMore=!0,this.bindModel.maxDisplayCount+=this.showMoreCount):(this.bindModel.maxDisplayCount=this.jobResults.length,this.viewEvenMoreClickcounter=1,this.showMore=!1);var o=this.bindModel.maxDisplayCount,i=this.element.querySelector('[data-access-list-item="'+o+'"]');i&&this.$nextTick(function(){t.focusElement(i,0)}),this.$forceUpdate()},E.prototype.fetchJobFitWeightage=function(){var e=this,o={jobSeqNo:[],requiredTags:[],size:this.jobResults.length,avoidWidgetHideOnFail:!0},i={jobIdentifierList:[],outputFields:[],size:this.jobResults.length,avoidWidgetHideOnFail:!0};this.jobResults.forEach(function(t){t.jobSeqNo&&o.jobSeqNo.push(t.jobSeqNo),t.jobSeqNo&&i.jobIdentifierList.push(t.jobSeqNo)}),this.jobTagSettingsPromise.then(function(t){t&&!t.enabled||(o.tagLimit=e.jobTagsConfig.layout&&e.jobTagsConfig.layout.maxDisplayCount||1,e.fetchJobTags(o))}),this.jobFitSettingsPromise.then(function(t){t&&!t.enabled||e.fetchFitScore(i)})},E.prototype.fetchJobTags=function(e){var r=this;this.jobTags&&this.jobTags.length&&(this.jobTags.forEach(function(t){e.requiredTags.push(t.name)}),this.tagsDataLoaded=!1,this.jobWidgetService.makeDDORequest(c.v1.ddoKeySmartJobTags,e).then(function(t){if(t.data&&t.data.jobTags){var o=t.data.jobTags,i=[],e={},a=0;r.jobTagsData={};var s=function(e){o[e].length&&o[e].forEach(function(t){r.jobTagsData[e]=r.jobTagsData[e]||{},r.jobTagsData[e][t.tag]=t,-1===i.indexOf(t.tag)&&i.push(t.tag)})};for(var n in o)s(n);r.jobResults.forEach(function(t){if(t.jobTagEnabled=!0,t.smartTagsAvailable=!1,t.tagsForOtherJobs=i,r.jobTagsData[t.jobSeqNo]){t.smartTagsAvailable=!0,t.tagsForTheJob=Object.keys(r.jobTagsData[t.jobSeqNo]);var o=i.slice();t.tagsForTheJob.forEach(function(t){var e=o.indexOf(t);o.splice(e,1)}),t.tagsForOtherJobs=o,e[t.jobSeqNo]=t.tagsForTheJob,a++}}),r.tagsDataLoaded=!0,r.trackWidgetClick("smart_tags_loaded",{smartJobTags:e,totalJobs:r.jobResults.length,availableJobTagCount:a})}}))},E.prototype.fetchFitScore=function(e){var o=this;this.jobFits&&this.jobFits.fits&&this.jobFits.fits.length&&this.jobFitsSettConfig.allowedWidgets&&-1!==this.jobFitsSettConfig.allowedWidgets.indexOf(this.elementTag)?(this.jobFits&&this.jobFits.requiredFields&&this.jobFits.requiredFields.length&&this.jobFits.requiredFields.forEach(function(t){e.outputFields.push(t)}),this.jobWidgetService.makeDDORequest(c.v1.ddoKeyFetchFitScore,e).then(function(t){if(t.data&&t.data.jobFitScores){var i=t.data.jobFitScores,a=[],s={},n=0;for(var e in i)i[e]&&i[e].fitLevel&&-1===a.indexOf(i[e].fitLevel)&&a.push(i[e].fitLevel);o.jobResults.forEach(function(t){if(t.fitEnabled=!0,t.fitLevelAvailable=!1,t.fitsForOtherJobs=a,i[t.jobSeqNo]&&i[t.jobSeqNo].data&&(t.fitLevel=i[t.jobSeqNo].data.fitLevel,i[t.jobSeqNo].data.skillGap&&(t.matchingSkills=i[t.jobSeqNo].data.skillGap),t.fitLevel)){t.fitLevelAvailable=!0,t.fitForTheJob=t.fitLevel;var e=a.slice(),o=e.indexOf(t.fitLevel);e.splice(o,1),t.fitsForOtherJobs=e,s[t.jobSeqNo]=t.fitForTheJob,n++}}),o.trackWidgetClick(O,{jobsFitLevel:s,totalJobs:o.jobResults.length,availableFitLevelCount:n}),o.fitDataLoaded=!0}})):(this.fitDataLoaded=!0,this.checkAndContructFitLevelTrack())},E.prototype.checkAndContructFitLevelTrack=function(){if(this.jobResults.length){var i={},a=[],s=0;this.jobResults.forEach(function(t){t.fitLevel&&a.push(t.fitLevel)}),a.length&&this.jobResults.forEach(function(t){if(t.fitLevel){t.fitLevelAvailable=!0,t.fitForTheJob=t.fitLevel;var e=a.slice(),o=e.indexOf(t.fitLevel);e.splice(o,1),t.fitsForOtherJobs=e,i[t.jobSeqNo]=t.fitForTheJob,s++}}),this.trackWidgetClick(O,{jobsFitLevel:i,totalJobs:this.jobResults.length,availableFitLevelCount:s})}},E.prototype.fetchJobStatus=function(){var s=this;if(this.isBulkcartEnable&&!this.commonService.isCrawlerUserAgent()){for(var t=[],e=0,o=this.jobResults;e